瀏覽代碼

qcacld-3.0: Add INI to enable 11d in world mode

In WORLD mode, there can be urgency to discover the current country
since WORLD mode restricts the channel and TX power availability.Add
INI enable_11d_in_world_mode to automatically enable 11d in WORLD
mode. This INI supersedes the setting in 11d INI variable
Is11dSupportEnabled.

CRs-Fixed: 2289349
Change-Id: I7b289cdb60be5e737f41f9de5a478f32a234e717
Amar Singhal 6 年之前
父節點
當前提交
0fcce7d7a3
共有 3 個文件被更改,包括 29 次插入0 次删除
  1. 20 0
      core/hdd/inc/wlan_hdd_cfg.h
  2. 7 0
      core/hdd/src/wlan_hdd_cfg.c
  3. 2 0
      core/hdd/src/wlan_hdd_regulatory.c

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

@@ -196,6 +196,25 @@ struct hdd_context;
 #define CFG_11D_SUPPORT_ENABLED_MAX            WNI_CFG_11D_ENABLED_STAMAX
 #define CFG_11D_SUPPORT_ENABLED_DEFAULT        WNI_CFG_11D_ENABLED_STADEF       /* Default is ON */
 
+/*
+ * <ini>
+ * enable_11d_in_world_mode - enable 11d in world mode
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * This ini enables 11d in world mode, irrespective of value of
+ * g11dSupportEnabled
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+ #define CFG_ENABLE_11D_IN_WORLD_MODE_NAME "enable_11d_in_world_mode"
+ #define CFG_ENABLE_11D_IN_WORLD_MODE_MIN     (0)
+ #define CFG_ENABLE_11D_IN_WORLD_MODE_MAX     (1)
+ #define CFG_ENABLE_11D_IN_WORLD_MODE_DEFAULT (0)
+
 #define CFG_11H_SUPPORT_ENABLED_NAME           "g11hSupportEnabled"
 #define CFG_11H_SUPPORT_ENABLED_MIN            (0)
 #define CFG_11H_SUPPORT_ENABLED_MAX            (1)
@@ -14594,6 +14613,7 @@ struct hdd_config {
 	uint32_t num_disallowed_aps;
 	bool oce_sta_enabled;
 	bool oce_sap_enabled;
+	bool enable_11d_in_world_mode;
 	/* 5G preference parameters for boosting RSSI */
 	bool                        enable_5g_band_pref;
 	int8_t                      rssi_boost_threshold_5g;

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

@@ -4477,6 +4477,13 @@ struct reg_table_entry g_registry_table[] = {
 		CFG_OCE_ENABLE_SAP_MIN,
 		CFG_OCE_ENABLE_SAP_MAX),
 
+	REG_VARIABLE(CFG_ENABLE_11D_IN_WORLD_MODE_NAME, WLAN_PARAM_Integer,
+		     struct hdd_config, enable_11d_in_world_mode,
+		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+		     CFG_ENABLE_11D_IN_WORLD_MODE_DEFAULT,
+		     CFG_ENABLE_11D_IN_WORLD_MODE_MIN,
+		     CFG_ENABLE_11D_IN_WORLD_MODE_MAX),
+
 	REG_VARIABLE(CFG_ENABLE_5G_BAND_PREF_NAME, WLAN_PARAM_Integer,
 		struct hdd_config, enable_5g_band_pref,
 		VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,

+ 2 - 0
core/hdd/src/wlan_hdd_regulatory.c

@@ -221,6 +221,8 @@ static void reg_program_config_vars(struct hdd_context *hdd_ctx,
 		restart_beaconing_on_chan_avoid_event;
 	config_vars->enable_srd_chan_in_master_mode =
 		hdd_ctx->config->etsi13_srd_chan_in_master_mode;
+	config_vars->enable_11d_in_world_mode =
+		hdd_ctx->config->enable_11d_in_world_mode;
 }