]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WNM: Include BSS max idle period in STATUS command output
authorJouni Malinen <quic_jouni@quicinc.com>
Wed, 29 May 2024 18:01:28 +0000 (21:01 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 29 May 2024 20:40:22 +0000 (23:40 +0300)
This makes it a bit easier to test BSS max idle period management.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
wpa_supplicant/ctrl_iface.c
wpa_supplicant/events.c

index bc013ad995c1327eec68b63b14d1dd9279d7d766..74d61132e8a4dc433a9c657ad478730e51944729 100644 (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,
index 8dc618e5c05dfbc6e23048b75513a29565811d73..447fc8fd805fa70acf593b915a9a7f90f59924ff 100644 (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 */
 }