From f3f707bc0f4644c22145015c22cf81b2c5acdb90 Mon Sep 17 00:00:00 2001 From: Surabhi Vishnoi Date: Wed, 2 Aug 2023 19:00:35 +0530 Subject: [PATCH] qcacld-3.0: Release wakelock when psoc idle timer is stopped Currently, wakelock with timeout is acquired when psoc idle timer is started to prevent suspend but it is not released when psoc idle timer is stopped. So, in scenarios where wlan is turned off/on frequently, psoc idle timer will be started and wakelock with timeout will be acquired as part of wlan off but after wlan is turned on suspend will not be allowed until wakelock timeout occurs as wakelock is not released when psoc idle timer is stopped. To allow suspend after wlan is turned on, release wakelock which was acquired as part of wlan off in psoc idle timer start. Change-Id: I85ad9ce4ae9618a88601295d2194b4033be88c2d CRs-Fixed: 3578872 (cherry picked from commit 38060e5e3acb9bdaeeac4b57bc54e9807c4832d4) --- core/hdd/src/wlan_hdd_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index a641e3b6fd7e..6f2a64fcb37d 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -12488,6 +12488,7 @@ void hdd_psoc_idle_timer_start(struct hdd_context *hdd_ctx) void hdd_psoc_idle_timer_stop(struct hdd_context *hdd_ctx) { qdf_delayed_work_stop_sync(&hdd_ctx->psoc_idle_timeout_work); + hdd_allow_suspend(WIFI_POWER_EVENT_WAKELOCK_IFACE_CHANGE_TIMER); hdd_debug("Stopped psoc idle timer"); }