Commit cc945b54 authored by Peter Chiu's avatar Peter Chiu Committed by Felix Fietkau

wifi: mt76: mt7996: fix bss wlan_idx when sending bss_info command

The bmc_tx_wlan_idx should be the wlan_idx of the current bss rather
than peer AP's wlan_idx, otherwise there will appear some frame
decryption problems on station mode.

Fixes: 98686cd2 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Reviewed-by: default avatarShayne Chen <shayne.chen@mediatek.com>
Signed-off-by: default avatarPeter Chiu <chui-hao.chiu@mediatek.com>
Signed-off-by: default avatarShayne Chen <shayne.chen@mediatek.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent a32f063d
...@@ -712,6 +712,7 @@ mt7996_mcu_bss_basic_tlv(struct sk_buff *skb, ...@@ -712,6 +712,7 @@ mt7996_mcu_bss_basic_tlv(struct sk_buff *skb,
struct cfg80211_chan_def *chandef = &phy->chandef; struct cfg80211_chan_def *chandef = &phy->chandef;
struct mt76_connac_bss_basic_tlv *bss; struct mt76_connac_bss_basic_tlv *bss;
u32 type = CONNECTION_INFRA_AP; u32 type = CONNECTION_INFRA_AP;
u16 sta_wlan_idx = wlan_idx;
struct tlv *tlv; struct tlv *tlv;
int idx; int idx;
...@@ -731,7 +732,7 @@ mt7996_mcu_bss_basic_tlv(struct sk_buff *skb, ...@@ -731,7 +732,7 @@ mt7996_mcu_bss_basic_tlv(struct sk_buff *skb,
struct mt76_wcid *wcid; struct mt76_wcid *wcid;
wcid = (struct mt76_wcid *)sta->drv_priv; wcid = (struct mt76_wcid *)sta->drv_priv;
wlan_idx = wcid->idx; sta_wlan_idx = wcid->idx;
} }
rcu_read_unlock(); rcu_read_unlock();
} }
...@@ -751,7 +752,7 @@ mt7996_mcu_bss_basic_tlv(struct sk_buff *skb, ...@@ -751,7 +752,7 @@ mt7996_mcu_bss_basic_tlv(struct sk_buff *skb,
bss->bcn_interval = cpu_to_le16(vif->bss_conf.beacon_int); bss->bcn_interval = cpu_to_le16(vif->bss_conf.beacon_int);
bss->dtim_period = vif->bss_conf.dtim_period; bss->dtim_period = vif->bss_conf.dtim_period;
bss->bmc_tx_wlan_idx = cpu_to_le16(wlan_idx); bss->bmc_tx_wlan_idx = cpu_to_le16(wlan_idx);
bss->sta_idx = cpu_to_le16(wlan_idx); bss->sta_idx = cpu_to_le16(sta_wlan_idx);
bss->conn_type = cpu_to_le32(type); bss->conn_type = cpu_to_le32(type);
bss->omac_idx = mvif->omac_idx; bss->omac_idx = mvif->omac_idx;
bss->band_idx = mvif->band_idx; bss->band_idx = mvif->band_idx;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment