developer | 8bb192d | 2023-08-31 11:46:57 +0800 | [diff] [blame] | 1 | From 7e3abbd0da4d51082e3a228c43c502677a383dd2 Mon Sep 17 00:00:00 2001 |
developer | d8ca5d3 | 2023-08-30 19:05:17 +0800 | [diff] [blame] | 2 | From: Shayne Chen <shayne.chen@mediatek.com> |
| 3 | Date: Wed, 30 Aug 2023 18:55:03 +0800 |
developer | 8bb192d | 2023-08-31 11:46:57 +0800 | [diff] [blame] | 4 | Subject: [PATCH 15/15] wifi: mt76: connac: use peer address for station BMC |
developer | d8ca5d3 | 2023-08-30 19:05:17 +0800 | [diff] [blame] | 5 | entry |
| 6 | |
| 7 | Set peer address and aid for the BMC wtbl of station interface. For some |
| 8 | functions such as parsing MU_EDCA parameters from beacon, firmware will |
| 9 | need peer address to do the correct mapping. |
| 10 | |
| 11 | Reported-by: Howard Hsu <howard-yh.hsu@mediatek.com> |
| 12 | Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> |
| 13 | --- |
| 14 | mt76_connac_mcu.c | 9 ++++++++- |
| 15 | 1 file changed, 8 insertions(+), 1 deletion(-) |
| 16 | |
| 17 | diff --git a/mt76_connac_mcu.c b/mt76_connac_mcu.c |
| 18 | index 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 | -- |
| 38 | 2.39.2 |
| 39 | |