diff --git a/mlme/core/src/wlan_mlme_main.c b/mlme/core/src/wlan_mlme_main.c
index b88c55c3b5..a9837c3516 100644
--- a/mlme/core/src/wlan_mlme_main.c
+++ b/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/mlme/dispatcher/inc/cfg_mlme_sap.h b/mlme/dispatcher/inc/cfg_mlme_sap.h
index ca41356a3f..74b472f107 100644
--- a/mlme/dispatcher/inc/cfg_mlme_sap.h
+++ b/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/mlme/dispatcher/inc/wlan_mlme_api.h b/mlme/dispatcher/inc/wlan_mlme_api.h
index 4102877145..eba46fecf6 100644
--- a/mlme/dispatcher/inc/wlan_mlme_api.h
+++ b/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/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/mlme/dispatcher/inc/wlan_mlme_public_struct.h
index 33b8a51685..100a0c9ec5 100644
--- a/mlme/dispatcher/inc/wlan_mlme_public_struct.h
+++ b/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/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h b/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h
index 4b6bde295f..efd04a233a 100644
--- a/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h
+++ b/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/mlme/dispatcher/src/wlan_mlme_api.c b/mlme/dispatcher/src/wlan_mlme_api.c
index 3e783ba24f..c7c97cc651 100644
--- a/mlme/dispatcher/src/wlan_mlme_api.c
+++ b/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)
{