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