Merge branch 'fix/backport_wifi_fixes_v5.3' into 'release/v5.3'

Fix(wifi):backport wifi fixes v5.3

See merge request espressif/esp-idf!30994
This commit is contained in:
Jiang Jiang Jian 2024-05-22 07:37:14 +08:00
commit 1a7c782905
24 changed files with 263 additions and 39 deletions

View File

@ -32,5 +32,12 @@ menu "Wireless Coexistence"
This function depends on BT-off
because currently we do not support external coex and internal coex simultaneously.
config ESP_COEX_POWER_MANAGEMENT
bool "Support power management under coexistence"
default n
depends on (ESP_COEX_SW_COEXIST_ENABLE)
help
If enabled, coexist power management will be enabled.
endif
endmenu # Wireless Coexistence

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2018-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2018-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -313,7 +313,7 @@ esp_err_t esp_coex_adapter_register(coex_adapter_funcs_t *funcs);
#if CONFIG_EXTERNAL_COEX_ENABLE
/**
* @brief Set external coexistence advanced informations, like working mode.
* @brief Set external coexistence advanced information, like working mode.
*
* @param out_pti1 This parameter no longer works, will be deprecated and later removed in future releases.
* @param out_pti2 This parameter no longer works, will be deprecated and later removed in future releases.
@ -365,6 +365,25 @@ void esp_coex_external_set_txline(bool en);
#endif /*SOC_EXTERNAL_COEX_LEADER_TX_LINE*/
#endif /*External Coex*/
#if CONFIG_ESP_COEX_POWER_MANAGEMENT
/**
* @brief Set coexist scheme flexible period
*
* @param period flexible period
*
* @return
* - ESP_OK: succeed
*/
int coex_schm_flexible_period_set(uint8_t period);
/**
* @brief Get coexist scheme flexible period
*
* @return Coexist scheme flexible period
*/
uint8_t coex_schm_flexible_period_get(void);
#endif
/**
* @brief Check the MD5 values of the coexistence adapter header files in IDF and WiFi library
*

@ -1 +1 @@
Subproject commit 87eecbdf1392d5b4304c4c8e7a26056fa5df294f
Subproject commit 2363239ddeda69523a4ed79e55815be21115200f

View File

@ -1430,7 +1430,7 @@ mac_tx_set_plcp2 = 0x40001b68;
/* pm_check_state = 0x40001b6c; */
pm_disable_dream_timer = 0x40001b70;
pm_disable_sleep_delay_timer = 0x40001b74;
pm_dream = 0x40001b78;
/*pm_dream = 0x40001b78;*/
pm_mac_wakeup = 0x40001b7c;
pm_mac_sleep = 0x40001b80;
pm_enable_active_timer = 0x40001b84;
@ -1611,7 +1611,7 @@ hal_disable_sta_tbtt = 0x40001e3c;
ppCalTxopDur = 0x40001e40;
wDev_IndicateCtrlFrame = 0x40001e44;
hal_enable_sta_tbtt = 0x40001e48;
hal_set_sta_tbtt = 0x40001e4c;
/*hal_set_sta_tbtt = 0x40001e4c;*/
/* pm_update_next_tbtt = 0x40001e50;*/
/* pm_set_sleep_type = 0x40001e54; */
wDev_Rxbuf_Init = 0x40001e58;
@ -1670,7 +1670,7 @@ tsf_hal_set_tbtt_intr_enable = 0x40001f28;
tsf_hal_set_tbtt_intr_disable = 0x40001f2c;
tsf_hal_set_tbtt_soc_wakeup_enable = 0x40001f30;
tsf_hal_set_tbtt_soc_wakeup_disable = 0x40001f34;
tsf_hal_set_tbtt_start_time = 0x40001f38;
/*tsf_hal_set_tbtt_start_time = 0x40001f38;*/
tsf_hal_set_tbtt_early_time = 0x40001f3c;
tsf_hal_set_tbtt_interval = 0x40001f40;
tsf_hal_get_tbtt_interval = 0x40001f44;
@ -1853,7 +1853,7 @@ ieee80211_send_deauth_no_bss = 0x40002120;
ieee80211_alloc_deauth = 0x40002124;
ieee80211_send_proberesp = 0x40002128;
ieee80211_getcapinfo = 0x40002130;
sta_rx_csa = 0x40002134;
/* sta_rx_csa = 0x40002134; */
/* sta_recv_sa_query_resp = 0x40002144; */
ieee80211_set_max_rate = 0x4000214c;
ic_set_sta = 0x40002150;

