mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/wifi_bcn_timeout_m_f_probe_req_l0' into 'master'
fix bcn_timeout and disconnect with error code 201, m f probe req l=0 issue Closes WIFI-5722 See merge request espressif/esp-idf!24077
This commit is contained in:
commit
0c496896ba
@ -56,6 +56,13 @@ void sleep_modem_wifi_do_phy_retention(bool restore);
|
|||||||
*/
|
*/
|
||||||
bool sleep_modem_wifi_modem_state_enabled(void);
|
bool sleep_modem_wifi_modem_state_enabled(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get WiFi modem link done state
|
||||||
|
*
|
||||||
|
* @return true or false for WiFi modem link can be used to enable RF by REGDMA or can not be used
|
||||||
|
*/
|
||||||
|
bool sleep_modem_wifi_modem_link_done(void);
|
||||||
|
|
||||||
#endif /* SOC_PM_SUPPORT_PMU_MODEM_STATE */
|
#endif /* SOC_PM_SUPPORT_PMU_MODEM_STATE */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -256,18 +256,21 @@ static __attribute__((unused)) void sleep_modem_wifi_modem_state_deinit(void)
|
|||||||
void IRAM_ATTR sleep_modem_wifi_do_phy_retention(bool restore)
|
void IRAM_ATTR sleep_modem_wifi_do_phy_retention(bool restore)
|
||||||
{
|
{
|
||||||
if (restore) {
|
if (restore) {
|
||||||
if (s_sleep_modem.wifi.modem_state_phy_done == 1) {
|
pau_regdma_trigger_modem_link_restore();
|
||||||
pau_regdma_trigger_modem_link_restore();
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
pau_regdma_trigger_modem_link_backup();
|
pau_regdma_trigger_modem_link_backup();
|
||||||
s_sleep_modem.wifi.modem_state_phy_done = 1;
|
s_sleep_modem.wifi.modem_state_phy_done = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool sleep_modem_wifi_modem_state_enabled(void)
|
inline __attribute__((always_inline)) bool sleep_modem_wifi_modem_state_enabled(void)
|
||||||
{
|
{
|
||||||
return (s_sleep_modem.wifi.phy_link != NULL) ? true : false;
|
return (s_sleep_modem.wifi.phy_link != NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline __attribute__((always_inline)) bool sleep_modem_wifi_modem_link_done(void)
|
||||||
|
{
|
||||||
|
return (s_sleep_modem.wifi.modem_state_phy_done == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* SOC_PM_SUPPORT_PMU_MODEM_STATE */
|
#endif /* SOC_PM_SUPPORT_PMU_MODEM_STATE */
|
||||||
@ -303,7 +306,10 @@ static __attribute__((unused)) bool IRAM_ATTR sleep_modem_wifi_modem_state_skip_
|
|||||||
{
|
{
|
||||||
bool skip = false;
|
bool skip = false;
|
||||||
#if SOC_PM_SUPPORT_PMU_MODEM_STATE
|
#if SOC_PM_SUPPORT_PMU_MODEM_STATE
|
||||||
skip = (s_sleep_modem.wifi.phy_link != NULL) && (s_sleep_modem.wifi.modem_state_phy_done == 0);
|
/* To block the system from entering sleep before modem link done. In light
|
||||||
|
* sleep mode, the system may switch to modem state, which will cause
|
||||||
|
* hardware to fail to enable RF */
|
||||||
|
skip = sleep_modem_wifi_modem_state_enabled() && !sleep_modem_wifi_modem_link_done();
|
||||||
#endif
|
#endif
|
||||||
return skip;
|
return skip;
|
||||||
}
|
}
|
||||||
|
@ -251,7 +251,7 @@ void esp_phy_enable(void)
|
|||||||
#if SOC_PM_SUPPORT_PMU_MODEM_STATE && CONFIG_ESP_WIFI_ENHANCED_LIGHT_SLEEP
|
#if SOC_PM_SUPPORT_PMU_MODEM_STATE && CONFIG_ESP_WIFI_ENHANCED_LIGHT_SLEEP
|
||||||
extern bool pm_mac_modem_rf_already_enabled(void);
|
extern bool pm_mac_modem_rf_already_enabled(void);
|
||||||
if (!pm_mac_modem_rf_already_enabled()) {
|
if (!pm_mac_modem_rf_already_enabled()) {
|
||||||
if (sleep_modem_wifi_modem_state_enabled()) {
|
if (sleep_modem_wifi_modem_state_enabled() && sleep_modem_wifi_modem_link_done()) {
|
||||||
sleep_modem_wifi_do_phy_retention(true);
|
sleep_modem_wifi_do_phy_retention(true);
|
||||||
} else {
|
} else {
|
||||||
phy_wakeup_init();
|
phy_wakeup_init();
|
||||||
|
Loading…
Reference in New Issue
Block a user