diff options
author | James Ketrenos <jketreno@linux.intel.com> | 2005-09-21 12:58:38 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-09-21 23:04:57 -0400 |
commit | 7dc888fefc053996354ca40602159e0ce5669f86 (patch) | |
tree | a92b0c4d487649958d908fbd2ce60425ca5ac8e8 | |
parent | ccd0fda3a6d9186d067893114f65b8df758d5a1f (diff) |
[PATCH] ieee80211: Keep auth mode unchanged after iwconfig key off/on cycle
tree 2e6f6e7dc4f4eeb8e3dc265020016dd53e40578a
parent ba2075794a089430b3dd7c90ff46ce1b67e9c7cc
author Zhu Yi <yi.zhu@intel.com> 1125551043 +0800
committer James Ketrenos <jketreno@linux.intel.com> 1127314475 -0500
[Bug 768] Keep auth mode unchanged after iwconfig key off/on cycle.
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
-rw-r--r-- | net/ieee80211/ieee80211_wx.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/net/ieee80211/ieee80211_wx.c b/net/ieee80211/ieee80211_wx.c index d710f47c4bd5..65aa96da730d 100644 --- a/net/ieee80211/ieee80211_wx.c +++ b/net/ieee80211/ieee80211_wx.c | |||
@@ -412,11 +412,15 @@ int ieee80211_wx_set_encode(struct ieee80211_device *ieee, | |||
412 | sec.flags |= SEC_ACTIVE_KEY; | 412 | sec.flags |= SEC_ACTIVE_KEY; |
413 | } | 413 | } |
414 | } | 414 | } |
415 | ieee->open_wep = !(erq->flags & IW_ENCODE_RESTRICTED); | 415 | if (erq->flags & (IW_ENCODE_OPEN | IW_ENCODE_RESTRICTED)) { |
416 | sec.auth_mode = ieee->open_wep ? WLAN_AUTH_OPEN : WLAN_AUTH_SHARED_KEY; | 416 | ieee->open_wep = !(erq->flags & IW_ENCODE_RESTRICTED); |
417 | sec.flags |= SEC_AUTH_MODE; | 417 | sec.auth_mode = ieee->open_wep ? WLAN_AUTH_OPEN : |
418 | IEEE80211_DEBUG_WX("Auth: %s\n", sec.auth_mode == WLAN_AUTH_OPEN ? | 418 | WLAN_AUTH_SHARED_KEY; |
419 | "OPEN" : "SHARED KEY"); | 419 | sec.flags |= SEC_AUTH_MODE; |
420 | IEEE80211_DEBUG_WX("Auth: %s\n", | ||
421 | sec.auth_mode == WLAN_AUTH_OPEN ? | ||
422 | "OPEN" : "SHARED KEY"); | ||
423 | } | ||
420 | 424 | ||
421 | /* For now we just support WEP, so only set that security level... | 425 | /* For now we just support WEP, so only set that security level... |
422 | * TODO: When WPA is added this is one place that needs to change */ | 426 | * TODO: When WPA is added this is one place that needs to change */ |