瀏覽代碼

qcacld-3.0: Move Enable detection of data stall events to DP component

Move change: Id4fd7f10f0806a39c5bdb7b8c097c26894dc5340
Enable detection of data stall events to DP component

Change-Id: I9eab2f29739cd0159f202a3a95f4a4baa70cb47d
CRs-Fixed: 3230891
Amit Mehta 2 年之前
父節點
當前提交
08f5a4c814

+ 16 - 0
components/dp/core/inc/wlan_dp_main.h

@@ -596,4 +596,20 @@ dp_is_low_tput_gro_enable(struct wlan_dp_psoc_context *dp_ctx)
 	return false;
 }
 #endif
+
+#define DP_DATA_STALL_ENABLE      BIT(0)
+#define DP_HOST_STA_TX_TIMEOUT    BIT(16)
+#define DP_HOST_SAP_TX_TIMEOUT    BIT(17)
+#define DP_HOST_NUD_FAILURE       BIT(18)
+#define DP_TIMEOUT_WLM_MODE       BIT(31)
+#define FW_DATA_STALL_EVT_MASK     0x8000FFFF
+
+/**
+ * dp_is_data_stall_event_enabled() - Check if data stall detection is enabled
+ * @evt: Data stall event to be checked
+ *
+ * Return: True if the data stall event is enabled
+ */
+bool dp_is_data_stall_event_enabled(uint32_t evt);
+
 #endif

+ 10 - 0
components/dp/core/src/wlan_dp_main.c

@@ -1508,3 +1508,13 @@ __dp_objmgr_put_vdev_by_user(struct wlan_objmgr_vdev *vdev,
 }
 #endif /* WLAN_OBJMGR_REF_ID_TRACE */
 
+bool dp_is_data_stall_event_enabled(uint32_t evt)
+{
+	uint32_t bitmap = cdp_cfg_get(cds_get_context(QDF_MODULE_ID_SOC),
+				      cfg_dp_enable_data_stall);
+
+	if (bitmap & DP_DATA_STALL_ENABLE || bitmap & evt)
+		return true;
+
+	return false;
+}

+ 1 - 1
components/dp/core/src/wlan_dp_softap_txrx.c

@@ -622,7 +622,7 @@ void dp_softap_tx_timeout(struct wlan_dp_intf *dp_intf)
 		dp_err("Detected data stall due to continuous TX timeouts");
 		dp_intf->dp_stats.tx_rx_stats.cont_txtimeout_cnt = 0;
 
-		if (cdp_cfg_get(soc, cfg_dp_enable_data_stall))
+		if (dp_is_data_stall_event_enabled(DP_HOST_SAP_TX_TIMEOUT))
 			cdp_post_data_stall_event(soc,
 					  DATA_STALL_LOG_INDICATOR_HOST_DRIVER,
 					  DATA_STALL_LOG_HOST_SOFTAP_TX_TIMEOUT,

+ 1 - 1
components/dp/core/src/wlan_dp_txrx.c

@@ -755,7 +755,7 @@ void dp_tx_timeout(struct wlan_dp_intf *dp_intf)
 		dp_err("Data stall due to continuous TX timeouts");
 		dp_intf->dp_stats.tx_rx_stats.cont_txtimeout_cnt = 0;
 
-		if (cdp_cfg_get(soc, cfg_dp_enable_data_stall))
+		if (dp_is_data_stall_event_enabled(DP_HOST_STA_TX_TIMEOUT))
 			cdp_post_data_stall_event(soc,
 					  DATA_STALL_LOG_INDICATOR_HOST_DRIVER,
 					  DATA_STALL_LOG_HOST_STA_TX_TIMEOUT,

+ 17 - 0
components/dp/dispatcher/inc/wlan_dp_ucfg_api.h

@@ -1155,4 +1155,21 @@ bool ucfg_dp_get_napi_enabled(struct wlan_objmgr_psoc *psoc);
  * Return: None
  */
 void ucfg_dp_set_tc_ingress_prio(struct wlan_objmgr_psoc *psoc, uint32_t value);
+
+/**
+ * ucfg_dp_nud_fail_data_stall_evt_enabled() - Check if NUD failuire data stall
+ * detection is enabled
+ *
+ * Return: True if the data stall event is enabled
+ */
+bool ucfg_dp_nud_fail_data_stall_evt_enabled(void);
+
+/**
+ * ucfg_dp_fw_data_stall_evt_enabled() - Check if Fw data stall
+ * detection is enabled
+ *
+ * Return: data stall event mask
+ */
+uint32_t ucfg_dp_fw_data_stall_evt_enabled(void);
+
 #endif /* _WLAN_DP_UCFG_API_H_ */

+ 11 - 0
components/dp/dispatcher/src/wlan_dp_ucfg_api.c

@@ -2076,3 +2076,14 @@ void ucfg_dp_set_tc_ingress_prio(struct wlan_objmgr_psoc *psoc, uint32_t value)
 	}
 	dp_ctx->dp_agg_param.tc_ingress_prio = value;
 }
