qcacld-3.0: Don't trigger self recovery when recovery is in progress

Currently, self recovery is being triggered when suspend/resume
timeout happens. The self recovery API will creates a work to
trigger recovery handler. But this work is not required if the
suspend/resume timeout happens due to FW down. In this case the
recovery will happen as part FW down indication and no need to
trigger recovery for suspend/resume timeout.

Change-Id: I75ea9f67efb21a3e9aaea99b53c256460ba696c5
CRs-Fixed: 2739385
This commit is contained in:
Bapiraju Alla 2020-07-20 18:04:36 +05:30 • committed by snandini
commit 6b00fa1a59

View file

@ -826,7 +826,8 @@ pmo_core_enable_wow_in_fw(struct wlan_objmgr_psoc *psoc,
pmo_tgt_psoc_get_host_credits(psoc),
pmo_tgt_psoc_get_pending_cmnds(psoc));
pmo_tgt_update_target_suspend_flag(psoc, false);
qdf_trigger_self_recovery(psoc, QDF_SUSPEND_TIMEOUT);
if (!psoc_ctx->wow.target_suspend.force_set)
qdf_trigger_self_recovery(psoc, QDF_SUSPEND_TIMEOUT);
goto out;
}
@ -883,7 +884,8 @@ QDF_STATUS pmo_core_psoc_suspend_target(struct wlan_objmgr_psoc *psoc,
if (QDF_IS_STATUS_ERROR(status)) {
pmo_err("Failed to get ACK from firmware for pdev suspend");
pmo_tgt_update_target_suspend_flag(psoc, false);
qdf_trigger_self_recovery(psoc, QDF_SUSPEND_TIMEOUT);
if (!psoc_ctx->wow.target_suspend.force_set)
qdf_trigger_self_recovery(psoc, QDF_SUSPEND_TIMEOUT);
}
out:
@ -1199,7 +1201,9 @@ QDF_STATUS pmo_core_psoc_send_host_wakeup_ind_to_fw(
pmo_err("Pending commands %d credits %d",
pmo_tgt_psoc_get_pending_cmnds(psoc),
pmo_tgt_psoc_get_host_credits(psoc));
qdf_trigger_self_recovery(psoc, QDF_RESUME_TIMEOUT);
if (!psoc_ctx->wow.target_resume.force_set)
qdf_trigger_self_recovery(psoc, QDF_RESUME_TIMEOUT);
} else {
pmo_debug("Host wakeup received");
}
@ -1271,7 +1275,8 @@ QDF_STATUS pmo_core_psoc_resume_target(struct wlan_objmgr_psoc *psoc,
pmo_fatal("Pending commands %d credits %d",
pmo_tgt_psoc_get_pending_cmnds(psoc),
pmo_tgt_psoc_get_host_credits(psoc));
qdf_trigger_self_recovery(psoc, QDF_RESUME_TIMEOUT);
if (!psoc_ctx->wow.target_resume.force_set)
qdf_trigger_self_recovery(psoc, QDF_RESUME_TIMEOUT);
} else {
pmo_debug("Host wakeup received");
}