From 9ec982cb4c4fa084702bb3bb3f58b52cc69612bb Mon Sep 17 00:00:00 2001 From: Mohan Raj Date: Mon, 28 Oct 2024 16:52:55 +0530 Subject: [PATCH] AP MLD: Show maximum number of simultaneous links info for non-AP MLDs Add the maximum number of simultaneous links for non-AP MLDs into the STA control interface commands. Signed-off-by: Mohan Raj --- src/ap/ctrl_iface_ap.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c index 8bc1fa642..2284e92b7 100644 --- a/src/ap/ctrl_iface_ap.c +++ b/src/ap/ctrl_iface_ap.c @@ -475,6 +475,10 @@ static int hostapd_ctrl_iface_sta_mib(struct hostapd_data *hapd, #ifdef CONFIG_IEEE80211BE if (sta->mld_info.mld_sta) { + u16 mld_sta_capa = sta->mld_info.common_info.mld_capa; + u8 max_simul_links = mld_sta_capa & + EHT_ML_MLD_CAPA_MAX_NUM_SIM_LINKS_MASK; + for (i = 0; i < MAX_NUM_MLD_LINKS; ++i) { if (!sta->mld_info.links[i].valid) continue; @@ -485,6 +489,11 @@ static int hostapd_ctrl_iface_sta_mib(struct hostapd_data *hapd, if (!os_snprintf_error(buflen - len, ret)) len += ret; } + + ret = os_snprintf(buf + len, buflen - len, + "max_simul_links=%d\n", max_simul_links); + if (!os_snprintf_error(buflen - len, ret)) + len += ret; } #endif /* CONFIG_IEEE80211BE */ -- 2.47.2