blob: caa9b1a54d5d7684d31bb46959493161ae6bdeaf [file] [log] [blame]
developerde9ecce2023-05-22 11:17:16 +08001From ee3a2aa33145d17d3be17af85583437f079e91fb 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
developerde9ecce2023-05-22 11:17:16 +08004Subject: [PATCH 10/22] 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
developerde9ecce2023-05-22 11:17:16 +080017index 73d5dedf..6d11bc1a 100644
developer483388c2023-03-08 13:52:15 +080018--- a/mt7996/mcu.c
19+++ b/mt7996/mcu.c
developerde9ecce2023-05-22 11:17:16 +080020@@ -743,6 +743,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
developerde9ecce2023-05-22 11:17:16 +080028@@ -762,7 +763,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 }
developerde9ecce2023-05-22 11:17:16 +080037@@ -782,7 +783,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--
developerde9ecce2023-05-22 11:17:16 +0800472.39.2
developer483388c2023-03-08 13:52:15 +080048