* [PATCH v2] mt76: mt7663: fix up BMC entry indicated to unicmd firmware
@ 2020-04-22 18:39 sean.wang
2020-04-22 19:52 ` Lorenzo Bianconi
0 siblings, 1 reply; 2+ messages in thread
From: sean.wang @ 2020-04-22 18:39 UTC (permalink / raw)
To: nbd, lorenzo.bianconi
Cc: sean.wang, ryder.lee, linux-wireless, linux-mediatek, Soul Huang,
Lorenzo Bianconi
From: Sean Wang <sean.wang@mediatek.com>
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>
--
v1->v2:
mt7615_mcu_uni_add_bss is only called on mt7663 with the offload firmware,
so remove the entire unnecessary if code section.
---
.../net/wireless/mediatek/mt76/mt7615/mcu.c | 18 +-----------------
1 file changed, 1 insertion(+), 17 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
index 24b78d10d7f7..994446b1baba 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
@@ -1359,7 +1359,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;
@@ -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:
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] mt76: mt7663: fix up BMC entry indicated to unicmd firmware
2020-04-22 18:39 [PATCH v2] mt76: mt7663: fix up BMC entry indicated to unicmd firmware sean.wang
@ 2020-04-22 19:52 ` Lorenzo Bianconi
0 siblings, 0 replies; 2+ messages in thread
From: Lorenzo Bianconi @ 2020-04-22 19:52 UTC (permalink / raw)
To: sean.wang
Cc: nbd, lorenzo.bianconi, ryder.lee, linux-wireless, linux-mediatek,
Soul Huang
[-- Attachment #1: Type: text/plain, Size: 2335 bytes --]
> From: Sean Wang <sean.wang@mediatek.com>
>
> 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>
> --
> v1->v2:
> mt7615_mcu_uni_add_bss is only called on mt7663 with the offload firmware,
> so remove the entire unnecessary if code section.
> ---
> .../net/wireless/mediatek/mt76/mt7615/mcu.c | 18 +-----------------
> 1 file changed, 1 insertion(+), 17 deletions(-)
>
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> index 24b78d10d7f7..994446b1baba 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> @@ -1359,7 +1359,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;
nitpick: I guess we do not need tx_wlan_idx anymore.
Regards,
Lorenzo
> int err;
>
> idx = mvif->omac_idx > EXT_BSSID_START ? HW_BSSID_0 : mvif->omac_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:
> --
> 2.25.1
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-22 19:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-22 18:39 [PATCH v2] mt76: mt7663: fix up BMC entry indicated to unicmd firmware sean.wang
2020-04-22 19:52 ` Lorenzo Bianconi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).