From: Chenming Huang Date: Mon, 29 Jan 2024 06:34:25 +0000 (+0530) Subject: AP MLD: Provide link addresses for non-AP MLDs in control interface X-Git-Tag: hostap_2_11~222 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37c00c3c5df1ed70aecbb30be7ef8b15423f6df5;p=thirdparty%2Fhostap.git 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 --- 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; }