diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/cfg.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 028f6430879d..af4733ba5be2 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -1228,7 +1228,7 @@ static int ieee80211_assoc(struct wiphy *wiphy, struct net_device *dev, | |||
1228 | struct cfg80211_assoc_request *req) | 1228 | struct cfg80211_assoc_request *req) |
1229 | { | 1229 | { |
1230 | struct ieee80211_sub_if_data *sdata; | 1230 | struct ieee80211_sub_if_data *sdata; |
1231 | int ret; | 1231 | int ret, i; |
1232 | 1232 | ||
1233 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 1233 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
1234 | 1234 | ||
@@ -1236,6 +1236,14 @@ static int ieee80211_assoc(struct wiphy *wiphy, struct net_device *dev, | |||
1236 | !(sdata->u.mgd.flags & IEEE80211_STA_AUTHENTICATED)) | 1236 | !(sdata->u.mgd.flags & IEEE80211_STA_AUTHENTICATED)) |
1237 | return -ENOLINK; /* not authenticated */ | 1237 | return -ENOLINK; /* not authenticated */ |
1238 | 1238 | ||
1239 | sdata->u.mgd.flags &= ~IEEE80211_STA_TKIP_WEP_USED; | ||
1240 | |||
1241 | for (i = 0; i < req->crypto.n_ciphers_pairwise; i++) | ||
1242 | if (req->crypto.ciphers_pairwise[i] == WLAN_CIPHER_SUITE_WEP40 || | ||
1243 | req->crypto.ciphers_pairwise[i] == WLAN_CIPHER_SUITE_TKIP || | ||
1244 | req->crypto.ciphers_pairwise[i] == WLAN_CIPHER_SUITE_WEP104) | ||
1245 | sdata->u.mgd.flags |= IEEE80211_STA_TKIP_WEP_USED; | ||
1246 | |||
1239 | sdata->u.mgd.flags &= ~IEEE80211_STA_AUTO_BSSID_SEL; | 1247 | sdata->u.mgd.flags &= ~IEEE80211_STA_AUTO_BSSID_SEL; |
1240 | sdata->u.mgd.flags |= IEEE80211_STA_BSSID_SET; | 1248 | sdata->u.mgd.flags |= IEEE80211_STA_BSSID_SET; |
1241 | 1249 | ||