blob: 6f77bbb3e8814589d05551533f218a5a98b4f76a [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Yeshwanth Sriram Guntukad3a9fc52018-01-10 15:09:49 +05302 * Copyright (c) 2012-2014, 2017-2018 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;
Jeff Johnson295189b2012-06-20 16:38:30 -0700247//********************TIMER SECTION ENDS**************************************************
248// ALL THE FIELDS BELOW THIS CAN BE ZEROED OUT in limInitialize
249//****************************************************************************************
250
251}tLimTimers;
252
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -0800253typedef struct {
254 void *pMlmDisassocReq;
255 void *pMlmDeauthReq;
256}tLimDisassocDeauthCnfReq;
Jeff Johnson295189b2012-06-20 16:38:30 -0700257
Sreelakshmi Konamki60ccfb32016-07-08 12:53:12 +0530258typedef struct {
259 tANI_U32 failed_count[MAX_TIDS];
260 v_TIME_t failed_timestamp[MAX_TIDS];
261} tLimStaBAInfo;
262
Jeff Johnson295189b2012-06-20 16:38:30 -0700263typedef struct sAniSirLim
264{
265 ////////////////////////////////////// TIMER RELATED START ///////////////////////////////////////////
266
267 tLimTimers limTimers;
268 /// Flag to track if LIM timers are created or not
269 tANI_U32 gLimTimersCreated;
270
271
272 ////////////////////////////////////// TIMER RELATED END ///////////////////////////////////////////
273
274 ////////////////////////////////////// SCAN/LEARN RELATED START ///////////////////////////////////////////
275 /**
276 * This flag when set, will use scan mode instead of
277 * Learn mode on BP/AP. By default this flag is set
278 * to true until HIF getting stuck in 0x800 state is
279 * debugged.
280 */
281 tANI_U32 gLimUseScanModeForLearnMode;
282
283 /**
284 * This is useful for modules other than LIM
285 * to see if system is in scan/learn mode or not
286 */
287 tANI_U32 gLimSystemInScanLearnMode;
288
289 // Scan related globals on STA
290 tANI_U8 gLimReturnAfterFirstMatch;
291 tANI_U8 gLim24Band11dScanDone;
292 tANI_U8 gLim50Band11dScanDone;
293 tANI_U8 gLimReturnUniqueResults;
294
295 // Background Scan related globals on STA
296 tANI_U32 gLimNumOfBackgroundScanSuccess;
297 tANI_U32 gLimNumOfConsecutiveBkgndScanFailure;
298 tANI_U32 gLimNumOfForcedBkgndScan;
299 tANI_U8 gLimBackgroundScanDisable; //based on BG timer
300 tANI_U8 gLimForceBackgroundScanDisable; //debug control flag
301 tANI_U8 gLimBackgroundScanTerminate; //controlled by SME
302 tANI_U8 gLimReportBackgroundScanResults;//controlled by SME
303
304 /// Place holder for current channel ID
305 /// being scanned
306 tANI_U32 gLimCurrentScanChannelId;
307
308 // Hold onto SCAN criteria
Viral Modid440e682013-03-06 02:25:31 -0800309 /* The below is used in P2P GO case when we need to defer processing SME Req
310 * to LIM and insert NOA first and process SME req once SNOA is started
311 */
312 tANI_U16 gDeferMsgTypeForNOA;
313 tANI_U32 *gpDefdSmeMsgForNOA;
314
Jeff Johnson295189b2012-06-20 16:38:30 -0700315 tLimMlmScanReq *gpLimMlmScanReq;
316
317 /// This indicates total length of 'matched' scan results
318 tANI_U16 gLimMlmScanResultLength;
319
320 /// This indicates total length of 'cached' scan results
321 tANI_U16 gLimSmeScanResultLength;
322
323 /**
324 * Hash table definition for storing SCAN results
325 * This is the placed holder for 'cached' scan results
326 */
327 tLimScanResultNode
328 *gLimCachedScanHashTable[LIM_MAX_NUM_OF_SCAN_RESULTS];
329
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700330 /// This indicates total length of 'matched' scan results
331 tANI_U16 gLimMlmLfrScanResultLength;
332
333 /// This indicates total length of 'cached' scan results
334 tANI_U16 gLimSmeLfrScanResultLength;
335
336 /**
337 * Hash table definition for storing LFR SCAN results
338 * This is the placed holder for roaming candidates as forwarded
339 * by FW
340 */
341 tLimScanResultNode
342 *gLimCachedLfrScanHashTable[LIM_MAX_NUM_OF_SCAN_RESULTS];
343
Jeff Johnson295189b2012-06-20 16:38:30 -0700344 /// Place holder for current channel ID
345 /// being scanned during background scanning
346 tANI_U32 gLimBackgroundScanChannelId;
347 /// flag to indicate that bacground scan timer has been started
348 tANI_U8 gLimBackgroundScanStarted;
349
350 /* Used to store the list of legacy bss sta detected during scan on one channel */
351 tANI_U16 gLimRestoreCBNumScanInterval;
352 tANI_U16 gLimRestoreCBCount;
353 tSirMacAddr gLimLegacyBssidList[MAX_NUM_LEGACY_BSSID_PER_CHANNEL];
Jeff Johnson295189b2012-06-20 16:38:30 -0700354
355 //
356 // If this flag is 1,
357 // then, LIM will "try and trigger" a background
358 // scan whenever it receives a Quiet BSS IE
359 //
360 // If this flag is 0,
361 // then, LIM will simply shut-off Tx/Rx whenever it
362 // receives a Quiet BSS IE.
363 // This is the default behavior when a Quiet BSS IE
364 // is received and 11H is enabled
365 //
366 tANI_U32 gLimTriggerBackgroundScanDuringQuietBss;
367
Jeff Johnson295189b2012-06-20 16:38:30 -0700368
Jeff Johnson295189b2012-06-20 16:38:30 -0700369 // This variable store the total duration to do scan
370 tANI_U32 gTotalScanDuration;
Jeff Johnsone7245742012-09-05 17:12:55 -0700371 tANI_U32 p2pRemOnChanTimeStamp;
Jeff Johnson295189b2012-06-20 16:38:30 -0700372
373 // abort scan is used to abort an on-going scan
374 tANI_U8 abortScan;
375 tLimScanChnInfo scanChnInfo;
376
377 ////////////////////////////////////// SCAN/LEARN RELATED START ///////////////////////////////////////////
378 tSirMacAddr gSelfMacAddr; //added for BT-AMP Support
Siddharth Bhal4f3187c2014-10-09 21:38:08 +0530379 tSirMacAddr spoofMacAddr; //added for Mac Addr Spoofing support
380 tANI_U8 isSpoofingEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700381
382 ////////////////////////////////////////// BSS RELATED END ///////////////////////////////////////////
383 // Place holder for StartBssReq message
384 // received by SME state machine
385
Jeff Johnson62c27982013-02-27 17:53:55 -0800386 tANI_U8 gLimCurrentBssUapsd;
Jeff Johnson295189b2012-06-20 16:38:30 -0700387
Jeff Johnson62c27982013-02-27 17:53:55 -0800388 /* This is used for testing sta legacy bss detect feature */
389 tANI_U8 gLimForceNoPropIE;
Jeff Johnson295189b2012-06-20 16:38:30 -0700390
391 //
392 // Store the BSS Index returned by HAL during
393 // WDA_ADD_BSS_RSP here.
394 //
395 // For now:
396 // This will be used during WDA_SET_BSSKEY_REQ in
397 // order to set the GTK
398 // Later:
399 // There could be other interfaces needing this info
400 //
401
402 //
403 // Due to the asynchronous nature of the interface
404 // between PE <-> HAL, some transient information
405 // like this needs to be cached.
406 // This is cached upon receipt of eWNI_SME_SETCONTEXT_REQ.
407 // This is released while posting LIM_MLM_SETKEYS_CNF
408 //
409 void* gpLimMlmSetKeysReq;
410 void* gpLimMlmRemoveKeyReq;
411
412 //On STA: staid for self generated by HAL and sent as response to 'ADD STA' msg.
413 //On AP: staid corresponding to BSS generated by HAL and sent as response to 'ADD BSS' msg.
414 // tANI_U16 gLimStaid; // TO SUPPORT BT-AMP
415
416 ////////////////////////////////////////// BSS RELATED END ///////////////////////////////////////////
417
418 ////////////////////////////////////////// IBSS RELATED START ///////////////////////////////////////////
419 // This indicates whether we've a partner
420 // that is also transmitting Beacon frame
421 // in IBSS
422 //tANI_U8 gLimIbssActive; oct1 review
423
424 //This indicates whether this STA coalesced and adapter to peer's capabilities or not.
425 tANI_U8 gLimIbssCoalescingHappened;
426
427 /// Definition for storing IBSS peers BSS description
428 tLimIbssPeerNode *gLimIbssPeerList;
429 tANI_U32 gLimNumIbssPeers;
Sushant Kaushike06bd872015-03-12 16:17:48 +0530430 tANI_U32 gLimIbssRetryCnt;
Jeff Johnson295189b2012-06-20 16:38:30 -0700431
432 // ibss info - params for which ibss to join while coalescing
433 tAniSirLimIbss ibssInfo;
434
435 ////////////////////////////////////////// IBSS RELATED END ///////////////////////////////////////////
436
437 ////////////////////////////////////////// STATS/COUNTER RELATED START ///////////////////////////////////////////
438
439 tANI_U16 maxStation;
440 tANI_U16 maxBssId;
441
442 tANI_U32 gLimNumBeaconsRcvd;
443 tANI_U32 gLimNumBeaconsIgnored;
444
445 tANI_U32 gLimNumDeferredMsgs;
446
447 /// Variable to keep track of number of currently associated STAs
Jeff Johnson295189b2012-06-20 16:38:30 -0700448 tANI_U16 gLimNumOfAniSTAs; // count of ANI peers
449 tANI_U16 gLimAssocStaLimit;
450
451 /// This indicates number of RXed Beacons during HB period
452 // tANI_U8 gLimRxedBeaconCntDuringHB;
453
454 // Heart-Beat interval value
455 tANI_U32 gLimHeartBeatCount;
Abhishek Singhde51a412014-05-20 19:17:26 +0530456 tSirMacAddr gLimHeartBeatApMac[2];
457 tANI_U8 gLimHeartBeatApMacIndex;
Jeff Johnson295189b2012-06-20 16:38:30 -0700458
459 // Statistics to keep track of no. beacons rcvd in heart beat interval
460 tANI_U16 gLimHeartBeatBeaconStats[MAX_NO_BEACONS_PER_HEART_BEAT_INTERVAL];
461
462#ifdef WLAN_DEBUG
463 // Debug counters
464 tANI_U32 numTot, numBbt, numProtErr, numLearn, numLearnIgnore;
465 tANI_U32 numSme, numMAC[4][16];
466
467 // Debug counter to track number of Assoc Req frame drops
468 // when received in pStaDs->mlmState other than LINK_ESTABLISED
469 tANI_U32 gLimNumAssocReqDropInvldState;
470 // counters to track rejection of Assoc Req due to Admission Control
471 tANI_U32 gLimNumAssocReqDropACRejectTS;
472 tANI_U32 gLimNumAssocReqDropACRejectSta;
473 // Debug counter to track number of Reassoc Req frame drops
474 // when received in pStaDs->mlmState other than LINK_ESTABLISED
475 tANI_U32 gLimNumReassocReqDropInvldState;
476 // Debug counter to track number of Hash Miss event that
477 // will not cause a sending of de-auth/de-associate frame
478 tANI_U32 gLimNumHashMissIgnored;
479
480 // Debug counter to track number of Beacon frames
481 // received in unexpected state
482 tANI_U32 gLimUnexpBcnCnt;
483
484 // Debug counter to track number of Beacon frames
485 // received in wt-join-state that do have SSID mismatch
486 tANI_U32 gLimBcnSSIDMismatchCnt;
487
488 // Debug counter to track number of Link establishments on STA/BP
489 tANI_U32 gLimNumLinkEsts;
490
491 // Debug counter to track number of Rx cleanup
492 tANI_U32 gLimNumRxCleanup;
493
494 // Debug counter to track different parse problem
495 tANI_U32 gLim11bStaAssocRejectCount;
496
497#endif
498
499 //Time stamp of the last beacon received from the BSS to which STA is connected.
500 tANI_U64 gLastBeaconTimeStamp;
501 //RX Beacon count for the current BSS to which STA is connected.
502 tANI_U32 gCurrentBssBeaconCnt;
503 tANI_U8 gLastBeaconDtimCount;
504 tANI_U8 gLastBeaconDtimPeriod;
505
506
507 ////////////////////////////////////////// STATS/COUNTER RELATED END ///////////////////////////////////////////
508
509
510 ////////////////////////////////////////// STATES RELATED START ///////////////////////////////////////////
511 // Counts Heartbeat failures
512 tANI_U8 gLimHBfailureCntInLinkEstState;
513 tANI_U8 gLimProbeFailureAfterHBfailedCnt;
514 tANI_U8 gLimHBfailureCntInOtherStates;
515
516 /**
517 * This variable indicates whether LIM module need to
518 * send response to host. Used to identify whether a request
519 * is generated internally within LIM module or by host
520 */
521 tANI_U8 gLimRspReqd;
522
523 /// Previous SME State
524 tLimSmeStates gLimPrevSmeState;
525
526 /// MLM State visible across all Sirius modules
527 tLimMlmStates gLimMlmState;
528
529 /// Previous MLM State
530 tLimMlmStates gLimPrevMlmState;
531
532#ifdef GEN4_SCAN
533 // LIM to HAL SCAN Management Message Interface states
534 tLimLimHalScanState gLimHalScanState;
535//WLAN_SUSPEND_LINK Related
536 SUSPEND_RESUME_LINK_CALLBACK gpLimSuspendCallback;
537 tANI_U32 *gpLimSuspendData;
538 SUSPEND_RESUME_LINK_CALLBACK gpLimResumeCallback;
539 tANI_U32 *gpLimResumeData;
540//end WLAN_SUSPEND_LINK Related
541 tANI_U8 fScanDisabled;
542 //Can be set to invalid channel. If it is invalid, HAL
543 //should move to previous valid channel or stay in the
Jeff Johnsone7245742012-09-05 17:12:55 -0700544 //current channel. CB state goes along with channel to resume to
545 tANI_U16 gResumeChannel;
546 ePhyChanBondState gResumePhyCbState;
Jeff Johnson295189b2012-06-20 16:38:30 -0700547#endif // GEN4_SCAN
548
549 // Change channel generic scheme
550 CHANGE_CHANNEL_CALLBACK gpchangeChannelCallback;
551 tANI_U32 *gpchangeChannelData;
552
553 /// SME State visible across all Sirius modules
554 tLimSmeStates gLimSmeState;
555 /// This indicates whether we're an AP, STA in BSS/IBSS
556 tLimSystemRole gLimSystemRole;
557
558 // Number of STAs that do not support short preamble
559 tLimNoShortParams gLimNoShortParams;
560
561 // Number of STAs that do not support short slot time
562 tLimNoShortSlotParams gLimNoShortSlotParams;
563
564
565 // OLBC parameters
566 tLimProtStaParams gLimOverlap11gParams;
567
568 tLimProtStaParams gLimOverlap11aParams;
569 tLimProtStaParams gLimOverlapHt20Params;
570 tLimProtStaParams gLimOverlapNonGfParams;
571
572 //
573 // ---------------- DPH -----------------------
574 // these used to live in DPH but are now moved here (where they belong)
575 tANI_U32 gLimPhyMode;
576 tANI_U32 propRateAdjustPeriod;
577 tANI_U32 scanStartTime; // used to measure scan time
578
Jeff Johnsone7245742012-09-05 17:12:55 -0700579 //tANI_U8 gLimBssid[6];
Jeff Johnson295189b2012-06-20 16:38:30 -0700580 tANI_U8 gLimMyMacAddr[6];
581 tANI_U8 ackPolicy;
582
583 tANI_U8 gLimQosEnabled:1; //11E
584 tANI_U8 gLimWmeEnabled:1; //WME
585 tANI_U8 gLimWsmEnabled:1; //WSM
586 tANI_U8 gLimHcfEnabled:1;
587 tANI_U8 gLim11dEnabled:1;
588 tANI_U8 gLimProbeRespDisableFlag:1; // control over probe response
589 // ---------------- DPH -----------------------
590
591 ////////////////////////////////////////// STATES RELATED END ///////////////////////////////////////////
592
593 ////////////////////////////////////////// MISC RELATED START ///////////////////////////////////////////
Jeff Johnson295189b2012-06-20 16:38:30 -0700594
595 // WDS info
596 tANI_U32 gLimNumWdsInfoInd;
597 tANI_U32 gLimNumWdsInfoSet;
598 tSirWdsInfo gLimWdsInfo;
599
600 // Deferred Queue Paramters
601 tLimDeferredMsgQParams gLimDeferredMsgQ;
602
603 // addts request if any - only one can be outstanding at any time
604 tSirAddtsReq gLimAddtsReq;
605 tANI_U8 gLimAddtsSent;
606 tANI_U8 gLimAddtsRspTimerCount;
607
608 //protection related config cache
609 tCfgProtection cfgProtection;
610
611 tANI_U8 gLimProtectionControl;
612 //RF band to determibe 2.4/5 GHZ
613
614 // alternate radio info used by STA
615 tSirAlternateRadioInfo gLimAlternateRadio;
616
617 //This flag will remain to be set except while LIM is waiting for specific response messages
618 //from HAL. e.g when LIM issues ADD_STA req it will clear this flag and when it will receive
619 //the response the flag will be set.
620 tANI_U8 gLimProcessDefdMsgs;
621
622 // UAPSD flag used on AP
623 tANI_U8 gUapsdEnable;
624
625 /* Used on STA, this is a static UAPSD mask setting
626 * derived from SME_JOIN_REQ and SME_REASSOC_REQ. If a
627 * particular AC bit is set, it means the AC is both
628 * trigger enabled and delivery enabled.
629 */
630 tANI_U8 gUapsdPerAcBitmask;
631
632 /* Used on STA, this is a dynamic UPASD mask setting
633 * derived from AddTS Rsp and DelTS frame. If a
634 * particular AC bit is set, it means AC is trigger
635 * enabled.
636 */
637 tANI_U8 gUapsdPerAcTriggerEnableMask;
638
639 /* Used on STA, dynamic UPASD mask setting
640 * derived from AddTS Rsp and DelTs frame. If
641 * a particular AC bit is set, it means AC is
642 * delivery enabled.
643 */
644 tANI_U8 gUapsdPerAcDeliveryEnableMask;
645
646 /* Used on STA for AC downgrade. This is a dynamic mask
647 * setting which keep tracks of ACs being admitted.
648 * If bit is set to 0: That partiular AC is not admitted
649 * If bit is set to 1: That particular AC is admitted
650 */
651 tANI_U8 gAcAdmitMask[SIR_MAC_DIRECTION_DIRECT];
652
653 //dialogue token List head/tail for Action frames request sent.
654 tpDialogueToken pDialogueTokenHead;
655 tpDialogueToken pDialogueTokenTail;
656
657 tLimTspecInfo tspecInfo[LIM_NUM_TSPEC_MAX];
658
659 // admission control policy information
660 tLimAdmitPolicyInfo admitPolicyInfo;
Leela V Kiran Kumar Reddy Chiralac3b9d382013-01-31 20:49:53 -0800661 vos_lock_t lkPeGlobalLock;
Leela V Kiran Kumar Reddy Chiralab1f7d342013-02-11 00:27:02 -0800662 tANI_U8 disableLDPCWithTxbfAP;
Gopichand Nakkala574f6d12013-06-27 19:38:43 +0530663#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +0530664 tANI_U8 gLimTDLSBufStaEnabled;
665 tANI_U8 gLimTDLSUapsdMask;
Naresh Jayaramf73f3762014-02-04 16:13:20 +0530666 tANI_U8 gLimTDLSOffChannelEnabled;
Pradeep Reddy POTTETIa9c80d52014-05-09 18:05:29 +0530667 // TDLS WMM Mode
668 tANI_U8 gLimTDLSWmmMode;
Gopichand Nakkala574f6d12013-06-27 19:38:43 +0530669#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700670
671
672
673 ////////////////////////////////////////// MISC RELATED END ///////////////////////////////////////////
674
675 ////////////////////////////////////////// ASSOC RELATED START ///////////////////////////////////////////
676 // Place holder for JoinReq message
677 // received by SME state machine
678 // tpSirSmeJoinReq gpLimJoinReq;
679
680 // Place holder for ReassocReq message
681 // received by SME state machine
682 //tpSirSmeReassocReq gpLimReassocReq; sep23 review
683
Jeff Johnson295189b2012-06-20 16:38:30 -0700684 // Current Authentication type used at STA
685 //tAniAuthType gLimCurrentAuthType;
686
687 // Place holder for current authentication request
688 // being handled
689 tLimMlmAuthReq *gpLimMlmAuthReq;
690
691 // Place holder for Join request that we're
692 // currently attempting
Jeff Johnsone7245742012-09-05 17:12:55 -0700693 //tLimMlmJoinReq *gpLimMlmJoinReq;
Jeff Johnson295189b2012-06-20 16:38:30 -0700694
695 // Reason code to determine the channel change context while sending
696 // WDA_CHNL_SWITCH_REQ message to HAL
697 tANI_U32 channelChangeReasonCode;
698
699 /// MAC level Pre-authentication related globals
700 tSirMacChanNum gLimPreAuthChannelNumber;
701 tAniAuthType gLimPreAuthType;
702 tSirMacAddr gLimPreAuthPeerAddr;
703 tANI_U32 gLimNumPreAuthContexts;
704 tLimPreAuthTable gLimPreAuthTimerTable;
705
706 // Placed holder to deauth reason
707 tANI_U16 gLimDeauthReasonCode;
708
709 // Place holder for Pre-authentication node list
710 struct tLimPreAuthNode * pLimPreAuthList;
711
Jeff Johnson295189b2012-06-20 16:38:30 -0700712 // Assoc or ReAssoc Response Data/Frame
713 void *gLimAssocResponseData;
714
715 //One cache for each overlap and associated case.
716 tCacheParams protStaOverlapCache[LIM_PROT_STA_OVERLAP_CACHE_SIZE];
717 tCacheParams protStaCache[LIM_PROT_STA_CACHE_SIZE];
718
719 ////////////////////////////////////////// ASSOC RELATED END ///////////////////////////////////////////
720
721
Jeff Johnson295189b2012-06-20 16:38:30 -0700722
723 //
724 // For DEBUG purposes
725 // Primarily for - TITAN BEACON workaround
726 // Symptom - TFP/PHY gets stuck
727 //
728 tANI_U32 gLimScanOverride;
729 // Holds the desired tSirScanType, as requested by SME
730 tSirScanType gLimScanOverrideSaved;
731
Jeff Johnson295189b2012-06-20 16:38:30 -0700732 //
733 // CB State protection, operated upon as follows:
734 // 1 - CB is enabled in the hardware ONLY WHEN a Titan
735 // STA associates with the AP
736 // 0 - CB is enabled/disabled based on the configuration
737 // received as per eWNI_SME_START_BSS_REQ
738 //
739 tANI_U32 gLimCBStateProtection;
740
741 // Count of TITAN STA's currently associated
742 tANI_U16 gLimTitanStaCount;
743
744 //
745 // For DEBUG purposes
746 // Primarily for - TITAN workaround
747 // Symptom - Avoid NULL data frames
748 // Applies to AP only
749 //
750 tANI_U32 gLimBlockNonTitanSta;
751 /////////////////////////// TITAN related globals //////////////////////////////////////////
752
753
754 //////////////////////////////// HT RELATED //////////////////////////////////////////
755 //
756 // The following global LIM variables maintain/manage
757 // the runtime configurations related to 802.11n
758
759 // 802.11n Station detected HT capability in Beacon Frame
760 tANI_U8 htCapabilityPresentInBeacon;
761
762 // 802.11 HT capability: Enabled or Disabled
763 tANI_U8 htCapability;
764
765
766 tANI_U8 gHTGreenfield;
767
Jeff Johnson295189b2012-06-20 16:38:30 -0700768 tANI_U8 gHTShortGI40Mhz;
769 tANI_U8 gHTShortGI20Mhz;
770
771 //Set to 0 for 3839 octets
772 //Set to 1 for 7935 octets
773 tANI_U8 gHTMaxAmsduLength;
774
775
776 // DSSS/CCK at 40 MHz: Enabled 1 or Disabled
777 tANI_U8 gHTDsssCckRate40MHzSupport;
778
779 // PSMP Support: Enabled 1 or Disabled 0
780 tANI_U8 gHTPSMPSupport;
781
782 // L-SIG TXOP Protection used only if peer support available
783 tANI_U8 gHTLsigTXOPProtection;
784
785 // MIMO Power Save
786 tSirMacHTMIMOPowerSaveState gHTMIMOPSState;
787
788 // Scan In Power Save
789 tANI_U8 gScanInPowersave;
790
791 //
792 // A-MPDU Density
793 // 000 - No restriction
794 // 001 - 1/8 usec
795 // 010 - 1/4 usec
796 // 011 - 1/2 usec
797 // 100 - 1 usec
798 // 101 - 2 usec
799 // 110 - 4 usec
800 // 111 - 8 usec
801 //
802 tANI_U8 gHTAMpduDensity;
803
804 tANI_BOOLEAN gMaxAmsduSizeEnabled;
805 // Maximum Tx/Rx A-MPDU factor
806 tANI_U8 gHTMaxRxAMpduFactor;
807
808 //
809 // Scheduled PSMP related - Service Interval Granularity
810 // 000 - 5 ms
811 // 001 - 10 ms
812 // 010 - 15 ms
813 // 011 - 20 ms
814 // 100 - 25 ms
815 // 101 - 30 ms
816 // 110 - 35 ms
817 // 111 - 40 ms
818 //
819 tANI_U8 gHTServiceIntervalGranularity;
820
821 // Indicates whether an AP wants to associate PSMP enabled Stations
822 tANI_U8 gHTControlledAccessOnly;
823
824 // RIFS Mode. Set if no APSD legacy devices associated
825 tANI_U8 gHTRifsMode;
826 // OBss Mode . set when we have Non HT STA is associated or with in overlap bss
827 tANI_U8 gHTObssMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700828
829 // Identifies the current Operating Mode
830 tSirMacHTOperatingMode gHTOperMode;
831
832 // Indicates if PCO is activated in the BSS
833 tANI_U8 gHTPCOActive;
834
835 //
836 // If PCO is active, indicates which PCO phase to use
837 // 0 - switch to 20 MHz phase
838 // 1 - switch to 40 MHz phase
839 //
840 tANI_U8 gHTPCOPhase;
841
842 //
843 // Used only in beacons. For PR, this is set to 0
844 // 0 - Primary beacon
845 // 1 - Secondary beacon
846 //
847 tANI_U8 gHTSecondaryBeacon;
848
849 //
850 // Dual CTS Protection
851 // 0 - Use RTS/CTS
852 // 1 - Dual CTS Protection is used
853 //
854 tANI_U8 gHTDualCTSProtection;
855
856 //
857 // Identifies a single STBC MCS that shall ne used for
858 // STBC control frames and STBC beacons
859 //
860 tANI_U8 gHTSTBCBasicMCS;
861
862 tANI_U8 gHTNonGFDevicesPresent;
863
864 tANI_U8 gAddBA_Declined; // Flag to Decline the BAR if the particular bit (0-7) is being set
865
866 //////////////////////////////// HT RELATED //////////////////////////////////////////
867
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800868#ifdef FEATURE_WLAN_TDLS
869 tANI_U8 gLimAddStaTdls ;
870 tANI_U8 gLimTdlsLinkMode ;
871 //////////////////////////////// TDLS RELATED //////////////////////////////////////////
872#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700873
874 // wsc info required to form the wsc IE
875 tLimWscIeInfo wscIeInfo;
876 tpPESession gpSession ; //Pointer to session table
877 /*
878 * sessionID and transactionID from SME is stored here for those messages, for which
879 * there is no session context in PE, e.g. Scan related messages.
880 **/
881 tANI_U8 gSmeSessionId;
882 tANI_U16 gTransactionId;
883
Jeff Johnsone7245742012-09-05 17:12:55 -0700884#ifdef FEATURE_OEM_DATA_SUPPORT
885tLimMlmOemDataReq *gpLimMlmOemDataReq;
886tLimMlmOemDataRsp *gpLimMlmOemDataRsp;
887#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700888
Jeff Johnson295189b2012-06-20 16:38:30 -0700889 tSirRemainOnChnReq *gpLimRemainOnChanReq; //hold remain on chan request in this buf
890 vos_list_t gLimMgmtFrameRegistratinQueue;
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800891 tANI_U32 mgmtFrameSessionId;
Madan Mohan Koyyalamudi70bb4cb2012-10-18 19:31:25 -0700892 tSirBackgroundScanMode gLimBackgroundScanMode;
Madan Mohan Koyyalamudi61bc5662012-11-02 14:33:10 -0700893
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800894#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudi61bc5662012-11-02 14:33:10 -0700895 tpPESession pSessionEntry;
896 tANI_U8 reAssocRetryAttempt;
897#endif
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -0800898 tLimDisassocDeauthCnfReq limDisassocDeauthCnfReq;
Leela Venkata Kiran Kumar Reddy Chirala2247e962013-03-22 19:21:10 -0700899 tANI_U8 deferredMsgCnt;
Gopichand Nakkalad492d202013-05-10 02:50:47 +0530900 tSirDFSChannelList dfschannelList;
Venkata Prathyusha Kuntupalli22ba5982013-04-24 13:09:20 -0700901 tANI_U8 deauthMsgCnt;
Ravi Joshi0fc681b2013-09-11 16:46:07 -0700902 tANI_U8 gLimIbssStaLimit;
Praveen Kumar Sirisilla7ea8dc92013-12-22 16:35:05 -0800903 tANI_U8 probeCounter;
904 tANI_U8 maxProbe;
Agarwal Ashishb4ce9922014-11-04 18:40:38 +0530905 tANI_U8 retryPacketCnt;
Rashmi Ramannad3a03bf2013-12-31 18:33:24 +0530906
907 // Flag to debug remain on channel
908 tANI_BOOLEAN gDebugP2pRemainOnChannel;
909 /* Sequence number to keep track of
910 * start and end of remain on channel
911 * debug marker frame.
912 */
913 tANI_U32 remOnChnSeqNum;
Ganesh Kondabattini10e67352015-03-16 17:41:57 +0530914 tANI_U32 txBdToken;
Pradeep Reddy POTTETI31505892015-04-16 16:47:54 +0530915 tANI_U32 EnableTdls2040BSSCoexIE;
Sreelakshmi Konamki60ccfb32016-07-08 12:53:12 +0530916 tLimStaBAInfo staBaInfo[WLAN_MAX_STA_COUNT];
Jeff Johnson295189b2012-06-20 16:38:30 -0700917} tAniSirLim, *tpAniSirLim;
918
Jeff Johnson295189b2012-06-20 16:38:30 -0700919typedef struct sLimMgmtFrameRegistration
920{
921 vos_list_node_t node; // MUST be first element
922 tANI_U16 frameType;
923 tANI_U16 matchLen;
924 tANI_U16 sessionId;
925 tANI_U8 matchData[1];
926} tLimMgmtFrameRegistration, *tpLimMgmtFrameRegistration;
Jeff Johnson295189b2012-06-20 16:38:30 -0700927
928#if defined WLAN_FEATURE_VOWIFI
929typedef struct sRrmContext
930{
931 tRrmSMEContext rrmSmeContext;
932 tRrmPEContext rrmPEContext;
933}tRrmContext, *tpRrmContext;
934#endif
935
936#if defined WLAN_FEATURE_VOWIFI_11R
937typedef struct sFTContext
938{
939 tftSMEContext ftSmeContext;
940 tftPEContext ftPEContext;
941} tftContext, *tpFTContext;
942#endif
943
Kapil Gupta956c0c42017-06-16 19:24:31 +0530944typedef struct assoc_rsp_tx_context
945{
946 vos_list_node_t node;
947 tANI_U8 psessionID;
948 tANI_U16 staId;
949 tANI_U32 txBdToken;
950} assoc_rsp_tx_context;
951
Jeff Johnson295189b2012-06-20 16:38:30 -0700952//Check if this definition can actually move here even for Volans. In that case
953//this featurization can be removed.
954/** ------------------------------------------------------------------------- *
955
956 \typedef tDriverType
957
958 \brief Indicate the driver type to the mac, and based on this do
959 appropriate initialization.
960
961 -------------------------------------------------------------------------- */
962
963typedef enum
964{
965 eDRIVER_TYPE_PRODUCTION = 0,
966 eDRIVER_TYPE_MFG = 1,
967 eDRIVER_TYPE_DVT = 2
968} tDriverType;
969
970/** ------------------------------------------------------------------------- *
971
972 \typedef tMacOpenParameters
973
974 \brief Parameters needed for Enumeration of all status codes returned by the higher level
975 interface functions.
976
977 -------------------------------------------------------------------------- */
978
979typedef struct sMacOpenParameters
980{
981 tANI_U16 maxStation;
982 tANI_U16 maxBssId;
983 tANI_U32 frameTransRequired;
984 tDriverType driverType;
985} tMacOpenParameters;
986
Jeff Johnson295189b2012-06-20 16:38:30 -0700987typedef struct sHalMacStartParameters
988{
989 // parametes for the Firmware
990 //tHalFirmwareParameters FW;
991 tDriverType driverType;
992
993} tHalMacStartParameters;
Jeff Johnson295189b2012-06-20 16:38:30 -0700994
Sushant Kaushik9e923872015-04-02 17:09:31 +0530995typedef enum
996{
997 LIM_AUTH_ACK_NOT_RCD,
998 LIM_AUTH_ACK_RCD_SUCCESS,
999 LIM_AUTH_ACK_RCD_FAILURE,
1000} tAuthAckStatus;
1001
Jeff Johnson295189b2012-06-20 16:38:30 -07001002// -------------------------------------------------------------------
1003/// MAC Sirius parameter structure
1004typedef struct sAniSirGlobal
1005
1006{
1007 tDriverType gDriverType;
Jeff Johnson295189b2012-06-20 16:38:30 -07001008
1009 // we should be able to save this hddHandle in here and deprecate
1010 // the pAdapter. For now, compiles are a problem because there
1011 // are dependencides on the header files that are not handling the
1012 // compiler very gracefully.
1013// tHddHandle hHdd; // Handle to the HDD.
1014 //void *hHdd;
1015 void *pAdapter; // deprecate this pAdapter pointer eventually...
1016 // all interfaces to the HDD should pass hHdd, which
1017 // is stored in this struct above.....
1018 tSirMbMsg* pResetMsg;
1019 tAniSirCfg cfg;
1020 tAniSirLim lim;
Jeff Johnson295189b2012-06-20 16:38:30 -07001021 tAniSirPmm pmm;
1022 tAniSirSch sch;
1023 tAniSirSys sys;
1024 tAniSirUtils utils;
Jeff Johnson295189b2012-06-20 16:38:30 -07001025 // PAL/HDD handle
1026 tHddHandle hHdd;
1027
1028#ifdef ANI_DVT_DEBUG
1029 tAniSirDvt dvt;
1030#endif
1031
1032 tSmeStruct sme;
1033 tCsrScanStruct scan;
1034 tCsrRoamStruct roam;
1035
Jeff Johnsone7245742012-09-05 17:12:55 -07001036#ifdef FEATURE_OEM_DATA_SUPPORT
1037 tOemDataStruct oemData;
1038#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001039 tPmcInfo pmc;
1040 tSmeBtcInfo btc;
Jeff Johnson295189b2012-06-20 16:38:30 -07001041
1042 tCcm ccm;
1043
1044#if defined WLAN_FEATURE_VOWIFI
1045 tRrmContext rrm;
1046#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001047#ifdef WLAN_FEATURE_CONCURRENT_P2P
1048 tp2pContext p2pContext[MAX_NO_OF_P2P_SESSIONS];
1049#else
1050 tp2pContext p2pContext;
1051#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001052
1053#if defined WLAN_FEATURE_VOWIFI_11R
1054 tftContext ft;
1055#endif
Kapil Gupta956c0c42017-06-16 19:24:31 +05301056 vos_list_t assoc_rsp_completion_list;
Jeff Johnson295189b2012-06-20 16:38:30 -07001057 tANI_U32 gCurrentLogSize;
1058 tANI_U32 menuCurrent;
1059 /* logDump specific */
1060 tANI_U32 dumpTablecurrentId;
1061 /* Instead of static allocation I will dyanamically allocate memory for dumpTableEntry
1062 Thinking of using linkedlist */
1063 tDumpModuleEntry *dumpTableEntry[MAX_DUMP_TABLE_ENTRY];
Gopichand Nakkalaccd3a382013-03-19 13:56:10 -07001064#ifdef FEATURE_WLAN_TDLS
1065 v_BOOL_t isTdlsPowerSaveProhibited;
1066#endif
Gopichand Nakkala86e42662013-06-11 17:44:11 +05301067 tANI_U8 fScanOffload;
Abhishek Singh00b71972016-01-07 10:51:04 +05301068#ifdef WLAN_FEATURE_RMC
1069 tLimRmcContext rmcContext;
1070#endif /* WLAN_FEATURE_RMC */
krunal sonie9002db2013-11-25 14:24:17 -08001071 tANI_U8 isCoalesingInIBSSAllowed;
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -08001072 tANI_U32 fEnableDebugLog;
Rashmi Ramanna68b309c2014-05-20 11:52:22 +05301073 tANI_U32 fDeferIMPSTime;
1074 tANI_BOOLEAN deferImps;
Abhishek Singh6d5d29c2014-07-03 14:25:22 +05301075
1076#ifdef WLAN_FEATURE_11AC
1077 /* Alow Mu BFormee session only if MU BF session doesnt exist.
1078 */
1079 v_BOOL_t isMuBfsessionexist;
1080#endif
1081
c_hpothu3ba2a512014-08-06 14:02:54 +05301082 v_BOOL_t isCoexScoIndSet;
Ganesh Kondabattini8f6e3b32014-08-25 16:07:54 +05301083 v_U8_t miracast_mode;
Chandrasekaran, Manishekar5cb0acd2014-12-23 20:06:52 +05301084 v_U8_t fBtcEnableIndTimerVal;
Girish Gowli1c2fc802015-01-19 16:18:07 +05301085 v_U8_t roamDelayStatsEnabled;
Abhishek Singh01c73d12015-03-12 15:13:44 +05301086 tANI_BOOLEAN miracastVendorConfig;
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +05301087 v_BOOL_t fActiveScanOnDFSChannels;
Sushant Kaushik9e923872015-04-02 17:09:31 +05301088 tAuthAckStatus authAckStatus;
Abhishek Singh7d624e12015-11-30 14:29:27 +05301089 sir_mgmt_frame_ind_callback mgmt_frame_ind_cb;
Kapil Gupta04ab1992016-06-26 13:36:51 +05301090#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1091 v_U8_t PERroamCandidatesCnt;
1092 tSirCandidateChanInfo candidateChannelInfo[SIR_PER_ROAM_MAX_CANDIDATE_CNT];
1093 tSirRoamAPInfo previousRoamApInfo[SIR_PER_ROAM_MAX_CANDIDATE_CNT];
1094 v_U32_t PERroamTimeout;
1095 v_U32_t currentBssScore;
1096#endif
Agrawal Ashish17ef5082016-10-17 18:33:21 +05301097#ifdef SAP_AUTH_OFFLOAD
1098 bool sap_auth_offload;
1099 uint32_t sap_auth_offload_sec_type;
1100#endif /* SAP_AUTH_OFFLOAD */
Aggarwal, Nishank2dbbd3d2017-01-05 15:32:47 +05301101 bool max_power_cmd_pending;
Paul Zhang83289792017-02-28 18:58:52 +08001102 uint32_t sta_auth_retries_for_code17;
Ganesh Kondabattinie3ac17f2017-11-30 15:09:07 +05301103 uint32_t sta_sap_scc_on_dfs_chan;
Yeshwanth Sriram Guntukad3a9fc52018-01-10 15:09:49 +05301104 bool force_scc_with_ecsa;
Jeff Johnson295189b2012-06-20 16:38:30 -07001105} tAniSirGlobal;
1106
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001107#ifdef FEATURE_WLAN_TDLS
Jeff Johnson295189b2012-06-20 16:38:30 -07001108
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001109#define RFC1042_HDR_LENGTH (6)
1110#define GET_BE16(x) ((tANI_U16) (((x)[0] << 8) | (x)[1]))
1111#define ETH_TYPE_89_0d (0x890d)
1112#define ETH_TYPE_LEN (2)
1113#define PAYLOAD_TYPE_TDLS_SIZE (1)
1114#define PAYLOAD_TYPE_TDLS (2)
1115
1116#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001117
1118#endif /* _ANIGLOBAL_H */
1119