blob: 880a6bf0889e2118cf1def7ce798a750925de24f [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
2 * Copyright (c) 2012, Code Aurora Forum. 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
22/*
23 * Airgo Networks, Inc proprietary. All rights reserved
24 * aniGlobal.h: MAC Modules Adapter Definitions.
25 * Author: V. K. Kandarpa
26 * Date: 10/25/2002
27 *
28 * History:-
29 * Date: 04/08/2008 Modified by: Santosh Mandiganal
30 * Modification Information: Added the logDump.h header file and defined the
31 * dumpTablecurrentId, dumpTableEntry.
32 * --------------------------------------------------------------------------
33 *
34 */
35
36#ifndef _ANIGLOBAL_H
37#define _ANIGLOBAL_H
38
39// Take care to avoid redefinition of this type, if it is
40// already defined in "halWmmApi.h"
41#if !defined(_HALMAC_WMM_API_H)
42typedef struct sAniSirGlobal *tpAniSirGlobal;
43#endif
44
45#include "halTypes.h"
46#include "sirCommon.h"
47#include "aniSystemDefs.h"
48#ifndef ANI_OS_TYPE_OSX
49#include "sysDef.h"
50#endif
51#include "dphGlobal.h"
52#include "limGlobal.h"
53#include "pmmGlobal.h"
54#include "schGlobal.h"
55#include "sysGlobal.h"
56#include "cfgGlobal.h"
57#include "utilsGlobal.h"
58#include "sirApi.h"
59
60#ifdef FEATURE_WLAN_NON_INTEGRATED_SOC
61#include "halGlobal.h"
62#include "halDataStruct.h"
63#include "phyGlobal.h"
64#include "pttModule.h"
65#endif
66
67#ifdef FEATURE_WLAN_INTEGRATED_SOC
68#include "wlan_qct_hal.h"
69#endif
70
71#ifdef ANI_PRODUCT_TYPE_CLIENT
72#include "pmc.h"
73#endif
74
75#include "csrApi.h"
76#ifdef WLAN_FEATURE_VOWIFI_11R
77#include "sme_FTApi.h"
78#endif
79#include "csrSupport.h"
80#include "smeInternal.h"
81#include "ccmApi.h"
82#include "btcApi.h"
83#include "csrInternal.h"
84
85
86#if defined WLAN_FEATURE_VOWIFI
87#include "smeRrmInternal.h"
88#include "rrmGlobal.h"
89#endif
90#if defined FEATURE_WLAN_CCX
91#include "ccxApi.h"
92#include "ccxGlobal.h"
93#endif
94#ifdef WLAN_FEATURE_P2P
95#include "p2p_Api.h"
96#endif
97
98#if defined WLAN_FEATURE_VOWIFI_11R
99#include <limFTDefs.h>
100#endif
101
102
103#ifdef ANI_DVT_DEBUG
104#include "dvtModule.h"
105#endif
106
107// New HAL API interface defs.
108#include "logDump.h"
109
110#ifdef FEATURE_WLAN_INTEGRATED_SOC
111//Check if this definition can actually move here from halInternal.h even for Volans. In that case
112//this featurization can be removed.
113#define PMAC_STRUCT( _hHal ) ( (tpAniSirGlobal)_hHal )
114#endif
115
116#define ANI_DRIVER_TYPE(pMac) (((tpAniSirGlobal)(pMac))->gDriverType)
117// -------------------------------------------------------------------
118// Bss Qos Caps bit map definition
119#define LIM_BSS_CAPS_OFFSET_HCF 0
120#define LIM_BSS_CAPS_OFFSET_WME 1
121#define LIM_BSS_CAPS_OFFSET_WSM 2
122
123#define LIM_BSS_CAPS_HCF (1 << LIM_BSS_CAPS_OFFSET_HCF)
124#define LIM_BSS_CAPS_WME (1 << LIM_BSS_CAPS_OFFSET_WME)
125#define LIM_BSS_CAPS_WSM (1 << LIM_BSS_CAPS_OFFSET_WSM)
126
127// cap should be one of HCF/WME/WSM
128#define LIM_BSS_CAPS_GET(cap, val) (((val) & (LIM_BSS_CAPS_ ## cap)) >> LIM_BSS_CAPS_OFFSET_ ## cap)
129#define LIM_BSS_CAPS_SET(cap, val) (val) |= (LIM_BSS_CAPS_ ## cap )
130#define LIM_BSS_CAPS_CLR(cap, val) (val) &= (~ (LIM_BSS_CAPS_ ## cap))
131
132// 40 beacons per heart beat interval is the default + 1 to count the rest
133#define MAX_NO_BEACONS_PER_HEART_BEAT_INTERVAL 41
134
135/* max number of legacy bssid we can store during scan on one channel */
136#define MAX_NUM_LEGACY_BSSID_PER_CHANNEL 10
137
138#if defined WLAN_FEATURE_P2P
139#define P2P_WILDCARD_SSID "DIRECT-" //TODO Put it in proper place;
140#define P2P_WILDCARD_SSID_LEN 7
141
142#ifdef WLAN_FEATURE_CONCURRENT_P2P
143#define MAX_NO_OF_P2P_SESSIONS 5
144#endif //WLAN_FEATURE_CONCURRENT_P2P
145#endif //WLAN_FEATURE_P2P
146
147// -------------------------------------------------------------------
148// Change channel generic scheme
149typedef void (*CHANGE_CHANNEL_CALLBACK)(tpAniSirGlobal pMac, eHalStatus status, tANI_U32 *data,
150 tpPESession psessionEntry);
151
152/// LIM global definitions
153typedef struct sAniSirLimIbss
154{
155 void *pHdr;
156 void *pBeacon;
157} tAniSirLimIbss;
158
159typedef struct sDialogueToken
160{
161 //bytes 0-3
162 tANI_U16 assocId;
163 tANI_U8 token;
164 tANI_U8 rsvd1;
165 //Bytes 4-7
166 tANI_U16 tid;
167 tANI_U8 rsvd2[2];
168
169 struct sDialogueToken* next;
170}tDialogueToken, *tpDialogueToken;
171
172typedef struct sLimTimers
173{
174 //TIMERS IN LIM ARE NOT SUPPOSED TO BE ZEROED OUT DURING RESET.
175 //DURING limInitialize DONOT ZERO THEM OUT.
176
177//STA SPECIFIC TIMERS
178#if defined(ANI_PRODUCT_TYPE_CLIENT) || defined(ANI_AP_CLIENT_SDK)
179 // Periodic background scan timer
180 TX_TIMER gLimBackgroundScanTimer;
181#endif
182
183 TX_TIMER gLimPreAuthClnupTimer;
184 //TX_TIMER gLimAuthResponseTimer[HAL_NUM_STA];
185
186 // Association related timers
187 TX_TIMER gLimAssocFailureTimer;
188 TX_TIMER gLimReassocFailureTimer;
189
190
191 /// Heartbeat timer on STA
192 TX_TIMER gLimHeartBeatTimer;
193
194 /// Wait for Probe after Heartbeat failure timer on STA
195 TX_TIMER gLimProbeAfterHBTimer;
196
197
198 // Authentication related timers
199 TX_TIMER gLimAuthFailureTimer;
200
201 // Join Failure timeout on STA
202 TX_TIMER gLimJoinFailureTimer;
203
204 // Keepalive timer
205 TX_TIMER gLimKeepaliveTimer;
206
207 // Scan related timers
208 TX_TIMER gLimMinChannelTimer;
209 TX_TIMER gLimMaxChannelTimer;
210 TX_TIMER gLimPeriodicProbeReqTimer;
211
212 // CNF_WAIT timer
213 TX_TIMER *gpLimCnfWaitTimer;
214
215 // Send Disassociate frame threshold parameters
216 TX_TIMER gLimSendDisassocFrameThresholdTimer;
217
218 TX_TIMER gLimAddtsRspTimer; // max wait for a response
219
220 // Update OLBC Cache Timer
221 TX_TIMER gLimUpdateOlbcCacheTimer;
222
223 TX_TIMER gLimChannelSwitchTimer;
224 // This TIMER is started on the STA, as indicated by the
225 // AP in its Quiet BSS IE, for the specified interval
226 TX_TIMER gLimQuietTimer;
227 // This TIMER is started on the AP, prior to the AP going
228 // into LEARN mode
229 // This TIMER is started on the STA, for the specified
230 // quiet duration
231 TX_TIMER gLimQuietBssTimer;
232
233#ifdef WLAN_FEATURE_VOWIFI_11R
234 TX_TIMER gLimFTPreAuthRspTimer;
235#endif
236
237#ifdef FEATURE_WLAN_CCX
238 TX_TIMER gLimCcxTsmTimer;
239#endif
240#ifdef WLAN_FEATURE_P2P
241 TX_TIMER gLimRemainOnChannelTimer;
242#endif
243
244//********************TIMER SECTION ENDS**************************************************
245// ALL THE FIELDS BELOW THIS CAN BE ZEROED OUT in limInitialize
246//****************************************************************************************
247
248}tLimTimers;
249
250
251typedef struct sAniSirLim
252{
253 ////////////////////////////////////// TIMER RELATED START ///////////////////////////////////////////
254
255 tLimTimers limTimers;
256 /// Flag to track if LIM timers are created or not
257 tANI_U32 gLimTimersCreated;
258
259
260 ////////////////////////////////////// TIMER RELATED END ///////////////////////////////////////////
261
262 ////////////////////////////////////// SCAN/LEARN RELATED START ///////////////////////////////////////////
263 /**
264 * This flag when set, will use scan mode instead of
265 * Learn mode on BP/AP. By default this flag is set
266 * to true until HIF getting stuck in 0x800 state is
267 * debugged.
268 */
269 tANI_U32 gLimUseScanModeForLearnMode;
270
271 /**
272 * This is useful for modules other than LIM
273 * to see if system is in scan/learn mode or not
274 */
275 tANI_U32 gLimSystemInScanLearnMode;
276
277 // Scan related globals on STA
278 tANI_U8 gLimReturnAfterFirstMatch;
279 tANI_U8 gLim24Band11dScanDone;
280 tANI_U8 gLim50Band11dScanDone;
281 tANI_U8 gLimReturnUniqueResults;
282
283 // Background Scan related globals on STA
284 tANI_U32 gLimNumOfBackgroundScanSuccess;
285 tANI_U32 gLimNumOfConsecutiveBkgndScanFailure;
286 tANI_U32 gLimNumOfForcedBkgndScan;
287 tANI_U8 gLimBackgroundScanDisable; //based on BG timer
288 tANI_U8 gLimForceBackgroundScanDisable; //debug control flag
289 tANI_U8 gLimBackgroundScanTerminate; //controlled by SME
290 tANI_U8 gLimReportBackgroundScanResults;//controlled by SME
291
292 /// Place holder for current channel ID
293 /// being scanned
294 tANI_U32 gLimCurrentScanChannelId;
295
296 // Hold onto SCAN criteria
297 tLimMlmScanReq *gpLimMlmScanReq;
298
299 /// This indicates total length of 'matched' scan results
300 tANI_U16 gLimMlmScanResultLength;
301
302 /// This indicates total length of 'cached' scan results
303 tANI_U16 gLimSmeScanResultLength;
304
305 /**
306 * Hash table definition for storing SCAN results
307 * This is the placed holder for 'cached' scan results
308 */
309 tLimScanResultNode
310 *gLimCachedScanHashTable[LIM_MAX_NUM_OF_SCAN_RESULTS];
311
312#if defined(ANI_PRODUCT_TYPE_CLIENT) || defined(ANI_AP_CLIENT_SDK)
313 /// Place holder for current channel ID
314 /// being scanned during background scanning
315 tANI_U32 gLimBackgroundScanChannelId;
316 /// flag to indicate that bacground scan timer has been started
317 tANI_U8 gLimBackgroundScanStarted;
318
319 /* Used to store the list of legacy bss sta detected during scan on one channel */
320 tANI_U16 gLimRestoreCBNumScanInterval;
321 tANI_U16 gLimRestoreCBCount;
322 tSirMacAddr gLimLegacyBssidList[MAX_NUM_LEGACY_BSSID_PER_CHANNEL];
323#endif
324
325 //
326 // If this flag is 1,
327 // then, LIM will "try and trigger" a background
328 // scan whenever it receives a Quiet BSS IE
329 //
330 // If this flag is 0,
331 // then, LIM will simply shut-off Tx/Rx whenever it
332 // receives a Quiet BSS IE.
333 // This is the default behavior when a Quiet BSS IE
334 // is received and 11H is enabled
335 //
336 tANI_U32 gLimTriggerBackgroundScanDuringQuietBss;
337
338#ifdef ANI_AP_SDK
339 tLimScanDurationConvert gLimScanDurationConvert; /* Used to store converted scan duration values in TU and TICKS */
340#endif /* ANI_AP_SDK */
341
342#ifdef WLAN_FEATURE_P2P
343 // This variable store the total duration to do scan
344 tANI_U32 gTotalScanDuration;
345#endif
346
347 // abort scan is used to abort an on-going scan
348 tANI_U8 abortScan;
349 tLimScanChnInfo scanChnInfo;
350
351 ////////////////////////////////////// SCAN/LEARN RELATED START ///////////////////////////////////////////
352 tSirMacAddr gSelfMacAddr; //added for BT-AMP Support
353
354 ////////////////////////////////////////// BSS RELATED END ///////////////////////////////////////////
355 // Place holder for StartBssReq message
356 // received by SME state machine
357
358#if defined(ANI_PRODUCT_TYPE_AP)
359 // Place holder for Neighbor BSS list received in
360 // SME_JOIN/REASSOC_REQ messages
361 tSirMultipleNeighborBssInfo gLimNeighborBssList;
362#endif
363 tANI_U8 gLimCurrentBssUapsd;
364
365
366/* These global varibales are now moved to session Table in order to support BT-AMP oct 9th review */
367#if 0
368 // Place holder for BSS description that we're
369 // currently joined with
370 tSirMacAddr gLimCurrentBssId;
371 tSirMacChanNum gLimCurrentChannelId;
372 tSirMacSSid gLimCurrentSSID;
373 tANI_U16 gLimCurrentBssCaps;
374
375 // QosCaps is a bit map of various qos capabilities - see defn above
376 tANI_U8 gLimCurrentBssQosCaps;
377 tANI_U16 gLimCurrentBssPropCap;
378 tANI_U8 gLimSentCapsChangeNtf;
379 tANI_U32 gLimCurrentTitanHtCaps;
380
381 // Place holder for BSS description that
382 // we're currently Reassociating
383 tSirMacAddr gLimReassocBssId;
384 tSirMacChanNum gLimReassocChannelId;
385 tSirMacSSid gLimReassocSSID;
386 tANI_U16 gLimReassocBssCaps;
387 tANI_U8 gLimReassocBssQosCaps;
388 tANI_U16 gLimReassocBssPropCap;
389 tANI_U32 gLimReassocTitanHtCaps;
390
391 tANI_U8 gLimBssIdx; // BSSIdx is made session speicific
392#endif
393
394 tANI_U8 gLimForceNoPropIE; /* This is used for testing sta legacy bss detect feature */
395
396 //
397 // Store the BSS Index returned by HAL during
398 // WDA_ADD_BSS_RSP here.
399 //
400 // For now:
401 // This will be used during WDA_SET_BSSKEY_REQ in
402 // order to set the GTK
403 // Later:
404 // There could be other interfaces needing this info
405 //
406
407 //
408 // Due to the asynchronous nature of the interface
409 // between PE <-> HAL, some transient information
410 // like this needs to be cached.
411 // This is cached upon receipt of eWNI_SME_SETCONTEXT_REQ.
412 // This is released while posting LIM_MLM_SETKEYS_CNF
413 //
414 void* gpLimMlmSetKeysReq;
415 void* gpLimMlmRemoveKeyReq;
416
417 //On STA: staid for self generated by HAL and sent as response to 'ADD STA' msg.
418 //On AP: staid corresponding to BSS generated by HAL and sent as response to 'ADD BSS' msg.
419 // tANI_U16 gLimStaid; // TO SUPPORT BT-AMP
420
421 ////////////////////////////////////////// BSS RELATED END ///////////////////////////////////////////
422
423 ////////////////////////////////////////// IBSS RELATED START ///////////////////////////////////////////
424 // This indicates whether we've a partner
425 // that is also transmitting Beacon frame
426 // in IBSS
427 //tANI_U8 gLimIbssActive; oct1 review
428
429 //This indicates whether this STA coalesced and adapter to peer's capabilities or not.
430 tANI_U8 gLimIbssCoalescingHappened;
431
432 /// Definition for storing IBSS peers BSS description
433 tLimIbssPeerNode *gLimIbssPeerList;
434 tANI_U32 gLimNumIbssPeers;
435
436 // ibss info - params for which ibss to join while coalescing
437 tAniSirLimIbss ibssInfo;
438
439 ////////////////////////////////////////// IBSS RELATED END ///////////////////////////////////////////
440
441 ////////////////////////////////////////// STATS/COUNTER RELATED START ///////////////////////////////////////////
442
443 tANI_U16 maxStation;
444 tANI_U16 maxBssId;
445
446 tANI_U32 gLimNumBeaconsRcvd;
447 tANI_U32 gLimNumBeaconsIgnored;
448
449 tANI_U32 gLimNumDeferredMsgs;
450
451 /// Variable to keep track of number of currently associated STAs
452 tANI_U16 gLimNumOfCurrentSTAs;
453 tANI_U16 gLimNumOfAniSTAs; // count of ANI peers
454 tANI_U16 gLimAssocStaLimit;
455
456 /// This indicates number of RXed Beacons during HB period
457 // tANI_U8 gLimRxedBeaconCntDuringHB;
458
459 // Heart-Beat interval value
460 tANI_U32 gLimHeartBeatCount;
461
462 // Statistics to keep track of no. beacons rcvd in heart beat interval
463 tANI_U16 gLimHeartBeatBeaconStats[MAX_NO_BEACONS_PER_HEART_BEAT_INTERVAL];
464
465#ifdef WLAN_DEBUG
466 // Debug counters
467 tANI_U32 numTot, numBbt, numProtErr, numLearn, numLearnIgnore;
468 tANI_U32 numSme, numMAC[4][16];
469
470 // Debug counter to track number of Assoc Req frame drops
471 // when received in pStaDs->mlmState other than LINK_ESTABLISED
472 tANI_U32 gLimNumAssocReqDropInvldState;
473 // counters to track rejection of Assoc Req due to Admission Control
474 tANI_U32 gLimNumAssocReqDropACRejectTS;
475 tANI_U32 gLimNumAssocReqDropACRejectSta;
476 // Debug counter to track number of Reassoc Req frame drops
477 // when received in pStaDs->mlmState other than LINK_ESTABLISED
478 tANI_U32 gLimNumReassocReqDropInvldState;
479 // Debug counter to track number of Hash Miss event that
480 // will not cause a sending of de-auth/de-associate frame
481 tANI_U32 gLimNumHashMissIgnored;
482
483 // Debug counter to track number of Beacon frames
484 // received in unexpected state
485 tANI_U32 gLimUnexpBcnCnt;
486
487 // Debug counter to track number of Beacon frames
488 // received in wt-join-state that do have SSID mismatch
489 tANI_U32 gLimBcnSSIDMismatchCnt;
490
491 // Debug counter to track number of Link establishments on STA/BP
492 tANI_U32 gLimNumLinkEsts;
493
494 // Debug counter to track number of Rx cleanup
495 tANI_U32 gLimNumRxCleanup;
496
497 // Debug counter to track different parse problem
498 tANI_U32 gLim11bStaAssocRejectCount;
499
500#endif
501
502 //Time stamp of the last beacon received from the BSS to which STA is connected.
503 tANI_U64 gLastBeaconTimeStamp;
504 //RX Beacon count for the current BSS to which STA is connected.
505 tANI_U32 gCurrentBssBeaconCnt;
506 tANI_U8 gLastBeaconDtimCount;
507 tANI_U8 gLastBeaconDtimPeriod;
508
509
510 ////////////////////////////////////////// STATS/COUNTER RELATED END ///////////////////////////////////////////
511
512
513 ////////////////////////////////////////// STATES RELATED START ///////////////////////////////////////////
514 // Counts Heartbeat failures
515 tANI_U8 gLimHBfailureCntInLinkEstState;
516 tANI_U8 gLimProbeFailureAfterHBfailedCnt;
517 tANI_U8 gLimHBfailureCntInOtherStates;
518
519 /**
520 * This variable indicates whether LIM module need to
521 * send response to host. Used to identify whether a request
522 * is generated internally within LIM module or by host
523 */
524 tANI_U8 gLimRspReqd;
525
526 /// Previous SME State
527 tLimSmeStates gLimPrevSmeState;
528
529 /// MLM State visible across all Sirius modules
530 tLimMlmStates gLimMlmState;
531
532 /// Previous MLM State
533 tLimMlmStates gLimPrevMlmState;
534
535#ifdef GEN4_SCAN
536 // LIM to HAL SCAN Management Message Interface states
537 tLimLimHalScanState gLimHalScanState;
538//WLAN_SUSPEND_LINK Related
539 SUSPEND_RESUME_LINK_CALLBACK gpLimSuspendCallback;
540 tANI_U32 *gpLimSuspendData;
541 SUSPEND_RESUME_LINK_CALLBACK gpLimResumeCallback;
542 tANI_U32 *gpLimResumeData;
543//end WLAN_SUSPEND_LINK Related
544 tANI_U8 fScanDisabled;
545 //Can be set to invalid channel. If it is invalid, HAL
546 //should move to previous valid channel or stay in the
547 //current channel.
548 tANI_U16 gResumeChannel;
549 //TODO - Add CB state here.
550#endif // GEN4_SCAN
551
552 // Change channel generic scheme
553 CHANGE_CHANNEL_CALLBACK gpchangeChannelCallback;
554 tANI_U32 *gpchangeChannelData;
555
556 /// SME State visible across all Sirius modules
557 tLimSmeStates gLimSmeState;
558 /// This indicates whether we're an AP, STA in BSS/IBSS
559 tLimSystemRole gLimSystemRole;
560
561 // Number of STAs that do not support short preamble
562 tLimNoShortParams gLimNoShortParams;
563
564 // Number of STAs that do not support short slot time
565 tLimNoShortSlotParams gLimNoShortSlotParams;
566
567
568 // OLBC parameters
569 tLimProtStaParams gLimOverlap11gParams;
570
571 tLimProtStaParams gLimOverlap11aParams;
572 tLimProtStaParams gLimOverlapHt20Params;
573 tLimProtStaParams gLimOverlapNonGfParams;
574
575 //
576 // ---------------- DPH -----------------------
577 // these used to live in DPH but are now moved here (where they belong)
578 tANI_U32 gLimPhyMode;
579 tANI_U32 propRateAdjustPeriod;
580 tANI_U32 scanStartTime; // used to measure scan time
581
582 tANI_U8 gLimBssid[6];
583 tANI_U8 gLimMyMacAddr[6];
584 tANI_U8 ackPolicy;
585
586 tANI_U8 gLimQosEnabled:1; //11E
587 tANI_U8 gLimWmeEnabled:1; //WME
588 tANI_U8 gLimWsmEnabled:1; //WSM
589 tANI_U8 gLimHcfEnabled:1;
590 tANI_U8 gLim11dEnabled:1;
591 tANI_U8 gLimProbeRespDisableFlag:1; // control over probe response
592 // ---------------- DPH -----------------------
593
594 ////////////////////////////////////////// STATES RELATED END ///////////////////////////////////////////
595
596 ////////////////////////////////////////// MISC RELATED START ///////////////////////////////////////////
597#if (WNI_POLARIS_FW_PACKAGE == ADVANCED)
598 // Place holder for alternate radio list
599 tSirMultipleAlternateRadioInfo gLimAlternateRadioList;
600#endif
601
602 // Place holder for Measurement Req/Rsp/Ind related info
603#if (WNI_POLARIS_FW_PACKAGE == ADVANCED) && defined(ANI_PRODUCT_TYPE_AP)
604 tpSirSmeMeasurementReq gpLimMeasReq;
605 tLimMeasParams gLimMeasParams;
606 tpLimMeasData gpLimMeasData;
607#endif
608
609 // WDS info
610 tANI_U32 gLimNumWdsInfoInd;
611 tANI_U32 gLimNumWdsInfoSet;
612 tSirWdsInfo gLimWdsInfo;
613
614 // Deferred Queue Paramters
615 tLimDeferredMsgQParams gLimDeferredMsgQ;
616
617 // addts request if any - only one can be outstanding at any time
618 tSirAddtsReq gLimAddtsReq;
619 tANI_U8 gLimAddtsSent;
620 tANI_U8 gLimAddtsRspTimerCount;
621
622 //protection related config cache
623 tCfgProtection cfgProtection;
624
625 tANI_U8 gLimProtectionControl;
626 //RF band to determibe 2.4/5 GHZ
627
628 // alternate radio info used by STA
629 tSirAlternateRadioInfo gLimAlternateRadio;
630
631 //This flag will remain to be set except while LIM is waiting for specific response messages
632 //from HAL. e.g when LIM issues ADD_STA req it will clear this flag and when it will receive
633 //the response the flag will be set.
634 tANI_U8 gLimProcessDefdMsgs;
635
636 // UAPSD flag used on AP
637 tANI_U8 gUapsdEnable;
638
639 /* Used on STA, this is a static UAPSD mask setting
640 * derived from SME_JOIN_REQ and SME_REASSOC_REQ. If a
641 * particular AC bit is set, it means the AC is both
642 * trigger enabled and delivery enabled.
643 */
644 tANI_U8 gUapsdPerAcBitmask;
645
646 /* Used on STA, this is a dynamic UPASD mask setting
647 * derived from AddTS Rsp and DelTS frame. If a
648 * particular AC bit is set, it means AC is trigger
649 * enabled.
650 */
651 tANI_U8 gUapsdPerAcTriggerEnableMask;
652
653 /* Used on STA, dynamic UPASD mask setting
654 * derived from AddTS Rsp and DelTs frame. If
655 * a particular AC bit is set, it means AC is
656 * delivery enabled.
657 */
658 tANI_U8 gUapsdPerAcDeliveryEnableMask;
659
660 /* Used on STA for AC downgrade. This is a dynamic mask
661 * setting which keep tracks of ACs being admitted.
662 * If bit is set to 0: That partiular AC is not admitted
663 * If bit is set to 1: That particular AC is admitted
664 */
665 tANI_U8 gAcAdmitMask[SIR_MAC_DIRECTION_DIRECT];
666
667 //dialogue token List head/tail for Action frames request sent.
668 tpDialogueToken pDialogueTokenHead;
669 tpDialogueToken pDialogueTokenTail;
670
671 tLimTspecInfo tspecInfo[LIM_NUM_TSPEC_MAX];
672
673 // admission control policy information
674 tLimAdmitPolicyInfo admitPolicyInfo;
675
676
677
678 ////////////////////////////////////////// MISC RELATED END ///////////////////////////////////////////
679
680 ////////////////////////////////////////// ASSOC RELATED START ///////////////////////////////////////////
681 // Place holder for JoinReq message
682 // received by SME state machine
683 // tpSirSmeJoinReq gpLimJoinReq;
684
685 // Place holder for ReassocReq message
686 // received by SME state machine
687 //tpSirSmeReassocReq gpLimReassocReq; sep23 review
688
689 /**
690 * Following is the place holder for free AID pool.
691 * A non-zero value indicates that AID is available
692 * for assignment.
693 */
694 tANI_U8 *gpLimAIDpool;
695 tANI_U8 freeAidHead;
696 tANI_U8 freeAidTail;
697
698 // Current Authentication type used at STA
699 //tAniAuthType gLimCurrentAuthType;
700
701 // Place holder for current authentication request
702 // being handled
703 tLimMlmAuthReq *gpLimMlmAuthReq;
704
705 // Place holder for Join request that we're
706 // currently attempting
707 tLimMlmJoinReq *gpLimMlmJoinReq;
708
709 // Reason code to determine the channel change context while sending
710 // WDA_CHNL_SWITCH_REQ message to HAL
711 tANI_U32 channelChangeReasonCode;
712
713 /// MAC level Pre-authentication related globals
714 tSirMacChanNum gLimPreAuthChannelNumber;
715 tAniAuthType gLimPreAuthType;
716 tSirMacAddr gLimPreAuthPeerAddr;
717 tANI_U32 gLimNumPreAuthContexts;
718 tLimPreAuthTable gLimPreAuthTimerTable;
719
720 // Placed holder to deauth reason
721 tANI_U16 gLimDeauthReasonCode;
722
723 // Place holder for Pre-authentication node list
724 struct tLimPreAuthNode * pLimPreAuthList;
725
726 // Send Disassociate frame threshold parameters
727 tANI_U16 gLimDisassocFrameThreshold;
728 tANI_U16 gLimDisassocFrameCredit;
729
730 // Assoc or ReAssoc Response Data/Frame
731 void *gLimAssocResponseData;
732
733 //One cache for each overlap and associated case.
734 tCacheParams protStaOverlapCache[LIM_PROT_STA_OVERLAP_CACHE_SIZE];
735 tCacheParams protStaCache[LIM_PROT_STA_CACHE_SIZE];
736
737 ////////////////////////////////////////// ASSOC RELATED END ///////////////////////////////////////////
738
739
740 // 11h Spectrum Management Related Flag
741 tANI_U32 gLim11hEnable;
742 tLimSpecMgmtInfo gLimSpecMgmt;
743 // CB Primary/Secondary Channel Switch Info
744 tLimChannelSwitchInfo gLimChannelSwitch;
745
746
747 // Channel Bonding mode, as configured by SME
748 tANI_U8 gCbMode;
749
750 //
751 // Identifies the runtime OPERATIONAL state of Channel
752 // Bonding. This info is encoded as a bitmap, as
753 // configured via gCbMode.
754 //
755 // b7 b6 b5 b4 b3 b2 b1 b0
756 // --------------------------------
757 // | X | X | X | AU|CS|U/D| O | A |
758 // --------------------------------
759 //
760 tANI_U8 gCbState;
761
762 //
763 // For DEBUG purposes
764 // Primarily for - TITAN BEACON workaround
765 // Symptom - TFP/PHY gets stuck
766 //
767 tANI_U32 gLimScanOverride;
768 // Holds the desired tSirScanType, as requested by SME
769 tSirScanType gLimScanOverrideSaved;
770
771 // Override with this Phy CB state always
772 //ePhyChanBondState gLimPhyCBState;
773
774 // When operating with -
775 // a) Channel Bonding mode (as configured by SME) AND
776 // b) CB State protection turned ON
777 // this object will save the CB state as desired by SME
778 //
779 // This object mimics the bitmap encoding of the
780 // gCbState object, as follows:
781 //
782 // b7 b6 b5 b4 b3 b2 b1 b0
783 // --------------------------------
784 // | X | X | X | AU|CS|U/D| O | A |
785 // --------------------------------
786 //
787 tANI_U8 gCbStateProtected;
788
789 //
790 // CB State protection, operated upon as follows:
791 // 1 - CB is enabled in the hardware ONLY WHEN a Titan
792 // STA associates with the AP
793 // 0 - CB is enabled/disabled based on the configuration
794 // received as per eWNI_SME_START_BSS_REQ
795 //
796 tANI_U32 gLimCBStateProtection;
797
798 // Count of TITAN STA's currently associated
799 tANI_U16 gLimTitanStaCount;
800
801 //
802 // For DEBUG purposes
803 // Primarily for - TITAN workaround
804 // Symptom - Avoid NULL data frames
805 // Applies to AP only
806 //
807 tANI_U32 gLimBlockNonTitanSta;
808 /////////////////////////// TITAN related globals //////////////////////////////////////////
809
810
811 //////////////////////////////// HT RELATED //////////////////////////////////////////
812 //
813 // The following global LIM variables maintain/manage
814 // the runtime configurations related to 802.11n
815
816 // 802.11n Station detected HT capability in Beacon Frame
817 tANI_U8 htCapabilityPresentInBeacon;
818
819 // 802.11 HT capability: Enabled or Disabled
820 tANI_U8 htCapability;
821
822
823 tANI_U8 gHTGreenfield;
824
825 //0-20Mhz
826 //1-40Mhz
827 tANI_U8 gHTSupportedChannelWidthSet;
828
829 tANI_U8 gHTShortGI40Mhz;
830 tANI_U8 gHTShortGI20Mhz;
831
832 //Set to 0 for 3839 octets
833 //Set to 1 for 7935 octets
834 tANI_U8 gHTMaxAmsduLength;
835
836
837 // DSSS/CCK at 40 MHz: Enabled 1 or Disabled
838 tANI_U8 gHTDsssCckRate40MHzSupport;
839
840 // PSMP Support: Enabled 1 or Disabled 0
841 tANI_U8 gHTPSMPSupport;
842
843 // L-SIG TXOP Protection used only if peer support available
844 tANI_U8 gHTLsigTXOPProtection;
845
846 // MIMO Power Save
847 tSirMacHTMIMOPowerSaveState gHTMIMOPSState;
848
849 // Scan In Power Save
850 tANI_U8 gScanInPowersave;
851
852 //
853 // A-MPDU Density
854 // 000 - No restriction
855 // 001 - 1/8 usec
856 // 010 - 1/4 usec
857 // 011 - 1/2 usec
858 // 100 - 1 usec
859 // 101 - 2 usec
860 // 110 - 4 usec
861 // 111 - 8 usec
862 //
863 tANI_U8 gHTAMpduDensity;
864
865 tANI_BOOLEAN gMaxAmsduSizeEnabled;
866 // Maximum Tx/Rx A-MPDU factor
867 tANI_U8 gHTMaxRxAMpduFactor;
868
869 //
870 // Scheduled PSMP related - Service Interval Granularity
871 // 000 - 5 ms
872 // 001 - 10 ms
873 // 010 - 15 ms
874 // 011 - 20 ms
875 // 100 - 25 ms
876 // 101 - 30 ms
877 // 110 - 35 ms
878 // 111 - 40 ms
879 //
880 tANI_U8 gHTServiceIntervalGranularity;
881
882 // Indicates whether an AP wants to associate PSMP enabled Stations
883 tANI_U8 gHTControlledAccessOnly;
884
885 // RIFS Mode. Set if no APSD legacy devices associated
886 tANI_U8 gHTRifsMode;
887 // OBss Mode . set when we have Non HT STA is associated or with in overlap bss
888 tANI_U8 gHTObssMode;
889 //
890 // Recommended Tx Width Set
891 // 0 - use 20 MHz channel (control channel)
892 // 1 - use channel width enabled under Supported Channel Width Set
893 //
894 tANI_U8 gHTRecommendedTxWidthSet;
895
896 // Identifies the 40 MHz extension channel
897 tSirMacHTSecondaryChannelOffset gHTSecondaryChannelOffset;
898
899 // Identifies the current Operating Mode
900 tSirMacHTOperatingMode gHTOperMode;
901
902 // Indicates if PCO is activated in the BSS
903 tANI_U8 gHTPCOActive;
904
905 //
906 // If PCO is active, indicates which PCO phase to use
907 // 0 - switch to 20 MHz phase
908 // 1 - switch to 40 MHz phase
909 //
910 tANI_U8 gHTPCOPhase;
911
912 //
913 // Used only in beacons. For PR, this is set to 0
914 // 0 - Primary beacon
915 // 1 - Secondary beacon
916 //
917 tANI_U8 gHTSecondaryBeacon;
918
919 //
920 // Dual CTS Protection
921 // 0 - Use RTS/CTS
922 // 1 - Dual CTS Protection is used
923 //
924 tANI_U8 gHTDualCTSProtection;
925
926 //
927 // Identifies a single STBC MCS that shall ne used for
928 // STBC control frames and STBC beacons
929 //
930 tANI_U8 gHTSTBCBasicMCS;
931
932 tANI_U8 gHTNonGFDevicesPresent;
933
934 tANI_U8 gAddBA_Declined; // Flag to Decline the BAR if the particular bit (0-7) is being set
935
936 //////////////////////////////// HT RELATED //////////////////////////////////////////
937
938
939 // wsc info required to form the wsc IE
940 tLimWscIeInfo wscIeInfo;
941 tpPESession gpSession ; //Pointer to session table
942 /*
943 * sessionID and transactionID from SME is stored here for those messages, for which
944 * there is no session context in PE, e.g. Scan related messages.
945 **/
946 tANI_U8 gSmeSessionId;
947 tANI_U16 gTransactionId;
948
949
950#ifdef WLAN_FEATURE_P2P
951 tSirRemainOnChnReq *gpLimRemainOnChanReq; //hold remain on chan request in this buf
952 vos_list_t gLimMgmtFrameRegistratinQueue;
953 tANI_U32 actionFrameSessionId;
954#endif
955} tAniSirLim, *tpAniSirLim;
956
957#ifdef WLAN_FEATURE_P2P
958typedef struct sLimMgmtFrameRegistration
959{
960 vos_list_node_t node; // MUST be first element
961 tANI_U16 frameType;
962 tANI_U16 matchLen;
963 tANI_U16 sessionId;
964 tANI_U8 matchData[1];
965} tLimMgmtFrameRegistration, *tpLimMgmtFrameRegistration;
966#endif
967
968#if defined WLAN_FEATURE_VOWIFI
969typedef struct sRrmContext
970{
971 tRrmSMEContext rrmSmeContext;
972 tRrmPEContext rrmPEContext;
973}tRrmContext, *tpRrmContext;
974#endif
975
976#if defined WLAN_FEATURE_VOWIFI_11R
977typedef struct sFTContext
978{
979 tftSMEContext ftSmeContext;
980 tftPEContext ftPEContext;
981} tftContext, *tpFTContext;
982#endif
983
984#ifdef FEATURE_WLAN_INTEGRATED_SOC
985//Check if this definition can actually move here even for Volans. In that case
986//this featurization can be removed.
987/** ------------------------------------------------------------------------- *
988
989 \typedef tDriverType
990
991 \brief Indicate the driver type to the mac, and based on this do
992 appropriate initialization.
993
994 -------------------------------------------------------------------------- */
995
996typedef enum
997{
998 eDRIVER_TYPE_PRODUCTION = 0,
999 eDRIVER_TYPE_MFG = 1,
1000 eDRIVER_TYPE_DVT = 2
1001} tDriverType;
1002
1003/** ------------------------------------------------------------------------- *
1004
1005 \typedef tMacOpenParameters
1006
1007 \brief Parameters needed for Enumeration of all status codes returned by the higher level
1008 interface functions.
1009
1010 -------------------------------------------------------------------------- */
1011
1012typedef struct sMacOpenParameters
1013{
1014 tANI_U16 maxStation;
1015 tANI_U16 maxBssId;
1016 tANI_U32 frameTransRequired;
1017 tDriverType driverType;
1018} tMacOpenParameters;
1019
1020typedef enum
1021{
1022 HAL_STOP_TYPE_SYS_RESET,
1023 HAL_STOP_TYPE_SYS_DEEP_SLEEP,
1024 HAL_STOP_TYPE_RF_KILL
1025}tHalStopType;
1026
1027typedef struct sHalMacStartParameters
1028{
1029 // parametes for the Firmware
1030 //tHalFirmwareParameters FW;
1031 tDriverType driverType;
1032
1033} tHalMacStartParameters;
1034#endif
1035
1036// -------------------------------------------------------------------
1037/// MAC Sirius parameter structure
1038typedef struct sAniSirGlobal
1039
1040{
1041 tDriverType gDriverType;
1042#if defined(ANI_OS_TYPE_RTAI_LINUX)
1043 struct rtLibApp * rt;
1044#endif
1045
1046 // we should be able to save this hddHandle in here and deprecate
1047 // the pAdapter. For now, compiles are a problem because there
1048 // are dependencides on the header files that are not handling the
1049 // compiler very gracefully.
1050// tHddHandle hHdd; // Handle to the HDD.
1051 //void *hHdd;
1052 void *pAdapter; // deprecate this pAdapter pointer eventually...
1053 // all interfaces to the HDD should pass hHdd, which
1054 // is stored in this struct above.....
1055 tSirMbMsg* pResetMsg;
1056 tAniSirCfg cfg;
1057 tAniSirLim lim;
1058 //tAniSirDph dph;
1059 tAniSirPmm pmm;
1060 tAniSirSch sch;
1061 tAniSirSys sys;
1062 tAniSirUtils utils;
1063#ifdef FEATURE_WLAN_NON_INTEGRATED_SOC
1064 tAniSirHal hal;
1065 tAniSirPhy hphy;
1066#endif
1067
1068#ifndef WLAN_FTM_STUB
1069#ifdef FEATURE_WLAN_NON_INTEGRATED_SOC
1070 tPttModuleVariables ptt;
1071#endif
1072#endif
1073
1074 tAniSirTxWrapper txWrapper;
1075 // PAL/HDD handle
1076 tHddHandle hHdd;
1077
1078#ifdef ANI_DVT_DEBUG
1079 tAniSirDvt dvt;
1080#endif
1081
1082 tSmeStruct sme;
1083 tCsrScanStruct scan;
1084 tCsrRoamStruct roam;
1085
1086
1087#ifdef ANI_PRODUCT_TYPE_CLIENT
1088 tPmcInfo pmc;
1089 tSmeBtcInfo btc;
1090#endif
1091
1092 tCcm ccm;
1093
1094#if defined WLAN_FEATURE_VOWIFI
1095 tRrmContext rrm;
1096#endif
1097#ifdef WLAN_FEATURE_P2P
1098#ifdef WLAN_FEATURE_CONCURRENT_P2P
1099 tp2pContext p2pContext[MAX_NO_OF_P2P_SESSIONS];
1100#else
1101 tp2pContext p2pContext;
1102#endif
1103#endif
1104
1105#if defined WLAN_FEATURE_VOWIFI_11R
1106 tftContext ft;
1107#endif
1108
1109 tANI_U32 gCurrentLogSize;
1110 tANI_U32 menuCurrent;
1111 /* logDump specific */
1112 tANI_U32 dumpTablecurrentId;
1113 /* Instead of static allocation I will dyanamically allocate memory for dumpTableEntry
1114 Thinking of using linkedlist */
1115 tDumpModuleEntry *dumpTableEntry[MAX_DUMP_TABLE_ENTRY];
1116
1117} tAniSirGlobal;
1118
1119
1120
1121#endif /* _ANIGLOBAL_H */
1122