2020-04-21 05:21:28

by Sean Wang

[permalink] [raw]
Subject: [PATCH 3/3] mt76: mt7663: fix up BMC entry indicated to unicmd firmware

From: Sean Wang <[email protected]>

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 <[email protected]>
Suggested-by: YF Luo <[email protected]>
Co-developed-by: Ryder Lee <[email protected]>
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
---
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
index 045bde7f554d..e8caa2c7981e 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
@@ -1339,7 +1339,7 @@ mt7615_mcu_uni_add_bss(struct mt7615_phy *phy,
.short_st = true,
},
};
- u8 idx, tx_wlan_idx = 0;
+ u8 idx, tx_wlan_idx = mvif->sta.wcid.idx;
int err;

idx = mvif->omac_idx > EXT_BSSID_START ? HW_BSSID_0 : mvif->omac_idx;
@@ -1349,10 +1349,9 @@ 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) {
+ if (enable && !is_mt7663(&dev->mt76)) {
struct ieee80211_sta *sta;
struct mt7615_sta *msta;

--
2.25.1


2020-04-21 09:22:28

by Felix Fietkau

[permalink] [raw]
Subject: Re: [PATCH 3/3] mt76: mt7663: fix up BMC entry indicated to unicmd firmware

On 2020-04-21 07:20, [email protected] wrote:
> From: Sean Wang <[email protected]>
>
> 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 <[email protected]>
> Suggested-by: YF Luo <[email protected]>
> Co-developed-by: Ryder Lee <[email protected]>
> Signed-off-by: Ryder Lee <[email protected]>
> Signed-off-by: Sean Wang <[email protected]>
> ---
> drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> index 045bde7f554d..e8caa2c7981e 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> @@ -1339,7 +1339,7 @@ mt7615_mcu_uni_add_bss(struct mt7615_phy *phy,
> .short_st = true,
> },
> };
> - u8 idx, tx_wlan_idx = 0;
> + u8 idx, tx_wlan_idx = mvif->sta.wcid.idx;
> int err;
>
> idx = mvif->omac_idx > EXT_BSSID_START ? HW_BSSID_0 : mvif->omac_idx;
> @@ -1349,10 +1349,9 @@ 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) {
> + if (enable && !is_mt7663(&dev->mt76)) {
mt7615_mcu_uni_add_bss is only called on mt7663 with offload firmware,
so you can simply delete the entire if (enable) { ... } code section.

- Felix