MLD STA: Add MLO_STATUS control interface command
Add support for MLO_STATUS control interface command to indicate per-link information. Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
This commit is contained in:
parent
8dd5b9a9ed
commit
28b2256da2
2 changed files with 43 additions and 0 deletions
|
@ -11540,6 +11540,37 @@ static int wpas_ctrl_iface_send_dscp_query(struct wpa_supplicant *wpa_s,
|
|||
}
|
||||
|
||||
|
||||
static int wpas_ctrl_iface_mlo_status(struct wpa_supplicant *wpa_s,
|
||||
char *buf, size_t buflen)
|
||||
{
|
||||
int ret, i;
|
||||
char *pos, *end;
|
||||
|
||||
if (!wpa_s->valid_links)
|
||||
return -1;
|
||||
|
||||
pos = buf;
|
||||
end = buf + buflen;
|
||||
|
||||
for (i = 0; i < MAX_NUM_MLD_LINKS; i++) {
|
||||
if (!(wpa_s->valid_links & BIT(i)))
|
||||
continue;
|
||||
|
||||
ret = os_snprintf(pos, end - pos, "link_id=%d\nfreq=%u\n"
|
||||
"ap_link_addr=" MACSTR
|
||||
"\nsta_link_addr=" MACSTR "\n",
|
||||
i, wpa_s->links[i].freq,
|
||||
MAC2STR(wpa_s->links[i].bssid),
|
||||
MAC2STR(wpa_s->links[i].addr));
|
||||
if (os_snprintf_error(end - pos, ret))
|
||||
return pos - buf;
|
||||
pos += ret;
|
||||
}
|
||||
|
||||
return pos - buf;
|
||||
}
|
||||
|
||||
|
||||
char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
|
||||
char *buf, size_t *resp_len)
|
||||
{
|
||||
|
@ -12554,6 +12585,9 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
|
|||
} else if (os_strncmp(buf, "DSCP_QUERY ", 11) == 0) {
|
||||
if (wpas_ctrl_iface_send_dscp_query(wpa_s, buf + 11))
|
||||
reply_len = -1;
|
||||
} else if (os_strcmp(buf, "MLO_STATUS") == 0) {
|
||||
reply_len = wpas_ctrl_iface_mlo_status(wpa_s, reply,
|
||||
reply_size);
|
||||
} else {
|
||||
os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
|
||||
reply_len = 16;
|
||||
|
|
|
@ -413,6 +413,12 @@ static int wpa_cli_cmd_quit(struct wpa_ctrl *ctrl, int argc, char *argv[])
|
|||
}
|
||||
|
||||
|
||||
static int wpa_cli_cmd_mlo_status(struct wpa_ctrl *ctrl, int argc, char *argv[])
|
||||
{
|
||||
return wpa_ctrl_command(ctrl, "MLO_STATUS");
|
||||
}
|
||||
|
||||
|
||||
static int wpa_cli_cmd_set(struct wpa_ctrl *ctrl, int argc, char *argv[])
|
||||
{
|
||||
char cmd[256];
|
||||
|
@ -4037,6 +4043,9 @@ static const struct wpa_cli_cmd wpa_cli_commands[] = {
|
|||
{ "dscp_query", wpa_cli_cmd_dscp_query, NULL,
|
||||
cli_cmd_flag_none,
|
||||
"wildcard/domain_name=<string> = Send DSCP Query" },
|
||||
{ "mlo_status", wpa_cli_cmd_mlo_status, NULL,
|
||||
cli_cmd_flag_none,
|
||||
"= get MLO status" },
|
||||
{ NULL, NULL, NULL, cli_cmd_flag_none, NULL }
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue