diff options
-rw-r--r-- | net/mac80211/mlme.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 4adba09e80ca..e470bf12b765 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -3446,21 +3446,17 @@ static int ieee80211_sta_config_auth(struct net_device *dev, | |||
3446 | struct ieee80211_sta_bss *bss, *selected = NULL; | 3446 | struct ieee80211_sta_bss *bss, *selected = NULL; |
3447 | int top_rssi = 0, freq; | 3447 | int top_rssi = 0, freq; |
3448 | 3448 | ||
3449 | if (!(ifsta->flags & (IEEE80211_STA_AUTO_SSID_SEL | | ||
3450 | IEEE80211_STA_AUTO_BSSID_SEL | IEEE80211_STA_AUTO_CHANNEL_SEL))) { | ||
3451 | ifsta->state = IEEE80211_AUTHENTICATE; | ||
3452 | ieee80211_sta_reset_auth(dev, ifsta); | ||
3453 | return 0; | ||
3454 | } | ||
3455 | |||
3456 | spin_lock_bh(&local->sta_bss_lock); | 3449 | spin_lock_bh(&local->sta_bss_lock); |
3457 | freq = local->oper_channel->center_freq; | 3450 | freq = local->oper_channel->center_freq; |
3458 | list_for_each_entry(bss, &local->sta_bss_list, list) { | 3451 | list_for_each_entry(bss, &local->sta_bss_list, list) { |
3459 | if (!(bss->capability & WLAN_CAPABILITY_ESS)) | 3452 | if (!(bss->capability & WLAN_CAPABILITY_ESS)) |
3460 | continue; | 3453 | continue; |
3461 | 3454 | ||
3462 | if (!!(bss->capability & WLAN_CAPABILITY_PRIVACY) ^ | 3455 | if ((ifsta->flags & (IEEE80211_STA_AUTO_SSID_SEL | |
3463 | !!sdata->default_key) | 3456 | IEEE80211_STA_AUTO_BSSID_SEL | |
3457 | IEEE80211_STA_AUTO_CHANNEL_SEL)) && | ||
3458 | (!!(bss->capability & WLAN_CAPABILITY_PRIVACY) ^ | ||
3459 | !!sdata->default_key)) | ||
3464 | continue; | 3460 | continue; |
3465 | 3461 | ||
3466 | if (!(ifsta->flags & IEEE80211_STA_AUTO_CHANNEL_SEL) && | 3462 | if (!(ifsta->flags & IEEE80211_STA_AUTO_CHANNEL_SEL) && |