diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index bc013ad99..74d61132e 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -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, diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index 8dc618e5c..447fc8fd8 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -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 */ }