blob: daba900314e50c917ec4d9d611346894692acb63 [file] [log] [blame]
developer05f3b2b2024-08-19 19:17:34 +08001From 377b708eb38c5a7056eaca0cd54994a226f940b1 Mon Sep 17 00:00:00 2001
2From: Bo Jiao <Bo.Jiao@mediatek.com>
3Date: Wed, 10 Jul 2024 14:49:43 +0800
4Subject: [PATCH 115/126] mtk: hostapd: fix Multiple MLDs to use the conf's
5 own_addr/mld_addr.
6
7Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com>
8---
9 src/ap/hostapd.c | 7 +++++++
10 1 file changed, 7 insertions(+)
11
12diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
13index 73378053b..a89628fe7 100644
14--- a/src/ap/hostapd.c
15+++ b/src/ap/hostapd.c
16@@ -1506,6 +1506,9 @@ int hostapd_setup_bss(struct hostapd_data *hapd, int first, bool start_beacon)
17 hapd->mld_link_id, hapd->conf->iface);
18 goto setup_mld;
19 }
20+
21+ if (addr && !is_zero_ether_addr(hapd->conf->mld_addr))
22+ os_memcpy(addr, hapd->conf->mld_addr, ETH_ALEN);
23 }
24 #endif /* CONFIG_IEEE80211BE */
25
26@@ -1531,6 +1534,10 @@ int hostapd_setup_bss(struct hostapd_data *hapd, int first, bool start_beacon)
27 hapd->mld_link_id, hapd->conf->iface);
28 os_memcpy(hapd->mld->mld_addr, hapd->own_addr,
29 ETH_ALEN);
30+
31+ if (!is_zero_ether_addr(conf->bssid))
32+ os_memcpy(hapd->own_addr, conf->bssid, ETH_ALEN);
33+
34 hostapd_mld_add_link(hapd);
35 }
36 #endif /* CONFIG_IEEE80211BE */
37--
382.18.0
39