blob: 61f444a00ab1be1ea5cb554a96ed5e849687ed7e [file] [log] [blame]
developer8bb192d2023-08-31 11:46:57 +08001From 7e3abbd0da4d51082e3a228c43c502677a383dd2 Mon Sep 17 00:00:00 2001
developerd8ca5d32023-08-30 19:05:17 +08002From: Shayne Chen <shayne.chen@mediatek.com>
3Date: Wed, 30 Aug 2023 18:55:03 +0800
developer8bb192d2023-08-31 11:46:57 +08004Subject: [PATCH 15/15] wifi: mt76: connac: use peer address for station BMC
developerd8ca5d32023-08-30 19:05:17 +08005 entry
6
7Set peer address and aid for the BMC wtbl of station interface. For some
8functions such as parsing MU_EDCA parameters from beacon, firmware will
9need peer address to do the correct mapping.
10
11Reported-by: Howard Hsu <howard-yh.hsu@mediatek.com>
12Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
13---
14 mt76_connac_mcu.c | 9 ++++++++-
15 1 file changed, 8 insertions(+), 1 deletion(-)
16
17diff --git a/mt76_connac_mcu.c b/mt76_connac_mcu.c
18index cd6ce3c0..3ed4a2a6 100644
19--- a/mt76_connac_mcu.c
20+++ b/mt76_connac_mcu.c
21@@ -387,7 +387,14 @@ void mt76_connac_mcu_sta_basic_tlv(struct mt76_dev *dev, struct sk_buff *skb,
22
23 if (!sta) {
24 basic->conn_type = cpu_to_le32(CONNECTION_INFRA_BC);
25- eth_broadcast_addr(basic->peer_addr);
26+
27+ if (vif->type == NL80211_IFTYPE_STATION &&
28+ !is_zero_ether_addr(vif->bss_conf.bssid)) {
29+ memcpy(basic->peer_addr, vif->bss_conf.bssid, ETH_ALEN);
30+ basic->aid = cpu_to_le16(vif->cfg.aid);
31+ } else {
32+ eth_broadcast_addr(basic->peer_addr);
33+ }
34 return;
35 }
36
37--
382.39.2
39