wireless: fix wrong 160/80+80 MHz setting
PATCH 1/1 wireless: fix wrong 160/80+80 MHz setting
Fix cfg80211_chandef_usable():
consider IEEE80211_VHT_CAP_EXT_NSS_BW when verifying 160/80+80 MHz.
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"
--- net/wireless/chan.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
net/wireless/chan.c +12 -3
@@ -912,6 +912,7 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy,struct ieee80211_sta_vht_cap *vht_cap;struct ieee80211_edmg *edmg_cap;u32 width, control_freq, cap; +bool support_80_80 = false;if (WARN_ON (!cfg80211_chandef_valid (chandef)))return false;
@@ -979,9 +980,16 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy,return false;break ;case NL80211_CHAN_WIDTH_80P80 : - cap = vht_cap->cap &IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK ; + cap = vht_cap->cap; + support_80_80 = + ((cap & +IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ ) || + (cap &IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ && + cap &IEEE80211_VHT_CAP_EXT_NSS_BW_MASK ) || + ((cap &IEEE80211_VHT_CAP_EXT_NSS_BW_MASK ) >> +IEEE80211_VHT_CAP_EXT_NSS_BW_SHIFT >1 ));if (chandef->chan->band !=NL80211_BAND_6GHZ && - cap !=IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ ) + !support_80_80)return false;/* fall through */ case NL80211_CHAN_WIDTH_80 :
@@ -1001,7 +1009,8 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy,return false; cap = vht_cap->cap &IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK ;if (cap !=IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ && - cap !=IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ ) + cap !=IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ && + !(vht_cap->cap &IEEE80211_VHT_CAP_EXT_NSS_BW_MASK ))return false;break ;default :
--
2.17.1
________________________________
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any retransmission, dissemination, copying or other use of, or taking of any action in reliance upon this information is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Nothing contained herein shall be deemed as a representation, warranty or a commitment by Celeno. No warranties are expressed or implied, including, but not limited to, any implied warranties of non-infringement, merchantability and fitness for a particular purpose.
________________________________
Quoted 3 lines · Shay Bar
Fix
cfg80211_chandef_usable():
considerIEEE80211_VHT_CAP_EXT_NSS_BWwhen verifying 160/80+80 MHz.
When station with below 2 bit and connect to a 160MHZ 11ac mode AP, it will try to use 160Mhz width after this patch, but it does not support 160M in fact according spec of IEEE 802.11
.... .... .... .... .... .... .... 00.. = Supported Channel Width Set: Neither 160MHz nor 80+80 supported (0x0) 01.. .... .... .... .... .... .... .... = Extended NSS BW Support: 0x1
refer to spec of IEEE 802.11.
Table 9-250—Setting of the Supported Channel Width Set subfield and Extended NSS BW Support subfield at a STA transmitting the VHT Capabilities Information field value of the 160Mhz is 1/2 in the table for upper configure.
NOTE 2—1/2× or 3/4× Max VHT NSS support might end up being 0, indicating no support.
Quoted 78 lines
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 <[email protected]>Signed-off-by Shay Bar <[email protected]>--- net/wireless/chan.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)net/wireless/chan.c +5
-1@@ -912,6 +912,7 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy,struct ieee80211_sta_vht_cap *vht_cap;struct ieee80211_edmg *edmg_cap;u32 width, control_freq, cap; +bool support_80_80 = false;if (WARN_ON (!cfg80211_chandef_valid (chandef)))return false;@@ -979,9 +980,16 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy,return false;break ;case NL80211_CHAN_WIDTH_80P80 : - cap = vht_cap->cap &IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK ; + cap = vht_cap->cap; + support_80_80 = + ((cap & +
IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ) ||
+ (cap &IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ
&&net/wireless/chan.c +3
-0+ cap & IEEE80211_VHT_CAP_EXT_NSS_BW_MASK) || + ((cap &IEEE80211_VHT_CAP_EXT_NSS_BW_MASK ) >> + IEEE80211_VHT_CAP_EXT_NSS_BW_SHIFTQuoted 1 line
1));
if (chandef->chan->band != NL80211_BAND_6GHZ &&- cap !=
IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ)net/wireless/chan.c +2
-1+ !support_80_80)return false;/* fall through */ case NL80211_CHAN_WIDTH_80 :@@ -1001,7 +1009,8 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy,return false; cap = vht_cap->cap &IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK ;if (cap !=IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ && - cap !=IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ ) + cap !=
IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ&&
+ !(vht_cap->cap &IEEE80211_VHT_CAP_EXT_NSS_BW_MASK))return false; break; default:--
2.17.1________________________________
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any retransmission, dissemination, copying or other use of, or taking of any action in reliance upon this information is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Nothing contained herein shall be deemed as a representation, warranty or a commitment by Celeno. No warranties are expressed or implied, including, but not limited to, any implied warranties of non-infringement, merchantability and fitness for a particular purpose.
________________________________
Signature · 3 lines
ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
Quoted 12 lines · Wen Gong
Quoted 3 lines · Shay Bar
Fix
cfg80211_chandef_usable():
considerIEEE80211_VHT_CAP_EXT_NSS_BWwhen verifying 160/80+80 MHz.When station with below 2 bit and connect to a 160MHZ 11ac mode AP, it will try to use 160Mhz width after this patch,
but it does not support 160M in fact according spec of IEEE 802.11 .... .... .... .... .... .... .... 00.. = Supported Channel Width Set:
Neither 160MHz nor 80+80 supported (0x0)
01.. .... .... .... .... .... .... .... = Extended NSS BW Support:0x1
Quoted 8 lines
refer to spec of IEEE 802.11.
Table 9-250—Setting of the Supported Channel Width Set subfield and Extended NSS BW Support subfield at a STA transmitting the VHT Capabilities Information field
value of the 160Mhz is 1/2 in the table for upper configure. NOTE 2—1/2× or 3/4× Max VHT NSS support might end up being 0, indicating no support.
You mean for AP's with 1 SS for example ?
Signature · 3 lines
ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
Quoted 62 lines · Shay Bar
Fix
cfg80211_chandef_usable():
considerIEEE80211_VHT_CAP_EXT_NSS_BWwhen verifying 160/80+80 MHz.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 <[email protected]>Signed-off-by Shay Bar <[email protected]>--- net/wireless/chan.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)net/wireless/chan.c +5
-1@@ -912,6 +912,7 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy,struct ieee80211_sta_vht_cap *vht_cap;struct ieee80211_edmg *edmg_cap;u32 width, control_freq, cap; +bool support_80_80 = false;if (WARN_ON (!cfg80211_chandef_valid (chandef)))return false;@@ -979,9 +980,16 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy,return false;break ;case NL80211_CHAN_WIDTH_80P80 : - cap = vht_cap->cap &IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK ; + cap = vht_cap->cap; + support_80_80 = + ((cap & +
IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ) ||
+ (cap &IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ
&&net/wireless/chan.c +3
-0+ cap & IEEE80211_VHT_CAP_EXT_NSS_BW_MASK) || + ((cap &IEEE80211_VHT_CAP_EXT_NSS_BW_MASK ) >> + IEEE80211_VHT_CAP_EXT_NSS_BW_SHIFTQuoted 1 line
1));
if (chandef->chan->band != NL80211_BAND_6GHZ &&- cap !=
IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ)net/wireless/chan.c +2
-1+ !support_80_80)return false;/* fall through */ case NL80211_CHAN_WIDTH_80 :@@ -1001,7 +1009,8 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy,return false; cap = vht_cap->cap &IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK ;if (cap !=IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ && - cap !=IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ ) + cap !=
IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ&&
+ !(vht_cap->cap &IEEE80211_VHT_CAP_EXT_NSS_BW_MASK))
Quoted 1 line
return false;
in Table 9-251—Supported VHT-MCS and NSS Set subfields, it has Subfield VHT Extended NSS BW Capable, its Definition is:
Indicates whether the STA is capable of
interpreting the Extended NSS BW
Support subfield of the VHT Capabilities
Information field
so it should check the Subfield VHT Extended NSS BW Capable in vht_cap->vht_mcs firstly, if it is 0, then not allowed to check IEEE80211_VHT_CAP_EXT_NSS_BW_MASK of vht_cap->cap. please correct me if wrong.
Quoted 18 lines
break; default:--
2.17.1________________________________
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any retransmission, dissemination, copying or other use of, or taking of any action in reliance upon this information is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Nothing contained herein shall be deemed as a representation, warranty or a commitment by Celeno. No warranties are expressed or implied, including, but not limited to, any implied warranties of non-infringement, merchantability and fitness for a particular purpose.
________________________________