diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c
index c5776ce070..49f2569593 100644
--- a/components/mlme/core/src/wlan_mlme_main.c
+++ b/components/mlme/core/src/wlan_mlme_main.c
@@ -22,6 +22,8 @@
#include "wlan_mlme_main.h"
#include "cfg_ucfg_api.h"
#include "wmi_unified.h"
+#include "wlan_scan_public_structs.h"
+#include "cfg_mlme_threshold.h"
struct wlan_mlme_psoc_obj *mlme_get_psoc_obj(struct wlan_objmgr_psoc *psoc)
{
@@ -593,6 +595,12 @@ static void mlme_init_obss_ht40_cfg(struct wlan_objmgr_psoc *psoc,
obss_ht40->scan_activity_threshold = (uint32_t)
cfg_default(CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD);
}
+static void mlme_init_threshold_cfg(struct wlan_objmgr_psoc *psoc,
+ struct wlan_mlme_threshold *threshold)
+{
+ threshold->rts_threshold = cfg_get(psoc, CFG_RTS_THRESHOLD);
+ threshold->frag_threshold = cfg_get(psoc, CFG_FRAG_THRESHOLD);
+}
static void mlme_init_sta_cfg(struct wlan_objmgr_psoc *psoc,
struct wlan_mlme_sta_cfg *sta)
@@ -969,6 +977,7 @@ QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
mlme_init_lfr_cfg(psoc, &mlme_cfg->lfr);
mlme_init_feature_flag_in_cfg(psoc, &mlme_cfg->feature_flags);
mlme_init_scoring_cfg(psoc, &mlme_cfg->scoring);
+ mlme_init_threshold_cfg(psoc, &mlme_cfg->threshold);
mlme_init_oce_cfg(psoc, &mlme_cfg->oce);
mlme_init_wep_cfg(&mlme_cfg->wep_params);
diff --git a/components/mlme/dispatcher/inc/cfg_mlme.h b/components/mlme/dispatcher/inc/cfg_mlme.h
index b422de566d..21103632ea 100644
--- a/components/mlme/dispatcher/inc/cfg_mlme.h
+++ b/components/mlme/dispatcher/inc/cfg_mlme.h
@@ -39,6 +39,7 @@
#include "cfg_mlme_sap.h"
#include "cfg_mlme_scoring.h"
#include "cfg_mlme_oce.h"
+#include "cfg_mlme_threshold.h"
#include "cfg_mlme_feature_flag.h"
#include "cfg_mlme_wep_params.h"
@@ -61,6 +62,8 @@
CFG_SCORING_ALL \
CFG_STA_ALL \
CFG_VHT_CAPS_ALL \
- CFG_WEP_PARAMS_ALL
+ CFG_WEP_PARAMS_ALL \
+ CFG_THRESHOLD_ALL \
+ CFG_VHT_CAPS_ALL
#endif /* __CFG_MLME_H */
diff --git a/components/mlme/dispatcher/inc/cfg_mlme_threshold.h b/components/mlme/dispatcher/inc/cfg_mlme_threshold.h
new file mode 100644
index 0000000000..8134c3fd1d
--- /dev/null
+++ b/components/mlme/dispatcher/inc/cfg_mlme_threshold.h
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/**
+ * DOC: This file contains centralized definitions of converged configuration.
+ */
+
+#ifndef __CFG_MLME_THRESHOLD_H
+#define __CFG_MLME_THRESHOLD_H
+
+#include "wni_cfg.h"
+
+/*
+ *
+ * RTSThreshold - Will provide RTSThreshold
+ * @Min: 0
+ * @Max: 1048576
+ * @Default: 2347
+ *
+ * This ini is used to set default RTSThreshold
+ * If minimum value 0 is selectd then it will use always RTS
+ * max is the max frame size
+ *
+ * Related: None
+ *
+ * Supported Feature: STA
+ *
+ * Usage: Internal/External
+ *
+ *
+ */
+
+#define CFG_RTS_THRESHOLD CFG_INI_UINT( \
+ "RTSThreshold", \
+ 0, \
+ 1048576, \
+ 2347, \
+ CFG_VALUE_OR_DEFAULT, \
+ "Default RTS Threshold")
+
+/*
+ *
+ * gFragmentationThreshold - It will set fragmentation threshold
+ * @Min: 256
+ * @Max: 8000
+ * @Default: 8000
+ *
+ * This ini is used to indicate default fragmentation threshold
+ *
+ * Related: None
+ *
+ * Supported Feature: STA
+ *
+ * Usage: Internal/External
+ *
+ *
+ */
+
+#define CFG_FRAG_THRESHOLD CFG_INI_UINT( \
+ "gFragmentationThreshold", \
+ 256, \
+ 8000, \
+ 8000, \
+ CFG_VALUE_OR_DEFAULT, \
+ "Default Fragmentation Threshold")
+
+#define CFG_THRESHOLD_ALL \
+ CFG(CFG_RTS_THRESHOLD) \
+ CFG(CFG_FRAG_THRESHOLD)
+
+#endif /* __CFG_MLME_MAIN_H */
diff --git a/components/mlme/dispatcher/inc/wlan_mlme_api.h b/components/mlme/dispatcher/inc/wlan_mlme_api.h
index 2dfd9d0100..77fbbb4c50 100644
--- a/components/mlme/dispatcher/inc/wlan_mlme_api.h
+++ b/components/mlme/dispatcher/inc/wlan_mlme_api.h
@@ -329,6 +329,48 @@ QDF_STATUS wlan_mlme_get_oce_sta_enabled_info(struct wlan_objmgr_psoc *psoc,
QDF_STATUS wlan_mlme_get_oce_sap_enabled_info(struct wlan_objmgr_psoc *psoc,
bool *value);
+/**
+ * wlan_mlme_get_rts_threshold() - Get the RTS threshold config
+ * @psoc: pointer to psoc object
+ * @value: pointer to the value which will be filled for the caller
+ *
+ * Return: QDF Status
+ */
+QDF_STATUS wlan_mlme_get_rts_threshold(struct wlan_objmgr_psoc *psoc,
+ uint32_t *value);
+
+/**
+ * wlan_mlme_set_rts_threshold() - Set the RTS threshold config
+ * @psoc: pointer to psoc object
+ * @value: Value that needs to be set from the caller
+ *
+ * Return: QDF Status
+ */
+QDF_STATUS wlan_mlme_set_rts_threshold(struct wlan_objmgr_psoc *psoc,
+ uint32_t value);
+
+/**
+ * wlan_mlme_get_frag_threshold() - Get the Fragmentation threshold
+ * config
+ * @psoc: pointer to psoc object
+ * @value: pointer to the value which will be filled for the caller
+ *
+ * Return: QDF Status
+ */
+QDF_STATUS wlan_mlme_get_frag_threshold(struct wlan_objmgr_psoc *psoc,
+ uint32_t *value);
+
+/**
+ * wlan_mlme_set_frag_threshold() - Set the Fragmentation threshold
+ * config
+ * @psoc: pointer to psoc object
+ * @value: Value that needs to be set from the caller
+ *
+ * Return: QDF Status
+ */
+QDF_STATUS wlan_mlme_set_frag_threshold(struct wlan_objmgr_psoc *psoc,
+ uint32_t value);
+
/**
* wlan_mlme_get_fils_enabled_info() - Get the fils enable info for driver
* @psoc: pointer to psoc object
diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
index a2058bd38c..8eb1dc96b5 100644
--- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
+++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
@@ -792,6 +792,15 @@ struct wlan_mlme_scoring_cfg {
uint32_t band_weight_per_index;
};
+/* struct wlan_mlme_threshold - Threshold related config items
+ * @rts_threshold: set rts threshold
+ * @frag_threshold: set fragmentation threshold
+ */
+struct wlan_mlme_threshold {
+ uint32_t rts_threshold;
+ uint32_t frag_threshold;
+};
+
/**
* struct wlan_mlme_oce - OCE related config items
* @enable_bcast_probe_rsp: enable broadcast probe response
@@ -847,6 +856,7 @@ struct wlan_mlme_wep_cfg {
* @sap_protection_cfg: SAP erp protection related CFG items
* @sta: sta CFG Items
* @scoring: BSS Scoring related CFG Items
+ * @threshold: threshold related cfg items
* @feature_flags: Feature flag config items
* @wep_params: WEP related config items
*/
@@ -867,6 +877,7 @@ struct wlan_mlme_cfg {
struct wlan_mlme_sta_cfg sta;
struct wlan_mlme_scoring_cfg scoring;
struct wlan_mlme_oce oce;
+ struct wlan_mlme_threshold threshold;
struct wlan_mlme_feature_flag feature_flags;
struct wlan_mlme_wep_cfg wep_params;
};
diff --git a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h
index 98fc5b2c28..74cc451d91 100644
--- a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h
+++ b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h
@@ -613,6 +613,71 @@ QDF_STATUS ucfg_mlme_get_oce_sap_enabled_info(struct wlan_objmgr_psoc *psoc,
return wlan_mlme_get_oce_sap_enabled_info(psoc, value);
}
+/**
+ * ucfg_mlme_get_rts_threshold() - Get the rts threshold config
+ * @psoc: pointer to psoc object
+ * @value: pointer to the value which will be filled for the caller
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers
+ *
+ * Return: QDF Status
+ */
+static inline
+QDF_STATUS ucfg_mlme_get_rts_threshold(struct wlan_objmgr_psoc *psoc,
+ uint32_t *value)
+{
+ return wlan_mlme_get_rts_threshold(psoc, value);
+}
+
+/**
+ * ucfg_mlme_set_rts_threshold() - Set the rts threshold config
+ * @psoc: pointer to psoc object
+ * @value: pointer to the value which will be filled for the caller
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers
+ *
+ * Return: QDF Status
+ */
+static inline
+QDF_STATUS ucfg_mlme_set_rts_threshold(struct wlan_objmgr_psoc *psoc,
+ uint32_t value)
+{
+ return wlan_mlme_set_rts_threshold(psoc, value);
+}
+
+/**
+ * ucfg_mlme_get_frag_threshold() - Get the fragmentation threshold
+ * config
+ * @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_frag_threshold(struct wlan_objmgr_psoc *psoc,
+ uint32_t *value)
+{
+ return wlan_mlme_get_frag_threshold(psoc, value);
+}
+
+/**
+ * ucfg_mlme_set_frag_threshold() - set the frag threshold config
+ * @psoc: pointer to psoc object
+ * @value: pointer to the value which will be filled for the caller
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers
+ *
+ * Return: QDF Status
+ */
+static inline
+QDF_STATUS ucfg_mlme_set_frag_threshold(struct wlan_objmgr_psoc *psoc,
+ uint32_t value)
+{
+ return wlan_mlme_set_frag_threshold(psoc, value);
+}
+
/**
* ucfg_mlme_get_fils_enabled_info() - Get fils enable/disable info
*
diff --git a/components/mlme/dispatcher/src/wlan_mlme_api.c b/components/mlme/dispatcher/src/wlan_mlme_api.c
index 934030d4fd..a07697b4be 100644
--- a/components/mlme/dispatcher/src/wlan_mlme_api.c
+++ b/components/mlme/dispatcher/src/wlan_mlme_api.c
@@ -24,6 +24,8 @@
#include "wlan_mlme_ucfg_api.h"
#include "wma_types.h"
#include "wmi_unified.h"
+#include "wma.h"
+#include "wma_internal.h"
QDF_STATUS wlan_mlme_get_cfg_str(uint8_t *dst, struct mlme_cfg_str *cfg_str,
qdf_size_t *len)
@@ -506,6 +508,90 @@ QDF_STATUS wlan_mlme_get_oce_sap_enabled_info(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_SUCCESS;
}
+QDF_STATUS wlan_mlme_get_rts_threshold(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) {
+ mlme_err("Failed to get MLME Obj");
+ return QDF_STATUS_E_FAILURE;
+ }
+ *value = mlme_obj->cfg.threshold.rts_threshold;
+
+ return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS wlan_mlme_set_rts_threshold(struct wlan_objmgr_psoc *psoc,
+ uint32_t value)
+{
+ struct wlan_mlme_psoc_obj *mlme_obj;
+ tp_wma_handle wma_handle;
+
+ wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
+
+ if (NULL == wma_handle) {
+ WMA_LOGE("%s: wma_handle is NULL", __func__);
+ return QDF_STATUS_E_INVAL;
+ }
+
+ mlme_obj = mlme_get_psoc_obj(psoc);
+
+ if (!mlme_obj) {
+ mlme_err("Failed to get MLME Obj");
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ mlme_obj->cfg.threshold.rts_threshold = value;
+ wma_update_rts_params(wma_handle, value);
+
+ return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS wlan_mlme_get_frag_threshold(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) {
+ mlme_err("Failed to get MLME Obj");
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ *value = mlme_obj->cfg.threshold.frag_threshold;
+
+ return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS wlan_mlme_set_frag_threshold(struct wlan_objmgr_psoc *psoc,
+ uint32_t value)
+{
+ struct wlan_mlme_psoc_obj *mlme_obj;
+ tp_wma_handle wma_handle;
+
+ wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
+
+ if (NULL == wma_handle) {
+ WMA_LOGE("%s: wma_handle is NULL", __func__);
+ return QDF_STATUS_E_INVAL;
+ }
+
+ mlme_obj = mlme_get_psoc_obj(psoc);
+
+ if (!mlme_obj) {
+ mlme_err("Failed to get MLME Obj");
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ mlme_obj->cfg.threshold.frag_threshold = value;
+ wma_update_frag_params(wma_handle,
+ value);
+
+ return QDF_STATUS_SUCCESS;
+}
+
QDF_STATUS wlan_mlme_get_fils_enabled_info(struct wlan_objmgr_psoc *psoc,
bool *value)
{
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index d393e8b61a..ec73daf66d 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -121,53 +121,6 @@ struct hdd_context;
#define CFG_ENABLE_NUD_TRACKING_DEFAULT (1)
#endif
-/*
- *
- * RTSThreshold - Will provide RTSThreshold
- * @Min: 0
- * @Max: 1048576
- * @Default: 2347
- *
- * This ini is used to set default RTSThreshold
- * If minimum value 0 is selectd then it will use always RTS
- *
- * Related: None
- *
- * Supported Feature: STA
- *
- * Usage: Internal/External
- *
- *
- */
-
-#define CFG_RTS_THRESHOLD_NAME "RTSThreshold"
-#define CFG_RTS_THRESHOLD_MIN WNI_CFG_RTS_THRESHOLD_STAMIN /* min is 0, meaning always use RTS. */
-#define CFG_RTS_THRESHOLD_MAX WNI_CFG_RTS_THRESHOLD_STAMAX /* max is the max frame size */
-#define CFG_RTS_THRESHOLD_DEFAULT WNI_CFG_RTS_THRESHOLD_STADEF
-
-/*
- *
- * gFragmentationThreshold - It will set fragmentation threshold
- * @Min: 256
- * @Max: 8000
- * @Default: 8000
- *
- * This ini is used to indicate default fragmentation threshold
- *
- * Related: None
- *
- * Supported Feature: STA
- *
- * Usage: Internal/External
- *
- *
- */
-
-#define CFG_FRAG_THRESHOLD_NAME "gFragmentationThreshold"
-#define CFG_FRAG_THRESHOLD_MIN WNI_CFG_FRAGMENTATION_THRESHOLD_STAMIN
-#define CFG_FRAG_THRESHOLD_MAX WNI_CFG_FRAGMENTATION_THRESHOLD_STAMAX
-#define CFG_FRAG_THRESHOLD_DEFAULT WNI_CFG_FRAGMENTATION_THRESHOLD_STADEF
-
#define CFG_OPERATING_CHANNEL_NAME "gOperatingChannel"
#define CFG_OPERATING_CHANNEL_MIN (0)
#define CFG_OPERATING_CHANNEL_MAX (14)
@@ -10443,8 +10396,6 @@ struct hdd_config {
bool enable_nud_tracking;
#endif
bool enable_connected_scan;
- uint32_t RTSThreshold;
- uint32_t FragmentationThreshold;
uint8_t OperatingChannel;
bool ShortSlotTimeEnabled;
bool Is11dSupportEnabled;
diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c
index 34db1bf019..16c480387f 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -376,20 +376,6 @@ struct reg_table_entry g_registry_table[] = {
CFG_ENABLE_CONNECTED_SCAN_MIN,
CFG_ENABLE_CONNECTED_SCAN_MAX),
- REG_VARIABLE(CFG_RTS_THRESHOLD_NAME, WLAN_PARAM_Integer,
- struct hdd_config, RTSThreshold,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_RTS_THRESHOLD_DEFAULT,
- CFG_RTS_THRESHOLD_MIN,
- CFG_RTS_THRESHOLD_MAX),
-
- REG_VARIABLE(CFG_FRAG_THRESHOLD_NAME, WLAN_PARAM_Integer,
- struct hdd_config, FragmentationThreshold,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_FRAG_THRESHOLD_DEFAULT,
- CFG_FRAG_THRESHOLD_MIN,
- CFG_FRAG_THRESHOLD_MAX),
-
REG_VARIABLE(CFG_OPERATING_CHANNEL_NAME, WLAN_PARAM_Integer,
struct hdd_config, OperatingChannel,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -5604,17 +5590,6 @@ bool hdd_update_config_cfg(struct hdd_context *hdd_ctx)
hdd_err("Couldn't pass on WNI_CFG_AP_LINK_MONITOR_TIMEOUT to CFG");
}
- if (sme_cfg_set_int(mac_handle, WNI_CFG_FRAGMENTATION_THRESHOLD,
- config->FragmentationThreshold) == QDF_STATUS_E_FAILURE) {
- status = false;
- hdd_err("Couldn't pass on WNI_CFG_FRAGMENTATION_THRESHOLD to CFG");
- }
- if (sme_cfg_set_int(mac_handle, WNI_CFG_RTS_THRESHOLD,
- config->RTSThreshold) == QDF_STATUS_E_FAILURE) {
- status = false;
- hdd_err("Couldn't pass on WNI_CFG_RTS_THRESHOLD to CFG");
- }
-
if (sme_cfg_set_int(mac_handle, WNI_CFG_11D_ENABLED,
config->Is11dSupportEnabled) == QDF_STATUS_E_FAILURE) {
status = false;
@@ -5778,10 +5753,6 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
/* Config params obtained from the registry
* To Do: set regulatory information here
*/
-
- smeConfig->csrConfig.RTSThreshold = pConfig->RTSThreshold;
- smeConfig->csrConfig.FragmentationThreshold =
- pConfig->FragmentationThreshold;
smeConfig->csrConfig.shortSlotTime = pConfig->ShortSlotTimeEnabled;
smeConfig->csrConfig.Is11dSupportEnabled = pConfig->Is11dSupportEnabled;
smeConfig->csrConfig.HeartbeatThresh24 = pConfig->HeartbeatThresh24;
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index c32883014a..9a83a84471 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -118,7 +118,6 @@
#include
#include
#include
-#include "wlan_mlme_ucfg_api.h"
#include "wlan_mlme_public_struct.h"
#include "wlan_extscan_ucfg_api.h"
#include "wlan_mlme_ucfg_api.h"
@@ -126,6 +125,7 @@
#include "wlan_crypto_global_api.h"
#include "wlan_nl_to_crypto_params.h"
#include "wlan_crypto_global_def.h"
+#include "cfg_mlme_threshold.h"
#include "cfg_ucfg_api.h"
#define g_mode_rates_size (12)
@@ -17541,7 +17541,6 @@ static int __wlan_hdd_cfg80211_set_wiphy_params(struct wiphy *wiphy,
u32 changed)
{
struct hdd_context *hdd_ctx = wiphy_priv(wiphy);
- mac_handle_t mac_handle;
int status;
hdd_enter();
@@ -17559,21 +17558,21 @@ static int __wlan_hdd_cfg80211_set_wiphy_params(struct wiphy *wiphy,
if (0 != status)
return status;
- mac_handle = hdd_ctx->mac_handle;
if (changed & WIPHY_PARAM_RTS_THRESHOLD) {
u32 rts_threshold = (wiphy->rts_threshold == -1) ?
- WNI_CFG_RTS_THRESHOLD_STAMAX : wiphy->rts_threshold;
+ cfg_max(CFG_RTS_THRESHOLD) :
+ wiphy->rts_threshold;
- if ((WNI_CFG_RTS_THRESHOLD_STAMIN > rts_threshold) ||
- (WNI_CFG_RTS_THRESHOLD_STAMAX < rts_threshold)) {
+ if ((cfg_min(CFG_RTS_THRESHOLD) > rts_threshold) ||
+ (cfg_max(CFG_RTS_THRESHOLD) < rts_threshold)) {
hdd_err("Invalid RTS Threshold value: %u",
rts_threshold);
return -EINVAL;
}
- if (0 != sme_cfg_set_int(mac_handle, WNI_CFG_RTS_THRESHOLD,
- rts_threshold)) {
- hdd_err("sme_cfg_set_int failed for rts_threshold value %u",
+ if (0 != ucfg_mlme_set_rts_threshold(hdd_ctx->psoc,
+ rts_threshold)) {
+ hdd_err("mlme_set_rts_threshold failed for val %u",
rts_threshold);
return -EIO;
}
@@ -17583,20 +17582,19 @@ static int __wlan_hdd_cfg80211_set_wiphy_params(struct wiphy *wiphy,
if (changed & WIPHY_PARAM_FRAG_THRESHOLD) {
u16 frag_threshold = (wiphy->frag_threshold == -1) ?
- WNI_CFG_FRAGMENTATION_THRESHOLD_STAMAX :
+ cfg_max(CFG_FRAG_THRESHOLD) :
wiphy->frag_threshold;
- if ((WNI_CFG_FRAGMENTATION_THRESHOLD_STAMIN > frag_threshold) ||
- (WNI_CFG_FRAGMENTATION_THRESHOLD_STAMAX < frag_threshold)) {
+ if ((cfg_min(CFG_FRAG_THRESHOLD) > frag_threshold) ||
+ (cfg_max(CFG_FRAG_THRESHOLD) < frag_threshold)) {
hdd_err("Invalid frag_threshold value %hu",
frag_threshold);
return -EINVAL;
}
- if (0 != sme_cfg_set_int(mac_handle,
- WNI_CFG_FRAGMENTATION_THRESHOLD,
- frag_threshold)) {
- hdd_err("sme_cfg_set_int failed for frag_threshold value %hu",
+ if (0 != ucfg_mlme_set_frag_threshold(hdd_ctx->psoc,
+ frag_threshold)) {
+ hdd_err("mlme_set_frag_threshold failed for val %hu",
frag_threshold);
return -EIO;
}
diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c
index 9df4df05ea..6c36de8a96 100644
--- a/core/hdd/src/wlan_hdd_wext.c
+++ b/core/hdd/src/wlan_hdd_wext.c
@@ -101,6 +101,9 @@
#include "wlan_mlme_ucfg_api.h"
#include "cfg_mlme_sta.h"
#include "cfg_ucfg_api.h"
+#include "wlan_mlme_public_struct.h"
+#include "cfg_ucfg_api.h"
+#include "cfg_mlme_threshold.h"
#define HDD_FINISH_ULA_TIME_OUT 800
#define HDD_SET_MCBC_FILTERS_TO_FW 1
@@ -4449,21 +4452,26 @@ static int __iw_setint_getnone(struct net_device *dev,
case WE_SET_RTSCTS:
{
uint32_t value;
+ uint32_t rts_threshold_val;
if (!mac_handle)
return -EINVAL;
hdd_debug("WMI_VDEV_PARAM_ENABLE_RTSCTS val 0x%x", set_value);
+ status = ucfg_mlme_get_rts_threshold(hdd_ctx->psoc,
+ &rts_threshold_val);
+ if (!QDF_IS_STATUS_SUCCESS(status)) {
+ hdd_err("Get rts threshold failed");
+ return -EINVAL;
+ }
if ((set_value & HDD_RTSCTS_EN_MASK) ==
HDD_RTSCTS_ENABLE)
- value =
- (WLAN_HDD_GET_CTX(adapter))->config->
- RTSThreshold;
+ value = rts_threshold_val;
else if (((set_value & HDD_RTSCTS_EN_MASK) == 0)
|| ((set_value & HDD_RTSCTS_EN_MASK) ==
HDD_CTS_ENABLE)) {
- value = WNI_CFG_RTS_THRESHOLD_STAMAX;
+ value = cfg_max(CFG_RTS_THRESHOLD);
} else {
ret = -EIO;
break;
@@ -4473,8 +4481,9 @@ static int __iw_setint_getnone(struct net_device *dev,
WMI_VDEV_PARAM_ENABLE_RTSCTS,
set_value, VDEV_CMD);
if (!ret) {
- if (sme_cfg_set_int(mac_handle, WNI_CFG_RTS_THRESHOLD,
- value) != QDF_STATUS_SUCCESS) {
+ if (ucfg_mlme_set_rts_threshold(hdd_ctx->psoc,
+ value) !=
+ QDF_STATUS_SUCCESS) {
hdd_err("FAILED TO SET RTSCTS");
ret = -EIO;
break;
diff --git a/core/mac/inc/wni_cfg.h b/core/mac/inc/wni_cfg.h
index cda39c1d3b..8c5554ea18 100644
--- a/core/mac/inc/wni_cfg.h
+++ b/core/mac/inc/wni_cfg.h
@@ -35,8 +35,6 @@ enum {
WNI_CFG_WEP_DEFAULT_KEY_3,
WNI_CFG_WEP_DEFAULT_KEY_4,
WNI_CFG_WEP_DEFAULT_KEYID,
- WNI_CFG_RTS_THRESHOLD,
- WNI_CFG_FRAGMENTATION_THRESHOLD,
WNI_CFG_ACTIVE_MAXIMUM_CHANNEL_TIME,
WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME,
WNI_CFG_JOIN_FAILURE_TIMEOUT,
@@ -344,14 +342,6 @@ enum {
#define WNI_CFG_EXCLUDE_UNENCRYPTED_STAMAX 1
#define WNI_CFG_EXCLUDE_UNENCRYPTED_STADEF 0
-#define WNI_CFG_RTS_THRESHOLD_STAMIN 0
-#define WNI_CFG_RTS_THRESHOLD_STAMAX 1048576
-#define WNI_CFG_RTS_THRESHOLD_STADEF 2347
-
-#define WNI_CFG_FRAGMENTATION_THRESHOLD_STAMIN 256
-#define WNI_CFG_FRAGMENTATION_THRESHOLD_STAMAX 8000
-#define WNI_CFG_FRAGMENTATION_THRESHOLD_STADEF 8000
-
#define WNI_CFG_ACTIVE_MAXIMUM_CHANNEL_TIME_STAMIN 0
#define WNI_CFG_ACTIVE_MAXIMUM_CHANNEL_TIME_STAMAX 65535
#define WNI_CFG_ACTIVE_MAXIMUM_CHANNEL_TIME_STADEF 40
diff --git a/core/mac/src/cfg/cfg_param_name.c b/core/mac/src/cfg/cfg_param_name.c
index 71ba520092..61b31a55ec 100644
--- a/core/mac/src/cfg/cfg_param_name.c
+++ b/core/mac/src/cfg/cfg_param_name.c
@@ -50,8 +50,6 @@ const char *cfg_get_string(uint16_t cfg_id)
CASE_RETURN_STRING(WNI_CFG_WEP_DEFAULT_KEY_3);
CASE_RETURN_STRING(WNI_CFG_WEP_DEFAULT_KEY_4);
CASE_RETURN_STRING(WNI_CFG_WEP_DEFAULT_KEYID);
- CASE_RETURN_STRING(WNI_CFG_RTS_THRESHOLD);
- CASE_RETURN_STRING(WNI_CFG_FRAGMENTATION_THRESHOLD);
CASE_RETURN_STRING(WNI_CFG_ACTIVE_MAXIMUM_CHANNEL_TIME);
CASE_RETURN_STRING(WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME);
CASE_RETURN_STRING(WNI_CFG_JOIN_FAILURE_TIMEOUT);
diff --git a/core/mac/src/cfg/cfg_proc_msg.c b/core/mac/src/cfg/cfg_proc_msg.c
index 0a34035afb..679d9ade28 100644
--- a/core/mac/src/cfg/cfg_proc_msg.c
+++ b/core/mac/src/cfg/cfg_proc_msg.c
@@ -71,18 +71,6 @@ cgstatic cfg_static[CFG_PARAM_MAX_NUM] = {
WNI_CFG_WEP_DEFAULT_KEYID_STAMIN,
WNI_CFG_WEP_DEFAULT_KEYID_STAMAX,
WNI_CFG_WEP_DEFAULT_KEYID_STADEF},
- {WNI_CFG_RTS_THRESHOLD,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
- CFG_CTL_NTF_TARGET,
- WNI_CFG_RTS_THRESHOLD_STAMIN,
- WNI_CFG_RTS_THRESHOLD_STAMAX,
- WNI_CFG_RTS_THRESHOLD_STADEF},
- {WNI_CFG_FRAGMENTATION_THRESHOLD,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
- CFG_CTL_NTF_TARGET,
- WNI_CFG_FRAGMENTATION_THRESHOLD_STAMIN,
- WNI_CFG_FRAGMENTATION_THRESHOLD_STAMAX,
- WNI_CFG_FRAGMENTATION_THRESHOLD_STADEF},
{WNI_CFG_ACTIVE_MAXIMUM_CHANNEL_TIME,
CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT,
WNI_CFG_ACTIVE_MAXIMUM_CHANNEL_TIME_STAMIN,
diff --git a/core/mac/src/dph/dph_hash_table.c b/core/mac/src/dph/dph_hash_table.c
index 584938575b..d88e58f913 100644
--- a/core/mac/src/dph/dph_hash_table.c
+++ b/core/mac/src/dph/dph_hash_table.c
@@ -34,6 +34,7 @@
#include "dph_global.h"
#include "lim_api.h"
#include "wma_if.h"
+#include "wlan_mlme_api.h"
/* --------------------------------------------------------------------- */
/**
@@ -258,8 +259,8 @@ tpDphHashNode dph_init_sta_state(tpAniSirGlobal pMac, tSirMacAddr staAddr,
qdf_mem_copy(pStaDs->staAddr, staAddr, sizeof(tSirMacAddr));
/* Initialize fragmentation threshold */
- if (wlan_cfg_get_int(pMac, WNI_CFG_FRAGMENTATION_THRESHOLD, &val) !=
- QDF_STATUS_SUCCESS)
+ if (wlan_mlme_get_frag_threshold(pMac->psoc, &val) !=
+ QDF_STATUS_SUCCESS)
pe_warn("could not retrieve fragmentation threshold");
else
pStaDs->fragSize = (uint16_t) val;
diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h
index f84936f9c7..a1c9da04b5 100644
--- a/core/sme/inc/csr_api.h
+++ b/core/sme/inc/csr_api.h
@@ -1042,13 +1042,11 @@ struct csr_neighbor_report_offload_params {
};
typedef struct tagCsrConfigParam {
- uint32_t FragmentationThreshold;
/* keep this uint32_t. This gets converted to ePhyChannelBondState */
uint32_t channelBondingMode24GHz;
uint32_t channelBondingMode5GHz;
eCsrPhyMode phyMode;
enum band_info eBand;
- uint32_t RTSThreshold;
uint32_t HeartbeatThresh50;
uint32_t HeartbeatThresh24;
enum band_info bandCapability; /* indicate hw capability */
diff --git a/core/sme/inc/csr_internal.h b/core/sme/inc/csr_internal.h
index 5ef949ba66..41c8575de6 100644
--- a/core/sme/inc/csr_internal.h
+++ b/core/sme/inc/csr_internal.h
@@ -400,10 +400,8 @@ struct csr_neighbor_roamconfig {
struct csr_config {
uint32_t agingCount;
- uint32_t FragmentationThreshold;
uint32_t channelBondingMode24GHz;
uint32_t channelBondingMode5GHz;
- uint32_t RTSThreshold;
eCsrPhyMode phyMode;
enum csr_cfgdot11mode uCfgDot11Mode;
enum band_info eBand;
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index ed2685c7d9..9c53155a59 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -54,6 +54,7 @@
#include
#include
#include
+#include "wlan_mlme_api.h"
#include
#include "wlan_mlme_public_struct.h"
#include "cfg_mlme.h"
@@ -1317,10 +1318,8 @@ void csr_set_default_dot11_mode(tpAniSirGlobal pMac)
void csr_set_global_cfgs(tpAniSirGlobal pMac)
{
-
- cfg_set_int(pMac, WNI_CFG_FRAGMENTATION_THRESHOLD,
- csr_get_frag_thresh(pMac));
- cfg_set_int(pMac, WNI_CFG_RTS_THRESHOLD, csr_get_rts_thresh(pMac));
+ wlan_mlme_set_frag_threshold(pMac->psoc, csr_get_frag_thresh(pMac));
+ wlan_mlme_set_rts_threshold(pMac->psoc, csr_get_rts_thresh(pMac));
cfg_set_int(pMac, WNI_CFG_11D_ENABLED,
((pMac->roam.configParam.Is11hSupportEnabled) ?
pMac->roam.configParam.Is11dSupportEnabled :
@@ -1676,14 +1675,11 @@ static void init_config_param(tpAniSirGlobal pMac)
pMac->roam.configParam.phyMode = eCSR_DOT11_MODE_AUTO;
pMac->roam.configParam.eBand = BAND_ALL;
pMac->roam.configParam.uCfgDot11Mode = eCSR_CFG_DOT11_MODE_AUTO;
- pMac->roam.configParam.FragmentationThreshold =
- eCSR_DOT11_FRAG_THRESH_DEFAULT;
pMac->roam.configParam.HeartbeatThresh24 = 40;
pMac->roam.configParam.HeartbeatThresh50 = 40;
pMac->roam.configParam.Is11dSupportEnabled = false;
pMac->roam.configParam.Is11eSupportEnabled = true;
pMac->roam.configParam.Is11hSupportEnabled = true;
- pMac->roam.configParam.RTSThreshold = 2346;
pMac->roam.configParam.shortSlotTime = true;
pMac->roam.configParam.WMMSupportMode = eCsrRoamWmmAuto;
pMac->roam.configParam.ProprietaryRatesEnabled = true;
@@ -2773,8 +2769,6 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac,
(pParam->WMMSupportMode == eCsrRoamWmmNoQos) ? 0 : 1);
pMac->roam.configParam.Is11eSupportEnabled =
pParam->Is11eSupportEnabled;
- pMac->roam.configParam.FragmentationThreshold =
- pParam->FragmentationThreshold;
pMac->roam.configParam.Is11dSupportEnabled =
pParam->Is11dSupportEnabled;
pMac->roam.configParam.Is11hSupportEnabled =
@@ -2807,7 +2801,6 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac,
pMac->roam.configParam.channelBondingMode5GHz =
csr_convert_cb_ini_value_to_phy_cb_state(pParam->
channelBondingMode5GHz);
- pMac->roam.configParam.RTSThreshold = pParam->RTSThreshold;
pMac->roam.configParam.phyMode = pParam->phyMode;
pMac->roam.configParam.shortSlotTime = pParam->shortSlotTime;
pMac->roam.configParam.HeartbeatThresh24 =
@@ -3199,14 +3192,12 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam)
pParam->is_force_1x1 = cfg_params->is_force_1x1;
pParam->WMMSupportMode = cfg_params->WMMSupportMode;
pParam->Is11eSupportEnabled = cfg_params->Is11eSupportEnabled;
- pParam->FragmentationThreshold = cfg_params->FragmentationThreshold;
pParam->Is11dSupportEnabled = cfg_params->Is11dSupportEnabled;
pParam->Is11hSupportEnabled = cfg_params->Is11hSupportEnabled;
pParam->channelBondingMode24GHz = csr_convert_phy_cb_state_to_ini_value(
cfg_params->channelBondingMode24GHz);
pParam->channelBondingMode5GHz = csr_convert_phy_cb_state_to_ini_value(
cfg_params->channelBondingMode5GHz);
- pParam->RTSThreshold = cfg_params->RTSThreshold;
pParam->phyMode = cfg_params->phyMode;
pParam->shortSlotTime = cfg_params->shortSlotTime;
pParam->HeartbeatThresh24 = cfg_params->HeartbeatThresh24;
diff --git a/core/sme/src/csr/csr_util.c b/core/sme/src/csr/csr_util.c
index c6f54d4958..3bcc71fdb4 100644
--- a/core/sme/src/csr/csr_util.c
+++ b/core/sme/src/csr/csr_util.c
@@ -1690,12 +1690,12 @@ bool csr_is_nullssid(uint8_t *pBssSsid, uint8_t len)
uint32_t csr_get_frag_thresh(tpAniSirGlobal mac_ctx)
{
- return mac_ctx->roam.configParam.FragmentationThreshold;
+ return mac_ctx->mlme_cfg->threshold.frag_threshold;
}
uint32_t csr_get_rts_thresh(tpAniSirGlobal mac_ctx)
{
- return mac_ctx->roam.configParam.RTSThreshold;
+ return mac_ctx->mlme_cfg->threshold.rts_threshold;
}
static eCsrPhyMode csr_translate_to_phy_mode_from_bss_desc(
diff --git a/core/wma/inc/wma_internal.h b/core/wma/inc/wma_internal.h
index 5ed7c76729..96d1cf41b7 100644
--- a/core/wma/inc/wma_internal.h
+++ b/core/wma/inc/wma_internal.h
@@ -649,7 +649,9 @@ void wma_update_protection_mode(tp_wma_handle wma, uint8_t vdev_id,
void wma_process_update_beacon_params(tp_wma_handle wma,
tUpdateBeaconParams *bcn_params);
-void wma_update_cfg_params(tp_wma_handle wma, struct scheduler_msg *cfgParam);
+void wma_update_rts_params(tp_wma_handle wma, uint32_t value);
+
+void wma_update_frag_params(tp_wma_handle wma, uint32_t value);
void wma_set_bsskey(tp_wma_handle wma_handle, tpSetBssKeyParams key_info);
diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c
index 06065181a0..d6da9e1744 100644
--- a/core/wma/src/wma_dev_if.c
+++ b/core/wma/src/wma_dev_if.c
@@ -75,6 +75,7 @@
#include "init_deinit_lmac.h"
#include
#include "wlan_mlme_public_struct.h"
+#include "wlan_mlme_api.h"
/**
* wma_find_vdev_by_addr() - find vdev_id from mac address
@@ -2550,8 +2551,9 @@ struct cdp_vdev *wma_vdev_attach(tp_wma_handle wma_handle,
if (QDF_IS_STATUS_ERROR(ret))
WMA_LOGE("Failed to set WMI VDEV MCC_BROADCAST_PROBE_ENABLE");
- if (wlan_cfg_get_int(mac, WNI_CFG_RTS_THRESHOLD,
- &cfg_val) == QDF_STATUS_SUCCESS) {
+ if (wlan_mlme_get_rts_threshold(mac->psoc,
+ &cfg_val) ==
+ QDF_STATUS_SUCCESS) {
ret = wma_vdev_set_param(wma_handle->wmi_handle,
self_sta_req->session_id,
WMI_VDEV_PARAM_RTS_THRESHOLD,
@@ -2559,11 +2561,12 @@ struct cdp_vdev *wma_vdev_attach(tp_wma_handle wma_handle,
if (QDF_IS_STATUS_ERROR(ret))
WMA_LOGE("Failed to set WMI_VDEV_PARAM_RTS_THRESHOLD");
} else {
- WMA_LOGE("Failed to get value for WNI_CFG_RTS_THRESHOLD, leaving unchanged");
+ WMA_LOGE("Fail to get val for rts threshold, leave unchanged");
}
- if (wlan_cfg_get_int(mac, WNI_CFG_FRAGMENTATION_THRESHOLD,
- &cfg_val) == QDF_STATUS_SUCCESS) {
+ if (wlan_mlme_get_frag_threshold(mac->psoc,
+ &cfg_val) ==
+ QDF_STATUS_SUCCESS) {
ret = wma_vdev_set_param(wma_handle->wmi_handle,
self_sta_req->session_id,
WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
@@ -2571,7 +2574,7 @@ struct cdp_vdev *wma_vdev_attach(tp_wma_handle wma_handle,
if (QDF_IS_STATUS_ERROR(ret))
WMA_LOGE("Failed to set WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD");
} else {
- WMA_LOGE("Failed to get value for WNI_CFG_FRAGMENTATION_THRESHOLD, leaving unchanged");
+ WMA_LOGE("Fail to get val for frag threshold, leave unchanged");
}
ht_cap_info = &mac->mlme_cfg->ht_caps.ht_cap_info;
diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c
index 8aa71b2f7a..1e1f6a1b81 100644
--- a/core/wma/src/wma_main.c
+++ b/core/wma/src/wma_main.c
@@ -8019,10 +8019,6 @@ static QDF_STATUS wma_mc_process_msg(struct scheduler_msg *msg)
(tAniGetPEStatsReq *) msg->bodyptr);
break;
- case WMA_CONFIG_PARAM_UPDATE_REQ:
- wma_update_cfg_params(wma_handle, msg);
- break;
-
case WMA_UPDATE_OP_MODE:
wma_process_update_opmode(wma_handle,
(tUpdateVHTOpMode *) msg->bodyptr);
diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c
index 6d8b90b420..5f27ec4824 100644
--- a/core/wma/src/wma_mgmt.c
+++ b/core/wma/src/wma_mgmt.c
@@ -1678,52 +1678,48 @@ wma_process_update_beacon_params(tp_wma_handle wma,
}
/**
- * wma_update_cfg_params() - update cfg parameters to target
+ * wma_update_rts_params() - update cfg parameters to target
* @wma: wma handle
- * @cfgParam: cfg parameter
+ * @value: rts_threshold
*
* Return: none
*/
-void wma_update_cfg_params(tp_wma_handle wma, struct scheduler_msg *cfgParam)
+void wma_update_rts_params(tp_wma_handle wma, uint32_t value)
{
uint8_t vdev_id;
- uint32_t param_id;
- uint32_t cfg_val;
QDF_STATUS ret;
- /* get mac to access CFG data base */
- struct sAniSirGlobal *pmac;
-
- switch (cfgParam->bodyval) {
- case WNI_CFG_RTS_THRESHOLD:
- param_id = WMI_VDEV_PARAM_RTS_THRESHOLD;
- break;
- case WNI_CFG_FRAGMENTATION_THRESHOLD:
- param_id = WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD;
- break;
- default:
- WMA_LOGD("Unhandled cfg parameter %d", cfgParam->bodyval);
- return;
- }
-
- pmac = cds_get_context(QDF_MODULE_ID_PE);
-
- if (NULL == pmac) {
- WMA_LOGE("%s: Failed to get pmac", __func__);
- return;
- }
-
- if (wlan_cfg_get_int(pmac, (uint16_t) cfgParam->bodyval,
- &cfg_val) != QDF_STATUS_SUCCESS) {
- WMA_LOGE("Failed to get value for CFG PARAMS %d. returning without updating",
- cfgParam->bodyval);
- return;
- }
for (vdev_id = 0; vdev_id < wma->max_bssid; vdev_id++) {
if (wma->interfaces[vdev_id].handle != 0) {
ret = wma_vdev_set_param(wma->wmi_handle,
- vdev_id, param_id,
- cfg_val);
+ vdev_id,
+ WMI_VDEV_PARAM_RTS_THRESHOLD,
+ value);
+ if (QDF_IS_STATUS_ERROR(ret))
+ WMA_LOGE("Update cfg param fail for vdevId %d",
+ vdev_id);
+ }
+ }
+}
+
+/**
+ * wma_update_frag_params() - update cfg parameters to target
+ * @wma: wma handle
+ * @value: frag_threshold
+ *
+ * Return: none
+ */
+void wma_update_frag_params(tp_wma_handle wma, uint32_t value)
+{
+ uint8_t vdev_id;
+ QDF_STATUS ret;
+
+ for (vdev_id = 0; vdev_id < wma->max_bssid; vdev_id++) {
+ if (wma->interfaces[vdev_id].handle != 0) {
+ ret = wma_vdev_set_param(wma->wmi_handle,
+ vdev_id,
+ WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
+ value);
if (QDF_IS_STATUS_ERROR(ret))
WMA_LOGE("Update cfg params failed for vdevId %d",
vdev_id);