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