From 37c00c3c5df1ed70aecbb30be7ef8b15423f6df5 Mon Sep 17 00:00:00 2001 From: Chenming Huang Date: Mon, 29 Jan 2024 12:04:25 +0530 Subject: [PATCH] AP MLD: Provide link addresses for non-AP MLDs in control interface Add affiliated link addresses for non-AP MLDs in the STA* control interface commands. Signed-off-by: Chenming Huang --- src/ap/ctrl_iface_ap.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c index 272317774..eac060654 100644 --- a/src/ap/ctrl_iface_ap.c +++ b/src/ap/ctrl_iface_ap.c @@ -465,6 +465,21 @@ static int hostapd_ctrl_iface_sta_mib(struct hostapd_data *hapd, len += ret; } +#ifdef CONFIG_IEEE80211BE + if (sta->mld_info.mld_sta) { + for (i = 0; i < MAX_NUM_MLD_LINKS; ++i) { + if (!sta->mld_info.links[i].valid) + continue; + ret = os_snprintf( + buf + len, buflen - len, + "peer_addr[%d]=" MACSTR "\n", + i, MAC2STR(sta->mld_info.links[i].peer_addr)); + if (!os_snprintf_error(buflen - len, ret)) + len += ret; + } + } +#endif /* CONFIG_IEEE80211BE */ + return len; }