diff options
| author | Arik Nemtsov <arik@wizery.com> | 2016-03-02 23:28:31 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-05-10 10:26:04 +0200 |
| commit | 1132704fd4f8da87fb7aa0e63809cbad628449bb (patch) | |
| tree | 1ad9c16ba71b421b68f4a52d5c2efa31d880c2d0 /net | |
| parent | 85192dbafcadfa4631d2388a93173f57d6db82cf (diff) | |
mac80211: TDLS: always downgrade invalid chandefs
commit db8d99774c2682559b7648857697b9b588c6795a upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
| -rw-r--r-- | net/mac80211/tdls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/tdls.c b/net/mac80211/tdls.c index ce2ece424384..ab660dba291a 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, return; /* proceed to downgrade the chandef until usable or the same */ - while (uc.width > max_width && + while (uc.width > max_width || !cfg80211_reg_can_beacon_relax(sdata->local->hw.wiphy, &uc, sdata->wdev.iftype)) ieee80211_chandef_downgrade(&uc); |
