Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2012, Code Aurora Forum. All rights reserved. |
| 3 | * |
| 4 | * Previously licensed under the ISC license by Qualcomm Atheros, Inc. |
| 5 | * |
| 6 | * |
| 7 | * Permission to use, copy, modify, and/or distribute this software for |
| 8 | * any purpose with or without fee is hereby granted, provided that the |
| 9 | * above copyright notice and this permission notice appear in all |
| 10 | * copies. |
| 11 | * |
| 12 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 13 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 14 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 15 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 16 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 17 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 18 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 19 | * PERFORMANCE OF THIS SOFTWARE. |
| 20 | */ |
| 21 | |
| 22 | #if !defined( __SMEINTERNAL_H ) |
| 23 | #define __SMEINTERNAL_H |
| 24 | |
| 25 | |
| 26 | /**========================================================================= |
| 27 | |
| 28 | \file smeInternal.h |
| 29 | |
| 30 | \brief prototype for SME internal structures and APIs used for SME and MAC |
| 31 | |
| 32 | Copyright 2008 (c) Qualcomm, Incorporated. All Rights Reserved. |
| 33 | |
| 34 | Qualcomm Confidential and Proprietary. |
| 35 | |
| 36 | ========================================================================*/ |
| 37 | |
| 38 | /* $Header$ */ |
| 39 | |
| 40 | /*-------------------------------------------------------------------------- |
| 41 | Include Files |
| 42 | ------------------------------------------------------------------------*/ |
| 43 | #include "vos_status.h" |
| 44 | #include "vos_lock.h" |
| 45 | #include "vos_trace.h" |
| 46 | #include "vos_memory.h" |
| 47 | #include "vos_types.h" |
| 48 | #include "csrLinkList.h" |
| 49 | |
| 50 | /*-------------------------------------------------------------------------- |
| 51 | Type declarations |
| 52 | ------------------------------------------------------------------------*/ |
| 53 | |
| 54 | // Mask can be only have one bit set |
| 55 | typedef enum eSmeCommandType |
| 56 | { |
| 57 | eSmeNoCommand = 0, |
| 58 | eSmeDropCommand, |
| 59 | //CSR |
| 60 | eSmeCsrCommandMask = 0x10000, //this is not a command, it is to identify this is a CSR command |
| 61 | eSmeCommandScan, |
| 62 | eSmeCommandRoam, |
| 63 | eSmeCommandWmStatusChange, |
| 64 | eSmeCommandSetKey, |
| 65 | eSmeCommandRemoveKey, |
| 66 | eSmeCommandAddStaSession, |
| 67 | eSmeCommandDelStaSession, |
| 68 | //PMC |
| 69 | eSmePmcCommandMask = 0x20000, //To identify PMC commands |
| 70 | eSmeCommandEnterImps, |
| 71 | eSmeCommandExitImps, |
| 72 | eSmeCommandEnterBmps, |
| 73 | eSmeCommandExitBmps, |
| 74 | eSmeCommandEnterUapsd, |
| 75 | eSmeCommandExitUapsd, |
| 76 | eSmeCommandEnterWowl, |
| 77 | eSmeCommandExitWowl, |
| 78 | eSmeCommandEnterStandby, |
| 79 | //QOS |
| 80 | eSmeQosCommandMask = 0x40000, //To identify Qos commands |
| 81 | eSmeCommandAddTs, |
| 82 | eSmeCommandDelTs, |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame^] | 83 | #ifdef FEATURE_OEM_DATA_SUPPORT |
| 84 | eSmeCommandOemDataReq = 0x80000, //To identify the oem data commands |
| 85 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 86 | #ifdef WLAN_FEATURE_P2P |
| 87 | eSmeCommandRemainOnChannel, |
| 88 | eSmeCommandNoAUpdate, |
| 89 | #endif |
| 90 | } eSmeCommandType; |
| 91 | |
| 92 | |
| 93 | typedef enum eSmeState |
| 94 | { |
| 95 | SME_STATE_STOP, |
| 96 | SME_STATE_START, |
| 97 | SME_STATE_READY, |
| 98 | } eSmeState; |
| 99 | |
| 100 | |
| 101 | #define SME_IS_START(pMac) (SME_STATE_STOP != (pMac)->sme.state) |
| 102 | #define SME_IS_READY(pMac) (SME_STATE_READY == (pMac)->sme.state) |
| 103 | |
| 104 | |
| 105 | typedef struct tagSmeStruct |
| 106 | { |
| 107 | eSmeState state; |
| 108 | vos_lock_t lkSmeGlobalLock; |
| 109 | tANI_U32 totalSmeCmd; |
| 110 | void *pSmeCmdBufAddr; |
| 111 | tDblLinkList smeCmdActiveList; |
| 112 | tDblLinkList smeCmdPendingList; |
| 113 | tDblLinkList smeCmdFreeList; //preallocated roam cmd list |
| 114 | void (*pTxPerHitCallback) (void *pCallbackContext); /* callback for Tx PER hit to HDD */ |
| 115 | void *pTxPerHitCbContext; |
| 116 | } tSmeStruct, *tpSmeStruct; |
| 117 | |
| 118 | |
| 119 | #endif //#if !defined( __SMEINTERNAL_H ) |