Przeglądaj źródła

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
Yeshwanth Sriram Guntuka 4 lat temu
rodzic
commit
acbca27d9d
2 zmienionych plików z 28 dodań i 1 usunięć
  1. 27 1
      dp/wifi3.0/dp_mon_filter.c
  2. 1 0
      dp/wifi3.0/dp_types.h

+ 27 - 1
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);

+ 1 - 0
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