forked from espressif/esp-idf
Merge branch 'feature/wifi_beacon_loss_optimize_v4.4' into 'release/v4.4'
backport v4.4: beacon loss and noise check timer optimize for wifi power save See merge request espressif/esp-idf!19172
This commit is contained in:
@@ -1545,7 +1545,7 @@ pm_set_beacon_filter = 0x4000166c;
|
|||||||
pm_is_in_wifi_slice_threshold = 0x40001670;
|
pm_is_in_wifi_slice_threshold = 0x40001670;
|
||||||
pm_is_waked = 0x40001674;
|
pm_is_waked = 0x40001674;
|
||||||
pm_keep_alive = 0x40001678;
|
pm_keep_alive = 0x40001678;
|
||||||
pm_on_beacon_rx = 0x4000167c;
|
/* pm_on_beacon_rx = 0x4000167c; */
|
||||||
pm_on_data_rx = 0x40001680;
|
pm_on_data_rx = 0x40001680;
|
||||||
pm_on_tbtt = 0x40001684;
|
pm_on_tbtt = 0x40001684;
|
||||||
pm_parse_beacon = 0x40001688;
|
pm_parse_beacon = 0x40001688;
|
||||||
@@ -1554,7 +1554,7 @@ pm_process_tim = 0x4000168c;
|
|||||||
pm_rx_data_process = 0x40001694;
|
pm_rx_data_process = 0x40001694;
|
||||||
/*pm_sleep = 0x40001698;*/
|
/*pm_sleep = 0x40001698;*/
|
||||||
pm_sleep_for = 0x4000169c;
|
pm_sleep_for = 0x4000169c;
|
||||||
pm_tbtt_process = 0x400016a0;
|
/* pm_tbtt_process = 0x400016a0; */
|
||||||
ppAMPDU2Normal = 0x400016a4;
|
ppAMPDU2Normal = 0x400016a4;
|
||||||
ppAssembleAMPDU = 0x400016a8;
|
ppAssembleAMPDU = 0x400016a8;
|
||||||
ppCalFrameTimes = 0x400016ac;
|
ppCalFrameTimes = 0x400016ac;
|
||||||
|
@@ -1850,7 +1850,7 @@ pm_set_beacon_filter = 0x40005484;
|
|||||||
pm_is_in_wifi_slice_threshold = 0x40005490;
|
pm_is_in_wifi_slice_threshold = 0x40005490;
|
||||||
pm_is_waked = 0x4000549c;
|
pm_is_waked = 0x4000549c;
|
||||||
pm_keep_alive = 0x400054a8;
|
pm_keep_alive = 0x400054a8;
|
||||||
pm_on_beacon_rx = 0x400054b4;
|
/* pm_on_beacon_rx = 0x400054b4; */
|
||||||
pm_on_data_rx = 0x400054c0;
|
pm_on_data_rx = 0x400054c0;
|
||||||
pm_on_tbtt = 0x400054cc;
|
pm_on_tbtt = 0x400054cc;
|
||||||
pm_parse_beacon = 0x400054d8;
|
pm_parse_beacon = 0x400054d8;
|
||||||
@@ -1859,7 +1859,7 @@ pm_process_tim = 0x400054e4;
|
|||||||
pm_rx_data_process = 0x400054fc;
|
pm_rx_data_process = 0x400054fc;
|
||||||
/*pm_sleep = 0x40005508;*/
|
/*pm_sleep = 0x40005508;*/
|
||||||
pm_sleep_for = 0x40005514;
|
pm_sleep_for = 0x40005514;
|
||||||
pm_tbtt_process = 0x40005520;
|
/* pm_tbtt_process = 0x40005520; */
|
||||||
ppAMPDU2Normal = 0x4000552c;
|
ppAMPDU2Normal = 0x4000552c;
|
||||||
ppAssembleAMPDU = 0x40005538;
|
ppAssembleAMPDU = 0x40005538;
|
||||||
ppCalFrameTimes = 0x40005544;
|
ppCalFrameTimes = 0x40005544;
|
||||||
@@ -1890,7 +1890,7 @@ ppSearchTxQueue = 0x40005670;
|
|||||||
ppSearchTxframe = 0x4000567c;
|
ppSearchTxframe = 0x4000567c;
|
||||||
ppSelectNextQueue = 0x40005688;
|
ppSelectNextQueue = 0x40005688;
|
||||||
ppSubFromAMPDU = 0x40005694;
|
ppSubFromAMPDU = 0x40005694;
|
||||||
ppTask = 0x400056a0;
|
/* ppTask = 0x400056a0; */
|
||||||
ppTxPkt = 0x400056ac;
|
ppTxPkt = 0x400056ac;
|
||||||
ppTxProtoProc = 0x400056b8;
|
ppTxProtoProc = 0x400056b8;
|
||||||
ppTxqUpdateBitmap = 0x400056c4;
|
ppTxqUpdateBitmap = 0x400056c4;
|
||||||
@@ -1942,7 +1942,7 @@ wdev_mac_special_reg_store = 0x400058e0;
|
|||||||
wdev_mac_wakeup = 0x400058ec;
|
wdev_mac_wakeup = 0x400058ec;
|
||||||
wdev_mac_sleep = 0x400058f8;
|
wdev_mac_sleep = 0x400058f8;
|
||||||
hal_mac_is_dma_enable = 0x40005904;
|
hal_mac_is_dma_enable = 0x40005904;
|
||||||
wDev_ProcessFiq = 0x40005910;
|
/* wDev_ProcessFiq = 0x40005910; */
|
||||||
wDev_ProcessRxSucData = 0x4000591c;
|
wDev_ProcessRxSucData = 0x4000591c;
|
||||||
wdevProcessRxSucDataAll = 0x40005928;
|
wdevProcessRxSucDataAll = 0x40005928;
|
||||||
wdev_csi_len_align = 0x40005934;
|
wdev_csi_len_align = 0x40005934;
|
||||||
|
@@ -331,4 +331,45 @@ menu "Wi-Fi"
|
|||||||
help
|
help
|
||||||
WiFi module can be compiled without SoftAP to save code size.
|
WiFi module can be compiled without SoftAP to save code size.
|
||||||
|
|
||||||
|
config ESP_WIFI_SLP_BEACON_LOST_OPT
|
||||||
|
bool "Wifi sleep optimize when beacon lost"
|
||||||
|
help
|
||||||
|
Enable wifi sleep optimization when beacon loss occurs and immediately enter
|
||||||
|
sleep mode when the WiFi module detects beacon loss.
|
||||||
|
|
||||||
|
config ESP_WIFI_SLP_BEACON_LOST_TIMEOUT
|
||||||
|
int "Beacon loss timeout"
|
||||||
|
range 5 100
|
||||||
|
default 10
|
||||||
|
depends on ESP_WIFI_SLP_BEACON_LOST_OPT
|
||||||
|
help
|
||||||
|
Timeout time for close rf phy when beacon loss occurs, Unit: 1024 microsecond.
|
||||||
|
|
||||||
|
config ESP_WIFI_SLP_BEACON_LOST_THRESHOLD
|
||||||
|
int "Maximum number of consecutive lost beacons allowed"
|
||||||
|
range 0 8
|
||||||
|
default 3
|
||||||
|
depends on ESP_WIFI_SLP_BEACON_LOST_OPT
|
||||||
|
help
|
||||||
|
Maximum number of consecutive lost beacons allowed, WiFi keeps Rx state when
|
||||||
|
the number of consecutive beacons lost is greater than the given threshold.
|
||||||
|
|
||||||
|
config ESP_WIFI_SLP_PHY_ON_DELTA_EARLY_TIME
|
||||||
|
int "Delta early time for RF PHY on"
|
||||||
|
range 0 100
|
||||||
|
default 2
|
||||||
|
depends on ESP_WIFI_SLP_BEACON_LOST_OPT
|
||||||
|
help
|
||||||
|
Delta early time for rf phy on, When the beacon is lost, the next rf phy on will
|
||||||
|
be earlier the time specified by the configuration item, Unit: 32 microsecond.
|
||||||
|
|
||||||
|
config ESP_WIFI_SLP_PHY_OFF_DELTA_TIMEOUT_TIME
|
||||||
|
int "Delta timeout time for RF PHY off"
|
||||||
|
range 0 8
|
||||||
|
default 2
|
||||||
|
depends on ESP_WIFI_SLP_BEACON_LOST_OPT
|
||||||
|
help
|
||||||
|
Delta timeout time for rf phy off, When the beacon is lost, the next rf phy off will
|
||||||
|
be delayed for the time specified by the configuration item. Unit: 1024 microsecond.
|
||||||
|
|
||||||
endmenu # Wi-Fi
|
endmenu # Wi-Fi
|
||||||
|
@@ -590,6 +590,15 @@ 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);
|
void esp_wifi_set_keep_alive_time(uint32_t keep_alive_time);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Configure wifi beacon montior default parameters
|
||||||
|
*
|
||||||
|
* @param enable: enable or disable beacon monitor
|
||||||
|
* @param timeout: timeout time for close rf phy when beacon loss occurs, Unit: 1024 microsecond
|
||||||
|
* @param threshold: maximum number of consecutive lost beacons allowed
|
||||||
|
*/
|
||||||
|
void esp_wifi_beacon_monitor_configure(bool enable, int timeout, int threshold, int delta_intr_early, int delta_timeout);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Submodule components/esp_wifi/lib updated: 85d6197b8f...a224df6c90
@@ -112,6 +112,9 @@ esp_err_t esp_wifi_deinit(void)
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if CONFIG_ESP_WIFI_SLP_BEACON_LOST_OPT
|
||||||
|
esp_wifi_beacon_monitor_configure(false, 0, 0, 0, 0);
|
||||||
|
#endif
|
||||||
#if CONFIG_ESP_NETIF_TCPIP_ADAPTER_COMPATIBLE_LAYER
|
#if CONFIG_ESP_NETIF_TCPIP_ADAPTER_COMPATIBLE_LAYER
|
||||||
tcpip_adapter_clear_default_wifi_handlers();
|
tcpip_adapter_clear_default_wifi_handlers();
|
||||||
#endif
|
#endif
|
||||||
@@ -269,6 +272,11 @@ esp_err_t esp_wifi_init(const wifi_init_config_t *config)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if CONFIG_ESP_WIFI_SLP_BEACON_LOST_OPT
|
||||||
|
esp_wifi_beacon_monitor_configure(true, CONFIG_ESP_WIFI_SLP_BEACON_LOST_TIMEOUT,
|
||||||
|
CONFIG_ESP_WIFI_SLP_BEACON_LOST_THRESHOLD, CONFIG_ESP_WIFI_SLP_PHY_ON_DELTA_EARLY_TIME,
|
||||||
|
CONFIG_ESP_WIFI_SLP_PHY_OFF_DELTA_TIMEOUT_TIME);
|
||||||
|
#endif
|
||||||
adc2_cal_include(); //This enables the ADC2 calibration constructor at start up.
|
adc2_cal_include(); //This enables the ADC2 calibration constructor at start up.
|
||||||
|
|
||||||
esp_wifi_config_info();
|
esp_wifi_config_info();
|
||||||
|
Reference in New Issue
Block a user