developer | 692ed9b | 2023-06-19 12:03:50 +0800 | [diff] [blame] | 1 | From da1c93b8c6480cfcd605cd8c19111a6df8c9f8b4 Mon Sep 17 00:00:00 2001 |
| 2 | From: Howard Hsu <howard-yh.hsu@mediatek.com> |
| 3 | Date: Fri, 2 Jun 2023 15:12:34 +0800 |
| 4 | Subject: [PATCH] wifi: mt76: mt7996: fix beamformee ss subfield in EHT PHY |
| 5 | caps IE |
| 6 | |
| 7 | According to P802.11be_D2.1 Table 9-401I, the minimum value of Beamformee SS shall |
| 8 | be 3. Fix it to ensure that the value of Beamformee SS subfield is at least 3. |
| 9 | |
| 10 | Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com> |
| 11 | --- |
| 12 | mt7996/init.c | 9 +++++---- |
| 13 | 1 file changed, 5 insertions(+), 4 deletions(-) |
| 14 | |
| 15 | diff --git a/mt7996/init.c b/mt7996/init.c |
| 16 | index 9eba689a..96c4bb01 100644 |
| 17 | --- a/mt7996/init.c |
| 18 | +++ b/mt7996/init.c |
| 19 | @@ -936,16 +936,17 @@ mt7996_init_eht_caps(struct mt7996_phy *phy, enum nl80211_band band, |
| 20 | IEEE80211_EHT_PHY_CAP0_SU_BEAMFORMER | |
| 21 | IEEE80211_EHT_PHY_CAP0_SU_BEAMFORMEE; |
| 22 | |
| 23 | + val = max_t(u8, sts - 1, 3); |
| 24 | eht_cap_elem->phy_cap_info[0] |= |
| 25 | - u8_encode_bits(u8_get_bits(sts - 1, BIT(0)), |
| 26 | + u8_encode_bits(u8_get_bits(val, BIT(0)), |
| 27 | IEEE80211_EHT_PHY_CAP0_BEAMFORMEE_SS_80MHZ_MASK); |
| 28 | |
| 29 | eht_cap_elem->phy_cap_info[1] = |
| 30 | - u8_encode_bits(u8_get_bits(sts - 1, GENMASK(2, 1)), |
| 31 | + u8_encode_bits(u8_get_bits(val, GENMASK(2, 1)), |
| 32 | IEEE80211_EHT_PHY_CAP1_BEAMFORMEE_SS_80MHZ_MASK) | |
| 33 | - u8_encode_bits(sts - 1, |
| 34 | + u8_encode_bits(val, |
| 35 | IEEE80211_EHT_PHY_CAP1_BEAMFORMEE_SS_160MHZ_MASK) | |
| 36 | - u8_encode_bits(sts - 1, |
| 37 | + u8_encode_bits(val, |
| 38 | IEEE80211_EHT_PHY_CAP1_BEAMFORMEE_SS_320MHZ_MASK); |
| 39 | |
| 40 | eht_cap_elem->phy_cap_info[2] = |
| 41 | -- |
| 42 | 2.18.0 |
| 43 | |