From 6b00fa1a5955b7fad07f87cfac1cd41c872bae44 Mon Sep 17 00:00:00 2001 From: Bapiraju Alla Date: Mon, 20 Jul 2020 18:04:36 +0530 Subject: [PATCH] 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 --- components/pmo/core/src/wlan_pmo_suspend_resume.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/components/pmo/core/src/wlan_pmo_suspend_resume.c b/components/pmo/core/src/wlan_pmo_suspend_resume.c index bbaabf4410bf..c111018d0f5b 100644 --- a/components/pmo/core/src/wlan_pmo_suspend_resume.c +++ b/components/pmo/core/src/wlan_pmo_suspend_resume.c @@ -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"); }