From 2dc49d229dd577a0b55e0a6ae3bbdbd68b5cdaf2 Mon Sep 17 00:00:00 2001 From: Jianmin Zhu Date: Wed, 20 Jan 2021 15:18:47 +0800 Subject: [PATCH] qcacld-3.0: No Tx until WoW wake up event received With Change-Id: I7f38b3dc6975fcc208ad85e913564dfef5cc1cb7, Tx register write is permitted after hif bus resume during runtime pm resume, don't wait WMI_WOW_WAKEUP_HOST_EVENTID. In F/W, there is an race condition when exit from WOW, both WAL_TX_TID_TQM and WAL_TX_TID_TRANSITION_TO_TQM_ONGOING are not set yet, data frame is received from host, assert will hapen. To fix it, host tx register write shouldn't be permitted to update hp until receive the WMI_WOW_WAKEUP_HOST_EVENTID. Change-Id: Ic397652a9a0c4bc81667aed11805b2ce8070ee8d CRs-Fixed: 2858115 --- components/pmo/core/src/wlan_pmo_suspend_resume.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/pmo/core/src/wlan_pmo_suspend_resume.c b/components/pmo/core/src/wlan_pmo_suspend_resume.c index 4cfb15e20b98..f161097a9682 100644 --- a/components/pmo/core/src/wlan_pmo_suspend_resume.c +++ b/components/pmo/core/src/wlan_pmo_suspend_resume.c @@ -1029,6 +1029,8 @@ QDF_STATUS pmo_core_psoc_bus_runtime_suspend(struct wlan_objmgr_psoc *psoc, if (status != QDF_STATUS_SUCCESS) goto resume_htc; + hif_pm_set_link_state(hif_ctx, HIF_PM_LINK_STATE_DOWN); + status = pmo_core_psoc_bus_suspend_req(psoc, QDF_RUNTIME_SUSPEND, &wow_params); if (status != QDF_STATUS_SUCCESS) @@ -1047,7 +1049,6 @@ QDF_STATUS pmo_core_psoc_bus_runtime_suspend(struct wlan_objmgr_psoc *psoc, goto resume_hif; } - hif_pm_set_link_state(hif_ctx, HIF_PM_LINK_STATE_DOWN); if (pld_cb) { begin = qdf_get_log_timestamp_usecs(); ret = pld_cb(); @@ -1171,7 +1172,6 @@ QDF_STATUS pmo_core_psoc_bus_runtime_resume(struct wlan_objmgr_psoc *psoc, goto fail; } } - hif_pm_set_link_state(hif_ctx, HIF_PM_LINK_STATE_UP); if (hif_runtime_resume(hif_ctx)) { status = QDF_STATUS_E_FAILURE; @@ -1182,6 +1182,8 @@ QDF_STATUS pmo_core_psoc_bus_runtime_resume(struct wlan_objmgr_psoc *psoc, if (status != QDF_STATUS_SUCCESS) goto fail; + hif_pm_set_link_state(hif_ctx, HIF_PM_LINK_STATE_UP); + status = pmo_core_psoc_configure_resume(psoc, true); if (status != QDF_STATUS_SUCCESS) goto fail;