developer | de9ecce | 2023-05-22 11:17:16 +0800 | [diff] [blame] | 1 | From ee3a2aa33145d17d3be17af85583437f079e91fb Mon Sep 17 00:00:00 2001 |
developer | 483388c | 2023-03-08 13:52:15 +0800 | [diff] [blame] | 2 | From: Peter Chiu <chui-hao.chiu@mediatek.com> |
| 3 | Date: Thu, 2 Mar 2023 15:44:52 +0800 |
developer | de9ecce | 2023-05-22 11:17:16 +0800 | [diff] [blame] | 4 | Subject: [PATCH 10/22] wifi: mt76: mt7996: fix icv error when enable AP and |
developer | 483388c | 2023-03-08 13:52:15 +0800 | [diff] [blame] | 5 | STA simultaneously |
| 6 | |
| 7 | Fix mcu command content to prevent ICV error |
developer | 1bc2ce2 | 2023-03-25 00:47:41 +0800 | [diff] [blame] | 8 | The bmc_tx_wlan_idx needs to be the vif index rather |
developer | 483388c | 2023-03-08 13:52:15 +0800 | [diff] [blame] | 9 | than peer AP's index. |
| 10 | |
| 11 | Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com> |
| 12 | --- |
developer | 1bc2ce2 | 2023-03-25 00:47:41 +0800 | [diff] [blame] | 13 | mt7996/mcu.c | 5 +++-- |
| 14 | 1 file changed, 3 insertions(+), 2 deletions(-) |
developer | 483388c | 2023-03-08 13:52:15 +0800 | [diff] [blame] | 15 | |
| 16 | diff --git a/mt7996/mcu.c b/mt7996/mcu.c |
developer | de9ecce | 2023-05-22 11:17:16 +0800 | [diff] [blame] | 17 | index 73d5dedf..6d11bc1a 100644 |
developer | 483388c | 2023-03-08 13:52:15 +0800 | [diff] [blame] | 18 | --- a/mt7996/mcu.c |
| 19 | +++ b/mt7996/mcu.c |
developer | de9ecce | 2023-05-22 11:17:16 +0800 | [diff] [blame] | 20 | @@ -743,6 +743,7 @@ mt7996_mcu_bss_basic_tlv(struct sk_buff *skb, |
developer | 483388c | 2023-03-08 13:52:15 +0800 | [diff] [blame] | 21 | 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 | |
developer | de9ecce | 2023-05-22 11:17:16 +0800 | [diff] [blame] | 28 | @@ -762,7 +763,7 @@ mt7996_mcu_bss_basic_tlv(struct sk_buff *skb, |
developer | 483388c | 2023-03-08 13:52:15 +0800 | [diff] [blame] | 29 | 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 | } |
developer | de9ecce | 2023-05-22 11:17:16 +0800 | [diff] [blame] | 37 | @@ -782,7 +783,7 @@ mt7996_mcu_bss_basic_tlv(struct sk_buff *skb, |
developer | 483388c | 2023-03-08 13:52:15 +0800 | [diff] [blame] | 38 | 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 | -- |
developer | de9ecce | 2023-05-22 11:17:16 +0800 | [diff] [blame] | 47 | 2.39.2 |
developer | 483388c | 2023-03-08 13:52:15 +0800 | [diff] [blame] | 48 | |