qcacld-3.0: Add MLME CFG items and APIs
Add the basic infra for MLME CFG items and the APIs to be used from other components. Change-Id: I39654de8f7266089d574b85437a19e8d21f91249 CRs-Fixed: 2293825
This commit is contained in:

committed by
nshrivas

parent
84513f8ecd
commit
139f86420c
@@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include "cfg_define.h"
|
#include "cfg_define.h"
|
||||||
#include "cfg_converged.h"
|
#include "cfg_converged.h"
|
||||||
|
#include "cfg_mlme.h"
|
||||||
|
|
||||||
#ifdef CONVERGED_P2P_ENABLE
|
#ifdef CONVERGED_P2P_ENABLE
|
||||||
#include "wlan_p2p_cfg.h"
|
#include "wlan_p2p_cfg.h"
|
||||||
@@ -37,8 +38,10 @@
|
|||||||
#define CFG_NAN_ALL
|
#define CFG_NAN_ALL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Maintain Alphabetic order here while adding components */
|
||||||
#define CFG_ALL \
|
#define CFG_ALL \
|
||||||
CFG_CONVERGED_ALL \
|
CFG_CONVERGED_ALL \
|
||||||
|
CFG_MLME_ALL \
|
||||||
|
CFG_NAN_ALL \
|
||||||
CFG_P2P_ALL \
|
CFG_P2P_ALL \
|
||||||
CFG_TDLS_ALL \
|
CFG_TDLS_ALL
|
||||||
CFG_NAN_ALL
|
|
||||||
|
@@ -16,8 +16,7 @@
|
|||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* DOC: declare utility API related to the pmo component
|
* DOC: declare internal API related to the mlme component
|
||||||
* called by other components
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _WLAN_MLME_MAIN_H_
|
#ifndef _WLAN_MLME_MAIN_H_
|
||||||
@@ -70,7 +69,7 @@ QDF_STATUS mlme_deinit(void);
|
|||||||
*
|
*
|
||||||
* Register this api with objmgr to detect psoc is created
|
* Register this api with objmgr to detect psoc is created
|
||||||
*
|
*
|
||||||
* Return QDF_STATUS status in case of success else return error
|
* Return: QDF_STATUS status in case of success else return error
|
||||||
*/
|
*/
|
||||||
QDF_STATUS mlme_psoc_object_created_notification(
|
QDF_STATUS mlme_psoc_object_created_notification(
|
||||||
struct wlan_objmgr_psoc *psoc, void *arg);
|
struct wlan_objmgr_psoc *psoc, void *arg);
|
||||||
@@ -82,8 +81,29 @@ QDF_STATUS mlme_psoc_object_created_notification(
|
|||||||
*
|
*
|
||||||
* Register this api with objmgr to detect psoc is deleted
|
* Register this api with objmgr to detect psoc is deleted
|
||||||
*
|
*
|
||||||
* Return QDF_STATUS status in case of success else return error
|
* Return: QDF_STATUS status in case of success else return error
|
||||||
*/
|
*/
|
||||||
QDF_STATUS mlme_psoc_object_destroyed_notification(
|
QDF_STATUS mlme_psoc_object_destroyed_notification(
|
||||||
struct wlan_objmgr_psoc *psoc, void *arg);
|
struct wlan_objmgr_psoc *psoc, void *arg);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* mlme_cfg_on_psoc_enable() - Populate MLME structure from CFG and INI
|
||||||
|
* @psoc: pointer to the psoc object
|
||||||
|
*
|
||||||
|
* Populate the MLME CFG structure from CFG and INI values using CFG APIs
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS
|
||||||
|
*/
|
||||||
|
QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* mlme_get_psoc_obj() - Get MLME object from psoc
|
||||||
|
* @psoc: pointer to the psoc object
|
||||||
|
*
|
||||||
|
* Get the MLME object pointer from the psoc
|
||||||
|
*
|
||||||
|
* Return: pointer to MLME object
|
||||||
|
*/
|
||||||
|
struct wlan_mlme_psoc_obj *mlme_get_psoc_obj(struct wlan_objmgr_psoc *psoc);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -16,20 +16,13 @@
|
|||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* DOC: define utility API related to the mlme component
|
* DOC: define internal APIs related to the mlme component
|
||||||
* called by other components
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "wlan_mlme_main.h"
|
#include "wlan_mlme_main.h"
|
||||||
|
#include "cfg_ucfg_api.h"
|
||||||
|
|
||||||
/**
|
struct wlan_mlme_psoc_obj *mlme_get_psoc_obj(struct wlan_objmgr_psoc *psoc)
|
||||||
* wlan_psoc_get_mlme_obj() - private API to get mlme object from psoc
|
|
||||||
* @psoc: psoc object
|
|
||||||
*
|
|
||||||
* Return: mlme object
|
|
||||||
*/
|
|
||||||
static inline struct wlan_mlme_psoc_obj *
|
|
||||||
wlan_psoc_get_mlme_obj(struct wlan_objmgr_psoc *psoc)
|
|
||||||
{
|
{
|
||||||
struct wlan_mlme_psoc_obj *mlme_obj;
|
struct wlan_mlme_psoc_obj *mlme_obj;
|
||||||
|
|
||||||
@@ -116,7 +109,7 @@ QDF_STATUS mlme_psoc_object_destroyed_notification(
|
|||||||
struct wlan_mlme_psoc_obj *mlme_obj = NULL;
|
struct wlan_mlme_psoc_obj *mlme_obj = NULL;
|
||||||
QDF_STATUS status;
|
QDF_STATUS status;
|
||||||
|
|
||||||
mlme_obj = wlan_psoc_get_mlme_obj(psoc);
|
mlme_obj = mlme_get_psoc_obj(psoc);
|
||||||
|
|
||||||
status = wlan_objmgr_psoc_component_obj_detach(psoc,
|
status = wlan_objmgr_psoc_component_obj_detach(psoc,
|
||||||
WLAN_UMAC_COMP_MLME,
|
WLAN_UMAC_COMP_MLME,
|
||||||
@@ -133,3 +126,43 @@ out:
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void mlme_update_ht_cap_in_cfg(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct mlme_ht_capabilities_info
|
||||||
|
*ht_cap_info)
|
||||||
|
{
|
||||||
|
union {
|
||||||
|
uint16_t val_16;
|
||||||
|
struct mlme_ht_capabilities_info default_ht_cap_info;
|
||||||
|
} u;
|
||||||
|
|
||||||
|
u.val_16 = (uint16_t)cfg_default(CFG_HT_CAP_INFO);
|
||||||
|
|
||||||
|
u.default_ht_cap_info.advCodingCap = cfg_get(psoc, CFG_RX_LDPC_ENABLE);
|
||||||
|
u.default_ht_cap_info.rxSTBC = cfg_get(psoc, CFG_RX_STBC_ENABLE);
|
||||||
|
u.default_ht_cap_info.txSTBC = cfg_get(psoc, CFG_TX_STBC_ENABLE);
|
||||||
|
u.default_ht_cap_info.shortGI20MHz =
|
||||||
|
cfg_get(psoc, CFG_SHORT_GI_20MHZ);
|
||||||
|
u.default_ht_cap_info.shortGI40MHz =
|
||||||
|
cfg_get(psoc, CFG_SHORT_GI_40MHZ);
|
||||||
|
|
||||||
|
*ht_cap_info = u.default_ht_cap_info;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
struct wlan_mlme_psoc_obj *mlme_obj;
|
||||||
|
struct wlan_mlme_cfg *mlme_cfg;
|
||||||
|
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||||
|
|
||||||
|
mlme_obj = mlme_get_psoc_obj(psoc);
|
||||||
|
if (!mlme_obj) {
|
||||||
|
mlme_err("Failed to get MLME Obj");
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
mlme_cfg = &mlme_obj->cfg;
|
||||||
|
mlme_update_ht_cap_in_cfg(psoc, &mlme_cfg->ht_caps.ht_cap_info);
|
||||||
|
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
34
mlme/dispatcher/inc/cfg_mlme.h
Normal file
34
mlme/dispatcher/inc/cfg_mlme.h
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __CFG_MLME_H
|
||||||
|
#define __CFG_MLME_H
|
||||||
|
|
||||||
|
#include "cfg_define.h"
|
||||||
|
#include "cfg_converged.h"
|
||||||
|
#include "qdf_types.h"
|
||||||
|
|
||||||
|
#include "cfg_mlme_ht_caps.h"
|
||||||
|
#include "cfg_mlme_vht_caps.h"
|
||||||
|
|
||||||
|
#define CFG_MLME_ALL \
|
||||||
|
CFG_HT_CAPS_ALL \
|
||||||
|
CFG_VHT_CAPS_ALL
|
||||||
|
|
||||||
|
#endif /* __CFG_MLME_H */
|
||||||
|
|
185
mlme/dispatcher/inc/cfg_mlme_ht_caps.h
Normal file
185
mlme/dispatcher/inc/cfg_mlme_ht_caps.h
Normal file
@@ -0,0 +1,185 @@
|
|||||||
|
/*
|
||||||
|
* 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_HT_CAPS_H
|
||||||
|
#define __CFG_MLME_HT_CAPS_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* gTxLdpcEnable - Config Param to enable Tx LDPC capability
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 3
|
||||||
|
* @Default: 3
|
||||||
|
*
|
||||||
|
* This ini is used to enable/disable Tx LDPC capability
|
||||||
|
* 0 - disable
|
||||||
|
* 1 - HT LDPC enable
|
||||||
|
* 2 - VHT LDPC enable
|
||||||
|
* 3 - HT & VHT LDPC enable
|
||||||
|
*
|
||||||
|
* Related: STA/SAP/P2P/IBSS/NAN.
|
||||||
|
*
|
||||||
|
* Supported Feature: Concurrency/Standalone
|
||||||
|
*
|
||||||
|
* Usage: Internal/External
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
|
#define CFG_TX_LDPC_ENABLE CFG_INI_UINT( \
|
||||||
|
"gTxLdpcEnable", \
|
||||||
|
0, \
|
||||||
|
3, \
|
||||||
|
3, \
|
||||||
|
CFG_VALUE_OR_DEFAULT, \
|
||||||
|
"Tx LDPC capability")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* gEnableRXLDPC - Config Param to enable Rx LDPC capability
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 1
|
||||||
|
* @Default: 0
|
||||||
|
*
|
||||||
|
* This ini is used to enable/disable Rx LDPC capability
|
||||||
|
* 0 - disable Rx LDPC
|
||||||
|
* 1 - enable Rx LDPC
|
||||||
|
*
|
||||||
|
* Related: STA/SAP/P2P/IBSS/NAN.
|
||||||
|
*
|
||||||
|
* Supported Feature: Concurrency/Standalone
|
||||||
|
*
|
||||||
|
* Usage: Internal/External
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
|
#define CFG_RX_LDPC_ENABLE CFG_INI_BOOL( \
|
||||||
|
"gEnableRXLDPC", \
|
||||||
|
0, \
|
||||||
|
"Rx LDPC capability")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* gEnableTXSTBC - Enables/disables Tx STBC capability in STA mode
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 1
|
||||||
|
* @Default: 0
|
||||||
|
*
|
||||||
|
* This ini is used to set default Tx STBC capability
|
||||||
|
*
|
||||||
|
* Related: None
|
||||||
|
*
|
||||||
|
* Supported Feature: STA
|
||||||
|
*
|
||||||
|
* Usage: Internal/External
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
|
#define CFG_TX_STBC_ENABLE CFG_INI_BOOL( \
|
||||||
|
"gEnableTXSTBC", \
|
||||||
|
0, \
|
||||||
|
"Tx STBC capability")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* gEnableRXSTBC - Enables/disables Rx STBC capability in STA mode
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 1
|
||||||
|
* @Default: 1
|
||||||
|
*
|
||||||
|
* This ini is used to set default Rx STBC capability
|
||||||
|
*
|
||||||
|
* Related: None
|
||||||
|
*
|
||||||
|
* Supported Feature: STA
|
||||||
|
*
|
||||||
|
* Usage: Internal/External
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
|
#define CFG_RX_STBC_ENABLE CFG_INI_BOOL( \
|
||||||
|
"gEnableRXSTBC", \
|
||||||
|
1, \
|
||||||
|
"Rx STBC capability")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* gShortGI20Mhz - Short Guard Interval for HT20
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 1
|
||||||
|
* @Default: 1
|
||||||
|
*
|
||||||
|
* This ini is used to set default short interval for HT20
|
||||||
|
*
|
||||||
|
* Related: None
|
||||||
|
*
|
||||||
|
* Supported Feature: STA
|
||||||
|
*
|
||||||
|
* Usage: Internal/External
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
|
#define CFG_SHORT_GI_20MHZ CFG_INI_BOOL( \
|
||||||
|
"gShortGI20Mhz", \
|
||||||
|
1, \
|
||||||
|
"Short Guard Interval for HT20")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* gShortGI40Mhz - It will check gShortGI20Mhz and
|
||||||
|
* gShortGI40Mhz from session entry
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 1
|
||||||
|
* @Default: 1
|
||||||
|
*
|
||||||
|
* This ini is used to set default gShortGI40Mhz
|
||||||
|
*
|
||||||
|
* Related: None
|
||||||
|
*
|
||||||
|
* Supported Feature: STA
|
||||||
|
*
|
||||||
|
* Usage: Internal/External
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
|
#define CFG_SHORT_GI_40MHZ CFG_INI_BOOL( \
|
||||||
|
"gShortGI40Mhz", \
|
||||||
|
1, \
|
||||||
|
"Short Guard Interval for HT40")
|
||||||
|
|
||||||
|
#define CFG_HT_CAP_INFO CFG_UINT( \
|
||||||
|
"ht_cap_info", \
|
||||||
|
0, \
|
||||||
|
65535, \
|
||||||
|
364, \
|
||||||
|
CFG_VALUE_OR_DEFAULT, \
|
||||||
|
"HT cap info")
|
||||||
|
|
||||||
|
#define CFG_HT_CAPS_ALL \
|
||||||
|
CFG(CFG_HT_CAP_INFO) \
|
||||||
|
CFG(CFG_TX_LDPC_ENABLE) \
|
||||||
|
CFG(CFG_RX_LDPC_ENABLE) \
|
||||||
|
CFG(CFG_TX_STBC_ENABLE) \
|
||||||
|
CFG(CFG_RX_STBC_ENABLE) \
|
||||||
|
CFG(CFG_SHORT_GI_20MHZ) \
|
||||||
|
CFG(CFG_SHORT_GI_40MHZ)
|
||||||
|
|
||||||
|
#endif /* __CFG_MLME_HT_CAPS_H */
|
28
mlme/dispatcher/inc/cfg_mlme_vht_caps.h
Normal file
28
mlme/dispatcher/inc/cfg_mlme_vht_caps.h
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 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_VHT_CAPS_H
|
||||||
|
#define __CFG_MLME_VHT_CAPS_H
|
||||||
|
|
||||||
|
#define CFG_VHT_CAPS_ALL
|
||||||
|
|
||||||
|
#endif /* __CFG_MLME_HT_CAPS_H */
|
@@ -26,13 +26,78 @@
|
|||||||
#include <wlan_cmn.h>
|
#include <wlan_cmn.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct wlan_mlme_cfg -MLME config items
|
* struct mlme_ht_capabilities_info - HT Capabilities Info
|
||||||
* @cfg: cfg items
|
* @lsigTXOPProtection: L-SIG TXOP Protection Mechanism support
|
||||||
|
* @stbcControlFrame: STBC Control frame support
|
||||||
|
* @psmp: PSMP Support
|
||||||
|
* @dsssCckMode40MHz: To indicate use of DSSS/CCK in 40Mhz
|
||||||
|
* @maximalAMSDUsize: Maximum AMSDU Size - 0:3839 octes, 1:7935 octets
|
||||||
|
* @delayedBA: Support of Delayed Block Ack
|
||||||
|
* @rxSTBC: Rx STBC Support - 0:Not Supported, 1: 1SS, 2: 1,2SS, 3: 1,2,3SS
|
||||||
|
* @txSTBC: Tx STBC Support
|
||||||
|
* @shortGI40MHz: Short GI Support for HT40
|
||||||
|
* @shortGI20MHz: Short GI support for HT20
|
||||||
|
* @greenField: Support for HT Greenfield PPDUs
|
||||||
|
* @mimoPowerSave: SM Power Save Mode - 0:Static, 1:Dynamic, 3:Disabled, 2:Res
|
||||||
|
* @supportedChannelWidthSet: Supported Channel Width - 0:20Mhz, 1:20Mhz & 40Mhz
|
||||||
|
* @advCodingCap: Rx LDPC support
|
||||||
|
*/
|
||||||
|
#ifndef ANI_LITTLE_BIT_ENDIAN
|
||||||
|
struct mlme_ht_capabilities_info {
|
||||||
|
uint16_t lsigTXOPProtection:1;
|
||||||
|
uint16_t stbcControlFrame:1;
|
||||||
|
uint16_t psmp:1;
|
||||||
|
uint16_t dsssCckMode40MHz:1;
|
||||||
|
uint16_t maximalAMSDUsize:1;
|
||||||
|
uint16_t delayedBA:1;
|
||||||
|
uint16_t rxSTBC:2;
|
||||||
|
uint16_t txSTBC:1;
|
||||||
|
uint16_t shortGI40MHz:1;
|
||||||
|
uint16_t shortGI20MHz:1;
|
||||||
|
uint16_t greenField:1;
|
||||||
|
uint16_t mimoPowerSave:2;
|
||||||
|
uint16_t supportedChannelWidthSet:1;
|
||||||
|
uint16_t advCodingCap:1;
|
||||||
|
} qdf_packed;
|
||||||
|
#else
|
||||||
|
struct mlme_ht_capabilities_info {
|
||||||
|
uint16_t advCodingCap:1;
|
||||||
|
uint16_t supportedChannelWidthSet:1;
|
||||||
|
uint16_t mimoPowerSave:2;
|
||||||
|
uint16_t greenField:1;
|
||||||
|
uint16_t shortGI20MHz:1;
|
||||||
|
uint16_t shortGI40MHz:1;
|
||||||
|
uint16_t txSTBC:1;
|
||||||
|
uint16_t rxSTBC:2;
|
||||||
|
uint16_t delayedBA:1;
|
||||||
|
uint16_t maximalAMSDUsize:1;
|
||||||
|
uint16_t dsssCckMode40MHz:1;
|
||||||
|
uint16_t psmp:1;
|
||||||
|
uint16_t stbcControlFrame:1;
|
||||||
|
uint16_t lsigTXOPProtection:1;
|
||||||
|
} qdf_packed;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* struct wlan_mlme_ht_caps - HT Capabilities related config items
|
||||||
|
* @ht_cap_info: HT capabilities Info Structure
|
||||||
|
*/
|
||||||
|
struct wlan_mlme_ht_caps {
|
||||||
|
struct mlme_ht_capabilities_info ht_cap_info;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct wlan_mlme_vht_caps {
|
||||||
|
/* VHT related configs */
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* struct wlan_mlme_cfg - MLME config items
|
||||||
|
* @ht_cfg: HT related CFG Items
|
||||||
|
* @vht_cfg: VHT related CFG Items
|
||||||
*/
|
*/
|
||||||
struct wlan_mlme_cfg {
|
struct wlan_mlme_cfg {
|
||||||
uint8_t test;
|
struct wlan_mlme_ht_caps ht_caps;
|
||||||
/* VHT config */
|
struct wlan_mlme_vht_caps vht_caps;
|
||||||
/* HT config */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
105
mlme/dispatcher/inc/wlan_mlme_ucfg_api.h
Normal file
105
mlme/dispatcher/inc/wlan_mlme_ucfg_api.h
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 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: declare internal API related to the mlme component
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _WLAN_MLME_UCFG_API_H_
|
||||||
|
#define _WLAN_MLME_UCFG_API_H_
|
||||||
|
|
||||||
|
#include <wlan_mlme_public_struct.h>
|
||||||
|
#include <wlan_objmgr_psoc_obj.h>
|
||||||
|
#include <wlan_objmgr_global_obj.h>
|
||||||
|
#include <wlan_cmn.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* mlme_psoc_open() - MLME component Open
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
*
|
||||||
|
* Open the MLME component and initialize the MLME strucutre
|
||||||
|
*
|
||||||
|
* Return: QDF Status
|
||||||
|
*/
|
||||||
|
QDF_STATUS mlme_psoc_open(struct wlan_objmgr_psoc *psoc);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* mlme_psoc_close() - MLME component close
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
*
|
||||||
|
* Close the MLME component and clear the MLME structures
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
void mlme_psoc_close(struct wlan_objmgr_psoc *psoc);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_mlme_get_ht_cap_info() - Get the HT cap info 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_ht_cap_info(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct mlme_ht_capabilities_info
|
||||||
|
*ht_cap_info);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_mlme_set_ht_cap_info() - Set the HT cap info config
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
* @value: Value that needs to be set from the caller
|
||||||
|
*
|
||||||
|
* Return: QDF Status
|
||||||
|
*/
|
||||||
|
QDF_STATUS wlan_mlme_set_ht_cap_info(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct mlme_ht_capabilities_info
|
||||||
|
ht_cap_info);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ucfg_mlme_get_ht_cap_info() - Get the HT cap info 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_ht_cap_info(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct mlme_ht_capabilities_info
|
||||||
|
*ht_cap_info)
|
||||||
|
{
|
||||||
|
return wlan_mlme_get_ht_cap_info(psoc, ht_cap_info);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ucfg_mlme_set_ht_cap_info() - Set the HT cap info 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_set_ht_cap_info(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct mlme_ht_capabilities_info
|
||||||
|
ht_cap_info)
|
||||||
|
{
|
||||||
|
return wlan_mlme_set_ht_cap_info(psoc, ht_cap_info);
|
||||||
|
}
|
||||||
|
#endif /* _WLAN_MLME_UCFG_API_H_ */
|
74
mlme/dispatcher/src/wlan_mlme_ucfg_api.c
Normal file
74
mlme/dispatcher/src/wlan_mlme_ucfg_api.c
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 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: define internal APIs related to the mlme component
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "cfg_ucfg_api.h"
|
||||||
|
#include "wlan_mlme_main.h"
|
||||||
|
#include "wlan_mlme_ucfg_api.h"
|
||||||
|
|
||||||
|
QDF_STATUS mlme_psoc_open(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
QDF_STATUS status;
|
||||||
|
|
||||||
|
status = mlme_cfg_on_psoc_enable(psoc);
|
||||||
|
if (!QDF_IS_STATUS_SUCCESS(status))
|
||||||
|
mlme_err("Failed to initialize MLME CFG");
|
||||||
|
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
void mlme_psoc_close(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
/* Clear the MLME CFG Structure */
|
||||||
|
}
|
||||||
|
|
||||||
|
QDF_STATUS wlan_mlme_get_ht_cap_info(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct mlme_ht_capabilities_info
|
||||||
|
*ht_cap_info)
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
*ht_cap_info = mlme_obj->cfg.ht_caps.ht_cap_info;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDF_STATUS wlan_mlme_set_ht_cap_info(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct mlme_ht_capabilities_info
|
||||||
|
ht_cap_info)
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
mlme_obj->cfg.ht_caps.ht_cap_info = ht_cap_info;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
Reference in New Issue
Block a user