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