From 9f8efed1eb3dd91e9c5c8f4fee5c31c263999e0f Mon Sep 17 00:00:00 2001 From: Xia Xiaotian Date: Fri, 22 Nov 2019 14:01:06 +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/esp32/include/esp_coexist_internal.h | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/components/esp32/cpu_start.c b/components/esp32/cpu_start.c index 87b964943..1055760b1 100644 --- a/components/esp32/cpu_start.c +++ b/components/esp32/cpu_start.c @@ -395,6 +395,7 @@ void start_cpu0_default(void) #if CONFIG_SW_COEXIST_ENABLE esp_coex_adapter_register(&g_coex_adapter_funcs); + coex_pre_init(); #endif bootloader_flash_update_id(); diff --git a/components/esp32/include/esp_coexist_internal.h b/components/esp32/include/esp_coexist_internal.h index 63f35666d..bdd023a93 100644 --- a/components/esp32/include/esp_coexist_internal.h +++ b/components/esp32/include/esp_coexist_internal.h @@ -31,6 +31,14 @@ 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.