Browse Source

qcacld-3.0: Add ini item used in DBS Scan selection policy

Add ini item gdbs_scan_selection for DBS Scan selection policy.

Change-Id: If71df05afac7139d4ceccd190e8196c7476445b5
CRs-Fixed: 2028112
Nitesh Shah 8 years ago
parent
commit
50a3de1447
2 changed files with 38 additions and 0 deletions
  1. 29 0
      core/hdd/inc/wlan_hdd_cfg.h
  2. 9 0
      core/hdd/src/wlan_hdd_cfg.c

+ 29 - 0
core/hdd/inc/wlan_hdd_cfg.h

@@ -59,6 +59,10 @@
 #define IPADDR_STRING_LENGTH   (16)
 #endif
 
+#define CFG_DBS_SCAN_CLIENTS_MAX           (7)
+#define CFG_DBS_SCAN_PARAM_PER_CLIENT      (3)
+#define CFG_DBS_SCAN_PARAM_LENGTH          (42)
+
 /* Number of items that can be configured */
 #define MAX_CFG_INI_ITEMS   1024
 
@@ -8004,6 +8008,30 @@ enum dot11p_mode {
 #define CFG_DUAL_MAC_FEATURE_DISABLE_MAX          (1)
 #define CFG_DUAL_MAC_FEATURE_DISABLE_DEFAULT      (0)
 
+/*
+ * <ini>
+ * gdbs_scan_selection - DBS Scan Selection.
+ * @Default: 5,2,2,16,2,2
+ *
+ * This ini is used to enable DBS scan selection.
+ * 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       "5,2,2,16,2,2"
+
 /*
  * gPNOChannelPrediction will allow user to enable/disable the
  * PNO channel prediction feature.
@@ -10604,6 +10632,7 @@ struct hdd_config {
 #endif
 	bool ce_classify_enabled;
 	uint32_t dual_mac_feature_disable;
+	uint8_t dbs_scan_selection[CFG_DBS_SCAN_PARAM_LENGTH];
 	bool     tx_chain_mask_cck;
 	uint8_t  tx_chain_mask_1ss;
 	bool smart_chainmask_enabled;

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

@@ -3624,6 +3624,12 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_DUAL_MAC_FEATURE_DISABLE_DEFAULT,
 		     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),
+
 #ifdef FEATURE_WLAN_SCAN_PNO
 	REG_VARIABLE(CFG_PNO_CHANNEL_PREDICTION_NAME, WLAN_PARAM_Integer,
 		     struct hdd_config, pno_channel_prediction,
@@ -5634,6 +5640,9 @@ void hdd_cfg_print(hdd_context_t *pHddCtx)
 	hdd_notice("Name = [%s] value = [%u]",
 		  CFG_DUAL_MAC_FEATURE_DISABLE,
 		  pHddCtx->config->dual_mac_feature_disable);
+	hdd_notice("Name = [%s] Value = [%s]",
+		  CFG_DBS_SCAN_SELECTION_NAME,
+		  pHddCtx->config->dbs_scan_selection);
 #ifdef FEATURE_WLAN_SCAN_PNO
 	hdd_notice("Name = [%s] Value = [%u]",
 		   CFG_PNO_CHANNEL_PREDICTION_NAME,