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