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