qcacld-3.0: Add CFG/INI items to mlme component

Add following mlme CFG items to mlme component

1.CFG_RTS_THRESHOLD
2.CFG_FRAGMENTATION_THRESHOLD

Change-Id: I07b5dcffe8d3d03fa2cbecc7be563c407dc4d61e
CRs-Fixed: 2313600
This commit is contained in:
Harprit Chhabada
2018-09-10 10:21:15 -07:00
committed by nshrivas
parent 56274a1ba7
commit 1e536eab0c
7 changed files with 303 additions and 1 deletions

View File

@@ -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)
{