Skip to content

Commit e2f87f1

Browse files
haogrootfrank-w
authored andcommitted
wifi: mt76: mt7996: set correct beamformee SS capability
According to IEEE P802.11be/D6.0 Table 9-417n, beamformee SS field stands for the maximum number of spatial streams that the STA can receive in an EHT sounding NDP minus 1, and the minimum value of this field is 3. This value indicates the decoding capability of a beamformee, which is independent of current antenna settings. Correct the value for mt7996 and mt7992 chipsets based on their HW capability. Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com> Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
1 parent f533f9d commit e2f87f1

1 file changed

Lines changed: 17 additions & 6 deletions

File tree

  • drivers/net/wireless/mediatek/mt76/mt7996

drivers/net/wireless/mediatek/mt76/mt7996/init.c

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -967,8 +967,12 @@ void mt7996_set_stream_vht_txbf_caps(struct mt7996_phy *phy)
967967
cap = &phy->mt76->sband_5g.sband.vht_cap.cap;
968968

969969
*cap |= IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE |
970-
IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE |
971-
FIELD_PREP(IEEE80211_VHT_CAP_BEAMFORMEE_STS_MASK, sts - 1);
970+
IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE;
971+
972+
if (is_mt7996(phy->mt76->dev))
973+
*cap |= FIELD_PREP(IEEE80211_VHT_CAP_BEAMFORMEE_STS_MASK, 3);
974+
else
975+
*cap |= FIELD_PREP(IEEE80211_VHT_CAP_BEAMFORMEE_STS_MASK, 4);
972976

973977
*cap &= ~(IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK |
974978
IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE |
@@ -1013,9 +1017,15 @@ mt7996_set_stream_he_txbf_caps(struct mt7996_phy *phy,
10131017
IEEE80211_HE_PHY_CAP2_UL_MU_PARTIAL_MU_MIMO;
10141018
elem->phy_cap_info[2] |= c;
10151019

1016-
c = IEEE80211_HE_PHY_CAP4_SU_BEAMFORMEE |
1017-
IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_4 |
1018-
IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_4;
1020+
c = IEEE80211_HE_PHY_CAP4_SU_BEAMFORMEE;
1021+
1022+
if (is_mt7996(phy->mt76->dev))
1023+
c |= IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_4 |
1024+
IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_4;
1025+
else
1026+
c |= IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_5 |
1027+
IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_5;
1028+
10191029
elem->phy_cap_info[4] |= c;
10201030

10211031
/* do not support NG16 due to spec D4.0 changes subcarrier idx */
@@ -1212,7 +1222,8 @@ mt7996_init_eht_caps(struct mt7996_phy *phy, enum nl80211_band band,
12121222
IEEE80211_EHT_PHY_CAP0_SU_BEAMFORMER |
12131223
IEEE80211_EHT_PHY_CAP0_SU_BEAMFORMEE;
12141224

1215-
val = max_t(u8, sts - 1, 3);
1225+
/* Set the maximum capability regardless of the antenna configuration. */
1226+
val = is_mt7992(phy->mt76->dev) ? 4 : 3;
12161227
eht_cap_elem->phy_cap_info[0] |=
12171228
u8_encode_bits(u8_get_bits(val, BIT(0)),
12181229
IEEE80211_EHT_PHY_CAP0_BEAMFORMEE_SS_80MHZ_MASK);

0 commit comments

Comments
 (0)