blob: 87153886c174748d2b67fa16eb045bd1171d8ec0 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Rajeev Kumar Sirasanagandla2bb30b82019-01-07 22:30:16 +05302 * Copyright (c) 2012-2014, 2017-2019 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
Jeff Johnson295189b2012-06-20 16:38:30 -070047#include "halTypes.h"
48#include "sirCommon.h"
49#include "aniSystemDefs.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070050#include "sysDef.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070051#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
Jeff Johnson295189b2012-06-20 16:38:30 -070060
Jeff Johnson295189b2012-06-20 16:38:30 -070061#include "wlan_qct_hal.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070062
Jeff Johnson295189b2012-06-20 16:38:30 -070063#include "pmc.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070064
65#include "csrApi.h"
66#ifdef WLAN_FEATURE_VOWIFI_11R
67#include "sme_FTApi.h"
68#endif
69#include "csrSupport.h"
70#include "smeInternal.h"
71#include "ccmApi.h"
72#include "btcApi.h"
73#include "csrInternal.h"
74
Jeff Johnsone7245742012-09-05 17:12:55 -070075#ifdef FEATURE_OEM_DATA_SUPPORT
76#include "oemDataInternal.h"
77#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070078
79#if defined WLAN_FEATURE_VOWIFI
80#include "smeRrmInternal.h"
81#include "rrmGlobal.h"
82#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -080083#if defined(FEATURE_WLAN_ESE) && !defined(FEATURE_WLAN_ESE_UPLOAD)
84#include "eseApi.h"
85#include "eseGlobal.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070086#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070087#include "p2p_Api.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070088
Abhishek Singh00b71972016-01-07 10:51:04 +053089#include "limRMC.h"
90
Jeff Johnson295189b2012-06-20 16:38:30 -070091#if defined WLAN_FEATURE_VOWIFI_11R
92#include <limFTDefs.h>
93#endif
94
95
96#ifdef ANI_DVT_DEBUG
97#include "dvtModule.h"
98#endif
99
100// New HAL API interface defs.
101#include "logDump.h"
102
Jeff Johnson295189b2012-06-20 16:38:30 -0700103//Check if this definition can actually move here from halInternal.h even for Volans. In that case
104//this featurization can be removed.
105#define PMAC_STRUCT( _hHal ) ( (tpAniSirGlobal)_hHal )
Jeff Johnson295189b2012-06-20 16:38:30 -0700106
107#define ANI_DRIVER_TYPE(pMac) (((tpAniSirGlobal)(pMac))->gDriverType)
108// -------------------------------------------------------------------
109// Bss Qos Caps bit map definition
110#define LIM_BSS_CAPS_OFFSET_HCF 0
111#define LIM_BSS_CAPS_OFFSET_WME 1
112#define LIM_BSS_CAPS_OFFSET_WSM 2
113
114#define LIM_BSS_CAPS_HCF (1 << LIM_BSS_CAPS_OFFSET_HCF)
115#define LIM_BSS_CAPS_WME (1 << LIM_BSS_CAPS_OFFSET_WME)
116#define LIM_BSS_CAPS_WSM (1 << LIM_BSS_CAPS_OFFSET_WSM)
117
118// cap should be one of HCF/WME/WSM
119#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 -0800120#define LIM_BSS_CAPS_SET(cap, val) ((val) |= (LIM_BSS_CAPS_ ## cap ))
121#define LIM_BSS_CAPS_CLR(cap, val) ((val) &= (~ (LIM_BSS_CAPS_ ## cap)))
Jeff Johnson295189b2012-06-20 16:38:30 -0700122
123// 40 beacons per heart beat interval is the default + 1 to count the rest
124#define MAX_NO_BEACONS_PER_HEART_BEAT_INTERVAL 41
125
126/* max number of legacy bssid we can store during scan on one channel */
127#define MAX_NUM_LEGACY_BSSID_PER_CHANNEL 10
128
Jeff Johnson295189b2012-06-20 16:38:30 -0700129#define P2P_WILDCARD_SSID "DIRECT-" //TODO Put it in proper place;
130#define P2P_WILDCARD_SSID_LEN 7
131
132#ifdef WLAN_FEATURE_CONCURRENT_P2P
133#define MAX_NO_OF_P2P_SESSIONS 5
134#endif //WLAN_FEATURE_CONCURRENT_P2P
Jeff Johnson295189b2012-06-20 16:38:30 -0700135
Srinivas Girigowdade697412013-02-14 16:31:48 -0800136#define SPACE_ASCII_VALUE 32
137
Rajeev79dbe4c2013-10-05 11:03:42 +0530138#ifdef FEATURE_WLAN_BATCH_SCAN
139#define EQUALS_TO_ASCII_VALUE (61)
140#endif
141
Jeff Johnson295189b2012-06-20 16:38:30 -0700142// -------------------------------------------------------------------
143// Change channel generic scheme
144typedef void (*CHANGE_CHANNEL_CALLBACK)(tpAniSirGlobal pMac, eHalStatus status, tANI_U32 *data,
145 tpPESession psessionEntry);
146
147/// LIM global definitions
148typedef struct sAniSirLimIbss
149{
150 void *pHdr;
151 void *pBeacon;
152} tAniSirLimIbss;
153
154typedef struct sDialogueToken
155{
156 //bytes 0-3
157 tANI_U16 assocId;
158 tANI_U8 token;
159 tANI_U8 rsvd1;
160 //Bytes 4-7
161 tANI_U16 tid;
162 tANI_U8 rsvd2[2];
163
164 struct sDialogueToken* next;
165}tDialogueToken, *tpDialogueToken;
166
167typedef struct sLimTimers
168{
169 //TIMERS IN LIM ARE NOT SUPPOSED TO BE ZEROED OUT DURING RESET.
170 //DURING limInitialize DONOT ZERO THEM OUT.
171
172//STA SPECIFIC TIMERS
Jeff Johnson295189b2012-06-20 16:38:30 -0700173 // Periodic background scan timer
174 TX_TIMER gLimBackgroundScanTimer;
Jeff Johnson295189b2012-06-20 16:38:30 -0700175
176 TX_TIMER gLimPreAuthClnupTimer;
177 //TX_TIMER gLimAuthResponseTimer[HAL_NUM_STA];
178
179 // Association related timers
180 TX_TIMER gLimAssocFailureTimer;
181 TX_TIMER gLimReassocFailureTimer;
182
183
184 /// Heartbeat timer on STA
185 TX_TIMER gLimHeartBeatTimer;
186
187 /// Wait for Probe after Heartbeat failure timer on STA
188 TX_TIMER gLimProbeAfterHBTimer;
189
190
191 // Authentication related timers
192 TX_TIMER gLimAuthFailureTimer;
193
194 // Join Failure timeout on STA
195 TX_TIMER gLimJoinFailureTimer;
196
197 // Keepalive timer
198 TX_TIMER gLimKeepaliveTimer;
199
200 // Scan related timers
201 TX_TIMER gLimMinChannelTimer;
202 TX_TIMER gLimMaxChannelTimer;
203 TX_TIMER gLimPeriodicProbeReqTimer;
204
205 // CNF_WAIT timer
206 TX_TIMER *gpLimCnfWaitTimer;
207
Jeff Johnson295189b2012-06-20 16:38:30 -0700208 TX_TIMER gLimAddtsRspTimer; // max wait for a response
209
210 // Update OLBC Cache Timer
211 TX_TIMER gLimUpdateOlbcCacheTimer;
212
213 TX_TIMER gLimChannelSwitchTimer;
214 // This TIMER is started on the STA, as indicated by the
215 // AP in its Quiet BSS IE, for the specified interval
216 TX_TIMER gLimQuietTimer;
217 // This TIMER is started on the AP, prior to the AP going
218 // into LEARN mode
219 // This TIMER is started on the STA, for the specified
220 // quiet duration
221 TX_TIMER gLimQuietBssTimer;
222
223#ifdef WLAN_FEATURE_VOWIFI_11R
224 TX_TIMER gLimFTPreAuthRspTimer;
225#endif
226
Padma, Santhosh Kumar67f479b2016-12-28 15:43:42 +0530227#ifdef WLAN_FEATURE_LFR_MBB
228 TX_TIMER glim_pre_auth_mbb_rsp_timer;
Padma, Santhosh Kumarf4966dc2017-01-03 18:56:00 +0530229 TX_TIMER glim_reassoc_mbb_rsp_timer;
Padma, Santhosh Kumar67f479b2016-12-28 15:43:42 +0530230#endif
231
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800232#ifdef FEATURE_WLAN_ESE
233 TX_TIMER gLimEseTsmTimer;
Jeff Johnson295189b2012-06-20 16:38:30 -0700234#endif
Madan Mohan Koyyalamudi9aff9ff2012-11-29 11:27:25 -0800235 TX_TIMER gLimPeriodicJoinProbeReqTimer;
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -0800236 TX_TIMER gLimDisassocAckTimer;
237 TX_TIMER gLimDeauthAckTimer;
Sushant Kaushik9e923872015-04-02 17:09:31 +0530238 TX_TIMER gLimPeriodicAuthRetryTimer;
Viral Modid86bde22012-12-10 13:09:21 -0800239 // This timer is started when single shot NOA insert msg is sent to FW for scan in P2P GO mode
240 TX_TIMER gLimP2pSingleShotNoaInsertTimer;
Gopichand Nakkalad492d202013-05-10 02:50:47 +0530241 /* This timer is used to convert active channel to
242 * passive channel when there is no beacon
243 * for a period of time on a particular DFS channel
244 */
245 TX_TIMER gLimActiveToPassiveChannelTimer;
Abhishek Singh550aa8c2017-10-30 17:34:53 +0530246 TX_TIMER g_lim_ap_ecsa_timer;
Abhinav Kumar626f8652019-08-05 16:20:39 +0530247 /* SAE authentication related timer */
248 TX_TIMER sae_auth_timer;
Jeff Johnson295189b2012-06-20 16:38:30 -0700249//********************TIMER SECTION ENDS**************************************************
250// ALL THE FIELDS BELOW THIS CAN BE ZEROED OUT in limInitialize
251//****************************************************************************************
252
253}tLimTimers;
254
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -0800255typedef struct {
256 void *pMlmDisassocReq;
257 void *pMlmDeauthReq;
258}tLimDisassocDeauthCnfReq;
Jeff Johnson295189b2012-06-20 16:38:30 -0700259
Sreelakshmi Konamki60ccfb32016-07-08 12:53:12 +0530260typedef struct {
261 tANI_U32 failed_count[MAX_TIDS];
262 v_TIME_t failed_timestamp[MAX_TIDS];
263} tLimStaBAInfo;
264
Jeff Johnson295189b2012-06-20 16:38:30 -0700265typedef struct sAniSirLim
266{
267 ////////////////////////////////////// TIMER RELATED START ///////////////////////////////////////////
268
269 tLimTimers limTimers;
270 /// Flag to track if LIM timers are created or not
271 tANI_U32 gLimTimersCreated;
272
273
274 ////////////////////////////////////// TIMER RELATED END ///////////////////////////////////////////
275
276 ////////////////////////////////////// SCAN/LEARN RELATED START ///////////////////////////////////////////
277 /**
278 * This flag when set, will use scan mode instead of
279 * Learn mode on BP/AP. By default this flag is set
280 * to true until HIF getting stuck in 0x800 state is
281 * debugged.
282 */
283 tANI_U32 gLimUseScanModeForLearnMode;
284
285 /**
286 * This is useful for modules other than LIM
287 * to see if system is in scan/learn mode or not
288 */
289 tANI_U32 gLimSystemInScanLearnMode;
290
291 // Scan related globals on STA
292 tANI_U8 gLimReturnAfterFirstMatch;
293 tANI_U8 gLim24Band11dScanDone;
294 tANI_U8 gLim50Band11dScanDone;
295 tANI_U8 gLimReturnUniqueResults;
296
297 // Background Scan related globals on STA
298 tANI_U32 gLimNumOfBackgroundScanSuccess;
299 tANI_U32 gLimNumOfConsecutiveBkgndScanFailure;
300 tANI_U32 gLimNumOfForcedBkgndScan;
301 tANI_U8 gLimBackgroundScanDisable; //based on BG timer
302 tANI_U8 gLimForceBackgroundScanDisable; //debug control flag
303 tANI_U8 gLimBackgroundScanTerminate; //controlled by SME
304 tANI_U8 gLimReportBackgroundScanResults;//controlled by SME
305
306 /// Place holder for current channel ID
307 /// being scanned
308 tANI_U32 gLimCurrentScanChannelId;
309
310 // Hold onto SCAN criteria
Viral Modid440e682013-03-06 02:25:31 -0800311 /* The below is used in P2P GO case when we need to defer processing SME Req
312 * to LIM and insert NOA first and process SME req once SNOA is started
313 */
314 tANI_U16 gDeferMsgTypeForNOA;
315 tANI_U32 *gpDefdSmeMsgForNOA;
316
Jeff Johnson295189b2012-06-20 16:38:30 -0700317 tLimMlmScanReq *gpLimMlmScanReq;
318
319 /// This indicates total length of 'matched' scan results
320 tANI_U16 gLimMlmScanResultLength;
321
322 /// This indicates total length of 'cached' scan results
323 tANI_U16 gLimSmeScanResultLength;
324
325 /**
326 * Hash table definition for storing SCAN results
327 * This is the placed holder for 'cached' scan results
328 */
329 tLimScanResultNode
330 *gLimCachedScanHashTable[LIM_MAX_NUM_OF_SCAN_RESULTS];
331
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700332 /// This indicates total length of 'matched' scan results
333 tANI_U16 gLimMlmLfrScanResultLength;
334
335 /// This indicates total length of 'cached' scan results
336 tANI_U16 gLimSmeLfrScanResultLength;
337
338 /**
339 * Hash table definition for storing LFR SCAN results
340 * This is the placed holder for roaming candidates as forwarded
341 * by FW
342 */
343 tLimScanResultNode
344 *gLimCachedLfrScanHashTable[LIM_MAX_NUM_OF_SCAN_RESULTS];
345
Jeff Johnson295189b2012-06-20 16:38:30 -0700346 /// Place holder for current channel ID
347 /// being scanned during background scanning
348 tANI_U32 gLimBackgroundScanChannelId;
349 /// flag to indicate that bacground scan timer has been started
350 tANI_U8 gLimBackgroundScanStarted;
351
352 /* Used to store the list of legacy bss sta detected during scan on one channel */
353 tANI_U16 gLimRestoreCBNumScanInterval;
354 tANI_U16 gLimRestoreCBCount;
355 tSirMacAddr gLimLegacyBssidList[MAX_NUM_LEGACY_BSSID_PER_CHANNEL];
Jeff Johnson295189b2012-06-20 16:38:30 -0700356
357 //
358 // If this flag is 1,
359 // then, LIM will "try and trigger" a background
360 // scan whenever it receives a Quiet BSS IE
361 //
362 // If this flag is 0,
363 // then, LIM will simply shut-off Tx/Rx whenever it
364 // receives a Quiet BSS IE.
365 // This is the default behavior when a Quiet BSS IE
366 // is received and 11H is enabled
367 //
368 tANI_U32 gLimTriggerBackgroundScanDuringQuietBss;
369
Jeff Johnson295189b2012-06-20 16:38:30 -0700370
Jeff Johnson295189b2012-06-20 16:38:30 -0700371 // This variable store the total duration to do scan
372 tANI_U32 gTotalScanDuration;
Jeff Johnsone7245742012-09-05 17:12:55 -0700373 tANI_U32 p2pRemOnChanTimeStamp;
Jeff Johnson295189b2012-06-20 16:38:30 -0700374
375 // abort scan is used to abort an on-going scan
376 tANI_U8 abortScan;
377 tLimScanChnInfo scanChnInfo;
378
379 ////////////////////////////////////// SCAN/LEARN RELATED START ///////////////////////////////////////////
380 tSirMacAddr gSelfMacAddr; //added for BT-AMP Support
Siddharth Bhal4f3187c2014-10-09 21:38:08 +0530381 tSirMacAddr spoofMacAddr; //added for Mac Addr Spoofing support
382 tANI_U8 isSpoofingEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700383
Rajeev Kumar Sirasanagandla2bb30b82019-01-07 22:30:16 +0530384 /*
385 * @spoof_mac_oui = true when VENDOR_SUBCMD_MAC_OUI is invoked for
386 * mac spoofing.
387 */
388 bool spoof_mac_oui;
389
Jeff Johnson295189b2012-06-20 16:38:30 -0700390 ////////////////////////////////////////// BSS RELATED END ///////////////////////////////////////////
391 // Place holder for StartBssReq message
392 // received by SME state machine
393
Jeff Johnson62c27982013-02-27 17:53:55 -0800394 tANI_U8 gLimCurrentBssUapsd;
Jeff Johnson295189b2012-06-20 16:38:30 -0700395
Jeff Johnson62c27982013-02-27 17:53:55 -0800396 /* This is used for testing sta legacy bss detect feature */
397 tANI_U8 gLimForceNoPropIE;
Jeff Johnson295189b2012-06-20 16:38:30 -0700398
399 //
400 // Store the BSS Index returned by HAL during
401 // WDA_ADD_BSS_RSP here.
402 //
403 // For now:
404 // This will be used during WDA_SET_BSSKEY_REQ in
405 // order to set the GTK
406 // Later:
407 // There could be other interfaces needing this info
408 //
409
410 //
411 // Due to the asynchronous nature of the interface
412 // between PE <-> HAL, some transient information
413 // like this needs to be cached.
414 // This is cached upon receipt of eWNI_SME_SETCONTEXT_REQ.
415 // This is released while posting LIM_MLM_SETKEYS_CNF
416 //
417 void* gpLimMlmSetKeysReq;
418 void* gpLimMlmRemoveKeyReq;
419
420 //On STA: staid for self generated by HAL and sent as response to 'ADD STA' msg.
421 //On AP: staid corresponding to BSS generated by HAL and sent as response to 'ADD BSS' msg.
422 // tANI_U16 gLimStaid; // TO SUPPORT BT-AMP
423
424 ////////////////////////////////////////// BSS RELATED END ///////////////////////////////////////////
425
426 ////////////////////////////////////////// IBSS RELATED START ///////////////////////////////////////////
427 // This indicates whether we've a partner
428 // that is also transmitting Beacon frame
429 // in IBSS
430 //tANI_U8 gLimIbssActive; oct1 review
431
432 //This indicates whether this STA coalesced and adapter to peer's capabilities or not.
433 tANI_U8 gLimIbssCoalescingHappened;
434
435 /// Definition for storing IBSS peers BSS description
436 tLimIbssPeerNode *gLimIbssPeerList;
437 tANI_U32 gLimNumIbssPeers;
Sushant Kaushike06bd872015-03-12 16:17:48 +0530438 tANI_U32 gLimIbssRetryCnt;
Jeff Johnson295189b2012-06-20 16:38:30 -0700439
440 // ibss info - params for which ibss to join while coalescing
441 tAniSirLimIbss ibssInfo;
442
443 ////////////////////////////////////////// IBSS RELATED END ///////////////////////////////////////////
444
445 ////////////////////////////////////////// STATS/COUNTER RELATED START ///////////////////////////////////////////
446
447 tANI_U16 maxStation;
448 tANI_U16 maxBssId;
449
450 tANI_U32 gLimNumBeaconsRcvd;
451 tANI_U32 gLimNumBeaconsIgnored;
452
453 tANI_U32 gLimNumDeferredMsgs;
454
455 /// Variable to keep track of number of currently associated STAs
Jeff Johnson295189b2012-06-20 16:38:30 -0700456 tANI_U16 gLimNumOfAniSTAs; // count of ANI peers
457 tANI_U16 gLimAssocStaLimit;
458
459 /// This indicates number of RXed Beacons during HB period
460 // tANI_U8 gLimRxedBeaconCntDuringHB;
461
462 // Heart-Beat interval value
463 tANI_U32 gLimHeartBeatCount;
Abhishek Singhde51a412014-05-20 19:17:26 +0530464 tSirMacAddr gLimHeartBeatApMac[2];
465 tANI_U8 gLimHeartBeatApMacIndex;
Jeff Johnson295189b2012-06-20 16:38:30 -0700466
467 // Statistics to keep track of no. beacons rcvd in heart beat interval
468 tANI_U16 gLimHeartBeatBeaconStats[MAX_NO_BEACONS_PER_HEART_BEAT_INTERVAL];
469
470#ifdef WLAN_DEBUG
471 // Debug counters
472 tANI_U32 numTot, numBbt, numProtErr, numLearn, numLearnIgnore;
473 tANI_U32 numSme, numMAC[4][16];
474
475 // Debug counter to track number of Assoc Req frame drops
476 // when received in pStaDs->mlmState other than LINK_ESTABLISED
477 tANI_U32 gLimNumAssocReqDropInvldState;
478 // counters to track rejection of Assoc Req due to Admission Control
479 tANI_U32 gLimNumAssocReqDropACRejectTS;
480 tANI_U32 gLimNumAssocReqDropACRejectSta;
481 // Debug counter to track number of Reassoc Req frame drops
482 // when received in pStaDs->mlmState other than LINK_ESTABLISED
483 tANI_U32 gLimNumReassocReqDropInvldState;
484 // Debug counter to track number of Hash Miss event that
485 // will not cause a sending of de-auth/de-associate frame
486 tANI_U32 gLimNumHashMissIgnored;
487
488 // Debug counter to track number of Beacon frames
489 // received in unexpected state
490 tANI_U32 gLimUnexpBcnCnt;
491
492 // Debug counter to track number of Beacon frames
493 // received in wt-join-state that do have SSID mismatch
494 tANI_U32 gLimBcnSSIDMismatchCnt;
495
496 // Debug counter to track number of Link establishments on STA/BP
497 tANI_U32 gLimNumLinkEsts;
498
499 // Debug counter to track number of Rx cleanup
500 tANI_U32 gLimNumRxCleanup;
501
502 // Debug counter to track different parse problem
503 tANI_U32 gLim11bStaAssocRejectCount;
504
505#endif
506
507 //Time stamp of the last beacon received from the BSS to which STA is connected.
508 tANI_U64 gLastBeaconTimeStamp;
509 //RX Beacon count for the current BSS to which STA is connected.
510 tANI_U32 gCurrentBssBeaconCnt;
511 tANI_U8 gLastBeaconDtimCount;
512 tANI_U8 gLastBeaconDtimPeriod;
513
514
515 ////////////////////////////////////////// STATS/COUNTER RELATED END ///////////////////////////////////////////
516
517
518 ////////////////////////////////////////// STATES RELATED START ///////////////////////////////////////////
519 // Counts Heartbeat failures
520 tANI_U8 gLimHBfailureCntInLinkEstState;
521 tANI_U8 gLimProbeFailureAfterHBfailedCnt;
522 tANI_U8 gLimHBfailureCntInOtherStates;
523
524 /**
525 * This variable indicates whether LIM module need to
526 * send response to host. Used to identify whether a request
527 * is generated internally within LIM module or by host
528 */
529 tANI_U8 gLimRspReqd;
530
531 /// Previous SME State
532 tLimSmeStates gLimPrevSmeState;
533
534 /// MLM State visible across all Sirius modules
535 tLimMlmStates gLimMlmState;
536
537 /// Previous MLM State
538 tLimMlmStates gLimPrevMlmState;
539
540#ifdef GEN4_SCAN
541 // LIM to HAL SCAN Management Message Interface states
542 tLimLimHalScanState gLimHalScanState;
543//WLAN_SUSPEND_LINK Related
544 SUSPEND_RESUME_LINK_CALLBACK gpLimSuspendCallback;
545 tANI_U32 *gpLimSuspendData;
546 SUSPEND_RESUME_LINK_CALLBACK gpLimResumeCallback;
547 tANI_U32 *gpLimResumeData;
548//end WLAN_SUSPEND_LINK Related
549 tANI_U8 fScanDisabled;
550 //Can be set to invalid channel. If it is invalid, HAL
551 //should move to previous valid channel or stay in the
Jeff Johnsone7245742012-09-05 17:12:55 -0700552 //current channel. CB state goes along with channel to resume to
553 tANI_U16 gResumeChannel;
554 ePhyChanBondState gResumePhyCbState;
Jeff Johnson295189b2012-06-20 16:38:30 -0700555#endif // GEN4_SCAN
556
557 // Change channel generic scheme
558 CHANGE_CHANNEL_CALLBACK gpchangeChannelCallback;
559 tANI_U32 *gpchangeChannelData;
560
561 /// SME State visible across all Sirius modules
562 tLimSmeStates gLimSmeState;
563 /// This indicates whether we're an AP, STA in BSS/IBSS
564 tLimSystemRole gLimSystemRole;
565
566 // Number of STAs that do not support short preamble
567 tLimNoShortParams gLimNoShortParams;
568
569 // Number of STAs that do not support short slot time
570 tLimNoShortSlotParams gLimNoShortSlotParams;
571
572
573 // OLBC parameters
574 tLimProtStaParams gLimOverlap11gParams;
575
576 tLimProtStaParams gLimOverlap11aParams;
577 tLimProtStaParams gLimOverlapHt20Params;
578 tLimProtStaParams gLimOverlapNonGfParams;
579
580 //
581 // ---------------- DPH -----------------------
582 // these used to live in DPH but are now moved here (where they belong)
583 tANI_U32 gLimPhyMode;
584 tANI_U32 propRateAdjustPeriod;
585 tANI_U32 scanStartTime; // used to measure scan time
586
Jeff Johnsone7245742012-09-05 17:12:55 -0700587 //tANI_U8 gLimBssid[6];
Jeff Johnson295189b2012-06-20 16:38:30 -0700588 tANI_U8 gLimMyMacAddr[6];
589 tANI_U8 ackPolicy;
590
591 tANI_U8 gLimQosEnabled:1; //11E
592 tANI_U8 gLimWmeEnabled:1; //WME
593 tANI_U8 gLimWsmEnabled:1; //WSM
594 tANI_U8 gLimHcfEnabled:1;
595 tANI_U8 gLim11dEnabled:1;
596 tANI_U8 gLimProbeRespDisableFlag:1; // control over probe response
597 // ---------------- DPH -----------------------
598
599 ////////////////////////////////////////// STATES RELATED END ///////////////////////////////////////////
600
601 ////////////////////////////////////////// MISC RELATED START ///////////////////////////////////////////
Jeff Johnson295189b2012-06-20 16:38:30 -0700602
603 // WDS info
604 tANI_U32 gLimNumWdsInfoInd;
605 tANI_U32 gLimNumWdsInfoSet;
606 tSirWdsInfo gLimWdsInfo;
607
608 // Deferred Queue Paramters
609 tLimDeferredMsgQParams gLimDeferredMsgQ;
610
611 // addts request if any - only one can be outstanding at any time
612 tSirAddtsReq gLimAddtsReq;
613 tANI_U8 gLimAddtsSent;
614 tANI_U8 gLimAddtsRspTimerCount;
615
616 //protection related config cache
617 tCfgProtection cfgProtection;
618
619 tANI_U8 gLimProtectionControl;
620 //RF band to determibe 2.4/5 GHZ
621
622 // alternate radio info used by STA
623 tSirAlternateRadioInfo gLimAlternateRadio;
624
625 //This flag will remain to be set except while LIM is waiting for specific response messages
626 //from HAL. e.g when LIM issues ADD_STA req it will clear this flag and when it will receive
627 //the response the flag will be set.
628 tANI_U8 gLimProcessDefdMsgs;
629
630 // UAPSD flag used on AP
631 tANI_U8 gUapsdEnable;
632
633 /* Used on STA, this is a static UAPSD mask setting
634 * derived from SME_JOIN_REQ and SME_REASSOC_REQ. If a
635 * particular AC bit is set, it means the AC is both
636 * trigger enabled and delivery enabled.
637 */
638 tANI_U8 gUapsdPerAcBitmask;
639
640 /* Used on STA, this is a dynamic UPASD mask setting
641 * derived from AddTS Rsp and DelTS frame. If a
642 * particular AC bit is set, it means AC is trigger
643 * enabled.
644 */
645 tANI_U8 gUapsdPerAcTriggerEnableMask;
646
647 /* Used on STA, dynamic UPASD mask setting
648 * derived from AddTS Rsp and DelTs frame. If
649 * a particular AC bit is set, it means AC is
650 * delivery enabled.
651 */
652 tANI_U8 gUapsdPerAcDeliveryEnableMask;
653
654 /* Used on STA for AC downgrade. This is a dynamic mask
655 * setting which keep tracks of ACs being admitted.
656 * If bit is set to 0: That partiular AC is not admitted
657 * If bit is set to 1: That particular AC is admitted
658 */
659 tANI_U8 gAcAdmitMask[SIR_MAC_DIRECTION_DIRECT];
660
661 //dialogue token List head/tail for Action frames request sent.
662 tpDialogueToken pDialogueTokenHead;
663 tpDialogueToken pDialogueTokenTail;
664
665 tLimTspecInfo tspecInfo[LIM_NUM_TSPEC_MAX];
666
667 // admission control policy information
668 tLimAdmitPolicyInfo admitPolicyInfo;
Leela V Kiran Kumar Reddy Chiralac3b9d382013-01-31 20:49:53 -0800669 vos_lock_t lkPeGlobalLock;
Leela V Kiran Kumar Reddy Chiralab1f7d342013-02-11 00:27:02 -0800670 tANI_U8 disableLDPCWithTxbfAP;
Gopichand Nakkala574f6d12013-06-27 19:38:43 +0530671#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +0530672 tANI_U8 gLimTDLSBufStaEnabled;
673 tANI_U8 gLimTDLSUapsdMask;
Naresh Jayaramf73f3762014-02-04 16:13:20 +0530674 tANI_U8 gLimTDLSOffChannelEnabled;
Pradeep Reddy POTTETIa9c80d52014-05-09 18:05:29 +0530675 // TDLS WMM Mode
676 tANI_U8 gLimTDLSWmmMode;
Gopichand Nakkala574f6d12013-06-27 19:38:43 +0530677#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700678
679
680
681 ////////////////////////////////////////// MISC RELATED END ///////////////////////////////////////////
682
683 ////////////////////////////////////////// ASSOC RELATED START ///////////////////////////////////////////
684 // Place holder for JoinReq message
685 // received by SME state machine
686 // tpSirSmeJoinReq gpLimJoinReq;
687
688 // Place holder for ReassocReq message
689 // received by SME state machine
690 //tpSirSmeReassocReq gpLimReassocReq; sep23 review
691
Jeff Johnson295189b2012-06-20 16:38:30 -0700692 // Current Authentication type used at STA
693 //tAniAuthType gLimCurrentAuthType;
694
695 // Place holder for current authentication request
696 // being handled
697 tLimMlmAuthReq *gpLimMlmAuthReq;
698
699 // Place holder for Join request that we're
700 // currently attempting
Jeff Johnsone7245742012-09-05 17:12:55 -0700701 //tLimMlmJoinReq *gpLimMlmJoinReq;
Jeff Johnson295189b2012-06-20 16:38:30 -0700702
703 // Reason code to determine the channel change context while sending
704 // WDA_CHNL_SWITCH_REQ message to HAL
705 tANI_U32 channelChangeReasonCode;
706
707 /// MAC level Pre-authentication related globals
708 tSirMacChanNum gLimPreAuthChannelNumber;
709 tAniAuthType gLimPreAuthType;
710 tSirMacAddr gLimPreAuthPeerAddr;
711 tANI_U32 gLimNumPreAuthContexts;
712 tLimPreAuthTable gLimPreAuthTimerTable;
713
714 // Placed holder to deauth reason
715 tANI_U16 gLimDeauthReasonCode;
716
717 // Place holder for Pre-authentication node list
718 struct tLimPreAuthNode * pLimPreAuthList;
719
Jeff Johnson295189b2012-06-20 16:38:30 -0700720 // Assoc or ReAssoc Response Data/Frame
721 void *gLimAssocResponseData;
722
723 //One cache for each overlap and associated case.
724 tCacheParams protStaOverlapCache[LIM_PROT_STA_OVERLAP_CACHE_SIZE];
725 tCacheParams protStaCache[LIM_PROT_STA_CACHE_SIZE];
726
727 ////////////////////////////////////////// ASSOC RELATED END ///////////////////////////////////////////
728
729
Jeff Johnson295189b2012-06-20 16:38:30 -0700730
731 //
732 // For DEBUG purposes
733 // Primarily for - TITAN BEACON workaround
734 // Symptom - TFP/PHY gets stuck
735 //
736 tANI_U32 gLimScanOverride;
737 // Holds the desired tSirScanType, as requested by SME
738 tSirScanType gLimScanOverrideSaved;
739
Jeff Johnson295189b2012-06-20 16:38:30 -0700740 //
741 // CB State protection, operated upon as follows:
742 // 1 - CB is enabled in the hardware ONLY WHEN a Titan
743 // STA associates with the AP
744 // 0 - CB is enabled/disabled based on the configuration
745 // received as per eWNI_SME_START_BSS_REQ
746 //
747 tANI_U32 gLimCBStateProtection;
748
749 // Count of TITAN STA's currently associated
750 tANI_U16 gLimTitanStaCount;
751
752 //
753 // For DEBUG purposes
754 // Primarily for - TITAN workaround
755 // Symptom - Avoid NULL data frames
756 // Applies to AP only
757 //
758 tANI_U32 gLimBlockNonTitanSta;
759 /////////////////////////// TITAN related globals //////////////////////////////////////////
760
761
762 //////////////////////////////// HT RELATED //////////////////////////////////////////
763 //
764 // The following global LIM variables maintain/manage
765 // the runtime configurations related to 802.11n
766
767 // 802.11n Station detected HT capability in Beacon Frame
768 tANI_U8 htCapabilityPresentInBeacon;
769
770 // 802.11 HT capability: Enabled or Disabled
771 tANI_U8 htCapability;
772
773
774 tANI_U8 gHTGreenfield;
775
Jeff Johnson295189b2012-06-20 16:38:30 -0700776 tANI_U8 gHTShortGI40Mhz;
777 tANI_U8 gHTShortGI20Mhz;
778
779 //Set to 0 for 3839 octets
780 //Set to 1 for 7935 octets
781 tANI_U8 gHTMaxAmsduLength;
782
783
784 // DSSS/CCK at 40 MHz: Enabled 1 or Disabled
785 tANI_U8 gHTDsssCckRate40MHzSupport;
786
787 // PSMP Support: Enabled 1 or Disabled 0
788 tANI_U8 gHTPSMPSupport;
789
790 // L-SIG TXOP Protection used only if peer support available
791 tANI_U8 gHTLsigTXOPProtection;
792
793 // MIMO Power Save
794 tSirMacHTMIMOPowerSaveState gHTMIMOPSState;
795
796 // Scan In Power Save
797 tANI_U8 gScanInPowersave;
798
799 //
800 // A-MPDU Density
801 // 000 - No restriction
802 // 001 - 1/8 usec
803 // 010 - 1/4 usec
804 // 011 - 1/2 usec
805 // 100 - 1 usec
806 // 101 - 2 usec
807 // 110 - 4 usec
808 // 111 - 8 usec
809 //
810 tANI_U8 gHTAMpduDensity;
811
812 tANI_BOOLEAN gMaxAmsduSizeEnabled;
813 // Maximum Tx/Rx A-MPDU factor
814 tANI_U8 gHTMaxRxAMpduFactor;
815
816 //
817 // Scheduled PSMP related - Service Interval Granularity
818 // 000 - 5 ms
819 // 001 - 10 ms
820 // 010 - 15 ms
821 // 011 - 20 ms
822 // 100 - 25 ms
823 // 101 - 30 ms
824 // 110 - 35 ms
825 // 111 - 40 ms
826 //
827 tANI_U8 gHTServiceIntervalGranularity;
828
829 // Indicates whether an AP wants to associate PSMP enabled Stations
830 tANI_U8 gHTControlledAccessOnly;
831
832 // RIFS Mode. Set if no APSD legacy devices associated
833 tANI_U8 gHTRifsMode;
834 // OBss Mode . set when we have Non HT STA is associated or with in overlap bss
835 tANI_U8 gHTObssMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700836
837 // Identifies the current Operating Mode
838 tSirMacHTOperatingMode gHTOperMode;
839
840 // Indicates if PCO is activated in the BSS
841 tANI_U8 gHTPCOActive;
842
843 //
844 // If PCO is active, indicates which PCO phase to use
845 // 0 - switch to 20 MHz phase
846 // 1 - switch to 40 MHz phase
847 //
848 tANI_U8 gHTPCOPhase;
849
850 //
851 // Used only in beacons. For PR, this is set to 0
852 // 0 - Primary beacon
853 // 1 - Secondary beacon
854 //
855 tANI_U8 gHTSecondaryBeacon;
856
857 //
858 // Dual CTS Protection
859 // 0 - Use RTS/CTS
860 // 1 - Dual CTS Protection is used
861 //
862 tANI_U8 gHTDualCTSProtection;
863
864 //
865 // Identifies a single STBC MCS that shall ne used for
866 // STBC control frames and STBC beacons
867 //
868 tANI_U8 gHTSTBCBasicMCS;
869
870 tANI_U8 gHTNonGFDevicesPresent;
871
872 tANI_U8 gAddBA_Declined; // Flag to Decline the BAR if the particular bit (0-7) is being set
873
874 //////////////////////////////// HT RELATED //////////////////////////////////////////
875
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800876#ifdef FEATURE_WLAN_TDLS
877 tANI_U8 gLimAddStaTdls ;
878 tANI_U8 gLimTdlsLinkMode ;
879 //////////////////////////////// TDLS RELATED //////////////////////////////////////////
880#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700881
882 // wsc info required to form the wsc IE
883 tLimWscIeInfo wscIeInfo;
884 tpPESession gpSession ; //Pointer to session table
885 /*
886 * sessionID and transactionID from SME is stored here for those messages, for which
887 * there is no session context in PE, e.g. Scan related messages.
888 **/
889 tANI_U8 gSmeSessionId;
890 tANI_U16 gTransactionId;
891
Jeff Johnsone7245742012-09-05 17:12:55 -0700892#ifdef FEATURE_OEM_DATA_SUPPORT
893tLimMlmOemDataReq *gpLimMlmOemDataReq;
894tLimMlmOemDataRsp *gpLimMlmOemDataRsp;
895#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700896
Jeff Johnson295189b2012-06-20 16:38:30 -0700897 tSirRemainOnChnReq *gpLimRemainOnChanReq; //hold remain on chan request in this buf
898 vos_list_t gLimMgmtFrameRegistratinQueue;
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800899 tANI_U32 mgmtFrameSessionId;
Madan Mohan Koyyalamudi70bb4cb2012-10-18 19:31:25 -0700900 tSirBackgroundScanMode gLimBackgroundScanMode;
Madan Mohan Koyyalamudi61bc5662012-11-02 14:33:10 -0700901
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800902#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudi61bc5662012-11-02 14:33:10 -0700903 tpPESession pSessionEntry;
904 tANI_U8 reAssocRetryAttempt;
905#endif
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -0800906 tLimDisassocDeauthCnfReq limDisassocDeauthCnfReq;
Leela Venkata Kiran Kumar Reddy Chirala2247e962013-03-22 19:21:10 -0700907 tANI_U8 deferredMsgCnt;
Gopichand Nakkalad492d202013-05-10 02:50:47 +0530908 tSirDFSChannelList dfschannelList;
Venkata Prathyusha Kuntupalli22ba5982013-04-24 13:09:20 -0700909 tANI_U8 deauthMsgCnt;
Ravi Joshi0fc681b2013-09-11 16:46:07 -0700910 tANI_U8 gLimIbssStaLimit;
Praveen Kumar Sirisilla7ea8dc92013-12-22 16:35:05 -0800911 tANI_U8 probeCounter;
912 tANI_U8 maxProbe;
Abhinav Kumarc00a7842018-06-13 16:07:31 +0530913 VOS_STATUS(*sme_msg_callback)
914 (tHalHandle hal, vos_msg_t *msg);
Agarwal Ashishb4ce9922014-11-04 18:40:38 +0530915 tANI_U8 retryPacketCnt;
Rashmi Ramannad3a03bf2013-12-31 18:33:24 +0530916
917 // Flag to debug remain on channel
918 tANI_BOOLEAN gDebugP2pRemainOnChannel;
919 /* Sequence number to keep track of
920 * start and end of remain on channel
921 * debug marker frame.
922 */
923 tANI_U32 remOnChnSeqNum;
Ganesh Kondabattini10e67352015-03-16 17:41:57 +0530924 tANI_U32 txBdToken;
Pradeep Reddy POTTETI31505892015-04-16 16:47:54 +0530925 tANI_U32 EnableTdls2040BSSCoexIE;
Sreelakshmi Konamki60ccfb32016-07-08 12:53:12 +0530926 tLimStaBAInfo staBaInfo[WLAN_MAX_STA_COUNT];
Jeff Johnson295189b2012-06-20 16:38:30 -0700927} tAniSirLim, *tpAniSirLim;
928
Jeff Johnson295189b2012-06-20 16:38:30 -0700929typedef struct sLimMgmtFrameRegistration
930{
931 vos_list_node_t node; // MUST be first element
932 tANI_U16 frameType;
933 tANI_U16 matchLen;
934 tANI_U16 sessionId;
935 tANI_U8 matchData[1];
936} tLimMgmtFrameRegistration, *tpLimMgmtFrameRegistration;
Jeff Johnson295189b2012-06-20 16:38:30 -0700937
938#if defined WLAN_FEATURE_VOWIFI
939typedef struct sRrmContext
940{
941 tRrmSMEContext rrmSmeContext;
942 tRrmPEContext rrmPEContext;
943}tRrmContext, *tpRrmContext;
944#endif
945
946#if defined WLAN_FEATURE_VOWIFI_11R
947typedef struct sFTContext
948{
949 tftSMEContext ftSmeContext;
950 tftPEContext ftPEContext;
951} tftContext, *tpFTContext;
952#endif
953
Kapil Gupta956c0c42017-06-16 19:24:31 +0530954typedef struct assoc_rsp_tx_context
955{
956 vos_list_node_t node;
957 tANI_U8 psessionID;
958 tANI_U16 staId;
959 tANI_U32 txBdToken;
960} assoc_rsp_tx_context;
961
Jeff Johnson295189b2012-06-20 16:38:30 -0700962//Check if this definition can actually move here even for Volans. In that case
963//this featurization can be removed.
964/** ------------------------------------------------------------------------- *
965
966 \typedef tDriverType
967
968 \brief Indicate the driver type to the mac, and based on this do
969 appropriate initialization.
970
971 -------------------------------------------------------------------------- */
972
973typedef enum
974{
975 eDRIVER_TYPE_PRODUCTION = 0,
976 eDRIVER_TYPE_MFG = 1,
977 eDRIVER_TYPE_DVT = 2
978} tDriverType;
979
980/** ------------------------------------------------------------------------- *
981
982 \typedef tMacOpenParameters
983
984 \brief Parameters needed for Enumeration of all status codes returned by the higher level
985 interface functions.
986
987 -------------------------------------------------------------------------- */
988
989typedef struct sMacOpenParameters
990{
991 tANI_U16 maxStation;
992 tANI_U16 maxBssId;
993 tANI_U32 frameTransRequired;
994 tDriverType driverType;
995} tMacOpenParameters;
996
Jeff Johnson295189b2012-06-20 16:38:30 -0700997typedef struct sHalMacStartParameters
998{
999 // parametes for the Firmware
1000 //tHalFirmwareParameters FW;
1001 tDriverType driverType;
1002
1003} tHalMacStartParameters;
Jeff Johnson295189b2012-06-20 16:38:30 -07001004
Sushant Kaushik9e923872015-04-02 17:09:31 +05301005typedef enum
1006{
1007 LIM_AUTH_ACK_NOT_RCD,
1008 LIM_AUTH_ACK_RCD_SUCCESS,
1009 LIM_AUTH_ACK_RCD_FAILURE,
1010} tAuthAckStatus;
1011
Jeff Johnson295189b2012-06-20 16:38:30 -07001012// -------------------------------------------------------------------
1013/// MAC Sirius parameter structure
1014typedef struct sAniSirGlobal
1015
1016{
1017 tDriverType gDriverType;
Jeff Johnson295189b2012-06-20 16:38:30 -07001018
1019 // we should be able to save this hddHandle in here and deprecate
1020 // the pAdapter. For now, compiles are a problem because there
1021 // are dependencides on the header files that are not handling the
1022 // compiler very gracefully.
1023// tHddHandle hHdd; // Handle to the HDD.
1024 //void *hHdd;
1025 void *pAdapter; // deprecate this pAdapter pointer eventually...
1026 // all interfaces to the HDD should pass hHdd, which
1027 // is stored in this struct above.....
1028 tSirMbMsg* pResetMsg;
1029 tAniSirCfg cfg;
1030 tAniSirLim lim;
Jeff Johnson295189b2012-06-20 16:38:30 -07001031 tAniSirPmm pmm;
1032 tAniSirSch sch;
1033 tAniSirSys sys;
1034 tAniSirUtils utils;
Jeff Johnson295189b2012-06-20 16:38:30 -07001035 // PAL/HDD handle
1036 tHddHandle hHdd;
1037
1038#ifdef ANI_DVT_DEBUG
1039 tAniSirDvt dvt;
1040#endif
1041
1042 tSmeStruct sme;
1043 tCsrScanStruct scan;
1044 tCsrRoamStruct roam;
1045
Jeff Johnsone7245742012-09-05 17:12:55 -07001046#ifdef FEATURE_OEM_DATA_SUPPORT
1047 tOemDataStruct oemData;
1048#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001049 tPmcInfo pmc;
1050 tSmeBtcInfo btc;
Jeff Johnson295189b2012-06-20 16:38:30 -07001051
1052 tCcm ccm;
1053
1054#if defined WLAN_FEATURE_VOWIFI
1055 tRrmContext rrm;
1056#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001057#ifdef WLAN_FEATURE_CONCURRENT_P2P
1058 tp2pContext p2pContext[MAX_NO_OF_P2P_SESSIONS];
1059#else
1060 tp2pContext p2pContext;
1061#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001062
1063#if defined WLAN_FEATURE_VOWIFI_11R
1064 tftContext ft;
1065#endif
Kapil Gupta956c0c42017-06-16 19:24:31 +05301066 vos_list_t assoc_rsp_completion_list;
Jeff Johnson295189b2012-06-20 16:38:30 -07001067 tANI_U32 gCurrentLogSize;
1068 tANI_U32 menuCurrent;
1069 /* logDump specific */
1070 tANI_U32 dumpTablecurrentId;
1071 /* Instead of static allocation I will dyanamically allocate memory for dumpTableEntry
1072 Thinking of using linkedlist */
1073 tDumpModuleEntry *dumpTableEntry[MAX_DUMP_TABLE_ENTRY];
Gopichand Nakkalaccd3a382013-03-19 13:56:10 -07001074#ifdef FEATURE_WLAN_TDLS
1075 v_BOOL_t isTdlsPowerSaveProhibited;
1076#endif
Gopichand Nakkala86e42662013-06-11 17:44:11 +05301077 tANI_U8 fScanOffload;
Abhishek Singh00b71972016-01-07 10:51:04 +05301078#ifdef WLAN_FEATURE_RMC
1079 tLimRmcContext rmcContext;
1080#endif /* WLAN_FEATURE_RMC */
krunal sonie9002db2013-11-25 14:24:17 -08001081 tANI_U8 isCoalesingInIBSSAllowed;
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -08001082 tANI_U32 fEnableDebugLog;
Rashmi Ramanna68b309c2014-05-20 11:52:22 +05301083 tANI_U32 fDeferIMPSTime;
1084 tANI_BOOLEAN deferImps;
Abhishek Singh6d5d29c2014-07-03 14:25:22 +05301085
1086#ifdef WLAN_FEATURE_11AC
1087 /* Alow Mu BFormee session only if MU BF session doesnt exist.
1088 */
1089 v_BOOL_t isMuBfsessionexist;
1090#endif
1091
c_hpothu3ba2a512014-08-06 14:02:54 +05301092 v_BOOL_t isCoexScoIndSet;
Ganesh Kondabattini8f6e3b32014-08-25 16:07:54 +05301093 v_U8_t miracast_mode;
Chandrasekaran, Manishekar5cb0acd2014-12-23 20:06:52 +05301094 v_U8_t fBtcEnableIndTimerVal;
Girish Gowli1c2fc802015-01-19 16:18:07 +05301095 v_U8_t roamDelayStatsEnabled;
Abhishek Singh01c73d12015-03-12 15:13:44 +05301096 tANI_BOOLEAN miracastVendorConfig;
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +05301097 v_BOOL_t fActiveScanOnDFSChannels;
Sushant Kaushik9e923872015-04-02 17:09:31 +05301098 tAuthAckStatus authAckStatus;
Abhishek Singh7d624e12015-11-30 14:29:27 +05301099 sir_mgmt_frame_ind_callback mgmt_frame_ind_cb;
Kapil Gupta04ab1992016-06-26 13:36:51 +05301100#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1101 v_U8_t PERroamCandidatesCnt;
1102 tSirCandidateChanInfo candidateChannelInfo[SIR_PER_ROAM_MAX_CANDIDATE_CNT];
1103 tSirRoamAPInfo previousRoamApInfo[SIR_PER_ROAM_MAX_CANDIDATE_CNT];
1104 v_U32_t PERroamTimeout;
1105 v_U32_t currentBssScore;
1106#endif
Agrawal Ashish17ef5082016-10-17 18:33:21 +05301107#ifdef SAP_AUTH_OFFLOAD
1108 bool sap_auth_offload;
1109 uint32_t sap_auth_offload_sec_type;
1110#endif /* SAP_AUTH_OFFLOAD */
Aggarwal, Nishank2dbbd3d2017-01-05 15:32:47 +05301111 bool max_power_cmd_pending;
Paul Zhang83289792017-02-28 18:58:52 +08001112 uint32_t sta_auth_retries_for_code17;
Ganesh Kondabattinie3ac17f2017-11-30 15:09:07 +05301113 uint32_t sta_sap_scc_on_dfs_chan;
Yeshwanth Sriram Guntukad3a9fc52018-01-10 15:09:49 +05301114 bool force_scc_with_ecsa;
Jeff Johnson295189b2012-06-20 16:38:30 -07001115} tAniSirGlobal;
1116
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001117#ifdef FEATURE_WLAN_TDLS
Jeff Johnson295189b2012-06-20 16:38:30 -07001118
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001119#define RFC1042_HDR_LENGTH (6)
1120#define GET_BE16(x) ((tANI_U16) (((x)[0] << 8) | (x)[1]))
1121#define ETH_TYPE_89_0d (0x890d)
1122#define ETH_TYPE_LEN (2)
1123#define PAYLOAD_TYPE_TDLS_SIZE (1)
1124#define PAYLOAD_TYPE_TDLS (2)
1125
1126#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001127
1128#endif /* _ANIGLOBAL_H */
1129