qcacld-3.0: Refactor ini 11d in world mode to reg cfg

Refactor ini 11d in world mode to reg cfg, instead of
hdd config.

Change-Id: I9463d6efe3c109aa07eb98378d38ef0b23ff3880
CRs-Fixed: 2393498
This commit is contained in:
gaurank kathpalia
2019-02-05 17:04:08 +05:30
committed by nshrivas
parent 704af11d34
commit ba22ef2abf
8 changed files with 56 additions and 31 deletions

View File

@@ -2067,6 +2067,8 @@ static void mlme_init_reg_cfg(struct wlan_objmgr_psoc *psoc,
reg->restart_beaconing_on_ch_avoid = reg->restart_beaconing_on_ch_avoid =
cfg_get(psoc, CFG_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->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); reg->scan_11d_interval = cfg_get(psoc, CFG_SCAN_11D_INTERVAL);
qdf_uint8_array_parse(cfg_default(CFG_VALID_CHANNEL_LIST), qdf_uint8_array_parse(cfg_default(CFG_VALID_CHANNEL_LIST),
reg->valid_channel_list, reg->valid_channel_list,

View File

@@ -52,6 +52,25 @@
CFG_VALUE_OR_DEFAULT, \ CFG_VALUE_OR_DEFAULT, \
"set the self gen power value") "set the self gen power value")
/*
* <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 CFG_INI_BOOL( \
"enable_11d_in_world_mode", \
0, \
"enable 11d in world mode")
/* /*
* <ini> * <ini>
* etsi13_srd_chan_in_master_mode - Enable/disable ETSI SRD channels in * etsi13_srd_chan_in_master_mode - Enable/disable ETSI SRD channels in
@@ -196,6 +215,7 @@
#define CFG_REG_ALL \ #define CFG_REG_ALL \
CFG(CFG_SELF_GEN_FRM_PWR) \ CFG(CFG_SELF_GEN_FRM_PWR) \
CFG(CFG_ENABLE_11D_IN_WORLD_MODE) \
CFG(CFG_ETSI13_SRD_CHAN_IN_MASTER_MODE) \ CFG(CFG_ETSI13_SRD_CHAN_IN_MASTER_MODE) \
CFG(CFG_RESTART_BEACONING_ON_CH_AVOID) \ CFG(CFG_RESTART_BEACONING_ON_CH_AVOID) \
CFG(CFG_INDOOR_CHANNEL_SUPPORT) \ CFG(CFG_INDOOR_CHANNEL_SUPPORT) \

View File

@@ -1901,6 +1901,7 @@ struct wlan_mlme_mwc {
* @valid_channel_list_num: valid channel list number * @valid_channel_list_num: valid channel list number
* @country_code: country code * @country_code: country code
* @country_code_len: country code length * @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 { struct wlan_mlme_reg {
uint32_t self_gen_frm_pwr; uint32_t self_gen_frm_pwr;
@@ -1913,6 +1914,7 @@ struct wlan_mlme_reg {
uint8_t valid_channel_list_num; uint8_t valid_channel_list_num;
uint8_t country_code[CFG_COUNTRY_CODE_LEN + 1]; uint8_t country_code[CFG_COUNTRY_CODE_LEN + 1];
uint8_t country_code_len; uint8_t country_code_len;
bool enable_11d_in_world_mode;
}; };
/** /**

View File

@@ -3503,6 +3503,18 @@ QDF_STATUS
ucfg_mlme_get_etsi13_srd_chan_in_master_mode(struct wlan_objmgr_psoc *psoc, ucfg_mlme_get_etsi13_srd_chan_in_master_mode(struct wlan_objmgr_psoc *psoc,
bool *value); 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 * ucfg_mlme_restart_beaconing_on_ch_avoid() - get restart beaconing on ch avoid
* @psoc: pointer to psoc object * @psoc: pointer to psoc object

View File

@@ -1426,6 +1426,24 @@ ucfg_mlme_get_etsi13_srd_chan_in_master_mode(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_SUCCESS; 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 QDF_STATUS
ucfg_mlme_get_restart_beaconing_on_ch_avoid(struct wlan_objmgr_psoc *psoc, ucfg_mlme_get_restart_beaconing_on_ch_avoid(struct wlan_objmgr_psoc *psoc,
uint32_t *value) uint32_t *value)

View File

@@ -80,25 +80,6 @@ struct hdd_context;
#define CFG_ENABLE_CONNECTED_SCAN_MAX (1) #define CFG_ENABLE_CONNECTED_SCAN_MAX (1)
#define CFG_ENABLE_CONNECTED_SCAN_DEFAULT (1) #define CFG_ENABLE_CONNECTED_SCAN_DEFAULT (1)
/*
* <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)
enum hdd_dot11_mode { enum hdd_dot11_mode {
eHDD_DOT11_MODE_AUTO = 0, /* covers all things we support */ eHDD_DOT11_MODE_AUTO = 0, /* covers all things we support */
eHDD_DOT11_MODE_abg, /* 11a/b/g only, no HT, no proprietary */ 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; uint16_t sap_tx_leakage_threshold;
bool sap_internal_restart; bool sap_internal_restart;
bool tx_orphan_enable; bool tx_orphan_enable;
bool enable_11d_in_world_mode;
bool is_11k_offload_supported; bool is_11k_offload_supported;
bool action_oui_enable; bool action_oui_enable;
uint8_t action_oui_str[ACTION_OUI_MAXIMUM_ID][ACTION_OUI_MAX_STR_LEN]; uint8_t action_oui_str[ACTION_OUI_MAXIMUM_ID][ACTION_OUI_MAX_STR_LEN];

View File

@@ -107,13 +107,6 @@ struct reg_table_entry g_registry_table[] = {
CFG_ADAPTIVE_EXTSCAN_DWELL_MODE_MIN, CFG_ADAPTIVE_EXTSCAN_DWELL_MODE_MIN,
CFG_ADAPTIVE_EXTSCAN_DWELL_MODE_MAX), 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, REG_VARIABLE(CFG_CHANGE_CHANNEL_BANDWIDTH_NAME,
WLAN_PARAM_Integer, WLAN_PARAM_Integer,
struct hdd_config, enable_change_channel_bandwidth, struct hdd_config, enable_change_channel_bandwidth,

View File

@@ -259,11 +259,10 @@ static void reg_program_config_vars(struct hdd_context *hdd_ctx,
&enable_srd_chan); &enable_srd_chan);
config_vars->enable_srd_chan_in_master_mode = enable_srd_chan; config_vars->enable_srd_chan_in_master_mode = enable_srd_chan;
config_vars->enable_11d_in_world_mode = ucfg_mlme_get_11d_in_world_mode(hdd_ctx->psoc,
hdd_ctx->config->enable_11d_in_world_mode; &config_vars->enable_11d_in_world_mode);
} }
/** /**
* hdd_regulatory_wiphy_init() - regulatory wiphy init * hdd_regulatory_wiphy_init() - regulatory wiphy init
* @hdd_ctx: hdd context * @hdd_ctx: hdd context