Skip to content

Commit

Permalink
qcacld-3.0: Handle wpa_versions properly
Browse files Browse the repository at this point in the history
Change-Id: I547c4add661398a8965e83c6ef509811d58552c4
  • Loading branch information
luk1337 authored and npjohnson committed Dec 14, 2024
1 parent bffd532 commit bcc1ca1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/staging/qcacld-3.0/core/hdd/src/wlan_hdd_cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -17880,10 +17880,10 @@ static int wlan_hdd_cfg80211_set_privacy(hdd_adapter_t *pAdapter,
pWextState->wpaVersion = IW_AUTH_WPA_VERSION_DISABLED;

if (req->crypto.wpa_versions) {
if (NL80211_WPA_VERSION_1 == req->crypto.wpa_versions)
pWextState->wpaVersion = IW_AUTH_WPA_VERSION_WPA;
else if (NL80211_WPA_VERSION_2 == req->crypto.wpa_versions)
if (req->crypto.wpa_versions & (NL80211_WPA_VERSION_2 | NL80211_WPA_VERSION_3))
pWextState->wpaVersion = IW_AUTH_WPA_VERSION_WPA2;
else if (req->crypto.wpa_versions & NL80211_WPA_VERSION_1)
pWextState->wpaVersion = IW_AUTH_WPA_VERSION_WPA;
}

hdd_debug("set wpa version to %d", pWextState->wpaVersion);
Expand Down

0 comments on commit bcc1ca1

Please sign in to comment.