Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
Gopichand Nakkala | 92f07d8 | 2013-01-08 21:16:34 -0800 | [diff] [blame] | 2 | * Copyright (c) 2012-2013, The Linux Foundation. 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 | /* |
Jeff Johnson | 32d95a3 | 2012-09-10 13:15:23 -0700 | [diff] [blame] | 22 | * Copyright (c) 2012, The Linux Foundation. All rights reserved. |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 23 | * |
| 24 | * Previously licensed under the ISC license by Qualcomm Atheros, Inc. |
| 25 | * |
| 26 | * |
| 27 | * Permission to use, copy, modify, and/or distribute this software for |
| 28 | * any purpose with or without fee is hereby granted, provided that the |
| 29 | * above copyright notice and this permission notice appear in all |
| 30 | * copies. |
| 31 | * |
| 32 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 33 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 34 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 35 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 36 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 37 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 38 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 39 | * PERFORMANCE OF THIS SOFTWARE. |
| 40 | */ |
| 41 | |
| 42 | #if !defined( __SMEINTERNAL_H ) |
| 43 | #define __SMEINTERNAL_H |
| 44 | |
| 45 | |
| 46 | /**========================================================================= |
| 47 | |
| 48 | \file smeInternal.h |
| 49 | |
| 50 | \brief prototype for SME internal structures and APIs used for SME and MAC |
| 51 | |
| 52 | Copyright 2008 (c) Qualcomm, Incorporated. All Rights Reserved. |
| 53 | |
| 54 | Qualcomm Confidential and Proprietary. |
| 55 | |
| 56 | ========================================================================*/ |
| 57 | |
| 58 | /* $Header$ */ |
| 59 | |
| 60 | /*-------------------------------------------------------------------------- |
| 61 | Include Files |
| 62 | ------------------------------------------------------------------------*/ |
| 63 | #include "vos_status.h" |
| 64 | #include "vos_lock.h" |
| 65 | #include "vos_trace.h" |
| 66 | #include "vos_memory.h" |
| 67 | #include "vos_types.h" |
| 68 | #include "csrLinkList.h" |
| 69 | |
| 70 | /*-------------------------------------------------------------------------- |
| 71 | Type declarations |
| 72 | ------------------------------------------------------------------------*/ |
| 73 | |
| 74 | // Mask can be only have one bit set |
| 75 | typedef enum eSmeCommandType |
| 76 | { |
| 77 | eSmeNoCommand = 0, |
| 78 | eSmeDropCommand, |
| 79 | //CSR |
| 80 | eSmeCsrCommandMask = 0x10000, //this is not a command, it is to identify this is a CSR command |
| 81 | eSmeCommandScan, |
| 82 | eSmeCommandRoam, |
| 83 | eSmeCommandWmStatusChange, |
| 84 | eSmeCommandSetKey, |
| 85 | eSmeCommandRemoveKey, |
| 86 | eSmeCommandAddStaSession, |
| 87 | eSmeCommandDelStaSession, |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 88 | #ifdef FEATURE_WLAN_TDLS |
| 89 | //eSmeTdlsCommandMask = 0x80000, //To identify TDLS commands <TODO> |
| 90 | //These can be considered as csr commands. |
| 91 | eSmeCommandTdlsSendMgmt, |
| 92 | eSmeCommandTdlsAddPeer, |
| 93 | eSmeCommandTdlsDelPeer, |
| 94 | #ifdef FEATURE_WLAN_TDLS_INTERNAL |
| 95 | eSmeCommandTdlsDiscovery, |
| 96 | eSmeCommandTdlsLinkSetup, |
| 97 | eSmeCommandTdlsLinkTear, |
| 98 | eSmeCommandTdlsEnterUapsd, |
| 99 | eSmeCommandTdlsExitUapsd, |
| 100 | #endif |
| 101 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 102 | //PMC |
| 103 | eSmePmcCommandMask = 0x20000, //To identify PMC commands |
| 104 | eSmeCommandEnterImps, |
| 105 | eSmeCommandExitImps, |
| 106 | eSmeCommandEnterBmps, |
| 107 | eSmeCommandExitBmps, |
| 108 | eSmeCommandEnterUapsd, |
| 109 | eSmeCommandExitUapsd, |
| 110 | eSmeCommandEnterWowl, |
| 111 | eSmeCommandExitWowl, |
| 112 | eSmeCommandEnterStandby, |
| 113 | //QOS |
| 114 | eSmeQosCommandMask = 0x40000, //To identify Qos commands |
| 115 | eSmeCommandAddTs, |
| 116 | eSmeCommandDelTs, |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 117 | #ifdef FEATURE_OEM_DATA_SUPPORT |
| 118 | eSmeCommandOemDataReq = 0x80000, //To identify the oem data commands |
| 119 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 120 | eSmeCommandRemainOnChannel, |
| 121 | eSmeCommandNoAUpdate, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 122 | } eSmeCommandType; |
| 123 | |
| 124 | |
| 125 | typedef enum eSmeState |
| 126 | { |
| 127 | SME_STATE_STOP, |
| 128 | SME_STATE_START, |
| 129 | SME_STATE_READY, |
| 130 | } eSmeState; |
| 131 | |
Srinivas Girigowda | de69741 | 2013-02-14 16:31:48 -0800 | [diff] [blame] | 132 | #if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR) |
| 133 | /* enumeration for Korea country revision index, |
| 134 | index to the list of valid channels */ |
| 135 | typedef enum eSmeKRRevision |
| 136 | { |
| 137 | SME_KR_3 = 3, |
| 138 | SME_KR_24 = 24, |
| 139 | SME_KR_25 = 25, |
| 140 | } eSmeKRRevision; |
| 141 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 142 | |
| 143 | #define SME_IS_START(pMac) (SME_STATE_STOP != (pMac)->sme.state) |
| 144 | #define SME_IS_READY(pMac) (SME_STATE_READY == (pMac)->sme.state) |
| 145 | |
| 146 | |
| 147 | typedef struct tagSmeStruct |
| 148 | { |
| 149 | eSmeState state; |
| 150 | vos_lock_t lkSmeGlobalLock; |
| 151 | tANI_U32 totalSmeCmd; |
| 152 | void *pSmeCmdBufAddr; |
| 153 | tDblLinkList smeCmdActiveList; |
| 154 | tDblLinkList smeCmdPendingList; |
| 155 | tDblLinkList smeCmdFreeList; //preallocated roam cmd list |
| 156 | void (*pTxPerHitCallback) (void *pCallbackContext); /* callback for Tx PER hit to HDD */ |
| 157 | void *pTxPerHitCbContext; |
| 158 | } tSmeStruct, *tpSmeStruct; |
| 159 | |
| 160 | |
| 161 | #endif //#if !defined( __SMEINTERNAL_H ) |