[PATCH 01/28] wifi: mt76: mt7925: fix the basic rate sent in the STA phy TLV

Emery Hsin emery.hsin at mediatek.com
Mon Nov 9 19:12:17 PST 2026


phy->basic_rate was set from link_conf->basic_rates, a mac80211
band-relative index, but the firmware reads it as an absolute HW rate-set
and pinned the MMPDU rate to CCK 1M (illegal on 5/6 GHz). Send the band's
HW basic-rate set instead, like the BMC path.

Fixes: e7a9853e6b8a ("wifi: mt76: mt7925: extend mt7925_mcu_sta_phy_tlv for per-link STA")
Signed-off-by: Emery Hsin <emery.hsin at mediatek.com>
---
 drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
index f45b0d81fd08..de4c95006c4e 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
@@ -2059,7 +2059,9 @@ mt7925_mcu_sta_phy_tlv(struct sk_buff *skb,
 							    link_sta);
 	}
 
-	phy->basic_rate = cpu_to_le16((u16)link_conf->basic_rates);
+	/* Firmware expects the HW basic-rate bitmap, not mac80211's band-relative one. */
+	phy->basic_rate = cpu_to_le16(chandef->chan->band == NL80211_BAND_2GHZ ?
+			      HR_DSSS_ERP_BASIC_RATE : OFDM_BASIC_RATE);
 	if (link_sta->ht_cap.ht_supported) {
 		af = link_sta->ht_cap.ampdu_factor;
 		mm = link_sta->ht_cap.ampdu_density;
-- 
2.45.2




More information about the Linux-mediatek mailing list