]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP MLD: Show maximum number of simultaneous links info for non-AP MLDs
authorMohan Raj <quic_mrajraje@quicinc.com>
Mon, 28 Oct 2024 11:22:55 +0000 (16:52 +0530)
committerJouni Malinen <j@w1.fi>
Fri, 29 Nov 2024 09:06:47 +0000 (11:06 +0200)
Add the maximum number of simultaneous links for non-AP MLDs into the
STA control interface commands.

Signed-off-by: Mohan Raj <quic_mrajraje@quicinc.com>
src/ap/ctrl_iface_ap.c

index 8bc1fa642ba4d346a1880e0480e7071cf27ca067..2284e92b7eaacaca5ea92e7ca6a4fbdb5e0a1e3c 100644 (file)
@@ -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 */