Browse Source

qcacld-3.0: Relocate HDD DP ini items

Relocate below HDD DP ini items as per convergedinfrastructure.

1. enable_dp_trace
2. gDptraceConfig
3. gEnableNUDTracking

Change-Id: I1938c3f5ab8164e792cb9b1c76e6afa79444bd6f
CRs-Fixed: 2347598
jitiphil 6 years ago
parent
commit
b03ae08244
4 changed files with 122 additions and 80 deletions
  1. 75 5
      core/hdd/inc/hdd_dp_cfg.h
  2. 8 50
      core/hdd/inc/wlan_hdd_cfg.h
  3. 0 23
      core/hdd/src/wlan_hdd_cfg.c
  4. 39 2
      core/hdd/src/wlan_hdd_tx_rx.c

+ 75 - 5
core/hdd/inc/hdd_dp_cfg.h

@@ -831,6 +831,76 @@
 #define CFG_DP_ENABLE_TCP_PARAM_UPDATE \
 		CFG_INI_BOOL("enable_tcp_param_update", \
 		false, "configure TCP param through Wi-Fi HAL")
+/*
+ * <ini>
+ *
+ * Enable/disable DPTRACE
+ * Enabling this might have performace impact.
+ *
+ * Config DPTRACE
+ * The sequence of params is important. If some param is missing, defaults are
+ * considered.
+ * Param 1: Enable/Disable DP Trace live mode (uint8_t)
+ * Param 2: DP Trace live mode high bandwidth thresh.(uint8_t)
+ *         (packets/second) beyond which DP Trace is disabled. Decimal Val.
+ *          MGMT, DHCP, EAPOL, ARP pkts are not counted. ICMP and Data are.
+ * Param 3: Default Verbosity (0-4)
+ * Param 4: Proto Bitmap (uint8_t). Decimal Value.
+ *          (decimal 62 = 0x3e)
+ * e.g., to disable live mode, use the following param in the ini file.
+ * gDptraceConfig = 0
+ * e.g., to enable dptrace live mode and set the thresh as 6,
+ * use the following param in the ini file.
+ * gDptraceConfig = 1, 6
+ *
+ * </ini>
+ */
+#ifdef CONFIG_DP_TRACE
+#define CFG_DP_ENABLE_DP_TRACE \
+			CFG_INI_BOOL("enable_dp_trace", \
+			true, "Ctrl to enable dp trace feature")
+
+#define CFG_DP_DP_TRACE_CONFIG \
+		CFG_INI_STRING( \
+		"gDptraceConfig", \
+		1, \
+		20, \
+		"1, 6, 2, 126", \
+		"dp trace configuration string")
+#define CFG_DP_CONFIG_DP_TRACE_ALL \
+		CFG(CFG_DP_ENABLE_DP_TRACE) \
+		CFG(CFG_DP_DP_TRACE_CONFIG)
+#else
+#define CFG_DP_CONFIG_DP_TRACE_ALL
+#endif
+
+/*
+ * <ini>
+ * gEnableNUDTracking - Will enable or disable NUD tracking within driver
+ * @Min: 0
+ * @Max: 1
+ * @Default: 1
+ *
+ * This ini is used to enable or disable NUD tracking within driver
+ *
+ * Related: None
+ *
+ * Supported Feature: STA
+ *
+ * Usage: External
+ *
+ * <ini>
+ */
+#ifdef WLAN_NUD_TRACKING
+#define CFG_DP_ENABLE_NUD_TRACKING \
+		CFG_INI_BOOL("gEnableNUDTracking", \
+		true, "Ctrl to enable nud tracking")
+
+#define CFG_DP_ENABLE_NUD_TRACKING_ALL \
+			CFG(CFG_DP_ENABLE_NUD_TRACKING)
+#else
+#define CFG_DP_ENABLE_NUD_TRACKING_ALL
+#endif
 
 #ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL
 #define CFG_HDD_DP_LEGACY_TX_FLOW \
@@ -864,7 +934,7 @@
 #define CFG_HDD_DP_MSM_PLATFORM
 #endif
 
-#define CFG_HDD_DP \
+#define CFG_HDD_DP_ALL \
 	CFG(CFG_DP_NAPI_CE_CPU_MASK) \
 	CFG(CFG_DP_RX_THREAD_CPU_MASK) \
 	CFG(CFG_DP_RPS_RX_QUEUE_CPU_MAP_LIST) \
@@ -876,9 +946,9 @@
 	CFG(CFG_DP_FILTER_MULTICAST_REPLAY) \
 	CFG(CFG_DP_RX_WAKELOCK_TIMEOUT) \
 	CFG(CFG_DP_NUM_DP_RX_THREADS) \
-	CFG_DP_ENABLE_FASTPATH_ALL
-#define CFG_HDD_DP_ALL \
-	CFG_HDD_DP \
+	CFG_DP_ENABLE_FASTPATH_ALL \
 	CFG_HDD_DP_MSM_PLATFORM \
-	CFG_HDD_DP_LEGACY_TX_FLOW
+	CFG_HDD_DP_LEGACY_TX_FLOW \
+	CFG_DP_ENABLE_NUD_TRACKING_ALL \
+	CFG_DP_CONFIG_DP_TRACE_ALL
 #endif

+ 8 - 50
core/hdd/inc/wlan_hdd_cfg.h

@@ -90,31 +90,6 @@ struct hdd_context;
 #define CFG_ENABLE_CONNECTED_SCAN_MAX         (1)
 #define CFG_ENABLE_CONNECTED_SCAN_DEFAULT     (1)
 
-#ifdef WLAN_NUD_TRACKING
-/*
- * <ini>
- * gEnableNUDTracking - Will enable or disable NUD tracking within driver
- * @Min: 0
- * @Max: 1
- * @Default: 1
- *
- * This ini is used to enable or disable NUD tracking within driver
- *
- * Related: None
- *
- * Supported Feature: STA
- *
- * Usage: External
- *
- * <ini>
- */
-
-#define CFG_ENABLE_NUD_TRACKING_NAME            "gEnableNUDTracking"
-#define CFG_ENABLE_NUD_TRACKING_MIN             (0)
-#define CFG_ENABLE_NUD_TRACKING_MAX             (1)
-#define CFG_ENABLE_NUD_TRACKING_DEFAULT         (1)
-#endif
-
 /*
  * <ini>
  * gOperatingChannel- Default STA operating channel
@@ -133,7 +108,6 @@ struct hdd_context;
  *
  * <ini>
  */
-
 #define CFG_OPERATING_CHANNEL_NAME             "gOperatingChannel"
 #define CFG_OPERATING_CHANNEL_MIN              (0)
 #define CFG_OPERATING_CHANNEL_MAX              (14)
@@ -4396,23 +4370,7 @@ enum hdd_link_speed_rpt_type {
 
 /* Default verbosity, in case its missing in gDptraceConfig string*/
 #define DP_TRACE_CONFIG_DEFAULT_VERBOSTY QDF_DP_TRACE_VERBOSITY_LOW
-/*
- * Config DPTRACE
- * The sequence of params is important. If some param is missing, defaults are
- * considered.
- * Param 1: Enable/Disable DP Trace live mode (uint8_t)
- * Param 2: DP Trace live mode high bandwidth thresh.(uint8_t)
- *         (packets/second) beyond which DP Trace is disabled. Decimal Val.
- *          MGMT, DHCP, EAPOL, ARP pkts are not counted. ICMP and Data are.
- * Param 3: Default Verbosity (0-4)
- * Param 4: Proto Bitmap (uint8_t). Decimal Value.
- *          (decimal 62 = 0x3e)
- * e.g., to disable live mode, use the following param in the ini file.
- * gDptraceConfig = 0
- * e.g., to enable dptrace live mode and set the thresh as 6,
- * use the following param in the ini file.
- * gDptraceConfig = 1, 6
- */
+
 #define CFG_ENABLE_DP_TRACE_CONFIG		"gDptraceConfig"
 #define CFG_ENABLE_DP_TRACE_CONFIG_DEFAULT	"1, 6, 2, 126"
 #endif
@@ -6159,9 +6117,6 @@ struct hdd_config {
 	DECLARE_BITMAP(bExplicitCfg, MAX_CFG_INI_ITEMS);
 
 	/* Config parameters */
-#ifdef WLAN_NUD_TRACKING
-	bool enable_nud_tracking;
-#endif
 	bool enable_connected_scan;
 	uint8_t OperatingChannel;
 	bool Is11dSupportEnabled;
@@ -6451,10 +6406,6 @@ struct hdd_config {
 	uint32_t roam_bg_scan_client_bitmap;
 
 	bool apf_enabled;
-#ifdef CONFIG_DP_TRACE
-	bool enable_dp_trace;
-	uint8_t dp_trace_config[DP_TRACE_CONFIG_STRING_LENGTH];
-#endif
 	bool adaptive_dwell_mode_enabled;
 	enum scan_dwelltime_adaptive_mode scan_adaptive_dwell_mode;
 	enum scan_dwelltime_adaptive_mode scan_adaptive_dwell_mode_nc;
@@ -6604,6 +6555,13 @@ struct hdd_config {
 	bool multicast_replay_filter;
 	uint32_t rx_wakelock_timeout;
 	uint8_t num_dp_rx_threads;
+#ifdef CONFIG_DP_TRACE
+	bool enable_dp_trace;
+	uint8_t dp_trace_config[DP_TRACE_CONFIG_STRING_LENGTH];
+#endif
+#ifdef WLAN_NUD_TRACKING
+	bool enable_nud_tracking;
+#endif
 };
 
 #define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var))

+ 0 - 23
core/hdd/src/wlan_hdd_cfg.c

@@ -346,15 +346,6 @@ cb_notify_set_roam_scan_hi_rssi_scan_params(struct hdd_context *hdd_ctx,
 
 
 struct reg_table_entry g_registry_table[] = {
-#ifdef WLAN_NUD_TRACKING
-	REG_VARIABLE(CFG_ENABLE_NUD_TRACKING_NAME, WLAN_PARAM_Integer,
-		     struct hdd_config, enable_nud_tracking,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_ENABLE_NUD_TRACKING_DEFAULT,
-		     CFG_ENABLE_NUD_TRACKING_MIN,
-		     CFG_ENABLE_NUD_TRACKING_MAX),
-#endif
-
 	REG_VARIABLE(CFG_ENABLE_CONNECTED_SCAN_NAME, WLAN_PARAM_Integer,
 		     struct hdd_config, enable_connected_scan,
 		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -1770,20 +1761,6 @@ struct reg_table_entry g_registry_table[] = {
 		CFG_CREATE_BUG_REPORT_FOR_SCAN_DISABLE,
 		CFG_CREATE_BUG_REPORT_FOR_SCAN_ENABLE),
 
-#ifdef CONFIG_DP_TRACE
-	REG_VARIABLE(CFG_ENABLE_DP_TRACE, WLAN_PARAM_Integer,
-		struct hdd_config, enable_dp_trace,
-		VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		CFG_ENABLE_DP_TRACE_DEFAULT,
-		CFG_ENABLE_DP_TRACE_MIN,
-		CFG_ENABLE_DP_TRACE_MAX),
-
-	REG_VARIABLE_STRING(CFG_ENABLE_DP_TRACE_CONFIG, WLAN_PARAM_String,
-			struct hdd_config, dp_trace_config,
-			VAR_FLAGS_OPTIONAL,
-			(void *) CFG_ENABLE_DP_TRACE_CONFIG_DEFAULT),
-#endif
-
 	REG_VARIABLE(CFG_ADAPTIVE_SCAN_DWELL_MODE_NAME, WLAN_PARAM_Integer,
 		struct hdd_config, scan_adaptive_dwell_mode,
 		VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,

+ 39 - 2
core/hdd/src/wlan_hdd_tx_rx.c

@@ -2782,11 +2782,46 @@ static void hdd_set_rx_mode_value(struct hdd_context *hdd_ctx)
 		  hdd_ctx->rps, hdd_ctx->dynamic_rps);
 }
 
+#ifdef CONFIG_DP_TRACE
+static void
+hdd_dp_dp_trace_cfg_update(struct hdd_config *config,
+			   struct wlan_objmgr_psoc *psoc)
+{
+	qdf_size_t array_out_size;
+
+	config->enable_dp_trace = cfg_get(psoc, CFG_DP_ENABLE_DP_TRACE);
+	qdf_uint8_array_parse(cfg_get(psoc, CFG_DP_DP_TRACE_CONFIG),
+			      config->dp_trace_config,
+			      sizeof(config->dp_trace_config), &array_out_size);
+}
+#else
+static void
+hdd_dp_dp_trace_cfg_update(struct hdd_config *config,
+			   struct wlan_objmgr_psoc *psoc)
+{
+}
+#endif
+
+#ifdef WLAN_NUD_TRACKING
+static void
+hdd_dp_nud_tracking_cfg_update(struct hdd_config *config,
+			       struct wlan_objmgr_psoc *psoc)
+{
+	config->enable_nud_tracking = cfg_get(psoc, CFG_DP_ENABLE_NUD_TRACKING);
+}
+#else
+static void
+hdd_dp_nud_tracking_cfg_update(struct hdd_config *config,
+			       struct wlan_objmgr_psoc *psoc)
+{
+}
+#endif
+
 void hdd_dp_cfg_update(struct wlan_objmgr_psoc *psoc,
 		       struct hdd_context *hdd_ctx)
 {
 	struct hdd_config *config;
-	qdf_size_t cpu_map_list_len;
+	qdf_size_t array_out_size;
 
 	config = hdd_ctx->config;
 	hdd_ini_tx_flow_control(config, psoc);
@@ -2798,7 +2833,7 @@ void hdd_dp_cfg_update(struct wlan_objmgr_psoc *psoc,
 		cfg_get(psoc, CFG_DP_RX_THREAD_CPU_MASK);
 	qdf_uint8_array_parse(cfg_get(psoc, CFG_DP_RPS_RX_QUEUE_CPU_MAP_LIST),
 			      config->cpu_map_list,
-			      sizeof(config->cpu_map_list), &cpu_map_list_len);
+			      sizeof(config->cpu_map_list), &array_out_size);
 	config->tx_orphan_enable = cfg_get(psoc, CFG_DP_TX_ORPHAN_ENABLE);
 	config->rx_mode = cfg_get(psoc, CFG_DP_RX_MODE);
 	hdd_set_rx_mode_value(hdd_ctx);
@@ -2807,4 +2842,6 @@ void hdd_dp_cfg_update(struct wlan_objmgr_psoc *psoc,
 	config->rx_wakelock_timeout =
 		cfg_get(psoc, CFG_DP_RX_WAKELOCK_TIMEOUT);
 	config->num_dp_rx_threads = cfg_get(psoc, CFG_DP_NUM_DP_RX_THREADS);
+	hdd_dp_dp_trace_cfg_update(config, psoc);
+	hdd_dp_nud_tracking_cfg_update(config, psoc);
 }