blob: 16b6bccc3e0bbf735ea1324cb24d45ddb25c108e [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Abhinav Kumar8eed0362019-08-05 14:26:07 +05302 * Copyright (c) 2012-2017, 2019 The Linux Foundation. All rights reserved.
Kiet Lam842dad02014-02-18 18:44:02 -08003 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
Gopichand Nakkala92f07d82013-01-08 21:16:34 -080020 */
Kiet Lam842dad02014-02-18 18:44:02 -080021
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
Jeff Johnson295189b2012-06-20 16:38:30 -070028#if !defined( __LIM_SESSION_H )
29#define __LIM_SESSION_H
30
31
32/**=========================================================================
Jeff Johnson3c3e1782013-02-27 10:48:42 -080033
Jeff Johnson295189b2012-06-20 16:38:30 -070034 \file limSession.h
Jeff Johnson3c3e1782013-02-27 10:48:42 -080035
Jeff Johnson295189b2012-06-20 16:38:30 -070036 \brief prototype for lim Session related APIs
37
38 \author Sunit Bhatia
Jeff Johnson295189b2012-06-20 16:38:30 -070039 ========================================================================*/
40
41
42/*--------------------------------------------------------------------------
43 Include Files
44 ------------------------------------------------------------------------*/
45
46
47
48/*--------------------------------------------------------------------------
49 Preprocessor definitions and constants
50 ------------------------------------------------------------------------*/
Jeff Johnson295189b2012-06-20 16:38:30 -070051#define NUM_WEP_KEYS 4
Jeff Johnson295189b2012-06-20 16:38:30 -070052
53/*--------------------------------------------------------------------------
54 Type declarations
55 ------------------------------------------------------------------------*/
56typedef struct
57{
58 tSirMacBeaconInterval beaconInterval;
59 tANI_U8 fShortPreamble;
60 tANI_U8 llaCoexist;
61 tANI_U8 llbCoexist;
62 tANI_U8 llgCoexist;
63 tANI_U8 ht20Coexist;
64 tANI_U8 llnNonGFCoexist;
65 tANI_U8 fRIFSMode;
66 tANI_U8 fLsigTXOPProtectionFullSupport;
67 tANI_U8 gHTObssMode;
68}tBeaconParams, *tpBeaconParams;
69
70typedef struct sPESession // Added to Support BT-AMP
71{
72 /* To check session table is in use or free*/
73 tANI_U8 available;
74 tANI_U8 peSessionId;
75 tANI_U8 smeSessionId;
76 tANI_U16 transactionId;
77
78 //In AP role: BSSID and selfMacAddr will be the same.
79 //In STA role: they will be different
80 tSirMacAddr bssId;
81 tSirMacAddr selfMacAddr;
82 tSirMacSSid ssId;
83 tANI_U8 bssIdx;
84 tANI_U8 valid;
85 tLimMlmStates limMlmState; //MLM State
86 tLimMlmStates limPrevMlmState; //Previous MLM State
87 tLimSmeStates limSmeState; //SME State
88 tLimSmeStates limPrevSmeState; //Previous SME State
89 tLimSystemRole limSystemRole;
90 tSirBssType bssType;
91 tANI_U8 operMode; // AP - 0; STA - 1 ;
92 tSirNwType nwType;
93 tpSirSmeStartBssReq pLimStartBssReq; //handle to smestart bss req
Sushant Kaushik74df8db2015-03-11 18:09:05 +053094 tANI_BOOLEAN bOSENAssociation; //handle to OSEN assoc req
Abhishek Singheef5c992016-01-27 13:41:54 +053095 tANI_BOOLEAN bWPSAssociation; //WPS Registration
Jeff Johnson295189b2012-06-20 16:38:30 -070096 tpSirSmeJoinReq pLimJoinReq; // handle to sme join req
Srinivas Girigowdac16730e2013-01-16 13:39:39 -080097 tpSirSmeJoinReq pLimReAssocReq; //handle to sme reassoc req
Jeff Johnson295189b2012-06-20 16:38:30 -070098 tpLimMlmJoinReq pLimMlmJoinReq; //handle to MLM join Req
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -080099#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudi61bc5662012-11-02 14:33:10 -0700100 void *pLimMlmReassocRetryReq; //keep reasoc req for retry
101#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700102 void *pLimMlmReassocReq; //handle to MLM reassoc Req
103 tANI_U16 channelChangeReasonCode;
Kalikinkar dhara085c02f2014-02-28 15:32:12 -0800104 tANI_U16 channelChangeCSA; // channel change flag for CSA
Jeff Johnson295189b2012-06-20 16:38:30 -0700105 tANI_U8 dot11mode;
Jeff Johnsone7245742012-09-05 17:12:55 -0700106 tANI_U8 htCapability;
107 /* Supported Channel Width Set: 0-20MHz 1 - 40MHz */
108 tANI_U8 htSupportedChannelWidthSet;
109 /* Recommended Tx Width Set
110 * 0 - use 20 MHz channel (control channel)
111 * 1 - use channel width enabled under Supported Channel Width Set
112 */
113 tANI_U8 htRecommendedTxWidthSet;
114 /* Identifies the 40 MHz extension channel */
115 ePhyChanBondState htSecondaryChannelOffset;
Jeff Johnson295189b2012-06-20 16:38:30 -0700116 tSirRFBand limRFBand;
117 tANI_U8 limIbssActive; //TO SUPPORT CONCURRENCY
118
119 /* These global varibales moved to session Table to support BT-AMP : Oct 9th review */
120 tAniAuthType limCurrentAuthType;
121 tANI_U16 limCurrentBssCaps;
122 tANI_U8 limCurrentBssQosCaps;
123 tANI_U16 limCurrentBssPropCap;
124 tANI_U8 limSentCapsChangeNtf;
Jeff Johnson295189b2012-06-20 16:38:30 -0700125 tANI_U16 limAID;
126
127 /* Parameters For Reassociation */
128 tSirMacAddr limReAssocbssId;
129 tSirMacChanNum limReassocChannelId;
Jeff Johnsone7245742012-09-05 17:12:55 -0700130 /* CB paramaters required/duplicated for Reassoc since re-assoc mantains its own params in lim */
131 tANI_U8 reAssocHtSupportedChannelWidthSet;
132 tANI_U8 reAssocHtRecommendedTxWidthSet;
133 ePhyChanBondState reAssocHtSecondaryChannelOffset;
Jeff Johnson295189b2012-06-20 16:38:30 -0700134 tSirMacSSid limReassocSSID;
135 tANI_U16 limReassocBssCaps;
136 tANI_U8 limReassocBssQosCaps;
137 tANI_U16 limReassocBssPropCap;
Jeff Johnson295189b2012-06-20 16:38:30 -0700138
139 // Assoc or ReAssoc Response Data/Frame
140 void *limAssocResponseData;
141
142
143
144 /** BSS Table parameters **/
145
146
147 /*
148 * staId: Start BSS: this is the Sta Id for the BSS.
149 Join: this is the selfStaId
150 In both cases above, the peer STA ID wll be stored in dph hash table.
151 */
152 tANI_U16 staId;
153 tANI_U16 statypeForBss; //to know session is for PEER or SELF
154 tANI_U8 shortSlotTimeSupported;
155 tANI_U8 dtimPeriod;
156 tSirMacRateSet rateSet;
157 tSirMacRateSet extRateSet;
158 tSirMacHTOperatingMode htOperMode;
159 tANI_U8 currentOperChannel;
160 tANI_U8 currentReqChannel;
161 tANI_U8 LimRxedBeaconCntDuringHB;
162
163 //Time stamp of the last beacon received from the BSS to which STA is connected.
164 tANI_U64 lastBeaconTimeStamp;
165 //RX Beacon count for the current BSS to which STA is connected.
166 tANI_U32 currentBssBeaconCnt;
167 tANI_U8 lastBeaconDtimCount;
168 tANI_U8 lastBeaconDtimPeriod;
169
170 tANI_U32 bcnLen;
171 tANI_U8 *beacon; //Used to store last beacon / probe response before assoc.
172
173 tANI_U32 assocReqLen;
174 tANI_U8 *assocReq; //Used to store association request frame sent out while associating.
175
176 tANI_U32 assocRspLen;
177 tANI_U8 *assocRsp; //Used to store association response received while associating
178 tAniSirDph dph;
179 void * *parsedAssocReq; //Used to store parsed assoc req from various requesting station
180#ifdef WLAN_FEATURE_VOWIFI_11R
181 tANI_U32 RICDataLen; //Used to store the Ric data received in the assoc response
182 tANI_U8 *ricData;
183#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800184#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -0700185 tANI_U32 tspecLen; //Used to store the TSPEC IEs received in the assoc response
186 tANI_U8 *tspecIes;
187#endif
188 tANI_U32 encryptType;
189
Jeff Johnson295189b2012-06-20 16:38:30 -0700190 tANI_BOOLEAN bTkipCntrMeasActive; // Used to keep record of TKIP counter measures start/stop
191
192 tANI_U8 gLimProtectionControl; //used for 11n protection
193
194 tANI_U8 gHTNonGFDevicesPresent;
195
196 //protection related config cache
197 tCfgProtection cfgProtection;
198
199 // Number of legacy STAs associated
200 tLimProtStaParams gLim11bParams;
201
202 // Number of 11A STAs associated
203 tLimProtStaParams gLim11aParams;
204
205 // Number of non-ht non-legacy STAs associated
206 tLimProtStaParams gLim11gParams;
207
208 //Number of nonGf STA associated
209 tLimProtStaParams gLimNonGfParams;
210
211 //Number of HT 20 STAs associated
212 tLimProtStaParams gLimHt20Params;
213
214 //Number of Lsig Txop not supported STAs associated
215 tLimProtStaParams gLimLsigTxopParams;
216
217 // Number of STAs that do not support short preamble
218 tLimNoShortParams gLimNoShortParams;
219
220 // Number of STAs that do not support short slot time
221 tLimNoShortSlotParams gLimNoShortSlotParams;
222
223
224 // OLBC parameters
225 tLimProtStaParams gLimOlbcParams;
226
227 // OLBC parameters
228 tLimProtStaParams gLimOverlap11gParams;
229
230 tLimProtStaParams gLimOverlap11aParams;
231 tLimProtStaParams gLimOverlapHt20Params;
232 tLimProtStaParams gLimOverlapNonGfParams;
233
234 //cache for each overlap
235 tCacheParams protStaCache[LIM_PROT_STA_CACHE_SIZE];
236
237 tANI_U8 privacy;
238 tAniAuthType authType;
239 tSirKeyMaterial WEPKeyMaterial[NUM_WEP_KEYS];
240
241 tDot11fIERSN gStartBssRSNIe;
242 tDot11fIEWPA gStartBssWPAIe;
243 tSirAPWPSIEs APWPSIEs;
244 tANI_U8 apUapsdEnable;
245 tSirWPSPBCSession *pAPWPSPBCSession;
246 tANI_U32 DefProbeRspIeBitmap[8];
247 tANI_U32 proxyProbeRspEn;
248 tDot11fProbeResponse probeRespFrame;
249 tANI_U8 ssidHidden;
250 tANI_BOOLEAN fwdWPSPBCProbeReq;
251 tANI_U8 wps_state;
Jeff Johnson295189b2012-06-20 16:38:30 -0700252
253 tANI_U8 limQosEnabled:1; //11E
254 tANI_U8 limWmeEnabled:1; //WME
255 tANI_U8 limWsmEnabled:1; //WSM
256 tANI_U8 limHcfEnabled:1;
257 tANI_U8 lim11dEnabled:1;
Chet Lanctot186b5732013-03-18 10:26:30 -0700258#ifdef WLAN_FEATURE_11W
259 tANI_U8 limRmfEnabled:1; //11W
260#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700261 tANI_U32 lim11hEnable;
262
263 tPowerdBm maxTxPower; //MIN (Regulatory and local power constraint)
264 tVOS_CON_MODE pePersona;
265#if defined WLAN_FEATURE_VOWIFI
266 tPowerdBm txMgmtPower;
267#endif
268
269#ifdef WLAN_FEATURE_VOWIFI_11R
270 tAniBool is11Rconnection;
271#endif
272
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800273#ifdef FEATURE_WLAN_ESE
274 tAniBool isESEconnection;
275 tEsePEContext eseContext;
Jeff Johnson295189b2012-06-20 16:38:30 -0700276#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800277#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Jeff Johnson295189b2012-06-20 16:38:30 -0700278 tAniBool isFastTransitionEnabled;
279#endif
Jeff Johnson43971f52012-07-17 12:26:56 -0700280#ifdef FEATURE_WLAN_LFR
281 tAniBool isFastRoamIniFeatureEnabled;
282#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700283 tSirNoAParam p2pNoA;
284 tSirP2PNoaAttr p2pGoPsUpdate;
Madan Mohan Koyyalamudi666d33a2012-11-29 11:32:59 -0800285 tANI_U32 defaultAuthFailureTimeout;
Viral Modid86bde22012-12-10 13:09:21 -0800286 tSirP2PNoaStart p2pGoPsNoaStartInd;
Jeff Johnson295189b2012-06-20 16:38:30 -0700287
288 /* EDCA QoS parameters
289 * gLimEdcaParams - These EDCA parameters are used locally on AP or STA.
290 * If STA, then these are values taken from the Assoc Rsp when associating,
291 * or Beacons/Probe Response after association. If AP, then these are
292 * values originally set locally on AP.
293 *
294 * gLimEdcaParamsBC - These EDCA parameters are use by AP to broadcast
295 * to other STATIONs in the BSS.
296 *
297 * gLimEdcaParamsActive: These EDCA parameters are what's actively being
298 * used on station. Specific AC values may be downgraded depending on
299 * admission control for that particular AC.
300 */
301 tSirMacEdcaParamRecord gLimEdcaParams[MAX_NUM_AC]; //used locally
302 tSirMacEdcaParamRecord gLimEdcaParamsBC[MAX_NUM_AC]; //used for broadcast
303 tSirMacEdcaParamRecord gLimEdcaParamsActive[MAX_NUM_AC];
304
305 tANI_U8 gLimEdcaParamSetCount;
306
307 tBeaconParams beaconParams;
Jeff Johnsone7245742012-09-05 17:12:55 -0700308#ifdef WLAN_FEATURE_11AC
309 tANI_U8 vhtCapability;
310 tANI_U8 vhtTxChannelWidthSet;
Mohit Khanna4a70d262012-09-11 16:30:12 -0700311 tLimOperatingModeInfo gLimOperatingMode;
Madan Mohan Koyyalamudic6226de2012-09-18 16:33:31 -0700312 tLimWiderBWChannelSwitchInfo gLimWiderBWChannelSwitch;
313 tANI_U8 vhtCapabilityPresentInBeacon;
314 tANI_U8 apCenterChan;
315 tANI_U8 apChanWidth;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -0800316 tANI_U8 txBFIniFeatureEnabled;
Abhishek Singh6d5d29c2014-07-03 14:25:22 +0530317 tANI_U8 txMuBformee;
Jeff Johnsone7245742012-09-05 17:12:55 -0700318#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700319 tANI_U8 spectrumMgtEnabled;
Jeff Johnsone7245742012-09-05 17:12:55 -0700320 /* *********************11H related*****************************/
321 //tANI_U32 gLim11hEnable;
322 tLimSpecMgmtInfo gLimSpecMgmt;
Abhishek Singh02605092017-10-25 14:06:12 +0530323 bool include_ecsa_ie;
324 bool include_wide_ch_bw_ie;
Jeff Johnsone7245742012-09-05 17:12:55 -0700325 // CB Primary/Secondary Channel Switch Info
326 tLimChannelSwitchInfo gLimChannelSwitch;
327 /* *********************End 11H related*****************************/
Jeff Johnson295189b2012-06-20 16:38:30 -0700328
329 /*Flag to Track Status/Indicate HBFailure on this session */
330 tANI_BOOLEAN LimHBFailureStatus;
331 tANI_U32 gLimPhyMode;
Kiran Kumar Lokere2ac471f2013-05-30 16:08:48 -0700332 tANI_U8 amsduSupportedInBA;
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -0800333 tANI_U8 txLdpcIniFeatureEnabled;
Gopichand Nakkala777e6032012-12-31 16:39:21 -0800334 /**
335 * Following is the place holder for free peer index pool.
336 * A non-zero value indicates that peer index is available
337 * for assignment.
338 */
339 tANI_U8 *gpLimPeerIdxpool;
340 tANI_U8 freePeerIdxHead;
341 tANI_U8 freePeerIdxTail;
342 tANI_U16 gLimNumOfCurrentSTAs;
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -0800343#ifdef FEATURE_WLAN_TDLS
344 tANI_U32 peerAIDBitmap[2];
Atul Mittalbceb4a12014-11-27 18:50:19 +0530345 tANI_BOOLEAN tdlsChanSwitProhibited;
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -0800346#endif
Gopichand Nakkalabe8653b2013-04-10 08:16:05 +0530347 tANI_BOOLEAN fWaitForProbeRsp;
348 tANI_BOOLEAN fIgnoreCapsChange;
Madan Mohan Koyyalamudi58c87792013-08-30 02:51:14 +0530349 tANI_BOOLEAN fDeauthReceived;
krunal soni8d13b092013-07-19 13:23:29 -0700350#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM
351 tANI_S8 rssi;
352#endif
krunal soni5afa96c2013-09-06 22:19:02 -0700353 tANI_U8 isAmsduSupportInAMPDU;
krunal sonie9002db2013-11-25 14:24:17 -0800354 tANI_U8 isCoalesingInIBSSAllowed;
Agarwal Ashish87039eb2014-01-15 14:13:15 +0530355 tANI_BOOLEAN isCiscoVendorAP;
Sandeep Puligilla11d49a62014-01-30 12:05:16 +0530356 /* To hold OBSS Scan IE Parameters */
357 tSirOBSSHT40Param obssHT40ScanParam;
Abhishek Singh74037df2017-07-20 11:08:56 +0530358 /* HS 2.0 Indication */
359 tDot11fIEhs20vendor_ie hs20vendor_ie;
Rajesh Babu Prathipati043149f2014-06-06 13:33:45 +0530360 /* flag to indicate country code in beacon */
361 tANI_U8 countryInfoPresent;
Kumar Anand82c009f2014-05-29 00:29:42 -0700362 /* DSCP to UP mapping for HS 2.0 */
363 tSirQosMapSet QosMapSet;
Abhishek Singh28266f02014-11-05 17:22:19 +0530364 tANI_U8 isKeyInstalled;
Masti, Narayanraddi67ea5912015-01-08 12:34:05 +0530365 tANI_BOOLEAN is11Gonly;
Abhishek Singhde7f0512015-10-23 14:31:15 +0530366 tANI_BOOLEAN addBssfailed;
Hu Wang5193b572016-08-11 10:04:47 +0800367 tDot11fIEExtCap ExtCap;
Paul Zhang83289792017-02-28 18:58:52 +0800368 uint32_t sta_auth_retries_for_code17;
Anurag Chouhanbdb1fd62017-07-19 16:32:33 +0530369 tDot11fIEHTCaps ht_caps;
370 tDot11fIEVHTCaps vht_caps;
371 tDot11fIEHTInfo ht_operation;
372 tDot11fIEVHTOperation vht_operation;
Abhishek Singhe3beee22017-07-31 15:35:40 +0530373 bool force_24ghz_in_ht20;
Abhinav Kumar5deb9cd2018-05-10 11:04:59 +0530374 int8_t def_max_tx_pwr;
Jeff Johnson295189b2012-06-20 16:38:30 -0700375}tPESession, *tpPESession;
376
377#define LIM_MAX_ACTIVE_SESSIONS 4
378
379
380/*-------------------------------------------------------------------------
381 Function declarations and documenation
382 ------------------------------------------------------------------------*/
383
384
385/*--------------------------------------------------------------------------
386
387 \brief peCreateSession() - creates a new PE session given the BSSID
388
389 This function returns the session context and the session ID if the session
390 corresponding to the passed BSSID is found in the PE session table.
391
392 \param pMac - pointer to global adapter context
393 \param bssid - BSSID of the new session
394 \param sessionId -session ID is returned here, if session is created.
395
396 \return tpPESession - pointer to the session context or NULL if session can not be created.
397
398 \sa
399
400 --------------------------------------------------------------------------*/
401tpPESession peCreateSession(tpAniSirGlobal pMac, tANI_U8 *bssid , tANI_U8* sessionId, tANI_U16 numSta);
402
403
404/*--------------------------------------------------------------------------
405 \brief peFindSessionByBssid() - looks up the PE session given the BSSID.
406
407 This function returns the session context and the session ID if the session
408 corresponding to the given BSSID is found in the PE session table.
409
410 \param pMac - pointer to global adapter context
411 \param bssid - BSSID of the session
412 \param sessionId -session ID is returned here, if session is found.
413
414 \return tpPESession - pointer to the session context or NULL if session is not found.
415
416 \sa
417 --------------------------------------------------------------------------*/
418tpPESession peFindSessionByBssid(tpAniSirGlobal pMac, tANI_U8* bssid, tANI_U8* sessionId);
419
420
421
422/*--------------------------------------------------------------------------
Leela Venkata Kiran Kumar Reddy Chirala3ca17902013-02-27 19:50:05 -0800423 \brief peFindSessionByBssIdx() - looks up the PE session given the bssIdx.
424
425 This function returns the session context if the session
426 corresponding to the given bssIdx is found in the PE session table.
427 \param pMac - pointer to global adapter context
428 \param bssIdx - bss index of the session
429 \return tpPESession - pointer to the session context or NULL if session is not found.
430 \sa
431 --------------------------------------------------------------------------*/
432tpPESession peFindSessionByBssIdx(tpAniSirGlobal pMac, tANI_U8 bssIdx);
433
434
Kapil Gupta7a3d9b12016-12-20 20:36:38 +0530435tANI_S8 limGetInfraSessionId(tpAniSirGlobal pMac);
Leela Venkata Kiran Kumar Reddy Chirala3ca17902013-02-27 19:50:05 -0800436
437
438/*--------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700439 \brief peFindSessionByPeerSta() - looks up the PE session given the Peer Station Address.
440
441 This function returns the session context and the session ID if the session
442 corresponding to the given destination address is found in the PE session table.
443
444 \param pMac - pointer to global adapter context
445 \param sa - Peer STA Address of the session
446 \param sessionId -session ID is returned here, if session is found.
447
448 \return tpPESession - pointer to the session context or NULL if session is not found.
449
450 \sa
451 --------------------------------------------------------------------------*/
452tpPESession peFindSessionByPeerSta(tpAniSirGlobal pMac, tANI_U8* sa, tANI_U8* sessionId);
453
454/*--------------------------------------------------------------------------
455 \brief peFindSessionBySessionId() - looks up the PE session given the session ID.
456
457 This function returns the session context if the session
458 corresponding to the given session ID is found in the PE session table.
459
460 \param pMac - pointer to global adapter context
461 \param sessionId -session ID for which session context needs to be looked up.
462
463 \return tpPESession - pointer to the session context or NULL if session is not found.
464
465 \sa
466 --------------------------------------------------------------------------*/
467 tpPESession peFindSessionBySessionId(tpAniSirGlobal pMac , tANI_U8 sessionId);
468
469/*--------------------------------------------------------------------------
470 \brief peFindSessionByBssid() - looks up the PE session given staid.
471
472 This function returns the session context and the session ID if the session
473 corresponding to the given StaId is found in the PE session table.
474
475 \param pMac - pointer to global adapter context
476 \param staid - StaId of the session
477 \param sessionId - session ID is returned here, if session is found.
478
479 \return tpPESession - pointer to the session context or NULL if session is not found.
480
481--------------------------------------------------------------------------*/
482 tpPESession peFindSessionByStaId(tpAniSirGlobal pMac, tANI_U8 staid, tANI_U8* sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700483
Abhinav Kumar8eed0362019-08-05 14:26:07 +0530484/**
485 * pe_find_session_by_sme_session_id() - looks up the PE session for given sme
486 * session id
487 * @mac_ctx: pointer to global adapter context
488 * @sme_session_id: sme session id
489 *
490 * Looks up the PE session for given sme session id
491 *
492 * Return: pe session entry for given sme session if found else NULL
493 */
494tpPESession pe_find_session_by_sme_session_id(tpAniSirGlobal mac_ctx,
495 uint8_t sme_session_id);
Jeff Johnson295189b2012-06-20 16:38:30 -0700496
497
498/*--------------------------------------------------------------------------
499 \brief peDeleteSession() - deletes the PE session given the session ID.
500
501
502 \param pMac - pointer to global adapter context
503 \param sessionId -session ID of the session which needs to be deleted.
504
505 \sa
506 --------------------------------------------------------------------------*/
507void peDeleteSession(tpAniSirGlobal pMac, tpPESession psessionEntry);
508
509
510/*--------------------------------------------------------------------------
511 \brief peDeleteSession() - Returns the SME session ID and Transaction ID .
512
513
514 \param pMac - pointer to global adapter context
515 \param sessionId -session ID of the session which needs to be deleted.
516
517 \sa
518 --------------------------------------------------------------------------*/
519
Sachin Ahujae4c6fac2016-12-29 10:30:15 +0530520int peFindBssIdxFromSmeSessionId(tpAniSirGlobal pMac, tANI_U8 sme_sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700521#endif //#if !defined( __LIM_SESSION_H )