From 954840d5fec27f59f44d372664d520beb097eb92 Mon Sep 17 00:00:00 2001 From: Yue Ma Date: Wed, 17 Jul 2019 15:12:53 -0700 Subject: [PATCH] qcacld-3.0: Avoid DRV suspend as well if link cannot be suspended There is no need to do DRV suspend if gPreventLinkDown ini flag is set. PCIe link will be always up. Change-Id: Ie6344514486634e1b6ae3b4a4e416853f8d46e5a CRs-Fixed: 2492053 --- components/pmo/core/src/wlan_pmo_suspend_resume.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/components/pmo/core/src/wlan_pmo_suspend_resume.c b/components/pmo/core/src/wlan_pmo_suspend_resume.c index ceb1b15c34..3c35cb98ce 100644 --- a/components/pmo/core/src/wlan_pmo_suspend_resume.c +++ b/components/pmo/core/src/wlan_pmo_suspend_resume.c @@ -761,11 +761,15 @@ pmo_core_enable_wow_in_fw(struct wlan_objmgr_psoc *psoc, psoc_ctx->wow.wow_state = pmo_wow_state_unified_d0; } - if (qdf_is_drv_connected()) { - pmo_info("drv wow is enabled"); - param.flags |= WMI_WOW_FLAG_ENABLE_DRV_PCIE_L1SS_SLEEP; + if (htc_can_suspend_link(pmo_core_psoc_get_htc_handle(psoc))) { + if (qdf_is_drv_connected()) { + pmo_info("drv wow is enabled"); + param.flags |= WMI_WOW_FLAG_ENABLE_DRV_PCIE_L1SS_SLEEP; + } else { + pmo_info("non-drv wow is enabled"); + } } else { - pmo_info("non-drv wow is enabled"); + pmo_info("Prevent link down, non-drv wow is enabled"); } status = pmo_tgt_psoc_send_wow_enable_req(psoc, ¶m);