blob: bca3dc62e03b207110362cd6b7d4dd2b95dfc814 [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,
94#ifdef FEATURE_WLAN_TDLS_INTERNAL
95 eSmeCommandTdlsDiscovery,
96 eSmeCommandTdlsLinkSetup,
97 eSmeCommandTdlsLinkTear,
98 eSmeCommandTdlsEnterUapsd,
99 eSmeCommandTdlsExitUapsd,
100#endif
101#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700102 //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 Johnsone7245742012-09-05 17:12:55 -0700117#ifdef FEATURE_OEM_DATA_SUPPORT
118 eSmeCommandOemDataReq = 0x80000, //To identify the oem data commands
119#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700120#ifdef WLAN_FEATURE_P2P
121 eSmeCommandRemainOnChannel,
122 eSmeCommandNoAUpdate,
123#endif
124} eSmeCommandType;
125
126
127typedef enum eSmeState
128{
129 SME_STATE_STOP,
130 SME_STATE_START,
131 SME_STATE_READY,
132} eSmeState;
133
Srinivas Girigowdade697412013-02-14 16:31:48 -0800134#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
135/* enumeration for Korea country revision index,
136 index to the list of valid channels */
137typedef enum eSmeKRRevision
138{
139 SME_KR_3 = 3,
140 SME_KR_24 = 24,
141 SME_KR_25 = 25,
142} eSmeKRRevision;
143#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700144
145#define SME_IS_START(pMac) (SME_STATE_STOP != (pMac)->sme.state)
146#define SME_IS_READY(pMac) (SME_STATE_READY == (pMac)->sme.state)
147
148
149typedef struct tagSmeStruct
150{
151 eSmeState state;
152 vos_lock_t lkSmeGlobalLock;
153 tANI_U32 totalSmeCmd;
154 void *pSmeCmdBufAddr;
155 tDblLinkList smeCmdActiveList;
156 tDblLinkList smeCmdPendingList;
157 tDblLinkList smeCmdFreeList; //preallocated roam cmd list
158 void (*pTxPerHitCallback) (void *pCallbackContext); /* callback for Tx PER hit to HDD */
159 void *pTxPerHitCbContext;
160} tSmeStruct, *tpSmeStruct;
161
162
163#endif //#if !defined( __SMEINTERNAL_H )