diff --git a/components/mlme/dispatcher/inc/wlan_mlme_api.h b/components/mlme/dispatcher/inc/wlan_mlme_api.h
index 14e2483d6c..cdbe3acffa 100644
--- a/components/mlme/dispatcher/inc/wlan_mlme_api.h
+++ b/components/mlme/dispatcher/inc/wlan_mlme_api.h
@@ -1973,4 +1973,81 @@ wlan_mlme_get_mcc_feature(struct wlan_objmgr_psoc *psoc,
*/
QDF_STATUS wlan_mlme_get_rrm_enabled(struct wlan_objmgr_psoc *psoc,
bool *value);
+
+/*
+ * wlan_mlme_get_dtim_selection_diversity() - get dtim selection diversity
+ * bitmap
+ * @psoc: pointer to psoc object
+ * @dtim_selection_div: value that is requested by the caller
+ * This function gets the dtim selection diversity bitmap to be
+ * sent to the firmware
+ *
+ * Return: QDF_STATUS_SUCCESS - in case of success
+ */
+QDF_STATUS wlan_mlme_get_dtim_selection_diversity(struct wlan_objmgr_psoc *psoc,
+ uint32_t *dtim_selection_div);
+
+/**
+ * wlan_mlme_get_bmps_min_listen_interval() - get beacon mode powersave
+ * minimum listen interval value
+ * @psoc: pointer to psoc object
+ * @value: value that is requested by the caller
+ *
+ * Return: QDF_STATUS_SUCCESS - in case of success
+ */
+QDF_STATUS wlan_mlme_get_bmps_min_listen_interval(struct wlan_objmgr_psoc *psoc,
+ uint32_t *value);
+
+/**
+ * wlan_mlme_get_bmps_max_listen_interval() - get beacon mode powersave
+ * maximum listen interval value
+ * @psoc: pointer to psoc object
+ * @value: value that is requested by the caller
+ *
+ * Return: QDF_STATUS_SUCCESS - in case of success
+ */
+QDF_STATUS wlan_mlme_get_bmps_max_listen_interval(struct wlan_objmgr_psoc *psoc,
+ uint32_t *value);
+
+/**
+ * wlan_mlme_get_auto_bmps_timer_value() - get bmps timer value
+ * @psoc: pointer to psoc object
+ * @value: value that is requested by the caller
+ *
+ * Return: QDF_STATUS_SUCCESS - in case of success
+ */
+QDF_STATUS wlan_mlme_get_auto_bmps_timer_value(struct wlan_objmgr_psoc *psoc,
+ uint32_t *value);
+
+/**
+ * wlan_mlme_is_bmps_enabled() - check if beacon mode powersave is
+ * enabled/disabled
+ * @psoc: pointer to psoc object
+ * @value: value that is requested by the caller
+ *
+ * Return: QDF_STATUS_SUCCESS - in case of success
+ */
+QDF_STATUS wlan_mlme_is_bmps_enabled(struct wlan_objmgr_psoc *psoc,
+ bool *value);
+
+/**
+ * wlan_mlme_override_bmps_imps() - disable imps/bmps
+ * @psoc: pointer to psoc object
+ * @value: value that is requested by the caller
+ *
+ * Return: QDF_STATUS_SUCCESS - in case of success
+ */
+QDF_STATUS wlan_mlme_override_bmps_imps(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * wlan_mlme_is_imps_enabled() - check if idle mode powersave is
+ * enabled/disabled
+ * @psoc: pointer to psoc object
+ * @value: value that is requested by the caller
+ *
+ * Return: QDF_STATUS_SUCCESS - in case of success
+ */
+QDF_STATUS wlan_mlme_is_imps_enabled(struct wlan_objmgr_psoc *psoc,
+ bool *value);
+
#endif /* _WLAN_MLME_API_H_ */
diff --git a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h
index 4c40f589ac..03e726ce40 100644
--- a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h
+++ b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h
@@ -3219,4 +3219,118 @@ QDF_STATUS ucfg_wlan_mlme_get_rrm_enabled(struct wlan_objmgr_psoc *psoc,
QDF_STATUS
ucfg_mlme_get_latency_enable(struct wlan_objmgr_psoc *psoc, bool *value);
+/**
+ * ucfg_mlme_get_dtim_selection_diversity() - get dtim selection diversity
+ * bitmap
+ * @psoc: pointer to psoc object
+ * @dtim_selection_div: value that is requested by the caller
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers
+ *
+ * Return: QDF_STATUS_SUCCESS - in case of success
+ */
+static inline QDF_STATUS
+ucfg_mlme_get_dtim_selection_diversity(struct wlan_objmgr_psoc *psoc,
+ uint32_t *dtim_selection_div)
+{
+ return wlan_mlme_get_dtim_selection_diversity(psoc, dtim_selection_div);
+}
+
+/**
+ * ucfg_mlme_get_bmps_min_listen_interval() - get beacon mode powersave
+ * minimum listen interval value
+ * @psoc: pointer to psoc object
+ * @value: value that is requested by the caller
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers
+ *
+ * Return: QDF_STATUS_SUCCESS - in case of success
+ */
+static inline QDF_STATUS
+ucfg_mlme_get_bmps_min_listen_interval(struct wlan_objmgr_psoc *psoc,
+ uint32_t *value)
+{
+ return wlan_mlme_get_bmps_min_listen_interval(psoc, value);
+}
+
+/**
+ * ucfg_mlme_get_bmps_max_listen_interval() - get beacon mode powersave
+ * maximum listen interval value
+ * @psoc: pointer to psoc object
+ * @value: value that is requested by the caller
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers
+ *
+ * Return: QDF_STATUS_SUCCESS - in case of success
+ */
+static inline QDF_STATUS
+ucfg_mlme_get_bmps_max_listen_interval(struct wlan_objmgr_psoc *psoc,
+ uint32_t *value)
+{
+ return wlan_mlme_get_bmps_max_listen_interval(psoc, value);
+}
+
+/**
+ * ucfg_mlme_get_auto_bmps_timer_value() - get bmps timer value
+ * minimum listen interval value
+ * @psoc: pointer to psoc object
+ * @value: value that is requested by the caller
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers
+ *
+ * Return: QDF_STATUS_SUCCESS - in case of success
+ */
+static inline QDF_STATUS
+ucfg_mlme_get_auto_bmps_timer_value(struct wlan_objmgr_psoc *psoc,
+ uint32_t *value)
+{
+ return wlan_mlme_get_auto_bmps_timer_value(psoc, value);
+}
+
+/**
+ * ucfg_mlme_is_bmps_enabled() - check if beacon mode powersave is
+ * enabled/disabled
+ * @psoc: pointer to psoc object
+ * @value: value that is requested by the caller
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers
+ *
+ * Return: QDF_STATUS_SUCCESS - in case of success
+ */
+static inline QDF_STATUS
+ucfg_mlme_is_bmps_enabled(struct wlan_objmgr_psoc *psoc, bool *value)
+{
+ return wlan_mlme_is_bmps_enabled(psoc, value);
+}
+
+/**
+ * ucfg_mlme_is_imps_enabled() - check if idle mode powersave is
+ * enabled/disabled
+ * @psoc: pointer to psoc object
+ * @value: value that is requested by the caller
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers
+ *
+ * Return: QDF_STATUS_SUCCESS - in case of success
+ */
+static inline QDF_STATUS
+ucfg_mlme_is_imps_enabled(struct wlan_objmgr_psoc *psoc, bool *value)
+{
+ return wlan_mlme_is_imps_enabled(psoc, value);
+}
+
+/**
+ * ucfg_mlme_override_bmps_imps() - disable imps/bmps as part of
+ * override to disable all ps features
+ * @psoc: pointer to psoc object
+ * Inline UCFG API to be used by HDD/OSIF callers
+ *
+ * Return: QDF_STATUS_SUCCESS - in case of success
+ */
+static inline QDF_STATUS
+ucfg_mlme_override_bmps_imps(struct wlan_objmgr_psoc *psoc)
+{
+ return wlan_mlme_override_bmps_imps(psoc);
+}
+
#endif /* _WLAN_MLME_UCFG_API_H_ */
diff --git a/components/mlme/dispatcher/src/wlan_mlme_api.c b/components/mlme/dispatcher/src/wlan_mlme_api.c
index 8247025d11..241ba24018 100644
--- a/components/mlme/dispatcher/src/wlan_mlme_api.c
+++ b/components/mlme/dispatcher/src/wlan_mlme_api.c
@@ -2876,6 +2876,54 @@ QDF_STATUS wlan_mlme_is_sap_uapsd_enabled(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_SUCCESS;
}
+QDF_STATUS wlan_mlme_get_dtim_selection_diversity(struct wlan_objmgr_psoc *psoc,
+ uint32_t *dtim_selection_div)
+{
+ struct wlan_mlme_psoc_obj *mlme_obj;
+
+ mlme_obj = mlme_get_psoc_obj(psoc);
+ if (!mlme_obj) {
+ *dtim_selection_div = cfg_default(CFG_DTIM_SELECTION_DIVERSITY);
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ *dtim_selection_div = mlme_obj->cfg.ps_params.dtim_selection_diversity;
+
+ return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS wlan_mlme_get_bmps_min_listen_interval(struct wlan_objmgr_psoc *psoc,
+ uint32_t *value)
+{
+ struct wlan_mlme_psoc_obj *mlme_obj;
+
+ mlme_obj = mlme_get_psoc_obj(psoc);
+ if (!mlme_obj) {
+ *value = cfg_default(CFG_BMPS_MINIMUM_LI);
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ *value = mlme_obj->cfg.ps_params.bmps_min_listen_interval;
+
+ return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS wlan_mlme_get_bmps_max_listen_interval(struct wlan_objmgr_psoc *psoc,
+ uint32_t *value)
+{
+ struct wlan_mlme_psoc_obj *mlme_obj;
+
+ mlme_obj = mlme_get_psoc_obj(psoc);
+ if (!mlme_obj) {
+ *value = cfg_default(CFG_BMPS_MAXIMUM_LI);
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ *value = mlme_obj->cfg.ps_params.bmps_max_listen_interval;
+
+ return QDF_STATUS_SUCCESS;
+}
+
QDF_STATUS wlan_mlme_set_sap_uapsd_flag(struct wlan_objmgr_psoc *psoc,
bool value)
{
@@ -2900,6 +2948,67 @@ QDF_STATUS wlan_mlme_get_rrm_enabled(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_E_FAILURE;
*value = mlme_obj->cfg.rrm_config.rrm_enabled;
+ return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS wlan_mlme_get_auto_bmps_timer_value(struct wlan_objmgr_psoc *psoc,
+ uint32_t *value)
+{
+ struct wlan_mlme_psoc_obj *mlme_obj;
+
+ mlme_obj = mlme_get_psoc_obj(psoc);
+ if (!mlme_obj) {
+ *value = cfg_default(CFG_AUTO_BMPS_ENABLE_TIMER);
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ *value = mlme_obj->cfg.ps_params.auto_bmps_timer_val;
+
+ return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS wlan_mlme_is_bmps_enabled(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_PS);
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ *value = mlme_obj->cfg.ps_params.is_bmps_enabled;
+
+ return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS wlan_mlme_is_imps_enabled(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_IMPS);
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ *value = mlme_obj->cfg.ps_params.is_imps_enabled;
+
+ return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS wlan_mlme_override_bmps_imps(struct wlan_objmgr_psoc *psoc)
+{
+ struct wlan_mlme_psoc_obj *mlme_obj;
+
+ mlme_obj = mlme_get_psoc_obj(psoc);
+ if (!mlme_obj)
+ return QDF_STATUS_E_FAILURE;
+
+ mlme_obj->cfg.ps_params.is_imps_enabled = 0;
+ mlme_obj->cfg.ps_params.is_bmps_enabled = 0;
return QDF_STATUS_SUCCESS;
}
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index 4184ac3111..ad35ae073c 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -2516,118 +2516,6 @@ enum hdd_link_speed_rpt_type {
#define CFG_5G_MAX_RSSI_PENALIZE_MAX (20)
#define CFG_5G_MAX_RSSI_PENALIZE_DEFAULT (10)
-/*
- *
- * gEnableImps - Enable/Disable IMPS
- * @Min: 0
- * @Max: 1
- * @Default: 1
- *
- * This ini is used to enable/Disable IMPS(IdleModePowerSave) Mode
- *
- * Related: None
- *
- * Supported Feature: Power Save
- *
- * Usage: External
- *
- *
- */
-#define CFG_ENABLE_IMPS_NAME "gEnableImps"
-#define CFG_ENABLE_IMPS_MIN (0)
-#define CFG_ENABLE_IMPS_MAX (1)
-#define CFG_ENABLE_IMPS_DEFAULT (1)
-
-/*
- *
- * gEnableBmps - Enable/Disable BMPS
- * @Min: 0
- * @Max: 1
- * @Default: 1
- *
- * This ini is used to enable/Disable BMPS(BeaconModePowerSave) Mode
- *
- * Related: None
- *
- * Supported Feature: Power Save
- *
- * Usage: External
- *
- *
- */
-#define CFG_ENABLE_PS_NAME "gEnableBmps"
-#define CFG_ENABLE_PS_MIN (0)
-#define CFG_ENABLE_PS_MAX (1)
-#define CFG_ENABLE_PS_DEFAULT (1)
-
-/*
- *
- * gAutoBmpsTimerValue - Set Auto BMPS Timer value
- * @Min: 0
- * @Max: 120
- * @Default: 90
- *
- * This ini is used to set Auto BMPS Timer value in seconds
- *
- * Related: gEnableBmps
- *
- * Supported Feature: Power Save
- *
- * Usage: External
- *
- *
- */
-#define CFG_AUTO_PS_ENABLE_TIMER_NAME "gAutoBmpsTimerValue"
-#define CFG_AUTO_PS_ENABLE_TIMER_MIN (0)
-#define CFG_AUTO_PS_ENABLE_TIMER_MAX (120)
-#define CFG_AUTO_PS_ENABLE_TIMER_DEFAULT (90)
-
-/*
- *
- * gBmpsMinListenInterval - Set BMPS Minimum Listen Interval
- * @Min: 1
- * @Max: 65535
- * @Default: 1
- *
- * This ini is used to set BMPS Minimum Listen Interval. If gPowerUsage
- * is set "Min", this INI need to be set.
- *
- * Related: gEnableBmps, gPowerUsage
- *
- * Supported Feature: Power Save
- *
- * Usage: External
- *
- *
- */
-#define CFG_BMPS_MINIMUM_LI_NAME "gBmpsMinListenInterval"
-#define CFG_BMPS_MINIMUM_LI_MIN (1)
-#define CFG_BMPS_MINIMUM_LI_MAX (65535)
-#define CFG_BMPS_MINIMUM_LI_DEFAULT (1)
-
-/*
- *
- * gBmpsMaxListenInterval - Set BMPS Maximum Listen Interval
- * @Min: 1
- * @Max: 65535
- * @Default: 1
- *
- * This ini is used to set BMPS Maximum Listen Interval. If gPowerUsage
- * is set "Max", this INI need to be set.
- *
- * Related: gEnableBmps, gPowerUsage
- *
- * Supported Feature: Power Save
- *
- * Usage: External
- *
- *
- */
-#define CFG_BMPS_MAXIMUM_LI_NAME "gBmpsMaxListenInterval"
-#define CFG_BMPS_MAXIMUM_LI_MIN (1)
-#define CFG_BMPS_MAXIMUM_LI_MAX (65535)
-#define CFG_BMPS_MAXIMUM_LI_DEFAULT (1)
-
/*
*
* gActiveUcBpfMode - Control UC active APF mode
@@ -3278,23 +3166,6 @@ enum hdd_link_speed_rpt_type {
#define CFG_OFFLOAD_NEIGHBOR_REPORT_MAX_REQ_CAP_MAX (300)
#define CFG_OFFLOAD_NEIGHBOR_REPORT_MAX_REQ_CAP_DEFAULT (3)
-/*
- *
- * gEnableDTIMSelectionDiversity - Enable/Disable chain
- * selection optimization for one chain dtim
- * @Min: 0
- * @Max: 30
- * @Default: 5
- *
- * Usage: External
- *
- *
- */
-#define CFG_DTIM_SELECTION_DIVERSITY_NAME "gEnableDTIMSelectionDiversity"
-#define CFG_DTIM_SELECTION_DIVERSITY_MIN (0)
-#define CFG_DTIM_SELECTION_DIVERSITY_MAX (30)
-#define CFG_DTIM_SELECTION_DIVERSITY_DEFAULT (5)
-
/*
*
* gTxSchDelay - Enable/Disable Tx sch delay
@@ -3458,12 +3329,6 @@ struct hdd_config {
/* Config parameters */
bool enable_connected_scan;
char PowerUsageControl[4];
- bool fSupplicantCountryCodeHasPriority;
- bool fIsImpsEnabled;
- bool is_ps_enabled;
- uint32_t auto_bmps_timer_val;
- uint32_t nBmpsMaxListenInterval;
- uint32_t nBmpsMinListenInterval;
enum hdd_dot11_mode dot11Mode;
uint32_t nChannelBondingMode24GHz;
uint32_t nChannelBondingMode5GHz;
@@ -3664,7 +3529,6 @@ struct hdd_config {
#ifdef WLAN_FEATURE_SAE
bool is_sae_enabled;
#endif
- bool enable_dtim_selection_diversity;
bool gcmp_enabled;
bool is_11k_offload_supported;
uint32_t offload_11k_enable_bitmask;
diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c
index 5fad8edbda..6c0ff8b4d1 100644
--- a/core/hdd/src/wlan_hdd_assoc.c
+++ b/core/hdd/src/wlan_hdd_assoc.c
@@ -2459,15 +2459,17 @@ static int hdd_change_sta_state_authenticated(struct hdd_adapter *adapter,
struct csr_roam_info *roaminfo)
{
QDF_STATUS status;
- uint32_t timeout;
+ uint32_t timeout, auto_bmps_timer_val;
uint8_t staid = HDD_WLAN_INVALID_STA_ID;
struct hdd_station_ctx *hddstactx =
WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
+ ucfg_mlme_get_auto_bmps_timer_value(hdd_ctx->psoc,
+ &auto_bmps_timer_val);
timeout = hddstactx->hdd_reassoc_scenario ?
AUTO_PS_ENTRY_TIMER_DEFAULT_VALUE :
- hdd_ctx->config->auto_bmps_timer_val * 1000;
+ (auto_bmps_timer_val * 1000);
if (QDF_IBSS_MODE == adapter->device_mode)
staid = hdd_get_ibss_peer_staid(hddstactx, roaminfo);
diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c
index 89160ba41e..ac00990130 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -56,41 +56,6 @@ struct reg_table_entry g_registry_table[] = {
CFG_ENABLE_CONNECTED_SCAN_MIN,
CFG_ENABLE_CONNECTED_SCAN_MAX),
- REG_VARIABLE(CFG_ENABLE_IMPS_NAME, WLAN_PARAM_Integer,
- struct hdd_config, fIsImpsEnabled,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_ENABLE_IMPS_DEFAULT,
- CFG_ENABLE_IMPS_MIN,
- CFG_ENABLE_IMPS_MAX),
-
- REG_VARIABLE(CFG_ENABLE_PS_NAME, WLAN_PARAM_Integer,
- struct hdd_config, is_ps_enabled,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_ENABLE_PS_DEFAULT,
- CFG_ENABLE_PS_MIN,
- CFG_ENABLE_PS_MAX),
-
- REG_VARIABLE(CFG_AUTO_PS_ENABLE_TIMER_NAME, WLAN_PARAM_Integer,
- struct hdd_config, auto_bmps_timer_val,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_AUTO_PS_ENABLE_TIMER_DEFAULT,
- CFG_AUTO_PS_ENABLE_TIMER_MIN,
- CFG_AUTO_PS_ENABLE_TIMER_MAX),
-
- REG_VARIABLE(CFG_BMPS_MINIMUM_LI_NAME, WLAN_PARAM_Integer,
- struct hdd_config, nBmpsMinListenInterval,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_BMPS_MINIMUM_LI_DEFAULT,
- CFG_BMPS_MINIMUM_LI_MIN,
- CFG_BMPS_MINIMUM_LI_MAX),
-
- REG_VARIABLE(CFG_BMPS_MAXIMUM_LI_NAME, WLAN_PARAM_Integer,
- struct hdd_config, nBmpsMaxListenInterval,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_BMPS_MAXIMUM_LI_DEFAULT,
- CFG_BMPS_MAXIMUM_LI_MIN,
- CFG_BMPS_MAXIMUM_LI_MAX),
-
REG_VARIABLE(CFG_DOT11_MODE_NAME, WLAN_PARAM_Integer,
struct hdd_config, dot11Mode,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
@@ -841,14 +806,6 @@ struct reg_table_entry g_registry_table[] = {
CFG_OFFLOAD_NEIGHBOR_REPORT_MAX_REQ_CAP_MIN,
CFG_OFFLOAD_NEIGHBOR_REPORT_MAX_REQ_CAP_MAX),
- REG_VARIABLE(CFG_DTIM_SELECTION_DIVERSITY_NAME,
- WLAN_PARAM_Integer,
- struct hdd_config, enable_dtim_selection_diversity,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_DTIM_SELECTION_DIVERSITY_DEFAULT,
- CFG_DTIM_SELECTION_DIVERSITY_MIN,
- CFG_DTIM_SELECTION_DIVERSITY_MAX),
-
REG_VARIABLE(CFG_TX_SCH_DELAY_NAME,
WLAN_PARAM_Integer,
struct hdd_config, enable_tx_sch_delay,
@@ -1629,27 +1586,27 @@ done:
*/
static void hdd_set_power_save_offload_config(struct hdd_context *hdd_ctx)
{
- struct hdd_config *pConfig = hdd_ctx->config;
- uint32_t listenInterval = 0;
+ uint32_t listen_interval = 0;
if (strcmp(ucfg_mlme_get_power_usage(hdd_ctx->psoc), "Min") == 0)
- listenInterval = pConfig->nBmpsMinListenInterval;
+ ucfg_mlme_get_bmps_min_listen_interval(hdd_ctx->psoc,
+ &listen_interval);
else if (strcmp(ucfg_mlme_get_power_usage(hdd_ctx->psoc), "Max") == 0)
- listenInterval = pConfig->nBmpsMaxListenInterval;
-
+ ucfg_mlme_get_bmps_max_listen_interval(hdd_ctx->psoc,
+ &listen_interval);
/*
* Based on Mode Set the LI
* Otherwise default LI value of 1 will
* be taken
*/
- if (listenInterval) {
+ if (listen_interval) {
/*
* setcfg for listenInterval.
* Make sure CFG is updated because PE reads this
* from CFG at the time of assoc or reassoc
*/
ucfg_mlme_set_sap_listen_interval(hdd_ctx->psoc,
- listenInterval);
+ listen_interval);
}
}
@@ -1827,8 +1784,7 @@ static void hdd_override_all_ps(struct hdd_context *hdd_ctx)
{
struct hdd_config *cfg_ini = hdd_ctx->config;
- cfg_ini->fIsImpsEnabled = 0;
- cfg_ini->is_ps_enabled = 0;
+ ucfg_mlme_override_bmps_imps(hdd_ctx->psoc);
hdd_disable_runtime_pm(cfg_ini);
hdd_disable_auto_shutdown(cfg_ini);
}
@@ -2528,9 +2484,6 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
/* Update maximum interfaces information */
smeConfig->csrConfig.max_intf_count = hdd_ctx->max_intf_count;
- smeConfig->csrConfig.is_ps_enabled = hdd_ctx->config->is_ps_enabled;
- smeConfig->csrConfig.auto_bmps_timer_val =
- hdd_ctx->config->auto_bmps_timer_val;
hdd_set_fine_time_meas_cap(hdd_ctx);
cds_set_multicast_logging(hdd_ctx->config->multicast_host_fw_msgs);
diff --git a/core/hdd/src/wlan_hdd_disa.c b/core/hdd/src/wlan_hdd_disa.c
index 374b2e122c..45610ea72e 100644
--- a/core/hdd/src/wlan_hdd_disa.c
+++ b/core/hdd/src/wlan_hdd_disa.c
@@ -435,6 +435,7 @@ static int __wlan_hdd_cfg80211_encrypt_decrypt_msg(struct wiphy *wiphy,
struct net_device *dev = wdev->netdev;
struct hdd_adapter *adapter = NULL;
int ret;
+ bool is_bmps_enabled;
hdd_enter_dev(dev);
@@ -444,7 +445,8 @@ static int __wlan_hdd_cfg80211_encrypt_decrypt_msg(struct wiphy *wiphy,
adapter = WLAN_HDD_GET_PRIV_PTR(dev);
- if (hdd_ctx->config->is_ps_enabled) {
+ ucfg_mlme_is_bmps_enabled(hdd_ctx->psoc, &is_bmps_enabled);
+ if (is_bmps_enabled) {
hdd_debug("DISA is not supported when PS is enabled");
return -EINVAL;
}
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index b2dc790dd0..7938ceaca7 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -4823,6 +4823,7 @@ int hdd_set_fw_params(struct hdd_adapter *adapter)
struct hdd_context *hdd_ctx;
bool bval = false;
uint8_t max_amsdu_len;
+ uint32_t dtim_sel_diversity;
hdd_enter_dev(adapter->dev);
@@ -4843,12 +4844,13 @@ int hdd_set_fw_params(struct hdd_adapter *adapter)
goto error;
}
+ ucfg_mlme_get_dtim_selection_diversity(hdd_ctx->psoc,
+ &dtim_sel_diversity);
ret = sme_cli_set_command(
adapter->session_id,
WMI_PDEV_PARAM_1CH_DTIM_OPTIMIZED_CHAIN_SELECTION,
- hdd_ctx->config->enable_dtim_selection_diversity,
- PDEV_CMD);
+ dtim_sel_diversity, PDEV_CMD);
if (ret) {
hdd_err("Failed to set DTIM_OPTIMIZED_CHAIN_SELECTION");
goto error;
@@ -10901,7 +10903,7 @@ static int hdd_features_init(struct hdd_context *hdd_ctx)
int ret;
mac_handle_t mac_handle;
struct hdd_config *cfg;
- bool b_cts2self;
+ bool b_cts2self, is_imps_enabled;
hdd_enter();
@@ -10923,10 +10925,8 @@ static int hdd_features_init(struct hdd_context *hdd_ctx)
cfg->
etsi13_srd_chan_in_master_mode);
- if (hdd_ctx->config->fIsImpsEnabled)
- hdd_set_idle_ps_config(hdd_ctx, true);
- else
- hdd_set_idle_ps_config(hdd_ctx, false);
+ ucfg_mlme_is_imps_enabled(hdd_ctx->psoc, &is_imps_enabled);
+ hdd_set_idle_ps_config(hdd_ctx, is_imps_enabled);
/* Send Enable/Disable data stall detection cmd to FW */
sme_cli_set_command(0, WMI_PDEV_PARAM_DATA_STALL_DETECT_ENABLE,
@@ -11848,6 +11848,7 @@ int hdd_wlan_startup(struct hdd_context *hdd_ctx)
{
QDF_STATUS status;
int errno;
+ bool is_imps_enabled;
hdd_enter();
@@ -11931,7 +11932,8 @@ int hdd_wlan_startup(struct hdd_context *hdd_ctx)
if (QDF_IS_STATUS_ERROR(status))
goto unregister_notifiers;
- hdd_set_idle_ps_config(hdd_ctx, hdd_ctx->config->fIsImpsEnabled);
+ ucfg_mlme_is_imps_enabled(hdd_ctx->psoc, &is_imps_enabled);
+ hdd_set_idle_ps_config(hdd_ctx, is_imps_enabled);
hdd_exit();
diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c
index b21a0e1e73..5bd1eaffd8 100644
--- a/core/hdd/src/wlan_hdd_power.c
+++ b/core/hdd/src/wlan_hdd_power.c
@@ -1460,6 +1460,7 @@ int wlan_hdd_set_powersave(struct hdd_adapter *adapter,
mac_handle_t mac_handle;
struct hdd_context *hdd_ctx;
QDF_STATUS status = QDF_STATUS_SUCCESS;
+ bool is_bmps_enabled;
if (NULL == adapter) {
hdd_err("Adapter NULL");
@@ -1497,7 +1498,8 @@ int wlan_hdd_set_powersave(struct hdd_adapter *adapter,
goto end;
}
- if (hdd_ctx->config && hdd_ctx->config->is_ps_enabled) {
+ ucfg_mlme_is_bmps_enabled(hdd_ctx->psoc, &is_bmps_enabled);
+ if (is_bmps_enabled) {
hdd_debug("Wlan driver Entering Power save");
/*
@@ -1533,7 +1535,8 @@ int wlan_hdd_set_powersave(struct hdd_adapter *adapter,
if (status != QDF_STATUS_SUCCESS)
goto end;
- if (hdd_ctx->config && hdd_ctx->config->is_ps_enabled)
+ ucfg_mlme_is_bmps_enabled(hdd_ctx->psoc, &is_bmps_enabled);
+ if (is_bmps_enabled)
status = sme_ps_enable_disable(mac_handle,
adapter->session_id,
SME_PS_DISABLE);
diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h
index 39875fe8dc..2c197acd31 100644
--- a/core/sme/inc/csr_api.h
+++ b/core/sme/inc/csr_api.h
@@ -1095,8 +1095,6 @@ typedef struct tagCsrConfigParam {
#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
bool sap_channel_avoidance;
#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
- bool is_ps_enabled;
- uint32_t auto_bmps_timer_val;
uint32_t dual_mac_feature_disable;
uint32_t sta_sap_scc_on_dfs_chan;
uint32_t roam_dense_rssi_thresh_offset;
diff --git a/core/sme/inc/sme_power_save.h b/core/sme/inc/sme_power_save.h
index cea67ab02c..1e01ab57b6 100644
--- a/core/sme/inc/sme_power_save.h
+++ b/core/sme/inc/sme_power_save.h
@@ -87,8 +87,6 @@ struct ps_params {
* @ps_params: maintain power save state and USAPD params
*/
struct ps_global_info {
- bool ps_enabled;
- uint32_t auto_bmps_timer_val;
struct ps_params ps_params[SIR_MAX_SUPPORTED_BSS];
/* Remain in Power active till DHCP completes */
bool remain_in_power_active_till_dhcp;
diff --git a/core/sme/src/common/sme_power_save.c b/core/sme/src/common/sme_power_save.c
index 36a7277e11..44620d6329 100644
--- a/core/sme/src/common/sme_power_save.c
+++ b/core/sme/src/common/sme_power_save.c
@@ -334,14 +334,15 @@ QDF_STATUS sme_ps_process_command(struct mac_context *mac_ctx, uint32_t session_
*/
QDF_STATUS sme_enable_sta_ps_check(struct mac_context *mac_ctx, uint32_t session_id)
{
- struct ps_global_info *ps_global_info = &mac_ctx->sme.ps_global_info;
+ struct wlan_mlme_powersave *powersave_params;
QDF_BUG(session_id < CSR_ROAM_SESSION_MAX);
if (session_id >= CSR_ROAM_SESSION_MAX)
return QDF_STATUS_E_INVAL;
/* Check if Sta Ps is enabled. */
- if (!ps_global_info->ps_enabled) {
+ powersave_params = &mac_ctx->mlme_cfg->ps_params;
+ if (!powersave_params->is_bmps_enabled) {
sme_debug("Cannot initiate PS. PS is disabled in ini");
return QDF_STATUS_E_FAILURE;
}
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index 127ddbdab1..8e10608230 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -2673,10 +2673,6 @@ QDF_STATUS csr_change_default_config_param(struct mac_context *mac,
pParam->sap_channel_avoidance;
#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
- mac->sme.ps_global_info.ps_enabled =
- pParam->is_ps_enabled;
- mac->sme.ps_global_info.auto_bmps_timer_val =
- pParam->auto_bmps_timer_val;
mac->dual_mac_feature_disable =
pParam->dual_mac_feature_disable;
mac->sta_sap_scc_on_dfs_chan =
@@ -2814,9 +2810,6 @@ QDF_STATUS csr_get_config_param(struct mac_context *mac, tCsrConfigParam *pParam
mac->dual_mac_feature_disable;
pParam->sta_sap_scc_on_dfs_chan =
mac->sta_sap_scc_on_dfs_chan;
- pParam->is_ps_enabled = mac->sme.ps_global_info.ps_enabled;
- pParam->auto_bmps_timer_val =
- mac->sme.ps_global_info.auto_bmps_timer_val;
pParam->f_sta_miracast_mcc_rest_time_val =
mac->f_sta_miracast_mcc_rest_time_val;
pParam->send_smps_action = mac->roam.configParam.send_smps_action;