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