Commit 2ccbea08 authored by Michael Lo's avatar Michael Lo Committed by Felix Fietkau
Browse files

wifi: mt76: mt7925: ensure the 6GHz A-MPDU density cap from the hardware.



Set the 6GHz HE A-MPDU density from the hardware capability instead of a
hardcoded value, ensuring accurate capability reporting.

Signed-off-by: default avatarMichael Lo <michael.lo@mediatek.com>
Signed-off-by: default avatarMing Yen Hsieh <mingyen.hsieh@mediatek.com>
Link: https://patch.msgid.link/20251106092151.1061648-1-mingyen.hsieh@mediatek.com


Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent a4031fec
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -139,10 +139,14 @@ mt7925_init_he_caps(struct mt792x_phy *phy, enum nl80211_band band,
	}

	if (band == NL80211_BAND_6GHZ) {
		struct ieee80211_supported_band *sband =
			&phy->mt76->sband_5g.sband;
		struct ieee80211_sta_ht_cap *ht_cap = &sband->ht_cap;

		u16 cap = IEEE80211_HE_6GHZ_CAP_TX_ANTPAT_CONS |
			  IEEE80211_HE_6GHZ_CAP_RX_ANTPAT_CONS;

		cap |= u16_encode_bits(IEEE80211_HT_MPDU_DENSITY_0_5,
		cap |= u16_encode_bits(ht_cap->ampdu_density,
				       IEEE80211_HE_6GHZ_CAP_MIN_MPDU_START) |
		       u16_encode_bits(IEEE80211_VHT_MAX_AMPDU_1024K,
				       IEEE80211_HE_6GHZ_CAP_MAX_AMPDU_LEN_EXP) |