Merge "qcacld-3.0: Decouple PMO LPASS and NAN wow enable check from vdev" into wlan-cld3.driver.lnx.2.0

This commit is contained in:
CNSS_WLAN Service 2018-12-07 02:21:44 -08:00 • committed by Gerrit - the friendly Code Review server
commit ccff2bdcfc
2 changed files with 16 additions and 18 deletions

View file

@ -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;
}

View file

@ -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);