WNM: Include BSS max idle period in STATUS command output

This makes it a bit easier to test BSS max idle period management.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
Jouni Malinen 2024-05-29 21:01:28 +03:00 committed by Jouni Malinen
parent 58ac46baf7
commit 2c89b56d64
2 changed files with 16 additions and 0 deletions

View file

@ -2558,6 +2558,16 @@ static int wpa_supplicant_ctrl_iface_status(struct wpa_supplicant *wpa_s,
pos += ret;
}
#ifdef CONFIG_SME
if (wpa_s->sme.bss_max_idle_period) {
ret = os_snprintf(pos, end - pos, "bss_max_idle_period=%d\n",
wpa_s->sme.bss_max_idle_period);
if (os_snprintf_error(end - pos, ret))
return pos - buf;
pos += ret;
}
#endif /* CONFIG_SME */
#ifdef ANDROID
/*
* Allow using the STATUS command with default behavior, say for debug,

View file

@ -404,6 +404,10 @@ void wpa_supplicant_mark_disassoc(struct wpa_supplicant *wpa_s)
wpa_s->wps_scan_done = false;
wpas_reset_mlo_info(wpa_s);
#ifdef CONFIG_SME
wpa_s->sme.bss_max_idle_period = 0;
#endif /* CONFIG_SME */
}
@ -2928,6 +2932,8 @@ static void wnm_process_assoc_resp(struct wpa_supplicant *wpa_s,
wnm_bss_keep_alive, wpa_s,
NULL);
}
} else {
wpa_s->sme.bss_max_idle_period = 0;
}
#endif /* CONFIG_SME */
}