From d0cc92c1fd08f9e1842cd6689bac3ecb4b261d32 Mon Sep 17 00:00:00 2001 From: Shayne Chen Date: Fri, 26 Jan 2024 17:09:22 +0800 Subject: [PATCH] wifi: mt76: connac: set correct muar_idx for mt799x chipsets The MUAR (multicast unicast address) is an address mapping table that participates in the process of searching WTBL entries. For mt799x chipsets, the default muar index of BMC WTBL is 0xe. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau --- mt76_connac.h | 5 +++++ mt76_connac_mcu.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/mt76_connac.h b/mt76_connac.h index fdde3d70..98d64d3d 100644 --- a/mt76_connac.h +++ b/mt76_connac.h @@ -227,6 +227,11 @@ static inline bool is_mt7992(struct mt76_dev *dev) return mt76_chip(dev) == 0x7992; } +static inline bool is_mt799x(struct mt76_dev *dev) +{ + return is_mt7996(dev) || is_mt7992(dev); +} + static inline bool is_mt7622(struct mt76_dev *dev) { if (!IS_ENABLED(CONFIG_MT7622_WMAC)) diff --git a/mt76_connac_mcu.c b/mt76_connac_mcu.c index d7ef3c57..7602f979 100644 --- a/mt76_connac_mcu.c +++ b/mt76_connac_mcu.c @@ -283,6 +283,9 @@ __mt76_connac_mcu_alloc_sta_req(struct mt76_dev *dev, struct mt76_vif *mvif, }; struct sk_buff *skb; + if (is_mt799x(dev) && !wcid->sta) + hdr.muar_idx = 0xe; + mt76_connac_mcu_get_wlan_idx(dev, wcid, &hdr.wlan_idx_lo, &hdr.wlan_idx_hi); skb = mt76_mcu_msg_alloc(dev, NULL, len);