From 498a0cd6657c4cd00936fd47322bab79fc180a6b Mon Sep 17 00:00:00 2001 From: Komal Seelam Date: Mon, 12 Sep 2016 10:29:02 +0530 Subject: [PATCH] qcacld-3.0: Optimize WoW Wakelock usage in Runtime PM propagation from qcacld-2.0 to qcacld-3.0. FW sends NACK for WOW command to indicate Host to abort on going suspend. Host prevents suspend by holding a wakelock for 1sec. The wakelock prevents APPS supsend, but doesn't have impact on Runtime PM. Hence Skip Holding Wakelock when NACK is recieved in Runtime PM. And Log the runtime stats when link resume fails. Change-Id: I6d9385565c6d06a082e226d5211c733d124bd3a7 CRs-Fixed: 1053252 --- core/wma/src/wma_features.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c index 98aa53f37a08..53b7762ddef0 100644 --- a/core/wma/src/wma_features.c +++ b/core/wma/src/wma_features.c @@ -6654,7 +6654,7 @@ void wma_target_suspend_acknowledge(void *context, bool wow_nack) wma->wow_nack = wow_nack; qdf_event_set(&wma->target_suspend); - if (wow_nack) { + if (wow_nack && !wmi_get_runtime_pm_inprogress(wma->wmi_handle)) { cds_host_diag_log_work(&wma->wow_wake_lock, WMA_WAKE_LOCK_TIMEOUT, WIFI_POWER_EVENT_WAKELOCK_WOW);