diff --git a/components/pmo/core/inc/wlan_pmo_wow.h b/components/pmo/core/inc/wlan_pmo_wow.h index 6ea9d5537a4b..1ecfb66192b1 100644 --- a/components/pmo/core/inc/wlan_pmo_wow.h +++ b/components/pmo/core/inc/wlan_pmo_wow.h @@ -614,8 +614,8 @@ void pmo_core_update_p2plo_in_progress(struct wlan_objmgr_vdev *vdev, #ifdef WLAN_FEATURE_LPSS /** - * pmo_is_lpass_enabled() - check if lpass is enabled - * @vdev: objmgr vdev handle + * pmo_core_is_lpass_enabled() - check if lpass is enabled + * @posc: objmgr psoc object * * WoW is needed if LPASS or NaN feature is enabled in INI because * target can't wake up itself if its put in PDEV suspend when LPASS @@ -624,21 +624,15 @@ void pmo_core_update_p2plo_in_progress(struct wlan_objmgr_vdev *vdev, * Return: true if lpass is enabled else false */ static inline -bool pmo_core_is_lpass_enabled(struct wlan_objmgr_vdev *vdev) +bool pmo_core_is_lpass_enabled(struct wlan_objmgr_psoc *psoc) { - bool lpass_enable; - struct pmo_vdev_priv_obj *vdev_ctx; + struct pmo_psoc_priv_obj *pmo_psoc_ctx = pmo_psoc_get_priv(psoc); - vdev_ctx = pmo_vdev_get_priv(vdev); - qdf_spin_lock_bh(&vdev_ctx->pmo_vdev_lock); - lpass_enable = vdev_ctx->pmo_psoc_ctx->psoc_cfg.lpass_enable; - qdf_spin_unlock_bh(&vdev_ctx->pmo_vdev_lock); - - return lpass_enable; + return pmo_psoc_ctx->psoc_cfg.lpass_enable; } #else static inline -bool pmo_core_is_lpass_enabled(struct wlan_objmgr_vdev *vdev) +bool pmo_core_is_lpass_enabled(struct wlan_objmgr_psoc *psoc) { return false; } diff --git a/components/pmo/core/src/wlan_pmo_wow.c b/components/pmo/core/src/wlan_pmo_wow.c index 8becfcfa08e7..bb2089b86269 100644 --- a/components/pmo/core/src/wlan_pmo_wow.c +++ b/components/pmo/core/src/wlan_pmo_wow.c @@ -321,6 +321,16 @@ bool pmo_core_is_wow_applicable(struct wlan_objmgr_psoc *psoc) return true; } + if (pmo_core_is_lpass_enabled(psoc)) { + pmo_info("lpass enabled, enabling wow"); + return true; + } + + if (cfg_nan_get_enable(psoc)) { + pmo_debug("nan enabled, enabling wow"); + return true; + } + /* Iterate through VDEV list */ for (vdev_id = 0; vdev_id < WLAN_UMAC_PSOC_MAX_VDEVS; vdev_id++) { vdev = pmo_psoc_get_vdev(psoc, vdev_id); @@ -343,12 +353,6 @@ bool pmo_core_is_wow_applicable(struct wlan_objmgr_psoc *psoc) } else if (pmo_core_is_p2plo_in_progress(vdev)) { pmo_debug("P2P LO is in progress, enabling wow"); is_wow_applicable = true; - } else if (pmo_core_is_lpass_enabled(vdev)) { - pmo_debug("LPASS is enabled, enabling WoW"); - is_wow_applicable = true; - } else if (cfg_nan_get_enable(psoc)) { - pmo_debug("NAN is enabled, enabling WoW"); - is_wow_applicable = true; } else if (pmo_core_get_vdev_op_mode(vdev) == QDF_NDI_MODE) { pmo_debug("vdev %d is in NAN data mode, enabling wow", vdev_id);