diff options
-rw-r--r-- | net/mac80211/mlme.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 077a95360830..cc9e02d79b55 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -335,8 +335,17 @@ out: | |||
335 | if (ret & IEEE80211_STA_DISABLE_VHT) | 335 | if (ret & IEEE80211_STA_DISABLE_VHT) |
336 | vht_chandef = *chandef; | 336 | vht_chandef = *chandef; |
337 | 337 | ||
338 | /* | ||
339 | * Ignore the DISABLED flag when we're already connected and only | ||
340 | * tracking the APs beacon for bandwidth changes - otherwise we | ||
341 | * might get disconnected here if we connect to an AP, update our | ||
342 | * regulatory information based on the AP's country IE and the | ||
343 | * information we have is wrong/outdated and disables the channel | ||
344 | * that we're actually using for the connection to the AP. | ||
345 | */ | ||
338 | while (!cfg80211_chandef_usable(sdata->local->hw.wiphy, chandef, | 346 | while (!cfg80211_chandef_usable(sdata->local->hw.wiphy, chandef, |
339 | IEEE80211_CHAN_DISABLED)) { | 347 | tracking ? 0 : |
348 | IEEE80211_CHAN_DISABLED)) { | ||
340 | if (WARN_ON(chandef->width == NL80211_CHAN_WIDTH_20_NOHT)) { | 349 | if (WARN_ON(chandef->width == NL80211_CHAN_WIDTH_20_NOHT)) { |
341 | ret = IEEE80211_STA_DISABLE_HT | | 350 | ret = IEEE80211_STA_DISABLE_HT | |
342 | IEEE80211_STA_DISABLE_VHT; | 351 | IEEE80211_STA_DISABLE_VHT; |