diff options
author | Sean Wang <sean.wang@mediatek.com> | 2020-04-23 15:47:54 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-05-12 19:52:33 +0200 |
commit | 5ac2e2a3485a13ac922249cd03b9dcecff59af5f (patch) | |
tree | 1284ec524d8d1f3bdd2430f4a19d569b1a73c344 /drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | |
parent | dd89a0133c0ce80bb8c2f873a85b28f2d33640bd (diff) |
mt76: mt7663: fix up BMC entry indicated to unicmd firmware
BMC entry for MT7663 unicmd firmware should be a broadcast/multicast entry,
not a unicast entry, that is GTK rekey offload would rely on.
Fixes: 138860679b2a ("mt76: mt7615: add more uni mcu commands")
Cc: Soul Huang <Soul.Huang@mediatek.com>
Suggested-by: YF Luo <Yf.Luo@mediatek.com>
Co-developed-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7615/mcu.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c index 1d1b2a7b4325..b1dea61fb9ee 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c @@ -1359,8 +1359,8 @@ mt7615_mcu_uni_add_bss(struct mt7615_phy *phy, .short_st = true, }, }; - u8 idx, tx_wlan_idx = 0; int err; + u8 idx; idx = mvif->omac_idx > EXT_BSSID_START ? HW_BSSID_0 : mvif->omac_idx; basic_req.basic.hw_bss_idx = idx; @@ -1369,24 +1369,8 @@ mt7615_mcu_uni_add_bss(struct mt7615_phy *phy, case NL80211_IFTYPE_MESH_POINT: case NL80211_IFTYPE_AP: basic_req.basic.conn_type = cpu_to_le32(CONNECTION_INFRA_AP); - tx_wlan_idx = mvif->sta.wcid.idx; break; case NL80211_IFTYPE_STATION: - if (enable) { - struct ieee80211_sta *sta; - struct mt7615_sta *msta; - - rcu_read_lock(); - sta = ieee80211_find_sta(vif, vif->bss_conf.bssid); - if (!sta) { - rcu_read_unlock(); - return -EINVAL; - } - - msta = (struct mt7615_sta *)sta->drv_priv; - tx_wlan_idx = msta->wcid.idx; - rcu_read_unlock(); - } basic_req.basic.conn_type = cpu_to_le32(CONNECTION_INFRA_STA); break; default: @@ -1395,8 +1379,8 @@ mt7615_mcu_uni_add_bss(struct mt7615_phy *phy, } memcpy(basic_req.basic.bssid, vif->bss_conf.bssid, ETH_ALEN); - basic_req.basic.bmc_tx_wlan_idx = cpu_to_le16(tx_wlan_idx); - basic_req.basic.sta_idx = cpu_to_le16(tx_wlan_idx); + basic_req.basic.bmc_tx_wlan_idx = cpu_to_le16(mvif->sta.wcid.idx); + basic_req.basic.sta_idx = cpu_to_le16(mvif->sta.wcid.idx); basic_req.basic.conn_state = !enable; err = __mt76_mcu_send_msg(&dev->mt76, MCU_UNI_CMD_BSS_INFO_UPDATE, |