blob: 3f9cec2d56b1592e8871f5162a6e41b6b0a7c0f6 [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
yeshwanth sriram guntuka7419da72017-01-19 21:17:30 +05302 * Copyright (c) 2012-2017 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
yeshwanth sriram guntuka7419da72017-01-19 21:17:30 +053093typedef struct join_params {
94 uint16_t prot_status_code;
95 uint16_t pe_session_id;
96 tSirResultCodes result_code;
97} join_params;
98
Peng Xu6363ec62017-05-15 11:06:33 -070099#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
103struct bss_color_info {
104 qdf_time_t timestamp;
105 uint64_t seen_count;
106};
107#endif
108
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800109typedef 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 Dhavali7090c5f2015-11-02 17:55:19 -0800136 void *pLimMlmReassocRetryReq; /* keep reasoc req for retry */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800137 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 Dhavali7090c5f2015-11-02 17:55:19 -0800211 uint32_t RICDataLen; /* Used to store the Ric data received in the assoc response */
212 uint8_t *ricData;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800213#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 Girigowdad65dc5a2016-01-14 17:08:26 -0800267 tSirKeyMaterial WEPKeyMaterial[MAX_WEP_KEYS];
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800268
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 Singhf78bd2d2016-04-27 16:47:56 +0530280 bool wps_registration;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800281
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 Singhala297bfa2015-10-15 15:07:29 -0700292 int8_t maxTxPower; /* MIN (Regulatory and local power constraint) */
Anurag Chouhan6d760662016-02-20 16:05:43 +0530293 enum tQDF_ADAPTER_MODE pePersona;
Amar Singhala297bfa2015-10-15 15:07:29 -0700294 int8_t txMgmtPower;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800295 tAniBool is11Rconnection;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800296
297#ifdef FEATURE_WLAN_ESE
298 tAniBool isESEconnection;
299 tEsePEContext eseContext;
300#endif
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800301 tAniBool isFastTransitionEnabled;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800302 tAniBool isFastRoamIniFeatureEnabled;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800303 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 Dhavali7090c5f2015-11-02 17:55:19 -0800329 tLimOperatingModeInfo gLimOperatingMode;
330 uint8_t vhtCapabilityPresentInBeacon;
331 uint8_t ch_center_freq_seg0;
Kiran Kumar Lokere13644672016-02-29 15:40:10 -0800332 enum phy_ch_width ch_width;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800333 uint8_t ch_center_freq_seg1;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800334 uint8_t enableVhtpAid;
335 uint8_t enableVhtGid;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800336 tLimWiderBWChannelSwitchInfo gLimWiderBWChannelSwitch;
337 uint8_t enableAmpduPs;
338 uint8_t enableHtSmps;
339 uint8_t htSmpsvalue;
Archana Ramachandranfec24812016-02-16 16:31:56 -0800340 bool send_smps_action;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800341 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 Kannan32eb5022016-10-04 12:24:50 -0700363 /* TDLS parameters to check whether TDLS
364 * and TDLS channel switch is allowed in the
365 * AP network
366 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800367 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
377 uint8_t isAmsduSupportInAMPDU;
378 uint8_t isCoalesingInIBSSAllowed;
379
380 tSirHTConfig htConfig;
Sandeep Puligilla98917432016-06-10 13:50:28 -0700381 struct sir_vht_config vht_config;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800382 /*
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 Dhavali7090c5f2015-11-02 17:55:19 -0800459 /* Fast Transition (FT) */
460 tftPEContext ftPEContext;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800461 bool isNonRoamReassoc;
462#ifdef WLAN_FEATURE_11W
Anurag Chouhan210db072016-02-22 18:42:15 +0530463 qdf_mc_timer_t pmfComebackTimer;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800464 tComebackTimerInfo pmfComebackTimerInfo;
465#endif /* WLAN_FEATURE_11W */
466 uint8_t is_key_installed;
467 /* timer for reseting protection fileds at regular intervals */
Anurag Chouhan210db072016-02-22 18:42:15 +0530468 qdf_mc_timer_t protection_fields_reset_timer;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800469 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 Gupta4b2efbb2016-10-03 13:07:20 +0530487 bool vendor_vht_sap;
Nitesh Shah0ddd4f62016-05-27 10:07:32 +0530488 /* HS 2.0 Indication */
489 tDot11fIEhs20vendor_ie hs20vendor_ie;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800490 /* flag to indicate country code in beacon */
491 uint8_t country_info_present;
492 uint8_t nss;
Abhishek Singh96bda8e2015-12-03 16:45:35 +0530493 bool add_bss_failed;
Sandeep Puligillae0875662016-02-12 16:09:21 -0800494 /* To hold OBSS Scan IE Parameters */
495 struct obss_scanparam obss_ht40_scanparam;
Kiran Kumar Lokere666bf852016-05-02 12:23:02 -0700496 uint8_t vdev_nss;
Archana Ramachandran20d2e232016-02-11 16:58:40 -0800497 /* Supported NSS is intersection of self and peer NSS */
498 bool supported_nss_1x1;
Agrawal Ashish0f94b572016-02-22 13:27:06 +0530499 bool is_ext_caps_present;
Kondabattini, Ganeshb72e25c2016-09-02 14:43:59 +0530500 uint8_t beacon_tx_rate;
Kondabattini, Ganeshe4f18e02016-09-13 13:01:22 +0530501 uint8_t *access_policy_vendor_ie;
Kondabattini, Ganeshb72e25c2016-09-02 14:43:59 +0530502 uint8_t access_policy;
Selvaraj, Sridharac4fcf32016-09-28 12:57:32 +0530503 bool ignore_assoc_disallowed;
Abhishek Singh5695e2a2016-10-28 10:39:12 +0530504 bool send_p2p_conf_frame;
Deepak Dhamdhere2dae1bd2016-10-27 10:58:29 -0700505 bool process_ho_fail;
Krishna Kumaar Natarajan0103ef82017-02-17 18:15:56 -0800506#ifdef WLAN_FEATURE_11AX
Krishna Kumaar Natarajan4f1d7722017-03-03 21:12:51 -0800507 bool he_capable;
Krishna Kumaar Natarajan0103ef82017-02-17 18:15:56 -0800508 tDot11fIEvendor_he_cap he_config;
509 tDot11fIEvendor_he_op he_op;
Manikandan Mohan39accff2017-05-02 16:09:00 -0700510 uint32_t he_sta_obsspd;
Peng Xu6363ec62017-05-15 11:06:33 -0700511#ifdef WLAN_FEATURE_11AX_BSS_COLOR
512 tDot11fIEbss_color_change he_bss_color_change;
513 struct bss_color_info bss_color_info[MAX_BSS_COLOR_VALUE];
514 uint8_t bss_color_changing;
515#endif
Krishna Kumaar Natarajan0103ef82017-02-17 18:15:56 -0800516#endif
Selvaraj, Sridhar05ea0792017-05-17 12:17:03 +0530517 bool enable_bcast_probe_rsp;
Tushnim Bhattacharyya3d17def2017-06-19 11:13:43 -0700518 uint8_t ht_client_cnt;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800519} tPESession, *tpPESession;
520
521/*-------------------------------------------------------------------------
522 Function declarations and documenation
523 ------------------------------------------------------------------------*/
524
525/**
526 * pe_create_session() - creates a new PE session given the BSSID
527 *
528 * @pMac: pointer to global adapter context
529 * @bssid: BSSID of the new session
530 * @sessionId: session ID is returned here, if session is created.
531 * @numSta: number of stations
532 * @bssType: bss type of new session to do conditional memory allocation.
533 *
534 * This function returns the session context and the session ID if the session
535 * corresponding to the passed BSSID is found in the PE session table.
536 *
537 * Return: ptr to the session context or NULL if session can not be created.
538 */
539tpPESession pe_create_session(tpAniSirGlobal pMac,
540 uint8_t *bssid,
541 uint8_t *sessionId,
542 uint16_t numSta, tSirBssType bssType);
543
544/**
545 * pe_find_session_by_bssid() - looks up the PE session given the BSSID.
546 *
547 * @pMac: pointer to global adapter context
548 * @bssid: BSSID of the new session
549 * @sessionId: session ID is returned here, if session is created.
550 *
551 * This function returns the session context and the session ID if the session
552 * corresponding to the given BSSID is found in the PE session table.
553 *
554 * Return: pointer to the session context or NULL if session is not found.
555 */
556tpPESession pe_find_session_by_bssid(tpAniSirGlobal pMac, uint8_t *bssid,
557 uint8_t *sessionId);
558
559/**
560 * pe_find_session_by_bss_idx() - looks up the PE session given the bssIdx.
561 *
562 * @pMac: pointer to global adapter context
563 * @bssIdx: bss index of the session
564 *
565 * This function returns the session context if the session
566 * corresponding to the given bssIdx is found in the PE session table.
567 *
568 * Return: pointer to the session context or NULL if session is not found.
569 */
570tpPESession pe_find_session_by_bss_idx(tpAniSirGlobal pMac, uint8_t bssIdx);
571
572/**
573 * pe_find_session_by_peer_sta() - looks up the PE session given the Peer
574 * Station Address.
575 *
576 * @pMac: pointer to global adapter context
577 * @sa: Peer STA Address of the session
578 * @sessionId: session ID is returned here, if session is found.
579 *
580 * This function returns the session context and the session ID if the session
581 * corresponding to the given destination address is found in the PE session
582 * table.
583 *
584 * Return: pointer to the session context or NULL if session is not found.
585 */
586tpPESession pe_find_session_by_peer_sta(tpAniSirGlobal pMac, uint8_t *sa,
587 uint8_t *sessionId);
588
589/**
590 * pe_find_session_by_session_id() - looks up the PE session given the session
591 * ID.
592 *
593 * @pMac: pointer to global adapter context
594 * @sessionId: session ID for which session context needs to be looked up.
595 *
596 * This function returns the session context if the session corresponding to
597 * the given session ID is found in the PE session table.
598 *
599 * Return: pointer to the session context or NULL if session is not found.
600 */
601tpPESession pe_find_session_by_session_id(tpAniSirGlobal pMac,
602 uint8_t sessionId);
603
604/**
605 * pe_find_session_by_bssid() - looks up the PE session given staid.
606 *
607 * @pMac: pointer to global adapter context
608 * @staid: StaId of the session
609 * @sessionId: session ID is returned here, if session is found.
610 *
611 * This function returns the session context and the session ID if the session
612 * corresponding to the given StaId is found in the PE session table.
613 *
614 * Return: pointer to the session context or NULL if session is not found.
615 */
616tpPESession pe_find_session_by_sta_id(tpAniSirGlobal pMac, uint8_t staid,
617 uint8_t *sessionId);
618
619/**
620 * pe_delete_session() - deletes the PE session given the session ID.
621 *
622 * @pMac: pointer to global adapter context
623 * @sessionId: session ID to delete.
624 *
625 * Return: void
626 */
627void pe_delete_session(tpAniSirGlobal pMac, tpPESession psessionEntry);
628
629
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800630/**
631 * pe_find_session_by_sme_session_id() - looks up the PE session for given sme
632 * session id
633 * @mac_ctx: pointer to global adapter context
634 * @sme_session_id: sme session id
635 *
636 * looks up the PE session for given sme session id
637 *
638 * Return: pe session entry for given sme session if found else NULL
639 */
640tpPESession pe_find_session_by_sme_session_id(tpAniSirGlobal mac_ctx,
641 uint8_t sme_session_id);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800642uint8_t pe_get_active_session_count(tpAniSirGlobal mac_ctx);
643#endif /* #if !defined( __LIM_SESSION_H ) */