Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
Srinivas Girigowda | d65dc5a | 2016-01-14 17:08:26 -0800 | [diff] [blame] | 2 | * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -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 | */ |
| 21 | |
| 22 | /* |
| 23 | * This file was originally distributed by Qualcomm Atheros, Inc. |
| 24 | * under proprietary terms before Copyright ownership was assigned |
| 25 | * to the Linux Foundation. |
| 26 | */ |
| 27 | |
| 28 | #if !defined(__LIM_SESSION_H) |
| 29 | #define __LIM_SESSION_H |
| 30 | |
| 31 | /**========================================================================= |
| 32 | |
| 33 | \file lim_session.h |
| 34 | |
| 35 | \brief prototype for lim Session related APIs |
| 36 | |
| 37 | \author Sunit Bhatia |
| 38 | |
| 39 | ========================================================================*/ |
| 40 | |
| 41 | /* Powersave Offload Implementation */ |
| 42 | typedef enum ePowersaveState { |
| 43 | PMM_FULL_POWER, |
| 44 | PMM_POWER_SAVE |
| 45 | } tPowersaveState; |
| 46 | |
| 47 | /* Master Structure: This will be part of PE Session Entry */ |
| 48 | typedef struct sPowersaveoffloadInfo { |
| 49 | tPowersaveState psstate; |
| 50 | uint8_t bcnmiss; |
| 51 | } tPowersaveoffloadInfo, tpPowersaveoffloadInfo; |
| 52 | |
| 53 | #ifdef WLAN_FEATURE_11W |
| 54 | typedef struct tagComebackTimerInfo { |
| 55 | tpAniSirGlobal pMac; |
| 56 | uint8_t sessionID; |
| 57 | tLimMlmStates limPrevMlmState; /* Previous MLM State */ |
| 58 | tLimSmeStates limMlmState; /* MLM State */ |
| 59 | } tComebackTimerInfo; |
| 60 | #endif /* WLAN_FEATURE_11W */ |
| 61 | /*-------------------------------------------------------------------------- |
| 62 | Include Files |
| 63 | ------------------------------------------------------------------------*/ |
| 64 | |
| 65 | /*-------------------------------------------------------------------------- |
| 66 | Preprocessor definitions and constants |
| 67 | ------------------------------------------------------------------------*/ |
Srinivas Girigowda | d65dc5a | 2016-01-14 17:08:26 -0800 | [diff] [blame] | 68 | /* Maximum Number of WEP KEYS */ |
| 69 | #define MAX_WEP_KEYS 4 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 70 | |
| 71 | /* Maximum allowable size of a beacon frame */ |
| 72 | #define SCH_MAX_BEACON_SIZE 512 |
| 73 | |
| 74 | #define SCH_MAX_PROBE_RESP_SIZE 512 |
| 75 | #define SCH_PROTECTION_RESET_TIME 4000 |
| 76 | |
| 77 | /*-------------------------------------------------------------------------- |
| 78 | Type declarations |
| 79 | ------------------------------------------------------------------------*/ |
| 80 | typedef struct { |
| 81 | tSirMacBeaconInterval beaconInterval; |
| 82 | uint8_t fShortPreamble; |
| 83 | uint8_t llaCoexist; |
| 84 | uint8_t llbCoexist; |
| 85 | uint8_t llgCoexist; |
| 86 | uint8_t ht20Coexist; |
| 87 | uint8_t llnNonGFCoexist; |
| 88 | uint8_t fRIFSMode; |
| 89 | uint8_t fLsigTXOPProtectionFullSupport; |
| 90 | uint8_t gHTObssMode; |
| 91 | } tBeaconParams, *tpBeaconParams; |
| 92 | |
| 93 | typedef struct sPESession /* Added to Support BT-AMP */ |
| 94 | { |
| 95 | /* To check session table is in use or free */ |
| 96 | uint8_t available; |
| 97 | uint16_t peSessionId; |
| 98 | uint8_t smeSessionId; |
| 99 | uint16_t transactionId; |
| 100 | |
| 101 | /* In AP role: BSSID and selfMacAddr will be the same. */ |
| 102 | /* In STA role: they will be different */ |
| 103 | tSirMacAddr bssId; |
| 104 | tSirMacAddr selfMacAddr; |
| 105 | tSirMacSSid ssId; |
| 106 | uint8_t bssIdx; |
| 107 | uint8_t valid; |
| 108 | tLimMlmStates limMlmState; /* MLM State */ |
| 109 | tLimMlmStates limPrevMlmState; /* Previous MLM State */ |
| 110 | tLimSmeStates limSmeState; /* SME State */ |
| 111 | tLimSmeStates limPrevSmeState; /* Previous SME State */ |
| 112 | tLimSystemRole limSystemRole; |
| 113 | tSirBssType bssType; |
| 114 | uint8_t operMode; /* AP - 0; STA - 1 ; */ |
| 115 | tSirNwType nwType; |
| 116 | tpSirSmeStartBssReq pLimStartBssReq; /* handle to smestart bss req */ |
| 117 | tpSirSmeJoinReq pLimJoinReq; /* handle to sme join req */ |
| 118 | tpSirSmeJoinReq pLimReAssocReq; /* handle to sme reassoc req */ |
| 119 | tpLimMlmJoinReq pLimMlmJoinReq; /* handle to MLM join Req */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 120 | void *pLimMlmReassocRetryReq; /* keep reasoc req for retry */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 121 | void *pLimMlmReassocReq; /* handle to MLM reassoc Req */ |
| 122 | uint16_t channelChangeReasonCode; |
| 123 | uint8_t dot11mode; |
| 124 | uint8_t htCapability; |
| 125 | /* Supported Channel Width Set: 0-20MHz 1 - 40MHz */ |
| 126 | uint8_t htSupportedChannelWidthSet; |
| 127 | /* Recommended Tx Width Set |
| 128 | * 0 - use 20 MHz channel (control channel) |
| 129 | * 1 - use channel width enabled under Supported Channel Width Set |
| 130 | */ |
| 131 | uint8_t htRecommendedTxWidthSet; |
| 132 | /* Identifies the 40 MHz extension channel */ |
| 133 | ePhyChanBondState htSecondaryChannelOffset; |
| 134 | tSirRFBand limRFBand; |
| 135 | uint8_t limIbssActive; /* TO SUPPORT CONCURRENCY */ |
| 136 | |
| 137 | /* These global varibales moved to session Table to support BT-AMP : Oct 9th review */ |
| 138 | tAniAuthType limCurrentAuthType; |
| 139 | uint16_t limCurrentBssCaps; |
| 140 | uint8_t limCurrentBssQosCaps; |
| 141 | uint16_t limCurrentBssPropCap; |
| 142 | uint8_t limSentCapsChangeNtf; |
| 143 | uint16_t limAID; |
| 144 | |
| 145 | /* Parameters For Reassociation */ |
| 146 | tSirMacAddr limReAssocbssId; |
| 147 | tSirMacChanNum limReassocChannelId; |
| 148 | /* CB paramaters required/duplicated for Reassoc since re-assoc mantains its own params in lim */ |
| 149 | uint8_t reAssocHtSupportedChannelWidthSet; |
| 150 | uint8_t reAssocHtRecommendedTxWidthSet; |
| 151 | ePhyChanBondState reAssocHtSecondaryChannelOffset; |
| 152 | tSirMacSSid limReassocSSID; |
| 153 | uint16_t limReassocBssCaps; |
| 154 | uint8_t limReassocBssQosCaps; |
| 155 | uint16_t limReassocBssPropCap; |
| 156 | |
| 157 | /* Assoc or ReAssoc Response Data/Frame */ |
| 158 | void *limAssocResponseData; |
| 159 | |
| 160 | /** BSS Table parameters **/ |
| 161 | |
| 162 | /* |
| 163 | * staId: Start BSS: this is the Sta Id for the BSS. |
| 164 | * Join: this is the selfStaId |
| 165 | * In both cases above, the peer STA ID wll be stored in dph hash table. |
| 166 | */ |
| 167 | uint16_t staId; |
| 168 | uint16_t statypeForBss; /* to know session is for PEER or SELF */ |
| 169 | uint8_t shortSlotTimeSupported; |
| 170 | uint8_t dtimPeriod; |
| 171 | tSirMacRateSet rateSet; |
| 172 | tSirMacRateSet extRateSet; |
| 173 | tSirMacHTOperatingMode htOperMode; |
| 174 | uint8_t currentOperChannel; |
| 175 | uint8_t currentReqChannel; |
| 176 | uint8_t LimRxedBeaconCntDuringHB; |
| 177 | |
| 178 | /* Time stamp of the last beacon received from the BSS to which STA is connected. */ |
| 179 | uint64_t lastBeaconTimeStamp; |
| 180 | /* RX Beacon count for the current BSS to which STA is connected. */ |
| 181 | uint32_t currentBssBeaconCnt; |
| 182 | uint8_t lastBeaconDtimCount; |
| 183 | uint8_t lastBeaconDtimPeriod; |
| 184 | |
| 185 | uint32_t bcnLen; |
| 186 | uint8_t *beacon; /* Used to store last beacon / probe response before assoc. */ |
| 187 | |
| 188 | uint32_t assocReqLen; |
| 189 | uint8_t *assocReq; /* Used to store association request frame sent out while associating. */ |
| 190 | |
| 191 | uint32_t assocRspLen; |
| 192 | uint8_t *assocRsp; /* Used to store association response received while associating */ |
| 193 | tAniSirDph dph; |
| 194 | void **parsedAssocReq; /* Used to store parsed assoc req from various requesting station */ |
| 195 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 196 | uint32_t RICDataLen; /* Used to store the Ric data received in the assoc response */ |
| 197 | uint8_t *ricData; |
| 198 | #endif |
| 199 | #ifdef FEATURE_WLAN_ESE |
| 200 | uint32_t tspecLen; /* Used to store the TSPEC IEs received in the assoc response */ |
| 201 | uint8_t *tspecIes; |
| 202 | #endif |
| 203 | uint32_t encryptType; |
| 204 | |
| 205 | bool bTkipCntrMeasActive; /* Used to keep record of TKIP counter measures start/stop */ |
| 206 | |
| 207 | uint8_t gLimProtectionControl; /* used for 11n protection */ |
| 208 | |
| 209 | uint8_t gHTNonGFDevicesPresent; |
| 210 | |
| 211 | /* protection related config cache */ |
| 212 | tCfgProtection cfgProtection; |
| 213 | |
| 214 | /* Number of legacy STAs associated */ |
| 215 | tLimProtStaParams gLim11bParams; |
| 216 | |
| 217 | /* Number of 11A STAs associated */ |
| 218 | tLimProtStaParams gLim11aParams; |
| 219 | |
| 220 | /* Number of non-ht non-legacy STAs associated */ |
| 221 | tLimProtStaParams gLim11gParams; |
| 222 | |
| 223 | /* Number of nonGf STA associated */ |
| 224 | tLimProtStaParams gLimNonGfParams; |
| 225 | |
| 226 | /* Number of HT 20 STAs associated */ |
| 227 | tLimProtStaParams gLimHt20Params; |
| 228 | |
| 229 | /* Number of Lsig Txop not supported STAs associated */ |
| 230 | tLimProtStaParams gLimLsigTxopParams; |
| 231 | |
| 232 | /* Number of STAs that do not support short preamble */ |
| 233 | tLimNoShortParams gLimNoShortParams; |
| 234 | |
| 235 | /* Number of STAs that do not support short slot time */ |
| 236 | tLimNoShortSlotParams gLimNoShortSlotParams; |
| 237 | |
| 238 | /* OLBC parameters */ |
| 239 | tLimProtStaParams gLimOlbcParams; |
| 240 | |
| 241 | /* OLBC parameters */ |
| 242 | tLimProtStaParams gLimOverlap11gParams; |
| 243 | |
| 244 | tLimProtStaParams gLimOverlap11aParams; |
| 245 | tLimProtStaParams gLimOverlapHt20Params; |
| 246 | tLimProtStaParams gLimOverlapNonGfParams; |
| 247 | |
| 248 | /* cache for each overlap */ |
| 249 | tCacheParams protStaCache[LIM_PROT_STA_CACHE_SIZE]; |
| 250 | |
| 251 | uint8_t privacy; |
| 252 | tAniAuthType authType; |
Srinivas Girigowda | d65dc5a | 2016-01-14 17:08:26 -0800 | [diff] [blame] | 253 | tSirKeyMaterial WEPKeyMaterial[MAX_WEP_KEYS]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 254 | |
| 255 | tDot11fIERSN gStartBssRSNIe; |
| 256 | tDot11fIEWPA gStartBssWPAIe; |
| 257 | tSirAPWPSIEs APWPSIEs; |
| 258 | uint8_t apUapsdEnable; |
| 259 | tSirWPSPBCSession *pAPWPSPBCSession; |
| 260 | uint32_t DefProbeRspIeBitmap[8]; |
| 261 | uint32_t proxyProbeRspEn; |
| 262 | tDot11fProbeResponse probeRespFrame; |
| 263 | uint8_t ssidHidden; |
| 264 | bool fwdWPSPBCProbeReq; |
| 265 | uint8_t wps_state; |
| 266 | |
| 267 | uint8_t limQosEnabled:1; /* 11E */ |
| 268 | uint8_t limWmeEnabled:1; /* WME */ |
| 269 | uint8_t limWsmEnabled:1; /* WSM */ |
| 270 | uint8_t limHcfEnabled:1; |
| 271 | uint8_t lim11dEnabled:1; |
| 272 | #ifdef WLAN_FEATURE_11W |
| 273 | uint8_t limRmfEnabled:1; /* 11W */ |
| 274 | #endif |
| 275 | uint32_t lim11hEnable; |
| 276 | |
Amar Singhal | a297bfa | 2015-10-15 15:07:29 -0700 | [diff] [blame] | 277 | int8_t maxTxPower; /* MIN (Regulatory and local power constraint) */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame^] | 278 | enum tQDF_ADAPTER_MODE pePersona; |
Amar Singhal | a297bfa | 2015-10-15 15:07:29 -0700 | [diff] [blame] | 279 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 280 | #if defined WLAN_FEATURE_VOWIFI |
Amar Singhal | a297bfa | 2015-10-15 15:07:29 -0700 | [diff] [blame] | 281 | int8_t txMgmtPower; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 282 | #endif |
| 283 | |
| 284 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 285 | tAniBool is11Rconnection; |
| 286 | #endif |
| 287 | |
| 288 | #ifdef FEATURE_WLAN_ESE |
| 289 | tAniBool isESEconnection; |
| 290 | tEsePEContext eseContext; |
| 291 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 292 | tAniBool isFastTransitionEnabled; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 293 | tAniBool isFastRoamIniFeatureEnabled; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 294 | tSirNoAParam p2pNoA; |
| 295 | tSirP2PNoaAttr p2pGoPsUpdate; |
| 296 | uint32_t defaultAuthFailureTimeout; |
| 297 | tSirP2PNoaStart p2pGoPsNoaStartInd; |
| 298 | |
| 299 | /* EDCA QoS parameters |
| 300 | * gLimEdcaParams - These EDCA parameters are used locally on AP or STA. |
| 301 | * If STA, then these are values taken from the Assoc Rsp when associating, |
| 302 | * or Beacons/Probe Response after association. If AP, then these are |
| 303 | * values originally set locally on AP. |
| 304 | * |
| 305 | * gLimEdcaParamsBC - These EDCA parameters are use by AP to broadcast |
| 306 | * to other STATIONs in the BSS. |
| 307 | * |
| 308 | * gLimEdcaParamsActive: These EDCA parameters are what's actively being |
| 309 | * used on station. Specific AC values may be downgraded depending on |
| 310 | * admission control for that particular AC. |
| 311 | */ |
| 312 | tSirMacEdcaParamRecord gLimEdcaParams[MAX_NUM_AC]; /* used locally */ |
| 313 | tSirMacEdcaParamRecord gLimEdcaParamsBC[MAX_NUM_AC]; /* used for broadcast */ |
| 314 | tSirMacEdcaParamRecord gLimEdcaParamsActive[MAX_NUM_AC]; |
| 315 | |
| 316 | uint8_t gLimEdcaParamSetCount; |
| 317 | |
| 318 | tBeaconParams beaconParams; |
| 319 | uint8_t vhtCapability; |
| 320 | uint8_t vhtTxChannelWidthSet; |
| 321 | tLimOperatingModeInfo gLimOperatingMode; |
| 322 | uint8_t vhtCapabilityPresentInBeacon; |
| 323 | uint8_t ch_center_freq_seg0; |
| 324 | phy_ch_width ch_width; |
| 325 | uint8_t ch_center_freq_seg1; |
| 326 | uint8_t txBFIniFeatureEnabled; |
Kiran Kumar Lokere | 5302ab6 | 2015-12-16 16:03:16 -0800 | [diff] [blame] | 327 | uint8_t txbf_csn_value; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 328 | uint8_t txMuBformee; |
| 329 | uint8_t enableVhtpAid; |
| 330 | uint8_t enableVhtGid; |
| 331 | uint8_t enable_su_tx_bformer; |
| 332 | tLimWiderBWChannelSwitchInfo gLimWiderBWChannelSwitch; |
| 333 | uint8_t enableAmpduPs; |
| 334 | uint8_t enableHtSmps; |
| 335 | uint8_t htSmpsvalue; |
| 336 | uint8_t spectrumMgtEnabled; |
| 337 | /* *********************11H related**************************** */ |
| 338 | tLimSpecMgmtInfo gLimSpecMgmt; |
| 339 | /* CB Primary/Secondary Channel Switch Info */ |
| 340 | tLimChannelSwitchInfo gLimChannelSwitch; |
| 341 | /* *********************End 11H related**************************** */ |
| 342 | |
| 343 | /*Flag to Track Status/Indicate HBFailure on this session */ |
| 344 | bool LimHBFailureStatus; |
| 345 | uint32_t gLimPhyMode; |
| 346 | uint8_t amsduSupportedInBA; |
| 347 | uint8_t txLdpcIniFeatureEnabled; |
| 348 | /** |
| 349 | * Following is the place holder for free peer index pool. |
| 350 | * A non-zero value indicates that peer index is available |
| 351 | * for assignment. |
| 352 | */ |
| 353 | uint8_t *gpLimPeerIdxpool; |
| 354 | uint8_t freePeerIdxHead; |
| 355 | uint8_t freePeerIdxTail; |
| 356 | uint16_t gLimNumOfCurrentSTAs; |
| 357 | #ifdef FEATURE_WLAN_TDLS |
| 358 | uint32_t peerAIDBitmap[2]; |
| 359 | bool tdls_prohibited; |
| 360 | bool tdls_chan_swit_prohibited; |
| 361 | #endif |
| 362 | bool fWaitForProbeRsp; |
| 363 | bool fIgnoreCapsChange; |
| 364 | bool fDeauthReceived; |
| 365 | #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM |
| 366 | int8_t rssi; |
| 367 | #endif |
| 368 | uint8_t isAmsduSupportInAMPDU; |
| 369 | uint8_t isCoalesingInIBSSAllowed; |
| 370 | |
| 371 | tSirHTConfig htConfig; |
| 372 | |
| 373 | /* |
| 374 | * Place holder for StartBssReq message |
| 375 | * received by SME state machine |
| 376 | */ |
| 377 | uint8_t gLimCurrentBssUapsd; |
| 378 | |
| 379 | /* Used on STA, this is a static UAPSD mask setting |
| 380 | * derived from SME_JOIN_REQ and SME_REASSOC_REQ. If a |
| 381 | * particular AC bit is set, it means the AC is both |
| 382 | * trigger enabled and delivery enabled. |
| 383 | */ |
| 384 | uint8_t gUapsdPerAcBitmask; |
| 385 | |
| 386 | /* Used on STA, this is a dynamic UPASD mask setting |
| 387 | * derived from AddTS Rsp and DelTS frame. If a |
| 388 | * particular AC bit is set, it means AC is trigger |
| 389 | * enabled. |
| 390 | */ |
| 391 | uint8_t gUapsdPerAcTriggerEnableMask; |
| 392 | |
| 393 | /* Used on STA, dynamic UPASD mask setting |
| 394 | * derived from AddTS Rsp and DelTs frame. If |
| 395 | * a particular AC bit is set, it means AC is |
| 396 | * delivery enabled. |
| 397 | */ |
| 398 | uint8_t gUapsdPerAcDeliveryEnableMask; |
| 399 | |
| 400 | /* Flag to skip CSA IE processing when CSA |
| 401 | * offload is enabled. |
| 402 | */ |
| 403 | uint8_t csaOffloadEnable; |
| 404 | |
| 405 | /* Used on STA for AC downgrade. This is a dynamic mask |
| 406 | * setting which keep tracks of ACs being admitted. |
| 407 | * If bit is set to 0: That partiular AC is not admitted |
| 408 | * If bit is set to 1: That particular AC is admitted |
| 409 | */ |
| 410 | uint8_t gAcAdmitMask[SIR_MAC_DIRECTION_DIRECT]; |
| 411 | |
| 412 | /* Power Save Off load Parameters */ |
| 413 | tPowersaveoffloadInfo pmmOffloadInfo; |
| 414 | /* SMPS mode */ |
| 415 | uint8_t smpsMode; |
| 416 | |
| 417 | uint8_t chainMask; |
| 418 | |
| 419 | /* Flag to indicate Chan Sw announcement is required */ |
| 420 | uint8_t dfsIncludeChanSwIe; |
| 421 | |
| 422 | /* Flag to indicate Chan Wrapper Element is required */ |
| 423 | uint8_t dfsIncludeChanWrapperIe; |
| 424 | |
| 425 | #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH |
| 426 | uint8_t cc_switch_mode; |
| 427 | #endif |
| 428 | |
| 429 | bool isCiscoVendorAP; |
| 430 | |
| 431 | tSirAddIeParams addIeParams; |
| 432 | |
| 433 | uint8_t *pSchProbeRspTemplate; |
| 434 | /* Beginning portion of the beacon frame to be written to TFP */ |
| 435 | uint8_t *pSchBeaconFrameBegin; |
| 436 | /* Trailing portion of the beacon frame to be written to TFP */ |
| 437 | uint8_t *pSchBeaconFrameEnd; |
| 438 | /* Size of the beginning portion */ |
| 439 | uint16_t schBeaconOffsetBegin; |
| 440 | /* Size of the trailing portion */ |
| 441 | uint16_t schBeaconOffsetEnd; |
| 442 | bool isOSENConnection; |
| 443 | /* DSCP to UP mapping for HS 2.0 */ |
| 444 | tSirQosMapSet QosMapSet; |
| 445 | |
| 446 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
| 447 | bool bRoamSynchInProgress; |
| 448 | #endif |
| 449 | |
| 450 | #if defined WLAN_FEATURE_VOWIFI_11R |
| 451 | /* Fast Transition (FT) */ |
| 452 | tftPEContext ftPEContext; |
| 453 | #endif |
| 454 | bool isNonRoamReassoc; |
| 455 | #ifdef WLAN_FEATURE_11W |
| 456 | cdf_mc_timer_t pmfComebackTimer; |
| 457 | tComebackTimerInfo pmfComebackTimerInfo; |
| 458 | #endif /* WLAN_FEATURE_11W */ |
| 459 | uint8_t is_key_installed; |
| 460 | /* timer for reseting protection fileds at regular intervals */ |
| 461 | cdf_mc_timer_t protection_fields_reset_timer; |
| 462 | void *mac_ctx; |
| 463 | /* |
| 464 | * variable to store state of various protection struct like |
| 465 | * gLimOlbcParams, gLimOverlap11gParams, gLimOverlapHt20Params etc |
| 466 | */ |
| 467 | uint16_t old_protection_state; |
| 468 | tSirMacAddr prev_ap_bssid; |
| 469 | #ifdef FEATURE_AP_MCC_CH_AVOIDANCE |
| 470 | /* tells if Q2Q IE, from another MDM device in AP MCC mode was recvd */ |
| 471 | bool sap_advertise_avoid_ch_ie; |
| 472 | #endif /* FEATURE_AP_MCC_CH_AVOIDANCE */ |
| 473 | #ifdef FEATURE_WLAN_ESE |
| 474 | uint8_t is_ese_version_ie_present; |
| 475 | #endif |
| 476 | uint8_t sap_dot11mc; |
| 477 | bool is_vendor_specific_vhtcaps; |
| 478 | uint8_t vendor_specific_vht_ie_type; |
| 479 | uint8_t vendor_specific_vht_ie_sub_type; |
| 480 | /* flag to indicate country code in beacon */ |
| 481 | uint8_t country_info_present; |
| 482 | uint8_t nss; |
Abhishek Singh | 96bda8e | 2015-12-03 16:45:35 +0530 | [diff] [blame] | 483 | bool add_bss_failed; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 484 | } tPESession, *tpPESession; |
| 485 | |
| 486 | /*------------------------------------------------------------------------- |
| 487 | Function declarations and documenation |
| 488 | ------------------------------------------------------------------------*/ |
| 489 | |
| 490 | /** |
| 491 | * pe_create_session() - creates a new PE session given the BSSID |
| 492 | * |
| 493 | * @pMac: pointer to global adapter context |
| 494 | * @bssid: BSSID of the new session |
| 495 | * @sessionId: session ID is returned here, if session is created. |
| 496 | * @numSta: number of stations |
| 497 | * @bssType: bss type of new session to do conditional memory allocation. |
| 498 | * |
| 499 | * This function returns the session context and the session ID if the session |
| 500 | * corresponding to the passed BSSID is found in the PE session table. |
| 501 | * |
| 502 | * Return: ptr to the session context or NULL if session can not be created. |
| 503 | */ |
| 504 | tpPESession pe_create_session(tpAniSirGlobal pMac, |
| 505 | uint8_t *bssid, |
| 506 | uint8_t *sessionId, |
| 507 | uint16_t numSta, tSirBssType bssType); |
| 508 | |
| 509 | /** |
| 510 | * pe_find_session_by_bssid() - looks up the PE session given the BSSID. |
| 511 | * |
| 512 | * @pMac: pointer to global adapter context |
| 513 | * @bssid: BSSID of the new session |
| 514 | * @sessionId: session ID is returned here, if session is created. |
| 515 | * |
| 516 | * This function returns the session context and the session ID if the session |
| 517 | * corresponding to the given BSSID is found in the PE session table. |
| 518 | * |
| 519 | * Return: pointer to the session context or NULL if session is not found. |
| 520 | */ |
| 521 | tpPESession pe_find_session_by_bssid(tpAniSirGlobal pMac, uint8_t *bssid, |
| 522 | uint8_t *sessionId); |
| 523 | |
| 524 | /** |
| 525 | * pe_find_session_by_bss_idx() - looks up the PE session given the bssIdx. |
| 526 | * |
| 527 | * @pMac: pointer to global adapter context |
| 528 | * @bssIdx: bss index of the session |
| 529 | * |
| 530 | * This function returns the session context if the session |
| 531 | * corresponding to the given bssIdx is found in the PE session table. |
| 532 | * |
| 533 | * Return: pointer to the session context or NULL if session is not found. |
| 534 | */ |
| 535 | tpPESession pe_find_session_by_bss_idx(tpAniSirGlobal pMac, uint8_t bssIdx); |
| 536 | |
| 537 | /** |
| 538 | * pe_find_session_by_peer_sta() - looks up the PE session given the Peer |
| 539 | * Station Address. |
| 540 | * |
| 541 | * @pMac: pointer to global adapter context |
| 542 | * @sa: Peer STA Address of the session |
| 543 | * @sessionId: session ID is returned here, if session is found. |
| 544 | * |
| 545 | * This function returns the session context and the session ID if the session |
| 546 | * corresponding to the given destination address is found in the PE session |
| 547 | * table. |
| 548 | * |
| 549 | * Return: pointer to the session context or NULL if session is not found. |
| 550 | */ |
| 551 | tpPESession pe_find_session_by_peer_sta(tpAniSirGlobal pMac, uint8_t *sa, |
| 552 | uint8_t *sessionId); |
| 553 | |
| 554 | /** |
| 555 | * pe_find_session_by_session_id() - looks up the PE session given the session |
| 556 | * ID. |
| 557 | * |
| 558 | * @pMac: pointer to global adapter context |
| 559 | * @sessionId: session ID for which session context needs to be looked up. |
| 560 | * |
| 561 | * This function returns the session context if the session corresponding to |
| 562 | * the given session ID is found in the PE session table. |
| 563 | * |
| 564 | * Return: pointer to the session context or NULL if session is not found. |
| 565 | */ |
| 566 | tpPESession pe_find_session_by_session_id(tpAniSirGlobal pMac, |
| 567 | uint8_t sessionId); |
| 568 | |
| 569 | /** |
| 570 | * pe_find_session_by_bssid() - looks up the PE session given staid. |
| 571 | * |
| 572 | * @pMac: pointer to global adapter context |
| 573 | * @staid: StaId of the session |
| 574 | * @sessionId: session ID is returned here, if session is found. |
| 575 | * |
| 576 | * This function returns the session context and the session ID if the session |
| 577 | * corresponding to the given StaId is found in the PE session table. |
| 578 | * |
| 579 | * Return: pointer to the session context or NULL if session is not found. |
| 580 | */ |
| 581 | tpPESession pe_find_session_by_sta_id(tpAniSirGlobal pMac, uint8_t staid, |
| 582 | uint8_t *sessionId); |
| 583 | |
| 584 | /** |
| 585 | * pe_delete_session() - deletes the PE session given the session ID. |
| 586 | * |
| 587 | * @pMac: pointer to global adapter context |
| 588 | * @sessionId: session ID to delete. |
| 589 | * |
| 590 | * Return: void |
| 591 | */ |
| 592 | void pe_delete_session(tpAniSirGlobal pMac, tpPESession psessionEntry); |
| 593 | |
| 594 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 595 | /** |
| 596 | * pe_find_session_by_sme_session_id() - looks up the PE session for given sme |
| 597 | * session id |
| 598 | * @mac_ctx: pointer to global adapter context |
| 599 | * @sme_session_id: sme session id |
| 600 | * |
| 601 | * looks up the PE session for given sme session id |
| 602 | * |
| 603 | * Return: pe session entry for given sme session if found else NULL |
| 604 | */ |
| 605 | tpPESession pe_find_session_by_sme_session_id(tpAniSirGlobal mac_ctx, |
| 606 | uint8_t sme_session_id); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 607 | uint8_t pe_get_active_session_count(tpAniSirGlobal mac_ctx); |
| 608 | #endif /* #if !defined( __LIM_SESSION_H ) */ |