aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/ieee80211/ieee80211_wx.c14
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 */