From 26a897039e333dda680ee8995a04ea09ef88aae7 Mon Sep 17 00:00:00 2001 From: muhaidong Date: Tue, 9 Aug 2022 16:49:42 +0800 Subject: [PATCH 1/3] esp_wifi: done beacon monitor timer and eloop timer when deinit --- components/esp_wifi/lib | 2 +- components/wpa_supplicant/port/eloop.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index fd23b3bc66..cf381efc7e 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit fd23b3bc66102918dd0ce6492997f7cfdd6e86c0 +Subproject commit cf381efc7ebd3c607fd9ab00599bb71c95fcc305 diff --git a/components/wpa_supplicant/port/eloop.c b/components/wpa_supplicant/port/eloop.c index 92aaa02fb2..37ce1a5c4a 100644 --- a/components/wpa_supplicant/port/eloop.c +++ b/components/wpa_supplicant/port/eloop.c @@ -366,5 +366,6 @@ void eloop_destroy(void) eloop_data_lock = NULL; } os_timer_disarm(&eloop.eloop_timer); + os_timer_done(&eloop.eloop_timer); os_memset(&eloop, 0, sizeof(eloop)); } From 8696dc15f151f6488a28f5d7287500309827436f Mon Sep 17 00:00:00 2001 From: xueyunfei Date: Mon, 8 Aug 2022 14:28:07 +0800 Subject: [PATCH 2/3] esp_wifi:add clear ap list interface --- components/esp_wifi/include/esp_wifi.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/components/esp_wifi/include/esp_wifi.h b/components/esp_wifi/include/esp_wifi.h index c58ee53fe6..41879009a3 100644 --- a/components/esp_wifi/include/esp_wifi.h +++ b/components/esp_wifi/include/esp_wifi.h @@ -453,6 +453,21 @@ esp_err_t esp_wifi_scan_get_ap_num(uint16_t *number); esp_err_t esp_wifi_scan_get_ap_records(uint16_t *number, wifi_ap_record_t *ap_records); +/** + * @brief Clear AP list found in last scan + * + * @attention When the obtained ap list fails,bss info must be cleared,otherwise it may cause memory leakage. + * + * @return + * - ESP_OK: succeed + * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init + * - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start + * - ESP_ERR_WIFI_MODE: WiFi mode is wrong + * - ESP_ERR_INVALID_ARG: invalid argument + */ +esp_err_t esp_wifi_clear_ap_list(void); + + /** * @brief Get information of AP which the ESP32 station is associated with * From 6eb6bb071d127f3e15b9e1c107ae2500f8e6541c Mon Sep 17 00:00:00 2001 From: xueyunfei Date: Wed, 17 Aug 2022 15:43:34 +0800 Subject: [PATCH 3/3] esp_wifi:fix some wifi bugs 1 esp32c2: mv multiphy api out of ESP_MESH_SUPPORT macro 2 clear bss info when wifi stop 3 add clear ap list interface --- components/esp_wifi/lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index cf381efc7e..845af059ec 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit cf381efc7ebd3c607fd9ab00599bb71c95fcc305 +Subproject commit 845af059ecbb64cb175df20cd6e61d956fdf2a66