diff --git a/components/pmo/core/src/wlan_pmo_suspend_resume.c b/components/pmo/core/src/wlan_pmo_suspend_resume.c index 3a27602d3f25..b3b880133f50 100644 --- a/components/pmo/core/src/wlan_pmo_suspend_resume.c +++ b/components/pmo/core/src/wlan_pmo_suspend_resume.c @@ -970,6 +970,7 @@ QDF_STATUS pmo_core_psoc_bus_runtime_suspend(struct wlan_objmgr_psoc *psoc, QDF_STATUS status; int ret; struct pmo_wow_enable_params wow_params = {0}; + struct pmo_psoc_priv_obj *psoc_ctx; qdf_time_t begin, end; int pending; @@ -1057,7 +1058,16 @@ QDF_STATUS pmo_core_psoc_bus_runtime_suspend(struct wlan_objmgr_psoc *psoc, } } + hif_pm_runtime_suspend_lock(hif_ctx); + psoc_ctx = pmo_psoc_get_priv(psoc); + if (pmo_core_get_wow_initial_wake_up(psoc_ctx)) { + hif_pm_runtime_suspend_unlock(hif_ctx); + pmo_err("Target wake up received before suspend completion"); + status = QDF_STATUS_E_BUSY; + goto resume_hif; + } hif_process_runtime_suspend_success(hif_ctx); + hif_pm_runtime_suspend_unlock(hif_ctx); goto dec_psoc_ref;