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