blob: b51017bf230ee129bd2170e6a9f38bac51b9b813 [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 */
Jeff Johnson295189b2012-06-20 16:38:30 -070041/*
42 *
43 * Airgo Networks, Inc proprietary. All rights reserved.
44 * This file limGlobal.h contains the definitions exported by
45 * LIM module.
46 * Author: Chandra Modumudi
47 * Date: 02/11/02
48 * History:-
49 * Date Modified by Modification Information
50 * --------------------------------------------------------------------
51 *
52 */
53#ifndef __LIM_GLOBAL_H
54#define __LIM_GLOBAL_H
55
56#include "wniApi.h"
57#include "sirApi.h"
58#include "sirMacProtDef.h"
59#include "sirMacPropExts.h"
60#include "sirCommon.h"
61#include "sirDebug.h"
Jeff Johnson62c27982013-02-27 17:53:55 -080062#include "wniCfgSta.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070063#include "csrApi.h"
64#include "sapApi.h"
Mohit Khanna698ba2a2012-12-04 15:08:18 -080065#ifdef FEATURE_WLAN_TDLS
66#include "dot11f.h"
67#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070068
69/// Maximum number of scan hash table entries
70#define LIM_MAX_NUM_OF_SCAN_RESULTS 256
71
72// Link Test Report Status. This appears in the report frame
73#define LINK_TEST_STATUS_SUCCESS 0x1
74#define LINK_TEST_STATUS_UNSUPPORTED_RATE 0x2
75#define LINK_TEST_STATUS_INVALID_ADDR 0x3
76
77// Amount of time in nanosec to be sleep-waited before
78// enabling RHP (1 millisec)
79#define LIM_RHP_WORK_AROUND_DURATION 1000000
80
81// Maximum amount of Quiet duration in millisec
82#define LIM_MAX_QUIET_DURATION 32
83
84#define LIM_TX_WQ_EMPTY_SLEEP_NS 100000
85
86// Sending Disassociate frames threshold
87#define LIM_SEND_DISASSOC_FRAME_THRESHOLD 2
88#define LIM_HASH_MISS_TIMER_MS 10000
89
90// Deferred Message Queue Length
91#define MAX_DEFERRED_QUEUE_LEN 20
92
93// Maximum Buffer size
94#define LIM_MAX_BUF_SIZE 8192
95
96// Maximum number of PS - TIM's to be sent with out wakeup from STA
97#define LIM_TIM_WAIT_COUNT_FACTOR 5
98
99/** Use this count if (LIM_TIM_WAIT_FACTOR * ListenInterval) is less than LIM_MIN_TIM_WAIT_CNT*/
100#define LIM_MIN_TIM_WAIT_COUNT 50
101
102#define GET_TIM_WAIT_COUNT(LIntrvl) ((LIntrvl * LIM_TIM_WAIT_COUNT_FACTOR) > LIM_MIN_TIM_WAIT_COUNT ? \
103 (LIntrvl * LIM_TIM_WAIT_COUNT_FACTOR) : LIM_MIN_TIM_WAIT_COUNT)
104
105// enums exported by LIM are as follows
106
107/// System role definition
108typedef enum eLimSystemRole
109{
110 eLIM_UNKNOWN_ROLE,
111 eLIM_AP_ROLE,
112 eLIM_STA_IN_IBSS_ROLE,
113 eLIM_STA_ROLE,
114 eLIM_BT_AMP_STA_ROLE,
115 eLIM_BT_AMP_AP_ROLE
116#ifdef WLAN_FEATURE_P2P
117 ,eLIM_P2P_DEVICE_ROLE
118 ,eLIM_P2P_DEVICE_GO
119 ,eLIM_P2P_DEVICE_CLINET
120#endif
121} tLimSystemRole;
122
123/**
124 * SME state definition accessible across all Sirius modules.
125 * AP only states are LIM_SME_CHANNEL_SCAN_STATE &
126 * LIM_SME_NORMAL_CHANNEL_SCAN_STATE.
127 * Note that these states may also be present in STA
128 * side too when DFS support is present for a STA in IBSS mode.
129 */
130typedef enum eLimSmeStates
131{
132 eLIM_SME_OFFLINE_STATE,
133 eLIM_SME_IDLE_STATE,
134 eLIM_SME_SUSPEND_STATE,
135 eLIM_SME_WT_SCAN_STATE,
136 eLIM_SME_WT_JOIN_STATE,
137 eLIM_SME_WT_AUTH_STATE,
138 eLIM_SME_WT_ASSOC_STATE,
139 eLIM_SME_WT_REASSOC_STATE,
140 eLIM_SME_WT_REASSOC_LINK_FAIL_STATE,
141 eLIM_SME_JOIN_FAILURE_STATE,
142 eLIM_SME_ASSOCIATED_STATE,
143 eLIM_SME_REASSOCIATED_STATE,
144 eLIM_SME_LINK_EST_STATE,
145 eLIM_SME_LINK_EST_WT_SCAN_STATE,
146 eLIM_SME_WT_PRE_AUTH_STATE,
147 eLIM_SME_WT_DISASSOC_STATE,
148 eLIM_SME_WT_DEAUTH_STATE,
149 eLIM_SME_WT_START_BSS_STATE,
150 eLIM_SME_WT_STOP_BSS_STATE,
151 eLIM_SME_NORMAL_STATE,
152 eLIM_SME_CHANNEL_SCAN_STATE,
153 eLIM_SME_NORMAL_CHANNEL_SCAN_STATE
154} tLimSmeStates;
155
156/**
157 * MLM state definition.
158 * While these states are present on AP too when it is
159 * STA mode, per-STA MLM state exclusive to AP is:
160 * eLIM_MLM_WT_AUTH_FRAME3.
161 */
162typedef enum eLimMlmStates
163{
164 eLIM_MLM_OFFLINE_STATE,
165 eLIM_MLM_IDLE_STATE,
166 eLIM_MLM_WT_PROBE_RESP_STATE,
167 eLIM_MLM_PASSIVE_SCAN_STATE,
168 eLIM_MLM_WT_JOIN_BEACON_STATE,
169 eLIM_MLM_JOINED_STATE,
170 eLIM_MLM_BSS_STARTED_STATE,
171 eLIM_MLM_WT_AUTH_FRAME2_STATE,
172 eLIM_MLM_WT_AUTH_FRAME3_STATE,
173 eLIM_MLM_WT_AUTH_FRAME4_STATE,
174 eLIM_MLM_AUTH_RSP_TIMEOUT_STATE,
175 eLIM_MLM_AUTHENTICATED_STATE,
176 eLIM_MLM_WT_ASSOC_RSP_STATE,
177 eLIM_MLM_WT_REASSOC_RSP_STATE,
178 eLIM_MLM_ASSOCIATED_STATE,
179 eLIM_MLM_REASSOCIATED_STATE,
180 eLIM_MLM_LINK_ESTABLISHED_STATE,
181 eLIM_MLM_WT_ASSOC_CNF_STATE,
182 eLIM_MLM_LEARN_STATE,
183 eLIM_MLM_WT_ADD_BSS_RSP_STATE,
184 eLIM_MLM_WT_DEL_BSS_RSP_STATE,
185 eLIM_MLM_WT_ADD_BSS_RSP_ASSOC_STATE,
186 eLIM_MLM_WT_ADD_BSS_RSP_REASSOC_STATE,
187 eLIM_MLM_WT_ADD_BSS_RSP_PREASSOC_STATE,
188 eLIM_MLM_WT_ADD_STA_RSP_STATE,
189 eLIM_MLM_WT_DEL_STA_RSP_STATE,
190 //MLM goes to this state when LIM initiates DELETE_STA as processing of Assoc req because
191 //the entry already exists. LIM comes out of this state when DELETE_STA response from
192 //HAL is received. LIM needs to maintain this state so that ADD_STA can be issued while
193 //processing DELETE_STA response from HAL.
194 eLIM_MLM_WT_ASSOC_DEL_STA_RSP_STATE,
195 eLIM_MLM_WT_SET_BSS_KEY_STATE,
196 eLIM_MLM_WT_SET_STA_KEY_STATE,
197 eLIM_MLM_WT_SET_STA_BCASTKEY_STATE,
198 eLIM_MLM_WT_ADDBA_RSP_STATE,
199 eLIM_MLM_WT_REMOVE_BSS_KEY_STATE,
200 eLIM_MLM_WT_REMOVE_STA_KEY_STATE,
201 eLIM_MLM_WT_SET_MIMOPS_STATE,
202#if defined WLAN_FEATURE_VOWIFI_11R
203 eLIM_MLM_WT_ADD_BSS_RSP_FT_REASSOC_STATE,
204 eLIM_MLM_WT_FT_REASSOC_RSP_STATE,
205#endif
206#ifdef WLAN_FEATURE_P2P
207 eLIM_MLM_P2P_LISTEN_STATE,
208#endif
209} tLimMlmStates;
210
211// 11h channel quiet states
212/* This enum indicates in which state the device is in
213 * when it receives quiet element in beacon or probe-response.
214 * The default quiet state of the device is always INIT
215 * eLIM_QUIET_BEGIN - When Quiet period is started
216 * eLIM_QUIET_CHANGED - When Quiet period is updated
217 * eLIM_QUIET_RUNNING - Between two successive Quiet updates
218 * eLIM_QUIET_END - When quiet period ends
219 */
220typedef enum eLimQuietStates
221{
222 eLIM_QUIET_INIT,
223 eLIM_QUIET_BEGIN,
224 eLIM_QUIET_CHANGED,
225 eLIM_QUIET_RUNNING,
226 eLIM_QUIET_END
227} tLimQuietStates;
228
229// 11h channel switch states
230/* This enum indicates in which state the channel-swith
231 * is presently operating.
232 * eLIM_11H_CHANSW_INIT - Default state
233 * eLIM_11H_CHANSW_RUNNING - When channel switch is running
234 * eLIM_11H_CHANSW_END - After channel switch is complete
235 */
236typedef enum eLimDot11hChanSwStates
237{
238 eLIM_11H_CHANSW_INIT,
239 eLIM_11H_CHANSW_RUNNING,
240 eLIM_11H_CHANSW_END
241} tLimDot11hChanSwStates;
242
243#ifdef GEN4_SCAN
244
245//WLAN_SUSPEND_LINK Related
246typedef void (*SUSPEND_RESUME_LINK_CALLBACK)(tpAniSirGlobal pMac, eHalStatus status, tANI_U32 *data);
247
248// LIM to HAL SCAN Management Message Interface states
249typedef enum eLimHalScanState
250{
251 eLIM_HAL_IDLE_SCAN_STATE,
252 eLIM_HAL_INIT_SCAN_WAIT_STATE,
253 eLIM_HAL_START_SCAN_WAIT_STATE,
254 eLIM_HAL_END_SCAN_WAIT_STATE,
255 eLIM_HAL_FINISH_SCAN_WAIT_STATE,
256 eLIM_HAL_INIT_LEARN_WAIT_STATE,
257 eLIM_HAL_START_LEARN_WAIT_STATE,
258 eLIM_HAL_END_LEARN_WAIT_STATE,
259 eLIM_HAL_FINISH_LEARN_WAIT_STATE,
260 eLIM_HAL_SCANNING_STATE,
261//WLAN_SUSPEND_LINK Related
262 eLIM_HAL_SUSPEND_LINK_WAIT_STATE,
263 eLIM_HAL_SUSPEND_LINK_STATE,
264 eLIM_HAL_RESUME_LINK_WAIT_STATE,
265//end WLAN_SUSPEND_LINK Related
266} tLimLimHalScanState;
267#endif // GEN4_SCAN
268
269// LIM states related to A-MPDU/BA
270// This is used for maintaining the state between PE and HAL only.
271typedef enum eLimBAState
272{
273 eLIM_BA_STATE_IDLE, // we are not waiting for anything from HAL.
274 eLIM_BA_STATE_WT_ADD_RSP, //We are waiting for Add rsponse from HAL.
275 eLIM_BA_STATE_WT_DEL_RSP // We are waiting for Del response from HAL.
276} tLimBAState;
277
Jeff Johnson295189b2012-06-20 16:38:30 -0700278
279
Jeff Johnson62c27982013-02-27 17:53:55 -0800280
Jeff Johnson295189b2012-06-20 16:38:30 -0700281
282// MLM Req/Cnf structure definitions
283typedef struct sLimMlmAuthReq
284{
285 tSirMacAddr peerMacAddr;
286 tAniAuthType authType;
287 tANI_U32 authFailureTimeout;
288 tANI_U8 sessionId;
289} tLimMlmAuthReq, *tpLimMlmAuthReq;
290
291typedef struct sLimMlmJoinReq
292{
293 tANI_U32 joinFailureTimeout;
294 tSirMacRateSet operationalRateSet;
295 tANI_U8 sessionId;
296 tSirBssDescription bssDescription;
297} tLimMlmJoinReq, *tpLimMlmJoinReq;
298
299typedef struct sLimMlmScanReq
300{
301 tSirBssType bssType;
302 tSirMacAddr bssId;
303 tSirMacSSid ssId[SIR_SCAN_MAX_NUM_SSID];
304 tSirScanType scanType;
305 tANI_U32 minChannelTime;
306 tANI_U32 maxChannelTime;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800307 tANI_U32 minChannelTimeBtc;
308 tANI_U32 maxChannelTimeBtc;
Jeff Johnson295189b2012-06-20 16:38:30 -0700309 tSirBackgroundScanMode backgroundScanMode;
310 tANI_U32 dot11mode;
311 /* Number of SSIDs to scan(send Probe request) */
312 tANI_U8 numSsid;
313
314#ifdef WLAN_FEATURE_P2P
315 tANI_BOOLEAN p2pSearch;
316#endif
317 tANI_U16 uIEFieldLen;
318 tANI_U16 uIEFieldOffset;
319
320 //channelList MUST be the last field of this structure
321 tSirChannelList channelList;
322 /*-----------------------------
323 tLimMlmScanReq....
324 -----------------------------
325 uIEFiledLen
326 -----------------------------
327 uIEFiledOffset ----+
328 ----------------------------- |
329 channelList.numChannels |
330 ----------------------------- |
331 ... variable size up to |
332 channelNumber[numChannels-1] |
333 This can be zero, if |
334 numChannel is zero. |
335 ----------------------------- <--+
336 ... variable size uIEFiled
337 up to uIEFieldLen (can be 0)
338 -----------------------------*/
339} tLimMlmScanReq, *tpLimMlmScanReq;
340
341typedef struct tLimScanResultNode tLimScanResultNode;
342struct tLimScanResultNode
343{
344 tLimScanResultNode *next;
345 tSirBssDescription bssDescription;
346};
347
Jeff Johnsone7245742012-09-05 17:12:55 -0700348#ifdef FEATURE_OEM_DATA_SUPPORT
349
350#ifndef OEM_DATA_REQ_SIZE
Madan Mohan Koyyalamudi7a4d9312012-12-04 17:21:36 -0800351#define OEM_DATA_REQ_SIZE 134
Jeff Johnsone7245742012-09-05 17:12:55 -0700352#endif
353#ifndef OEM_DATA_RSP_SIZE
Madan Mohan Koyyalamudi7a4d9312012-12-04 17:21:36 -0800354#define OEM_DATA_RSP_SIZE 1968
Jeff Johnsone7245742012-09-05 17:12:55 -0700355#endif
356
357// OEM Data related structure definitions
358typedef struct sLimMlmOemDataReq
359{
360 tSirMacAddr selfMacAddr;
361 tANI_U8 oemDataReq[OEM_DATA_REQ_SIZE];
362} tLimMlmOemDataReq, *tpLimMlmOemDataReq;
363
364typedef struct sLimMlmOemDataRsp
365{
366 tANI_U8 oemDataRsp[OEM_DATA_RSP_SIZE];
367} tLimMlmOemDataRsp, *tpLimMlmOemDataRsp;
368#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700369
370// Pre-authentication structure definition
371typedef struct tLimPreAuthNode
372{
373 struct tLimPreAuthNode *next;
374 tSirMacAddr peerMacAddr;
375 tAniAuthType authType;
376 tLimMlmStates mlmState;
377 tANI_U8 authNodeIdx;
378 tANI_U8 challengeText[SIR_MAC_AUTH_CHALLENGE_LENGTH];
379 tANI_U8 fTimerStarted:1;
380 tANI_U8 fSeen:1;
381 tANI_U8 fFree:1;
382 tANI_U8 rsvd:5;
383 TX_TIMER timer;
384}tLimPreAuthNode, *tpLimPreAuthNode;
385
386// Pre-authentication table definition
387typedef struct tLimPreAuthTable
388{
389 tANI_U32 numEntry;
390 tpLimPreAuthNode pTable;
391}tLimPreAuthTable, *tpLimPreAuthTable;
392
393/// Per STA context structure definition
394typedef struct sLimMlmStaContext
395{
396 tLimMlmStates mlmState;
397 tAniAuthType authType;
398 tANI_U16 listenInterval;
399 tSirMacCapabilityInfo capabilityInfo;
400 tSirMacPropRateSet propRateSet;
401 tSirMacReasonCodes disassocReason;
402 tANI_U16 cleanupTrigger;
403
404 tSirResultCodes resultCode;
405 tANI_U16 protStatusCode;
406
407 tANI_U8 subType:1; // Indicates ASSOC (0) or REASSOC (1)
408 tANI_U8 updateContext:1;
409 tANI_U8 schClean:1;
410 // 802.11n HT Capability in Station: Enabled 1 or DIsabled 0
411 tANI_U8 htCapability:1;
Jeff Johnsone7245742012-09-05 17:12:55 -0700412#ifdef WLAN_FEATURE_11AC
413 tANI_U8 vhtCapability:1;
414#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700415} tLimMlmStaContext, *tpLimMlmStaContext;
416
417// Structure definition to hold deferred messages queue parameters
418typedef struct sLimDeferredMsgQParams
419{
420 tSirMsgQ deferredQueue[MAX_DEFERRED_QUEUE_LEN];
421 tANI_U16 size;
422 tANI_U16 read;
423 tANI_U16 write;
424} tLimDeferredMsgQParams, *tpLimDeferredMsgQParams;
425
426typedef struct sLimTraceQ
427{
428 tANI_U32 type;
429 tLimSmeStates smeState;
430 tLimMlmStates mlmState;
431 tANI_U32 value;
432 tANI_U32 value2;
433} tLimTraceQ;
434
435typedef struct sLimTraceParams
436{
437 tLimTraceQ traceQueue[1024];
438 tANI_U16 write;
439 tANI_U16 enabled;
440} tLimTraceParams;
441
442typedef struct sCfgProtection
443{
444 tANI_U32 overlapFromlla:1;
445 tANI_U32 overlapFromllb:1;
446 tANI_U32 overlapFromllg:1;
447 tANI_U32 overlapHt20:1;
448 tANI_U32 overlapNonGf:1;
449 tANI_U32 overlapLsigTxop:1;
450 tANI_U32 overlapRifs:1;
451 tANI_U32 overlapOBSS:1; /* added for obss */
452 tANI_U32 fromlla:1;
453 tANI_U32 fromllb:1;
454 tANI_U32 fromllg:1;
455 tANI_U32 ht20:1;
456 tANI_U32 nonGf:1;
457 tANI_U32 lsigTxop:1;
458 tANI_U32 rifs:1;
459 tANI_U32 obss:1; /* added for Obss */
460}tCfgProtection, *tpCfgProtection;
461
462typedef enum eLimProtStaCacheType
463{
464 eLIM_PROT_STA_CACHE_TYPE_INVALID,
465 eLIM_PROT_STA_CACHE_TYPE_llB,
466 eLIM_PROT_STA_CACHE_TYPE_llG,
467 eLIM_PROT_STA_CACHE_TYPE_HT20
468}tLimProtStaCacheType;
469
470typedef struct sCacheParams
471{
472 tANI_U8 active;
473 tSirMacAddr addr;
474 tLimProtStaCacheType protStaCacheType;
475
476} tCacheParams, *tpCacheParams;
477
Jeff Johnson295189b2012-06-20 16:38:30 -0700478#define LIM_PROT_STA_OVERLAP_CACHE_SIZE HAL_NUM_ASSOC_STA
479#define LIM_PROT_STA_CACHE_SIZE HAL_NUM_ASSOC_STA
Jeff Johnson295189b2012-06-20 16:38:30 -0700480
481typedef struct sLimProtStaParams
482{
483 tANI_U8 numSta;
484 tANI_U8 protectionEnabled;
485} tLimProtStaParams, *tpLimProtStaParams;
486
487
488typedef struct sLimNoShortParams
489{
490 tANI_U8 numNonShortPreambleSta;
491 tCacheParams staNoShortCache[LIM_PROT_STA_CACHE_SIZE];
492} tLimNoShortParams, *tpLimNoShortParams;
493
494typedef struct sLimNoShortSlotParams
495{
496 tANI_U8 numNonShortSlotSta;
497 tCacheParams staNoShortSlotCache[LIM_PROT_STA_CACHE_SIZE];
498} tLimNoShortSlotParams, *tpLimNoShortSlotParams;
499
500
501typedef struct tLimIbssPeerNode tLimIbssPeerNode;
502struct tLimIbssPeerNode
503{
504 tLimIbssPeerNode *next;
505 tSirMacAddr peerMacAddr;
506 tANI_U8 aniIndicator:1;
507 tANI_U8 extendedRatesPresent:1;
508 tANI_U8 edcaPresent:1;
509 tANI_U8 wmeEdcaPresent:1;
510 tANI_U8 wmeInfoPresent:1;
511 tANI_U8 htCapable:1;
512 tANI_U8 rsvd:2;
513 tSirMacCapabilityInfo capabilityInfo;
514 tSirMacRateSet supportedRates;
515 tSirMacRateSet extendedRates;
516 tANI_U8 supportedMCSSet[SIZE_OF_SUPPORTED_MCS_SET];
517 tSirMacEdcaParamSetIE edcaParams;
518 tANI_U16 propCapability;
519 tANI_U8 erpIePresent;
520
521 //HT Capabilities of IBSS Peer
522 tANI_U8 htGreenfield;
523 tANI_U8 htShortGI40Mhz;
524 tANI_U8 htShortGI20Mhz;
525
526 // DSSS/CCK at 40 MHz: Enabled 1 or Disabled
527 tANI_U8 htDsssCckRate40MHzSupport;
528
529 // MIMO Power Save
530 tSirMacHTMIMOPowerSaveState htMIMOPSState;
531
532 //
533 // A-MPDU Density
534 // 000 - No restriction
535 // 001 - 1/8 usec
536 // 010 - 1/4 usec
537 // 011 - 1/2 usec
538 // 100 - 1 usec
539 // 101 - 2 usec
540 // 110 - 4 usec
541 // 111 - 8 usec
542 //
543 tANI_U8 htAMpduDensity;
544
545 // Maximum Rx A-MPDU factor
546 tANI_U8 htMaxRxAMpduFactor;
547
548 //Set to 0 for 3839 octets
549 //Set to 1 for 7935 octets
550 tANI_U8 htMaxAmsduLength;
551
552 //
553 // Recommended Tx Width Set
554 // 0 - use 20 MHz channel (control channel)
555 // 1 - use 40 Mhz channel
556 //
557 tANI_U8 htSupportedChannelWidthSet;
558
559 tANI_U8 beaconHBCount;
560 tANI_U8 heartbeatFailure;
561
562 tANI_U8 *beacon; //Hold beacon to be sent to HDD/CSR
563 tANI_U16 beaconLen;
564
565};
566
567// Enums used for channel switching.
568typedef enum eLimChannelSwitchState
569{
570 eLIM_CHANNEL_SWITCH_IDLE,
571 eLIM_CHANNEL_SWITCH_PRIMARY_ONLY,
572 eLIM_CHANNEL_SWITCH_SECONDARY_ONLY,
573 eLIM_CHANNEL_SWITCH_PRIMARY_AND_SECONDARY
574} tLimChannelSwitchState;
575
576
577// Channel Switch Info
578typedef struct sLimChannelSwitchInfo
579{
580 tLimChannelSwitchState state;
581 tANI_U8 primaryChannel;
Jeff Johnsone7245742012-09-05 17:12:55 -0700582 ePhyChanBondState secondarySubBand;
Jeff Johnson295189b2012-06-20 16:38:30 -0700583 tANI_U32 switchCount;
584 tANI_U32 switchTimeoutValue;
585 tANI_U8 switchMode;
586} tLimChannelSwitchInfo, *tpLimChannelSwitchInfo;
587
Mohit Khanna4a70d262012-09-11 16:30:12 -0700588#ifdef WLAN_FEATURE_11AC
589typedef struct sLimOperatingModeInfo
590{
591 tANI_U8 present;
592 tANI_U8 chanWidth: 2;
593 tANI_U8 reserved: 2;
594 tANI_U8 rxNSS: 3;
595 tANI_U8 rxNSSType: 1;
596}tLimOperatingModeInfo, *tpLimOperatingModeInfo;
Madan Mohan Koyyalamudic6226de2012-09-18 16:33:31 -0700597
598typedef struct sLimWiderBWChannelSwitch
599{
600 tANI_U8 newChanWidth;
601 tANI_U8 newCenterChanFreq0;
602 tANI_U8 newCenterChanFreq1;
603}tLimWiderBWChannelSwitchInfo, *tpLimWiderBWChannelSwitchInfo;
Mohit Khanna4a70d262012-09-11 16:30:12 -0700604#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700605// Enums used when stopping the Tx.
606typedef enum eLimQuietTxMode
607{
608 eLIM_TX_ALL = 0, /* Stops/resumes the transmission of all stations, Uses the global flag. */
609 eLIM_TX_STA, /* Stops/resumes the transmission of specific stations identified by staId. */
610 eLIM_TX_BSS, /* Stops/resumes the transmission of all the packets in BSS */
611 eLIM_TX_BSS_BUT_BEACON /* Stops/resumes the transmission of all packets except beacons in BSS
612 * This is used when radar is detected in the current operating channel.
613 * Beacon has to be sent to notify the stations associated about the
614 * scheduled channel switch */
615} tLimQuietTxMode;
616
617typedef enum eLimControlTx
618{
619 eLIM_RESUME_TX = 0,
620 eLIM_STOP_TX
621} tLimControlTx;
622
Jeff Johnson295189b2012-06-20 16:38:30 -0700623
624// --------------------------------------------------------------------
625
626typedef __ani_attr_pre_packed struct sLimTspecInfo
627{
628 tANI_U8 inuse; // 0==free, else used
629 tANI_U8 idx; // index in list
630 tANI_U8 staAddr[6];
631 tANI_U16 assocId;
632 tSirMacTspecIE tspec;
633 tANI_U8 numTclas; // number of Tclas elements
634 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
635 tANI_U8 tclasProc;
636 tANI_U8 tclasProcPresent:1; //tclassProc is valid only if this is set to 1.
637} __ani_attr_packed tLimTspecInfo, *tpLimTspecInfo;
638
639typedef struct sLimAdmitPolicyInfo
640{
641 tANI_U8 type; // admit control policy type
642 tANI_U8 bw_factor; // oversubscription factor : 0 means nothing is allowed
643 // valid only when 'type' is set BW_FACTOR
644} tLimAdmitPolicyInfo, *tpLimAdmitPolicyInfo;
645
646
647typedef enum eLimWscEnrollState
648{
649 eLIM_WSC_ENROLL_NOOP,
650 eLIM_WSC_ENROLL_BEGIN,
651 eLIM_WSC_ENROLL_IN_PROGRESS,
652 eLIM_WSC_ENROLL_END
653
654} tLimWscEnrollState;
655
656#define WSC_PASSWD_ID_PUSH_BUTTON (0x0004)
657
658typedef struct sLimWscIeInfo
659{
660 tANI_BOOLEAN apSetupLocked;
661 tANI_BOOLEAN selectedRegistrar;
662 tANI_U16 selectedRegistrarConfigMethods;
663 tLimWscEnrollState wscEnrollmentState;
664 tLimWscEnrollState probeRespWscEnrollmentState;
665 tANI_U8 reqType;
666 tANI_U8 respType;
667} tLimWscIeInfo, *tpLimWscIeInfo;
668
669// maximum number of tspec's supported
670#define LIM_NUM_TSPEC_MAX 4
671
672
673//structure to hold all 11h specific data
674typedef struct sLimSpecMgmtInfo
675{
676 tLimQuietStates quietState;
677 tANI_U32 quietCount;
678 tANI_U32 quietDuration; /* This is in units of system TICKS */
679 tANI_U32 quietDuration_TU; /* This is in units of TU, for over the air transmission */
680 tANI_U32 quietTimeoutValue; /* After this timeout, actual quiet starts */
681 tANI_BOOLEAN fQuietEnabled; /* Used on AP, if quiet is enabled during learning */
682
683 tLimDot11hChanSwStates dot11hChanSwState;
684
685 tANI_BOOLEAN fRadarDetCurOperChan; /* Radar detected in cur oper chan on AP */
686 tANI_BOOLEAN fRadarIntrConfigured; /* Whether radar interrupt has been configured */
687}tLimSpecMgmtInfo, *tpLimSpecMgmtInfo;
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800688
689#ifdef FEATURE_WLAN_TDLS_INTERNAL
690typedef struct sLimDisResultList
691{
692 struct sLimDisResultList *next ;
693 tSirTdlsPeerInfo tdlsDisPeerInfo ;
694}tLimDisResultList ;
695#endif
696
697#ifdef FEATURE_WLAN_TDLS
698/*
699 * Peer info needed for TDLS setup..
700 */
701typedef struct tLimTDLSPeerSta
702{
703 struct tLimTDLSPeerSta *next;
704 tANI_U8 dialog ;
705 tSirMacAddr peerMac;
706 tSirMacCapabilityInfo capabilityInfo;
707 tSirMacRateSet supportedRates;
708 tSirMacRateSet extendedRates;
709 tSirMacQosCapabilityStaIE qosCaps;
710 tSirMacEdcaParamSetIE edcaParams;
711 tANI_U8 mcsSet[SIZE_OF_SUPPORTED_MCS_SET];
712 tANI_U8 tdls_bIsResponder ;
713 /* HT Capabilties */
714 tDot11fIEHTCaps tdlsPeerHTCaps ;
715 tDot11fIEExtCap tdlsPeerExtCaps;
716 tANI_U8 tdls_flags ;
717 tANI_U8 tdls_link_state ;
718 tANI_U8 tdls_prev_link_state ;
719 tANI_U8 tdls_sessionId;
720 tANI_U8 ExtRatesPresent ;
721 TX_TIMER gLimTdlsLinkSetupRspTimeoutTimer ;
722 TX_TIMER gLimTdlsLinkSetupCnfTimeoutTimer ;
723}tLimTdlsLinkSetupPeer, *tpLimTdlsLinkSetupPeer ;
724
725typedef struct tLimTdlsLinkSetupInfo
726{
727 tLimTdlsLinkSetupPeer *tdlsLinkSetupList ;
728 tANI_U8 num_tdls_peers ;
729 tANI_U8 tdls_flags ;
730 tANI_U8 tdls_state ;
731 tANI_U8 tdls_prev_state ;
732}tLimTdlsLinkSetupInfo, *tpLimTdlsLinkSetupInfo ;
733
734typedef enum tdlsLinkMode
735{
736 TDLS_LINK_MODE_BG,
737 TDLS_LINK_MODE_N,
Hoonki Lee99e53782013-02-12 18:07:03 -0800738 TDLS_LINK_MODE_AC,
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800739 TDLS_LINK_MODE_NONE
740} eLimTdlsLinkMode ;
741#endif /* FEATURE_WLAN_TDLS */
742
Jeff Johnson295189b2012-06-20 16:38:30 -0700743#endif