blob: 24c7f6e8217d6f531a3487259dc69b6d9ff853cf [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Gopichand Nakkala92f07d82013-01-08 21:16:34 -08002 * 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 Johnson32d95a32012-09-10 13:15:23 -070022 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
Jeff Johnson295189b2012-06-20 16:38:30 -070023 *
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
75typedef 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 Khanna698ba2a2012-12-04 15:08:18 -080088#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,
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +053094 eSmeCommandTdlsLinkEstablish,
Mohit Khanna698ba2a2012-12-04 15:08:18 -080095#ifdef FEATURE_WLAN_TDLS_INTERNAL
96 eSmeCommandTdlsDiscovery,
97 eSmeCommandTdlsLinkSetup,
98 eSmeCommandTdlsLinkTear,
99 eSmeCommandTdlsEnterUapsd,
100 eSmeCommandTdlsExitUapsd,
101#endif
102#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700103 //PMC
104 eSmePmcCommandMask = 0x20000, //To identify PMC commands
105 eSmeCommandEnterImps,
106 eSmeCommandExitImps,
107 eSmeCommandEnterBmps,
108 eSmeCommandExitBmps,
109 eSmeCommandEnterUapsd,
110 eSmeCommandExitUapsd,
111 eSmeCommandEnterWowl,
112 eSmeCommandExitWowl,
113 eSmeCommandEnterStandby,
114 //QOS
115 eSmeQosCommandMask = 0x40000, //To identify Qos commands
116 eSmeCommandAddTs,
117 eSmeCommandDelTs,
Jeff Johnsone7245742012-09-05 17:12:55 -0700118#ifdef FEATURE_OEM_DATA_SUPPORT
119 eSmeCommandOemDataReq = 0x80000, //To identify the oem data commands
120#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700121 eSmeCommandRemainOnChannel,
122 eSmeCommandNoAUpdate,
Jeff Johnson295189b2012-06-20 16:38:30 -0700123} eSmeCommandType;
124
125
126typedef enum eSmeState
127{
128 SME_STATE_STOP,
129 SME_STATE_START,
130 SME_STATE_READY,
131} eSmeState;
132
Srinivas Girigowdade697412013-02-14 16:31:48 -0800133#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
134/* enumeration for Korea country revision index,
135 index to the list of valid channels */
136typedef enum eSmeKRRevision
137{
138 SME_KR_3 = 3,
139 SME_KR_24 = 24,
140 SME_KR_25 = 25,
141} eSmeKRRevision;
142#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700143
144#define SME_IS_START(pMac) (SME_STATE_STOP != (pMac)->sme.state)
145#define SME_IS_READY(pMac) (SME_STATE_READY == (pMac)->sme.state)
146
147
148typedef struct tagSmeStruct
149{
150 eSmeState state;
151 vos_lock_t lkSmeGlobalLock;
152 tANI_U32 totalSmeCmd;
153 void *pSmeCmdBufAddr;
154 tDblLinkList smeCmdActiveList;
155 tDblLinkList smeCmdPendingList;
156 tDblLinkList smeCmdFreeList; //preallocated roam cmd list
157 void (*pTxPerHitCallback) (void *pCallbackContext); /* callback for Tx PER hit to HDD */
158 void *pTxPerHitCbContext;
159} tSmeStruct, *tpSmeStruct;
160
161
162#endif //#if !defined( __SMEINTERNAL_H )