mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt7996: fix capability of EHT-MCS 15 in MRU
According to the definition in IEEE Std 802.11be-2024, Table 9-417r:
- If 80 MHz is not supported, bit 1-3 are set to 0.
- If 160 MHz is not supported, bit 2-3 are set to 0.
- If 320 MHz is not supported, bit 3 is set to 0.
Fixes: 348533eb968d ("wifi: mt76: mt7996: add EHT capability init")
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
dd93a16e5f
commit
968dc6335a
+10
-6
@@ -1580,7 +1580,6 @@ mt7996_init_eht_caps(struct mt7996_phy *phy, enum nl80211_band band,
|
||||
struct ieee80211_sta_eht_cap *eht_cap = &data->eht_cap;
|
||||
struct ieee80211_eht_cap_elem_fixed *eht_cap_elem = &eht_cap->eht_cap_elem;
|
||||
struct ieee80211_eht_mcs_nss_supp *eht_nss = &eht_cap->eht_mcs_nss_supp;
|
||||
enum nl80211_chan_width width = phy->mt76->chandef.width;
|
||||
int nss = hweight8(phy->mt76->antenna_mask);
|
||||
int sts = hweight16(phy->mt76->chainmask);
|
||||
u8 val;
|
||||
@@ -1656,11 +1655,16 @@ mt7996_init_eht_caps(struct mt7996_phy *phy, enum nl80211_band band,
|
||||
u8_encode_bits(u8_get_bits(1, GENMASK(1, 0)),
|
||||
IEEE80211_EHT_PHY_CAP5_MAX_NUM_SUPP_EHT_LTF_MASK);
|
||||
|
||||
val = width == NL80211_CHAN_WIDTH_320 ? 0xf :
|
||||
width == NL80211_CHAN_WIDTH_160 ? 0x7 :
|
||||
width == NL80211_CHAN_WIDTH_80 ? 0x3 : 0x1;
|
||||
eht_cap_elem->phy_cap_info[6] =
|
||||
u8_encode_bits(val, IEEE80211_EHT_PHY_CAP6_MCS15_SUPP_MASK);
|
||||
eht_cap_elem->phy_cap_info[6] = IEEE80211_EHT_PHY_CAP6_MCS15_SUPP_MASK;
|
||||
if (band != NL80211_BAND_6GHZ) {
|
||||
eht_cap_elem->phy_cap_info[6] &=
|
||||
~IEEE80211_EHT_PHY_CAP6_MCS15_SUPP_320MHZ;
|
||||
|
||||
if (band != NL80211_BAND_5GHZ)
|
||||
eht_cap_elem->phy_cap_info[6] &=
|
||||
~(IEEE80211_EHT_PHY_CAP6_MCS15_SUPP_160MHZ |
|
||||
IEEE80211_EHT_PHY_CAP6_MCS15_SUPP_80MHZ);
|
||||
}
|
||||
|
||||
val = u8_encode_bits(nss, IEEE80211_EHT_MCS_NSS_RX) |
|
||||
u8_encode_bits(nss, IEEE80211_EHT_MCS_NSS_TX);
|
||||
|
||||
Reference in New Issue
Block a user