From 6b593aee711e7774fc77262f4c43ff91a20b67a2 Mon Sep 17 00:00:00 2001 From: Rajeev Kumar Date: Mon, 16 Dec 2019 10:58:46 -0800 Subject: [PATCH] qcacld-3.0: Remove pm_freezing check from psoc idle restart pm_freezing check to abort system suspend during psoc idle restart is not working and hence remove pm_freezing check. Correct fix(change Ib89eca5014729f6a2103e14c6f46540d1406a5a0) to reliably abort system suspend by calling qdf system awake api during psoc idle restart is already present so pm_freezing check is no longer needed. Change-Id: Ifb56a2a9858378508ef9e583bdd15e63c26d9ba6 CRs-Fixed: 2587453 --- core/hdd/src/wlan_hdd_driver_ops.c | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c index 6b1d8cf03269..0bfb0f7a5ee5 100644 --- a/core/hdd/src/wlan_hdd_driver_ops.c +++ b/core/hdd/src/wlan_hdd_driver_ops.c @@ -398,40 +398,12 @@ static void hdd_abort_system_suspend(struct device *dev) } #endif -/* Total wait time for pm freeze is 10 seconds */ -#define HDD_SLEEP_FOR_PM_FREEZE_TIME (500) -#define HDD_MAX_ATTEMPT_SLEEP_FOR_PM_FREEZE_TIME (20) - -static int hdd_wait_for_pm_freeze(void) -{ - uint8_t count = 0; - - while (pm_freezing) { - hdd_info("pm freezing wait for %d ms", - HDD_SLEEP_FOR_PM_FREEZE_TIME); - msleep(HDD_SLEEP_FOR_PM_FREEZE_TIME); - count++; - if (count > HDD_MAX_ATTEMPT_SLEEP_FOR_PM_FREEZE_TIME) { - hdd_err("timeout occurred for pm freezing"); - return -EBUSY; - } - } - - return 0; -} - int hdd_soc_idle_restart_lock(struct device *dev) { hdd_prevent_suspend(WIFI_POWER_EVENT_WAKELOCK_DRIVER_IDLE_RESTART); hdd_abort_system_suspend(dev); - if (hdd_wait_for_pm_freeze()) { - hdd_allow_suspend( - WIFI_POWER_EVENT_WAKELOCK_DRIVER_IDLE_RESTART); - return -EBUSY; - } - return 0; }