blob: f37ce4b12b4cf7f7646c63892968a6f48241ca00 [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 eSmeCommandRemainOnChannel,
121 eSmeCommandNoAUpdate,
Jeff Johnson295189b2012-06-20 16:38:30 -0700122} eSmeCommandType;
123
124
125typedef enum eSmeState
126{
127 SME_STATE_STOP,
128 SME_STATE_START,
129 SME_STATE_READY,
130} eSmeState;
131
Srinivas Girigowdade697412013-02-14 16:31:48 -0800132#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 */
135typedef enum eSmeKRRevision
136{
137 SME_KR_3 = 3,
138 SME_KR_24 = 24,
139 SME_KR_25 = 25,
140} eSmeKRRevision;
141#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700142
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
147typedef 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 )