summaryrefslogtreecommitdiffstats
path: root/net/mac80211/tdls.c
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2015-08-15 22:39:46 +0300
committerJohannes Berg <johannes.berg@intel.com>2015-09-22 15:21:21 +0200
commit82c0cc90d6268a3cd3ee058257d2146188326452 (patch)
tree1a4c12dc918c9671743378436b94846a4f519534 /net/mac80211/tdls.c
parentfc58c47ef1ace65c5c1c94f2e96578e7b04aad64 (diff)
downloadlinux-82c0cc90d6268a3cd3ee058257d2146188326452.tar.bz2
mac80211: debugfs: add file to disallow TDLS wider-bw
Sometimes we are interested in testing TDLS performance in a specific width setting. Add the ability to disable the wider-band feature, thereby allowing the TDLS channel width to be controlled by the BSS width. 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/tdls.c')
-rw-r--r--net/mac80211/tdls.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/mac80211/tdls.c b/net/mac80211/tdls.c
index aee701a5649e..1bacea793c23 100644
--- a/net/mac80211/tdls.c
+++ b/net/mac80211/tdls.c
@@ -41,9 +41,11 @@ static void ieee80211_tdls_add_ext_capab(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb)
{
struct ieee80211_local *local = sdata->local;
+ struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
bool chan_switch = local->hw.wiphy->features &
NL80211_FEATURE_TDLS_CHANNEL_SWITCH;
- bool wider_band = ieee80211_hw_check(&local->hw, TDLS_WIDER_BW);
+ bool wider_band = ieee80211_hw_check(&local->hw, TDLS_WIDER_BW) &&
+ !ifmgd->tdls_wider_bw_prohibited;
enum ieee80211_band band = ieee80211_get_sdata_band(sdata);
struct ieee80211_supported_band *sband = local->hw.wiphy->bands[band];
bool vht = sband && sband->vht_cap.vht_supported;