View File

@ -15,7 +15,7 @@ lmacTxFrame = 0x40001630;
mac_tx_set_htsig = 0x40001638;
mac_tx_set_plcp1 = 0x40001640;
pm_check_state = 0x40001648;
pm_on_beacon_rx = 0x4000167c;
/*pm_on_beacon_rx = 0x4000167c;*/
/*pm_parse_beacon = 0x40001688;*/
pm_process_tim = 0x4000168c;
pm_rx_beacon_process = 0x40001690;
@ -33,7 +33,7 @@ wDevCheckBlockError = 0x400017b4;
wDev_ProcessFiq = 0x400017f0;
/*wDev_ProcessRxSucData = 0x400017f4;*/
/*ppProcTxDone = 0x40001804;*/
pm_tx_data_done_process = 0x40001808;
/*pm_tx_data_done_process = 0x40001808;*/
ppMapWaitTxq = 0x40001810;
/*ieee80211_encap_esfbuf = 0x4000185c;*/
/*sta_input = 0x40001870;*/

View File

@ -1538,7 +1538,7 @@ mac_tx_set_plcp2 = 0x40001644;
/* pm_check_state = 0x40001648; */
pm_disable_dream_timer = 0x4000164c;
pm_disable_sleep_delay_timer = 0x40001650;
pm_dream = 0x40001654;
/*pm_dream = 0x40001654;*/
pm_mac_wakeup = 0x40001658;
pm_mac_sleep = 0x4000165c;
pm_enable_active_timer = 0x40001660;

View File

@ -109,7 +109,7 @@ mac_tx_set_pti = 0x40000d44;
pm_check_state = 0x40000d48;
pm_disable_dream_timer = 0x40000d4c;
pm_disable_sleep_delay_timer = 0x40000d50;
pm_dream = 0x40000d54;
/*pm_dream = 0x40000d54;*/
pm_mac_wakeup = 0x40000d58;
pm_mac_sleep = 0x40000d5c;
pm_enable_active_timer = 0x40000d60;
@ -119,7 +119,7 @@ pm_set_beacon_filter = 0x40000d6c;
pm_is_in_wifi_slice_threshold = 0x40000d70;
pm_is_waked = 0x40000d74;
pm_keep_alive = 0x40000d78;
pm_on_beacon_rx = 0x40000d7c;
/*pm_on_beacon_rx = 0x40000d7c;*/
pm_on_data_rx = 0x40000d80;
pm_on_data_tx = 0x40000d84;
pm_on_tbtt = 0x40000d88;
@ -133,13 +133,13 @@ pm_parse_beacon = 0x40000da4;
pm_process_tim = 0x40000da8;
pm_rx_beacon_process = 0x40000dac;
pm_rx_data_process = 0x40000db0;
pm_sleep = 0x40000db4;
/*pm_sleep = 0x40000db4;*/
pm_sleep_for = 0x40000db8;
pm_tbtt_process = 0x40000dbc;
pm_tx_data_done_process = 0x40000dc0;
/*pm_tbtt_process = 0x40000dbc;*/
/*pm_tx_data_done_process = 0x40000dc0;*/
pm_allow_tx = 0x40000dc4;
pm_extend_tbtt_adaptive_servo = 0x40000dc8;
pm_scale_listen_interval = 0x40000dcc;
/*pm_scale_listen_interval = 0x40000dcc;*/
pm_parse_mbssid_element = 0x40000dd0;
pm_disconnected_wake = 0x40000dd4;
pm_tx_data_process = 0x40000dd8;
@ -153,7 +153,7 @@ pm_twt_set_target_tsf = 0x40000df4;
pm_enable_twt_keep_alive_timer = 0x40000df8;
pm_mac_try_enable_modem_state = 0x40000dfc;
pm_beacon_monitor_tbtt_timeout_process = 0x40000e00;
pm_update_next_tbtt = 0x40000e04;
/*pm_update_next_tbtt = 0x40000e04;*/
pm_twt_disallow_tx = 0x40000e08;
pm_clear_wakeup_signal = 0x40000e0c;
pm_mac_disable_tsf_tbtt_soc_wakeup = 0x40000e10;

View File

