mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 13:44:26 -04:00
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
This commit is contained in:
parent
1e8f221be0
commit
6b593aee71
1 changed files with 0 additions and 28 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue