]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: mt76: mt7925: ensure the 6GHz A-MPDU density cap from the hardware.
authorMichael Lo <michael.lo@mediatek.com>
Thu, 6 Nov 2025 09:21:51 +0000 (17:21 +0800)
committerFelix Fietkau <nbd@nbd.name>
Mon, 24 Nov 2025 13:59:12 +0000 (14:59 +0100)
Set the 6GHz HE A-MPDU density from the hardware capability instead of a
hardcoded value, ensuring accurate capability reporting.

Signed-off-by: Michael Lo <michael.lo@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Link: https://patch.msgid.link/20251106092151.1061648-1-mingyen.hsieh@mediatek.com
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7925/main.c

index add4c8d59e93061a4b8dd5a11c706c80cb266190..2d358a96640c9d055063337b181cde39c236eb8e 100644 (file)
@@ -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) |