blob: 2372387a66a5833ebd267774b1dde94a7b50f398 [file] [log] [blame]
developer8eb72a32023-03-30 08:32:07 +08001From 8f28593519b8a46b666d67e98112222377272f48 Mon Sep 17 00:00:00 2001
developer483388c2023-03-08 13:52:15 +08002From: Peter Chiu <chui-hao.chiu@mediatek.com>
3Date: Thu, 2 Mar 2023 15:44:52 +0800
developer1bc2ce22023-03-25 00:47:41 +08004Subject: [PATCH 17/29] wifi: mt76: mt7996: fix icv error when enable AP and
developer483388c2023-03-08 13:52:15 +08005 STA simultaneously
6
7Fix mcu command content to prevent ICV error
developer1bc2ce22023-03-25 00:47:41 +08008The bmc_tx_wlan_idx needs to be the vif index rather
developer483388c2023-03-08 13:52:15 +08009than peer AP's index.
10
11Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
12---
developer1bc2ce22023-03-25 00:47:41 +080013 mt7996/mcu.c | 5 +++--
14 1 file changed, 3 insertions(+), 2 deletions(-)
developer483388c2023-03-08 13:52:15 +080015
16diff --git a/mt7996/mcu.c b/mt7996/mcu.c
developer8eb72a32023-03-30 08:32:07 +080017index 09800ff..07c521c 100644
developer483388c2023-03-08 13:52:15 +080018--- a/mt7996/mcu.c
19+++ b/mt7996/mcu.c
developer1bc2ce22023-03-25 00:47:41 +080020@@ -744,6 +744,7 @@ mt7996_mcu_bss_basic_tlv(struct sk_buff *skb,
developer483388c2023-03-08 13:52:15 +080021 struct cfg80211_chan_def *chandef = &phy->chandef;
22 struct mt76_connac_bss_basic_tlv *bss;
23 u32 type = CONNECTION_INFRA_AP;
24+ u16 sta_wlan_idx = wlan_idx;
25 struct tlv *tlv;
26 int idx;
27
developer1bc2ce22023-03-25 00:47:41 +080028@@ -763,7 +764,7 @@ mt7996_mcu_bss_basic_tlv(struct sk_buff *skb,
developer483388c2023-03-08 13:52:15 +080029 struct mt76_wcid *wcid;
30
31 wcid = (struct mt76_wcid *)sta->drv_priv;
32- wlan_idx = wcid->idx;
33+ sta_wlan_idx = wcid->idx;
34 }
35 rcu_read_unlock();
36 }
developer1bc2ce22023-03-25 00:47:41 +080037@@ -783,7 +784,7 @@ mt7996_mcu_bss_basic_tlv(struct sk_buff *skb,
developer483388c2023-03-08 13:52:15 +080038 bss->bcn_interval = cpu_to_le16(vif->bss_conf.beacon_int);
39 bss->dtim_period = vif->bss_conf.dtim_period;
40 bss->bmc_tx_wlan_idx = cpu_to_le16(wlan_idx);
41- bss->sta_idx = cpu_to_le16(wlan_idx);
42+ bss->sta_idx = cpu_to_le16(sta_wlan_idx);
43 bss->conn_type = cpu_to_le32(type);
44 bss->omac_idx = mvif->omac_idx;
45 bss->band_idx = mvif->band_idx;
46--
developer8eb72a32023-03-30 08:32:07 +0800472.18.0
developer483388c2023-03-08 13:52:15 +080048