Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 159097
b: refs/heads/master
c: 323d566
h: refs/heads/master
i:
  159095: da5abce
v: v3
  • Loading branch information
Gábor Stefanik authored and John W. Linville committed Jul 24, 2009
1 parent 8d0b853 commit d3f5b55
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4b9631a4734e25e37c83e72c3e0ffcbb08de5791
refs/heads/master: 323d566eae1ace41bc674863b58fcc474501a2db
12 changes: 11 additions & 1 deletion trunk/net/wireless/wext-compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -880,9 +880,19 @@ static int cfg80211_set_wpa_version(struct wireless_dev *wdev, u32 wpa_versions)
wdev->wext.connect.crypto.wpa_versions = 0;

if (wpa_versions & ~(IW_AUTH_WPA_VERSION_WPA |
IW_AUTH_WPA_VERSION_WPA2))
IW_AUTH_WPA_VERSION_WPA2|
IW_AUTH_WPA_VERSION_DISABLED))
return -EINVAL;

if ((wpa_versions & IW_AUTH_WPA_VERSION_DISABLED) &&
(wpa_versions & (IW_AUTH_WPA_VERSION_WPA|
IW_AUTH_WPA_VERSION_WPA2)))
return -EINVAL;

if (wpa_versions & IW_AUTH_WPA_VERSION_DISABLED)
wdev->wext.connect.crypto.wpa_versions &=
~(NL80211_WPA_VERSION_1|NL80211_WPA_VERSION_2);

if (wpa_versions & IW_AUTH_WPA_VERSION_WPA)
wdev->wext.connect.crypto.wpa_versions |=
NL80211_WPA_VERSION_1;
Expand Down

0 comments on commit d3f5b55

Please sign in to comment.