feat(modem): rename the sleep modem functions

This commit is contained in:
cjin
2026-07-17 11:04:26 +08:00
parent 62397932f9
commit 226f11da96
4 changed files with 43 additions and 43 deletions
+8 -8
View File
@@ -344,7 +344,7 @@ void esp_phy_enable(esp_phy_modem_t modem)
#if SOC_PM_SUPPORT_PMU_MODEM_STATE && CONFIG_ESP_WIFI_ENHANCED_LIGHT_SLEEP
bool wifimac_link_is_sel = false;
if (!pm_mac_modem_rf_already_enabled()) {
if (sleep_modem_wifi_modem_state_enabled() && sleep_modem_wifi_modem_link_done()) {
if (sleep_modem_phy_link_enabled() && sleep_modem_phy_link_done()) {
#if SOC_PM_PAU_REGDMA_LINK_IDX_PHY && SOC_PM_PAU_REGDMA_MODEM_WIFIMAC_WORKAROUND
/*
* A race exists between SoC wakeup and modem state sleep. After modem initiates sleep,
@@ -356,9 +356,9 @@ void esp_phy_enable(esp_phy_modem_t modem)
* cleared by regdma closing RF with wifimac link.
* See WIFI-7246 for details.
*/
wifimac_link_is_sel = pm_get_wifimac_regdma_link_selection();
wifimac_link_is_sel = pm_get_wifimac_regdma_link_selection();
#endif
sleep_modem_wifi_do_phy_retention(true, wifimac_link_is_sel);
sleep_modem_do_phy_retention(true, wifimac_link_is_sel);
} else {
phy_wakeup_init();
}
@@ -423,12 +423,12 @@ void esp_phy_disable(esp_phy_modem_t modem)
#endif
#if SOC_PM_SUPPORT_PMU_MODEM_STATE && CONFIG_ESP_WIFI_ENHANCED_LIGHT_SLEEP
pm_mac_modem_clear_rf_power_state();
if (sleep_modem_wifi_modem_state_enabled()) {
bool wifimac_link_is_sel = false;
if (sleep_modem_phy_link_enabled()) {
bool wifimac_link_is_sel = false;
#if SOC_PM_PAU_REGDMA_LINK_IDX_PHY && SOC_PM_PAU_REGDMA_MODEM_WIFIMAC_WORKAROUND
wifimac_link_is_sel = pm_get_wifimac_regdma_link_selection();
#endif
sleep_modem_wifi_do_phy_retention(false, wifimac_link_is_sel);
sleep_modem_do_phy_retention(false, wifimac_link_is_sel);
} else
#endif /* SOC_PM_SUPPORT_PMU_MODEM_STATE && CONFIG_ESP_WIFI_ENHANCED_LIGHT_SLEEP */
{
@@ -506,7 +506,7 @@ void esp_phy_modem_init(void)
}
#endif // SOC_PM_MODEM_RETENTION_BY_BACKUPDMA
#if SOC_PM_SUPPORT_PMU_MODEM_STATE && CONFIG_ESP_WIFI_ENHANCED_LIGHT_SLEEP
sleep_modem_wifi_modem_state_init();
sleep_modem_phy_init();
#endif // CONFIG_ESP_WIFI_ENHANCED_LIGHT_SLEEP
_lock_release(&s_phy_access_lock);
#endif // SOC_PM_MODEM_RETENTION_BY_BACKUPDMA || CONFIG_ESP_WIFI_ENHANCED_LIGHT_SLEEP
@@ -531,7 +531,7 @@ void esp_phy_modem_deinit(void)
#endif // CONFIG_IDF_TARGET_ESP32C3
#endif // SOC_PM_MODEM_RETENTION_BY_BACKUPDMA
#if SOC_PM_SUPPORT_PMU_MODEM_STATE && CONFIG_ESP_WIFI_ENHANCED_LIGHT_SLEEP
sleep_modem_wifi_modem_state_deinit();
sleep_modem_phy_deinit();
#endif // CONFIG_ESP_WIFI_ENHANCED_LIGHT_SLEEP
}
_lock_release(&s_phy_access_lock);