wifi: mt76: connac: adjust phy capabilities based on band constraints

Adjust HE and EHT phy capabilities based on the band constraints.
For 2g band, we shall not enable the capabilities above 40MHz.

Signed-off-by: Howard Hsu <[email protected]>
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:
Howard Hsu
2025-01-14 13:45:25 +01:00
committed by Felix Fietkau
parent 9b588c7fb3
commit 46798905cf
6 changed files with 41 additions and 21 deletions
+5 -2
View File
@@ -9,10 +9,13 @@
#define HE_PREP(f, m, v) le16_encode_bits(le32_get_bits(v, MT_CRXV_HE_##m),\
IEEE80211_RADIOTAP_HE_##f)
void mt76_connac_gen_ppe_thresh(u8 *he_ppet, int nss)
void mt76_connac_gen_ppe_thresh(u8 *he_ppet, int nss, enum nl80211_band band)
{
static const u8 ppet16_ppet8_ru3_ru0[] = { 0x1c, 0xc7, 0x71 };
u8 i, ppet_bits, ppet_size, ru_bit_mask = 0x7; /* HE80 */
u8 i, ppet_bits, ppet_size, ru_bit_mask = 0xf;
if (band == NL80211_BAND_2GHZ)
ru_bit_mask = 0x3;
he_ppet[0] = FIELD_PREP(IEEE80211_PPE_THRES_NSS_MASK, nss - 1) |
FIELD_PREP(IEEE80211_PPE_THRES_RU_INDEX_BITMASK_MASK,