From 65e41683c8a13f0b5dba21c4634891f09d403434 Mon Sep 17 00:00:00 2001 From: Yeshwanth Sriram Guntuka Date: Thu, 19 Nov 2020 14:37:52 +0530 Subject: [PATCH] qcacmn: Reset RXDMA_BUF ring filters when mon mode is disabled Rxdma err destination could still grow even after monitor status ring filters are reset as part of monitor mode disablement which will result in RXDMA2SW ring back-pressure. Fix is to reset RXDMA_BUF ring filters when monitor mode is disabled. Change-Id: Ifd56f6bdbf6a5e4c5d39fc5c71dd85925e3d5f33 CRs-Fixed: 2818011 --- dp/wifi3.0/dp_mon_filter.c | 28 +++++++++++++++++++++++++++- dp/wifi3.0/dp_types.h | 1 + 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/dp/wifi3.0/dp_mon_filter.c b/dp/wifi3.0/dp_mon_filter.c index 0aa389c24bf1..74b8a394ea81 100644 --- a/dp/wifi3.0/dp_mon_filter.c +++ b/dp/wifi3.0/dp_mon_filter.c @@ -998,6 +998,32 @@ void dp_mon_filter_reset_rx_pkt_log_lite(struct dp_pdev *pdev) } #endif /* WDI_EVENT_ENABLE */ +#ifdef WLAN_DP_RESET_MON_BUF_RING_FILTER +/** + * dp_mon_should_reset_buf_ring_filter() - Reset the monitor buf ring filter + * @soc: global DP soc handle + * + * WIN has targets which does not support monitor mode, but still do the + * monitor mode init/deinit, only the rxdma1_enable flag will be set to 0. + * MCL need to do the monitor buffer ring filter reset always, but this is + * not needed for WIN targets where rxdma1 is not enabled (the indicator + * that monitor mode is not enabled. + * This function is used as WAR till WIN cleans up the monitor mode + * function for targets where monitor mode is not enabled. + * + * Returns: true + */ +static inline bool dp_mon_should_reset_buf_ring_filter(struct dp_soc *soc) +{ + return true; +} +#else +static inline bool dp_mon_should_reset_buf_ring_filter(struct dp_soc *soc) +{ + return false; +} +#endif + /** * dp_mon_filter_update() - Setup the monitor filter setting for a srng * type @@ -1044,7 +1070,7 @@ QDF_STATUS dp_mon_filter_update(struct dp_pdev *pdev) dp_mon_filter_ht2_setup(soc, pdev, mon_srng_type, &filter); mon_mode_set = filter.valid; - if (mon_mode_set) { + if (dp_mon_should_reset_buf_ring_filter(soc) || mon_mode_set) { status = dp_mon_ht2_rx_ring_cfg(soc, pdev, mon_srng_type, &filter.tlv_filter); diff --git a/dp/wifi3.0/dp_types.h b/dp/wifi3.0/dp_types.h index a44c4272a182..34e57e353dfa 100644 --- a/dp/wifi3.0/dp_types.h +++ b/dp/wifi3.0/dp_types.h @@ -75,6 +75,7 @@ #if defined(WLAN_MAX_PDEVS) && (WLAN_MAX_PDEVS == 1) #define MAX_PDEV_CNT 1 +#define WLAN_DP_RESET_MON_BUF_RING_FILTER #else #define MAX_PDEV_CNT 3 #endif