summaryrefslogtreecommitdiffstats
path: root/net/mac80211/vht.c
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2015-06-10 19:42:59 +0200
committerJohannes Berg <johannes.berg@intel.com>2015-07-17 15:38:11 +0200
commitb98fb44ffceeac717789e8f2fb3497e6b8c5c65b (patch)
treeee998972f041fa9bae44bbd94119a9d356a7b62e /net/mac80211/vht.c
parentmac80211: clear local->in_reconfig on reconfig error (diff)
downloadlinux-b98fb44ffceeac717789e8f2fb3497e6b8c5c65b.tar.xz
linux-b98fb44ffceeac717789e8f2fb3497e6b8c5c65b.zip
mac80211: define TDLS wider BW support bits
Allow a device to specify support for the TDLS wider-bandwidth feature. Indicate this support during TDLS setup in the ext-capab IE and set an appropriate station flag when our TDLS peer supports it. This feature gives TDLS peers the ability to use a wider channel than the base width of the BSS. For instance VHT capable TDLS peers connected on a 20MHz channel can extend the channel to 80MHz, if regulatory considerations allow it. Do not cap the bandwidth of such stations by the current BSS channel width in mac80211. 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/vht.c')
-rw-r--r--net/mac80211/vht.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/mac80211/vht.c b/net/mac80211/vht.c
index 80694d55db74..f05808d0d80f 100644
--- a/net/mac80211/vht.c
+++ b/net/mac80211/vht.c
@@ -308,11 +308,15 @@ enum ieee80211_sta_rx_bandwidth ieee80211_sta_cur_vht_bw(struct sta_info *sta)
{
struct ieee80211_sub_if_data *sdata = sta->sdata;
enum ieee80211_sta_rx_bandwidth bw;
+ enum nl80211_chan_width bss_width = sdata->vif.bss_conf.chandef.width;
- bw = ieee80211_chan_width_to_rx_bw(sdata->vif.bss_conf.chandef.width);
- bw = min(bw, ieee80211_sta_cap_rx_bw(sta));
+ bw = ieee80211_sta_cap_rx_bw(sta);
bw = min(bw, sta->cur_max_bandwidth);
+ /* do not cap the BW of TDLS WIDER_BW peers by the bss */
+ if (!test_sta_flag(sta, WLAN_STA_TDLS_WIDER_BW))
+ bw = min(bw, ieee80211_chan_width_to_rx_bw(bss_width));
+
return bw;
}