blob: fc5ce65dd4f627ba85376e3fc6c7a8aa8e524d1c [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Aggarwal, Nishank2dbbd3d2017-01-05 15:32:47 +05302 * Copyright (c) 2012-2014, 2017 The Linux Foundation. All rights reserved.
Kiet Lam842dad02014-02-18 18:44:02 -08003 *
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 */
Kiet Lamaa8e15a2014-02-11 23:30:06 -080021
Jeff Johnson295189b2012-06-20 16:38:30 -070022/*
Kiet Lama7f454d2014-07-24 12:04:06 -070023 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
Kiet Lam842dad02014-02-18 18:44:02 -080026 */
27
28
Kiet Lama7f454d2014-07-24 12:04:06 -070029
30
Kiet Lam842dad02014-02-18 18:44:02 -080031/*
Jeff Johnson295189b2012-06-20 16:38:30 -070032 * aniGlobal.h: MAC Modules Adapter Definitions.
33 * Author: V. K. Kandarpa
34 * Date: 10/25/2002
35 *
36 * History:-
37 * Date: 04/08/2008 Modified by: Santosh Mandiganal
38 * Modification Information: Added the logDump.h header file and defined the
39 * dumpTablecurrentId, dumpTableEntry.
40 * --------------------------------------------------------------------------
41 *
42 */
43
44#ifndef _ANIGLOBAL_H
45#define _ANIGLOBAL_H
46
47// Take care to avoid redefinition of this type, if it is
48// already defined in "halWmmApi.h"
49#if !defined(_HALMAC_WMM_API_H)
50typedef struct sAniSirGlobal *tpAniSirGlobal;
51#endif
52
53#include "halTypes.h"
54#include "sirCommon.h"
55#include "aniSystemDefs.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070056#include "sysDef.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070057#include "dphGlobal.h"
58#include "limGlobal.h"
59#include "pmmGlobal.h"
60#include "schGlobal.h"
61#include "sysGlobal.h"
62#include "cfgGlobal.h"
63#include "utilsGlobal.h"
64#include "sirApi.h"
65
Jeff Johnson295189b2012-06-20 16:38:30 -070066
Jeff Johnson295189b2012-06-20 16:38:30 -070067#include "wlan_qct_hal.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070068
Jeff Johnson295189b2012-06-20 16:38:30 -070069#include "pmc.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070070
71#include "csrApi.h"
72#ifdef WLAN_FEATURE_VOWIFI_11R
73#include "sme_FTApi.h"
74#endif
75#include "csrSupport.h"
76#include "smeInternal.h"
77#include "ccmApi.h"
78#include "btcApi.h"
79#include "csrInternal.h"
80
Jeff Johnsone7245742012-09-05 17:12:55 -070081#ifdef FEATURE_OEM_DATA_SUPPORT
82#include "oemDataInternal.h"
83#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070084
85#if defined WLAN_FEATURE_VOWIFI
86#include "smeRrmInternal.h"
87#include "rrmGlobal.h"
88#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -080089#if defined(FEATURE_WLAN_ESE) && !defined(FEATURE_WLAN_ESE_UPLOAD)
90#include "eseApi.h"
91#include "eseGlobal.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070092#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070093#include "p2p_Api.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070094
Abhishek Singh00b71972016-01-07 10:51:04 +053095#include "limRMC.h"
96
Jeff Johnson295189b2012-06-20 16:38:30 -070097#if defined WLAN_FEATURE_VOWIFI_11R
98#include <limFTDefs.h>
99#endif
100
101
102#ifdef ANI_DVT_DEBUG
103#include "dvtModule.h"
104#endif
105
106// New HAL API interface defs.
107#include "logDump.h"
108
Jeff Johnson295189b2012-06-20 16:38:30 -0700109//Check if this definition can actually move here from halInternal.h even for Volans. In that case
110//this featurization can be removed.
111#define PMAC_STRUCT( _hHal ) ( (tpAniSirGlobal)_hHal )
Jeff Johnson295189b2012-06-20 16:38:30 -0700112
113#define ANI_DRIVER_TYPE(pMac) (((tpAniSirGlobal)(pMac))->gDriverType)
114// -------------------------------------------------------------------
115// Bss Qos Caps bit map definition
116#define LIM_BSS_CAPS_OFFSET_HCF 0
117#define LIM_BSS_CAPS_OFFSET_WME 1
118#define LIM_BSS_CAPS_OFFSET_WSM 2
119
120#define LIM_BSS_CAPS_HCF (1 << LIM_BSS_CAPS_OFFSET_HCF)
121#define LIM_BSS_CAPS_WME (1 << LIM_BSS_CAPS_OFFSET_WME)
122#define LIM_BSS_CAPS_WSM (1 << LIM_BSS_CAPS_OFFSET_WSM)
123
124// cap should be one of HCF/WME/WSM
125#define LIM_BSS_CAPS_GET(cap, val) (((val) & (LIM_BSS_CAPS_ ## cap)) >> LIM_BSS_CAPS_OFFSET_ ## cap)
Madan Mohan Koyyalamudia53c4dc2012-11-13 10:35:42 -0800126#define LIM_BSS_CAPS_SET(cap, val) ((val) |= (LIM_BSS_CAPS_ ## cap ))
127#define LIM_BSS_CAPS_CLR(cap, val) ((val) &= (~ (LIM_BSS_CAPS_ ## cap)))
Jeff Johnson295189b2012-06-20 16:38:30 -0700128
129// 40 beacons per heart beat interval is the default + 1 to count the rest
130#define MAX_NO_BEACONS_PER_HEART_BEAT_INTERVAL 41
131
132/* max number of legacy bssid we can store during scan on one channel */
133#define MAX_NUM_LEGACY_BSSID_PER_CHANNEL 10
134
Jeff Johnson295189b2012-06-20 16:38:30 -0700135#define P2P_WILDCARD_SSID "DIRECT-" //TODO Put it in proper place;
136#define P2P_WILDCARD_SSID_LEN 7
137
138#ifdef WLAN_FEATURE_CONCURRENT_P2P
139#define MAX_NO_OF_P2P_SESSIONS 5
140#endif //WLAN_FEATURE_CONCURRENT_P2P
Jeff Johnson295189b2012-06-20 16:38:30 -0700141
Srinivas Girigowdade697412013-02-14 16:31:48 -0800142#define SPACE_ASCII_VALUE 32
143
Rajeev79dbe4c2013-10-05 11:03:42 +0530144#ifdef FEATURE_WLAN_BATCH_SCAN
145#define EQUALS_TO_ASCII_VALUE (61)
146#endif
147
Jeff Johnson295189b2012-06-20 16:38:30 -0700148// -------------------------------------------------------------------
149// Change channel generic scheme
150typedef void (*CHANGE_CHANNEL_CALLBACK)(tpAniSirGlobal pMac, eHalStatus status, tANI_U32 *data,
151 tpPESession psessionEntry);
152
153/// LIM global definitions
154typedef struct sAniSirLimIbss
155{
156 void *pHdr;
157 void *pBeacon;
158} tAniSirLimIbss;
159
160typedef struct sDialogueToken
161{
162 //bytes 0-3
163 tANI_U16 assocId;
164 tANI_U8 token;
165 tANI_U8 rsvd1;
166 //Bytes 4-7
167 tANI_U16 tid;
168 tANI_U8 rsvd2[2];
169
170 struct sDialogueToken* next;
171}tDialogueToken, *tpDialogueToken;
172
173typedef struct sLimTimers
174{
175 //TIMERS IN LIM ARE NOT SUPPOSED TO BE ZEROED OUT DURING RESET.
176 //DURING limInitialize DONOT ZERO THEM OUT.
177
178//STA SPECIFIC TIMERS
Jeff Johnson295189b2012-06-20 16:38:30 -0700179 // Periodic background scan timer
180 TX_TIMER gLimBackgroundScanTimer;
Jeff Johnson295189b2012-06-20 16:38:30 -0700181
182 TX_TIMER gLimPreAuthClnupTimer;
183 //TX_TIMER gLimAuthResponseTimer[HAL_NUM_STA];
184
185 // Association related timers
186 TX_TIMER gLimAssocFailureTimer;
187 TX_TIMER gLimReassocFailureTimer;
188
189
190 /// Heartbeat timer on STA
191 TX_TIMER gLimHeartBeatTimer;
192
193 /// Wait for Probe after Heartbeat failure timer on STA
194 TX_TIMER gLimProbeAfterHBTimer;
195
196
197 // Authentication related timers
198 TX_TIMER gLimAuthFailureTimer;
199
200 // Join Failure timeout on STA
201 TX_TIMER gLimJoinFailureTimer;
202
203 // Keepalive timer
204 TX_TIMER gLimKeepaliveTimer;
205
206 // Scan related timers
207 TX_TIMER gLimMinChannelTimer;
208 TX_TIMER gLimMaxChannelTimer;
209 TX_TIMER gLimPeriodicProbeReqTimer;
210
211 // CNF_WAIT timer
212 TX_TIMER *gpLimCnfWaitTimer;
213
Jeff Johnson295189b2012-06-20 16:38:30 -0700214 TX_TIMER gLimAddtsRspTimer; // max wait for a response
215
216 // Update OLBC Cache Timer
217 TX_TIMER gLimUpdateOlbcCacheTimer;
218
219 TX_TIMER gLimChannelSwitchTimer;
220 // This TIMER is started on the STA, as indicated by the
221 // AP in its Quiet BSS IE, for the specified interval
222 TX_TIMER gLimQuietTimer;
223 // This TIMER is started on the AP, prior to the AP going
224 // into LEARN mode
225 // This TIMER is started on the STA, for the specified
226 // quiet duration
227 TX_TIMER gLimQuietBssTimer;
228
229#ifdef WLAN_FEATURE_VOWIFI_11R
230 TX_TIMER gLimFTPreAuthRspTimer;
231#endif
232
Padma, Santhosh Kumar67f479b2016-12-28 15:43:42 +0530233#ifdef WLAN_FEATURE_LFR_MBB
234 TX_TIMER glim_pre_auth_mbb_rsp_timer;
235#endif
236
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800237#ifdef FEATURE_WLAN_ESE
238 TX_TIMER gLimEseTsmTimer;
Jeff Johnson295189b2012-06-20 16:38:30 -0700239#endif
Madan Mohan Koyyalamudi9aff9ff2012-11-29 11:27:25 -0800240 TX_TIMER gLimPeriodicJoinProbeReqTimer;
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -0800241 TX_TIMER gLimDisassocAckTimer;
242 TX_TIMER gLimDeauthAckTimer;
Sushant Kaushik9e923872015-04-02 17:09:31 +0530243 TX_TIMER gLimPeriodicAuthRetryTimer;
Viral Modid86bde22012-12-10 13:09:21 -0800244 // This timer is started when single shot NOA insert msg is sent to FW for scan in P2P GO mode
245 TX_TIMER gLimP2pSingleShotNoaInsertTimer;
Gopichand Nakkalad492d202013-05-10 02:50:47 +0530246 /* This timer is used to convert active channel to
247 * passive channel when there is no beacon
248 * for a period of time on a particular DFS channel
249 */
250 TX_TIMER gLimActiveToPassiveChannelTimer;
Jeff Johnson295189b2012-06-20 16:38:30 -0700251//********************TIMER SECTION ENDS**************************************************
252// ALL THE FIELDS BELOW THIS CAN BE ZEROED OUT in limInitialize
253//****************************************************************************************
254
255}tLimTimers;
256
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -0800257typedef struct {
258 void *pMlmDisassocReq;
259 void *pMlmDeauthReq;
260}tLimDisassocDeauthCnfReq;
Jeff Johnson295189b2012-06-20 16:38:30 -0700261
Sreelakshmi Konamki60ccfb32016-07-08 12:53:12 +0530262typedef struct {
263 tANI_U32 failed_count[MAX_TIDS];
264 v_TIME_t failed_timestamp[MAX_TIDS];
265} tLimStaBAInfo;
266
Jeff Johnson295189b2012-06-20 16:38:30 -0700267typedef struct sAniSirLim
268{
269 ////////////////////////////////////// TIMER RELATED START ///////////////////////////////////////////
270
271 tLimTimers limTimers;
272 /// Flag to track if LIM timers are created or not
273 tANI_U32 gLimTimersCreated;
274
275
276 ////////////////////////////////////// TIMER RELATED END ///////////////////////////////////////////
277
278 ////////////////////////////////////// SCAN/LEARN RELATED START ///////////////////////////////////////////
279 /**
280 * This flag when set, will use scan mode instead of
281 * Learn mode on BP/AP. By default this flag is set
282 * to true until HIF getting stuck in 0x800 state is
283 * debugged.
284 */
285 tANI_U32 gLimUseScanModeForLearnMode;
286
287 /**
288 * This is useful for modules other than LIM
289 * to see if system is in scan/learn mode or not
290 */
291 tANI_U32 gLimSystemInScanLearnMode;
292
293 // Scan related globals on STA
294 tANI_U8 gLimReturnAfterFirstMatch;
295 tANI_U8 gLim24Band11dScanDone;
296 tANI_U8 gLim50Band11dScanDone;
297 tANI_U8 gLimReturnUniqueResults;
298
299 // Background Scan related globals on STA
300 tANI_U32 gLimNumOfBackgroundScanSuccess;
301 tANI_U32 gLimNumOfConsecutiveBkgndScanFailure;
302 tANI_U32 gLimNumOfForcedBkgndScan;
303 tANI_U8 gLimBackgroundScanDisable; //based on BG timer
304 tANI_U8 gLimForceBackgroundScanDisable; //debug control flag
305 tANI_U8 gLimBackgroundScanTerminate; //controlled by SME
306 tANI_U8 gLimReportBackgroundScanResults;//controlled by SME
307
308 /// Place holder for current channel ID
309 /// being scanned
310 tANI_U32 gLimCurrentScanChannelId;
311
312 // Hold onto SCAN criteria
Viral Modid440e682013-03-06 02:25:31 -0800313 /* The below is used in P2P GO case when we need to defer processing SME Req
314 * to LIM and insert NOA first and process SME req once SNOA is started
315 */
316 tANI_U16 gDeferMsgTypeForNOA;
317 tANI_U32 *gpDefdSmeMsgForNOA;
318
Jeff Johnson295189b2012-06-20 16:38:30 -0700319 tLimMlmScanReq *gpLimMlmScanReq;
320
321 /// This indicates total length of 'matched' scan results
322 tANI_U16 gLimMlmScanResultLength;
323
324 /// This indicates total length of 'cached' scan results
325 tANI_U16 gLimSmeScanResultLength;
326
327 /**
328 * Hash table definition for storing SCAN results
329 * This is the placed holder for 'cached' scan results
330 */
331 tLimScanResultNode
332 *gLimCachedScanHashTable[LIM_MAX_NUM_OF_SCAN_RESULTS];
333
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700334 /// This indicates total length of 'matched' scan results
335 tANI_U16 gLimMlmLfrScanResultLength;
336
337 /// This indicates total length of 'cached' scan results
338 tANI_U16 gLimSmeLfrScanResultLength;
339
340 /**
341 * Hash table definition for storing LFR SCAN results
342 * This is the placed holder for roaming candidates as forwarded
343 * by FW
344 */
345 tLimScanResultNode
346 *gLimCachedLfrScanHashTable[LIM_MAX_NUM_OF_SCAN_RESULTS];
347
Jeff Johnson295189b2012-06-20 16:38:30 -0700348 /// Place holder for current channel ID
349 /// being scanned during background scanning
350 tANI_U32 gLimBackgroundScanChannelId;
351 /// flag to indicate that bacground scan timer has been started
352 tANI_U8 gLimBackgroundScanStarted;
353
354 /* Used to store the list of legacy bss sta detected during scan on one channel */
355 tANI_U16 gLimRestoreCBNumScanInterval;
356 tANI_U16 gLimRestoreCBCount;
357 tSirMacAddr gLimLegacyBssidList[MAX_NUM_LEGACY_BSSID_PER_CHANNEL];
Jeff Johnson295189b2012-06-20 16:38:30 -0700358
359 //
360 // If this flag is 1,
361 // then, LIM will "try and trigger" a background
362 // scan whenever it receives a Quiet BSS IE
363 //
364 // If this flag is 0,
365 // then, LIM will simply shut-off Tx/Rx whenever it
366 // receives a Quiet BSS IE.
367 // This is the default behavior when a Quiet BSS IE
368 // is received and 11H is enabled
369 //
370 tANI_U32 gLimTriggerBackgroundScanDuringQuietBss;
371
Jeff Johnson295189b2012-06-20 16:38:30 -0700372
Jeff Johnson295189b2012-06-20 16:38:30 -0700373 // This variable store the total duration to do scan
374 tANI_U32 gTotalScanDuration;
Jeff Johnsone7245742012-09-05 17:12:55 -0700375 tANI_U32 p2pRemOnChanTimeStamp;
Jeff Johnson295189b2012-06-20 16:38:30 -0700376
377 // abort scan is used to abort an on-going scan
378 tANI_U8 abortScan;
379 tLimScanChnInfo scanChnInfo;
380
381 ////////////////////////////////////// SCAN/LEARN RELATED START ///////////////////////////////////////////
382 tSirMacAddr gSelfMacAddr; //added for BT-AMP Support
Siddharth Bhal4f3187c2014-10-09 21:38:08 +0530383 tSirMacAddr spoofMacAddr; //added for Mac Addr Spoofing support
384 tANI_U8 isSpoofingEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700385
386 ////////////////////////////////////////// BSS RELATED END ///////////////////////////////////////////
387 // Place holder for StartBssReq message
388 // received by SME state machine
389
Jeff Johnson62c27982013-02-27 17:53:55 -0800390 tANI_U8 gLimCurrentBssUapsd;
Jeff Johnson295189b2012-06-20 16:38:30 -0700391
Jeff Johnson62c27982013-02-27 17:53:55 -0800392 /* This is used for testing sta legacy bss detect feature */
393 tANI_U8 gLimForceNoPropIE;
Jeff Johnson295189b2012-06-20 16:38:30 -0700394
395 //
396 // Store the BSS Index returned by HAL during
397 // WDA_ADD_BSS_RSP here.
398 //
399 // For now:
400 // This will be used during WDA_SET_BSSKEY_REQ in
401 // order to set the GTK
402 // Later:
403 // There could be other interfaces needing this info
404 //
405
406 //
407 // Due to the asynchronous nature of the interface
408 // between PE <-> HAL, some transient information
409 // like this needs to be cached.
410 // This is cached upon receipt of eWNI_SME_SETCONTEXT_REQ.
411 // This is released while posting LIM_MLM_SETKEYS_CNF
412 //
413 void* gpLimMlmSetKeysReq;
414 void* gpLimMlmRemoveKeyReq;
415
416 //On STA: staid for self generated by HAL and sent as response to 'ADD STA' msg.
417 //On AP: staid corresponding to BSS generated by HAL and sent as response to 'ADD BSS' msg.
418 // tANI_U16 gLimStaid; // TO SUPPORT BT-AMP
419
420 ////////////////////////////////////////// BSS RELATED END ///////////////////////////////////////////
421
422 ////////////////////////////////////////// IBSS RELATED START ///////////////////////////////////////////
423 // This indicates whether we've a partner
424 // that is also transmitting Beacon frame
425 // in IBSS
426 //tANI_U8 gLimIbssActive; oct1 review
427
428 //This indicates whether this STA coalesced and adapter to peer's capabilities or not.
429 tANI_U8 gLimIbssCoalescingHappened;
430
431 /// Definition for storing IBSS peers BSS description
432 tLimIbssPeerNode *gLimIbssPeerList;
433 tANI_U32 gLimNumIbssPeers;
Sushant Kaushike06bd872015-03-12 16:17:48 +0530434 tANI_U32 gLimIbssRetryCnt;
Jeff Johnson295189b2012-06-20 16:38:30 -0700435
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
Jeff Johnson295189b2012-06-20 16:38:30 -0700452 tANI_U16 gLimNumOfAniSTAs; // count of ANI peers
453 tANI_U16 gLimAssocStaLimit;
454
455 /// This indicates number of RXed Beacons during HB period
456 // tANI_U8 gLimRxedBeaconCntDuringHB;
457
458 // Heart-Beat interval value
459 tANI_U32 gLimHeartBeatCount;
Abhishek Singhde51a412014-05-20 19:17:26 +0530460 tSirMacAddr gLimHeartBeatApMac[2];
461 tANI_U8 gLimHeartBeatApMacIndex;
Jeff Johnson295189b2012-06-20 16:38:30 -0700462
463 // Statistics to keep track of no. beacons rcvd in heart beat interval
464 tANI_U16 gLimHeartBeatBeaconStats[MAX_NO_BEACONS_PER_HEART_BEAT_INTERVAL];
465
466#ifdef WLAN_DEBUG
467 // Debug counters
468 tANI_U32 numTot, numBbt, numProtErr, numLearn, numLearnIgnore;
469 tANI_U32 numSme, numMAC[4][16];
470
471 // Debug counter to track number of Assoc Req frame drops
472 // when received in pStaDs->mlmState other than LINK_ESTABLISED
473 tANI_U32 gLimNumAssocReqDropInvldState;
474 // counters to track rejection of Assoc Req due to Admission Control
475 tANI_U32 gLimNumAssocReqDropACRejectTS;
476 tANI_U32 gLimNumAssocReqDropACRejectSta;
477 // Debug counter to track number of Reassoc Req frame drops
478 // when received in pStaDs->mlmState other than LINK_ESTABLISED
479 tANI_U32 gLimNumReassocReqDropInvldState;
480 // Debug counter to track number of Hash Miss event that
481 // will not cause a sending of de-auth/de-associate frame
482 tANI_U32 gLimNumHashMissIgnored;
483
484 // Debug counter to track number of Beacon frames
485 // received in unexpected state
486 tANI_U32 gLimUnexpBcnCnt;
487
488 // Debug counter to track number of Beacon frames
489 // received in wt-join-state that do have SSID mismatch
490 tANI_U32 gLimBcnSSIDMismatchCnt;
491
492 // Debug counter to track number of Link establishments on STA/BP
493 tANI_U32 gLimNumLinkEsts;
494
495 // Debug counter to track number of Rx cleanup
496 tANI_U32 gLimNumRxCleanup;
497
498 // Debug counter to track different parse problem
499 tANI_U32 gLim11bStaAssocRejectCount;
500
501#endif
502
503 //Time stamp of the last beacon received from the BSS to which STA is connected.
504 tANI_U64 gLastBeaconTimeStamp;
505 //RX Beacon count for the current BSS to which STA is connected.
506 tANI_U32 gCurrentBssBeaconCnt;
507 tANI_U8 gLastBeaconDtimCount;
508 tANI_U8 gLastBeaconDtimPeriod;
509
510
511 ////////////////////////////////////////// STATS/COUNTER RELATED END ///////////////////////////////////////////
512
513
514 ////////////////////////////////////////// STATES RELATED START ///////////////////////////////////////////
515 // Counts Heartbeat failures
516 tANI_U8 gLimHBfailureCntInLinkEstState;
517 tANI_U8 gLimProbeFailureAfterHBfailedCnt;
518 tANI_U8 gLimHBfailureCntInOtherStates;
519
520 /**
521 * This variable indicates whether LIM module need to
522 * send response to host. Used to identify whether a request
523 * is generated internally within LIM module or by host
524 */
525 tANI_U8 gLimRspReqd;
526
527 /// Previous SME State
528 tLimSmeStates gLimPrevSmeState;
529
530 /// MLM State visible across all Sirius modules
531 tLimMlmStates gLimMlmState;
532
533 /// Previous MLM State
534 tLimMlmStates gLimPrevMlmState;
535
536#ifdef GEN4_SCAN
537 // LIM to HAL SCAN Management Message Interface states
538 tLimLimHalScanState gLimHalScanState;
539//WLAN_SUSPEND_LINK Related
540 SUSPEND_RESUME_LINK_CALLBACK gpLimSuspendCallback;
541 tANI_U32 *gpLimSuspendData;
542 SUSPEND_RESUME_LINK_CALLBACK gpLimResumeCallback;
543 tANI_U32 *gpLimResumeData;
544//end WLAN_SUSPEND_LINK Related
545 tANI_U8 fScanDisabled;
546 //Can be set to invalid channel. If it is invalid, HAL
547 //should move to previous valid channel or stay in the
Jeff Johnsone7245742012-09-05 17:12:55 -0700548 //current channel. CB state goes along with channel to resume to
549 tANI_U16 gResumeChannel;
550 ePhyChanBondState gResumePhyCbState;
Jeff Johnson295189b2012-06-20 16:38:30 -0700551#endif // GEN4_SCAN
552
553 // Change channel generic scheme
554 CHANGE_CHANNEL_CALLBACK gpchangeChannelCallback;
555 tANI_U32 *gpchangeChannelData;
556
557 /// SME State visible across all Sirius modules
558 tLimSmeStates gLimSmeState;
559 /// This indicates whether we're an AP, STA in BSS/IBSS
560 tLimSystemRole gLimSystemRole;
561
562 // Number of STAs that do not support short preamble
563 tLimNoShortParams gLimNoShortParams;
564
565 // Number of STAs that do not support short slot time
566 tLimNoShortSlotParams gLimNoShortSlotParams;
567
568
569 // OLBC parameters
570 tLimProtStaParams gLimOverlap11gParams;
571
572 tLimProtStaParams gLimOverlap11aParams;
573 tLimProtStaParams gLimOverlapHt20Params;
574 tLimProtStaParams gLimOverlapNonGfParams;
575
576 //
577 // ---------------- DPH -----------------------
578 // these used to live in DPH but are now moved here (where they belong)
579 tANI_U32 gLimPhyMode;
580 tANI_U32 propRateAdjustPeriod;
581 tANI_U32 scanStartTime; // used to measure scan time
582
Jeff Johnsone7245742012-09-05 17:12:55 -0700583 //tANI_U8 gLimBssid[6];
Jeff Johnson295189b2012-06-20 16:38:30 -0700584 tANI_U8 gLimMyMacAddr[6];
585 tANI_U8 ackPolicy;
586
587 tANI_U8 gLimQosEnabled:1; //11E
588 tANI_U8 gLimWmeEnabled:1; //WME
589 tANI_U8 gLimWsmEnabled:1; //WSM
590 tANI_U8 gLimHcfEnabled:1;
591 tANI_U8 gLim11dEnabled:1;
592 tANI_U8 gLimProbeRespDisableFlag:1; // control over probe response
593 // ---------------- DPH -----------------------
594
595 ////////////////////////////////////////// STATES RELATED END ///////////////////////////////////////////
596
597 ////////////////////////////////////////// MISC RELATED START ///////////////////////////////////////////
Jeff Johnson295189b2012-06-20 16:38:30 -0700598
599 // WDS info
600 tANI_U32 gLimNumWdsInfoInd;
601 tANI_U32 gLimNumWdsInfoSet;
602 tSirWdsInfo gLimWdsInfo;
603
604 // Deferred Queue Paramters
605 tLimDeferredMsgQParams gLimDeferredMsgQ;
606
607 // addts request if any - only one can be outstanding at any time
608 tSirAddtsReq gLimAddtsReq;
609 tANI_U8 gLimAddtsSent;
610 tANI_U8 gLimAddtsRspTimerCount;
611
612 //protection related config cache
613 tCfgProtection cfgProtection;
614
615 tANI_U8 gLimProtectionControl;
616 //RF band to determibe 2.4/5 GHZ
617
618 // alternate radio info used by STA
619 tSirAlternateRadioInfo gLimAlternateRadio;
620
621 //This flag will remain to be set except while LIM is waiting for specific response messages
622 //from HAL. e.g when LIM issues ADD_STA req it will clear this flag and when it will receive
623 //the response the flag will be set.
624 tANI_U8 gLimProcessDefdMsgs;
625
626 // UAPSD flag used on AP
627 tANI_U8 gUapsdEnable;
628
629 /* Used on STA, this is a static UAPSD mask setting
630 * derived from SME_JOIN_REQ and SME_REASSOC_REQ. If a
631 * particular AC bit is set, it means the AC is both
632 * trigger enabled and delivery enabled.
633 */
634 tANI_U8 gUapsdPerAcBitmask;
635
636 /* Used on STA, this is a dynamic UPASD mask setting
637 * derived from AddTS Rsp and DelTS frame. If a
638 * particular AC bit is set, it means AC is trigger
639 * enabled.
640 */
641 tANI_U8 gUapsdPerAcTriggerEnableMask;
642
643 /* Used on STA, dynamic UPASD mask setting
644 * derived from AddTS Rsp and DelTs frame. If
645 * a particular AC bit is set, it means AC is
646 * delivery enabled.
647 */
648 tANI_U8 gUapsdPerAcDeliveryEnableMask;
649
650 /* Used on STA for AC downgrade. This is a dynamic mask
651 * setting which keep tracks of ACs being admitted.
652 * If bit is set to 0: That partiular AC is not admitted
653 * If bit is set to 1: That particular AC is admitted
654 */
655 tANI_U8 gAcAdmitMask[SIR_MAC_DIRECTION_DIRECT];
656
657 //dialogue token List head/tail for Action frames request sent.
658 tpDialogueToken pDialogueTokenHead;
659 tpDialogueToken pDialogueTokenTail;
660
661 tLimTspecInfo tspecInfo[LIM_NUM_TSPEC_MAX];
662
663 // admission control policy information
664 tLimAdmitPolicyInfo admitPolicyInfo;
Leela V Kiran Kumar Reddy Chiralac3b9d382013-01-31 20:49:53 -0800665 vos_lock_t lkPeGlobalLock;
Leela V Kiran Kumar Reddy Chiralab1f7d342013-02-11 00:27:02 -0800666 tANI_U8 disableLDPCWithTxbfAP;
Gopichand Nakkala574f6d12013-06-27 19:38:43 +0530667#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +0530668 tANI_U8 gLimTDLSBufStaEnabled;
669 tANI_U8 gLimTDLSUapsdMask;
Naresh Jayaramf73f3762014-02-04 16:13:20 +0530670 tANI_U8 gLimTDLSOffChannelEnabled;
Pradeep Reddy POTTETIa9c80d52014-05-09 18:05:29 +0530671 // TDLS WMM Mode
672 tANI_U8 gLimTDLSWmmMode;
Gopichand Nakkala574f6d12013-06-27 19:38:43 +0530673#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700674
675
676
677 ////////////////////////////////////////// MISC RELATED END ///////////////////////////////////////////
678
679 ////////////////////////////////////////// ASSOC RELATED START ///////////////////////////////////////////
680 // Place holder for JoinReq message
681 // received by SME state machine
682 // tpSirSmeJoinReq gpLimJoinReq;
683
684 // Place holder for ReassocReq message
685 // received by SME state machine
686 //tpSirSmeReassocReq gpLimReassocReq; sep23 review
687
Jeff Johnson295189b2012-06-20 16:38:30 -0700688 // Current Authentication type used at STA
689 //tAniAuthType gLimCurrentAuthType;
690
691 // Place holder for current authentication request
692 // being handled
693 tLimMlmAuthReq *gpLimMlmAuthReq;
694
695 // Place holder for Join request that we're
696 // currently attempting
Jeff Johnsone7245742012-09-05 17:12:55 -0700697 //tLimMlmJoinReq *gpLimMlmJoinReq;
Jeff Johnson295189b2012-06-20 16:38:30 -0700698
699 // Reason code to determine the channel change context while sending
700 // WDA_CHNL_SWITCH_REQ message to HAL
701 tANI_U32 channelChangeReasonCode;
702
703 /// MAC level Pre-authentication related globals
704 tSirMacChanNum gLimPreAuthChannelNumber;
705 tAniAuthType gLimPreAuthType;
706 tSirMacAddr gLimPreAuthPeerAddr;
707 tANI_U32 gLimNumPreAuthContexts;
708 tLimPreAuthTable gLimPreAuthTimerTable;
709
710 // Placed holder to deauth reason
711 tANI_U16 gLimDeauthReasonCode;
712
713 // Place holder for Pre-authentication node list
714 struct tLimPreAuthNode * pLimPreAuthList;
715
Jeff Johnson295189b2012-06-20 16:38:30 -0700716 // Assoc or ReAssoc Response Data/Frame
717 void *gLimAssocResponseData;
718
719 //One cache for each overlap and associated case.
720 tCacheParams protStaOverlapCache[LIM_PROT_STA_OVERLAP_CACHE_SIZE];
721 tCacheParams protStaCache[LIM_PROT_STA_CACHE_SIZE];
722
723 ////////////////////////////////////////// ASSOC RELATED END ///////////////////////////////////////////
724
725
Jeff Johnson295189b2012-06-20 16:38:30 -0700726
727 //
728 // For DEBUG purposes
729 // Primarily for - TITAN BEACON workaround
730 // Symptom - TFP/PHY gets stuck
731 //
732 tANI_U32 gLimScanOverride;
733 // Holds the desired tSirScanType, as requested by SME
734 tSirScanType gLimScanOverrideSaved;
735
Jeff Johnson295189b2012-06-20 16:38:30 -0700736 //
737 // CB State protection, operated upon as follows:
738 // 1 - CB is enabled in the hardware ONLY WHEN a Titan
739 // STA associates with the AP
740 // 0 - CB is enabled/disabled based on the configuration
741 // received as per eWNI_SME_START_BSS_REQ
742 //
743 tANI_U32 gLimCBStateProtection;
744
745 // Count of TITAN STA's currently associated
746 tANI_U16 gLimTitanStaCount;
747
748 //
749 // For DEBUG purposes
750 // Primarily for - TITAN workaround
751 // Symptom - Avoid NULL data frames
752 // Applies to AP only
753 //
754 tANI_U32 gLimBlockNonTitanSta;
755 /////////////////////////// TITAN related globals //////////////////////////////////////////
756
757
758 //////////////////////////////// HT RELATED //////////////////////////////////////////
759 //
760 // The following global LIM variables maintain/manage
761 // the runtime configurations related to 802.11n
762
763 // 802.11n Station detected HT capability in Beacon Frame
764 tANI_U8 htCapabilityPresentInBeacon;
765
766 // 802.11 HT capability: Enabled or Disabled
767 tANI_U8 htCapability;
768
769
770 tANI_U8 gHTGreenfield;
771
Jeff Johnson295189b2012-06-20 16:38:30 -0700772 tANI_U8 gHTShortGI40Mhz;
773 tANI_U8 gHTShortGI20Mhz;
774
775 //Set to 0 for 3839 octets
776 //Set to 1 for 7935 octets
777 tANI_U8 gHTMaxAmsduLength;
778
779
780 // DSSS/CCK at 40 MHz: Enabled 1 or Disabled
781 tANI_U8 gHTDsssCckRate40MHzSupport;
782
783 // PSMP Support: Enabled 1 or Disabled 0
784 tANI_U8 gHTPSMPSupport;
785
786 // L-SIG TXOP Protection used only if peer support available
787 tANI_U8 gHTLsigTXOPProtection;
788
789 // MIMO Power Save
790 tSirMacHTMIMOPowerSaveState gHTMIMOPSState;
791
792 // Scan In Power Save
793 tANI_U8 gScanInPowersave;
794
795 //
796 // A-MPDU Density
797 // 000 - No restriction
798 // 001 - 1/8 usec
799 // 010 - 1/4 usec
800 // 011 - 1/2 usec
801 // 100 - 1 usec
802 // 101 - 2 usec
803 // 110 - 4 usec
804 // 111 - 8 usec
805 //
806 tANI_U8 gHTAMpduDensity;
807
808 tANI_BOOLEAN gMaxAmsduSizeEnabled;
809 // Maximum Tx/Rx A-MPDU factor
810 tANI_U8 gHTMaxRxAMpduFactor;
811
812 //
813 // Scheduled PSMP related - Service Interval Granularity
814 // 000 - 5 ms
815 // 001 - 10 ms
816 // 010 - 15 ms
817 // 011 - 20 ms
818 // 100 - 25 ms
819 // 101 - 30 ms
820 // 110 - 35 ms
821 // 111 - 40 ms
822 //
823 tANI_U8 gHTServiceIntervalGranularity;
824
825 // Indicates whether an AP wants to associate PSMP enabled Stations
826 tANI_U8 gHTControlledAccessOnly;
827
828 // RIFS Mode. Set if no APSD legacy devices associated
829 tANI_U8 gHTRifsMode;
830 // OBss Mode . set when we have Non HT STA is associated or with in overlap bss
831 tANI_U8 gHTObssMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700832
833 // Identifies the current Operating Mode
834 tSirMacHTOperatingMode gHTOperMode;
835
836 // Indicates if PCO is activated in the BSS
837 tANI_U8 gHTPCOActive;
838
839 //
840 // If PCO is active, indicates which PCO phase to use
841 // 0 - switch to 20 MHz phase
842 // 1 - switch to 40 MHz phase
843 //
844 tANI_U8 gHTPCOPhase;
845
846 //
847 // Used only in beacons. For PR, this is set to 0
848 // 0 - Primary beacon
849 // 1 - Secondary beacon
850 //
851 tANI_U8 gHTSecondaryBeacon;
852
853 //
854 // Dual CTS Protection
855 // 0 - Use RTS/CTS
856 // 1 - Dual CTS Protection is used
857 //
858 tANI_U8 gHTDualCTSProtection;
859
860 //
861 // Identifies a single STBC MCS that shall ne used for
862 // STBC control frames and STBC beacons
863 //
864 tANI_U8 gHTSTBCBasicMCS;
865
866 tANI_U8 gHTNonGFDevicesPresent;
867
868 tANI_U8 gAddBA_Declined; // Flag to Decline the BAR if the particular bit (0-7) is being set
869
870 //////////////////////////////// HT RELATED //////////////////////////////////////////
871
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800872#ifdef FEATURE_WLAN_TDLS
873 tANI_U8 gLimAddStaTdls ;
874 tANI_U8 gLimTdlsLinkMode ;
875 //////////////////////////////// TDLS RELATED //////////////////////////////////////////
876#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700877
878 // wsc info required to form the wsc IE
879 tLimWscIeInfo wscIeInfo;
880 tpPESession gpSession ; //Pointer to session table
881 /*
882 * sessionID and transactionID from SME is stored here for those messages, for which
883 * there is no session context in PE, e.g. Scan related messages.
884 **/
885 tANI_U8 gSmeSessionId;
886 tANI_U16 gTransactionId;
887
Jeff Johnsone7245742012-09-05 17:12:55 -0700888#ifdef FEATURE_OEM_DATA_SUPPORT
889tLimMlmOemDataReq *gpLimMlmOemDataReq;
890tLimMlmOemDataRsp *gpLimMlmOemDataRsp;
891#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700892
Jeff Johnson295189b2012-06-20 16:38:30 -0700893 tSirRemainOnChnReq *gpLimRemainOnChanReq; //hold remain on chan request in this buf
894 vos_list_t gLimMgmtFrameRegistratinQueue;
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800895 tANI_U32 mgmtFrameSessionId;
Madan Mohan Koyyalamudi70bb4cb2012-10-18 19:31:25 -0700896 tSirBackgroundScanMode gLimBackgroundScanMode;
Madan Mohan Koyyalamudi61bc5662012-11-02 14:33:10 -0700897
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800898#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudi61bc5662012-11-02 14:33:10 -0700899 tpPESession pSessionEntry;
900 tANI_U8 reAssocRetryAttempt;
901#endif
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -0800902 tLimDisassocDeauthCnfReq limDisassocDeauthCnfReq;
Leela Venkata Kiran Kumar Reddy Chirala2247e962013-03-22 19:21:10 -0700903 tANI_U8 deferredMsgCnt;
Gopichand Nakkalad492d202013-05-10 02:50:47 +0530904 tSirDFSChannelList dfschannelList;
Venkata Prathyusha Kuntupalli22ba5982013-04-24 13:09:20 -0700905 tANI_U8 deauthMsgCnt;
Ravi Joshi0fc681b2013-09-11 16:46:07 -0700906 tANI_U8 gLimIbssStaLimit;
Praveen Kumar Sirisilla7ea8dc92013-12-22 16:35:05 -0800907 tANI_U8 probeCounter;
908 tANI_U8 maxProbe;
Agarwal Ashishb4ce9922014-11-04 18:40:38 +0530909 tANI_U8 retryPacketCnt;
Rashmi Ramannad3a03bf2013-12-31 18:33:24 +0530910
911 // Flag to debug remain on channel
912 tANI_BOOLEAN gDebugP2pRemainOnChannel;
913 /* Sequence number to keep track of
914 * start and end of remain on channel
915 * debug marker frame.
916 */
917 tANI_U32 remOnChnSeqNum;
Ganesh Kondabattini10e67352015-03-16 17:41:57 +0530918 tANI_U32 txBdToken;
Pradeep Reddy POTTETI31505892015-04-16 16:47:54 +0530919 tANI_U32 EnableTdls2040BSSCoexIE;
Sreelakshmi Konamki60ccfb32016-07-08 12:53:12 +0530920 tLimStaBAInfo staBaInfo[WLAN_MAX_STA_COUNT];
Jeff Johnson295189b2012-06-20 16:38:30 -0700921} tAniSirLim, *tpAniSirLim;
922
Jeff Johnson295189b2012-06-20 16:38:30 -0700923typedef struct sLimMgmtFrameRegistration
924{
925 vos_list_node_t node; // MUST be first element
926 tANI_U16 frameType;
927 tANI_U16 matchLen;
928 tANI_U16 sessionId;
929 tANI_U8 matchData[1];
930} tLimMgmtFrameRegistration, *tpLimMgmtFrameRegistration;
Jeff Johnson295189b2012-06-20 16:38:30 -0700931
932#if defined WLAN_FEATURE_VOWIFI
933typedef struct sRrmContext
934{
935 tRrmSMEContext rrmSmeContext;
936 tRrmPEContext rrmPEContext;
937}tRrmContext, *tpRrmContext;
938#endif
939
940#if defined WLAN_FEATURE_VOWIFI_11R
941typedef struct sFTContext
942{
943 tftSMEContext ftSmeContext;
944 tftPEContext ftPEContext;
945} tftContext, *tpFTContext;
946#endif
947
Jeff Johnson295189b2012-06-20 16:38:30 -0700948//Check if this definition can actually move here even for Volans. In that case
949//this featurization can be removed.
950/** ------------------------------------------------------------------------- *
951
952 \typedef tDriverType
953
954 \brief Indicate the driver type to the mac, and based on this do
955 appropriate initialization.
956
957 -------------------------------------------------------------------------- */
958
959typedef enum
960{
961 eDRIVER_TYPE_PRODUCTION = 0,
962 eDRIVER_TYPE_MFG = 1,
963 eDRIVER_TYPE_DVT = 2
964} tDriverType;
965
966/** ------------------------------------------------------------------------- *
967
968 \typedef tMacOpenParameters
969
970 \brief Parameters needed for Enumeration of all status codes returned by the higher level
971 interface functions.
972
973 -------------------------------------------------------------------------- */
974
975typedef struct sMacOpenParameters
976{
977 tANI_U16 maxStation;
978 tANI_U16 maxBssId;
979 tANI_U32 frameTransRequired;
980 tDriverType driverType;
981} tMacOpenParameters;
982
Jeff Johnson295189b2012-06-20 16:38:30 -0700983typedef struct sHalMacStartParameters
984{
985 // parametes for the Firmware
986 //tHalFirmwareParameters FW;
987 tDriverType driverType;
988
989} tHalMacStartParameters;
Jeff Johnson295189b2012-06-20 16:38:30 -0700990
Sushant Kaushik9e923872015-04-02 17:09:31 +0530991typedef enum
992{
993 LIM_AUTH_ACK_NOT_RCD,
994 LIM_AUTH_ACK_RCD_SUCCESS,
995 LIM_AUTH_ACK_RCD_FAILURE,
996} tAuthAckStatus;
997
Jeff Johnson295189b2012-06-20 16:38:30 -0700998// -------------------------------------------------------------------
999/// MAC Sirius parameter structure
1000typedef struct sAniSirGlobal
1001
1002{
1003 tDriverType gDriverType;
Jeff Johnson295189b2012-06-20 16:38:30 -07001004
1005 // we should be able to save this hddHandle in here and deprecate
1006 // the pAdapter. For now, compiles are a problem because there
1007 // are dependencides on the header files that are not handling the
1008 // compiler very gracefully.
1009// tHddHandle hHdd; // Handle to the HDD.
1010 //void *hHdd;
1011 void *pAdapter; // deprecate this pAdapter pointer eventually...
1012 // all interfaces to the HDD should pass hHdd, which
1013 // is stored in this struct above.....
1014 tSirMbMsg* pResetMsg;
1015 tAniSirCfg cfg;
1016 tAniSirLim lim;
Jeff Johnson295189b2012-06-20 16:38:30 -07001017 tAniSirPmm pmm;
1018 tAniSirSch sch;
1019 tAniSirSys sys;
1020 tAniSirUtils utils;
Jeff Johnson295189b2012-06-20 16:38:30 -07001021 // PAL/HDD handle
1022 tHddHandle hHdd;
1023
1024#ifdef ANI_DVT_DEBUG
1025 tAniSirDvt dvt;
1026#endif
1027
1028 tSmeStruct sme;
1029 tCsrScanStruct scan;
1030 tCsrRoamStruct roam;
1031
Jeff Johnsone7245742012-09-05 17:12:55 -07001032#ifdef FEATURE_OEM_DATA_SUPPORT
1033 tOemDataStruct oemData;
1034#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001035 tPmcInfo pmc;
1036 tSmeBtcInfo btc;
Jeff Johnson295189b2012-06-20 16:38:30 -07001037
1038 tCcm ccm;
1039
1040#if defined WLAN_FEATURE_VOWIFI
1041 tRrmContext rrm;
1042#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001043#ifdef WLAN_FEATURE_CONCURRENT_P2P
1044 tp2pContext p2pContext[MAX_NO_OF_P2P_SESSIONS];
1045#else
1046 tp2pContext p2pContext;
1047#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001048
1049#if defined WLAN_FEATURE_VOWIFI_11R
1050 tftContext ft;
1051#endif
1052
1053 tANI_U32 gCurrentLogSize;
1054 tANI_U32 menuCurrent;
1055 /* logDump specific */
1056 tANI_U32 dumpTablecurrentId;
1057 /* Instead of static allocation I will dyanamically allocate memory for dumpTableEntry
1058 Thinking of using linkedlist */
1059 tDumpModuleEntry *dumpTableEntry[MAX_DUMP_TABLE_ENTRY];
Gopichand Nakkalaccd3a382013-03-19 13:56:10 -07001060#ifdef FEATURE_WLAN_TDLS
1061 v_BOOL_t isTdlsPowerSaveProhibited;
1062#endif
Gopichand Nakkala86e42662013-06-11 17:44:11 +05301063 tANI_U8 fScanOffload;
Abhishek Singh00b71972016-01-07 10:51:04 +05301064#ifdef WLAN_FEATURE_RMC
1065 tLimRmcContext rmcContext;
1066#endif /* WLAN_FEATURE_RMC */
krunal sonie9002db2013-11-25 14:24:17 -08001067 tANI_U8 isCoalesingInIBSSAllowed;
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -08001068 tANI_U32 fEnableDebugLog;
Rashmi Ramanna68b309c2014-05-20 11:52:22 +05301069 tANI_U32 fDeferIMPSTime;
1070 tANI_BOOLEAN deferImps;
Abhishek Singh6d5d29c2014-07-03 14:25:22 +05301071
1072#ifdef WLAN_FEATURE_11AC
1073 /* Alow Mu BFormee session only if MU BF session doesnt exist.
1074 */
1075 v_BOOL_t isMuBfsessionexist;
1076#endif
1077
c_hpothu3ba2a512014-08-06 14:02:54 +05301078 v_BOOL_t isCoexScoIndSet;
Ganesh Kondabattini8f6e3b32014-08-25 16:07:54 +05301079 v_U8_t miracast_mode;
Chandrasekaran, Manishekar5cb0acd2014-12-23 20:06:52 +05301080 v_U8_t fBtcEnableIndTimerVal;
Girish Gowli1c2fc802015-01-19 16:18:07 +05301081 v_U8_t roamDelayStatsEnabled;
Abhishek Singh01c73d12015-03-12 15:13:44 +05301082 tANI_BOOLEAN miracastVendorConfig;
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +05301083 v_BOOL_t fActiveScanOnDFSChannels;
Sushant Kaushik9e923872015-04-02 17:09:31 +05301084 tAuthAckStatus authAckStatus;
Abhishek Singh7d624e12015-11-30 14:29:27 +05301085 sir_mgmt_frame_ind_callback mgmt_frame_ind_cb;
Kapil Gupta04ab1992016-06-26 13:36:51 +05301086#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1087 v_U8_t PERroamCandidatesCnt;
1088 tSirCandidateChanInfo candidateChannelInfo[SIR_PER_ROAM_MAX_CANDIDATE_CNT];
1089 tSirRoamAPInfo previousRoamApInfo[SIR_PER_ROAM_MAX_CANDIDATE_CNT];
1090 v_U32_t PERroamTimeout;
1091 v_U32_t currentBssScore;
1092#endif
Agrawal Ashish17ef5082016-10-17 18:33:21 +05301093#ifdef SAP_AUTH_OFFLOAD
1094 bool sap_auth_offload;
1095 uint32_t sap_auth_offload_sec_type;
1096#endif /* SAP_AUTH_OFFLOAD */
Aggarwal, Nishank2dbbd3d2017-01-05 15:32:47 +05301097 bool max_power_cmd_pending;
Jeff Johnson295189b2012-06-20 16:38:30 -07001098} tAniSirGlobal;
1099
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001100#ifdef FEATURE_WLAN_TDLS
Jeff Johnson295189b2012-06-20 16:38:30 -07001101
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001102#define RFC1042_HDR_LENGTH (6)
1103#define GET_BE16(x) ((tANI_U16) (((x)[0] << 8) | (x)[1]))
1104#define ETH_TYPE_89_0d (0x890d)
1105#define ETH_TYPE_LEN (2)
1106#define PAYLOAD_TYPE_TDLS_SIZE (1)
1107#define PAYLOAD_TYPE_TDLS (2)
1108
1109#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001110
1111#endif /* _ANIGLOBAL_H */
1112