diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c index 86899dab79..942d939faf 100644 --- a/components/mlme/core/src/wlan_mlme_main.c +++ b/components/mlme/core/src/wlan_mlme_main.c @@ -2067,6 +2067,8 @@ static void mlme_init_reg_cfg(struct wlan_objmgr_psoc *psoc, reg->restart_beaconing_on_ch_avoid = cfg_get(psoc, CFG_RESTART_BEACONING_ON_CH_AVOID); reg->indoor_channel_support = cfg_get(psoc, CFG_INDOOR_CHANNEL_SUPPORT); + reg->enable_11d_in_world_mode = cfg_get(psoc, + CFG_ENABLE_11D_IN_WORLD_MODE); reg->scan_11d_interval = cfg_get(psoc, CFG_SCAN_11D_INTERVAL); qdf_uint8_array_parse(cfg_default(CFG_VALID_CHANNEL_LIST), reg->valid_channel_list, diff --git a/components/mlme/dispatcher/inc/cfg_mlme_reg.h b/components/mlme/dispatcher/inc/cfg_mlme_reg.h index 61d027db43..39394fe5cb 100644 --- a/components/mlme/dispatcher/inc/cfg_mlme_reg.h +++ b/components/mlme/dispatcher/inc/cfg_mlme_reg.h @@ -52,6 +52,25 @@ CFG_VALUE_OR_DEFAULT, \ "set the self gen power value") +/* + * + * 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 + * + * + */ +#define CFG_ENABLE_11D_IN_WORLD_MODE CFG_INI_BOOL( \ + "enable_11d_in_world_mode", \ + 0, \ + "enable 11d in world mode") + /* * * etsi13_srd_chan_in_master_mode - Enable/disable ETSI SRD channels in @@ -196,6 +215,7 @@ #define CFG_REG_ALL \ CFG(CFG_SELF_GEN_FRM_PWR) \ + CFG(CFG_ENABLE_11D_IN_WORLD_MODE) \ CFG(CFG_ETSI13_SRD_CHAN_IN_MASTER_MODE) \ CFG(CFG_RESTART_BEACONING_ON_CH_AVOID) \ CFG(CFG_INDOOR_CHANNEL_SUPPORT) \ diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h index f9e1bb040c..40926c6d35 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h @@ -1901,6 +1901,7 @@ struct wlan_mlme_mwc { * @valid_channel_list_num: valid channel list number * @country_code: country code * @country_code_len: country code length + * @enable_11d_in_world_mode: Whether to enable 11d scan in world mode or not */ struct wlan_mlme_reg { uint32_t self_gen_frm_pwr; @@ -1913,6 +1914,7 @@ struct wlan_mlme_reg { uint8_t valid_channel_list_num; uint8_t country_code[CFG_COUNTRY_CODE_LEN + 1]; uint8_t country_code_len; + bool enable_11d_in_world_mode; }; /** diff --git a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h index 20c92471be..4d640800bc 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h @@ -3503,6 +3503,18 @@ QDF_STATUS ucfg_mlme_get_etsi13_srd_chan_in_master_mode(struct wlan_objmgr_psoc *psoc, bool *value); +/** + * ucfg_mlme_get_11d_in_world_mode - get whether 11d is enabled in world mode + * in master mode + * @psoc: pointer to psoc object + * @value: pointer to the value which will be filled for the caller + * + * Return: QDF Status + */ +QDF_STATUS +ucfg_mlme_get_11d_in_world_mode(struct wlan_objmgr_psoc *psoc, + bool *value); + /** * ucfg_mlme_restart_beaconing_on_ch_avoid() - get restart beaconing on ch avoid * @psoc: pointer to psoc object diff --git a/components/mlme/dispatcher/src/wlan_mlme_ucfg_api.c b/components/mlme/dispatcher/src/wlan_mlme_ucfg_api.c index 1c8459fe72..2374aca5e2 100644 --- a/components/mlme/dispatcher/src/wlan_mlme_ucfg_api.c +++ b/components/mlme/dispatcher/src/wlan_mlme_ucfg_api.c @@ -1426,6 +1426,24 @@ ucfg_mlme_get_etsi13_srd_chan_in_master_mode(struct wlan_objmgr_psoc *psoc, return QDF_STATUS_SUCCESS; } +QDF_STATUS +ucfg_mlme_get_11d_in_world_mode(struct wlan_objmgr_psoc *psoc, + bool *value) +{ + struct wlan_mlme_psoc_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_obj(psoc); + if (!mlme_obj) { + *value = cfg_default(CFG_ENABLE_11D_IN_WORLD_MODE); + mlme_err("Failed to get MLME Obj"); + return QDF_STATUS_E_INVAL; + } + + *value = mlme_obj->cfg.reg.enable_11d_in_world_mode; + + return QDF_STATUS_SUCCESS; +} + QDF_STATUS ucfg_mlme_get_restart_beaconing_on_ch_avoid(struct wlan_objmgr_psoc *psoc, uint32_t *value) diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index cfb2b3dc46..6c4fbe140d 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -80,25 +80,6 @@ struct hdd_context; #define CFG_ENABLE_CONNECTED_SCAN_MAX (1) #define CFG_ENABLE_CONNECTED_SCAN_DEFAULT (1) -/* - * - * 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 - * - * - */ - #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) - enum hdd_dot11_mode { eHDD_DOT11_MODE_AUTO = 0, /* covers all things we support */ eHDD_DOT11_MODE_abg, /* 11a/b/g only, no HT, no proprietary */ @@ -378,8 +359,6 @@ struct hdd_config { uint16_t sap_tx_leakage_threshold; bool sap_internal_restart; bool tx_orphan_enable; - - bool enable_11d_in_world_mode; bool is_11k_offload_supported; bool action_oui_enable; uint8_t action_oui_str[ACTION_OUI_MAXIMUM_ID][ACTION_OUI_MAX_STR_LEN]; diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index 9b3e11f4e2..32a76e1b60 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -107,13 +107,6 @@ struct reg_table_entry g_registry_table[] = { CFG_ADAPTIVE_EXTSCAN_DWELL_MODE_MIN, CFG_ADAPTIVE_EXTSCAN_DWELL_MODE_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_CHANGE_CHANNEL_BANDWIDTH_NAME, WLAN_PARAM_Integer, struct hdd_config, enable_change_channel_bandwidth, diff --git a/core/hdd/src/wlan_hdd_regulatory.c b/core/hdd/src/wlan_hdd_regulatory.c index da3f565ef0..2519d6d436 100644 --- a/core/hdd/src/wlan_hdd_regulatory.c +++ b/core/hdd/src/wlan_hdd_regulatory.c @@ -259,11 +259,10 @@ static void reg_program_config_vars(struct hdd_context *hdd_ctx, &enable_srd_chan); config_vars->enable_srd_chan_in_master_mode = enable_srd_chan; - config_vars->enable_11d_in_world_mode = - hdd_ctx->config->enable_11d_in_world_mode; + ucfg_mlme_get_11d_in_world_mode(hdd_ctx->psoc, + &config_vars->enable_11d_in_world_mode); } - /** * hdd_regulatory_wiphy_init() - regulatory wiphy init * @hdd_ctx: hdd context