Skip to content

Commit

Permalink
Merge branch 'feature/optimize_coex_connectionless_pwr' into 'master'
Browse files Browse the repository at this point in the history
feat(coex): optimize connectionless coexist pwr, optimize wifi pwr with BLE IDLE

Closes WIFI-6693 and WIFI-6645

See merge request espressif/esp-idf!33437
  • Loading branch information
jack0c committed Sep 15, 2024
2 parents 3c99557 + 8380991 commit 5a5c004
Show file tree
Hide file tree
Showing 18 changed files with 31 additions and 19 deletions.
14 changes: 13 additions & 1 deletion components/esp_coex/include/private/esp_coexist_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ typedef enum {
COEX_SCHM_CALLBACK_TYPE_I154,
} coex_schm_callback_type_t;

typedef enum {
COEX_SCHM_ST_TYPE_WIFI = 0,
COEX_SCHM_ST_TYPE_BLE,
COEX_SCHM_ST_TYPE_BT,
} coex_schm_st_type_t;

#define COEX_STATUS_GET_WIFI_BITMAP (1 << COEX_SCHM_ST_TYPE_WIFI)
#define COEX_STATUS_GET_BLE_BITMAP (1 << COEX_SCHM_ST_TYPE_BLE)
#define COEX_STATUS_GET_BT_BITMAP (1 << COEX_SCHM_ST_TYPE_BT)

typedef void (* coex_func_cb_t)(uint32_t event, int sched_cnt);
typedef esp_err_t (* coex_set_lpclk_source_callback_t)(void);
typedef void (* coex_wifi_channel_change_cb_t)(uint8_t primary, uint8_t secondary);
Expand Down Expand Up @@ -94,9 +104,11 @@ esp_err_t coex_preference_set(coex_prefer_t prefer);

/**
* @brief Get software coexist status.
*
* @param bitmap : bitmap of the module getting status.
* @return : software coexist status
*/
uint32_t coex_status_get(void);
uint32_t coex_status_get(uint8_t bitmap);

