qcacmn: Cancel sleep_timer completely in pcie bus suspend

There is possibility that sleep_timer is in running state,
so even in hif_pci_cancel_deferred_target_sleep timer has
been stopped, it runs later.

Use fake_sleep in hif_sleep_entry to check if timer has been
stopped, if yes, without action in hif_sleep_entry.

Change-Id: I46f28f8d856b51792e27a1f80f763830956b2868
CRs-Fixed: 2482547
This commit is contained in:
Jingxiang Ge
2019-08-12 13:26:00 +08:00
committed by nshrivas
부모 30c93402ec
커밋 5dab0d80c8

파일 보기

@@ -1491,10 +1491,11 @@ static void hif_sleep_entry(void *arg)
return;
qdf_spin_lock_irqsave(&hif_state->keep_awake_lock);
if (hif_state->verified_awake == false) {
if (hif_state->fake_sleep) {
idle_ms = qdf_system_ticks_to_msecs(qdf_system_ticks()
- hif_state->sleep_ticks);
if (idle_ms >= HIF_MIN_SLEEP_INACTIVITY_TIME_MS) {
if (!hif_state->verified_awake &&
idle_ms >= HIF_MIN_SLEEP_INACTIVITY_TIME_MS) {
if (!qdf_atomic_read(&scn->link_suspended)) {
soc_wake_reset(scn);
hif_state->fake_sleep = false;
@@ -1502,12 +1503,8 @@ static void hif_sleep_entry(void *arg)
} else {
qdf_timer_stop(&hif_state->sleep_timer);
qdf_timer_start(&hif_state->sleep_timer,
HIF_SLEEP_INACTIVITY_TIMER_PERIOD_MS);
}
} else {
qdf_timer_stop(&hif_state->sleep_timer);
qdf_timer_start(&hif_state->sleep_timer,
HIF_SLEEP_INACTIVITY_TIMER_PERIOD_MS);
}
}
qdf_spin_unlock_irqrestore(&hif_state->keep_awake_lock);
}