+
+bool ucfg_dp_nud_fail_data_stall_evt_enabled(void)
+{
+	return dp_is_data_stall_event_enabled(DP_HOST_NUD_FAILURE);
+}
+
+uint32_t ucfg_dp_fw_data_stall_evt_enabled(void)
+{
+	return cdp_cfg_get(cds_get_context(QDF_MODULE_ID_SOC),
+			   cfg_dp_enable_data_stall) & FW_DATA_STALL_EVT_MASK;
+}

+ 0 - 16
core/hdd/inc/wlan_hdd_main.h

@@ -4699,20 +4699,4 @@ hdd_is_dynamic_set_mac_addr_allowed(struct hdd_adapter *adapter)
 }
 
 #endif /* WLAN_FEATURE_DYNAMIC_MAC_ADDR_UPDATE */
-
-#define HDD_DATA_STALL_ENABLE      BIT(0)
-#define HDD_HOST_STA_TX_TIMEOUT    BIT(16)
-#define HDD_HOST_SAP_TX_TIMEOUT    BIT(17)
-#define HDD_HOST_NUD_FAILURE       BIT(18)
-#define HDD_TIMEOUT_WLM_MODE       BIT(31)
-#define FW_DATA_STALL_EVT_MASK     0x8000FFFF
-
-/**
- * hdd_is_data_stall_event_enabled() - Check if data stall detection is enabled
- * @evt: Data stall event to be checked
- *
- * Return: True if the data stall event is enabled
- */
-bool hdd_is_data_stall_event_enabled(uint32_t evt);
-
 #endif /* end #if !defined(WLAN_HDD_MAIN_H) */

+ 1 - 14
core/hdd/src/wlan_hdd_main.c

@@ -13955,17 +13955,6 @@ static inline void hdd_cal_fail_send_event(uint8_t cal_type, uint8_t reason)
 }
 #endif
 
-bool hdd_is_data_stall_event_enabled(uint32_t evt)
-{
-	uint32_t bitmap = cdp_cfg_get(cds_get_context(QDF_MODULE_ID_SOC),
-				      cfg_dp_enable_data_stall);
-
-	if (bitmap & HDD_DATA_STALL_ENABLE || bitmap & evt)
-		return true;
-
-	return false;
-}
-
 /**
  * hdd_features_init() - Init features
  * @hdd_ctx:	HDD context
@@ -13998,9 +13987,7 @@ static int hdd_features_init(struct hdd_context *hdd_ctx)
 	ucfg_mlme_is_imps_enabled(hdd_ctx->psoc, &is_imps_enabled);
 	hdd_set_idle_ps_config(hdd_ctx, is_imps_enabled);
 
-	fw_data_stall_evt = cdp_cfg_get(cds_get_context(QDF_MODULE_ID_SOC),
-					cfg_dp_enable_data_stall) &
-			    FW_DATA_STALL_EVT_MASK;
+	fw_data_stall_evt = ucfg_dp_fw_data_stall_evt_enabled();
 
 	/* Send Enable/Disable data stall detection cmd to FW */
 	sme_cli_set_command(0, WMI_PDEV_PARAM_DATA_STALL_DETECT_ENABLE,

+ 1 - 1
core/hdd/src/wlan_hdd_nud_tracking.c

@@ -102,7 +102,7 @@ static void __hdd_nud_failure_work(struct hdd_adapter *adapter)
 		return;
 	}
 
-	if (soc && hdd_is_data_stall_event_enabled(HDD_HOST_NUD_FAILURE)) {
+	if (soc && ucfg_dp_nud_fail_data_stall_evt_enabled()) {
 		hdd_dp_err("Data stall due to NUD failure");
 		cdp_post_data_stall_event
 			(soc,

+ 1 - 1
os_if/dp/src/os_if_dp.c

@@ -1025,7 +1025,7 @@ int osif_dp_get_nud_stats(struct wiphy *wiphy,
 	arp_stats_params.vdev_id = ucfg_dp_get_intf_id(vdev);
 
 	/* send NUD failure event only when ARP tracking is enabled. */
-	if (cdp_cfg_get(soc, cfg_dp_enable_data_stall) &&
+	if (ucfg_dp_nud_fail_data_stall_evt_enabled() &&
 	    !ucfg_dp_nud_tracking_enabled(psoc) &&
 	    (pkt_type_bitmap & CONNECTIVITY_CHECK_SET_ARP)) {
 		QDF_TRACE(QDF_MODULE_ID_HDD_DATA, QDF_TRACE_LEVEL_ERROR,