From dabf6e13ee8bc4de2aa5161d4c954bed99482d15 Mon Sep 17 00:00:00 2001 From: Yu Tian Date: Sat, 15 Aug 2020 19:19:48 +0800 Subject: [PATCH] qcacmn: 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: I756d3127f75da8f0e6e303c1250c01ce0c6ac573 CRs-Fixed: 2756263 --- dp/inc/cdp_txrx_cmn.h | 14 ++++++++++++++ dp/inc/cdp_txrx_ops.h | 1 + 2 files changed, 15 insertions(+) diff --git a/dp/inc/cdp_txrx_cmn.h b/dp/inc/cdp_txrx_cmn.h index 4ffab66435..9dc5021fea 100644 --- a/dp/inc/cdp_txrx_cmn.h +++ b/dp/inc/cdp_txrx_cmn.h @@ -2651,4 +2651,18 @@ cdp_soc_config_full_mon_mode(ol_txrx_soc_handle soc, uint8_t val) return soc->ops->mon_ops->config_full_mon_mode(soc, val); } +/** + * cdp_rx_get_pending() - Get number of pending frames of RX threads + * @soc: opaque soc handle + * Return: number of pending frames + */ +static inline int +cdp_rx_get_pending(ol_txrx_soc_handle soc) +{ + if (!soc || !soc->ol_ops || + !soc->ol_ops->dp_rx_get_pending) + return 0; + + return soc->ol_ops->dp_rx_get_pending(soc); +} #endif /* _CDP_TXRX_CMN_H_ */ diff --git a/dp/inc/cdp_txrx_ops.h b/dp/inc/cdp_txrx_ops.h index f3a57944f3..753ae27cdb 100644 --- a/dp/inc/cdp_txrx_ops.h +++ b/dp/inc/cdp_txrx_ops.h @@ -1101,6 +1101,7 @@ struct ol_if_ops { uint8_t pdev_id); QDF_STATUS(*nss_stats_clr)(struct cdp_ctrl_objmgr_psoc *psoc, uint8_t vdev_id); + int (*dp_rx_get_pending)(ol_txrx_soc_handle soc); /* TODO: Add any other control path calls required to OL_IF/WMA layer */ };