summaryrefslogtreecommitdiff
path: root/net/mac80211
diff options
context:
space:
mode:
authorManikanta Pubbisetty <mpubbise@qti.qualcomm.com>2017-09-25 22:09:15 +0300
committerJohannes Berg <johannes.berg@intel.com>2017-10-02 15:06:19 +0300
commit504871e602d9a9ea2321d47ca506887417f54e75 (patch)
treee10d95dabaf48ed6b999679c357f952255127418 /net/mac80211
parent1bd773c077deeeb2d9ced1fdb6d846169b8e7e4a (diff)
downloadlinux-504871e602d9a9ea2321d47ca506887417f54e75.tar.xz
mac80211: fix bandwidth computation for TDLS peers
Section 11.23.1 of 80211-2016 specification allows TDLS peers to operate on wider bandwidths though they are connected to a BSS which do not support wider bandwidth operations, provided both the peers advertise wider bandwidth capabilities. The existing logic considers the minimum of station's and AP's capability for bandwidth computation. The same logic applies for TDLS peers as well, this restricts operating on wider bandwidths over a TDLS link when the peers are connected to legacy APs. As an example, if 80Mhz VHT capable peers are connected to a 20Mhz 5 GHz AP, then as per the existing logic TDLS operation will be restricted to 20Mhz. Address this problem by not considering BSS capability in bandwidth computation if the participating TDLS peers have wider bandwidth capability. Signed-off-by: Manikanta Pubbisetty <mpubbise@qti.qualcomm.com> [lots of wording/typo fixes] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/vht.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/mac80211/vht.c b/net/mac80211/vht.c
index 19ec2189d3ac..b9276ac849fa 100644
--- a/net/mac80211/vht.c
+++ b/net/mac80211/vht.c
@@ -386,6 +386,16 @@ enum ieee80211_sta_rx_bandwidth ieee80211_sta_cur_vht_bw(struct sta_info *sta)
bw = ieee80211_sta_cap_rx_bw(sta);
bw = min(bw, sta->cur_max_bandwidth);
+
+ /* Don't consider AP's bandwidth for TDLS peers, section 11.23.1 of
+ * IEEE80211-2016 specification makes higher bandwidth operation
+ * possible on the TDLS link if the peers have wider bandwidth
+ * capability.
+ */
+ if (test_sta_flag(sta, WLAN_STA_TDLS_PEER) &&
+ test_sta_flag(sta, WLAN_STA_TDLS_WIDER_BW))
+ return bw;
+
bw = min(bw, ieee80211_chan_width_to_rx_bw(bss_width));
return bw;