diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c
index b88c55c3b5..a9837c3516 100644
--- a/components/mlme/core/src/wlan_mlme_main.c
+++ b/components/mlme/core/src/wlan_mlme_main.c
@@ -1026,6 +1026,12 @@ static void mlme_init_sap_cfg(struct wlan_objmgr_psoc *psoc,
cfg_get(psoc, CFG_CHAN_SWITCH_HOSTAPD_RATE_ENABLED_NAME);
sap_cfg->reduced_beacon_interval =
cfg_get(psoc, CFG_REDUCED_BEACON_INTERVAL);
+ sap_cfg->max_li_modulated_dtim_time =
+ cfg_get(psoc, CFG_MAX_LI_MODULATED_DTIM);
+ sap_cfg->country_code_priority =
+ cfg_get(psoc, CFG_COUNTRY_CODE_PRIORITY);
+ sap_cfg->sap_pref_chan_location =
+ cfg_get(psoc, CFG_SAP_PREF_CHANNEL_LOCATION);
}
diff --git a/components/mlme/dispatcher/inc/cfg_mlme_sap.h b/components/mlme/dispatcher/inc/cfg_mlme_sap.h
index ca41356a3f..74b472f107 100644
--- a/components/mlme/dispatcher/inc/cfg_mlme_sap.h
+++ b/components/mlme/dispatcher/inc/cfg_mlme_sap.h
@@ -451,6 +451,82 @@
0, \
CFG_VALUE_OR_DEFAULT, \
"reduced beacon interval")
+/*
+ *
+ * gMaxLIModulatedDTIM - Set MaxLIModulate Dtim
+ * @Min: 1
+ * @Max: 10
+ * @Default: 10
+ *
+ * This ini is used to set default MaxLIModulatedDTIM
+ *
+ * Related: None
+ *
+ * Supported Feature: STA
+ *
+ * Usage: Internal/External
+ *
+ *
+ */
+#define CFG_MAX_LI_MODULATED_DTIM CFG_INI_UINT( \
+ "gMaxLIModulatedDTIM", \
+ 1, \
+ 10, \
+ 10, \
+ CFG_VALUE_OR_DEFAULT, \
+ "Max modulated dtim")
+
+/*
+ *
+ * gCountryCodePriority - Priority to set country code
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * This ini is used to set default gCountryCodePriority
+ *
+ * Related: None
+ *
+ * Supported Feature: SAP
+ *
+ * Usage: Internal/External
+ *
+ *
+ */
+#define CFG_COUNTRY_CODE_PRIORITY CFG_INI_BOOL( \
+ "gCountryCodePriority", \
+ 0, \
+ "Country code priority")
+
+/*
+ *
+ * gSapPreferredChanLocation - Restrict channel switches between ondoor and
+ * outdoor.
+ * @Min: 0
+ * @Max: 2
+ * @Default: 0
+ *
+ * This ini is used for restricting channel switches between Indoor and outdoor
+ * channels after radar detection.
+ * 0- No preferred channel location
+ * 1- Use indoor channels only
+ * 2- Use outdoor channels only
+ * Related: NA.
+ *
+ * Supported Feature: DFS
+ *
+ * Usage: Internal/External
+ *
+ *
+ */
+#define CFG_SAP_PREF_CHANNEL_LOCATION CFG_INI_UINT( \
+ "gSapPreferredChanLocation", \
+ 0, \
+ 2, \
+ 0, \
+ CFG_VALUE_OR_DEFAULT, \
+ "Sap preferred channel location")
+
#define CFG_SAP_ALL \
CFG(CFG_SSID) \
@@ -475,6 +551,9 @@
CFG(CFG_SAP_CH_SWITCH_MODE) \
CFG(CFG_SAP_INTERNAL_RESTART) \
CFG(CFG_CHAN_SWITCH_HOSTAPD_RATE_ENABLED_NAME) \
- CFG(CFG_REDUCED_BEACON_INTERVAL)
+ CFG(CFG_REDUCED_BEACON_INTERVAL) \
+ CFG(CFG_MAX_LI_MODULATED_DTIM) \
+ CFG(CFG_COUNTRY_CODE_PRIORITY) \
+ CFG(CFG_SAP_PREF_CHANNEL_LOCATION)
#endif /* __CFG_MLME_SAP_H */
diff --git a/components/mlme/dispatcher/inc/wlan_mlme_api.h b/components/mlme/dispatcher/inc/wlan_mlme_api.h
index 4102877145..eba46fecf6 100644
--- a/components/mlme/dispatcher/inc/wlan_mlme_api.h
+++ b/components/mlme/dispatcher/inc/wlan_mlme_api.h
@@ -582,6 +582,38 @@ QDF_STATUS wlan_mlme_get_sap_chn_switch_mode(struct wlan_objmgr_psoc *psoc,
*/
QDF_STATUS wlan_mlme_get_sap_internal_restart(struct wlan_objmgr_psoc *psoc,
bool *value);
+/**
+ * wlan_mlme_get_sap_max_modulated_dtim() - get the max modulated dtim
+ * restart
+ * @psoc: pointer to psoc object
+ * @value: Value that needs to be set from the caller
+ *
+ * Return: QDF Status
+ */
+QDF_STATUS wlan_mlme_get_sap_max_modulated_dtim(struct wlan_objmgr_psoc *psoc,
+ uint8_t *value);
+
+/**
+ * wlan_mlme_get_sap_chan_pref_location() - get the sap chan pref location
+ * restart
+ * @psoc: pointer to psoc object
+ * @value: Value that needs to be set from the caller
+ *
+ * Return: QDF Status
+ */
+QDF_STATUS wlan_mlme_get_sap_chan_pref_location(struct wlan_objmgr_psoc *psoc,
+ uint8_t *value);
+
+/**
+ * wlan_mlme_get_sap_country_priority() - get the sap country code priority
+ * restart
+ * @psoc: pointer to psoc object
+ * @value: Value that needs to be set from the caller
+ *
+ * Return: QDF Status
+ */
+QDF_STATUS wlan_mlme_get_sap_country_priority(struct wlan_objmgr_psoc *psoc,
+ bool *value);
/**
* wlan_mlme_get_sap_reduced_beacon_interval() - get the sap reduced
diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
index 33b8a51685..100a0c9ec5 100644
--- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
+++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
@@ -512,6 +512,9 @@ struct wlan_mlme_wps_params {
* @sap_ch_switch_mode: Channel switch test mode enable/disable
* @chan_switch_hostapd_rate_enabled_name: enable/disable skip hostapd rate
* @reduced_beacon_interval: reduced beacon interval value
+ * @max_li_modulated_dtim_time: Max modulated DTIM time.
+ * @country_code_priority: Country code priority.
+ * @sap_pref_chan_location: SAP Preferred channel location.
*/
struct wlan_mlme_cfg_sap {
uint8_t cfg_ssid[32];
@@ -537,6 +540,9 @@ struct wlan_mlme_cfg_sap {
bool sap_ch_switch_mode;
bool chan_switch_hostapd_rate_enabled_name;
uint8_t reduced_beacon_interval;
+ uint8_t max_li_modulated_dtim_time;
+ bool country_code_priority;
+ uint8_t sap_pref_chan_location;
};
/**
diff --git a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h
index 4b6bde295f..efd04a233a 100644
--- a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h
+++ b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h
@@ -964,6 +964,54 @@ QDF_STATUS ucfg_mlme_get_sap_internal_restart(struct wlan_objmgr_psoc *psoc,
return wlan_mlme_get_sap_internal_restart(psoc, value);
}
+/**
+ * ucfg_mlme_get_sap_max_modulated_dtim() - get sap max modulated dtim
+ * @psoc: pointer to psoc object
+ * @value: Value that needs to be set from the caller
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers
+ *
+ * Return: QDF Status
+ */
+static inline
+QDF_STATUS ucfg_mlme_get_sap_max_modulated_dtim(struct wlan_objmgr_psoc *psoc,
+ uint8_t *value)
+{
+ return wlan_mlme_get_sap_max_modulated_dtim(psoc, value);
+}
+
+/**
+ * ucfg_mlme_get_pref_chan_location() - get sap pref chan location
+ * @psoc: pointer to psoc object
+ * @value: Value that needs to be set from the caller
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers
+ *
+ * Return: QDF Status
+ */
+static inline
+QDF_STATUS ucfg_mlme_get_pref_chan_location(struct wlan_objmgr_psoc *psoc,
+ uint8_t *value)
+{
+ return wlan_mlme_get_sap_chan_pref_location(psoc, value);
+}
+
+/**
+ * ucfg_mlme_get_sap_country_priority() - get sap country code priority
+ * @psoc: pointer to psoc object
+ * @value: Value that needs to be set from the caller
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers
+ *
+ * Return: QDF Status
+ */
+static inline
+QDF_STATUS ucfg_mlme_get_sap_country_priority(struct wlan_objmgr_psoc *psoc,
+ bool *value)
+{
+ return wlan_mlme_get_sap_country_priority(psoc, value);
+}
+
/**
* ucfg_mlme_get_sap_reduces_beacon_interval() - get the sap reduces beacon
* interval
diff --git a/components/mlme/dispatcher/src/wlan_mlme_api.c b/components/mlme/dispatcher/src/wlan_mlme_api.c
index 3e783ba24f..c7c97cc651 100644
--- a/components/mlme/dispatcher/src/wlan_mlme_api.c
+++ b/components/mlme/dispatcher/src/wlan_mlme_api.c
@@ -1383,6 +1383,54 @@ QDF_STATUS wlan_mlme_get_sap_internal_restart(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_SUCCESS;
}
+QDF_STATUS wlan_mlme_get_sap_max_modulated_dtim(struct wlan_objmgr_psoc *psoc,
+ uint8_t *value)
+{
+ struct wlan_mlme_psoc_obj *mlme_obj;
+
+ mlme_obj = mlme_get_psoc_obj(psoc);
+ if (!mlme_obj) {
+ mlme_err("Failed to get MLME Obj");
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ *value = mlme_obj->cfg.sap_cfg.max_li_modulated_dtim_time;
+
+ return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS wlan_mlme_get_sap_chan_pref_location(struct wlan_objmgr_psoc *psoc,
+ uint8_t *value)
+{
+ struct wlan_mlme_psoc_obj *mlme_obj;
+
+ mlme_obj = mlme_get_psoc_obj(psoc);
+ if (!mlme_obj) {
+ mlme_err("Failed to get MLME Obj");
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ *value = mlme_obj->cfg.sap_cfg.sap_pref_chan_location;
+
+ return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS wlan_mlme_get_sap_country_priority(struct wlan_objmgr_psoc *psoc,
+ bool *value)
+{
+ struct wlan_mlme_psoc_obj *mlme_obj;
+
+ mlme_obj = mlme_get_psoc_obj(psoc);
+ if (!mlme_obj) {
+ mlme_err("Failed to get MLME Obj");
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ *value = mlme_obj->cfg.sap_cfg.country_code_priority;
+
+ return QDF_STATUS_SUCCESS;
+}
+
QDF_STATUS wlan_mlme_get_sap_reduced_beacon_interval(struct wlan_objmgr_psoc
*psoc, int *value)
{
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index ef875307a2..e0f60c0361 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -226,50 +226,6 @@ struct hdd_context;
#define CFG_11H_SUPPORT_ENABLED_MAX (1)
#define CFG_11H_SUPPORT_ENABLED_DEFAULT (1) /* Default is ON */
-/*
- *
- * gCountryCodePriority - Country code from supplicant preference
- * @Min: 0
- * @Max: 1
- * @Default: 1
- *
- * This ini is used to control whether driver will prefer country code
- * specified by supplicant. And once country code from supplicant is
- * respected, 11d will be disabled in effect.
- *
- * Related: None
- *
- * Supported Feature: STA
- *
- * Usage: Internal/External
- *
- *
- */
-
-#define CFG_COUNTRY_CODE_PRIORITY_NAME "gCountryCodePriority"
-#define CFG_COUNTRY_CODE_PRIORITY_MIN (0)
-#define CFG_COUNTRY_CODE_PRIORITY_MAX (1)
-#define CFG_COUNTRY_CODE_PRIORITY_DEFAULT (0)
-
-/*
- *
- * gRegulatoryChangeCountry - Default world regdmn overriding
- * @Min: 0
- * @Max: 1
- * @Default: 1
- *
- * This ini is used to control whether default regdmn settings should be
- * overridden when there is no world regdmn configuration available.
- *
- * Related: None
- *
- * Supported Feature: STA
- *
- * Usage: Internal/External
- *
- *
- */
-
#define CFG_REG_CHANGE_DEF_COUNTRY_NAME "gRegulatoryChangeCountry"
#define CFG_REG_CHANGE_DEF_COUNTRY_DEFAULT (0)
#define CFG_REG_CHANGE_DEF_COUNTRY_MIN (0)
@@ -2699,29 +2655,6 @@ enum hdd_dot11_mode {
#define CFG_TX_POWER_CTRL_MIN (0)
#define CFG_TX_POWER_CTRL_MAX (1)
-/*
- *
- * gMaxLIModulatedDTIM - Set MaxLIModulate Dtim
- * @Min: 1
- * @Max: 10
- * @Default: 10
- *
- * This ini is used to set default MaxLIModulatedDTIM
- *
- * Related: None
- *
- * Supported Feature: STA
- *
- * Usage: Internal/External
- *
- *
- */
-
-#define CFG_MAX_LI_MODULATED_DTIM_NAME "gMaxLIModulatedDTIM"
-#define CFG_MAX_LI_MODULATED_DTIM_MIN (1)
-#define CFG_MAX_LI_MODULATED_DTIM_MAX (10)
-#define CFG_MAX_LI_MODULATED_DTIM_DEFAULT (10)
-
/*
*
* gFWMccRtsCtsProtection - RTS-CTS protection in MCC.
@@ -3339,32 +3272,6 @@ enum hdd_link_speed_rpt_type {
#define CFG_DISABLE_DFS_CH_SWITCH_MAX (1)
#define CFG_DISABLE_DFS_CH_SWITCH_DEFAULT (0)
-/*
- *
- * gSapPreferredChanLocation - Restrict channel switches between ondoor and
- * outdoor.
- * @Min: 0
- * @Max: 2
- * @Default: 0
- *
- * This ini is used for restricting channel switches between Indoor and outdoor
- * channels after radar detection.
- * 0- No preferred channel location
- * 1- Use indoor channels only
- * 2- Use outdoor channels only
- * Related: NA.
- *
- * Supported Feature: DFS
- *
- * Usage: Internal/External
- *
- *
- */
-#define CFG_SAP_PREFERRED_CHANNEL_LOCATION "gSapPreferredChanLocation"
-#define CFG_SAP_PREFERRED_CHANNEL_LOCATION_MIN (0)
-#define CFG_SAP_PREFERRED_CHANNEL_LOCATION_MAX (2)
-#define CFG_SAP_PREFERRED_CHANNEL_LOCATION_DEFAULT (0)
-
/*
*
* gDisableDfsJapanW53 - Block W53 channels in random channel selection
@@ -6717,7 +6624,6 @@ struct hdd_config {
bool ShortSlotTimeEnabled;
bool Is11dSupportEnabled;
bool Is11hSupportEnabled;
- bool fSupplicantCountryCodeHasPriority;
char PowerUsageControl[4];
bool fIsImpsEnabled;
bool is_ps_enabled;
@@ -6806,7 +6712,6 @@ struct hdd_config {
uint32_t idle_time_conc;
uint8_t nRssiFilterPeriod;
- uint8_t fMaxLIModulatedDTIM;
bool mcc_rts_cts_prot_enable;
bool mcc_bcast_prob_resp_enable;
@@ -6950,7 +6855,6 @@ struct hdd_config {
uint32_t TxPower2g;
uint32_t TxPower5g;
bool fDfsPhyerrFilterOffload;
- uint8_t gSapPreferredChanLocation;
uint8_t gDisableDfsJapanW53;
bool gEnableOverLapCh;
bool fRegChangeDefCountry;
diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c
index ab85af945a..0cf644091e 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -273,16 +273,6 @@ static void cb_notify_set_enable_ssr(struct hdd_context *hdd_ctx,
sme_update_enable_ssr(hdd_ctx->mac_handle, hdd_ctx->config->enableSSR);
}
-static void
-cb_notify_set_g_sap_preferred_chan_location(struct hdd_context *hdd_ctx,
- unsigned long notify_id)
-{
- uint8_t location = hdd_ctx->config->gSapPreferredChanLocation;
-
- wlansap_set_dfs_preferred_channel_location(hdd_ctx->mac_handle,
- location);
-}
-
static void ch_notify_set_g_disable_dfs_japan_w53(struct hdd_context *hdd_ctx,
unsigned long notify_id)
{
@@ -406,13 +396,6 @@ struct reg_table_entry g_registry_table[] = {
CFG_11H_SUPPORT_ENABLED_MIN,
CFG_11H_SUPPORT_ENABLED_MAX),
- REG_VARIABLE(CFG_COUNTRY_CODE_PRIORITY_NAME, WLAN_PARAM_Integer,
- struct hdd_config, fSupplicantCountryCodeHasPriority,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
- CFG_COUNTRY_CODE_PRIORITY_DEFAULT,
- CFG_COUNTRY_CODE_PRIORITY_MIN,
- CFG_COUNTRY_CODE_PRIORITY_MAX),
-
REG_VARIABLE_STRING(CFG_POWER_USAGE_NAME, WLAN_PARAM_String,
struct hdd_config, PowerUsageControl,
VAR_FLAGS_OPTIONAL,
@@ -699,13 +682,6 @@ struct reg_table_entry g_registry_table[] = {
CFG_TX_POWER_CTRL_MIN,
CFG_TX_POWER_CTRL_MAX),
- REG_VARIABLE(CFG_MAX_LI_MODULATED_DTIM_NAME, WLAN_PARAM_Integer,
- struct hdd_config, fMaxLIModulatedDTIM,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_MAX_LI_MODULATED_DTIM_DEFAULT,
- CFG_MAX_LI_MODULATED_DTIM_MIN,
- CFG_MAX_LI_MODULATED_DTIM_MAX),
-
REG_VARIABLE(CFG_FW_MCC_RTS_CTS_PROT_NAME, WLAN_PARAM_Integer,
struct hdd_config, mcc_rts_cts_prot_enable,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -1414,15 +1390,6 @@ struct reg_table_entry g_registry_table[] = {
CFG_DISABLE_DFS_CH_SWITCH_MIN,
CFG_DISABLE_DFS_CH_SWITCH_MAX),
- REG_DYNAMIC_VARIABLE(CFG_SAP_PREFERRED_CHANNEL_LOCATION,
- WLAN_PARAM_Integer,
- struct hdd_config, gSapPreferredChanLocation,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_SAP_PREFERRED_CHANNEL_LOCATION_DEFAULT,
- CFG_SAP_PREFERRED_CHANNEL_LOCATION_MIN,
- CFG_SAP_PREFERRED_CHANNEL_LOCATION_MAX,
- cb_notify_set_g_sap_preferred_chan_location, 0),
REG_DYNAMIC_VARIABLE(CFG_DISABLE_DFS_JAPAN_W53, WLAN_PARAM_Integer,
struct hdd_config, gDisableDfsJapanW53,
VAR_FLAGS_OPTIONAL |
@@ -3998,8 +3965,6 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
}
smeConfig->csrConfig.nScanResultAgeCount = pConfig->ScanResultAgeCount;
smeConfig->csrConfig.AdHocChannel24 = pConfig->OperatingChannel;
- smeConfig->csrConfig.fSupplicantCountryCodeHasPriority =
- pConfig->fSupplicantCountryCodeHasPriority;
smeConfig->csrConfig.bCatRssiOffset = pConfig->nRssiCatGap;
smeConfig->csrConfig.vccRssiThreshold = pConfig->nVccRssiTrigger;
smeConfig->csrConfig.vccUlMacLossThreshold =
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c
index a2c9c63a9e..fbae2cd59d 100644
--- a/core/hdd/src/wlan_hdd_hostapd.c
+++ b/core/hdd/src/wlan_hdd_hostapd.c
@@ -4603,6 +4603,7 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
uint32_t auto_channel_select_weight =
cfg_default(CFG_AUTO_CHANNEL_SELECT_WEIGHT);
bool bval = false;
+ uint8_t pref_chan_location = 0;
hdd_enter();
@@ -4834,8 +4835,10 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
wlansap_set_dfs_ignore_cac(mac_handle, ignore_cac);
wlansap_set_dfs_restrict_japan_w53(mac_handle,
iniConfig->gDisableDfsJapanW53);
+ ucfg_mlme_get_pref_chan_location(hdd_ctx->psoc,
+ &pref_chan_location);
wlansap_set_dfs_preferred_channel_location(mac_handle,
- iniConfig->gSapPreferredChanLocation);
+ pref_chan_location);
#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
wlan_sap_set_channel_avoidance(mac_handle,
iniConfig->sap_channel_avoidance);
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 9d900637b0..582f4e6a19 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -9684,7 +9684,8 @@ static int hdd_update_cds_config(struct hdd_context *hdd_ctx)
return -ENOMEM;
cds_cfg->driver_type = QDF_DRIVER_TYPE_PRODUCTION;
- cds_cfg->sta_maxlimod_dtim = hdd_ctx->config->fMaxLIModulatedDTIM;
+ ucfg_mlme_get_sap_max_modulated_dtim(hdd_ctx->psoc,
+ &cds_cfg->sta_maxlimod_dtim);
/*
* Copy the DFS Phyerr Filtering Offload status.
@@ -14041,7 +14042,9 @@ static int hdd_update_pmo_config(struct hdd_context *hdd_ctx)
psoc_cfg.packet_filter_enabled = !hdd_ctx->config->disablePacketFilter;
psoc_cfg.ap_arpns_support = hdd_ctx->ap_arpns_support;
psoc_cfg.d0_wow_supported = wma_d0_wow_is_supported();
- psoc_cfg.sta_max_li_mod_dtim = hdd_ctx->config->fMaxLIModulatedDTIM;
+ ucfg_mlme_get_sap_max_modulated_dtim(hdd_ctx->psoc,
+ &psoc_cfg.sta_max_li_mod_dtim);
+
hdd_ra_populate_pmo_config(&psoc_cfg, hdd_ctx);
hdd_lpass_populate_pmo_config(&psoc_cfg, hdd_ctx);
diff --git a/core/hdd/src/wlan_hdd_regulatory.c b/core/hdd/src/wlan_hdd_regulatory.c
index 757883917f..421d9e9c12 100644
--- a/core/hdd/src/wlan_hdd_regulatory.c
+++ b/core/hdd/src/wlan_hdd_regulatory.c
@@ -209,6 +209,7 @@ static void reg_program_config_vars(struct hdd_context *hdd_ctx,
{
uint8_t band_capability = 0;
QDF_STATUS status;
+ bool country_priority = 0;
status = ucfg_mlme_get_band_capability(hdd_ctx->psoc, &band_capability);
if (QDF_IS_STATUS_ERROR(status))
@@ -216,8 +217,9 @@ static void reg_program_config_vars(struct hdd_context *hdd_ctx,
config_vars->enable_11d_support = hdd_ctx->config->Is11dSupportEnabled;
config_vars->scan_11d_interval = hdd_ctx->config->scan_11d_interval;
- config_vars->userspace_ctry_priority =
- hdd_ctx->config->fSupplicantCountryCodeHasPriority;
+ ucfg_mlme_get_sap_country_priority(hdd_ctx->psoc,
+ &country_priority);
+ config_vars->userspace_ctry_priority = country_priority;
config_vars->dfs_enabled = hdd_ctx->config->enableDFSChnlScan;
config_vars->indoor_chan_enabled =
hdd_ctx->config->indoor_channel_support;
diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h
index df7b71aaef..0e0d3a6ca3 100644
--- a/core/sme/inc/csr_api.h
+++ b/core/sme/inc/csr_api.h
@@ -1074,8 +1074,6 @@ typedef struct tagCsrConfigParam {
uint8_t fAllowMCCGODiffBI;
tCsr11dinfo Csr11dinfo;
- /* Country Code Priority */
- bool fSupplicantCountryCodeHasPriority;
uint16_t vccRssiThreshold;
uint32_t vccUlMacLossThreshold;
uint32_t nPassiveMaxChnTime; /* in units of milliseconds */
diff --git a/core/sme/inc/csr_internal.h b/core/sme/inc/csr_internal.h
index 8275937a38..8cd5a3348d 100644
--- a/core/sme/inc/csr_internal.h
+++ b/core/sme/inc/csr_internal.h
@@ -428,8 +428,6 @@ struct csr_config {
* list. It is an "AND" operation between the default channels and
* the channels in the 802.11d IE.
*/
- /* Country Code Priority */
- bool fSupplicantCountryCodeHasPriority;
uint16_t vccRssiThreshold;
uint32_t vccUlMacLossThreshold;
diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c
index 93cf00ee1b..1fe1c1e152 100644
--- a/core/sme/src/common/sme_api.c
+++ b/core/sme/src/common/sme_api.c
@@ -764,7 +764,7 @@ QDF_STATUS sme_init_chan_list(mac_handle_t hal, uint8_t *alpha2,
tpAniSirGlobal pmac = PMAC_STRUCT(hal);
if ((cc_src == SOURCE_USERSPACE) &&
- (pmac->roam.configParam.fSupplicantCountryCodeHasPriority)) {
+ (pmac->mlme_cfg->sap_cfg.country_code_priority)) {
pmac->roam.configParam.Is11dSupportEnabled = false;
}
@@ -5950,7 +5950,7 @@ sme_handle_generic_change_country_code(tpAniSirGlobal mac_ctx,
QDF_STATUS status = QDF_STATUS_SUCCESS;
v_REGDOMAIN_t reg_domain_id = 0;
bool user_ctry_priority =
- mac_ctx->roam.configParam.fSupplicantCountryCodeHasPriority;
+ mac_ctx->mlme_cfg->sap_cfg.country_code_priority;
tAniGenericChangeCountryCodeReq *msg = pMsgBuf;
if (SOURCE_11D != mac_ctx->reg_hint_src) {
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index a029c8642e..d91fb53e7d 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -1681,7 +1681,6 @@ static void init_config_param(tpAniSirGlobal pMac)
pMac->roam.configParam.BssPreferValue[i] = i;
csr_assign_rssi_for_category(pMac, CSR_BEST_RSSI_VALUE,
CSR_DEFAULT_RSSI_DB_GAP);
- pMac->roam.configParam.fSupplicantCountryCodeHasPriority = false;
pMac->roam.configParam.nActiveMaxChnTime = CSR_ACTIVE_MAX_CHANNEL_TIME;
pMac->roam.configParam.nPassiveMaxChnTime =
CSR_PASSIVE_MAX_CHANNEL_TIME;
@@ -2831,8 +2830,6 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac,
csr_assign_rssi_for_category(pMac,
pMac->mlme_cfg->lfr.first_scan_bucket_threshold,
pParam->bCatRssiOffset);
- pMac->roam.configParam.fSupplicantCountryCodeHasPriority =
- pParam->fSupplicantCountryCodeHasPriority;
pMac->roam.configParam.vccRssiThreshold =
pParam->vccRssiThreshold;
pMac->roam.configParam.vccUlMacLossThreshold =
@@ -3122,8 +3119,6 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam)
pParam->idle_time_conc = cfg_params->idle_time_conc;
pParam->nScanResultAgeCount = cfg_params->agingCount;
pParam->bCatRssiOffset = cfg_params->bCatRssiOffset;
- pParam->fSupplicantCountryCodeHasPriority =
- cfg_params->fSupplicantCountryCodeHasPriority;
pParam->vccRssiThreshold = cfg_params->vccRssiThreshold;
pParam->vccUlMacLossThreshold = cfg_params->vccUlMacLossThreshold;
pParam->nTxPowerCap = cfg_params->nTxPowerCap;
@@ -15671,8 +15666,7 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId,
if ((csr_is11h_supported(pMac)) &&
(WLAN_REG_IS_5GHZ_CH(pBssDescription->channelId)) &&
(pIes->Country.present) &&
- (!pMac->roam.configParam.
- fSupplicantCountryCodeHasPriority)) {
+ (!pMac->mlme_cfg->sap_cfg.country_code_priority)) {
csr_save_to_channel_power2_g_5_g(pMac,
pIes->Country.num_triplets *
sizeof(tSirMacChanInfo),