@ -59,7 +59,7 @@ mac_tx_set_plcp2 = 0x40000c6c;
/* pm_check_state = 0x40000c70; */
/* pm_disable_dream_timer = 0x40000c74; */
pm_disable_sleep_delay_timer = 0x40000c78;
pm_dream = 0x40000c7c;
/*pm_dream = 0x40000c7c;*/
pm_mac_wakeup = 0x40000c80;
pm_mac_sleep = 0x40000c84;
//pm_enable_active_timer = 0x40000c88;
@ -274,7 +274,7 @@ tsf_hal_set_tbtt_rf_ctrl_enable = 0x40000fc8;
tsf_hal_set_tbtt_rf_ctrl_wait_cycles = 0x40000fcc;
tsf_hal_set_tbtt_soc_wakeup_disable = 0x40000fd0;
tsf_hal_set_tbtt_soc_wakeup_enable = 0x40000fd4;
tsf_hal_set_tbtt_start_time = 0x40000fd8;
/*tsf_hal_set_tbtt_start_time = 0x40000fd8;*/
tsf_hal_set_time = 0x40000fdc;
tsf_hal_set_timer_disable = 0x40000fe0;
tsf_hal_set_timer_enable = 0x40000fe4;

View File

@ -1816,7 +1816,7 @@ mac_tx_set_plcp2 = 0x4000540c;
/* pm_check_state = 0x40005418; */
pm_disable_dream_timer = 0x40005424;
pm_disable_sleep_delay_timer = 0x40005430;
pm_dream = 0x4000543c;
/*pm_dream = 0x4000543c;*/
pm_mac_wakeup = 0x40005448;
pm_mac_sleep = 0x40005454;
pm_enable_active_timer = 0x40005460;

View File

@ -348,17 +348,30 @@ menu "Wi-Fi"
int "Minimum active time"
range 8 60
default 50
depends on ESP_WIFI_SLP_IRAM_OPT
help
The minimum timeout for waiting to receive data, unit: milliseconds.
Only for station in WIFI_PS_MIN_MODEM or WIFI_PS_MAX_MODEM. When the station enters the active state,
it will work for at least ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME. If a data packet is received or sent
during this period, the time will be refreshed. If the time is up, but the station still has packets
to receive or send, the time will also be refreshed. unit: milliseconds.
config ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME
int "Maximum keep alive time"
range 10 60
default 10
depends on ESP_WIFI_SLP_IRAM_OPT
help
The maximum time that wifi keep alive, unit: seconds.
Only for station in WIFI_PS_MIN_MODEM or WIFI_PS_MAX_MODEM. If no packet has been
sent within ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME, a null data packet will be sent
to maintain the connection with the AP. unit: seconds.
config ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME
int "Minimum wait broadcast data time"
range 10 30
default 15
help
Only for station in WIFI_PS_MIN_MODEM or WIFI_PS_MAX_MODEM. When the station knows through the beacon
that AP will send broadcast packet, it will wait for ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME
before entering the sleep process. If a broadcast packet is received with more data bits, the time
will refreshed. unit: milliseconds.
config ESP_WIFI_FTM_ENABLE
bool "WiFi FTM"

View File

