qcacmn: Check for system PM state before SW2TCL HP update

In SAP mode, intrabss forwarding can happen when system
suspend is in progress. This could potentially result in
a scenario where SW2TCL HP update goes through after
WOW_ENABLE command is sent to FW.

Fix is to check for system PM states and do an explicit
system wakeup if tx packet gets enqueued to SW2TCL after
wow is enabled. Flush the SW2TCL HP on system resume.

Change-Id: I8dcd108b0dc1d703168f2f7a0ef0627e4dc0b103
CRs-Fixed: 3087727
此提交包含在:
Yeshwanth Sriram Guntuka
2021-12-02 11:53:01 +05:30
提交者 Madan Koyyalamudi
父節點 e5a33cd5b6
當前提交 454c7361e1
共有 3 個檔案被更改,包括 41 行新增3 行删除

查看文件

@@ -11926,7 +11926,7 @@ static struct cdp_mesh_latency_ops dp_ops_mesh_latency = {
};
#endif
#ifdef FEATURE_RUNTIME_PM
#if defined(DP_POWER_SAVE) || defined(FEATURE_RUNTIME_PM)
/**
* dp_flush_ring_hptp() - Update ring shadow
* register HP/TP address when runtime
@@ -11946,11 +11946,13 @@ void dp_flush_ring_hptp(struct dp_soc *soc, hal_ring_handle_t hal_srng)
hal_srng_access_end(soc->hal_soc, hal_srng);
hal_srng_set_flush_last_ts(hal_srng);
qdf_atomic_set(&soc->tx_pending_rtpm, 0);
dp_debug("flushed");
}
}
#endif
#ifdef FEATURE_RUNTIME_PM
/**
* dp_runtime_suspend() - ensure DP is ready to runtime suspend
* @soc_hdl: Datapath soc handle
@@ -11985,6 +11987,7 @@ static QDF_STATUS dp_runtime_suspend(struct cdp_soc_t *soc_hdl, uint8_t pdev_id)
HAL_SRNG_FLUSH_EVENT);
dp_flush_ring_hptp(soc, soc->tcl_data_ring[i].hal_srng);
}
qdf_atomic_set(&soc->tx_pending_rtpm, 0);
return QDF_STATUS_E_AGAIN;
}
@@ -12035,6 +12038,7 @@ static QDF_STATUS dp_runtime_resume(struct cdp_soc_t *soc_hdl, uint8_t pdev_id)
for (i = 0; i < MAX_TCL_DATA_RINGS; i++) {
dp_flush_ring_hptp(soc, soc->tcl_data_ring[i].hal_srng);
}
qdf_atomic_set(&soc->tx_pending_rtpm, 0);
dp_flush_ring_hptp(soc, soc->reo_cmd_ring.hal_srng);
dp_rx_fst_update_pm_suspend_status(soc, false);
@@ -12487,6 +12491,7 @@ static QDF_STATUS dp_bus_resume(struct cdp_soc_t *soc_hdl, uint8_t pdev_id)
{
struct dp_soc *soc = cdp_soc_t_to_dp_soc(soc_hdl);
struct dp_pdev *pdev = dp_get_pdev_from_soc_pdev_id_wifi3(soc, pdev_id);
uint8_t i;
if (qdf_unlikely(!pdev)) {
dp_err("pdev is NULL");
@@ -12501,6 +12506,9 @@ static QDF_STATUS dp_bus_resume(struct cdp_soc_t *soc_hdl, uint8_t pdev_id)
dp_resume_fse_cache_flush(soc);
for (i = 0; i < soc->num_tcl_data_rings; i++)
dp_flush_ring_hptp(soc, soc->tcl_data_ring[i].hal_srng);
return QDF_STATUS_SUCCESS;
}