From 71e6c10f7c89fa8c8c54c9767119bd8f57d53787 Mon Sep 17 00:00:00 2001 From: jgujarathi Date: Wed, 16 Aug 2023 12:58:01 +0530 Subject: [PATCH] fix(wpa_supplicant): Update supplicant last scan time when application scanning - Any scanning currently updates the bss table held by supplicant anyway, but the time record used to maintain the recency of the last scan is only updated by supplicant issued scans. Updating the last scan time for application trigerred scanning will prevent the needless scanning by supplicant if there has been an application trigerred scan in the time diff threshold(currently 10s). --- components/wpa_supplicant/esp_supplicant/src/esp_scan.c | 1 + 1 file changed, 1 insertion(+) diff --git a/components/wpa_supplicant/esp_supplicant/src/esp_scan.c b/components/wpa_supplicant/esp_supplicant/src/esp_scan.c index dc5128bf1b..92b9c900ad 100644 --- a/components/wpa_supplicant/esp_supplicant/src/esp_scan.c +++ b/components/wpa_supplicant/esp_supplicant/src/esp_scan.c @@ -162,6 +162,7 @@ int esp_handle_beacon_probe(u8 type, u8 *frame, size_t len, u8 *sender, /* update rest of the frame */ os_memcpy(ptr, frame, len); wpa_bss_update_scan_res(wpa_s, res, &now); + os_get_reltime(&wpa_s->last_scan); os_free(res); return 0;