aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2014-02-21 14:34:34 -0500
committerJohannes Berg <johannes.berg@intel.com>2014-02-24 04:16:40 -0500
commit963a1852fbac4f75a2d938fa2e734ef1e6d4c044 (patch)
tree3d908767b7d48af80be03f99557ed0cfb8a8335c /net
parente3685e03b40f5ec7926d9a75bf63467fc4071df9 (diff)
mac80211: don't validate unchanged AP bandwidth while tracking
The MLME code in mac80211 must track whether or not the AP changed bandwidth, but if there's no change while tracking it shouldn't do anything, otherwise regulatory updates can make it impossible to connect to certain APs if the regulatory database doesn't match the information from the AP. See the precise scenario described in the code. This still leaves some possible problems with CSA or if the AP actually changed bandwidth, but those cases are less common and won't completely prevent using it. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=70881 Cc: stable@vger.kernel.org Reported-and-tested-by: Nate Carlson <kernel@natecarlson.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-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;