aboutsummaryrefslogtreecommitdiffstats
path: root/net/ieee80211/ieee80211_wx.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ieee80211/ieee80211_wx.c')
-rw-r--r--net/ieee80211/ieee80211_wx.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/ieee80211/ieee80211_wx.c b/net/ieee80211/ieee80211_wx.c
index df64bf3716b7..49afea7989d0 100644
--- a/net/ieee80211/ieee80211_wx.c
+++ b/net/ieee80211/ieee80211_wx.c
@@ -322,7 +322,7 @@ int ieee80211_wx_set_encode(struct ieee80211_device *ieee,
322 sec.enabled = 0; 322 sec.enabled = 0;
323 sec.encrypt = 0; 323 sec.encrypt = 0;
324 sec.level = SEC_LEVEL_0; 324 sec.level = SEC_LEVEL_0;
325 sec.flags |= SEC_ENABLED | SEC_LEVEL; 325 sec.flags |= SEC_ENABLED | SEC_LEVEL | SEC_ENCRYPT;
326 } 326 }
327 327
328 goto done; 328 goto done;
@@ -330,7 +330,7 @@ int ieee80211_wx_set_encode(struct ieee80211_device *ieee,
330 330
331 sec.enabled = 1; 331 sec.enabled = 1;
332 sec.encrypt = 1; 332 sec.encrypt = 1;
333 sec.flags |= SEC_ENABLED; 333 sec.flags |= SEC_ENABLED | SEC_ENCRYPT;
334 334
335 if (*crypt != NULL && (*crypt)->ops != NULL && 335 if (*crypt != NULL && (*crypt)->ops != NULL &&
336 strcmp((*crypt)->ops->name, "WEP") != 0) { 336 strcmp((*crypt)->ops->name, "WEP") != 0) {
@@ -412,8 +412,6 @@ 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
416 done:
417 ieee->open_wep = !(erq->flags & IW_ENCODE_RESTRICTED); 415 ieee->open_wep = !(erq->flags & IW_ENCODE_RESTRICTED);
418 sec.auth_mode = ieee->open_wep ? WLAN_AUTH_OPEN : WLAN_AUTH_SHARED_KEY; 416 sec.auth_mode = ieee->open_wep ? WLAN_AUTH_OPEN : WLAN_AUTH_SHARED_KEY;
419 sec.flags |= SEC_AUTH_MODE; 417 sec.flags |= SEC_AUTH_MODE;
@@ -425,6 +423,7 @@ int ieee80211_wx_set_encode(struct ieee80211_device *ieee,
425 sec.flags |= SEC_LEVEL; 423 sec.flags |= SEC_LEVEL;
426 sec.level = SEC_LEVEL_1; /* 40 and 104 bit WEP */ 424 sec.level = SEC_LEVEL_1; /* 40 and 104 bit WEP */
427 425
426 done:
428 if (ieee->set_security) 427 if (ieee->set_security)
429 ieee->set_security(dev, &sec); 428 ieee->set_security(dev, &sec);
430 429