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
这个提交包含在:
Vignesh Viswanathan
2018-05-24 15:53:58 +05:30
提交者 nshrivas
父节点 2455337736
当前提交 21c58cb8c3
修改 29 个文件,包含 782 行新增351 行删除

查看文件

@@ -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 */

查看文件

@@ -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 */

查看文件

@@ -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>
/**
* struct wlan_mlme_cfg -MLME config items
* @cfg: cfg items
* struct mlme_ht_capabilities_info - HT Capabilities Info
* @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 {
uint8_t test;
/* VHT config */
/* HT config */
struct wlan_mlme_ht_caps ht_caps;
struct wlan_mlme_vht_caps vht_caps;
};
#endif

查看文件

@@ -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_ */