diff --git a/components/esp_phy/lib b/components/esp_phy/lib index c0491ee7cc..d8ee8f776a 160000 --- a/components/esp_phy/lib +++ b/components/esp_phy/lib @@ -1 +1 @@ -Subproject commit c0491ee7cc60288244268b04b523637a6e297739 +Subproject commit d8ee8f776acd1aafdfc3046f526db024b175b094 diff --git a/components/esp_wifi/esp32c2/esp_adapter.c b/components/esp_wifi/esp32c2/esp_adapter.c index bd31d94f60..ee3dc062ee 100644 --- a/components/esp_wifi/esp32c2/esp_adapter.c +++ b/components/esp_wifi/esp32c2/esp_adapter.c @@ -642,6 +642,15 @@ static int coex_schm_curr_phase_idx_get_wrapper(void) #endif } +static int coex_register_start_cb_wrapper(int (* cb)(void)) +{ +#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE + return coex_register_start_cb(cb); +#else + return 0; +#endif +} + static void IRAM_ATTR esp_empty_wrapper(void) { @@ -763,6 +772,7 @@ wifi_osi_funcs_t g_wifi_osi_funcs = { ._coex_schm_curr_phase_get = coex_schm_curr_phase_get_wrapper, ._coex_schm_curr_phase_idx_set = coex_schm_curr_phase_idx_set_wrapper, ._coex_schm_curr_phase_idx_get = coex_schm_curr_phase_idx_get_wrapper, + ._coex_register_start_cb = coex_register_start_cb_wrapper, ._magic = ESP_WIFI_OS_ADAPTER_MAGIC, }; diff --git a/components/esp_wifi/include/esp_coexist_internal.h b/components/esp_wifi/include/esp_coexist_internal.h index 7ba06d4c69..1e0e5d0a27 100644 --- a/components/esp_wifi/include/esp_coexist_internal.h +++ b/components/esp_wifi/include/esp_coexist_internal.h @@ -195,6 +195,12 @@ int coex_schm_curr_phase_idx_set(int idx); */ int coex_schm_curr_phase_idx_get(void); +/** + * @brief TODO + * + */ +int coex_register_start_cb(int (* cb)(void)); + /** * @brief Register coexistence adapter functions. * diff --git a/components/esp_wifi/include/esp_private/wifi_os_adapter.h b/components/esp_wifi/include/esp_private/wifi_os_adapter.h index d05cb7b66a..adf95ea7b5 100644 --- a/components/esp_wifi/include/esp_private/wifi_os_adapter.h +++ b/components/esp_wifi/include/esp_private/wifi_os_adapter.h @@ -22,6 +22,8 @@ extern "C" { #define OSI_QUEUE_SEND_BACK 1 #define OSI_QUEUE_SEND_OVERWRITE 2 +typedef int(* coex_start_wifi_cb_t)(void); + typedef struct { int32_t _version; bool (* _env_is_chip)(void); @@ -144,6 +146,7 @@ typedef struct { void * (* _coex_schm_curr_phase_get)(void); int (* _coex_schm_curr_phase_idx_set)(int idx); int (* _coex_schm_curr_phase_idx_get)(void); + int (* _coex_register_start_cb)(coex_start_wifi_cb_t cb); int32_t _magic; } wifi_osi_funcs_t; diff --git a/components/esp_wifi/include/esp_wifi.h b/components/esp_wifi/include/esp_wifi.h index 89bf70fcb7..5692c066fe 100644 --- a/components/esp_wifi/include/esp_wifi.h +++ b/components/esp_wifi/include/esp_wifi.h @@ -1218,7 +1218,7 @@ esp_err_t esp_wifi_config_11b_rate(wifi_interface_t ifx, bool disable); * * @param interval how much micriosecond would the chip wake up, from 1 to 65535. */ -esp_err_t esp_wifi_set_connectionless_wake_interval(uint16_t interval); +esp_err_t esp_wifi_connectionless_module_set_wake_interval(uint16_t interval); /** * @brief configure country diff --git a/components/esp_wifi/include/esp_wifi_types.h b/components/esp_wifi/include/esp_wifi_types.h index edd9068a7f..8c3c0f5aca 100644 --- a/components/esp_wifi/include/esp_wifi_types.h +++ b/components/esp_wifi/include/esp_wifi_types.h @@ -607,6 +607,8 @@ typedef enum { WIFI_EVENT_STA_BEACON_TIMEOUT, /**< ESP32 station beacon timeout */ + WIFI_EVENT_CONNECTIONLESS_MODULE_WAKE_INTERVAL_START, /**< ESP32 connectionless module wake interval start */ + WIFI_EVENT_MAX, /**< Invalid WiFi event ID */ } wifi_event_t; diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 59e16e7cd3..aea6411b4c 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 59e16e7cd3a7d5b3b9daa2b4f54f617f51b34014 +Subproject commit aea6411b4cd90bc00524db58855bd6478a0e2475