aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2016-03-02 16:28:31 -0500
committerJohannes Berg <johannes.berg@intel.com>2016-04-05 04:50:32 -0400
commitdb8d99774c2682559b7648857697b9b588c6795a (patch)
tree75e410079c8b0c7265f20965e7533a0f92b28fe2 /net/mac80211
parentc3732a7b37bca52bdd23aacde001f2038f9cb11a (diff)
mac80211: TDLS: always downgrade invalid chandefs
Even if the current chandef width is equal to the station's max-BW, it doesn't mean it's a valid width for TDLS. Make sure to always check regulatory constraints in these cases. Fixes: 0fabfaafec3a ("mac80211: upgrade BW of TDLS peers when possible") Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/tdls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/tdls.c b/net/mac80211/tdls.c
index c9eeb3f12808..43f13abe89c7 100644
--- a/net/mac80211/tdls.c
+++ b/net/mac80211/tdls.c
@@ -332,7 +332,7 @@ ieee80211_tdls_chandef_vht_upgrade(struct ieee80211_sub_if_data *sdata,
332 return; 332 return;
333 333
334 /* proceed to downgrade the chandef until usable or the same */ 334 /* proceed to downgrade the chandef until usable or the same */
335 while (uc.width > max_width && 335 while (uc.width > max_width ||
336 !cfg80211_reg_can_beacon_relax(sdata->local->hw.wiphy, &uc, 336 !cfg80211_reg_can_beacon_relax(sdata->local->hw.wiphy, &uc,
337 sdata->wdev.iftype)) 337 sdata->wdev.iftype))
338 ieee80211_chandef_downgrade(&uc); 338 ieee80211_chandef_downgrade(&uc);