diff --git a/components/esp_coex/include/private/esp_coexist_internal.h b/components/esp_coex/include/private/esp_coexist_internal.h index 5eac40b708..6e3799487f 100644 --- a/components/esp_coex/include/private/esp_coexist_internal.h +++ b/components/esp_coex/include/private/esp_coexist_internal.h @@ -396,6 +396,15 @@ int coex_schm_flexible_period_set(uint8_t period); uint8_t coex_schm_flexible_period_get(void); #endif +/** + * @brief Get coexistence scheme phase by phase index. + * + * @param phase_idx Coexistence phase index + * + * @return Coexistence scheme phase + */ +void * coex_schm_get_phase_by_idx(int phase_idx); + /** * @brief Check the MD5 values of the coexistence adapter header files in IDF and WiFi library * diff --git a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld index 0079a7af02..a2855e2cf5 100644 --- a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld +++ b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld @@ -529,7 +529,7 @@ pm_enable_active_timer = 0x40001b84; pm_enable_sleep_delay_timer = 0x40001b88; pm_local_tsf_process = 0x40001b8c; pm_set_beacon_filter = 0x40001b90; -pm_is_in_wifi_slice_threshold = 0x40001b94; +/*pm_is_in_wifi_slice_threshold = 0x40001b94;*/ pm_is_waked = 0x40001b98; /*pm_keep_alive = 0x40001b9c;*/ /* pm_on_beacon_rx = 0x40001ba0; */ diff --git a/components/esp_rom/esp32c3/ld/esp32c3.rom.ld b/components/esp_rom/esp32c3/ld/esp32c3.rom.ld index ccfacca75b..5b1804c435 100644 --- a/components/esp_rom/esp32c3/ld/esp32c3.rom.ld +++ b/components/esp_rom/esp32c3/ld/esp32c3.rom.ld @@ -718,7 +718,7 @@ pm_enable_active_timer = 0x40001660; pm_enable_sleep_delay_timer = 0x40001664; pm_local_tsf_process = 0x40001668; pm_set_beacon_filter = 0x4000166c; -pm_is_in_wifi_slice_threshold = 0x40001670; +/*pm_is_in_wifi_slice_threshold = 0x40001670;*/ pm_is_waked = 0x40001674; /*pm_keep_alive = 0x40001678;*/ /* pm_on_beacon_rx = 0x4000167c; */ diff --git a/components/esp_rom/esp32c5/ld/esp32c5.rom.pp.ld b/components/esp_rom/esp32c5/ld/esp32c5.rom.pp.ld index 9030c954eb..cba31c7178 100644 --- a/components/esp_rom/esp32c5/ld/esp32c5.rom.pp.ld +++ b/components/esp_rom/esp32c5/ld/esp32c5.rom.pp.ld @@ -116,7 +116,7 @@ pm_mac_sleep = 0x40000d5c; pm_enable_sleep_delay_timer = 0x40000d64; pm_local_tsf_process = 0x40000d68; pm_set_beacon_filter = 0x40000d6c; -pm_is_in_wifi_slice_threshold = 0x40000d70; +/*pm_is_in_wifi_slice_threshold = 0x40000d70;*/ pm_is_waked = 0x40000d74; /*pm_keep_alive = 0x40000d78;*/ /*pm_on_beacon_rx = 0x40000d7c;*/ @@ -151,7 +151,7 @@ pm_is_twt_start = 0x40000dec; pm_twt_set_target_wdev_time = 0x40000df0; pm_twt_set_target_tsf = 0x40000df4; pm_enable_twt_keep_alive_timer = 0x40000df8; -pm_mac_try_enable_modem_state = 0x40000dfc; +/*pm_mac_try_enable_modem_state = 0x40000dfc;*/ pm_beacon_monitor_tbtt_timeout_process = 0x40000e00; /*pm_update_next_tbtt = 0x40000e04;*/ pm_twt_disallow_tx = 0x40000e08; diff --git a/components/esp_rom/esp32c6/ld/esp32c6.rom.pp.ld b/components/esp_rom/esp32c6/ld/esp32c6.rom.pp.ld index 43090c9bf3..7ff2770e50 100644 --- a/components/esp_rom/esp32c6/ld/esp32c6.rom.pp.ld +++ b/components/esp_rom/esp32c6/ld/esp32c6.rom.pp.ld @@ -66,7 +66,7 @@ pm_mac_sleep = 0x40000c84; pm_enable_sleep_delay_timer = 0x40000c8c; pm_local_tsf_process = 0x40000c90; //pm_set_beacon_filter = 0x40000c94; -pm_is_in_wifi_slice_threshold = 0x40000c98; +/*pm_is_in_wifi_slice_threshold = 0x40000c98;*/ pm_is_waked = 0x40000c9c; //pm_keep_alive = 0x40000ca0; /* pm_on_beacon_rx = 0x40000ca4; */ diff --git a/components/esp_rom/esp32c61/ld/esp32c61.rom.pp.ld b/components/esp_rom/esp32c61/ld/esp32c61.rom.pp.ld index d23d8cb19f..31ab72872b 100644 --- a/components/esp_rom/esp32c61/ld/esp32c61.rom.pp.ld +++ b/components/esp_rom/esp32c61/ld/esp32c61.rom.pp.ld @@ -120,10 +120,10 @@ pm_mac_sleep = 0x40000cc8; pm_enable_sleep_delay_timer = 0x40000cd0; pm_local_tsf_process = 0x40000cd4; pm_set_beacon_filter = 0x40000cd8; -pm_is_in_wifi_slice_threshold = 0x40000cdc; +/*pm_is_in_wifi_slice_threshold = 0x40000cdc;*/ pm_is_waked = 0x40000ce0; //pm_keep_alive = 0x40000ce4; -pm_on_beacon_rx = 0x40000ce8; +/*pm_on_beacon_rx = 0x40000ce8;*/ pm_on_data_rx = 0x40000cec; pm_on_data_tx = 0x40000cf0; pm_on_tbtt = 0x40000cf4; @@ -155,7 +155,7 @@ pm_is_twt_start = 0x40000d58; pm_twt_set_target_wdev_time = 0x40000d5c; pm_twt_set_target_tsf = 0x40000d60; pm_enable_twt_keep_alive_timer = 0x40000d64; -pm_mac_try_enable_modem_state = 0x40000d68; +/*pm_mac_try_enable_modem_state = 0x40000d68;*/ pm_beacon_monitor_tbtt_timeout_process = 0x40000d6c; pm_update_next_tbtt = 0x40000d70; pm_twt_disallow_tx = 0x40000d74; diff --git a/components/esp_rom/esp32s3/ld/esp32s3.rom.ld b/components/esp_rom/esp32s3/ld/esp32s3.rom.ld index eb786cfaff..c3799fb4cf 100644 --- a/components/esp_rom/esp32s3/ld/esp32s3.rom.ld +++ b/components/esp_rom/esp32s3/ld/esp32s3.rom.ld @@ -972,7 +972,7 @@ pm_enable_active_timer = 0x40005460; pm_enable_sleep_delay_timer = 0x4000546c; pm_local_tsf_process = 0x40005478; pm_set_beacon_filter = 0x40005484; -pm_is_in_wifi_slice_threshold = 0x40005490; +/*pm_is_in_wifi_slice_threshold = 0x40005490;*/ pm_is_waked = 0x4000549c; /*pm_keep_alive = 0x400054a8;*/ /* pm_on_beacon_rx = 0x400054b4; */ diff --git a/components/esp_wifi/esp32/esp_adapter.c b/components/esp_wifi/esp32/esp_adapter.c index 3d69706012..50be0e7eb9 100644 --- a/components/esp_wifi/esp32/esp_adapter.c +++ b/components/esp_wifi/esp32/esp_adapter.c @@ -594,6 +594,15 @@ static uint8_t coex_schm_flexible_period_get_wrapper(void) #endif } +static void * coex_schm_get_phase_by_idx_wrapper(int phase_idx) +{ +#if CONFIG_SW_COEXIST_ENABLE + return coex_schm_get_phase_by_idx(phase_idx); +#else + return NULL; +#endif +} + static void IRAM_ATTR esp_empty_wrapper(void) { @@ -730,5 +739,6 @@ wifi_osi_funcs_t g_wifi_osi_funcs = { ._coex_schm_register_cb = coex_schm_register_cb_wrapper, ._coex_schm_flexible_period_set = coex_schm_flexible_period_set_wrapper, ._coex_schm_flexible_period_get = coex_schm_flexible_period_get_wrapper, + ._coex_schm_get_phase_by_idx = coex_schm_get_phase_by_idx_wrapper, ._magic = ESP_WIFI_OS_ADAPTER_MAGIC, }; diff --git a/components/esp_wifi/esp32c2/esp_adapter.c b/components/esp_wifi/esp32c2/esp_adapter.c index 0ab7a81796..00cbf66040 100644 --- a/components/esp_wifi/esp32c2/esp_adapter.c +++ b/components/esp_wifi/esp32c2/esp_adapter.c @@ -535,6 +535,15 @@ static uint8_t coex_schm_flexible_period_get_wrapper(void) #endif } +static void * coex_schm_get_phase_by_idx_wrapper(int phase_idx) +{ +#if CONFIG_SW_COEXIST_ENABLE + return coex_schm_get_phase_by_idx(phase_idx); +#else + return NULL; +#endif +} + static void IRAM_ATTR esp_empty_wrapper(void) { @@ -670,5 +679,6 @@ wifi_osi_funcs_t g_wifi_osi_funcs = { ._coex_schm_register_cb = coex_schm_register_cb_wrapper, ._coex_schm_flexible_period_set = coex_schm_flexible_period_set_wrapper, ._coex_schm_flexible_period_get = coex_schm_flexible_period_get_wrapper, + ._coex_schm_get_phase_by_idx = coex_schm_get_phase_by_idx_wrapper, ._magic = ESP_WIFI_OS_ADAPTER_MAGIC, }; diff --git a/components/esp_wifi/esp32c3/esp_adapter.c b/components/esp_wifi/esp32c3/esp_adapter.c index 7c72f19c9f..4fc7a1158d 100644 --- a/components/esp_wifi/esp32c3/esp_adapter.c +++ b/components/esp_wifi/esp32c3/esp_adapter.c @@ -552,6 +552,15 @@ static uint8_t coex_schm_flexible_period_get_wrapper(void) #endif } +static void * coex_schm_get_phase_by_idx_wrapper(int phase_idx) +{ +#if CONFIG_SW_COEXIST_ENABLE + return coex_schm_get_phase_by_idx(phase_idx); +#else + return NULL; +#endif +} + static void IRAM_ATTR esp_empty_wrapper(void) { @@ -687,5 +696,6 @@ wifi_osi_funcs_t g_wifi_osi_funcs = { ._coex_schm_register_cb = coex_schm_register_cb_wrapper, ._coex_schm_flexible_period_set = coex_schm_flexible_period_set_wrapper, ._coex_schm_flexible_period_get = coex_schm_flexible_period_get_wrapper, + ._coex_schm_get_phase_by_idx = coex_schm_get_phase_by_idx_wrapper, ._magic = ESP_WIFI_OS_ADAPTER_MAGIC, }; diff --git a/components/esp_wifi/esp32c5/esp_adapter.c b/components/esp_wifi/esp32c5/esp_adapter.c index ad999cbb2f..c3264c6e1e 100644 --- a/components/esp_wifi/esp32c5/esp_adapter.c +++ b/components/esp_wifi/esp32c5/esp_adapter.c @@ -610,6 +610,15 @@ static uint8_t coex_schm_flexible_period_get_wrapper(void) #endif } +static void * coex_schm_get_phase_by_idx_wrapper(int phase_idx) +{ +#if CONFIG_SW_COEXIST_ENABLE + return coex_schm_get_phase_by_idx(phase_idx); +#else + return NULL; +#endif +} + static void IRAM_ATTR esp_empty_wrapper(void) { @@ -754,5 +763,6 @@ wifi_osi_funcs_t g_wifi_osi_funcs = { ._coex_schm_register_cb = coex_schm_register_cb_wrapper, ._coex_schm_flexible_period_set = coex_schm_flexible_period_set_wrapper, ._coex_schm_flexible_period_get = coex_schm_flexible_period_get_wrapper, + ._coex_schm_get_phase_by_idx = coex_schm_get_phase_by_idx_wrapper, ._magic = ESP_WIFI_OS_ADAPTER_MAGIC, }; diff --git a/components/esp_wifi/esp32c6/esp_adapter.c b/components/esp_wifi/esp32c6/esp_adapter.c index 1cefee5e36..de9f0c7aa3 100644 --- a/components/esp_wifi/esp32c6/esp_adapter.c +++ b/components/esp_wifi/esp32c6/esp_adapter.c @@ -541,6 +541,15 @@ static uint8_t coex_schm_flexible_period_get_wrapper(void) #endif } +static void * coex_schm_get_phase_by_idx_wrapper(int phase_idx) +{ +#if CONFIG_SW_COEXIST_ENABLE + return coex_schm_get_phase_by_idx(phase_idx); +#else + return NULL; +#endif +} + static void IRAM_ATTR esp_empty_wrapper(void) { @@ -692,5 +701,6 @@ wifi_osi_funcs_t g_wifi_osi_funcs = { ._coex_schm_register_cb = coex_schm_register_cb_wrapper, ._coex_schm_flexible_period_set = coex_schm_flexible_period_set_wrapper, ._coex_schm_flexible_period_get = coex_schm_flexible_period_get_wrapper, + ._coex_schm_get_phase_by_idx = coex_schm_get_phase_by_idx_wrapper, ._magic = ESP_WIFI_OS_ADAPTER_MAGIC, }; diff --git a/components/esp_wifi/esp32c61/esp_adapter.c b/components/esp_wifi/esp32c61/esp_adapter.c index 72f6429ef5..14e94d78a0 100644 --- a/components/esp_wifi/esp32c61/esp_adapter.c +++ b/components/esp_wifi/esp32c61/esp_adapter.c @@ -610,6 +610,15 @@ static uint8_t coex_schm_flexible_period_get_wrapper(void) #endif } +static void * coex_schm_get_phase_by_idx_wrapper(int phase_idx) +{ +#if CONFIG_SW_COEXIST_ENABLE + return coex_schm_get_phase_by_idx(phase_idx); +#else + return NULL; +#endif +} + static void IRAM_ATTR esp_empty_wrapper(void) { @@ -754,5 +763,6 @@ wifi_osi_funcs_t g_wifi_osi_funcs = { ._coex_schm_register_cb = coex_schm_register_cb_wrapper, ._coex_schm_flexible_period_set = coex_schm_flexible_period_set_wrapper, ._coex_schm_flexible_period_get = coex_schm_flexible_period_get_wrapper, + ._coex_schm_get_phase_by_idx = coex_schm_get_phase_by_idx_wrapper, ._magic = ESP_WIFI_OS_ADAPTER_MAGIC, }; diff --git a/components/esp_wifi/esp32p4/esp_adapter.c b/components/esp_wifi/esp32p4/esp_adapter.c index 4def952a2c..8843258dfc 100644 --- a/components/esp_wifi/esp32p4/esp_adapter.c +++ b/components/esp_wifi/esp32p4/esp_adapter.c @@ -554,6 +554,11 @@ static uint8_t coex_schm_flexible_period_get_wrapper(void) return 1; } +static void * coex_schm_get_phase_by_idx_wrapper(int phase_idx) +{ + return NULL; +} + static void IRAM_ATTR esp_empty_wrapper(void) { @@ -810,5 +815,6 @@ wifi_osi_funcs_t g_wifi_osi_funcs = { ._coex_schm_register_cb = coex_schm_register_cb_wrapper, ._coex_schm_flexible_period_set = coex_schm_flexible_period_set_wrapper, ._coex_schm_flexible_period_get = coex_schm_flexible_period_get_wrapper, + ._coex_schm_get_phase_by_idx = coex_schm_get_phase_by_idx_wrapper, ._magic = ESP_WIFI_OS_ADAPTER_MAGIC, }; diff --git a/components/esp_wifi/esp32s2/esp_adapter.c b/components/esp_wifi/esp32s2/esp_adapter.c index 725a553dba..9ff54c3ef0 100644 --- a/components/esp_wifi/esp32s2/esp_adapter.c +++ b/components/esp_wifi/esp32s2/esp_adapter.c @@ -589,6 +589,15 @@ static uint8_t coex_schm_flexible_period_get_wrapper(void) #endif } +static void * coex_schm_get_phase_by_idx_wrapper(int phase_idx) +{ +#if CONFIG_SW_COEXIST_ENABLE + return coex_schm_get_phase_by_idx(phase_idx); +#else + return NULL; +#endif +} + static void IRAM_ATTR esp_empty_wrapper(void) { @@ -724,5 +733,6 @@ wifi_osi_funcs_t g_wifi_osi_funcs = { ._coex_schm_register_cb = coex_schm_register_cb_wrapper, ._coex_schm_flexible_period_set = coex_schm_flexible_period_set_wrapper, ._coex_schm_flexible_period_get = coex_schm_flexible_period_get_wrapper, + ._coex_schm_get_phase_by_idx = coex_schm_get_phase_by_idx_wrapper, ._magic = ESP_WIFI_OS_ADAPTER_MAGIC, }; diff --git a/components/esp_wifi/esp32s3/esp_adapter.c b/components/esp_wifi/esp32s3/esp_adapter.c index 1e00fbbedb..40db5be231 100644 --- a/components/esp_wifi/esp32s3/esp_adapter.c +++ b/components/esp_wifi/esp32s3/esp_adapter.c @@ -606,6 +606,15 @@ static uint8_t coex_schm_flexible_period_get_wrapper(void) #endif } +static void * coex_schm_get_phase_by_idx_wrapper(int phase_idx) +{ +#if CONFIG_SW_COEXIST_ENABLE + return coex_schm_get_phase_by_idx(phase_idx); +#else + return NULL; +#endif +} + static void IRAM_ATTR esp_empty_wrapper(void) { @@ -741,5 +750,6 @@ wifi_osi_funcs_t g_wifi_osi_funcs = { ._coex_schm_register_cb = coex_schm_register_cb_wrapper, ._coex_schm_flexible_period_set = coex_schm_flexible_period_set_wrapper, ._coex_schm_flexible_period_get = coex_schm_flexible_period_get_wrapper, + ._coex_schm_get_phase_by_idx = coex_schm_get_phase_by_idx_wrapper, ._magic = ESP_WIFI_OS_ADAPTER_MAGIC, }; 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 1e45e91736..ad06dce03f 100644 --- a/components/esp_wifi/include/esp_private/wifi_os_adapter.h +++ b/components/esp_wifi/include/esp_private/wifi_os_adapter.h @@ -155,6 +155,7 @@ typedef struct wifi_osi_funcs_t { #endif int (*_coex_schm_flexible_period_set)(uint8_t); uint8_t (*_coex_schm_flexible_period_get)(void); + void * (*_coex_schm_get_phase_by_idx)(int); int32_t _magic; } wifi_osi_funcs_t; diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index d152ee7b81..58ebdbff17 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit d152ee7b81ac7073c5dce0d2a44bfbe4aa9dd2ae +Subproject commit 58ebdbff170aaf10e2c8d7dc6759c91378fd93de