/**
* @brief WiFi requests coexistence.
Expand Down
4 changes: 2 additions & 2 deletions components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld
Original file line number Diff line number Diff line change
Expand Up @@ -1174,8 +1174,8 @@ hal_set_sta_tbtt = 0x40001e4c;
pm_set_sleep_type = 0x40001e54;
pm_tx_null_data_done_process = 0x40001eb0;
//pm_tx_data_process = 0x40001eb4;
pm_attach = 0x40001eb8;
pm_coex_schm_process = 0x40001ebc;
/*pm_attach = 0x40001eb8;*/
/*pm_coex_schm_process = 0x40001ebc;*/
pm_on_probe_resp_rx = 0x40001ecc;
pm_send_probe_stop = 0x40001edc;
hal_sniffer_rx_set_promis = 0x40001ef4;
Expand Down
2 changes: 1 addition & 1 deletion components/esp_rom/esp32c2/ld/esp32c2.rom.ld
Original file line number Diff line number Diff line change
Expand Up @@ -1903,7 +1903,7 @@ coex_hw_timer_set = 0x4000219c;
coex_schm_interval_set = 0x400021a0;
coex_schm_lock = 0x400021a4;
coex_schm_unlock = 0x400021a8;
coex_status_get = 0x400021ac;
/*coex_status_get = 0x400021ac;*/
coex_wifi_release = 0x400021b0;
esp_coex_ble_conn_dynamic_prio_get = 0x400021b4;
/*coex_hw_timer_tick_get = 0x400021b8;*/
Expand Down
2 changes: 1 addition & 1 deletion components/esp_rom/esp32c3/ld/esp32c3.rom.ld
Original file line number Diff line number Diff line change
Expand Up @@ -1772,7 +1772,7 @@ coex_hw_timer_set = 0x400018e0;
coex_schm_interval_set = 0x400018e4;
coex_schm_lock = 0x400018e8;
coex_schm_unlock = 0x400018ec;
coex_status_get = 0x400018f0;
/*coex_status_get = 0x400018f0;*/
coex_wifi_release = 0x400018f4;
esp_coex_ble_conn_dynamic_prio_get = 0x400018f8;
/* Data (.data, .bss, .rodata) */
Expand Down
2 changes: 1 addition & 1 deletion components/esp_rom/esp32c5/ld/esp32c5.rom.coexist.ld
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ coex_hw_timer_set = 0x40000afc;
coex_schm_interval_set = 0x40000b00;
coex_schm_lock = 0x40000b04;
coex_schm_unlock = 0x40000b08;
coex_status_get = 0x40000b0c;
/*coex_status_get = 0x40000b0c;*/
coex_wifi_release = 0x40000b10;
esp_coex_ble_conn_dynamic_prio_get = 0x40000b14;
/* Data (.data, .bss, .rodata) */
Expand Down
2 changes: 1 addition & 1 deletion components/esp_rom/esp32c6/ld/esp32c6.rom.coexist.ld
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ coex_hw_timer_set = 0x40000b30;
coex_schm_interval_set = 0x40000b34;
coex_schm_lock = 0x40000b38;
coex_schm_unlock = 0x40000b3c;
coex_status_get = 0x40000b40;
/*coex_status_get = 0x40000b40;*/
coex_wifi_release = 0x40000b44;
esp_coex_ble_conn_dynamic_prio_get = 0x40000b48;
/* Data (.data, .bss, .rodata) */
Expand Down
2 changes: 1 addition & 1 deletion components/esp_rom/esp32c61/ld/esp32c61.rom.coexist.ld
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ coex_hw_timer_set = 0x40000a64;
coex_schm_interval_set = 0x40000a68;
coex_schm_lock = 0x40000a6c;
coex_schm_unlock = 0x40000a70;
coex_status_get = 0x40000a74;
/*coex_status_get = 0x40000a74;*/
coex_wifi_release = 0x40000a78;
esp_coex_ble_conn_dynamic_prio_get = 0x40000a7c;
/* Data (.data, .bss, .rodata) */
Expand Down
2 changes: 1 addition & 1 deletion components/esp_rom/esp32s3/ld/esp32s3.rom.ld
Original file line number Diff line number Diff line change
Expand Up @@ -2058,7 +2058,7 @@ coex_hw_timer_set = 0x40005c04;
coex_schm_interval_set = 0x40005c10;
coex_schm_lock = 0x40005c1c;
coex_schm_unlock = 0x40005c28;
coex_status_get = 0x40005c34;
/*coex_status_get = 0x40005c34;*/
coex_wifi_release = 0x40005c40;
esp_coex_ble_conn_dynamic_prio_get = 0x40005c4c;
/* Data (.data, .bss, .rodata) */
Expand Down
2 changes: 1 addition & 1 deletion components/esp_wifi/esp32/esp_adapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ static void coex_disable_wrapper(void)
static IRAM_ATTR uint32_t coex_status_get_wrapper(void)
{
#if CONFIG_SW_COEXIST_ENABLE
return coex_status_get();
return coex_status_get(COEX_STATUS_GET_WIFI_BITMAP);
#else
return 0;
#endif
Expand Down
2 changes: 1 addition & 1 deletion components/esp_wifi/esp32c2/esp_adapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ static void coex_disable_wrapper(void)
static IRAM_ATTR uint32_t coex_status_get_wrapper(void)
{
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
return coex_status_get();
return coex_status_get(COEX_STATUS_GET_WIFI_BITMAP);
#else
return 0;
#endif
Expand Down
2 changes: 1 addition & 1 deletion components/esp_wifi/esp32c3/esp_adapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ static void coex_disable_wrapper(void)
static IRAM_ATTR uint32_t coex_status_get_wrapper(void)
{
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
return coex_status_get();
return coex_status_get(COEX_STATUS_GET_WIFI_BITMAP);
#else
return 0;
#endif
Expand Down
2 changes: 1 addition & 1 deletion components/esp_wifi/esp32c5/esp_adapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ static void coex_disable_wrapper(void)
static IRAM_ATTR uint32_t coex_status_get_wrapper(void)
{
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
return coex_status_get();
return coex_status_get(COEX_STATUS_GET_WIFI_BITMAP);
#else
return 0;
#endif
Expand Down
2 changes: 1 addition & 1 deletion components/esp_wifi/esp32c6/esp_adapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ static void coex_disable_wrapper(void)
static IRAM_ATTR uint32_t coex_status_get_wrapper(void)
{
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
return coex_status_get();
return coex_status_get(COEX_STATUS_GET_WIFI_BITMAP);
#else
return 0;
#endif
Expand Down
2 changes: 1 addition & 1 deletion components/esp_wifi/esp32c61/esp_adapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ static void coex_disable_wrapper(void)
static IRAM_ATTR uint32_t coex_status_get_wrapper(void)
{
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
return coex_status_get();
return coex_status_get(COEX_STATUS_GET_WIFI_BITMAP);
#else
return 0;
#endif
Expand Down
2 changes: 1 addition & 1 deletion components/esp_wifi/esp32s2/esp_adapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ static void coex_disable_wrapper(void)
static IRAM_ATTR uint32_t coex_status_get_wrapper(void)
{
#if CONFIG_EXTERNAL_COEX_ENABLE
return coex_status_get();
return coex_status_get(COEX_STATUS_GET_WIFI_BITMAP);
#else
return 0;
#endif
Expand Down
2 changes: 1 addition & 1 deletion components/esp_wifi/esp32s3/esp_adapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ static void coex_disable_wrapper(void)
static IRAM_ATTR uint32_t coex_status_get_wrapper(void)
{
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
return coex_status_get();
return coex_status_get(COEX_STATUS_GET_WIFI_BITMAP);
#else
return 0;
#endif
Expand Down
2 changes: 1 addition & 1 deletion components/esp_wifi/lib
Submodule lib updated 62 files
+ esp32/libcore.a
+ esp32/libespnow.a
+ esp32/libmesh.a
+ esp32/libnet80211.a
+ esp32/libpp.a
+ esp32/libsmartconfig.a
+ esp32/libwapi.a
+ esp32_host/libcore.a
+ esp32_host/libespnow.a
+ esp32_host/libmesh.a
+ esp32_host/libnet80211.a
+ esp32_host/libpp.a
+ esp32_host/libsmartconfig.a
+ esp32_host/libtarget.a
+ esp32_host/libwapi.a
+ esp32c2/libcore.a
+ esp32c2/libespnow.a
+ esp32c2/libnet80211.a
+ esp32c2/libpp.a
+ esp32c2/libsmartconfig.a
+ esp32c3/libcore.a
+ esp32c3/libespnow.a
+ esp32c3/libmesh.a
+ esp32c3/libnet80211.a
+ esp32c3/libpp.a
+ esp32c3/libsmartconfig.a
+ esp32c3/libwapi.a
+ esp32c5/libcore.a
+ esp32c5/libespnow.a
+ esp32c5/libmesh.a
+ esp32c5/libnet80211.a
+ esp32c5/libpp.a
+ esp32c5/libsmartconfig.a
+ esp32c5/libwapi.a
+ esp32c6/libcore.a
+ esp32c6/libespnow.a
+ esp32c6/libmesh.a
+ esp32c6/libnet80211.a
+ esp32c6/libpp.a
+ esp32c6/libsmartconfig.a
+ esp32c6/libwapi.a
+ esp32c61/libcore.a
+ esp32c61/libespnow.a
+ esp32c61/libmesh.a
+ esp32c61/libnet80211.a
+ esp32c61/libpp.a
+ esp32c61/libsmartconfig.a
+ esp32c61/libwapi.a
+ esp32s2/libcore.a
+ esp32s2/libespnow.a
+ esp32s2/libmesh.a
+ esp32s2/libnet80211.a
+ esp32s2/libpp.a
+ esp32s2/libsmartconfig.a
+ esp32s2/libwapi.a
+ esp32s3/libcore.a
+ esp32s3/libespnow.a
+ esp32s3/libmesh.a
+ esp32s3/libnet80211.a
+ esp32s3/libpp.a
+ esp32s3/libsmartconfig.a
+ esp32s3/libwapi.a

0 comments on commit 5a5c004

Please sign in to comment.