summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGanesh Babu Kumaravel <kganesh@qti.qualcomm.com>2014-07-23 14:45:05 +0530
committerAkash Patel <c_akashp@qca.qualcomm.com>2014-07-24 18:25:54 -0700
commit1ef4645561dd72c7bf6ed2dfeddf5c8b43f72d1d (patch)
treecf24d021f0ee218c07c6c478f36964bbe01359c1
parent6e6c9e08c9c253b6234b7d044b84a8db234de127 (diff)
qcacld:Fix race in starting HIF Sleep timer
HIF sleep timer is getting started from both HIF_sleep_entry() and HIFTargetSleepStateAdjust(). So make sure that HIF sleep timer is stopped before starting to avoid kernel panic. CRs-Fixed: 698535 Change-Id: I44dd079128f3925695a3db2ba45052d1ee04b8cd
-rw-r--r--CORE/SERVICES/HIF/PCIe/hif_pci.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/CORE/SERVICES/HIF/PCIe/hif_pci.c b/CORE/SERVICES/HIF/PCIe/hif_pci.c
index b457c283fb2d..85bd7e303803 100644
--- a/CORE/SERVICES/HIF/PCIe/hif_pci.c
+++ b/CORE/SERVICES/HIF/PCIe/hif_pci.c
@@ -2138,10 +2138,12 @@ HIF_sleep_entry(void *arg)
hif_state->fake_sleep = FALSE;
}
} else {
+ adf_os_timer_cancel(&hif_state->sleep_timer);
adf_os_timer_start(&hif_state->sleep_timer,
HIF_SLEEP_INACTIVITY_TIMER_PERIOD_MS);
}
} else {
+ adf_os_timer_cancel(&hif_state->sleep_timer);
adf_os_timer_start(&hif_state->sleep_timer,
HIF_SLEEP_INACTIVITY_TIMER_PERIOD_MS);
}