From 939d5a0f6a7a8b76c76accc3d18461cb19eb4dfe Mon Sep 17 00:00:00 2001 From: Jack Date: Sat, 7 Dec 2019 19:02:09 +0800 Subject: [PATCH] esp_wifi: fix WiFi scan and connect bugs when coexist with Bluetooth 1. Fix WiFi scan leads to poor performance of Bluetooth. 2. Improve WiFi connect success ratio when coexist with Bluetooth. 3. Check if WiFi is still connected when CSA or beacon timeout happen. 4. add coex pre init --- components/esp32/cpu_start.c | 1 + components/esp_wifi/include/esp_coexist_internal.h | 9 +++++++++ components/esp_wifi/lib_esp32 | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/components/esp32/cpu_start.c b/components/esp32/cpu_start.c index 1f7fb0eb18..5f14fca331 100644 --- a/components/esp32/cpu_start.c +++ b/components/esp32/cpu_start.c @@ -423,6 +423,7 @@ void start_cpu0_default(void) #if CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE esp_coex_adapter_register(&g_coex_adapter_funcs); + coex_pre_init(); #endif bootloader_flash_update_id(); diff --git a/components/esp_wifi/include/esp_coexist_internal.h b/components/esp_wifi/include/esp_coexist_internal.h index 63f35666d3..41da49e334 100644 --- a/components/esp_wifi/include/esp_coexist_internal.h +++ b/components/esp_wifi/include/esp_coexist_internal.h @@ -31,6 +31,15 @@ typedef enum { typedef void (* coex_func_cb_t)(uint32_t event, int sched_cnt); +/** + * @brief Pre-Init software coexist + * extern function for internal use. + * + * @return Init ok or failed. + */ +esp_err_t coex_pre_init(void); + + /** * @brief Init software coexist * extern function for internal use. diff --git a/components/esp_wifi/lib_esp32 b/components/esp_wifi/lib_esp32 index dff38c7da0..59850619a8 160000 --- a/components/esp_wifi/lib_esp32 +++ b/components/esp_wifi/lib_esp32 @@ -1 +1 @@ -Subproject commit dff38c7da07177f5b331d5ab99116ce35e41cc7a +Subproject commit 59850619a807168777a3a3f932e78e74f5a790d0