aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/mac80211/mlme.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 57d5482b10fa..c415f00cd6b6 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -271,6 +271,28 @@ ieee80211_determine_chantype(struct ieee80211_sub_if_data *sdata,
271 ret = 0; 271 ret = 0;
272 272
273out: 273out:
274 /*
275 * When tracking the current AP, don't do any further checks if the
276 * new chandef is identical to the one we're currently using for the
277 * connection. This keeps us from playing ping-pong with regulatory,
278 * without it the following can happen (for example):
279 * - connect to an AP with 80 MHz, world regdom allows 80 MHz
280 * - AP advertises regdom US
281 * - CRDA loads regdom US with 80 MHz prohibited (old database)
282 * - the code below detects an unsupported channel, downgrades, and
283 * we disconnect from the AP in the caller
284 * - disconnect causes CRDA to reload world regdomain and the game
285 * starts anew.
286 * (see https://bugzilla.kernel.org/show_bug.cgi?id=70881)
287 *
288 * It seems possible that there are still scenarios with CSA or real
289 * bandwidth changes where a this could happen, but those cases are
290 * less common and wouldn't completely prevent using the AP.
291 */
292 if (tracking &&
293 cfg80211_chandef_identical(chandef, &sdata->vif.bss_conf.chandef))
294 return ret;
295
274 /* don't print the message below for VHT mismatch if VHT is disabled */ 296 /* don't print the message below for VHT mismatch if VHT is disabled */
275 if (ret & IEEE80211_STA_DISABLE_VHT) 297 if (ret & IEEE80211_STA_DISABLE_VHT)
276 vht_chandef = *chandef; 298 vht_chandef = *chandef;