M7350v7_en_gpl
This commit is contained in:
1642
wlan/qcacld-2.0/CORE/WDA/inc/legacy/halMsgApi.h
Normal file
1642
wlan/qcacld-2.0/CORE/WDA/inc/legacy/halMsgApi.h
Normal file
File diff suppressed because it is too large
Load Diff
437
wlan/qcacld-2.0/CORE/WDA/inc/legacy/halTypes.h
Normal file
437
wlan/qcacld-2.0/CORE/WDA/inc/legacy/halTypes.h
Normal file
@ -0,0 +1,437 @@
|
||||
/*
|
||||
* Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file was originally distributed by Qualcomm Atheros, Inc.
|
||||
* under proprietary terms before Copyright ownership was assigned
|
||||
* to the Linux Foundation.
|
||||
*/
|
||||
|
||||
/** ------------------------------------------------------------------------- *
|
||||
------------------------------------------------------------------------- *
|
||||
|
||||
|
||||
\file halTypes.h
|
||||
|
||||
\brief This header captures types that must be shared in common with individual
|
||||
module headers before inclusion into halCommonApi.h.
|
||||
|
||||
$Id$========================================================================== */
|
||||
|
||||
#ifndef HALTYPES_H
|
||||
#define HALTYPES_H
|
||||
#ifndef WINXP_APPS_BUILD //TODO: this header dependency does not belong in this file
|
||||
|
||||
#endif /* WINXP_APPS_BUILD */
|
||||
|
||||
#include "palTypes.h"
|
||||
#include "wlan_nv.h"
|
||||
|
||||
#define OFFSET_OF(structType,fldName) (&((structType*)0)->fldName)
|
||||
|
||||
/** ------------------------------------------------------------------------- *
|
||||
|
||||
\typedef tHalHandle
|
||||
|
||||
\brief Handle to the HAL. The HAL handle is returned by the HAL after it
|
||||
is opened (by calling halOpen).
|
||||
|
||||
-------------------------------------------------------------------------- */
|
||||
typedef void *tHalHandle;
|
||||
|
||||
// define a value for an invalid HAL handle.....
|
||||
#define HAL_INVALID_HAL_HANDLE ( NULL )
|
||||
|
||||
|
||||
/** ------------------------------------------------------------------------- *
|
||||
|
||||
\enum eHalStatus
|
||||
|
||||
\brief Enumeration of all status codes returned by the higher level
|
||||
HAL interface functions.
|
||||
|
||||
-------------------------------------------------------------------------- */
|
||||
typedef enum
|
||||
{
|
||||
eHAL_STATUS_SUCCESS,
|
||||
|
||||
// general failure. This status applies to all failure that are not covered
|
||||
// by more specific return codes.
|
||||
eHAL_STATUS_FAILURE,
|
||||
eHAL_STATUS_FAILED_ALLOC,
|
||||
eHAL_STATUS_RESOURCES,
|
||||
|
||||
// the HAL has not been opened and a HAL function is being attempted.
|
||||
eHAL_STATUS_NOT_OPEN,
|
||||
|
||||
// function failed due to the card being removed...
|
||||
eHAL_STATUS_CARD_NOT_PRESENT,
|
||||
|
||||
//halInterrupt status
|
||||
eHAL_STATUS_INTERRUPT_ENABLED,
|
||||
eHAL_STATUS_INTERRUPT_DISABLED,
|
||||
eHAL_STATUS_NO_INTERRUPTS,
|
||||
eHAL_STATUS_INTERRUPT_PRESENT,
|
||||
eHAL_STATUS_ALL_INTERRUPTS_PROCESSED,
|
||||
eHAL_STATUS_INTERRUPT_NOT_PROCESSED, //interrupt cleared but no Isr to process
|
||||
|
||||
// a parameter on the PAL function call is not valid.
|
||||
eHAL_STATUS_INVALID_PARAMETER,
|
||||
|
||||
// the PAL has not been initialized...
|
||||
eHAL_STATUS_NOT_INITIALIZED,
|
||||
|
||||
// Error codes for PE-HAL message API
|
||||
eHAL_STATUS_INVALID_STAIDX,
|
||||
eHAL_STATUS_INVALID_BSSIDX,
|
||||
eHAL_STATUS_STA_TABLE_FULL, // No space to add more STA, sta table full.
|
||||
eHAL_STATUS_BSSID_TABLE_FULL,
|
||||
eHAL_STATUS_DUPLICATE_BSSID,
|
||||
eHAL_STATUS_DUPLICATE_STA,
|
||||
eHAL_STATUS_BSSID_INVALID,
|
||||
eHAL_STATUS_STA_INVALID,
|
||||
eHAL_STATUS_INVALID_KEYID,
|
||||
eHAL_STATUS_INVALID_SIGNATURE,
|
||||
|
||||
//DXE
|
||||
eHAL_STATUS_DXE_FAILED_NO_DESCS,
|
||||
eHAL_STATUS_DXE_CHANNEL_NOT_CONFIG, // Channel not configured
|
||||
eHAL_STATUS_DXE_CHANNEL_MISUSE, // Specified operation inconsistent w/ configuration
|
||||
eHAL_STATUS_DXE_VIRTUAL_MEM_ALLOC_ERROR, //
|
||||
eHAL_STATUS_DXE_SHARED_MEM_ALLOC_ERROR, //
|
||||
eHAL_STATUS_DXE_INVALID_CHANNEL,
|
||||
eHAL_STATUS_DXE_INVALID_CALLBACK,
|
||||
eHAL_STATUS_DXE_INCONSISTENT_DESC_COUNT,
|
||||
eHAL_STATUS_DXE_XFR_QUEUE_ERROR,
|
||||
eHAL_STATUS_DXE_INVALID_BUFFER,
|
||||
eHAL_STATUS_DXE_INCOMPLETE_PACKET,
|
||||
eHAL_STATUS_DXE_INVALID_PARAMETER,
|
||||
eHAL_STATUS_DXE_CH_ALREADY_CONFIGURED,
|
||||
eHAL_STATUS_DXE_USB_INVALID_EP,
|
||||
eHAL_STATUS_DXE_GEN_ERROR,
|
||||
|
||||
|
||||
// status codes added for the ImageValidate library
|
||||
eHAL_STATUS_E_NULL_VALUE,
|
||||
eHAL_STATUS_E_FILE_NOT_FOUND,
|
||||
eHAL_STATUS_E_FILE_INVALID_CONTENT,
|
||||
eHAL_STATUS_E_MALLOC_FAILED,
|
||||
eHAL_STATUS_E_FILE_READ_FAILED,
|
||||
eHAL_STATUS_E_IMAGE_INVALID,
|
||||
eHAL_STATUS_E_IMAGE_UNSUPPORTED,
|
||||
|
||||
// status code returned by device memory calls when memory is
|
||||
// not aligned correctly.
|
||||
eHAL_STATUS_DEVICE_MEMORY_MISALIGNED, // memory access is not aligned on a 4 byte boundary
|
||||
eHAL_STATUS_DEVICE_MEMORY_LENGTH_ERROR, // memory access is not a multiple of 4 bytes
|
||||
|
||||
// Generic status code to indicate network congestion.
|
||||
eHAL_STATUS_NET_CONGESTION,
|
||||
|
||||
// various status codes for Rx packet dropped conditions... Note the Min and Max
|
||||
// enums that bracked the Rx Packet Dropped status codes. There is code that
|
||||
// looks at the various packet dropped conditions so make sure these min / max
|
||||
// enums remain accurate.
|
||||
eHAL_STATUS_RX_PACKET_DROPPED,
|
||||
eHAL_STATUS_RX_PACKET_DROPPED_MIN = eHAL_STATUS_RX_PACKET_DROPPED,
|
||||
eHAL_STATUS_RX_PACKET_DROPPED_NULL_DATA,
|
||||
eHAL_STATUS_RX_PACKET_DROPPED_WDS_FRAME,
|
||||
eHAL_STATUS_RX_PACKET_DROPPED_FILTERED,
|
||||
eHAL_STATUS_RX_PACKET_DROPPED_GROUP_FROM_SELF,
|
||||
eHAL_STATUS_RX_PACKET_DROPPED_MAX = eHAL_STATUS_RX_PACKET_DROPPED_GROUP_FROM_SELF,
|
||||
|
||||
// Status indicating that PMU did not power up and hence indicative of the fact that the clocks are not on
|
||||
eHAL_STATUS_PMU_NOT_POWERED_UP,
|
||||
|
||||
// Queuing code for BA message API
|
||||
eHAL_STATUS_BA_ENQUEUED, // packets have been buffered in Host
|
||||
eHAL_STATUS_BA_INVALID,
|
||||
|
||||
// A-MPDU/BA related Error codes
|
||||
eHAL_STATUS_BA_RX_BUFFERS_FULL,
|
||||
eHAL_STATUS_BA_RX_MAX_SESSIONS_REACHED,
|
||||
eHAL_STATUS_BA_RX_INVALID_SESSION_ID,
|
||||
|
||||
// !!LAC - can we rework the code so these are not needed?
|
||||
eHAL_STATUS_BA_RX_DROP_FRAME,
|
||||
eHAL_STATUS_BA_RX_INDICATE_FRAME,
|
||||
eHAL_STATUS_BA_RX_ENQUEUE_FRAME,
|
||||
|
||||
// PMC return codes.
|
||||
eHAL_STATUS_PMC_PENDING,
|
||||
eHAL_STATUS_PMC_DISABLED,
|
||||
eHAL_STATUS_PMC_NOT_NOW,
|
||||
eHAL_STATUS_PMC_AC_POWER,
|
||||
eHAL_STATUS_PMC_SYS_ERROR,
|
||||
eHAL_STATUS_PMC_CANNOT_ENTER_IMPS,
|
||||
eHAL_STATUS_PMC_ALREADY_IN_IMPS,
|
||||
|
||||
eHAL_STATUS_HEARTBEAT_TMOUT,
|
||||
eHAL_STATUS_NTH_BEACON_DELIVERY,
|
||||
|
||||
//CSR
|
||||
eHAL_STATUS_CSR_WRONG_STATE,
|
||||
|
||||
// DPU
|
||||
eHAL_STATUS_DPU_DESCRIPTOR_TABLE_FULL,
|
||||
eHAL_STATUS_DPU_MICKEY_TABLE_FULL,
|
||||
|
||||
// HAL-FW messages
|
||||
eHAL_STATUS_FW_MSG_FAILURE, // Error in Hal-FW message interface
|
||||
eHAL_STATUS_FW_MSG_TIMEDOUT,
|
||||
eHAL_STATUS_FW_MSG_INVALID,
|
||||
eHAL_STATUS_FW_SEND_MSG_FAILED,
|
||||
eHAL_STATUS_FW_PS_BUSY,
|
||||
|
||||
eHAL_STATUS_TIMER_START_FAILED,
|
||||
eHAL_STATUS_TIMER_STOP_FAILED,
|
||||
|
||||
eHAL_STATUS_TL_SUSPEND_TIMEOUT,
|
||||
|
||||
eHAL_STATUS_UMA_DESCRIPTOR_TABLE_FULL,
|
||||
|
||||
eHAL_STATUS_SET_CHAN_ALREADY_ON_REQUESTED_CHAN,
|
||||
|
||||
#ifdef WLAN_FEATURE_VOWIFI_11R
|
||||
eHAL_STATUS_FT_PREAUTH_KEY_SUCCESS,
|
||||
eHAL_STATUS_FT_PREAUTH_KEY_FAILED,
|
||||
#endif
|
||||
//CMD not Queued in SME
|
||||
eHAL_STATUS_CMD_NOT_QUEUED,
|
||||
// not a real status. Just a way to mark the maximum in the enum.
|
||||
eHAL_STATUS_MAX
|
||||
|
||||
} eHalStatus;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
HAL_STOP_TYPE_SYS_RESET,
|
||||
HAL_STOP_TYPE_SYS_DEEP_SLEEP,
|
||||
HAL_STOP_TYPE_RF_KILL,
|
||||
}tHalStopType;
|
||||
|
||||
// macro to check for SUCCESS value of the halStatus
|
||||
#define HAL_STATUS_SUCCESS( variable ) ( eHAL_STATUS_SUCCESS == ( variable ) )
|
||||
|
||||
/// Bit value data structure
|
||||
typedef enum sHalBitVal // For Bit operations
|
||||
{
|
||||
eHAL_CLEAR,
|
||||
eHAL_SET
|
||||
}tHalBitVal;
|
||||
|
||||
// -------------------------------------------------------------
|
||||
/// MMH APIs
|
||||
enum {
|
||||
eHI_PRI,
|
||||
ePROT,
|
||||
eDBG
|
||||
};
|
||||
|
||||
/// System role definition on a per BSS
|
||||
typedef enum eBssSystemRole
|
||||
{
|
||||
eSYSTEM_UNKNOWN_ROLE,
|
||||
eSYSTEM_AP_ROLE,
|
||||
eSYSTEM_STA_IN_IBSS_ROLE,
|
||||
eSYSTEM_STA_ROLE,
|
||||
eSYSTEM_BTAMP_STA_ROLE,
|
||||
eSYSTEM_BTAMP_AP_ROLE,
|
||||
|
||||
eSYSTEM_LAST_ROLE,
|
||||
eSYSTEM_MULTI_BSS_ROLE = eSYSTEM_LAST_ROLE
|
||||
} tBssSystemRole;
|
||||
|
||||
|
||||
// ---------------------------------------
|
||||
// Channel Bonding Sideband configuration
|
||||
// ---------------------------------------
|
||||
typedef enum sHalCBsidebandType
|
||||
{
|
||||
eHAL_SIDEBAND_CENTER=0,
|
||||
eHAL_SIDEBAND_LOWER,
|
||||
eHAL_SIDEBAND_UPPER,
|
||||
eHAL_SIDEBAND_COPY
|
||||
}tHalCBsidebandType;
|
||||
|
||||
|
||||
/// HAL states
|
||||
typedef enum {
|
||||
eHAL_IDLE,
|
||||
eHAL_INIT,
|
||||
eHAL_CFG, //CFG download completed.
|
||||
eHAL_STARTED, //halProcessStartEvent compelted.
|
||||
eHAL_SYS_READY, //Sys_ready msg received from HDD.
|
||||
eHAL_NORMAL, //Sys_ready msg received from HDD and halProcessStartEvent completed.
|
||||
} tHAL_STATE;
|
||||
|
||||
|
||||
|
||||
|
||||
// Type to define softmac mode (also system mode)
|
||||
typedef enum
|
||||
{
|
||||
//3- Promisc, 2 - Scan, 1 - Learn 0 - Normal
|
||||
eHAL_SYS_MODE_NORMAL = 0,
|
||||
eHAL_SYS_MODE_LEARN,
|
||||
eHAL_SYS_MODE_SCAN,
|
||||
eHAL_SYS_MODE_PROMISC,
|
||||
eHAL_SYS_MODE_SUSPEND_LINK,
|
||||
eHAL_SYS_MODE_ROAM_SCAN,
|
||||
eHAL_SYS_MODE_ROAM_SUSPEND_LINK,
|
||||
} eHalSysMode;
|
||||
|
||||
|
||||
|
||||
|
||||
// HAL frame types. Used on the TxRx APIs and the
|
||||
// corresponding PAL routines.
|
||||
typedef enum {
|
||||
|
||||
HAL_TXRX_FRM_RAW,
|
||||
HAL_TXRX_FRM_ETH2,
|
||||
HAL_TXRX_FRM_802_3,
|
||||
HAL_TXRX_FRM_802_11_MGMT,
|
||||
HAL_TXRX_FRM_802_11_CTRL,
|
||||
HAL_TXRX_FRM_802_11_DATA,
|
||||
HAL_TXRX_FRM_IGNORED, //This frame will be dropped
|
||||
HAL_TXRX_FRM_MAX
|
||||
|
||||
} eFrameType;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
ANI_TXDIR_IBSS = 0,
|
||||
ANI_TXDIR_TODS,
|
||||
ANI_TXDIR_FROMDS,
|
||||
ANI_TXDIR_WDS
|
||||
|
||||
} eFrameTxDir;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
eRF_BAND_UNKNOWN = 0,
|
||||
eRF_BAND_2_4_GHZ = 1,
|
||||
eRF_BAND_5_GHZ = 2
|
||||
} eRfBandMode;
|
||||
|
||||
|
||||
#ifndef __offsetof
|
||||
#define __offsetof(type, field) ((tANI_U32)(&((type *)0)->field))
|
||||
#endif
|
||||
|
||||
#ifndef offsetof
|
||||
#define offsetof(type, field) __offsetof(type, field)
|
||||
#endif
|
||||
|
||||
#define HAL_MAX_TXPOWER_INVALID 127
|
||||
|
||||
/* These are the min/max tx power (non virtual rates) range
|
||||
* supported by rome/prima hardware
|
||||
*/
|
||||
#define MIN_TX_PWR_CAP 8
|
||||
#define MAX_TX_PWR_CAP 22
|
||||
|
||||
/* Moving the miscellaneous defination required by UMAC are moved here from
|
||||
* volansdefs.h */
|
||||
|
||||
/*
|
||||
* Volans supports 8 stations in hardware
|
||||
*
|
||||
* Volans without Virtual STA feature can only support 8 stations:
|
||||
* 1 Broadcast STA (hard)
|
||||
* 1 "Self" STA (hard)
|
||||
* 6 Soft AP Stations (hard)
|
||||
*
|
||||
* Volans with Virtual STA feature supports 14 stations:
|
||||
* 1 Broadcast STA (hard)
|
||||
* 1 "Self" STA (hard)
|
||||
* 2 General Purpose Stations to support Virtual STAs (hard)
|
||||
* 10 Soft AP Stations (4 hard/6 virtual)
|
||||
*/
|
||||
|
||||
#define HAL_INVALID_BSSIDX (HAL_NUM_BSSID + 1)
|
||||
#define HAL_NUM_UMA_DESC_ENTRIES 8
|
||||
#define MAX_NUM_OF_BACKOFFS 8
|
||||
|
||||
#define IS_VALID_BSSIDX(__x) \
|
||||
((__x) < HAL_NUM_BSSID)
|
||||
|
||||
#ifdef WLAN_SOFTAP_VSTA_FEATURE
|
||||
#define HAL_NUM_ASSOC_STA 32
|
||||
#define HAL_NUM_STA 41
|
||||
#define HAL_NUM_HW_STA 16
|
||||
#define HAL_NUM_GPSTA 4
|
||||
#define HAL_NUM_VSTA (HAL_NUM_STA - HAL_NUM_HW_STA)
|
||||
|
||||
#define QWLANFW_MAX_NUM_VSTA HAL_NUM_VSTA
|
||||
#define QWLANFW_VSTA_INVALID_IDX (HAL_NUM_STA + 1)
|
||||
#define QWLAN_VSTA_MIN_IDX HAL_NUM_HW_STA
|
||||
#define QWLANFW_NUM_GPSTA HAL_NUM_GPSTA
|
||||
|
||||
|
||||
#define IS_VSTA_VALID_IDX(__x) \
|
||||
((__x) != QWLANFW_VSTA_INVALID_IDX)
|
||||
|
||||
#define IS_VSTA_IDX(__x) \
|
||||
(((__x) >= QWLAN_VSTA_MIN_IDX) && ((__x) < HAL_NUM_STA))
|
||||
|
||||
|
||||
// is the STA a General Purpose STA?
|
||||
#define IS_GPSTA_IDX(__x) \
|
||||
(((__x) >= (HAL_NUM_HW_STA-HAL_NUM_GPSTA)) && \
|
||||
((__x) < HAL_NUM_HW_STA))
|
||||
|
||||
// is the STA a HW STA (excluding GP STAs)
|
||||
#define IS_HWSTA_IDX(__x) \
|
||||
((__x) < (HAL_NUM_HW_STA-HAL_NUM_GPSTA))
|
||||
|
||||
#else
|
||||
/*In prima 12 HW stations are supported including BCAST STA(staId 0)
|
||||
and SELF STA(staId 1) so total ASSOC stations which can connect to Prima
|
||||
SoftAP = 12 - 1(Self STa) - 1(Bcast Sta) = 10 Stations. */
|
||||
#define HAL_NUM_STA 12
|
||||
#define HAL_NUM_ASSOC_STA 10
|
||||
#define HAL_NUM_HW_STA 12
|
||||
#endif
|
||||
|
||||
/*
|
||||
* From NOVA Mac Arch document
|
||||
* Encryp. mode The encryption mode
|
||||
* 000: Encryption functionality is not enabled
|
||||
* 001: Encryption is set to WEP
|
||||
* 010: Encryption is set to WEP 104
|
||||
* 011: Encryption is set to TKIP
|
||||
* 100: Encryption is set to AES
|
||||
* 101 - 111: Reserved for future
|
||||
*/
|
||||
|
||||
#define HAL_ENC_POLICY_NULL 0
|
||||
#define HAL_ENC_POLICY_WEP40 1
|
||||
#define HAL_ENC_POLICY_WEP104 2
|
||||
#define HAL_ENC_POLICY_TKIP 3
|
||||
#define HAL_ENC_POLICY_AES_CCM 4
|
||||
|
||||
#define STACFG_MAX_TC 8
|
||||
|
||||
|
||||
#endif
|
189
wlan/qcacld-2.0/CORE/WDA/inc/legacy/palTypes.h
Normal file
189
wlan/qcacld-2.0/CORE/WDA/inc/legacy/palTypes.h
Normal file
@ -0,0 +1,189 @@
|
||||
/*
|
||||
* Copyright (c) 2011-2013 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file was originally distributed by Qualcomm Atheros, Inc.
|
||||
* under proprietary terms before Copyright ownership was assigned
|
||||
* to the Linux Foundation.
|
||||
*/
|
||||
|
||||
#if !defined( PALTYPES_H__ )
|
||||
#define PALTYPES_H__
|
||||
|
||||
/** ------------------------------------------------------------------------- *
|
||||
------------------------------------------------------------------------- *
|
||||
|
||||
|
||||
\file palTypes.h
|
||||
|
||||
\brief Exports and types for the Platform Abstraction Layer typedefs.
|
||||
These are common typedefs that can be used across Platforms (OS/compiler
|
||||
and bus types). All common code should adhere to these common types.
|
||||
|
||||
$Id$... description...
|
||||
|
||||
========================================================================== */
|
||||
#ifndef WINXP_APPS_BUILD
|
||||
#include "vos_types.h"
|
||||
#include "vos_api.h"
|
||||
#endif /* WINXP_APPS_BUILD */
|
||||
|
||||
#include "halLegacyPalTypes.h"
|
||||
|
||||
#ifndef MK_IMAGE_HDR
|
||||
|
||||
//
|
||||
// Validate the OS Type being built...
|
||||
//
|
||||
|
||||
#if defined(ANI_OS_TYPE_ANDROID) // ANDROID
|
||||
|
||||
#if defined(ANI_OS_TYPE_QNX)
|
||||
#error "more than one ANI_OS_TYPE_xxx is defined for this build"
|
||||
#endif
|
||||
|
||||
#elif defined( ANI_OS_TYPE_QNX ) // QNX
|
||||
|
||||
#if defined(ANI_OS_TYPE_ANDROID)
|
||||
#error "more than one ANI_OS_TYPE_xxx is defined for this build"
|
||||
#endif
|
||||
|
||||
|
||||
#elif !defined(ANI_OS_TYPE_ANDROID) && !defined(ANI_OS_TYPE_QNX) // NONE
|
||||
#error "NONE of the ANI_OS_TYPE_xxx are defined for this build"
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Validate the compiler...
|
||||
//
|
||||
#if ( defined( ANI_COMPILER_TYPE_MSVC ) && defined( ANI_COMPILER_TYPE_GCC ) && defined( ANI_COMPILER_TYPE_RVCT ) )
|
||||
#error "more than one ANI_COMPILER_TYPE_xxx is defined for this build"
|
||||
|
||||
#elif !( defined( ANI_COMPILER_TYPE_MSVC ) || defined( ANI_COMPILER_TYPE_GCC ) || defined( ANI_COMPILER_TYPE_RVCT ) )
|
||||
#error "NONE of the ANI_COMPILER_TYPE_xxx are defined for this build"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// some differences related to the compiler being used...
|
||||
#if defined ( ANI_COMPILER_TYPE_GCC )
|
||||
|
||||
#define ANI_INLINE_FUNCTION static __inline__
|
||||
|
||||
#elif defined( ANI_COMPILER_TYPE_MSVC )
|
||||
|
||||
#define ANI_INLINE_FUNCTION __inline
|
||||
|
||||
#elif defined( ANI_COMPILER_TYPE_RVCT )
|
||||
|
||||
#define ANI_INLINE_FUNCTION INLINE
|
||||
|
||||
#else
|
||||
|
||||
#error "invalid ANI_COMPILER_TYPE definition"
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
// Common type definitions...
|
||||
|
||||
|
||||
typedef tANI_U32 tANI_U32_OR_PTR;
|
||||
|
||||
// Buffer address; could be virt or phys; could be 32- or 64-bit depending on compile option
|
||||
typedef tANI_U32_OR_PTR tANI_BUFFER_ADDR;
|
||||
// which boolean is the most usefule...or both ?
|
||||
|
||||
typedef enum tagAniBoolean
|
||||
{
|
||||
eANI_BOOLEAN_FALSE = 0,
|
||||
eANI_BOOLEAN_TRUE,
|
||||
|
||||
eANI_BOOLEAN_OFF = 0,
|
||||
eANI_BOOLEAN_ON = 1,
|
||||
} eAniBoolean;
|
||||
|
||||
|
||||
|
||||
//
|
||||
// MAC address data type...
|
||||
//
|
||||
// review the usefulness of this type. I suspect this type is not
|
||||
// real useful unless we provide some 'helper' functions to manage
|
||||
// the MAC addresses.
|
||||
//
|
||||
#define ANI_MAC_ADDR_SIZE ( 6 )
|
||||
typedef tANI_U8 tAniMacAddr[ ANI_MAC_ADDR_SIZE ];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/** ------------------------------------------------------------------------- *
|
||||
|
||||
\typedef tHddHandle
|
||||
|
||||
\brief Handle to the HDD. The HDD handle is given to the HAL from
|
||||
the HDD on halOpen. The HDD handle is an input to all HDD/PAL function
|
||||
calls and represents an opaque handle to the HDD instance that is tied
|
||||
to the HAL instance, opened through halOpen.
|
||||
|
||||
The HDD must be able to derive it's internal instance structure pointer
|
||||
through this handle. hint hint...
|
||||
|
||||
-------------------------------------------------------------------------- */
|
||||
typedef void *tHddHandle;
|
||||
// define a value for an invalid HAL handle.....
|
||||
#define HDD_INVALID_HDD_HANDLE ( NULL )
|
||||
|
||||
|
||||
// For packet classification routines
|
||||
#define PAL_BIT_MASK(offset) (1 << (offset))
|
||||
#define PAL_PKT_FLD_DSCP_OFFSET 0
|
||||
#define PAL_PKT_FLD_8021P_OFFSET 1
|
||||
|
||||
#define PAL_PKT_FLD_DSCP_MASK PAL_BIT_MASK(PAL_PKT_FLD_DSCP_OFFSET)
|
||||
#define PAL_PKT_FLD_8021P_MASK PAL_BIT_MASK(PAL_PKT_FLD_8021P_OFFSET)
|
||||
|
||||
|
||||
|
||||
/*
|
||||
This represent an object for a spin lock and it is platform dependant
|
||||
*/
|
||||
//User of this variable must initialize it to PAL_INVALID_SPINLOCK_HANDLE in order for validation to work.
|
||||
typedef void * tPalSpinLockHandle;
|
||||
|
||||
#define PAL_INVALID_SPINLOCK_HANDLE (NULL)
|
||||
|
||||
/*
|
||||
* This represent an object for a semaphore and it is platform dependant
|
||||
*/
|
||||
typedef void * tPalSemaphoreHandle;
|
||||
|
||||
|
||||
#define PAL_TICKS_PER_SECOND 100
|
||||
|
||||
#endif
|
566
wlan/qcacld-2.0/CORE/WDA/inc/legacy/wlan_qct_hal.h
Normal file
566
wlan/qcacld-2.0/CORE/WDA/inc/legacy/wlan_qct_hal.h
Normal file
@ -0,0 +1,566 @@
|
||||
/*
|
||||
* Copyright (c) 2013 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file was originally distributed by Qualcomm Atheros, Inc.
|
||||
* under proprietary terms before Copyright ownership was assigned
|
||||
* to the Linux Foundation.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* Date Modified by Modification Information
|
||||
* --------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef WLAN_QCT_HAL_H
|
||||
#define WLAN_QCT_HAL_H
|
||||
#include "vos_status.h"
|
||||
#include "halTypes.h"
|
||||
#ifndef PALTYPES_H__
|
||||
|
||||
|
||||
/// unsigned 8-bit types
|
||||
#define tANI_U8 v_U8_t
|
||||
|
||||
/// unsigned 16-bit types
|
||||
#define tANI_U16 v_U16_t
|
||||
|
||||
/// unsigned 32-bit types
|
||||
#define tANI_U32 v_U32_t
|
||||
|
||||
/// signed 8-bit types
|
||||
#define tANI_S8 v_S7_t
|
||||
|
||||
/// signed 16-bit types
|
||||
#define tANI_S16 v_S15_t
|
||||
|
||||
/// signed 32-bit types
|
||||
#define tANI_S32 v_S31_t
|
||||
|
||||
#define eHalStatus VOS_STATUS
|
||||
|
||||
#endif
|
||||
#define QWLAN_HAL_DXE0_MASTERID 5
|
||||
|
||||
typedef struct sHalBdGeneric {
|
||||
/* 0x00 */
|
||||
// ENDIAN BEGIN
|
||||
tANI_U32 dpuRF : 8;
|
||||
tANI_U32 dpuSignature:3; /* Signature on RA's DPU descriptor */
|
||||
tANI_U32 staSignature:3;
|
||||
tANI_U32 reserved : 14;
|
||||
tANI_U32 dpuNE : 1;
|
||||
tANI_U32 dpuNC : 1;
|
||||
tANI_U32 bdt : 2; /* BD type */
|
||||
// ENDIAN END
|
||||
|
||||
/* 0x04 */
|
||||
// ENDIAN BEGIN
|
||||
tANI_U32 reserved1:32;
|
||||
// ENDIAN END
|
||||
|
||||
|
||||
/* 0x08 */
|
||||
// ENDIAN BEGIN
|
||||
tANI_U32 headPduIdx : 16; /* Head PDU index */
|
||||
tANI_U32 tailPduIdx : 16; /* Tail PDU index */
|
||||
// ENDIAN END
|
||||
|
||||
/* 0x0c */
|
||||
// ENDIAN BEGIN
|
||||
tANI_U32 mpduHeaderLength : 8; /* MPDU header length */
|
||||
tANI_U32 mpduHeaderOffset : 8; /* MPDU header start offset */
|
||||
tANI_U32 mpduDataOffset : 9; /* MPDU data start offset */
|
||||
tANI_U32 pduCount : 7; /* PDU count */
|
||||
// ENDIAN END
|
||||
|
||||
/* 0x10 */
|
||||
// ENDIAN BEGIN
|
||||
tANI_U32 mpduLength : 16; /* MPDU length */
|
||||
tANI_U32 reserved3:4; /* DPU compression feedback */
|
||||
tANI_U32 tid : 4; /* Traffic identifier, tid */
|
||||
tANI_U32 rateIndex : 8;
|
||||
// ENDIAN END
|
||||
|
||||
/* 0x14 */
|
||||
// ENDIAN BEGIN
|
||||
tANI_U32 dpuDescIdx : 8;
|
||||
tANI_U32 addr1Index : 8; //A1 index after RxP binary search
|
||||
tANI_U32 addr2Index : 8; //A2 index after RxP binary search
|
||||
tANI_U32 addr3Index : 8; //A3 index after RxP binary search
|
||||
// ENDIAN END
|
||||
//}__ani_attr_packed __ani_attr_aligned_4 tHalBdGeneric, *tpHalBdGeneric;
|
||||
} tHalBdGeneric, *tpHalBdGeneric;
|
||||
|
||||
|
||||
/*
|
||||
* PDU without BD
|
||||
*/
|
||||
|
||||
typedef struct sHalPdu {
|
||||
tANI_U8 payload[124];
|
||||
tANI_U32 nextPduIdx; /* LSB 16 bits */
|
||||
//} __ani_attr_packed __ani_attr_aligned_4 tHalPdu, *tpHalPdu;
|
||||
} tHalPdu, *tpHalPdu;
|
||||
|
||||
/* UAPSD parameters passed per AC to HAL from TL */
|
||||
typedef struct sUapsdInfo {
|
||||
tANI_U8 staidx; // STA index
|
||||
tANI_U8 ac; // Access Category
|
||||
tANI_U8 up; // User Priority
|
||||
tANI_U32 srvInterval; // Service Interval
|
||||
tANI_U32 susInterval; // Suspend Interval
|
||||
tANI_U32 delayInterval; // Delay Interval
|
||||
} tUapsdInfo, tpUapsdInfo;
|
||||
|
||||
#define HAL_TXBD_BDRATE_DEFAULT 0
|
||||
#define HAL_TXBD_BDRATE_FIRST 1
|
||||
#define HAL_TXBD_BDRATE_SECOND 2
|
||||
#define HAL_TXBD_BDRATE_THIRD 3
|
||||
|
||||
#define HAL_FRAME_TYPE_MASK 0x30
|
||||
#define HAL_FRAME_TYPE_OFFSET 0x4
|
||||
#define HAL_FRAME_SUBTYPE_MASK 0x0F
|
||||
|
||||
#define HAL_TXBD_BD_SSN_FILL_HOST 0
|
||||
#define HAL_TXBD_BD_SSN_FILL_DPU_NON_QOS 1
|
||||
#define HAL_TXBD_BD_SSN_FILL_DPU_QOS 2
|
||||
|
||||
#define HAL_ACKPOLICY_ACK_REQUIRED 0
|
||||
#define HAL_ACKPOLICY_ACK_NOTREQUIRED 1
|
||||
|
||||
#define HAL_BDRATE_BCDATA_FRAME 1
|
||||
#define HAL_BDRATE_BCMGMT_FRAME 2
|
||||
#define HAL_BDRATE_CTRL_FRAME 3
|
||||
|
||||
/* Default values for FillTx BD */
|
||||
#define HAL_DEFAULT_UNICAST_ENABLED 1
|
||||
#define HAL_RMF_DISABLED 0
|
||||
#define HAL_RMF_ENABLED 1
|
||||
#define HAL_NO_ENCRYPTION_DISABLED 0
|
||||
#define HAL_NO_ENCRYPTION_ENABLED 1
|
||||
|
||||
#define WLANHAL_RX_BD_ADDR3_SELF_IDX 0
|
||||
|
||||
// Should not use tHalTxBd nor tHalRxBd. UMAC doesn't know these HAL structure.
|
||||
#define WLANHAL_TX_BD_HEADER_SIZE 40
|
||||
#define WLANHAL_RX_BD_HEADER_SIZE 76
|
||||
|
||||
|
||||
#define WLANHAL_RX_BD_HEADER_OFFSET 0
|
||||
|
||||
#define WLANHAL_RX_BD_GET_MPDU_H_OFFSET( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->mpduHeaderOffset)
|
||||
|
||||
#define WLANHAL_RX_BD_GET_MPDU_D_OFFSET( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->mpduDataOffset)
|
||||
|
||||
#define WLANHAL_RX_BD_GET_MPDU_LEN( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->mpduLength)
|
||||
|
||||
#define WLANHAL_RX_BD_GET_MPDU_H_LEN( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->mpduHeaderLength)
|
||||
|
||||
#define WLANHAL_RX_BD_GET_FT( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->ft)
|
||||
|
||||
#define WLANHAL_RX_BD_GET_LLC( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->llc)
|
||||
|
||||
#define WLANHAL_RX_BD_GET_TID( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->tid)
|
||||
|
||||
#define WLANHAL_RX_BD_GET_ASF( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->asf)
|
||||
|
||||
#define WLANHAL_RX_BD_GET_AEF( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->aef)
|
||||
|
||||
#define WLANHAL_RX_BD_GET_LSF( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->lsf)
|
||||
|
||||
#define WLANHAL_RX_BD_GET_ESF( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->esf)
|
||||
|
||||
#define WLANHAL_RX_BD_GET_STA_ID( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->addr2Index)
|
||||
#define WLANHAL_RX_BD_GET_ADDR3_IDX( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->addr3Index)
|
||||
#define WLANHAL_RX_BD_GET_ADDR1_IDX( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->addr1Index)
|
||||
|
||||
#define WLANHAL_TX_BD_GET_TID( _pvBDHeader ) (((tpHalTxBd)_pvBDHeader)->tid)
|
||||
#define WLANHAL_TX_BD_GET_STA_ID( _pvBDHeader ) (((tpHalTxBd)_pvBDHeader)->staIndex)
|
||||
|
||||
#define WLANHAL_RX_BD_GET_DPU_SIG( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->dpuSignature)
|
||||
|
||||
#define WLANHAL_FC_RX_BD_REPORT_CONTENT_SIZE (2 * HAL_NUM_STA * sizeof(tANI_U8)) // size of fcSTATxQLen[HAL_NUM_STA]+fcSTACurTxRate[HAL_NUM_STA]
|
||||
#define WLANHAL_FC_TX_BD_HEADER_SIZE sizeof(tHalFcTxBd)
|
||||
#define WLANHAL_RX_BD_GET_FC( _pvBDHeader ) (((tpHalFcRxBd)_pvBDHeader)->fc)
|
||||
#define WLANHAL_RX_BD_GET_RX_TIME_STAMP( _pvBDHeader ) (((tpHalFcRxBd)_pvBDHeader)->mclkRxTimestamp)
|
||||
#define WLANHAL_RX_BD_GET_STA_VALID_MASK( _pvBDHeader ) (((tpHalFcRxBd)_pvBDHeader)->fcSTAValidMask)
|
||||
#define WLANHAL_RX_BD_GET_STA_PS_STATE( _pvBDHeader ) (((tpHalFcRxBd)_pvBDHeader)->fcSTAPwrSaveStateMask)
|
||||
#define WLANHAL_RX_BD_GET_STA_TH_IND( _pvBDHeader ) (((tpHalFcRxBd)_pvBDHeader)->fcSTAThreshIndMask)
|
||||
#define WLANHAL_RX_BD_GET_STA_TXQ_STATUS( _pvBDHeader ) (((tpHalFcRxBd)_pvBDHeader)->fcSTATxQStatus)
|
||||
#define WLANHAL_RX_BD_GET_STA_TXQ_LEN( _pvBDHeader, staIdx ) (((tpHalFcRxBd)_pvBDHeader)->fcSTATxQLen[staIdx])
|
||||
#define WLANHAL_RX_BD_GET_STA_CUR_TX_RATE( _pvBDHeader, staIdx ) (((tpHalFcRxBd)_pvBDHeader)->fcSTACurTxRate[staIdx])
|
||||
|
||||
#define WLANHAL_TX_BD_GET_RMF(_pvBDHeader) (((tpHalRxBd)_pvBDHeader)->rmf)
|
||||
|
||||
#define WLANHAL_TX_BD_GET_UB(_pvBDHeader) (((tpHalRxBd)_pvBDHeader)->ub)
|
||||
|
||||
#define WLANHAL_RX_BD_GET_RMF(_pvBDHeader) (((tpHalRxBd)_pvBDHeader)->rmf)
|
||||
|
||||
#define WLANHAL_RX_BD_GET_UB(_pvBDHeader) (((tpHalRxBd)_pvBDHeader)->ub)
|
||||
|
||||
#define WLANHAL_RX_BD_GET_RATEINDEX(_pvBDHeader) (((tpHalRxBd)_pvBDHeader)->rateIndex)
|
||||
|
||||
#define WLANHAL_RX_BD_GET_TIMESTAMP(_pvBDHeader) (((tpHalRxBd)_pvBDHeader)->mclkRxTimestamp)
|
||||
|
||||
#define tHalFcRxBd halFcRxBd_type
|
||||
#define tpHalFcRxBd phalFcRxBd_type
|
||||
#define tHalFcTxBd halFcTxBd_type
|
||||
#define tpHalFcTxBd pHalFcTxBd_type
|
||||
#define tHalFcTxParams tFcTxParams_type
|
||||
#define tHalFcRxParams tFcRxParams_type
|
||||
#define tpHalFcTxParams pFcTxParams_type
|
||||
#define tpHalFcRxParams pFcRxParams_type
|
||||
|
||||
/*------------ RSSI and SNR Information extraction -------------*/
|
||||
#define WLANHAL_RX_BD_GET_RSSI0( _pvBDHeader ) \
|
||||
(((((tpHalRxBd)_pvBDHeader)->phyStats0) >> 24) & 0xff)
|
||||
#define WLANHAL_RX_BD_GET_RSSI1( _pvBDHeader ) \
|
||||
(((((tpHalRxBd)_pvBDHeader)->phyStats0) >> 16) & 0xff)
|
||||
#define WLANHAL_RX_BD_GET_RSSI2( _pvBDHeader ) \
|
||||
(((((tpHalRxBd)_pvBDHeader)->phyStats0) >> 0) & 0xff)
|
||||
#define WLANHAL_RX_BD_GET_RSSI3( _pvBDHeader ) \
|
||||
((((tpHalRxBd)_pvBDHeader)->phyStats0) & 0xff)
|
||||
|
||||
// Get the average of the 4 values.
|
||||
#define WLANHAL_GET_RSSI_AVERAGE( _pvBDHeader ) \
|
||||
(((WLANHAL_RX_BD_GET_RSSI0(_pvBDHeader)) + \
|
||||
(WLANHAL_RX_BD_GET_RSSI1(_pvBDHeader)) + \
|
||||
(WLANHAL_RX_BD_GET_RSSI2(_pvBDHeader)) + \
|
||||
(WLANHAL_RX_BD_GET_RSSI3(_pvBDHeader))) / 4)
|
||||
|
||||
// Get the SNR value from PHY Stats
|
||||
#define WLANHAL_RX_BD_GET_SNR( _pvBDHeader ) \
|
||||
(((((tpHalRxBd)_pvBDHeader)->phyStats1) >> 24) & 0xff)
|
||||
/*-----------------------------------------------------------------*/
|
||||
#define WLANHAL_RX_BD_GET_DPU_SIG( _pvBDHeader ) (((tpHalRxBd)_pvBDHeader)->dpuSignature)
|
||||
|
||||
|
||||
#define WLANHAL_TX_BD_SET_MPDU_DATA_OFFSET( _bd, _off ) (((tpHalTxBd)_bd)->mpduDataOffset = _off)
|
||||
|
||||
#define WLANHAL_TX_BD_SET_MPDU_HEADER_OFFSET( _bd, _off ) (((tpHalTxBd)_bd)->mpduHeaderOffset = _off)
|
||||
|
||||
#define WLANHAL_TX_BD_SET_MPDU_HEADER_LEN( _bd, _len ) (((tpHalTxBd)_bd)->mpduHeaderLength = _len)
|
||||
|
||||
#define WLANHAL_TX_BD_SET_MPDU_LEN( _bd, _len ) (((tpHalTxBd)_bd)->mpduLength = _len)
|
||||
|
||||
#define WLANHAL_RX_BD_GET_BA_OPCODE(_pvBDHeader) (((tpHalRxBd)_pvBDHeader)->reorderOpcode)
|
||||
|
||||
#define WLANHAL_RX_BD_GET_BA_FI(_pvBDHeader) (((tpHalRxBd)_pvBDHeader)->reorderFwdIdx)
|
||||
|
||||
#define WLANHAL_RX_BD_GET_BA_SI(_pvBDHeader) (((tpHalRxBd)_pvBDHeader)->reorderSlotIdx)
|
||||
|
||||
#define WLANHAL_RX_BD_GET_BA_CSN(_pvBDHeader) (((tpHalRxBd)_pvBDHeader)->currentPktSeqNo)
|
||||
|
||||
#define WLANHAL_RX_BD_GET_BA_ESN(_pvBDHeader) (((tpHalRxBd)_pvBDHeader)->expectedPktSeqNo)
|
||||
|
||||
#define WLANHAL_RX_BD_GET_RXP_FLAGS(_pvBDHeader) (((tpHalRxBd)_pvBDHeader)->rxpFlags)
|
||||
|
||||
#define WLANHAL_RX_BD_GET_TYPE_SUBTYPE(_pvBDHeader) (((tpHalRxBd)_pvBDHeader)->frameTypeSubtype)
|
||||
#define WLANHAL_RX_BD_SET_TYPE_SUBTYPE( _bd, _typeSubtype ) (((tpHalRxBd)_bd)->frameTypeSubtype = _typeSubtype)
|
||||
|
||||
|
||||
#define WLANHAL_RX_BD_ASF_SET 1 /*The value of the field when set and pkt is AMSDU*/
|
||||
|
||||
#define WLANHAL_RX_BD_FSF_SET 1
|
||||
|
||||
#define WLANHAL_RX_BD_LSF_SET 1
|
||||
|
||||
#define WLANHAL_RX_BD_AEF_SET 1
|
||||
|
||||
|
||||
#define WLANHAL_RX_BD_LLC_PRESENT 0 /*The value of the field when LLC is present*/
|
||||
|
||||
#define WLANHAL_RX_BD_FT_DONE 1 /* The value of the field when frame xtl was done*/
|
||||
|
||||
/*DPU_FEEDBACK_WPI_UNPROTECTED macro defined in volansdefs.h which is not available
|
||||
for UMAC in prima so declared it here */
|
||||
#define DPU_FEEDBACK_WPI_UNPROTECTED 0x20
|
||||
#define WLANHAL_RX_IS_UNPROTECTED_WPI_FRAME(_pvBDHeader) \
|
||||
(DPU_FEEDBACK_WPI_UNPROTECTED == ((WDI_RxBdType *)_pvBDHeader)->dpuFeedback)
|
||||
|
||||
/*==========================================================================
|
||||
|
||||
FUNCTION WLANHAL_RxBD_GetFrameTypeSubType
|
||||
|
||||
DESCRIPTION
|
||||
Called by TL to retrieve the type/subtype of the received frame.
|
||||
|
||||
DEPENDENCIES
|
||||
TL should pass a valid RxBD buffer pointer.
|
||||
|
||||
PARAMETERS
|
||||
|
||||
IN
|
||||
pvBDHeader: Void pointer to the RxBD buffer.
|
||||
usFrmCtrl:the frame ctrl of the 802.11 header
|
||||
|
||||
RETURN VALUE
|
||||
A byte which contains both type and subtype info. LSB four bytes (b0 to b3)
|
||||
is subtype and b5-b6 is type info.
|
||||
|
||||
SIDE EFFECTS
|
||||
|
||||
============================================================================*/
|
||||
|
||||
tANI_U8 WLANHAL_RxBD_GetFrameTypeSubType(v_PVOID_t _pvBDHeader, tANI_U16 usFrmCtrl);
|
||||
|
||||
|
||||
#define HAL_TXCOMP_REQUESTED_MASK 0x1 //bit 0 for TxComp intr requested.
|
||||
#define HAL_USE_SELF_STA_REQUESTED_MASK 0x2 //bit 1 for STA overwrite with selfSta Requested.
|
||||
#define HAL_TX_NO_ENCRYPTION_MASK 0x4 //bit 2. If set, the frame is not to be encrypted
|
||||
#if defined(LIBRA_WAPI_SUPPORT)
|
||||
#define HAL_WAPI_STA_MASK 0x8 //bit 3. If set, this frame is for WAPI station
|
||||
#endif
|
||||
|
||||
#define HAL_TRIGGER_ENABLED_AC_MASK 0x10 //bit 4 for data frames belonging to trigger enabled AC
|
||||
#define HAL_USE_NO_ACK_REQUESTED_MASK 0x20
|
||||
|
||||
#define HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME 0x40 // Bit 6 will be used to control BD rate for Management frames
|
||||
#define HAL_USE_PEER_STA_REQUESTED_MASK 0x80 //bit 7 will be used to control frames for p2p interface
|
||||
|
||||
#ifdef FEATURE_WLAN_TDLS
|
||||
#define HAL_TDLS_PEER_STA_MASK 0x80 //bit 7 set for TDLS peer station
|
||||
#endif
|
||||
|
||||
/*==========================================================================
|
||||
|
||||
FUNCTION WLANHAL_FillTxBd
|
||||
|
||||
DESCRIPTION
|
||||
Called by PE to register as a client for management frames delivery.
|
||||
|
||||
DEPENDENCIES
|
||||
TL must be initialized before this API can be called.
|
||||
|
||||
PARAMETERS
|
||||
|
||||
IN
|
||||
pAdapter: pointer to the global adapter context;a handle to TL's
|
||||
control block can be extracted from its context
|
||||
vosFrmBuf: pointer to a vOSS buffer containing the management
|
||||
frame to be transmitted
|
||||
usFrmLen: the length of the frame to be transmitted; information
|
||||
is already included in the vOSS buffer
|
||||
wFrmType: the type of the frame being transmitted
|
||||
tid: tid used to transmit this frame
|
||||
pfnCompTxFunc: function pointer to the transmit complete routine
|
||||
voosBDHeader: pointer to the BD header
|
||||
txFlag: can have appropriate bit setting as required
|
||||
|
||||
#define HAL_TXCOMP_REQUESTED_MASK 0x1 //bit 0 for TxComp intr requested.
|
||||
#define HAL_USE_SELF_STA_REQUESTED_MASK 0x2 //bit 1 for STA overwrite with selfSta Requested.
|
||||
#define HAL_TX_NO_ENCRYPTION_MASK 0x4 //bit 2. If set, the frame is not to be encrypted
|
||||
#if defined(FEATURE_WLAN_WAPI)
|
||||
#define HAL_WAPI_STA_MASK 0x8 //bit 3. If set, this frame is for WAPI station
|
||||
#endif
|
||||
|
||||
uTimestamp: pkt timestamp
|
||||
|
||||
|
||||
RETURN VALUE
|
||||
The result code associated with performing the operation
|
||||
|
||||
SIDE EFFECTS
|
||||
|
||||
============================================================================*/
|
||||
VOS_STATUS WLANHAL_FillTxBd(void *pAdapter, tANI_U8 typeSubtype, void *pDestMacAddr, void *pAddr2,
|
||||
tANI_U8* ptid, tANI_U8 disableFrmXtl, void *pTxBd, tANI_U8 txFlag, tANI_U32 timeStamp);
|
||||
|
||||
VOS_STATUS WLANHAL_FillFcTxBd(void *pVosGCtx, void *pFcParams, void *pFcTxBd);
|
||||
/** To swap the report part of FC RxBD */
|
||||
void WLANHAL_SwapFcRxBd(tANI_U8 *pBd);
|
||||
|
||||
/* To swap the data */
|
||||
void WLANHAL_Swap32Bytes(tANI_U8* pData, tANI_U32 size);
|
||||
|
||||
/** To swap the RxBD */
|
||||
void WLANHAL_SwapRxBd(tANI_U8 *pBd);
|
||||
void WLANHAL_RxAmsduBdFix(void *pVosGCtx,v_PVOID_t _pvBDHeader);
|
||||
|
||||
#ifdef WLAN_PERF
|
||||
tANI_U32 WLANHAL_TxBdFastFwd(void *pAdapter, tANI_U8 *pDestMac, tANI_U8 tid, tANI_U8 unicastDst, void *pTxBd, tANI_U16);
|
||||
#endif
|
||||
|
||||
VOS_STATUS WLANHAL_EnableUapsdAcParams(void* pVosGCtx, tANI_U8 staIdx, tUapsdInfo *pUapsdInfo);
|
||||
VOS_STATUS WLANHAL_DisableUapsdAcParams(void* pVosGCtx, tANI_U8 staIdx, tANI_U8 ac);
|
||||
|
||||
VOS_STATUS WLANHAL_EnableIdleBdPduInterrupt(void* pVosGCtx, tANI_U8 idleBdPduThreshold);
|
||||
|
||||
#ifdef FEATURE_ON_CHIP_REORDERING
|
||||
tANI_U8 WLANHAL_IsOnChipReorderingEnabledForTID(void* pVosGCtx, tANI_U8 staIdx, tANI_U8 tid);
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_SOFTAP_VSTA_FEATURE
|
||||
v_BOOL_t WLANHAL_IsHwFrameTxTranslationCapable(v_PVOID_t pVosGCtx, tANI_U8 staIdx);
|
||||
#endif
|
||||
|
||||
#define tHalRxBd halRxBd_type
|
||||
#define tpHalRxBd phalRxBd_type
|
||||
|
||||
#define tHalTxBd halTxBd_type
|
||||
#define tpHalTxBd pHalTxBd_type
|
||||
|
||||
#ifdef BA_PARAM_STRUCTURE
|
||||
#else
|
||||
#define BA_PARAM_STRUCTURE
|
||||
//
|
||||
// HAL --> TL
|
||||
// Messages indicating the setup and/or teardown of
|
||||
// A-MPDU/BA sessions with a given peer HT MAC entity
|
||||
//
|
||||
|
||||
//
|
||||
// A data structure identifying all of the variables
|
||||
// in a typical A-MPDU/BA setup
|
||||
//
|
||||
typedef struct sBAParams
|
||||
{
|
||||
|
||||
// A unique BA Session ID that has been assigned by HAL
|
||||
// for the curent BA Session
|
||||
tANI_U16 baSessionID;
|
||||
|
||||
// TID for which the BA session has been setup
|
||||
tANI_U8 baTID;
|
||||
|
||||
// BA Buffer Size allocated for the current BA session //Should be deleted. needs TL change. use winSize instead
|
||||
tANI_U8 baBufferSize;
|
||||
|
||||
tANI_U16 SSN;
|
||||
tANI_U8 winSize;
|
||||
tANI_U8 STAID;
|
||||
|
||||
} tBAParams, *tpBAParams;
|
||||
|
||||
//
|
||||
// TL -> HAL
|
||||
// tSirMsgQ.type = SIR_HAL_HDD_ADDBA_RSP
|
||||
//
|
||||
typedef struct sAddBARsp
|
||||
{
|
||||
// Message Type
|
||||
tANI_U16 mesgType;
|
||||
|
||||
// Message Length
|
||||
tANI_U16 mesgLen;
|
||||
|
||||
//BA session ID
|
||||
tANI_U16 baSessionID;
|
||||
|
||||
tANI_U16 replyWinSize;
|
||||
}tAddBARsp, *tpAddBARsp;
|
||||
|
||||
//
|
||||
// HAL -> TL
|
||||
// tSirMsgQ.type = SIR_HAL_ADDBA_IND
|
||||
// tSirMsgQ.reserved = 0
|
||||
// tSirMsgQ.body = "allocated" instance of tpAddBAInd
|
||||
//
|
||||
typedef struct sAddBAInd
|
||||
{
|
||||
|
||||
// Message Type
|
||||
tANI_U16 mesgType;
|
||||
|
||||
// Message Length
|
||||
tANI_U16 mesgLen;
|
||||
|
||||
tBAParams baSession;
|
||||
|
||||
} tAddBAInd, *tpAddBAInd;
|
||||
|
||||
//
|
||||
// HAL -> TL
|
||||
// tSirMsgQ.type = SIR_HAL_DELBA_IND
|
||||
// tSirMsgQ.reserved = 0
|
||||
// tSirMsgQ.body = "allocated" instance of tpDelBAInd
|
||||
//
|
||||
// TL -> HAL
|
||||
// tSirMsgQ.type = SIR_HAL_BA_FAIL_IND
|
||||
// tSirMsgQ.reserved = 0
|
||||
// tSirMsgQ.body = "allocated" instance of tpDelBAInd
|
||||
//
|
||||
typedef struct sDelBAInd
|
||||
{
|
||||
tANI_U8 staIdx;
|
||||
|
||||
tANI_U8 baTID;
|
||||
// Message Type
|
||||
tANI_U16 mesgType;
|
||||
|
||||
// Message Length
|
||||
tANI_U16 mesgLen;
|
||||
|
||||
} tDelBAInd, *tpDelBAInd;
|
||||
#endif
|
||||
|
||||
/*===============================================
|
||||
*
|
||||
* TL <-> HAL structures
|
||||
*
|
||||
*===============================================
|
||||
*/
|
||||
//
|
||||
// TL -> HAL
|
||||
// tSirMsgQ.type = SIR_HAL_TL_FLUSH_AC_REQ
|
||||
//
|
||||
typedef struct sFlushACReq
|
||||
{
|
||||
// Message Type
|
||||
tANI_U16 mesgType;
|
||||
|
||||
// Message Length
|
||||
tANI_U16 mesgLen;
|
||||
|
||||
// Station Index. originates from HAL
|
||||
tANI_U8 ucSTAId;
|
||||
|
||||
// TID for which the transmit queue is being flushed
|
||||
tANI_U8 ucTid;
|
||||
|
||||
} tFlushACReq, *tpFlushACReq;
|
||||
|
||||
//
|
||||
//
|
||||
// HAL -> TL
|
||||
// tSirMsgQ.type = SIR_HAL_TL_FLUSH_AC_RSP
|
||||
//
|
||||
typedef struct sFlushACRsp
|
||||
{
|
||||
// Message Type
|
||||
tANI_U16 mesgType;
|
||||
|
||||
// Message Length
|
||||
tANI_U16 mesgLen;
|
||||
|
||||
// Station Index. originates from HAL
|
||||
tANI_U8 ucSTAId;
|
||||
|
||||
// TID for which the transmit queue is being flushed
|
||||
tANI_U8 ucTid;
|
||||
|
||||
// status of the Flush operation
|
||||
tANI_U8 status;
|
||||
} tFlushACRsp, *tpFlushACRsp;
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user