提交 e6ed929b 编写于 作者: W Wen Gong 提交者: Johannes Berg

wireless: add check of field VHT Extended NSS BW Capable for 160/80+80 MHz setting

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.

This patch is to add check for the subfield.
Signed-off-by: NWen Gong <wgong@codeaurora.org>
Link: https://lore.kernel.org/r/20210524033624.16993-1-wgong@codeaurora.orgSigned-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 4f2e3eb6
...@@ -942,7 +942,7 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy, ...@@ -942,7 +942,7 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy,
struct ieee80211_sta_vht_cap *vht_cap; struct ieee80211_sta_vht_cap *vht_cap;
struct ieee80211_edmg *edmg_cap; struct ieee80211_edmg *edmg_cap;
u32 width, control_freq, cap; u32 width, control_freq, cap;
bool support_80_80 = false; bool ext_nss_cap, support_80_80 = false;
if (WARN_ON(!cfg80211_chandef_valid(chandef))) if (WARN_ON(!cfg80211_chandef_valid(chandef)))
return false; return false;
...@@ -950,6 +950,8 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy, ...@@ -950,6 +950,8 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy,
ht_cap = &wiphy->bands[chandef->chan->band]->ht_cap; ht_cap = &wiphy->bands[chandef->chan->band]->ht_cap;
vht_cap = &wiphy->bands[chandef->chan->band]->vht_cap; vht_cap = &wiphy->bands[chandef->chan->band]->vht_cap;
edmg_cap = &wiphy->bands[chandef->chan->band]->edmg_cap; edmg_cap = &wiphy->bands[chandef->chan->band]->edmg_cap;
ext_nss_cap = __le16_to_cpu(vht_cap->vht_mcs.tx_highest) &
IEEE80211_VHT_EXT_NSS_BW_CAPABLE;
if (edmg_cap->channels && if (edmg_cap->channels &&
!cfg80211_edmg_usable(wiphy, !cfg80211_edmg_usable(wiphy,
...@@ -1015,7 +1017,8 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy, ...@@ -1015,7 +1017,8 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy,
(cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ) || (cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ) ||
(cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ && (cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ &&
cap & IEEE80211_VHT_CAP_EXT_NSS_BW_MASK) || cap & IEEE80211_VHT_CAP_EXT_NSS_BW_MASK) ||
u32_get_bits(cap, IEEE80211_VHT_CAP_EXT_NSS_BW_MASK) > 1; (ext_nss_cap &&
u32_get_bits(cap, IEEE80211_VHT_CAP_EXT_NSS_BW_MASK) > 1);
if (chandef->chan->band != NL80211_BAND_6GHZ && !support_80_80) if (chandef->chan->band != NL80211_BAND_6GHZ && !support_80_80)
return false; return false;
fallthrough; fallthrough;
...@@ -1037,7 +1040,8 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy, ...@@ -1037,7 +1040,8 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy,
cap = vht_cap->cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK; cap = vht_cap->cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK;
if (cap != IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ && 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)) !(ext_nss_cap &&
(vht_cap->cap & IEEE80211_VHT_CAP_EXT_NSS_BW_MASK)))
return false; return false;
break; break;
default: default:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册