]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP MLD: Provide link addresses for non-AP MLDs in control interface
authorChenming Huang <quic_chenhuan@quicinc.com>
Mon, 29 Jan 2024 06:34:25 +0000 (12:04 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 4 Apr 2024 15:54:42 +0000 (18:54 +0300)
Add affiliated link addresses for non-AP MLDs in the STA* control
interface commands.

Signed-off-by: Chenming Huang <quic_chenhuan@quicinc.com>
src/ap/ctrl_iface_ap.c

index 2723177740b0b51a5feef04c7ce8d549060bab2e..eac06065441347b7cd65f60088499f64f8599d3d 100644 (file)
@@ -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;
 }