blob: 90af1e36e0c059da8c16f83b8cf98d219db7d8be [file] [log] [blame]
developer8935fc12024-01-11 14:08:37 +08001From 72e254cac7eac0e0e822b6c12148f0208688d131 Mon Sep 17 00:00:00 2001
developerf8871e82023-03-08 17:22:32 +08002From: Shayne Chen <shayne.chen@mediatek.com>
3Date: Thu, 16 Feb 2023 13:53:14 +0800
developer8935fc12024-01-11 14:08:37 +08004Subject: [PATCH 19/25] mtk: wifi: mt76: connac: set correct muar_idx for
developerd243af02023-12-21 14:49:33 +08005 connac3 chipset
developerf8871e82023-03-08 17:22:32 +08006
7Set the muar_idx to 0xe for the hw bcast/mcast station entry of connac3
8chipset.
9
10Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
developerf8871e82023-03-08 17:22:32 +080011---
12 mt76_connac.h | 5 +++++
13 mt76_connac_mcu.c | 3 +++
14 2 files changed, 8 insertions(+)
15
16diff --git a/mt76_connac.h b/mt76_connac.h
developerd243af02023-12-21 14:49:33 +080017index fdde3d70..b1ec8d46 100644
developerf8871e82023-03-08 17:22:32 +080018--- a/mt76_connac.h
19+++ b/mt76_connac.h
developerd243af02023-12-21 14:49:33 +080020@@ -250,6 +250,11 @@ static inline bool is_connac_v1(struct mt76_dev *dev)
developerf8871e82023-03-08 17:22:32 +080021 return is_mt7615(dev) || is_mt7663(dev) || is_mt7622(dev);
22 }
23
24+static inline bool is_connac_v3(struct mt76_dev *dev)
25+{
26+ return is_mt7996(dev);
27+}
28+
29 static inline bool is_mt76_fw_txp(struct mt76_dev *dev)
30 {
31 switch (mt76_chip(dev)) {
32diff --git a/mt76_connac_mcu.c b/mt76_connac_mcu.c
developerd243af02023-12-21 14:49:33 +080033index 0d05404f..8dd61f86 100644
developerf8871e82023-03-08 17:22:32 +080034--- a/mt76_connac_mcu.c
35+++ b/mt76_connac_mcu.c
developerd243af02023-12-21 14:49:33 +080036@@ -283,6 +283,9 @@ __mt76_connac_mcu_alloc_sta_req(struct mt76_dev *dev, struct mt76_vif *mvif,
developerf8871e82023-03-08 17:22:32 +080037 };
38 struct sk_buff *skb;
39
40+ if (is_connac_v3(dev) && !wcid->sta)
41+ hdr.muar_idx = 0xe;
42+
43 mt76_connac_mcu_get_wlan_idx(dev, wcid, &hdr.wlan_idx_lo,
44 &hdr.wlan_idx_hi);
45 skb = mt76_mcu_msg_alloc(dev, NULL, len);
46--
developer36fe7092023-09-27 12:24:47 +0800472.18.0
developerf8871e82023-03-08 17:22:32 +080048