qcacld-3.0: Retry sending packets in htc queue

A race condition is observed when runtime suspend is aborted
due to pending TX packets but context switch happened and pm_state
did not revert to active state yet. In parallel, WMI_PEER_DELETE
command is queued but not sent as pm_state is still in suspending
state.
To fix this, schedule HTC queue kicker work to resend pending
commands again after dp_runtime_suspend aborts due
to pending TX packets.

Change-Id: I6d2c4140a4635c0aec304f48b15fb2b539ac39ea
CRs-Fixed: 2813657
This commit is contained in:
Ananya Gupta
2020-11-06 19:46:53 +05:30
committed by snandini
vanhempi d35c37dad5
commit b205491920

Näytä tiedosto

@@ -1001,7 +1001,7 @@ QDF_STATUS pmo_core_psoc_bus_runtime_suspend(struct wlan_objmgr_psoc *psoc,
ret = hif_pre_runtime_suspend(hif_ctx);
if (ret) {
status = qdf_status_from_os_return(ret);
goto runtime_failure;
goto pre_runtime_failure;
}
status = cdp_runtime_suspend(dp_soc, pdev_id);
@@ -1071,13 +1071,20 @@ pmo_resume_configure:
resume_htc:
PMO_CORE_PSOC_RUNTIME_PM_QDF_BUG(QDF_STATUS_SUCCESS !=
pmo_tgt_psoc_set_runtime_pm_inprogress(psoc, false));
PMO_CORE_PSOC_RUNTIME_PM_QDF_BUG(htc_runtime_resume(htc_ctx));
cdp_runtime_resume:
PMO_CORE_PSOC_RUNTIME_PM_QDF_BUG(QDF_STATUS_SUCCESS !=
cdp_runtime_resume(dp_soc, pdev_id));
/*
* A race condition was observed where htc_try_send was called before
* runtime pm state was set to active and it was not called again.
* Schedule HTC queue kicker here to send the pending commands.
*/
runtime_failure:
PMO_CORE_PSOC_RUNTIME_PM_QDF_BUG(htc_runtime_resume(htc_ctx));
pre_runtime_failure:
hif_process_runtime_suspend_failure(hif_ctx);
dec_psoc_ref: