瀏覽代碼

qcacld-3.0: Move multiple INIs to HDD component INIs

Move the following INIs definition from current definition to new
HDD component model INI definitions in hdd_config.h.

gOperatingChannel
gNumVdevs
gEnableConcurrentSTA
gdbs_scan_selection

Change-Id: Id65ca1ff1954af2d220e7221bfc5181e04b3c63d
CRs-Fixed: 2354920
Vignesh Viswanathan 6 年之前
父節點
當前提交
a0358ff55b
共有 4 個文件被更改,包括 121 次插入122 次删除
  1. 105 0
      core/hdd/inc/hdd_config.h
  2. 4 93
      core/hdd/inc/wlan_hdd_cfg.h
  3. 0 26
      core/hdd/src/wlan_hdd_cfg.c
  4. 12 3
      core/hdd/src/wlan_hdd_main.c

+ 105 - 0
core/hdd/inc/hdd_config.h

@@ -23,6 +23,8 @@
 #ifndef __HDD_CONFIG_H
 #define __HDD_CONFIG_H
 
+#include "wlan_tgt_def_config_hl.h"
+
 /**
  * enum hdd_wext_control - knob for wireless extensions
  * @hdd_wext_disabled - interface is completely disabled. An access
@@ -334,16 +336,119 @@ enum hdd_wext_control {
 #define CFG_ENABLE_PACKET_LOG_ALL
 #endif
 
+/*
+ * <ini>
+ * gOperatingChannel- Default STA operating channel
+ * @Min: 0
+ * @Max: 14
+ * @Default: 1
+ *
+ * This ini is used to specify the default operating channel of a STA during
+ * initialization.
+ *
+ * Related: None
+ *
+ * Supported Feature: STA
+ *
+ * Usage: External
+ *
+ * <ini>
+ */
+#define CFG_OPERATING_CHANNEL CFG_INI_UINT( \
+			"gOperatingChannel", \
+			0, \
+			14, \
+			1, \
+			CFG_VALUE_OR_DEFAULT, \
+			"Default Operating Channel")
+
+/*
+ * <ini>
+ * gNumVdevs - max number of VDEVs supported
+ *
+ * @Min: 0x1
+ * @Max: 0x4
+ * @Default: CFG_TGT_NUM_VDEV
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_NUM_VDEV_ENABLE CFG_INI_UINT( \
+		"gNumVdevs", \
+		1, \
+		4, \
+		CFG_TGT_NUM_VDEV, \
+		CFG_VALUE_OR_DEFAULT, \
+		"Number of VDEVs")
+
+#define CFG_CONCURRENT_IFACE_MAX_LEN 16
+/*
+ * <ini>
+ * gEnableConcurrentSTA - This will control the creation of concurrent STA
+ * interface
+ * @Default: NULL
+ *
+ * This ini is used for providing control to create a concurrent STA session
+ * along with the creation of wlan0 and p2p0. The name of the interface is
+ * specified as the parameter
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_ENABLE_CONCURRENT_STA CFG_INI_STRING( \
+		"gEnableConcurrentSTA", \
+		0, \
+		CFG_CONCURRENT_IFACE_MAX_LEN, \
+		"", \
+		"Enable Concurrent STA")
+
+#define CFG_DBS_SCAN_PARAM_LENGTH 42
+/*
+ * <ini>
+ * gdbs_scan_selection - DBS Scan Selection.
+ * @Default: ""
+ *
+ * This ini is used to enable DBS scan selection.
+ * Example
+ * @Value: "5,2,2,16,2,2"
+ * 1st argument is module_id, 2nd argument is number of DBS scan,
+ * 3rd argument is number of non-DBS scan,
+ * and other arguments follows.
+ * 5,2,2,16,2,2 means:
+ * 5 is module id, 2 is num of DBS scan, 2 is num of non-DBS scan.
+ * 16 is module id, 2 is num of DBS scan, 2 is num of non-DBS scan.
+ *
+ * Related: None.
+ *
+ * Supported Feature: DBS Scan
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_DBS_SCAN_SELECTION CFG_INI_STRING( \
+			"gdbs_scan_selection", \
+			0, \
+			CFG_DBS_SCAN_PARAM_LENGTH, \
+			"", \
+			"DBS Scan Selection")
+
 #define CFG_HDD_ALL \
 	CFG_ENABLE_PACKET_LOG_ALL \
 	CFG_WLAN_AUTO_SHUTDOWN_ALL \
 	CFG_WLAN_LOGGING_SUPPORT_ALL \
 	CFG(CFG_BUG_ON_REINIT_FAILURE) \
+	CFG(CFG_DBS_SCAN_SELECTION) \
+	CFG(CFG_ENABLE_CONCURRENT_STA) \
 	CFG(CFG_ENABLE_FW_LOG) \
 	CFG(CFG_ENABLE_FW_UART_PRINT) \
 	CFG(CFG_ENABLE_RAMDUMP_COLLECTION) \
 	CFG(CFG_INTERFACE_CHANGE_WAIT) \
 	CFG(CFG_MULTICAST_HOST_FW_MSGS) \
+	CFG(CFG_NUM_VDEV_ENABLE) \
+	CFG(CFG_OPERATING_CHANNEL) \
 	CFG(CFG_PRIVATE_WEXT_CONTROL) \
 	CFG(CFG_TIMER_MULTIPLIER)
 #endif

+ 4 - 93
core/hdd/inc/wlan_hdd_cfg.h

@@ -53,13 +53,9 @@ struct hdd_context;
 #define IPADDR_STRING_LENGTH   (16)
 #endif
 
-#define CFG_DBS_SCAN_PARAM_LENGTH          (42)
-
 /* Number of items that can be configured */
 #define MAX_CFG_INI_ITEMS   1024
 
-#define CFG_CONCURRENT_IFACE_MAX_LEN 16
-
 #define CFG_TX_AGGREGATION_SIZE_MIN  0
 #define CFG_TX_AGGREGATION_SIZE_MAX  64
 #define CFG_RX_AGGREGATION_SIZE_MIN  1
@@ -90,29 +86,6 @@ struct hdd_context;
 #define CFG_ENABLE_CONNECTED_SCAN_MAX         (1)
 #define CFG_ENABLE_CONNECTED_SCAN_DEFAULT     (1)
 
-/*
- * <ini>
- * gOperatingChannel- Default STA operating channel
- * @Min: 0
- * @Max: 14
- * @Default: 1
- *
- * This ini is used to specify the default operating channel of a STA during
- * initialization.
- *
- * Related: None
- *
- * Supported Feature: STA
- *
- * Usage: External
- *
- * <ini>
- */
-#define CFG_OPERATING_CHANNEL_NAME             "gOperatingChannel"
-#define CFG_OPERATING_CHANNEL_MIN              (0)
-#define CFG_OPERATING_CHANNEL_MAX              (14)
-#define CFG_OPERATING_CHANNEL_DEFAULT          (1)
-
 /*
  * <ini>
  * g11dSupportEnabled - Enable/Disable 11d support
@@ -3296,24 +3269,6 @@ enum hdd_link_speed_rpt_type {
 #define CFG_ENABLE_FW_MODULE_LOG_LEVEL    "gFwDebugModuleLoglevel"
 #define CFG_ENABLE_FW_MODULE_LOG_DEFAULT  "2,1,3,1,5,1,9,1,13,1,14,1,18,1,19,1,26,1,28,1,29,1,31,1,36,1,38,1,46,1,47,1,50,1,52,1,53,1,56,1,60,1,61,1,4,1"
 
-/*
- * <ini>
- * gEnableConcurrentSTA - This will control the creation of concurrent STA
- * interface
- * @Default: NULL
- *
- * This ini is used for providing control to create a concurrent STA session
- * along with the creation of wlan0 and p2p0. The name of the interface is
- * specified as the parameter
- *
- * Usage: Internal/External
- *
- * </ini>
- */
-
-#define CFG_ENABLE_CONCURRENT_STA           "gEnableConcurrentSTA"
-#define CFG_ENABLE_CONCURRENT_STA_DEFAULT   ""
-
 /*
  * QDF Trace Enable Control
  * Notes:
@@ -4186,32 +4141,6 @@ enum hdd_link_speed_rpt_type {
 #define CFG_DUAL_MAC_FEATURE_DISABLE_MAX          (6)
 #define CFG_DUAL_MAC_FEATURE_DISABLE_DEFAULT      (0)
 
-/*
- * <ini>
- * gdbs_scan_selection - DBS Scan Selection.
- * @Default: ""
- *
- * This ini is used to enable DBS scan selection.
- * Example
- * @Value: "5,2,2,16,2,2"
- * 1st argument is module_id, 2nd argument is number of DBS scan,
- * 3rd argument is number of non-DBS scan,
- * and other arguments follows.
- * 5,2,2,16,2,2 means:
- * 5 is module id, 2 is num of DBS scan, 2 is num of non-DBS scan.
- * 16 is module id, 2 is num of DBS scan, 2 is num of non-DBS scan.
- *
- * Related: None.
- *
- * Supported Feature: DBS Scan
- *
- * Usage: Internal/External
- *
- * </ini>
- */
-#define CFG_DBS_SCAN_SELECTION_NAME          "gdbs_scan_selection"
-#define CFG_DBS_SCAN_SELECTION_DEFAULT       ""
-
 /*
  * <ini>
  * g_sta_sap_scc_on_dfs_chan - Allow STA+SAP SCC on DFS channel with master
@@ -6015,23 +5944,6 @@ enum hdd_link_speed_rpt_type {
 #define CFG_ENABLE_SECONDARY_RATE_MAX           (0x3F)
 #define CFG_ENABLE_SECONDARY_RATE_DEFAULT       (0x17)
 
-/*
- * <ini>
- * gNumVdevs - max number of VDEVs supported
- *
- * @Min: 0x1
- * @Max: 0x4
- * @Default: CFG_TGT_NUM_VDEV
- *
- * Usage: External
- *
- * </ini>
- */
-#define CFG_NUM_VDEV_ENABLE_NAME      "gNumVdevs"
-#define CFG_NUM_VDEV_ENABLE_MIN       (0x1)
-#define CFG_NUM_VDEV_ENABLE_MAX       (0x4)
-#define CFG_NUM_VDEV_ENABLE_DEFAULT   (CFG_TGT_NUM_VDEV)
-
 #ifdef MWS_COEX
 /*
  * <ini>
@@ -6118,7 +6030,6 @@ struct hdd_config {
 
 	/* Config parameters */
 	bool enable_connected_scan;
-	uint8_t OperatingChannel;
 	bool Is11dSupportEnabled;
 	bool Is11hSupportEnabled;
 	char PowerUsageControl[4];
@@ -6224,8 +6135,6 @@ struct hdd_config {
 
 	uint32_t DelayedTriggerFrmInt;
 
-	char enableConcurrentSTA[CFG_CONCURRENT_IFACE_MAX_LEN];
-
 #ifdef FEATURE_RUNTIME_PM
 	bool runtime_pm;
 #endif
@@ -6377,7 +6286,6 @@ struct hdd_config {
 	uint8_t max_scan_count;
 	bool etsi13_srd_chan_in_master_mode;
 	uint32_t dual_mac_feature_disable;
-	uint8_t dbs_scan_selection[CFG_DBS_SCAN_PARAM_LENGTH];
 	uint32_t sta_sap_scc_on_dfs_chan;
 	uint32_t sta_sap_scc_on_lte_coex_chan;
 	uint16_t  self_gen_frm_pwr;
@@ -6478,7 +6386,6 @@ struct hdd_config {
 	uint32_t btm_solicited_timeout;
 	uint32_t btm_max_attempt_cnt;
 	uint32_t btm_sticky_time;
-	uint32_t num_vdevs;
 	uint32_t offload_11k_enable_bitmask;
 	uint32_t neighbor_report_offload_params_bitmask;
 	uint32_t neighbor_report_offload_time_offset;
@@ -6562,6 +6469,10 @@ struct hdd_config {
 #ifdef WLAN_NUD_TRACKING
 	bool enable_nud_tracking;
 #endif
+	uint8_t operating_channel;
+	uint8_t num_vdevs;
+	uint8_t enable_concurrent_sta[CFG_CONCURRENT_IFACE_MAX_LEN];
+	uint8_t dbs_scan_selection[CFG_DBS_SCAN_PARAM_LENGTH];
 };
 
 #define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var))

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

@@ -353,13 +353,6 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_ENABLE_CONNECTED_SCAN_MIN,
 		     CFG_ENABLE_CONNECTED_SCAN_MAX),
 
-	REG_VARIABLE(CFG_OPERATING_CHANNEL_NAME, WLAN_PARAM_Integer,
-		     struct hdd_config, OperatingChannel,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_OPERATING_CHANNEL_DEFAULT,
-		     CFG_OPERATING_CHANNEL_MIN,
-		     CFG_OPERATING_CHANNEL_MAX),
-
 	REG_VARIABLE(CFG_11D_SUPPORT_ENABLED_NAME, WLAN_PARAM_Integer,
 		     struct hdd_config, Is11dSupportEnabled,
 		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
@@ -1525,11 +1518,6 @@ struct reg_table_entry g_registry_table[] = {
 			    VAR_FLAGS_OPTIONAL,
 			    (void *)CFG_ENABLE_FW_MODULE_LOG_DEFAULT),
 
-	REG_VARIABLE_STRING(CFG_ENABLE_CONCURRENT_STA, WLAN_PARAM_String,
-			    struct hdd_config, enableConcurrentSTA,
-			    VAR_FLAGS_NONE,
-			    (void *)CFG_ENABLE_CONCURRENT_STA_DEFAULT),
-
 	REG_VARIABLE(CFG_IGNORE_CAC_NAME, WLAN_PARAM_Integer,
 		     struct hdd_config, ignoreCAC,
 		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -1640,11 +1628,6 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_DUAL_MAC_FEATURE_DISABLE_MIN,
 		     CFG_DUAL_MAC_FEATURE_DISABLE_MAX),
 
-	REG_VARIABLE_STRING(CFG_DBS_SCAN_SELECTION_NAME, WLAN_PARAM_String,
-		     struct hdd_config, dbs_scan_selection,
-		     VAR_FLAGS_OPTIONAL,
-		     (void *)CFG_DBS_SCAN_SELECTION_DEFAULT),
-
 	REG_VARIABLE(CFG_STA_SAP_SCC_ON_DFS_CHAN, WLAN_PARAM_HexInteger,
 		     struct hdd_config, sta_sap_scc_on_dfs_chan,
 		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -2232,14 +2215,6 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_ROAM_FORCE_RSSI_TRIGGER_MIN,
 		     CFG_ROAM_FORCE_RSSI_TRIGGER_MAX),
 
-	REG_VARIABLE(CFG_NUM_VDEV_ENABLE_NAME,
-		     WLAN_PARAM_HexInteger,
-		     struct hdd_config, num_vdevs,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_NUM_VDEV_ENABLE_DEFAULT,
-		     CFG_NUM_VDEV_ENABLE_MIN,
-		     CFG_NUM_VDEV_ENABLE_MAX),
-
 	REG_VARIABLE(CFG_CHANGE_CHANNEL_BANDWIDTH_NAME,
 		     WLAN_PARAM_Integer,
 		     struct hdd_config, enable_change_channel_bandwidth,
@@ -3751,7 +3726,6 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
 			pConfig->nChannelBondingMode5GHz;
 	}
 	smeConfig->csrConfig.nScanResultAgeCount = pConfig->ScanResultAgeCount;
-	smeConfig->csrConfig.AdHocChannel24 = pConfig->OperatingChannel;
 	smeConfig->csrConfig.bCatRssiOffset = pConfig->nRssiCatGap;
 	smeConfig->csrConfig.nInitialDwellTime = pConfig->nInitialDwellTime;
 	smeConfig->csrConfig.initial_scan_no_dfs_chnl =

+ 12 - 3
core/hdd/src/wlan_hdd_main.c

@@ -4253,7 +4253,7 @@ QDF_STATUS hdd_init_station_mode(struct hdd_adapter *adapter)
 					 true);
 	/* Set the default operation channel */
 	sta_ctx->conn_info.operationChannel =
-		hdd_ctx->config->OperatingChannel;
+		hdd_ctx->config->operating_channel;
 
 	/* Make the default Auth Type as OPEN */
 	sta_ctx->conn_info.authType = eCSR_AUTH_TYPE_OPEN_SYSTEM;
@@ -9309,6 +9309,15 @@ static void hdd_cfg_params_init(struct hdd_context *hdd_ctx)
 	config->timer_multiplier = cfg_get(psoc, CFG_TIMER_MULTIPLIER);
 	config->enablefwprint = cfg_get(psoc, CFG_ENABLE_FW_UART_PRINT);
 	config->enable_fw_log = cfg_get(psoc, CFG_ENABLE_FW_LOG);
+	config->operating_channel = cfg_get(psoc, CFG_OPERATING_CHANNEL);
+	config->num_vdevs = cfg_get(psoc, CFG_NUM_VDEV_ENABLE);
+
+	qdf_str_lcopy(config->enable_concurrent_sta,
+		      cfg_get(psoc, CFG_ENABLE_CONCURRENT_STA),
+		      CFG_CONCURRENT_IFACE_MAX_LEN);
+	qdf_str_lcopy(config->dbs_scan_selection,
+		      cfg_get(psoc, CFG_DBS_SCAN_SELECTION),
+		      CFG_DBS_SCAN_PARAM_LENGTH);
 
 	hdd_init_wlan_auto_shutdown(config, psoc);
 	hdd_init_wlan_logging_params(config, psoc);
@@ -9498,11 +9507,11 @@ static QDF_STATUS hdd_open_concurrent_interface(struct hdd_context *hdd_ctx)
 {
 	struct hdd_adapter *adapter;
 
-	if (qdf_str_eq(hdd_ctx->config->enableConcurrentSTA, ""))
+	if (qdf_str_eq(hdd_ctx->config->enable_concurrent_sta, ""))
 		return QDF_STATUS_SUCCESS;
 
 	adapter = hdd_open_adapter(hdd_ctx, QDF_STA_MODE,
-				   hdd_ctx->config->enableConcurrentSTA,
+				   hdd_ctx->config->enable_concurrent_sta,
 				   wlan_hdd_get_intf_addr(hdd_ctx),
 				   NET_NAME_UNKNOWN, true);
 	if (!adapter) {