diff --git a/components/mlme/dispatcher/inc/wlan_mlme_api.h b/components/mlme/dispatcher/inc/wlan_mlme_api.h
index e834d8e5df..d2a855dd87 100644
--- a/components/mlme/dispatcher/inc/wlan_mlme_api.h
+++ b/components/mlme/dispatcher/inc/wlan_mlme_api.h
@@ -197,6 +197,46 @@ QDF_STATUS wlan_mlme_get_band_capability(struct wlan_objmgr_psoc *psoc,
QDF_STATUS wlan_mlme_set_band_capability(struct wlan_objmgr_psoc *psoc,
uint8_t band_capability);
+/**
+ * wlan_mlme_get_prevent_link_down_cfg() - Get the prevent link down config
+ * @psoc: pointer to psoc object
+ * @prevent_link_down: Pointer to the variable from caller
+ *
+ * Return: QDF Status
+ */
+QDF_STATUS wlan_mlme_get_prevent_link_down_cfg(struct wlan_objmgr_psoc *psoc,
+ bool *prevent_link_down);
+
+/**
+ * wlan_mlme_get_select_5ghz_margin_cfg() - Get the select 5Ghz margin config
+ * @psoc: pointer to psoc object
+ * @select_5ghz_margin: Pointer to the variable from caller
+ *
+ * Return: QDF Status
+ */
+QDF_STATUS wlan_mlme_get_select_5ghz_margin_cfg(struct wlan_objmgr_psoc *psoc,
+ uint8_t *select_5ghz_margin);
+
+/**
+ * wlan_mlme_get_crash_inject_cfg() - Get the crash inject config
+ * @psoc: pointer to psoc object
+ * @crash_inject: Pointer to the variable from caller
+ *
+ * Return: QDF Status
+ */
+QDF_STATUS wlan_mlme_get_crash_inject_cfg(struct wlan_objmgr_psoc *psoc,
+ bool *crash_inject);
+
+/**
+ * wlan_mlme_get_lpass_support() - Get the LPASS Support config
+ * @psoc: pointer to psoc object
+ * @lpass_support: Pointer to the variable from caller
+ *
+ * Return: QDF Status
+ */
+QDF_STATUS wlan_mlme_get_lpass_support(struct wlan_objmgr_psoc *psoc,
+ bool *lpass_support);
+
/**
* wlan_mlme_get_acs_with_more_param() - Get the acs_with_more_param flag
* @psoc: pointer to psoc object
diff --git a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h
index 42fbabe4e9..628ef1bf16 100644
--- a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h
+++ b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h
@@ -177,6 +177,62 @@ QDF_STATUS ucfg_mlme_set_band_capability(struct wlan_objmgr_psoc *psoc,
return wlan_mlme_set_band_capability(psoc, band_capability);
}
+/**
+ * ucfg_mlme_get_prevent_link_down_cfg() - Get the prevent link down config
+ * @psoc: pointer to psoc object
+ * @prevent_link_down: Pointer to the variable from caller
+ *
+ * Return: QDF Status
+ */
+static inline
+QDF_STATUS ucfg_mlme_get_prevent_link_down_cfg(struct wlan_objmgr_psoc *psoc,
+ bool *prevent_link_down)
+{
+ return wlan_mlme_get_prevent_link_down_cfg(psoc, prevent_link_down);
+}
+
+/**
+ * ucfg_mlme_get_select_5ghz_margin_cfg() - Get the select 5Ghz margin config
+ * @psoc: pointer to psoc object
+ * @select_5ghz_margin: Pointer to the variable from caller
+ *
+ * Return: QDF Status
+ */
+static inline
+QDF_STATUS ucfg_mlme_get_select_5ghz_margin_cfg(struct wlan_objmgr_psoc *psoc,
+ uint8_t *select_5ghz_margin)
+{
+ return wlan_mlme_get_select_5ghz_margin_cfg(psoc, select_5ghz_margin);
+}
+
+/**
+ * ucfg_mlme_get_crash_inject_cfg() - Get the crash inject config
+ * @psoc: pointer to psoc object
+ * @crash_inject: Pointer to the variable from caller
+ *
+ * Return: QDF Status
+ */
+static inline
+QDF_STATUS ucfg_mlme_get_crash_inject_cfg(struct wlan_objmgr_psoc *psoc,
+ bool *crash_inject)
+{
+ return wlan_mlme_get_crash_inject_cfg(psoc, crash_inject);
+}
+
+/**
+ * ucfg_mlme_get_lpass_support() - Get the LPASS Support config
+ * @psoc: pointer to psoc object
+ * @lpass_support: Pointer to the variable from caller
+ *
+ * Return: QDF Status
+ */
+static inline
+QDF_STATUS ucfg_mlme_get_lpass_support(struct wlan_objmgr_psoc *psoc,
+ bool *lpass_support)
+{
+ return wlan_mlme_get_lpass_support(psoc, lpass_support);
+}
+
/**
* ucfg_mlme_get_acs_with_more_param() - Get the flag for acs with
* more param
diff --git a/components/mlme/dispatcher/src/wlan_mlme_api.c b/components/mlme/dispatcher/src/wlan_mlme_api.c
index 53c3934f3a..42bc790304 100644
--- a/components/mlme/dispatcher/src/wlan_mlme_api.c
+++ b/components/mlme/dispatcher/src/wlan_mlme_api.c
@@ -123,6 +123,70 @@ QDF_STATUS wlan_mlme_set_band_capability(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_SUCCESS;
}
+QDF_STATUS wlan_mlme_get_prevent_link_down_cfg(struct wlan_objmgr_psoc *psoc,
+ bool *prevent_link_down)
+{
+ 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;
+ }
+
+ *prevent_link_down = mlme_obj->cfg.gen.prevent_link_down;
+
+ return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS wlan_mlme_get_select_5ghz_margin_cfg(struct wlan_objmgr_psoc *psoc,
+ uint8_t *select_5ghz_margin)
+{
+ 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;
+ }
+
+ *select_5ghz_margin = mlme_obj->cfg.gen.select_5ghz_margin;
+
+ return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS wlan_mlme_get_crash_inject_cfg(struct wlan_objmgr_psoc *psoc,
+ bool *crash_inject)
+{
+ 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;
+ }
+
+ *crash_inject = mlme_obj->cfg.gen.crash_inject;
+
+ return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS wlan_mlme_get_lpass_support(struct wlan_objmgr_psoc *psoc,
+ bool *lpass_support)
+{
+ 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;
+ }
+
+ *lpass_support = mlme_obj->cfg.gen.lpass_support;
+
+ return QDF_STATUS_SUCCESS;
+}
+
void wlan_mlme_get_sap_inactivity_override(struct wlan_objmgr_psoc *psoc,
bool *val)
{
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index f075b9c43a..456e0cf175 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -1356,30 +1356,6 @@ enum hdd_dot11_mode {
#define CFG_ENABLE_FAST_ROAM_IN_CONCURRENCY_MAX (1)
#define CFG_ENABLE_FAST_ROAM_IN_CONCURRENCY_DEFAULT (1)
-/*
- *
- * gSelect5GHzMargin - Sets RSSI preference for 5GHz over 2.4GHz AP.
- * @Min: 0
- * @Max: 60
- * @Default: 0
- *
- * Prefer connecting to 5G AP even if its RSSI is lower by gSelect5GHzMargin
- * dBm than 2.4G AP. This feature requires the dependent cfg.ini
- * "gRoamPrefer5GHz" set to 1
- *
- * Related: gRoamPrefer5GHz
- *
- * Supported Feature: Roaming
- *
- * Usage: External
- *
- *
- */
-#define CFG_STRICT_5GHZ_PREF_BY_MARGIN "gSelect5GHzMargin"
-#define CFG_STRICT_5GHZ_PREF_BY_MARGIN_MIN (0)
-#define CFG_STRICT_5GHZ_PREF_BY_MARGIN_MAX (60)
-#define CFG_STRICT_5GHZ_PREF_BY_MARGIN_DEFAULT (0)
-
/*
*
* gRoamScanHiRssiMaxCount - Sets 5GHz maximum scan count
@@ -4002,36 +3978,6 @@ enum hdd_link_speed_rpt_type {
#define CFG_ENABLE_OVERLAP_CH_MAX (1)
#define CFG_ENABLE_OVERLAP_CH_DEFAULT (0)
-#define CFG_ENABLE_MEMORY_DEEP_SLEEP "gEnableMemDeepSleep"
-#define CFG_ENABLE_MEMORY_DEEP_SLEEP_MIN (0)
-#define CFG_ENABLE_MEMORY_DEEP_SLEEP_MAX (1)
-#define CFG_ENABLE_MEMORY_DEEP_SLEEP_DEFAULT (1)
-
-/*
- *
- *
- * gEnableCckTxFirOverride - Enable/disable CCK TxFIR Override
- * @Min: 0 (disabled)
- * @Max: 1 (enabled)
- * @Default: 0 (disabled)
- *
- * When operating in an 802.11b mode, this configuration item forces a 2x2 radio
- * configuration into 1x for Tx and 2x for Rx (ie 1x2) for regulatory compliance
- * reasons.
- *
- * Related: enable2x2
- *
- * Supported Feature: 802.11b, 2x2
- *
- * Usage: Internal/External
- *
- *
- */
-#define CFG_ENABLE_CCK_TX_FIR_OVERRIDE_NAME "gEnableCckTxFirOverride"
-#define CFG_ENABLE_CCK_TX_FIR_OVERRIDE_MIN (0)
-#define CFG_ENABLE_CCK_TX_FIR_OVERRIDE_MAX (1)
-#define CFG_ENABLE_CCK_TX_FIR_OVERRIDE_DEFAULT (0)
-
#ifndef REMOVE_PKT_LOG
#define CFG_ENABLE_PACKET_LOG "gEnablePacketLog"
#define CFG_ENABLE_PACKET_LOG_MIN (0)
@@ -4530,42 +4476,6 @@ enum hdd_link_speed_rpt_type {
#define CFG_ENABLE_TX_STBC_MAX (1)
#define CFG_ENABLE_TX_STBC_DEFAULT (0)
-/*
- *
- * gPreventLinkDown - Enable to prevent bus link from going down
- * @Min: 0
- * @Max: 1
- * @Default: 0
- *
- * Enable to prevent bus link from going down. Useful for platforms that do not
- * (yet) support link down suspend cases.
- *
- * Related: N/A
- *
- * Supported Feature: Suspend/Resume
- *
- * Usage: Internal
- *
- *
- */
-#define CFG_PREVENT_LINK_DOWN_NAME "gPreventLinkDown"
-#define CFG_PREVENT_LINK_DOWN_MIN (0)
-#define CFG_PREVENT_LINK_DOWN_MAX (1)
-#if defined(QCA_WIFI_NAPIER_EMULATION) || defined(QCA_WIFI_QCA6290)
-#define CFG_PREVENT_LINK_DOWN_DEFAULT (1)
-#else
-#define CFG_PREVENT_LINK_DOWN_DEFAULT (0)
-#endif /* QCA_WIFI_NAPIER_EMULATION */
-
-/*
- * This INI item is used to control subsystem restart(SSR) test framework
- * Set it's value to 1 to enable APPS trigerred SSR testing
- */
-#define CFG_ENABLE_CRASH_INJECT_NAME "gEnableForceTargetAssert"
-#define CFG_ENABLE_CRASH_INJECT_MIN (0)
-#define CFG_ENABLE_CRASH_INJECT_MAX (1)
-#define CFG_ENABLE_CRASH_INJECT_DEFAULT (0)
-
/*
*
* gTxLdpcEnable - Config Param to enable Tx LDPC capability
@@ -5628,13 +5538,6 @@ enum hdd_link_speed_rpt_type {
#define CFG_WLAN_LOGGING_CONSOLE_SUPPORT_DEFAULT (1)
#endif /* WLAN_LOGGING_SOCK_SVC_ENABLE */
-#ifdef WLAN_FEATURE_LPSS
-#define CFG_ENABLE_LPASS_SUPPORT_NAME "gEnableLpassSupport"
-#define CFG_ENABLE_LPASS_SUPPORT_DEFAULT (0)
-#define CFG_ENABLE_LPASS_SUPPORT_MIN (0)
-#define CFG_ENABLE_LPASS_SUPPORT_MAX (1)
-#endif
-
#define CFG_ENABLE_SELF_RECOVERY_NAME "gEnableSelfRecovery"
#define CFG_ENABLE_SELF_RECOVERY_MIN (0)
#define CFG_ENABLE_SELF_RECOVERY_MAX (1)
@@ -9288,7 +9191,6 @@ struct hdd_config {
uint32_t pno_slow_scan_multiplier;
#endif
uint8_t max_amsdu_num;
- uint8_t nSelect5GHzMargin;
uint8_t isCoalesingInIBSSAllowed;
/* IBSS Power Save related parameters */
@@ -9344,8 +9246,6 @@ struct hdd_config {
uint32_t TxFlowStartQueueOffset;
#endif
bool advertiseConcurrentOperation;
- bool enableMemDeepSleep;
- bool enable_cck_tx_fir_override;
uint8_t allowDFSChannelRoam;
@@ -9374,9 +9274,6 @@ struct hdd_config {
uint8_t ignoreCAC;
- /* Flag to indicate crash inject enabled or not */
- bool crash_inject_enabled;
-
bool enable_sap_mandatory_chan_list;
int32_t dfsRadarPriMultiplier;
@@ -9392,9 +9289,6 @@ struct hdd_config {
bool wlan_logging_to_console;
#endif /* WLAN_LOGGING_SOCK_SVC_ENABLE */
-#ifdef WLAN_FEATURE_LPSS
- bool enable_lpass_support;
-#endif
bool enableSelfRecovery;
#ifdef FEATURE_WLAN_FORCE_SAP_SCC
uint8_t SapSccChanAvoidance;
diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c
index 64991adbed..6826c20c7a 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -1715,13 +1715,6 @@ struct reg_table_entry g_registry_table[] = {
CFG_ENABLE_TX_STBC_MIN,
CFG_ENABLE_TX_STBC_MAX),
- REG_VARIABLE(CFG_PREVENT_LINK_DOWN_NAME, WLAN_PARAM_Integer,
- struct hdd_config, prevent_link_down,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_PREVENT_LINK_DOWN_DEFAULT,
- CFG_PREVENT_LINK_DOWN_MIN,
- CFG_PREVENT_LINK_DOWN_MAX),
-
REG_VARIABLE(CFG_SCAN_AGING_PARAM_NAME, WLAN_PARAM_Integer,
struct hdd_config, scanAgingTimeout,
VAR_FLAGS_OPTIONAL,
@@ -1876,13 +1869,6 @@ struct reg_table_entry g_registry_table[] = {
CFG_MAX_AMSDU_NUM_MIN,
CFG_MAX_AMSDU_NUM_MAX),
- REG_VARIABLE(CFG_STRICT_5GHZ_PREF_BY_MARGIN, WLAN_PARAM_Integer,
- struct hdd_config, nSelect5GHzMargin,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_STRICT_5GHZ_PREF_BY_MARGIN_DEFAULT,
- CFG_STRICT_5GHZ_PREF_BY_MARGIN_MIN,
- CFG_STRICT_5GHZ_PREF_BY_MARGIN_MAX),
-
REG_VARIABLE(CFG_ENABLE_IP_TCP_UDP_CHKSUM_OFFLOAD, WLAN_PARAM_Integer,
struct hdd_config, enable_ip_tcp_udp_checksum_offload,
VAR_FLAGS_OPTIONAL,
@@ -2149,20 +2135,6 @@ struct reg_table_entry g_registry_table[] = {
CFG_ADVERTISE_CONCURRENT_OPERATION_MIN,
CFG_ADVERTISE_CONCURRENT_OPERATION_MAX),
- REG_VARIABLE(CFG_ENABLE_MEMORY_DEEP_SLEEP, WLAN_PARAM_Integer,
- struct hdd_config, enableMemDeepSleep,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_ENABLE_MEMORY_DEEP_SLEEP_DEFAULT,
- CFG_ENABLE_MEMORY_DEEP_SLEEP_MIN,
- CFG_ENABLE_MEMORY_DEEP_SLEEP_MAX),
-
- REG_VARIABLE(CFG_ENABLE_CCK_TX_FIR_OVERRIDE_NAME, WLAN_PARAM_Integer,
- struct hdd_config, enable_cck_tx_fir_override,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_ENABLE_CCK_TX_FIR_OVERRIDE_DEFAULT,
- CFG_ENABLE_CCK_TX_FIR_OVERRIDE_MIN,
- CFG_ENABLE_CCK_TX_FIR_OVERRIDE_MAX),
-
#ifndef REMOVE_PKT_LOG
REG_VARIABLE(CFG_ENABLE_PACKET_LOG, WLAN_PARAM_Integer,
struct hdd_config, enablePacketLog,
@@ -2274,13 +2246,6 @@ struct reg_table_entry g_registry_table[] = {
CFG_MAX_CONCURRENT_CONNECTIONS_MIN,
CFG_MAX_CONCURRENT_CONNECTIONS_MAX),
- REG_VARIABLE(CFG_ENABLE_CRASH_INJECT_NAME, WLAN_PARAM_Integer,
- struct hdd_config, crash_inject_enabled,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_ENABLE_CRASH_INJECT_DEFAULT,
- CFG_ENABLE_CRASH_INJECT_MIN,
- CFG_ENABLE_CRASH_INJECT_MAX),
-
REG_VARIABLE(CFG_IGNORE_CAC_NAME, WLAN_PARAM_Integer,
struct hdd_config, ignoreCAC,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -2346,15 +2311,6 @@ struct reg_table_entry g_registry_table[] = {
CFG_WLAN_LOGGING_CONSOLE_SUPPORT_ENABLE),
#endif /* WLAN_LOGGING_SOCK_SVC_ENABLE */
-#ifdef WLAN_FEATURE_LPSS
- REG_VARIABLE(CFG_ENABLE_LPASS_SUPPORT_NAME, WLAN_PARAM_Integer,
- struct hdd_config, enable_lpass_support,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_ENABLE_LPASS_SUPPORT_DEFAULT,
- CFG_ENABLE_LPASS_SUPPORT_MIN,
- CFG_ENABLE_LPASS_SUPPORT_MAX),
-#endif
-
REG_VARIABLE(CFG_ENABLE_SELF_RECOVERY_NAME, WLAN_PARAM_Integer,
struct hdd_config, enableSelfRecovery,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -5343,7 +5299,6 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
#endif
smeConfig->csrConfig.max_amsdu_num = pConfig->max_amsdu_num;
- smeConfig->csrConfig.nSelect5GHzMargin = pConfig->nSelect5GHzMargin;
smeConfig->csrConfig.isCoalesingInIBSSAllowed =
hdd_ctx->config->isCoalesingInIBSSAllowed;
diff --git a/core/hdd/src/wlan_hdd_lpass.c b/core/hdd/src/wlan_hdd_lpass.c
index 6c3b2ed8ab..fddb33fdab 100644
--- a/core/hdd/src/wlan_hdd_lpass.c
+++ b/core/hdd/src/wlan_hdd_lpass.c
@@ -89,6 +89,8 @@ static int wlan_hdd_gen_wlan_status_pack(struct wlan_status_data *data,
int i;
uint32_t chan_id;
struct svc_channel_info *chan_info;
+ bool lpass_support;
+ QDF_STATUS status;
if (!data) {
hdd_err("invalid data pointer");
@@ -109,7 +111,14 @@ static int wlan_hdd_gen_wlan_status_pack(struct wlan_status_data *data,
return -EINVAL;
hdd_ctx = WLAN_HDD_GET_CTX(adapter);
- if (hdd_ctx->lpss_support && hdd_ctx->config->enable_lpass_support)
+
+ status = ucfg_mlme_get_lpass_support(hdd_ctx->psoc, &lpass_support);
+ if (QDF_IS_STATUS_ERROR(status)) {
+ hdd_err("Failed to get LPASS support config");
+ return -EIO;
+ }
+
+ if (hdd_ctx->lpss_support && lpass_support)
data->lpss_support = 1;
else
data->lpss_support = 0;
@@ -301,7 +310,14 @@ void hdd_lpass_target_config(struct hdd_context *hdd_ctx,
void hdd_lpass_populate_cds_config(struct cds_config_info *cds_config,
struct hdd_context *hdd_ctx)
{
- cds_config->is_lpass_enabled = hdd_ctx->config->enable_lpass_support;
+ bool lpass_support = false;
+ QDF_STATUS status;
+
+ status = ucfg_mlme_get_lpass_support(hdd_ctx->psoc, &lpass_support);
+ if (QDF_IS_STATUS_ERROR(status))
+ hdd_err("Failed to get LPASS support config");
+
+ cds_config->is_lpass_enabled = lpass_support;
}
/*
@@ -311,7 +327,14 @@ void hdd_lpass_populate_cds_config(struct cds_config_info *cds_config,
void hdd_lpass_populate_pmo_config(struct pmo_psoc_cfg *pmo_config,
struct hdd_context *hdd_ctx)
{
- pmo_config->lpass_enable = hdd_ctx->config->enable_lpass_support;
+ bool lpass_support = false;
+ QDF_STATUS status;
+
+ status = ucfg_mlme_get_lpass_support(hdd_ctx->psoc, &lpass_support);
+ if (QDF_IS_STATUS_ERROR(status))
+ hdd_err("Failed to get LPASS support config");
+
+ pmo_config->lpass_enable = lpass_support;
}
/*
@@ -404,5 +427,12 @@ void hdd_lpass_notify_stop(struct hdd_context *hdd_ctx)
*/
bool hdd_lpass_is_supported(struct hdd_context *hdd_ctx)
{
- return hdd_ctx->config->enable_lpass_support;
+ bool lpass_support = false;
+ QDF_STATUS status;
+
+ status = ucfg_mlme_get_lpass_support(hdd_ctx->psoc, &lpass_support);
+ if (QDF_IS_STATUS_ERROR(status))
+ hdd_err("Failed to get LPASS support config");
+
+ return lpass_support;
}
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index ba393ce02f..8fd50e11d0 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -4777,10 +4777,8 @@ int hdd_set_fw_params(struct hdd_adapter *adapter)
if (hdd_ctx->config->enable2x2) {
hdd_debug("configuring 2x2 mode fw params");
- ret = sme_cli_set_command(adapter->session_id,
- WMI_PDEV_PARAM_ENABLE_CCK_TXFIR_OVERRIDE,
- hdd_ctx->config->enable_cck_tx_fir_override,
- PDEV_CMD);
+ ret = sme_set_cck_tx_fir_override(hdd_ctx->mac_handle,
+ adapter->session_id);
if (ret) {
hdd_err("WMI_PDEV_PARAM_ENABLE_CCK_TXFIR_OVERRIDE set failed %d",
ret);
@@ -4817,10 +4815,8 @@ int hdd_set_fw_params(struct hdd_adapter *adapter)
goto error;
}
- ret = sme_cli_set_command(adapter->session_id,
- WMI_PDEV_PARAM_HYST_EN,
- hdd_ctx->config->enableMemDeepSleep,
- PDEV_CMD);
+ ret = sme_set_enable_mem_deep_sleep(hdd_ctx->mac_handle,
+ adapter->session_id);
if (ret) {
hdd_err("WMI_PDEV_PARAM_HYST_EN set failed %d", ret);
goto error;
@@ -9663,6 +9659,7 @@ static int hdd_update_cds_config(struct hdd_context *hdd_ctx)
struct cds_config_info *cds_cfg;
int value;
uint8_t band_capability;
+ bool crash_inject;
QDF_STATUS status;
cds_cfg = (struct cds_config_info *)qdf_mem_malloc(sizeof(*cds_cfg));
@@ -9682,8 +9679,13 @@ static int hdd_update_cds_config(struct hdd_context *hdd_ctx)
cds_cfg->dfs_phyerr_filter_offload =
hdd_ctx->config->fDfsPhyerrFilterOffload;
- cds_cfg->force_target_assert_enabled =
- hdd_ctx->config->crash_inject_enabled;
+ status = ucfg_mlme_get_crash_inject_cfg(hdd_ctx->psoc, &crash_inject);
+ if (QDF_IS_STATUS_ERROR(status)) {
+ hdd_err("Failed to get crash inject ini config");
+ goto exit;
+ }
+
+ cds_cfg->force_target_assert_enabled = crash_inject;
ucfg_mlme_get_sap_max_offload_peers(hdd_ctx->psoc, &value);
cds_cfg->ap_maxoffload_peers = value;
@@ -13772,15 +13774,22 @@ static void hdd_update_hif_config(struct hdd_context *hdd_ctx)
{
struct hif_opaque_softc *scn = cds_get_context(QDF_MODULE_ID_HIF);
struct hif_config_info cfg;
+ bool prevent_link_down = false;
+ QDF_STATUS status;
if (!scn)
return;
+ status = ucfg_mlme_get_prevent_link_down_cfg(hdd_ctx->psoc,
+ &prevent_link_down);
+ if (QDF_IS_STATUS_ERROR(status))
+ hdd_err("Failed to get prevent_link_down config");
+
cfg.enable_self_recovery = hdd_ctx->config->enableSelfRecovery;
hdd_populate_runtime_cfg(hdd_ctx, &cfg);
hif_init_ini_config(scn, &cfg);
- if (hdd_ctx->config->prevent_link_down)
+ if (prevent_link_down)
hif_vote_link_up(scn);
}
@@ -14083,6 +14092,14 @@ static int hdd_update_scan_config(struct hdd_context *hdd_ctx)
struct hdd_config *cfg = hdd_ctx->config;
QDF_STATUS status;
uint8_t scan_bucket_thre;
+ uint8_t select_5ghz_margin;
+
+ status = ucfg_mlme_get_select_5ghz_margin_cfg(hdd_ctx->psoc,
+ &select_5ghz_margin);
+ if (QDF_IS_STATUS_ERROR(status)) {
+ hdd_err("Failed to get select_5ghz_margin");
+ return -EIO;
+ }
scan_cfg.active_dwell = cfg->nActiveMaxChnTime;
scan_cfg.passive_dwell = cfg->nPassiveMaxChnTime;
@@ -14095,7 +14112,7 @@ static int hdd_update_scan_config(struct hdd_context *hdd_ctx)
scan_cfg.scan_cache_aging_time =
cfg->scanAgingTimeout * 1000;
scan_cfg.prefer_5ghz = cfg->nRoamPrefer5GHz;
- scan_cfg.select_5ghz_margin = cfg->nSelect5GHzMargin;
+ scan_cfg.select_5ghz_margin = select_5ghz_margin;
ucfg_mlme_get_first_scan_bucket_threshold(hdd_ctx->psoc,
&scan_bucket_thre);
scan_cfg.scan_bucket_threshold = (int32_t)scan_bucket_thre;
diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c
index 71aae66108..ec318444cb 100644
--- a/core/hdd/src/wlan_hdd_wext.c
+++ b/core/hdd/src/wlan_hdd_wext.c
@@ -8934,16 +8934,26 @@ int hdd_crash_inject(struct hdd_adapter *adapter, uint32_t v1, uint32_t v2)
{
struct hdd_context *hdd_ctx;
int ret;
+ bool crash_inject;
+ QDF_STATUS status;
hdd_debug("WE_SET_FW_CRASH_INJECT: %d %d",
v1, v2);
pr_err("SSR is triggered by iwpriv CRASH_INJECT: %d %d\n",
v1, v2);
hdd_ctx = WLAN_HDD_GET_CTX(adapter);
- if (!hdd_ctx->config->crash_inject_enabled) {
+
+ status = ucfg_mlme_get_crash_inject_cfg(hdd_ctx->psoc, &crash_inject);
+ if (QDF_IS_STATUS_ERROR(status)) {
+ hdd_err("Failed to get crash inject ini config");
+ return 0;
+ }
+
+ if (!crash_inject) {
hdd_err("Crash Inject ini disabled, Ignore Crash Inject");
return 0;
}
+
if (v1 == 3) {
cds_trigger_recovery(QDF_REASON_UNSPECIFIED);
return 0;
diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h
index ebbd6937be..589447af51 100644
--- a/core/sme/inc/csr_api.h
+++ b/core/sme/inc/csr_api.h
@@ -1167,7 +1167,6 @@ typedef struct tagCsrConfigParam {
uint8_t disable_high_ht_mcs_2x2;
bool enable_vht20_mcs9;
uint8_t max_amsdu_num;
- uint8_t nSelect5GHzMargin;
uint32_t ho_delay_for_rx;
uint32_t min_delay_btw_roam_scans;
uint32_t roam_trigger_reason_bitmask;
diff --git a/core/sme/inc/csr_internal.h b/core/sme/inc/csr_internal.h
index 41c8575de6..27d62b3856 100644
--- a/core/sme/inc/csr_internal.h
+++ b/core/sme/inc/csr_internal.h
@@ -404,10 +404,8 @@ struct csr_config {
uint32_t channelBondingMode5GHz;
eCsrPhyMode phyMode;
enum csr_cfgdot11mode uCfgDot11Mode;
- enum band_info eBand;
uint32_t HeartbeatThresh50;
uint32_t HeartbeatThresh24;
- enum band_info bandCapability; /* indicate hw capability */
eCsrRoamWmmUserModeType WMMSupportMode;
bool Is11eSupportEnabled;
bool Is11dSupportEnabled;
@@ -508,7 +506,6 @@ struct csr_config {
*/
bool enableHeartBeatOffload;
uint8_t max_amsdu_num;
- uint8_t nSelect5GHzMargin;
uint32_t ho_delay_for_rx;
uint32_t min_delay_btw_roam_scans;
uint32_t roam_trigger_reason_bitmask;
@@ -1042,27 +1039,27 @@ struct csr_roamstruct {
* the 2.4 GHz band, meaning. it is NOT operating in the 5.0 GHz band.
*/
#define CSR_IS_24_BAND_ONLY(pMac) \
- (BAND_2G == (pMac)->roam.configParam.eBand)
+ (BAND_2G == (pMac)->mlme_cfg->gen.band)
#define CSR_IS_5G_BAND_ONLY(pMac) \
- (BAND_5G == (pMac)->roam.configParam.eBand)
+ (BAND_5G == (pMac)->mlme_cfg->gen.band)
#define CSR_IS_RADIO_DUAL_BAND(pMac) \
- (BAND_ALL == (pMac)->roam.configParam.bandCapability)
+ (BAND_ALL == (pMac)->mlme_cfg->gen.band_capability)
#define CSR_IS_RADIO_BG_ONLY(pMac) \
- (BAND_2G == (pMac)->roam.configParam.bandCapability)
+ (BAND_2G == (pMac)->mlme_cfg->gen.band_capability)
/*
* this function returns true if the NIC is operating exclusively in the 5.0 GHz
* band, meaning. it is NOT operating in the 2.4 GHz band
*/
#define CSR_IS_RADIO_A_ONLY(pMac) \
- (BAND_5G == (pMac)->roam.configParam.bandCapability)
+ (BAND_5G == (pMac)->mlme_cfg->gen.band_capability)
/* this function returns true if the NIC is operating in both bands. */
#define CSR_IS_OPEARTING_DUAL_BAND(pMac) \
- ((BAND_ALL == (pMac)->roam.configParam.bandCapability) && \
- (BAND_ALL == (pMac)->roam.configParam.eBand))
+ ((BAND_ALL == (pMac)->mlme_cfg->gen.band_capability) && \
+ (BAND_ALL == (pMac)->mlme_cfg->gen.band))
/*
* this function returns true if the NIC can operate in the 5.0 GHz band
* (could operate in the 2.4 GHz band also)
diff --git a/core/sme/inc/sme_api.h b/core/sme/inc/sme_api.h
index ffea233ea0..860019d443 100644
--- a/core/sme/inc/sme_api.h
+++ b/core/sme/inc/sme_api.h
@@ -2023,6 +2023,24 @@ int sme_cli_set_command(int vdev_id, int param_id, int sval, int vpdev);
QDF_STATUS sme_set_bt_activity_info_cb(mac_handle_t mac_handle,
bt_activity_info_cb cb);
+/**
+ * sme_set_enable_mem_deep_sleep - set the mem deep sleep config to FW
+ * @mac_handle: handle returned by mac_open
+ * @vdev_id: vdev id
+ *
+ * Return: 0 for success else failure code
+ */
+int sme_set_enable_mem_deep_sleep(mac_handle_t mac_handle, int vdev_id);
+
+/**
+ * sme_set_cck_tx_fir_override - set the CCK TX FIR Override to FW
+ * @mac_handle: handle returned by mac_open
+ * @vdev_id: vdev id
+ *
+ * Return: 0 for success else failure code
+ */
+int sme_set_cck_tx_fir_override(mac_handle_t mac_handle, int vdev_id);
+
/**
* sme_set_smps_cfg() - set SMPS config params
* @vdev_id: virtual device for the command
diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c
index a3a53a368d..a73ad43bb0 100644
--- a/core/sme/src/common/sme_api.c
+++ b/core/sme/src/common/sme_api.c
@@ -15709,6 +15709,25 @@ int sme_cli_set_command(int vdev_id, int param_id, int sval, int vpdev)
return wma_cli_set_command(vdev_id, param_id, sval, vpdev);
}
+int sme_set_enable_mem_deep_sleep(mac_handle_t mac_handle, int vdev_id)
+{
+ tpAniSirGlobal mac_ctx = MAC_CONTEXT(mac_handle);
+
+ return wma_cli_set_command(vdev_id, WMI_PDEV_PARAM_HYST_EN,
+ mac_ctx->mlme_cfg->gen.memory_deep_sleep,
+ PDEV_CMD);
+}
+
+int sme_set_cck_tx_fir_override(mac_handle_t mac_handle, int vdev_id)
+{
+ tpAniSirGlobal mac_ctx = MAC_CONTEXT(mac_handle);
+
+ return wma_cli_set_command(vdev_id,
+ WMI_PDEV_PARAM_ENABLE_CCK_TXFIR_OVERRIDE,
+ mac_ctx->mlme_cfg->gen.cck_tx_fir_override,
+ PDEV_CMD);
+}
+
QDF_STATUS sme_set_bt_activity_info_cb(mac_handle_t mac_handle,
bt_activity_info_cb cb)
{
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index e242d6871f..41ee2b3f24 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -1663,7 +1663,7 @@ void csr_assign_rssi_for_category(tpAniSirGlobal pMac, int8_t bestApRssi,
pMac->roam.configParam.RSSICat[CSR_NUM_RSSI_CAT - i -
1] =
(int)bestApRssi -
- pMac->roam.configParam.nSelect5GHzMargin -
+ pMac->mlme_cfg->gen.select_5ghz_margin -
(int)(i * catOffset);
}
}
@@ -3035,8 +3035,6 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac,
pParam->disable_high_ht_mcs_2x2;
pMac->roam.configParam.max_amsdu_num =
pParam->max_amsdu_num;
- pMac->roam.configParam.nSelect5GHzMargin =
- pParam->nSelect5GHzMargin;
pMac->roam.configParam.ho_delay_for_rx =
pParam->ho_delay_for_rx;
pMac->roam.configParam.min_delay_btw_roam_scans =
@@ -3284,7 +3282,6 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam)
pParam->wep_tkip_in_he = cfg_params->wep_tkip_in_he;
pParam->disable_high_ht_mcs_2x2 = cfg_params->disable_high_ht_mcs_2x2;
pParam->max_amsdu_num = cfg_params->max_amsdu_num;
- pParam->nSelect5GHzMargin = cfg_params->nSelect5GHzMargin;
pParam->ho_delay_for_rx = cfg_params->ho_delay_for_rx;
pParam->min_delay_btw_roam_scans = cfg_params->min_delay_btw_roam_scans;
pParam->roam_trigger_reason_bitmask =
@@ -18218,7 +18215,7 @@ csr_update_roam_scan_offload_request(tpAniSirGlobal mac_ctx,
req_buf->R0KH_ID_Length);
req_buf->Prefer5GHz = mac_ctx->roam.configParam.nRoamPrefer5GHz;
req_buf->RoamRssiCatGap = mac_ctx->roam.configParam.bCatRssiOffset;
- req_buf->Select5GHzMargin = mac_ctx->roam.configParam.nSelect5GHzMargin;
+ req_buf->Select5GHzMargin = mac_ctx->mlme_cfg->gen.select_5ghz_margin;
req_buf->ho_delay_for_rx = mac_ctx->roam.configParam.ho_delay_for_rx;
req_buf->min_delay_btw_roam_scans =
mac_ctx->roam.configParam.min_delay_btw_roam_scans;