blob: 61f444a00ab1be1ea5cb554a96ed5e849687ed7e [file] [log] [blame]
From 7e3abbd0da4d51082e3a228c43c502677a383dd2 Mon Sep 17 00:00:00 2001
From: Shayne Chen <shayne.chen@mediatek.com>
Date: Wed, 30 Aug 2023 18:55:03 +0800
Subject: [PATCH 15/15] wifi: mt76: connac: use peer address for station BMC
entry
Set peer address and aid for the BMC wtbl of station interface. For some
functions such as parsing MU_EDCA parameters from beacon, firmware will
need peer address to do the correct mapping.
Reported-by: Howard Hsu <howard-yh.hsu@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
---
mt76_connac_mcu.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/mt76_connac_mcu.c b/mt76_connac_mcu.c
index cd6ce3c0..3ed4a2a6 100644
--- a/mt76_connac_mcu.c
+++ b/mt76_connac_mcu.c
@@ -387,7 +387,14 @@ void mt76_connac_mcu_sta_basic_tlv(struct mt76_dev *dev, struct sk_buff *skb,
if (!sta) {
basic->conn_type = cpu_to_le32(CONNECTION_INFRA_BC);
- eth_broadcast_addr(basic->peer_addr);
+
+ if (vif->type == NL80211_IFTYPE_STATION &&
+ !is_zero_ether_addr(vif->bss_conf.bssid)) {
+ memcpy(basic->peer_addr, vif->bss_conf.bssid, ETH_ALEN);
+ basic->aid = cpu_to_le16(vif->cfg.aid);
+ } else {
+ eth_broadcast_addr(basic->peer_addr);
+ }
return;
}
--
2.39.2