mac80211: fix wrong 160/80+80 MHz setting
authorShay Bar <shay.bar@celeno.com>
Mon, 10 Feb 2020 13:07:28 +0000 (15:07 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 14 Feb 2020 08:54:12 +0000 (09:54 +0100)
commit33181ea7f5a62a17fbe55f0f73428ecb5e686be8
treec659eaa3b6f4edc044161bf701573a366d8d2423
parentea75080110a4c1fa011b0a73cb8f42227143ee3e
mac80211: fix wrong 160/80+80 MHz setting

Before this patch, STA's would set new width of 160/80+80 MHz based on AP capability only.
This is wrong because STA may not support > 80MHz BW.
Fix is to verify STA has 160/80+80 MHz capability before increasing its width to > 80MHz.

The "support_80_80" and "support_160" setting is based on:
"Table 9-272 — Setting of the Supported Channel Width Set subfield and Extended NSS BW
Support subfield at a STA transmitting the VHT Capabilities Information field"
From "Draft P802.11REVmd_D3.0.pdf"

Signed-off-by: Aviad Brikman <aviad.brikman@celeno.com>
Signed-off-by: Shay Bar <shay.bar@celeno.com>
Link: https://lore.kernel.org/r/20200210130728.23674-1-shay.bar@celeno.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/util.c