AP MLD: Add link details in STATUS command
Include link ID and partner link details in the STATUS command output for AP MLDs. The details would be seen as below for an AP MLD interface: $ hostapd_cli -i wlan0 status | grep link num_links=1 link_id=0 link_addr=AA:BB:CC:DD:EE:FF $ hostapd_cli -i wlan1 status | grep link num_links=2 link_id=0 link_addr=AA:BB:CC:DD:EE:FF partner_link[1]=AA:BB:CC:DD:EE:AA Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com> Co-developed-by: Manish Dharanenthiran <quic_mdharane@quicinc.com> Signed-off-by: Manish Dharanenthiran <quic_mdharane@quicinc.com> Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
This commit is contained in:
parent
b1e463374e
commit
8d434bf65c
1 changed files with 36 additions and 0 deletions
|
@ -902,6 +902,42 @@ int hostapd_ctrl_iface_status(struct hostapd_data *hapd, char *buf,
|
|||
return len;
|
||||
len += ret;
|
||||
}
|
||||
|
||||
if (hapd->conf->mld_ap) {
|
||||
struct hostapd_data *link_bss;
|
||||
|
||||
ret = os_snprintf(buf + len, buflen - len,
|
||||
"num_links=%d\n",
|
||||
hapd->mld->num_links);
|
||||
if (os_snprintf_error(buflen - len, ret))
|
||||
return len;
|
||||
len += ret;
|
||||
|
||||
/* Self BSS */
|
||||
ret = os_snprintf(buf + len, buflen - len,
|
||||
"link_id=%d\n"
|
||||
"link_addr=" MACSTR "\n",
|
||||
hapd->mld_link_id,
|
||||
MAC2STR(hapd->own_addr));
|
||||
if (os_snprintf_error(buflen - len, ret))
|
||||
return len;
|
||||
len += ret;
|
||||
|
||||
/* Partner BSSs */
|
||||
for_each_mld_link(link_bss, hapd) {
|
||||
if (link_bss == hapd)
|
||||
continue;
|
||||
|
||||
ret = os_snprintf(buf + len, buflen - len,
|
||||
"partner_link[%d]=" MACSTR
|
||||
"\n",
|
||||
link_bss->mld_link_id,
|
||||
MAC2STR(link_bss->own_addr));
|
||||
if (os_snprintf_error(buflen - len, ret))
|
||||
return len;
|
||||
len += ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_IEEE80211BE */
|
||||
|
||||
|
|
Loading…
Reference in a new issue