|
@@ -3446,21 +3446,17 @@ static int ieee80211_sta_config_auth(struct net_device *dev,
|
|
|
struct ieee80211_sta_bss *bss, *selected = NULL;
|
|
|
int top_rssi = 0, freq;
|
|
|
|
|
|
- if (!(ifsta->flags & (IEEE80211_STA_AUTO_SSID_SEL |
|
|
|
- IEEE80211_STA_AUTO_BSSID_SEL | IEEE80211_STA_AUTO_CHANNEL_SEL))) {
|
|
|
- ifsta->state = IEEE80211_AUTHENTICATE;
|
|
|
- ieee80211_sta_reset_auth(dev, ifsta);
|
|
|
- return 0;
|
|
|
- }
|
|
|
-
|
|
|
spin_lock_bh(&local->sta_bss_lock);
|
|
|
freq = local->oper_channel->center_freq;
|
|
|
list_for_each_entry(bss, &local->sta_bss_list, list) {
|
|
|
if (!(bss->capability & WLAN_CAPABILITY_ESS))
|
|
|
continue;
|
|
|
|
|
|
- if (!!(bss->capability & WLAN_CAPABILITY_PRIVACY) ^
|
|
|
- !!sdata->default_key)
|
|
|
+ if ((ifsta->flags & (IEEE80211_STA_AUTO_SSID_SEL |
|
|
|
+ IEEE80211_STA_AUTO_BSSID_SEL |
|
|
|
+ IEEE80211_STA_AUTO_CHANNEL_SEL)) &&
|
|
|
+ (!!(bss->capability & WLAN_CAPABILITY_PRIVACY) ^
|
|
|
+ !!sdata->default_key))
|
|
|
continue;
|
|
|
|
|
|
if (!(ifsta->flags & IEEE80211_STA_AUTO_CHANNEL_SEL) &&
|