blob: bca3dc62e03b207110362cd6b7d4dd2b95dfc814 [file] [log] [blame]
/*
* Copyright (c) 2012-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.
*/
/*
* Copyright (c) 2012, 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.
*/
#if !defined( __SMEINTERNAL_H )
#define __SMEINTERNAL_H
/**=========================================================================
\file smeInternal.h
\brief prototype for SME internal structures and APIs used for SME and MAC
Copyright 2008 (c) Qualcomm, Incorporated. All Rights Reserved.
Qualcomm Confidential and Proprietary.
========================================================================*/
/* $Header$ */
/*--------------------------------------------------------------------------
Include Files
------------------------------------------------------------------------*/
#include "vos_status.h"
#include "vos_lock.h"
#include "vos_trace.h"
#include "vos_memory.h"
#include "vos_types.h"
#include "csrLinkList.h"
/*--------------------------------------------------------------------------
Type declarations
------------------------------------------------------------------------*/
// Mask can be only have one bit set
typedef enum eSmeCommandType
{
eSmeNoCommand = 0,
eSmeDropCommand,
//CSR
eSmeCsrCommandMask = 0x10000, //this is not a command, it is to identify this is a CSR command
eSmeCommandScan,
eSmeCommandRoam,
eSmeCommandWmStatusChange,
eSmeCommandSetKey,
eSmeCommandRemoveKey,
eSmeCommandAddStaSession,
eSmeCommandDelStaSession,
#ifdef FEATURE_WLAN_TDLS
//eSmeTdlsCommandMask = 0x80000, //To identify TDLS commands <TODO>
//These can be considered as csr commands.
eSmeCommandTdlsSendMgmt,
eSmeCommandTdlsAddPeer,
eSmeCommandTdlsDelPeer,
#ifdef FEATURE_WLAN_TDLS_INTERNAL
eSmeCommandTdlsDiscovery,
eSmeCommandTdlsLinkSetup,
eSmeCommandTdlsLinkTear,
eSmeCommandTdlsEnterUapsd,
eSmeCommandTdlsExitUapsd,
#endif
#endif
//PMC
eSmePmcCommandMask = 0x20000, //To identify PMC commands
eSmeCommandEnterImps,
eSmeCommandExitImps,
eSmeCommandEnterBmps,
eSmeCommandExitBmps,
eSmeCommandEnterUapsd,
eSmeCommandExitUapsd,
eSmeCommandEnterWowl,
eSmeCommandExitWowl,
eSmeCommandEnterStandby,
//QOS
eSmeQosCommandMask = 0x40000, //To identify Qos commands
eSmeCommandAddTs,
eSmeCommandDelTs,
#ifdef FEATURE_OEM_DATA_SUPPORT
eSmeCommandOemDataReq = 0x80000, //To identify the oem data commands
#endif
#ifdef WLAN_FEATURE_P2P
eSmeCommandRemainOnChannel,
eSmeCommandNoAUpdate,
#endif
} eSmeCommandType;
typedef enum eSmeState
{
SME_STATE_STOP,
SME_STATE_START,
SME_STATE_READY,
} eSmeState;
#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
/* enumeration for Korea country revision index,
index to the list of valid channels */
typedef enum eSmeKRRevision
{
SME_KR_3 = 3,
SME_KR_24 = 24,
SME_KR_25 = 25,
} eSmeKRRevision;
#endif
#define SME_IS_START(pMac) (SME_STATE_STOP != (pMac)->sme.state)
#define SME_IS_READY(pMac) (SME_STATE_READY == (pMac)->sme.state)
typedef struct tagSmeStruct
{
eSmeState state;
vos_lock_t lkSmeGlobalLock;
tANI_U32 totalSmeCmd;
void *pSmeCmdBufAddr;
tDblLinkList smeCmdActiveList;
tDblLinkList smeCmdPendingList;
tDblLinkList smeCmdFreeList; //preallocated roam cmd list
void (*pTxPerHitCallback) (void *pCallbackContext); /* callback for Tx PER hit to HDD */
void *pTxPerHitCbContext;
} tSmeStruct, *tpSmeStruct;
#endif //#if !defined( __SMEINTERNAL_H )