qcacld-3.0: Add RX frame pending check for WoW

Sometimes frames are queued to dp_rx_thread wait queue
during WoW suspend in progress. At this time dp_rx_thread
is in SUSPEND state and these frames can't deliver to Linux
Stack, for ICMP case, if no other frames come to wake up
system, ICMP timeout will happen. Add a RX suspend check
in WoW to avoid suspend when frame comes before WMI_WOW_ENABLE
sends to FW

Change-Id: I3d37e6d6ce8f7f6edaf5f78bf5cef77bee6ed5c6
CRs-Fixed: 2755583
This commit is contained in:
Yu Tian 2020-08-15 19:12:44 +08:00 • committed by snandini
commit 6001ff7264
5 changed files with 75 additions and 1 deletions

View file

@ -961,6 +961,7 @@ QDF_STATUS pmo_core_psoc_bus_runtime_suspend(struct wlan_objmgr_psoc *psoc,
int ret;
struct pmo_wow_enable_params wow_params = {0};
qdf_time_t begin, end;
int pending;
pmo_enter();
@ -1026,6 +1027,13 @@ QDF_STATUS pmo_core_psoc_bus_runtime_suspend(struct wlan_objmgr_psoc *psoc,
goto pmo_bus_resume;
}
pending = cdp_rx_get_pending(cds_get_context(QDF_MODULE_ID_SOC));
if (pending) {
pmo_debug("Prevent suspend, RX frame pending %d", pending);
status = QDF_STATUS_E_BUSY;
goto resume_hif;
}
if (pld_cb) {
begin = qdf_get_log_timestamp_usecs();
ret = pld_cb();