@ -578,6 +578,24 @@ static int coex_schm_register_cb_wrapper(int type, int(*cb)(int))
#endif
}
static int coex_schm_flexible_period_set_wrapper(uint8_t period)
{
#if CONFIG_ESP_COEX_POWER_MANAGEMENT
return coex_schm_flexible_period_set(period);
#else
return 0;
#endif
}
static uint8_t coex_schm_flexible_period_get_wrapper(void)
{
#if CONFIG_ESP_COEX_POWER_MANAGEMENT
return coex_schm_flexible_period_get();
#else
return 1;
#endif
}
static void IRAM_ATTR esp_empty_wrapper(void)
{
@ -712,5 +730,7 @@ wifi_osi_funcs_t g_wifi_osi_funcs = {
._coex_register_start_cb = coex_register_start_cb_wrapper,
._coex_schm_process_restart = coex_schm_process_restart_wrapper,
._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,
._magic = ESP_WIFI_OS_ADAPTER_MAGIC,
};

View File

@ -517,6 +517,24 @@ static int coex_schm_register_cb_wrapper(int type, int(*cb)(int))
#endif
}
static int coex_schm_flexible_period_set_wrapper(uint8_t period)
{
#if CONFIG_ESP_COEX_POWER_MANAGEMENT
return coex_schm_flexible_period_set(period);
#else
return 0;
#endif
}
static uint8_t coex_schm_flexible_period_get_wrapper(void)
{
#if CONFIG_ESP_COEX_POWER_MANAGEMENT
return coex_schm_flexible_period_get();
#else
return 1;
#endif
}
static void IRAM_ATTR esp_empty_wrapper(void)
{
@ -650,5 +668,7 @@ wifi_osi_funcs_t g_wifi_osi_funcs = {
._coex_register_start_cb = coex_register_start_cb_wrapper,
._coex_schm_process_restart = coex_schm_process_restart_wrapper,
._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,
._magic = ESP_WIFI_OS_ADAPTER_MAGIC,
};

View File

@ -534,6 +534,24 @@ static int coex_schm_register_cb_wrapper(int type, int(*cb)(int))
#endif
}
static int coex_schm_flexible_period_set_wrapper(uint8_t period)
{
#if CONFIG_ESP_COEX_POWER_MANAGEMENT
return coex_schm_flexible_period_set(period);
#else
return 0;
#endif
}
static uint8_t coex_schm_flexible_period_get_wrapper(void)
{
#if CONFIG_ESP_COEX_POWER_MANAGEMENT
return coex_schm_flexible_period_get();
#else
return 1;
#endif
}
static void IRAM_ATTR esp_empty_wrapper(void)
{
@ -667,5 +685,7 @@ wifi_osi_funcs_t g_wifi_osi_funcs = {
._coex_register_start_cb = coex_register_start_cb_wrapper,
._coex_schm_process_restart = coex_schm_process_restart_wrapper,
._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,
._magic = ESP_WIFI_OS_ADAPTER_MAGIC,
};

View File

@ -61,17 +61,17 @@ extern void wifi_apb80m_request(void);
extern void wifi_apb80m_release(void);
#endif
IRAM_ATTR void *wifi_malloc( size_t size )
IRAM_ATTR void *wifi_malloc(size_t size)
{
return malloc(size);
}
IRAM_ATTR void *wifi_realloc( void *ptr, size_t size )
IRAM_ATTR void *wifi_realloc(void *ptr, size_t size)
{
return realloc(ptr, size);
}
IRAM_ATTR void *wifi_calloc( size_t n, size_t size )
IRAM_ATTR void *wifi_calloc(size_t n, size_t size)
{
return calloc(n, size);
}
@ -82,7 +82,7 @@ static void *IRAM_ATTR wifi_zalloc_wrapper(size_t size)
return ptr;
}
wifi_static_queue_t *wifi_create_queue( int queue_len, int item_size)
wifi_static_queue_t *wifi_create_queue(int queue_len, int item_size)
{
wifi_static_queue_t *queue = NULL;
@ -91,7 +91,7 @@ wifi_static_queue_t *wifi_create_queue( int queue_len, int item_size)
return NULL;
}
queue->handle = xQueueCreate( queue_len, item_size);
queue->handle = xQueueCreate(queue_len, item_size);
return queue;
}
@ -522,6 +522,24 @@ static int coex_schm_register_cb_wrapper(int type, int(*cb)(int))
#endif
}
static int coex_schm_flexible_period_set_wrapper(uint8_t period)
{
#if CONFIG_ESP_COEX_POWER_MANAGEMENT
return coex_schm_flexible_period_set(period);
#else
return 0;
#endif
}
static uint8_t coex_schm_flexible_period_get_wrapper(void)
{
#if CONFIG_ESP_COEX_POWER_MANAGEMENT
return coex_schm_flexible_period_get();
#else
return 1;
#endif
}
static void IRAM_ATTR esp_empty_wrapper(void)
{
@ -664,5 +682,7 @@ wifi_osi_funcs_t g_wifi_osi_funcs = {
#endif
._coex_schm_process_restart = coex_schm_process_restart_wrapper,
._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,
._magic = ESP_WIFI_OS_ADAPTER_MAGIC,
};

View File

@ -523,6 +523,24 @@ static int coex_schm_register_cb_wrapper(int type, int(*cb)(int))
#endif
}
static int coex_schm_flexible_period_set_wrapper(uint8_t period)
{
#if CONFIG_ESP_COEX_POWER_MANAGEMENT
return coex_schm_flexible_period_set(period);
#else
return 0;
#endif
}
static uint8_t coex_schm_flexible_period_get_wrapper(void)
{
#if CONFIG_ESP_COEX_POWER_MANAGEMENT
return coex_schm_flexible_period_get();
#else
return 1;
#endif
}
static void IRAM_ATTR esp_empty_wrapper(void)
{
@ -672,5 +690,7 @@ wifi_osi_funcs_t g_wifi_osi_funcs = {
#endif
._coex_schm_process_restart = coex_schm_process_restart_wrapper,
._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,
._magic = ESP_WIFI_OS_ADAPTER_MAGIC,
};

View File

@ -496,6 +496,16 @@ static int coex_schm_register_cb_wrapper(int type, int(*cb)(int))
return 0;
}
static int coex_schm_flexible_period_set_wrapper(uint8_t period)
{
return 0;
}
static uint8_t coex_schm_flexible_period_get_wrapper(void)
{
return 1;
}
static void IRAM_ATTR esp_empty_wrapper(void)
{
@ -750,5 +760,7 @@ wifi_osi_funcs_t g_wifi_osi_funcs = {
._coex_register_start_cb = coex_register_start_cb_wrapper,
._coex_schm_process_restart = coex_schm_process_restart_wrapper,
._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,
._magic = ESP_WIFI_OS_ADAPTER_MAGIC,
};

View File

@ -573,6 +573,24 @@ static int coex_schm_register_cb_wrapper(int type, int(*cb)(int))
#endif
}
static int coex_schm_flexible_period_set_wrapper(uint8_t period)
{
#if CONFIG_ESP_COEX_POWER_MANAGEMENT
return coex_schm_flexible_period_set(period);
#else
return 0;
#endif
}
static uint8_t coex_schm_flexible_period_get_wrapper(void)
{
#if CONFIG_ESP_COEX_POWER_MANAGEMENT
return coex_schm_flexible_period_get();
#else
return 1;
#endif
}
static void IRAM_ATTR esp_empty_wrapper(void)
{
@ -706,6 +724,7 @@ wifi_osi_funcs_t g_wifi_osi_funcs = {
._coex_register_start_cb = coex_register_start_cb_wrapper,
._coex_schm_process_restart = coex_schm_process_restart_wrapper,
._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,
._magic = ESP_WIFI_OS_ADAPTER_MAGIC,
};

View File

@ -590,6 +590,24 @@ static int coex_schm_register_cb_wrapper(int type, int(*cb)(int))
#endif
}
static int coex_schm_flexible_period_set_wrapper(uint8_t period)
{
#if CONFIG_ESP_COEX_POWER_MANAGEMENT
return coex_schm_flexible_period_set(period);
#else
return 0;
#endif
}
static uint8_t coex_schm_flexible_period_get_wrapper(void)
{
#if CONFIG_ESP_COEX_POWER_MANAGEMENT
return coex_schm_flexible_period_get();
#else
return 1;
#endif
}
static void IRAM_ATTR esp_empty_wrapper(void)
{
@ -723,5 +741,7 @@ wifi_osi_funcs_t g_wifi_osi_funcs = {
._coex_register_start_cb = coex_register_start_cb_wrapper,
._coex_schm_process_restart = coex_schm_process_restart_wrapper,
._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,
._magic = ESP_WIFI_OS_ADAPTER_MAGIC,
};

View File

@ -614,13 +614,13 @@ esp_err_t esp_wifi_internal_set_spp_amsdu(wifi_interface_t ifidx, bool spp_cap,
void esp_wifi_internal_update_light_sleep_default_params(int min_freq_mhz, int max_freq_mhz);
/**
* @brief Set the delay time for wifi to enter the sleep state when light sleep
* @brief Set the min active time for wifi to enter the sleep state when light sleep
*
* @param return_to_sleep_delay: minimum timeout time for waiting to receive
* @param min_active_time: minimum timeout time for waiting to receive
* data, when no data is received during the timeout period,
* the wifi enters the sleep process.
*/
void esp_wifi_set_sleep_delay_time(uint32_t return_to_sleep_delay);
void esp_wifi_set_sleep_min_active_time(uint32_t min_active_time);
/**
* @brief Set wifi keep alive time
@ -629,6 +629,17 @@ void esp_wifi_set_sleep_delay_time(uint32_t return_to_sleep_delay);
*/
void esp_wifi_set_keep_alive_time(uint32_t keep_alive_time);
/**
* @brief Set the min broadcast data wait time for wifi to enter the sleep state
*
* @attention Default sleep wait broadcast data time is 15000, Uint µs.
*
* @param time: When the station knows through the beacon that the AP
* will send broadcast packet, it will wait for a minimum of
* wait_broadcast_data_time before entering the sleep process.
*/
void esp_wifi_set_sleep_wait_broadcast_data_time(uint32_t time);
/**
* @brief Configure wifi beacon montior default parameters
*

View File

@ -153,6 +153,8 @@ typedef struct wifi_osi_funcs_t {
void (* _regdma_link_set_write_wait_content)(void *, uint32_t, uint32_t);
void * (* _sleep_retention_find_link_by_id)(int);
#endif
int (*_coex_schm_flexible_period_set)(uint8_t);
uint8_t (*_coex_schm_flexible_period_get)(void);
int32_t _magic;
} wifi_osi_funcs_t;

View File

@ -365,7 +365,7 @@ esp_err_t esp_wifi_get_mode(wifi_mode_t *mode);
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_INVALID_ARG: invalid argument
* - ESP_ERR_INVALID_ARG: It doesn't normally happen, the function called inside the API was passed invalid argument, user should check if the wifi related config is correct
* - ESP_ERR_NO_MEM: out of memory
* - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong
* - ESP_FAIL: other WiFi internal errors
@ -598,7 +598,7 @@ esp_err_t esp_wifi_scan_get_ap_record(wifi_ap_record_t *ap_record);
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_MODE: WiFi mode is wrong
* - ESP_ERR_INVALID_ARG: invalid argument
* - ESP_ERR_INVALID_ARG: It doesn't normally happen, the function called inside the API was passed invalid argument, user should check if the wifi related config is correct
*/
esp_err_t esp_wifi_clear_ap_list(void);
@ -1596,6 +1596,21 @@ esp_err_t esp_wifi_set_band(wifi_band_t band);
esp_err_t esp_wifi_get_band(wifi_band_t* band);
#endif /* SOC_WIFI_HE_SUPPORT_5G */
#if CONFIG_ESP_COEX_POWER_MANAGEMENT
/**
* @brief Enable Wi-Fi coexistence power management
*
* @attention This API should be called after esp_wifi_init().
*
* @param enabled Wi-Fi coexistence power management is enabled or not.
*
* @return
* - ESP_OK: succeed
* - others: failed
*/
esp_err_t esp_wifi_coex_pwr_configure(bool enabled);
#endif
#ifdef __cplusplus
}
#endif

View File

@ -338,6 +338,8 @@ typedef struct {
uint8_t ssid_hidden; /**< Broadcast SSID or not, default 0, broadcast the SSID */
uint8_t max_connection; /**< Max number of stations allowed to connect in */
uint16_t beacon_interval; /**< Beacon interval which should be multiples of 100. Unit: TU(time unit, 1 TU = 1024 us). Range: 100 ~ 60000. Default value: 100 */
uint8_t csa_count; /**< Channel Switch Announcement Count. Notify the station that the channel will switch after the csa_count beacon intervals. Default value: 3 */
uint8_t dtim_period; /**< Dtim period of soft-AP. Default value: 2 */
wifi_cipher_type_t pairwise_cipher; /**< Pairwise cipher of SoftAP, group cipher will be derived using this. Cipher values are valid starting from WIFI_CIPHER_TYPE_TKIP, enum values before that will be considered as invalid and default cipher suites(TKIP+CCMP) will be used. Valid cipher suites in softAP mode are WIFI_CIPHER_TYPE_TKIP, WIFI_CIPHER_TYPE_CCMP and WIFI_CIPHER_TYPE_TKIP_CCMP. */
bool ftm_responder; /**< Enable FTM Responder mode */
wifi_pmf_config_t pmf_cfg; /**< Configuration for Protected Management Frame */

@ -1 +1 @@
Subproject commit 482ab97ae352dfdbaed028338a9ee45d7f2e6127
Subproject commit a89846e501cebcdce6be6d4ecbe34dcf1567bf70

View File

@ -328,12 +328,16 @@ esp_err_t esp_wifi_init(const wifi_init_config_t *config)
esp_pm_register_light_sleep_default_params_config_callback(esp_wifi_internal_update_light_sleep_default_params);
uint32_t sleep_delay_us = CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME * 1000;
esp_wifi_set_sleep_delay_time(sleep_delay_us);
#endif
uint32_t min_active_time_us = CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME * 1000;
esp_wifi_set_sleep_min_active_time(min_active_time_us);
uint32_t keep_alive_time_us = CONFIG_ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME * 1000 * 1000;
esp_wifi_set_keep_alive_time(keep_alive_time_us);
#endif
uint32_t wait_broadcast_data_time_us = CONFIG_ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME * 1000;
esp_wifi_set_sleep_wait_broadcast_data_time(wait_broadcast_data_time_us);
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
#if SOC_PM_MODEM_RETENTION_BY_REGDMA