blob: b513e18f37832c6be42eb607f627fca9cd7f30cf [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Gopichand Nakkala92f07d82013-01-08 21:16:34 -08002 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
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/*
Jeff Johnson32d95a32012-09-10 13:15:23 -070022 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
Jeff Johnson295189b2012-06-20 16:38:30 -070023 *
24 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
25 *
26 *
27 * Permission to use, copy, modify, and/or distribute this software for
28 * any purpose with or without fee is hereby granted, provided that the
29 * above copyright notice and this permission notice appear in all
30 * copies.
31 *
32 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
33 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
34 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
35 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
36 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
37 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
38 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
39 * PERFORMANCE OF THIS SOFTWARE.
40 */
41
42/** ------------------------------------------------------------------------- *
43 ------------------------------------------------------------------------- *
44
45
46 \file csrInternal.h
47
48 Define internal data structure for MAC.
49
50 Copyright (C) 2006 Airgo Networks, Incorporated
51 ========================================================================== */
52#ifndef CSRINTERNAL_H__
53#define CSRINTERNAL_H__
54
55#if defined(VOSS_ENABLED)
56#include "vos_status.h"
57#include "vos_lock.h"
58#endif //#if defined(VOSS_ENABLED)
59
60#include "palTimer.h"
61#include "csrSupport.h"
62#include "vos_nvitem.h"
63#include "wlan_qct_tl.h"
64
65#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
66#include "csrNeighborRoam.h"
67#endif
68
69#define CSR_MAX_STA (HAL_NUM_STA)
70
71#define CSR_SME_SCAN_FLAGS_DELETE_CACHE 0x80
72
73#define CSR_TITAN_MAX_RATE_MIMO_CB 240
74#define CSR_TITAN_MAX_RATE_MIMO 126
75
76//define scan return criteria. LIM should use these define as well
77#define CSR_SCAN_RETURN_AFTER_ALL_CHANNELS ( 0 )
78#define CSR_SCAN_RETURN_AFTER_FIRST_MATCH ( 0x01 )
79#define CSR_SCAN_RETURN_AFTER_5_BAND_11d_FOUND ( 0x80 )
80#define CSR_SCAN_RETURN_AFTER_24_BAND_11d_FOUND ( 0x40 )
81#define CSR_SCAN_RETURN_AFTER_EITHER_BAND_11d_FOUND ( CSR_SCAN_RETURN_AFTER_5_BAND_11d_FOUND | CSR_SCAN_RETURN_AFTER_24_BAND_11d_FOUND )
Madan Mohan Koyyalamudi4c8c6352012-10-15 16:40:16 -070082#define CSR_NUM_RSSI_CAT 15
Jeff Johnson295189b2012-06-20 16:38:30 -070083#define CSR_MAX_STATISTICS_REQ 10
84
85//Support for multiple session
86#define CSR_SESSION_ID_INVALID 0xFF // session ID invalid
87#define CSR_ROAM_SESSION_MAX 5 // No of sessions to be supported, and a
88 // session is for Infra, IBSS or BT-AMP
89
90#define CSR_IS_SESSION_VALID( pMac, sessionId ) ( ( (sessionId) < CSR_ROAM_SESSION_MAX ) \
91 && ( (pMac)->roam.roamSession[(sessionId)].sessionActive ) )
92#define CSR_GET_SESSION( pMac, sessionId ) \
93( \
94 (sessionId < CSR_ROAM_SESSION_MAX) ? \
95 (&(pMac)->roam.roamSession[(sessionId)]) :\
96 NULL \
97)
98
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -080099#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
100#define CSR_IS_ROAM_PREFER_5GHZ( pMac ) \
101( \
102 (((pMac)->roam.configParam.nRoamPrefer5GHz)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
103)
104#endif
105
Madan Mohan Koyyalamudi470d2cf2012-09-28 14:43:44 -0700106//Support for "Fast roaming" (i.e., CCX, LFR, or 802.11r.)
107#define CSR_BG_SCAN_OCCUPIED_CHANNEL_LIST_LEN 15
Jeff Johnson295189b2012-06-20 16:38:30 -0700108
109typedef enum
110{
111 //eCSR_CFG_DOT11_MODE_BEST = 0,
112 eCSR_CFG_DOT11_MODE_TAURUS = 0,
113 eCSR_CFG_DOT11_MODE_ABG,
114 eCSR_CFG_DOT11_MODE_11A,
115 eCSR_CFG_DOT11_MODE_11B,
116 eCSR_CFG_DOT11_MODE_11G,
117 eCSR_CFG_DOT11_MODE_11N,
118 eCSR_CFG_DOT11_MODE_POLARIS,
119 eCSR_CFG_DOT11_MODE_TITAN,
Jeff Johnsone7245742012-09-05 17:12:55 -0700120#ifdef WLAN_FEATURE_11AC
121 eCSR_CFG_DOT11_MODE_11AC,
122#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700123#ifdef WLAN_SOFTAP_FEATURE
124 eCSR_CFG_DOT11_MODE_11G_ONLY,
125 eCSR_CFG_DOT11_MODE_11N_ONLY,
126#endif
Jeff Johnsone7245742012-09-05 17:12:55 -0700127#ifdef WLAN_FEATURE_11AC
128 eCSR_CFG_DOT11_MODE_11AC_ONLY,
129#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700130 //This value can never set to CFG. It is for CSR's internal use
131 eCSR_CFG_DOT11_MODE_AUTO,
132}eCsrCfgDot11Mode; //Used to determine what to set to the WNI_CFG_DOT11_MODE
133
134typedef enum etCsrRoamCommands
135{
136 eCsrRoamNoCommand,
137 eCsrRoamCommandScan,
138 eCsrRoamCommandRoam,
139 eCsrRoamCommandWmStatusChange,
140 eCsrRoamCommandSetKey,
141 eCsrRoamCommandRemoveKey,
142
143} eCsrRoamCommands;
144
145typedef enum
146{
147 eCsrScanOther = 1,
148 eCsrScanLostLink1,
149 eCsrScanLostLink2,
150 eCsrScanLostLink3,
151 eCsrScanLostLink4,
152 eCsrScan11d1, //First 11d scan
153 eCsrScan11d2, //First 11d scan has failed
154 eCsrScan11dDone, //11d scan succeeded, try the rest of the channel
155 eCsrScanUserRequest,
156 eCsrScanGetResult,
157 eCsrScanSetBGScanParam, //used for HO too - bg scan request in NT Handoff sub-state
158 eCsrScanForSsid,
159 eCsrScanForCapsChange,
160 eCsrScanBGScanAbort,
161 eCsrScanBGScanEnable,
162 eCsrScanIdleScan,
163 eCsrScanGetScanChnInfo, //To get the list of channels scanned
164
165 eCsrScanBgScan, // bg scan request in NRT & RT Handoff sub-states
166 eCsrScanProbeBss, // directed probe on an entry from the candidate list - HO
167 eCsrScanAbortBgScan, //aborting a BG scan (meaning the scan is triggered by LIM timer)
168 eCsrScanAbortNormalScan, //aborting a normal scan (the scan is trigger by eWNI_SME_SCAN_REQ)
169 eCsrScanP2PFindPeer
170}eCsrScanReason;
171
172typedef enum
173{
174 eCsrNoConnection, // Roaming because we have not established the initial connection.
175 eCsrCapsChange, // roaming because LIM reported a Capability change in the associated AP.
176 eCsrForcedDisassoc, // roaming becuase someone asked us to Disassoc and stay disassociated.
177 eCsrHddIssued, // roaming because an 802.11 request was issued to the driver.
178 eCsrLostLink1, // roaming because we lost link to an associated AP
179 eCsrLostLink2,
180 eCsrLostLink3,
181 eCsrForcedDisassocMICFailure, // roaming because we need to force a Disassoc due to MIC failure
182 eCsrHddIssuedReassocToSameAP,
183 eCsrSmeIssuedReassocToSameAP,
184 eCsrSmeIssuedReassocToDiffAP,
185 eCsrForcedDeauth, // roaming becuase someone asked us to deauth and stay disassociated.
186 eCsrSmeIssuedDisassocForHandoff, // will be issued by Handoff logic to disconect from current AP
187 eCsrSmeIssuedAssocToSimilarAP, // will be issued by Handoff logic to join a new AP with same profile
188 eCsrSmeIssuedIbssJoinFailure, // ibss join timer fired before any perr showed up, so shut down the network
189 eCsrForcedIbssLeave,
190 eCsrStopBss,
191 eCsrSmeIssuedFTReassoc,
192 eCsrForcedDisassocSta,
193 eCsrForcedDeauthSta,
Madan Mohan Koyyalamudi286b60e2012-10-11 12:59:07 -0700194 eCsrPerformPreauth,
Jeff Johnson295189b2012-06-20 16:38:30 -0700195
196}eCsrRoamReason;
197
198typedef enum
199{
200 eCSR_ROAM_SUBSTATE_NONE = 0,
201 eCSR_ROAM_SUBSTATE_START_BSS_REQ,
202 eCSR_ROAM_SUBSTATE_JOIN_REQ,
203 eCSR_ROAM_SUBSTATE_REASSOC_REQ,
204 eCSR_ROAM_SUBSTATE_DISASSOC_REQ,
205 eCSR_ROAM_SUBSTATE_STOP_BSS_REQ,
206 eCSR_ROAM_SUBSTATE_DISCONNECT_CONTINUE_ROAMING, //Continue the current roam command after disconnect
207 eCSR_ROAM_SUBSTATE_AUTH_REQ,
208 eCSR_ROAM_SUBSTATE_CONFIG,
209 eCSR_ROAM_SUBSTATE_DEAUTH_REQ,
210 eCSR_ROAM_SUBSTATE_DISASSOC_NOTHING_TO_JOIN,
211 eCSR_ROAM_SUBSTATE_DISASSOC_REASSOC_FAILURE,
212 eCSR_ROAM_SUBSTATE_DISASSOC_FORCED,
213 eCSR_ROAM_SUBSTATE_WAIT_FOR_KEY,
214 eCSR_ROAM_SUBSTATE_DISASSOC_HANDOFF,
215 eCSR_ROAM_SUBSTATE_JOINED_NO_TRAFFIC,
216 eCSR_ROAM_SUBSTATE_JOINED_NON_REALTIME_TRAFFIC,
217 eCSR_ROAM_SUBSTATE_JOINED_REALTIME_TRAFFIC,
218// max is 15 unless the bitfield is expanded...
219} eCsrRoamSubState;
220
221
222typedef enum
223{
224 eCSR_ROAMING_STATE_STOP = 0,
225 eCSR_ROAMING_STATE_IDLE,
226 eCSR_ROAMING_STATE_SCANNING,
227 eCSR_ROAMING_STATE_JOINING,
228 eCSR_ROAMING_STATE_JOINED,
229}eCsrRoamState;
230
231
232typedef enum
233{
234 eCsrContinueRoaming,
235 eCsrStopRoaming,
236 eCsrStartIbss,
237 eCsrStartIbssSameIbss,
238 eCsrReassocToSelfNoCapChange,
Jeff Johnsone7245742012-09-05 17:12:55 -0700239 eCsrStopRoamingDueToConcurrency,
Jeff Johnson295189b2012-06-20 16:38:30 -0700240
241}eCsrJoinState;
242
243typedef enum
244{
245 eCsrNotRoaming,
246 eCsrLostlinkRoamingDisassoc,
247 eCsrLostlinkRoamingDeauth,
248 eCsrDynamicRoaming,
249 eCsrReassocRoaming,
250}eCsrRoamingReason;
251
252typedef enum
253{
254 eCsrDisassociated,
255 eCsrDeauthenticated
256
257}eCsrRoamWmStatusChangeTypes;
258
259typedef enum
260{
261 eCsrSummaryStats = 0,
262 eCsrGlobalClassAStats,
263 eCsrGlobalClassBStats,
264 eCsrGlobalClassCStats,
265 eCsrGlobalClassDStats,
266 eCsrPerStaStats,
267 eCsrMaxStats
268}eCsrRoamStatsClassTypes;
269
270#ifdef FEATURE_WLAN_DIAG_SUPPORT
271typedef enum
272{
273 eCSR_WLAN_STATUS_CONNECT =0,
274 eCSR_WLAN_STATUS_DISCONNECT
275
276}eCsrDiagWlanStatusEventSubtype;
277
278typedef enum
279{
280 eCSR_REASON_UNSPECIFIED = 0,
281 eCSR_REASON_USER_REQUESTED,
282 eCSR_REASON_MIC_ERROR,
283 eCSR_REASON_DISASSOC,
284 eCSR_REASON_DEAUTH,
285 eCSR_REASON_HANDOFF,
286
287}eCsrDiagWlanStatusEventReason;
288
289typedef enum
290{
291 eCSR_WLAN_HANDOFF_EVENT =0,
292
293}eCsrDiagWlanHandoffEventSubtype;
294
295typedef enum
296{
297 eCSR_WLAN_VCC_EVENT =0,
298
299}eCsrDiagWlanVccEventSubtype;
300
301#endif //FEATURE_WLAN_DIAG_SUPPORT
302
303typedef struct tagCsrChannel
304{
305 tANI_U8 numChannels;
306 tANI_U8 channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
307}tCsrChannel;
308
309typedef struct tagScanProfile
310{
311 tANI_U32 minChnTime;
312 tANI_U32 maxChnTime;
313 tANI_U32 restTime; //This is ignored if not associated
314 tANI_U32 numOfChannels;
315 tANI_U8 *pChannelList;
316 tSirScanType scanType; //active or passive
317 eCsrRoamBssType bssType; //BSS or IBSS
318 tANI_U8 ssid[WNI_CFG_SSID_LEN];
319 tANI_U8 bReturnAfter1stMatch;
320 tANI_U8 fUniqueResult;
321 tANI_U8 freshScan;
322 tCsrBssid bssid;
323}tScanProfile;
324
325typedef struct tagBssConfigParam
326{
327 eCsrMediaAccessType qosType;
328 tSirMacSSid SSID;
329 tANI_U32 uRTSThresh;
330 tANI_U32 uDeferThresh; //
331 eCsrCfgDot11Mode uCfgDot11Mode;
332 eCsrBand eBand;
333 tANI_U8 standardRate[CSR_DOT11_SUPPORTED_RATES_MAX];
334 tANI_U8 extendedRate[CSR_DOT11_EXTENDED_SUPPORTED_RATES_MAX];
335 eCsrExposedTxRate txRate;
336 tAniAuthType authType;
337 eCsrEncryptionType encType;
338 tANI_U32 uShortSlotTime;
339 tANI_U32 uHTSupport; //High throughput
340 tANI_U32 uPowerLimit;
341 tANI_U32 uHeartBeatThresh;
342 tANI_U32 uJoinTimeOut;
343 tSirMacCapabilityInfo BssCap;
344 tANI_BOOLEAN f11hSupport;
Jeff Johnsone7245742012-09-05 17:12:55 -0700345 ePhyChanBondState cbMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700346}tBssConfigParam;
347
348
349typedef struct tagCsrRoamStartBssParams
350{
351 tSirMacSSid ssId;
352 tCsrBssid bssid; //this is the BSSID for the party we want to join (only use for IBSS or WDS)
353 tSirNwType sirNwType;
Jeff Johnsone7245742012-09-05 17:12:55 -0700354 ePhyChanBondState cbMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700355 tSirMacRateSet operationalRateSet;
356 tSirMacRateSet extendedRateSet;
357 tANI_U8 operationChn;
358 eCsrCfgDot11Mode uCfgDot11Mode;
359#ifdef WLAN_SOFTAP_FEATURE
360 tANI_U8 privacy;
361 tANI_BOOLEAN fwdWPSPBCProbeReq;
362 tANI_BOOLEAN protEnabled;
363 tANI_BOOLEAN obssProtEnabled;
364 tAniAuthType authType;
365 tANI_U16 beaconInterval; //If this is 0, SME will fill in for caller.
366 tANI_U16 ht_protection;
367 tANI_U32 dtimPeriod;
368 tANI_U8 ApUapsdEnable;
369 tANI_U8 ssidHidden;
370 tANI_U8 wps_state;
371#endif
372 tVOS_CON_MODE bssPersona;
373 tANI_U16 nRSNIELength; //The byte count in the pRSNIE, if 0, pRSNIE is ignored.
374 tANI_U8 *pRSNIE; //If not null, it has the IE byte stream for RSN
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -0800375 tANI_BOOLEAN updatebeaconInterval; //Flag used to indicate update
376 // beaconInterval
Jeff Johnson295189b2012-06-20 16:38:30 -0700377}tCsrRoamStartBssParams;
378
379
380typedef struct tagScanCmd
381{
382 tANI_U32 scanID;
383 csrScanCompleteCallback callback;
384 void *pContext;
385 eCsrScanReason reason;
386 eCsrRoamState lastRoamState[CSR_ROAM_SESSION_MAX];
387 tCsrRoamProfile *pToRoamProfile;
388 tANI_U32 roamId; //this is the ID related to the pToRoamProfile
389 union
390 {
391 tCsrScanRequest scanRequest;
392 tCsrBGScanRequest bgScanRequest;
393 }u;
394}tScanCmd;
395
396typedef struct tagRoamCmd
397{
398 tANI_U32 roamId;
399 eCsrRoamReason roamReason;
400 tCsrRoamProfile roamProfile;
401 tScanResultHandle hBSSList; //BSS list fits the profile
402 tListElem *pRoamBssEntry; //point to the current BSS in the list that is roaming. It starts from head to tail
403 tSirBssDescription *pLastRoamBss; //the last BSS we try and failed
404 tANI_BOOLEAN fReleaseBssList; //whether to free hBSSList
405 tANI_BOOLEAN fReleaseProfile; //whether to free roamProfile
406 tANI_BOOLEAN fReassoc; //whether this command is for reassociation
407 tANI_BOOLEAN fUpdateCurRoamProfile; //whether pMac->roam.pCurRoamProfile needs to be updated
408 //this is for CSR internal used only. And it should not be assigned when creating the command
409 //This causes the roam command not to do anything.
410 tANI_BOOLEAN fReassocToSelfNoCapChange;
411
412 tANI_BOOLEAN fStopWds;
413 tSirMacAddr peerMac;
414 tSirMacReasonCodes reason;
415}tRoamCmd;
416
417typedef struct tagSetKeyCmd
418{
419 tANI_U32 roamId;
420 eCsrEncryptionType encType;
421 eCsrAuthType authType;
422 tAniKeyDirection keyDirection; //Tx, Rx or Tx-and-Rx
423 tSirMacAddr peerMac; //Peer's MAC address. ALL 1's for group key
424 tANI_U8 paeRole; //0 for supplicant
425 tANI_U8 keyId; // Kye index
426 tANI_U8 keyLength; //Number of bytes containing the key in pKey
427 tANI_U8 Key[CSR_MAX_KEY_LEN];
428 tANI_U8 keyRsc[CSR_MAX_RSC_LEN];
429} tSetKeyCmd;
430
431typedef struct tahRemoveKeyCmd
432{
433 tANI_U32 roamId;
434 eCsrEncryptionType encType;
435 eCsrAuthType authType;
436 tSirMacAddr peerMac; //Peer's MAC address. ALL 1's for group key
437 tANI_U8 keyId; //key index
438} tRemoveKeyCmd;
439
440typedef struct tagWmStatusChangeCmd
441{
442 eCsrRoamWmStatusChangeTypes Type;
443 union
444 {
445 tSirSmeDeauthInd DeauthIndMsg;
446 tSirSmeDisassocInd DisassocIndMsg;
447 }u;
448
449}tWmStatusChangeCmd;
450
451typedef struct tagAddStaForSessionCmd
452{
453 //Session self mac addr
454 tSirMacAddr selfMacAddr;
455}tAddStaForSessionCmd;
456
457typedef struct tagDelStaForSessionCmd
458{
459 //Session self mac addr
460 tSirMacAddr selfMacAddr;
461 csrRoamSessionCloseCallback callback;
462 void *pContext;
463}tDelStaForSessionCmd;
464
465//This structure represents one scan request
466typedef struct tagCsrCmd
467{
468 tListElem Link;
469 eCsrRoamCommands command;
470 tANI_U8 sessionId; // Session ID for this command
471 union
472 {
473 tScanCmd scanCmd;
474 tRoamCmd roamCmd;
475 tWmStatusChangeCmd wmStatusChangeCmd;
476 tSetKeyCmd setKeyCmd;
477 tRemoveKeyCmd removeKeyCmd;
478 tAddStaForSessionCmd addStaSessionCmd;
479 tDelStaForSessionCmd delStaSessionCmd;
480 }u;
481}tCsrCmd;
482
483#ifdef WLAN_FEATURE_VOWIFI_11R
484typedef struct tagCsr11rConfig
485{
486 tANI_BOOLEAN IsFTResourceReqSupported;
487} tCsr11rConfig;
488#endif
489
490#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
491typedef struct tagCsrNeighborRoamConfig
492{
493 tANI_U32 nNeighborScanTimerPeriod;
494 tANI_U8 nNeighborLookupRssiThreshold;
495 tANI_U8 nNeighborReassocRssiThreshold;
496 tANI_U16 nNeighborScanMinChanTime;
497 tANI_U16 nNeighborScanMaxChanTime;
498 sCsrChannel neighborScanChanList;
499 tANI_U8 nMaxNeighborRetries;
500 tANI_U16 nNeighborResultsRefreshPeriod;
501}tCsrNeighborRoamConfig;
502#endif
503
504typedef struct tagCsrConfig
505{
506 tANI_U32 agingCount;
507 tANI_U32 FragmentationThreshold;
508 tANI_U32 channelBondingMode24GHz;
509 tANI_U32 channelBondingMode5GHz;
510 tANI_U32 RTSThreshold;
511 eCsrPhyMode phyMode;
512 eCsrCfgDot11Mode uCfgDot11Mode;
513 eCsrBand eBand;
514 tANI_U32 HeartbeatThresh50;
515 tANI_U32 HeartbeatThresh24;
516 tANI_U32 bgScanInterval;
517 eCsrCBChoice cbChoice;
518 eCsrBand bandCapability; //indicate hw capability
519 eCsrRoamWmmUserModeType WMMSupportMode;
520 tANI_BOOLEAN Is11eSupportEnabled;
521 tANI_BOOLEAN Is11dSupportEnabled;
522 tANI_BOOLEAN Is11dSupportEnabledOriginal;
523 tANI_BOOLEAN Is11hSupportEnabled;
524 tANI_BOOLEAN shortSlotTime;
525 tANI_BOOLEAN ProprietaryRatesEnabled;
526 tANI_BOOLEAN fenableMCCMode;
527 tANI_U16 TxRate;
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -0800528 tANI_U8 fAllowMCCGODiffBI;
Jeff Johnson295189b2012-06-20 16:38:30 -0700529 tANI_U8 AdHocChannel24;
530 tANI_U8 AdHocChannel5G;
531 tANI_U32 impsSleepTime; //in units of microseconds
532 tANI_U32 scanAgeTimeNCNPS; //scan result aging time threshold when Not-Connect-No-Power-Save, in seconds
533 tANI_U32 scanAgeTimeNCPS; //scan result aging time threshold when Not-Connect-Power-Save, in seconds
534 tANI_U32 scanAgeTimeCNPS; //scan result aging time threshold when Connect-No-Power-Save, in seconds,
535 tANI_U32 scanAgeTimeCPS; //scan result aging time threshold when Connect-Power-Savein seconds
536 tANI_U32 BssPreferValue[CSR_NUM_RSSI_CAT]; //each RSSI category has one value
537 int RSSICat[CSR_NUM_RSSI_CAT];
538 tANI_U8 bCatRssiOffset; //to set the RSSI difference for each category
539 tANI_U32 nRoamingTime; //In seconds, CSR will try this long before gives up, 0 means no roaming
540 //Whether to limit the channels to the ones set in Csr11dInfo. If true, the opertaional
541 //channels are limited to the default channel list. It is an "AND" operation between the
542 //default channels and the channels in the 802.11d IE.
543 tANI_BOOLEAN fEnforce11dChannels;
544 //Country Code Priority
545 //0 = 802.11D > Configured Country > NV
546 //1 = Configured Country > 802.11D > NV
547 tANI_BOOLEAN fSupplicantCountryCodeHasPriority;
548 //When true, AP with unknown country code won't be see.
549 //"Unknown country code" means either Ap doesn't have 11d IE or we cannot
550 //find a domain for the country code in its 11d IE.
551 tANI_BOOLEAN fEnforceCountryCodeMatch;
552 //When true, only APs in the default domain can be seen. If the Ap has "unknown country
553 //code", or the doamin of the country code doesn't match the default domain, the Ap is
554 //not acceptable.
555 tANI_BOOLEAN fEnforceDefaultDomain;
556
557 tANI_U16 vccRssiThreshold;
558 tANI_U32 vccUlMacLossThreshold;
559
560 tANI_U32 nPassiveMinChnTime; //in units of milliseconds
561 tANI_U32 nPassiveMaxChnTime; //in units of milliseconds
562 tANI_U32 nActiveMinChnTime; //in units of milliseconds
563 tANI_U32 nActiveMaxChnTime; //in units of milliseconds
Madan Mohan Koyyalamudi4ff9cd62012-10-30 17:48:57 -0700564#ifdef WLAN_AP_STA_CONCURRENCY
565 tANI_U32 nPassiveMinChnTimeConc; //in units of milliseconds
566 tANI_U32 nPassiveMaxChnTimeConc; //in units of milliseconds
567 tANI_U32 nActiveMinChnTimeConc; //in units of milliseconds
568 tANI_U32 nActiveMaxChnTimeConc; //in units of milliseconds
569 tANI_U32 nRestTimeConc; //in units of milliseconds
Vinay Malekal05fdc812012-12-17 13:04:30 -0800570 tANI_U8 nNumChanCombinedConc; //number of channels combined
571 //in each split scan operation
Madan Mohan Koyyalamudi4ff9cd62012-10-30 17:48:57 -0700572#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700573
574 tANI_BOOLEAN IsIdleScanEnabled;
575 //in dBm, the maximum TX power
576 //The actual TX power is the lesser of this value and 11d.
577 //If 11d is disable, the lesser of this and default setting.
578 tANI_U8 nTxPowerCap;
579 tANI_U32 statsReqPeriodicity; //stats request frequency from PE while in full power
580 tANI_U32 statsReqPeriodicityInPS;//stats request frequency from PE while in power save
581#ifdef WLAN_SOFTAP_FEATURE
582 tANI_U32 dtimPeriod;
583 tANI_BOOLEAN ssidHidden;
584#endif
585
586#ifdef WLAN_FEATURE_VOWIFI_11R
587 tCsr11rConfig csr11rConfig;
588#endif
589
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700590#ifdef FEATURE_WLAN_LFR
591 tANI_U8 isFastRoamIniFeatureEnabled;
592#endif
593
Jeff Johnson295189b2012-06-20 16:38:30 -0700594#ifdef FEATURE_WLAN_CCX
595 tANI_U8 isCcxIniFeatureEnabled;
596#endif
597
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700598#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
Jeff Johnson295189b2012-06-20 16:38:30 -0700599 tANI_U8 isFastTransitionEnabled;
Jeff Johnson43971f52012-07-17 12:26:56 -0700600 tANI_U8 RoamRssiDiff;
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -0800601 tANI_U8 nImmediateRoamRssiDiff;
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -0800602 tANI_BOOLEAN nRoamPrefer5GHz;
Jeff Johnson295189b2012-06-20 16:38:30 -0700603#endif
604
605#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
606 tCsrNeighborRoamConfig neighborRoamConfig;
607#endif
608
609 /* Instead of Reassoc, send ADDTS/DELTS even when ACM is off for that AC
610 * This is mandated by WMM-AC certification */
611 tANI_BOOLEAN addTSWhenACMIsOff;
612
613 tANI_BOOLEAN fValidateList;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -0700614 //Remove this code once SLM_Sessionization is supported
615 //BMPS_WORKAROUND_NOT_NEEDED
Jeff Johnsone7245742012-09-05 17:12:55 -0700616 tANI_BOOLEAN doBMPSWorkaround;
Jeff Johnson295189b2012-06-20 16:38:30 -0700617
618 //To enable/disable scanning 2.4Ghz channels twice on a single scan request from HDD
619 tANI_BOOLEAN fScanTwice;
Jeff Johnsone7245742012-09-05 17:12:55 -0700620#ifdef WLAN_FEATURE_11AC
621 tANI_U32 nVhtChannelWidth;
622#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700623
624}tCsrConfig;
625
626typedef struct tagCsrChannelPowerInfo
627{
628 tListElem link;
629 tANI_U8 firstChannel;
630 tANI_U8 numChannels;
631 tANI_U8 txPower;
632 tANI_U8 interChannelOffset;
633}tCsrChannelPowerInfo;
634
635typedef struct tagRoamJoinStatus
636{
637 tSirResultCodes statusCode;
638 //this is set to unspecified if statusCode indicates timeout. Or it is the failed reason from the other BSS(per 802.11 spec)
639 tANI_U32 reasonCode;
640}tCsrRoamJoinStatus;
641
642typedef struct tagCsrOsChannelMask
643{
644 tANI_U8 numChannels;
645 tANI_BOOLEAN scanEnabled[WNI_CFG_VALID_CHANNEL_LIST_LEN];
646 tANI_U8 channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
647}tCsrOsChannelMask;
648
649
650typedef struct tagCsrScanStruct
651{
652 tScanProfile scanProfile;
653 tANI_U32 nextScanID;
Madan Mohan Koyyalamudica43cdf2012-09-24 13:15:49 -0700654 tDblLinkList scanResultList;
Jeff Johnson295189b2012-06-20 16:38:30 -0700655 tDblLinkList tempScanResults;
656 tANI_BOOLEAN fScanEnable;
657 tANI_BOOLEAN fFullScanIssued;
658 tPalTimerHandle hTimerGetResult;
659#ifdef WLAN_AP_STA_CONCURRENCY
660 tPalTimerHandle hTimerStaApConcTimer;
661#endif
662 tPalTimerHandle hTimerIdleScan;
663 tPalTimerHandle hTimerResultAging;
Sandeep Puligilla2b6dc632012-12-17 14:44:16 -0800664 tPalTimerHandle hTimerResultCfgAging;
Jeff Johnson295189b2012-06-20 16:38:30 -0700665 tPalTimerHandle hTimerBgScan;
666 //changes on every scan, it is used as a flag for whether 11d info is found on every scan
Sandeep Puligilla2b6dc632012-12-17 14:44:16 -0800667 tANI_U8 channelOf11dInfo;
668 tANI_U8 scanResultCfgAgingTime;
Jeff Johnson295189b2012-06-20 16:38:30 -0700669 //changes on every scan, a flag to tell whether conflict 11d info found on each BSS
670 tANI_BOOLEAN fAmbiguous11dInfoFound;
671 //Tush: changes on every scan, a flag to tell whether the applied 11d info present in one of the scan results
672 tANI_BOOLEAN fCurrent11dInfoMatch;
673 tANI_BOOLEAN f11dInfoReset; //to indicate whether the 11d info in CFG is reset to default
674 tSirScanType curScanType;
675 tCsrChannel baseChannels; //This are all the supported channels AND(&) to the current eBand
676 tCsrChannel channels11d;
677 tChannelListWithPower defaultPowerTable[WNI_CFG_VALID_CHANNEL_LIST_LEN]; //From NV
678 tChannelListWithPower defaultPowerTable40MHz[WNI_CFG_VALID_CHANNEL_LIST_LEN]; //From NV
679 tANI_U32 numChannelsDefault; //total channels of NV
680 tCsrChannel base20MHzChannels; //The channel base to work on
681 tCsrChannel base40MHzChannels; //center channels for 40MHz channels
682 tDblLinkList channelPowerInfoList24;
683 tDblLinkList channelPowerInfoList5G;
684 tANI_U32 nLastAgeTimeOut;
685 tANI_U32 nAgingCountDown;
686 tANI_U8 countryCodeDefault[WNI_CFG_COUNTRY_CODE_LEN+1]; //The country code from NV
687 tANI_U8 countryCodeCurrent[WNI_CFG_COUNTRY_CODE_LEN+1];
688 tANI_U8 countryCode11d[WNI_CFG_COUNTRY_CODE_LEN+1];
689 v_REGDOMAIN_t domainIdDefault; //default regulatory domain
690 v_REGDOMAIN_t domainIdCurrent; //current regulatory domain
691 tANI_BOOLEAN f11dInfoApplied;
692 tANI_BOOLEAN fCancelIdleScan;
693#ifdef FEATURE_WLAN_WAPI
694// tANI_U16 NumBkidCandidate;
695// tBkidCandidateInfo BkidCandidateInfo[CSR_MAX_BKID_ALLOWED]; /* Move this as part of SessionEntry */
696#endif /* FEATURE_WLAN_WAPI */
697 tANI_U8 numBGScanChannel; //number of valid channels in the bgScanChannelList
698 tANI_U8 bgScanChannelList[WNI_CFG_BG_SCAN_CHANNEL_LIST_LEN];
699 //the ChannelInfo member is not used in this structure.
700 //numBGScanChannel and bgScanChannelList are used for the BG scan channel info
701 tCsrBGScanRequest bgScanParams;
702 tANI_BOOLEAN fRestartIdleScan;
703 tANI_U32 nIdleScanTimeGap; //the time since last trying to trigger idle scan
704 tCsrOsChannelMask osScanChannelMask;//keep a track of channels to be scnned while in traffic condition
705 tANI_U16 nBssLimit; //the maximum number of BSS in scan cache
706 /*channelPowerInfoList24 has been seen corrupted. Set this flag to true trying to
707 * detect when it happens. Adding this into code because we can't reproduce it easily.
708 * We don't know when it happens. */
709 tANI_BOOLEAN fValidateList;
710 /*Customer wants to start with an active scan based on the default country code.
711 * This optimization will minimize the driver load to association time.
712 * Based on this flag we will bypass the initial passive scan needed for 11d
713 * to determine the country code & domain */
714 tANI_BOOLEAN fEnableBypass11d;
715
716 /*Customer wants to optimize the scan time. Avoiding scans(passive) on DFS
717 * channels while swipping through both bands can save some time
718 * (apprx 1.3 sec) */
719 tANI_BOOLEAN fEnableDFSChnlScan;
720
Jeff Johnsone7245742012-09-05 17:12:55 -0700721 /*
722 * To enable/disable scanning only 2.4Ghz channels on first scan
723 */
724 tANI_BOOLEAN fFirstScanOnly2GChnl;
725
Jeff Johnson295189b2012-06-20 16:38:30 -0700726 tANI_BOOLEAN fDropScanCmd; //true means we don't accept scan commands
727
728#ifdef WLAN_AP_STA_CONCURRENCY
729 tDblLinkList scanCmdPendingList;
730#endif
Madan Mohan Koyyalamudi470d2cf2012-09-28 14:43:44 -0700731 tCsrChannel occupiedChannels; //This includes all channels on which candidate APs are found
Madan Mohan Koyyalamudi3f65e312012-11-06 15:31:12 -0800732
733 tANI_BOOLEAN fIgnore_chan165;
Jeff Johnson295189b2012-06-20 16:38:30 -0700734}tCsrScanStruct;
735
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800736#ifdef FEATURE_WLAN_TDLS
737/*
738 * struct to carry TDLS discovery info..
739 */
740typedef struct sCsrTdlsContext
741{
742#ifdef FEATURE_WLAN_TDLS_INTERNAL
743 tDblLinkList tdlsPotentialPeerList ;
744 tANI_U16 tdlsCommonFlag ;
745 tANI_U16 tdlsCommonState ;
746#endif
747 tANI_U16 tdlsPeerCount ;
748}tCsrTdlsCtxStruct;
749
750#ifdef FEATURE_WLAN_TDLS_INTERNAL
751typedef struct sCsrTdlsPeerLinkInfo
752{
753 tListElem tdlsPeerStaLink ;
754 tSirTdlsPeerInfo tdlsDisPeerInfo ;
755}tCsrTdlsPeerLinkinfo ;
756#endif
757#endif
758
759
Jeff Johnson295189b2012-06-20 16:38:30 -0700760
761//Save the connected information. This structure + connectedProfile
762//should contain all information about the connection
763typedef struct tagRoamCsrConnectedInfo
764{
765 tANI_U32 nBeaconLength; //the length, in bytes, of the beacon frame, can be 0
766 tANI_U32 nAssocReqLength; //the length, in bytes, of the assoc req frame, can be 0
767 tANI_U32 nAssocRspLength; //The length, in bytes, of the assoc rsp frame, can be 0
768#ifdef WLAN_FEATURE_VOWIFI_11R
769 tANI_U32 nRICRspLength; //Length of the parsed RIC response IEs received in reassoc response
770#endif
771#ifdef FEATURE_WLAN_CCX
772 tANI_U32 nTspecIeLength;
773#endif
774 tANI_U8 *pbFrames; //Point to a buffer contain the beacon, assoc req, assoc rsp frame, in that order
775 //user needs to use nBeaconLength, nAssocReqLength, nAssocRspLength to desice where
776 //each frame starts and ends.
777 tANI_U8 staId;
778}tCsrRoamConnectedInfo;
779
780
781typedef struct tagCsrLinkQualityIndInfo
782{
783 csrRoamLinkQualityIndCallback callback;
784 void *context;
785}tCsrLinkQualityIndInfo;
786
787typedef struct tagCsrPeStatsReqInfo
788{
789 tListElem link; /* list links */
790 tANI_U32 statsMask;
791 tANI_U32 periodicity;
792 tANI_BOOLEAN rspPending;
793 vos_timer_t hPeStatsTimer;
794 tANI_BOOLEAN timerRunning;
795 tANI_U8 staId;
796 tANI_U8 numClient;
797 tpAniSirGlobal pMac;
798 /* To remember if the peStats timer is stopped successfully or not */
799 tANI_BOOLEAN timerStopFailed;
800
801}tCsrPeStatsReqInfo;
802
803typedef struct tagCsrStatsClientReqInfo
804{
805 tListElem link; /* list links */
806 eCsrStatsRequesterType requesterId;
807 tCsrStatsCallback callback;
808 tANI_U32 periodicity;
809 void *pContext;
810 tANI_U32 statsMask;
811 tCsrPeStatsReqInfo *pPeStaEntry;
812 tANI_U8 staId;
813 vos_timer_t timer;
814 tANI_BOOLEAN timerExpired;
815 tpAniSirGlobal pMac; // TODO: Confirm this change BTAMP
816}tCsrStatsClientReqInfo;
817
818typedef struct tagCsrTlStatsReqInfo
819{
820 tANI_U32 periodicity;
821 tANI_BOOLEAN timerRunning;
822 tPalTimerHandle hTlStatsTimer;
823 tANI_U8 numClient;
824}tCsrTlStatsReqInfo;
825
826typedef struct tagCsrRoamSession
827{
828 tANI_U8 sessionId; // Session ID
829 tANI_BOOLEAN sessionActive; // TRUE if it is used
830 tCsrBssid selfMacAddr; // For BT-AMP station, this serve as BSSID for self-BSS.
831 csrRoamCompleteCallback callback;
832 void *pContext;
833 eCsrConnectState connectState;
834 tCsrRoamConnectedProfile connectedProfile;
835 tCsrRoamConnectedInfo connectedInfo;
836 tCsrRoamProfile *pCurRoamProfile;
837 tSirBssDescription *pConnectBssDesc;
838 tANI_U16 NumPmkidCache;
839 tPmkidCacheInfo PmkidCacheInfo[CSR_MAX_PMKID_ALLOWED];
840 tANI_U8 cJoinAttemps;
841 //This may or may not have the up-to-date valid channel list
842 //It is used to get WNI_CFG_VALID_CHANNEL_LIST and not allocate memory all the time
843 tSirMacChanNum validChannelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
844 tANI_S32 sPendingCommands; //0 means CSR is ok to low power
845#ifdef FEATURE_WLAN_WAPI
846 tANI_U16 NumBkidCache;
847 tBkidCacheInfo BkidCacheInfo[CSR_MAX_BKID_ALLOWED];
848#endif /* FEATURE_WLAN_WAPI */
849 tANI_BOOLEAN fRoaming; //indicate whether CSR is roaming (either via lostlink or dynamic roaming)
850 //to remember some parameters needed for START_BSS.
851 //All member must be set every time we try to join or start an IBSS or BT-AMP
852 tCsrRoamStartBssParams bssParams;
853 tANI_U32 nWpaRsnReqIeLength; //the byte count of pWpaRsnIE;
854 tANI_U8 *pWpaRsnReqIE; //this contain the WPA/RSN IE in assoc request or the one sent in beacon (IBSS)
855 tANI_U32 nWpaRsnRspIeLength; //the byte count for pWpaRsnRspIE
856 tANI_U8 *pWpaRsnRspIE; //this contain the WPA/RSN IE in beacon/probe rsp
857#ifdef FEATURE_WLAN_WAPI
858 tANI_U32 nWapiReqIeLength; //the byte count of pWapiReqIE;
859 tANI_U8 *pWapiReqIE; //this contain the WAPI IE in assoc request or the one sent in beacon (IBSS)
860 tANI_U32 nWapiRspIeLength; //the byte count for pWapiRspIE
861 tANI_U8 *pWapiRspIE; //this contain the WAPI IE in beacon/probe rsp
862#endif /* FEATURE_WLAN_WAPI */
863 tANI_U32 nAddIEScanLength; //the byte count of pAddIeScanIE;
864 tANI_U8 *pAddIEScan; //this contains the additional IE in (unicast) probe request at the time of join
865 tANI_U32 nAddIEAssocLength; //the byte count for pAddIeAssocIE
866 tANI_U8 *pAddIEAssoc; //this contains the additional IE in (re) assoc request
867
868 tANI_TIMESTAMP roamingStartTime; //in units of 10ms
869 tCsrTimerInfo roamingTimerInfo;
870 eCsrRoamingReason roamingReason;
871 tANI_BOOLEAN fCancelRoaming;
872 tPalTimerHandle hTimerRoaming;
873 tPalTimerHandle hTimerIbssJoining;
874 tCsrTimerInfo ibssJoinTimerInfo;
875 tANI_BOOLEAN ibss_join_pending;
876 eCsrRoamResult roamResult; //the roamResult that is used when the roaming timer fires
877 tCsrRoamJoinStatus joinFailStatusCode; //This is the reason code for join(assoc) failure
878 //The status code returned from PE for deauth or disassoc (in case of lostlink), or our own dynamic roaming
879 tANI_U32 roamingStatusCode;
880 tANI_U16 NumPmkidCandidate;
881 tPmkidCandidateInfo PmkidCandidateInfo[CSR_MAX_PMKID_ALLOWED];
882 #ifdef FEATURE_WLAN_WAPI
883 tANI_U16 NumBkidCandidate;
884 tBkidCandidateInfo BkidCandidateInfo[CSR_MAX_BKID_ALLOWED];
885#endif
886 tANI_BOOLEAN fWMMConnection;
887#ifdef FEATURE_WLAN_BTAMP_UT_RF
888 //To retry a join later when it fails if so desired
889 tPalTimerHandle hTimerJoinRetry;
890 tCsrTimerInfo joinRetryTimerInfo;
891 tANI_U32 maxRetryCount;
892#endif
893#ifdef FEATURE_WLAN_CCX
894 tCsrCcxCckmInfo ccxCckmInfo;
895 tANI_BOOLEAN isPrevApInfoValid;
896 tSirMacSSid prevApSSID;
897 tCsrBssid prevApBssid;
898 tANI_U8 prevOpChannel;
899 tANI_U16 clientDissSecs;
900 tANI_U32 roamTS1;
901#endif
902 tANI_U8 bRefAssocStartCnt; //Tracking assoc start indication
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700903 /* to force the AP initiate fresh 802.1x authentication after re-association need to clear
904 * the PMKID cache. To clear the cache in this particular case this is added
905 * it is needed by the HS 2.0 passpoint certification 5.2.a and b testcases */
906 tANI_BOOLEAN fIgnorePMKIDCache;
Jeff Johnson295189b2012-06-20 16:38:30 -0700907} tCsrRoamSession;
908
909typedef struct tagCsrRoamStruct
910{
911 tANI_U32 nextRoamId;
912 tDblLinkList roamCmdPendingList;
913 tDblLinkList channelList5G;
914 tDblLinkList channelList24;
915 tCsrConfig configParam;
916 tANI_U32 numChannelsEeprom; //total channels of eeprom
917 tCsrChannel base20MHzChannels; //The channel base to work on
918 tCsrChannel base40MHzChannels; //center channels for 40MHz channels
919 eCsrRoamState curState[CSR_ROAM_SESSION_MAX];
920 eCsrRoamSubState curSubState[CSR_ROAM_SESSION_MAX];
921 //This may or may not have the up-to-date valid channel list
922 //It is used to get WNI_CFG_VALID_CHANNEL_LIST and not allocate memory all the time
923 tSirMacChanNum validChannelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
924 tANI_U32 numValidChannels; //total number of channels in CFG
925
926 tANI_S32 sPendingCommands;
Jeff Johnson295189b2012-06-20 16:38:30 -0700927 tPalTimerHandle hTimerWaitForKey; //To support timeout for WaitForKey state
928 tCsrSummaryStatsInfo summaryStatsInfo;
929 tCsrGlobalClassAStatsInfo classAStatsInfo;
930 tCsrGlobalClassBStatsInfo classBStatsInfo;
931 tCsrGlobalClassCStatsInfo classCStatsInfo;
932 tCsrGlobalClassDStatsInfo classDStatsInfo;
933 tCsrPerStaStatsInfo perStaStatsInfo[CSR_MAX_STA];
934 tDblLinkList statsClientReqList;
935 tDblLinkList peStatsReqList;
936 tCsrTlStatsReqInfo tlStatsReqInfo;
937 eCsrRoamLinkQualityInd vccLinkQuality;
938 tCsrLinkQualityIndInfo linkQualityIndInfo;
939 v_CONTEXT_t gVosContext; //used for interaction with TL
940 //To specify whether an association or a IBSS is WMM enabled
941 //This parameter is only valid during a join or start BSS command is being executed
942 //tANI_BOOLEAN fWMMConnection; /* Moving it to be part of roamsession */
943 v_U8_t ucACWeights[WLANTL_MAX_AC];
944 /* TODO : Upto here */
945 tCsrTimerInfo WaitForKeyTimerInfo;
946 tCsrRoamSession *roamSession;
947 tANI_U32 transactionId; // Current transaction ID for internal use.
948#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
949 tCsrNeighborRoamControlInfo neighborRoamInfo;
950#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700951#ifdef FEATURE_WLAN_LFR
952 tANI_U8 isFastRoamIniFeatureEnabled;
953#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700954#ifdef FEATURE_WLAN_CCX
955 tANI_U8 isCcxIniFeatureEnabled;
956#endif
Jeff Johnson43971f52012-07-17 12:26:56 -0700957#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
958 tANI_U8 RoamRssiDiff;
959#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700960}tCsrRoamStruct;
961
962
963#define GET_NEXT_ROAM_ID(pRoamStruct) (((pRoamStruct)->nextRoamId + 1 == 0) ? 1 : (pRoamStruct)->nextRoamId)
964#define CSR_IS_ROAM_STATE(pMac, state, sessionId) ( (state) == (pMac)->roam.curState[sessionId] )
965
966#define CSR_IS_ROAM_STOP(pMac, sessionId) CSR_IS_ROAM_STATE( (pMac), eCSR_ROAMING_STATE_STOP, sessionId )
967#define CSR_IS_ROAM_INIT(pMac, sessionId) CSR_IS_ROAM_STATE( (pMac), eCSR_ROAMING_STATE_INIT, sessionId )
968#define CSR_IS_ROAM_SCANNING(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_SCANNING, sessionId )
969#define CSR_IS_ROAM_JOINING(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_JOINING, sessionId )
970#define CSR_IS_ROAM_IDLE(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_IDLE, sessionId )
971#define CSR_IS_ROAM_JOINED(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_JOINED, sessionId )
972
973#define CSR_IS_ROAM_SUBSTATE(pMac, subState, sessionId) ((subState) == (pMac)->roam.curSubState[sessionId])
974#define CSR_IS_ROAM_SUBSTATE_JOIN_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOIN_REQ, sessionId)
975#define CSR_IS_ROAM_SUBSTATE_AUTH_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_AUTH_REQ, sessionId)
976#define CSR_IS_ROAM_SUBSTATE_REASSOC_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_REASSOC_REQ, sessionId)
977#define CSR_IS_ROAM_SUBSTATE_DISASSOC_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_REQ, sessionId)
978#define CSR_IS_ROAM_SUBSTATE_DISASSOC_NO_JOIN(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_NOTHING_TO_JOIN, sessionId)
979#define CSR_IS_ROAM_SUBSTATE_REASSOC_FAIL(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_REASSOC_FAILURE, sessionId)
980#define CSR_IS_ROAM_SUBSTATE_DISASSOC_FORCED(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_FORCED, sessionId)
981#define CSR_IS_ROAM_SUBSTATE_DEAUTH_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DEAUTH_REQ, sessionId)
982#define CSR_IS_ROAM_SUBSTATE_START_BSS_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_START_BSS_REQ, sessionId)
983#define CSR_IS_ROAM_SUBSTATE_STOP_BSS_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_STOP_BSS_REQ, sessionId)
984#define CSR_IS_ROAM_SUBSTATE_DISCONNECT_CONTINUE(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISCONNECT_CONTINUE_ROAMING, sessionId)
985#define CSR_IS_ROAM_SUBSTATE_CONFIG(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_CONFIG, sessionId)
986#define CSR_IS_ROAM_SUBSTATE_WAITFORKEY(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_WAIT_FOR_KEY, sessionId)
987#define CSR_IS_ROAM_SUBSTATE_DISASSOC_HO(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_HANDOFF, sessionId)
988#define CSR_IS_ROAM_SUBSTATE_HO_NT(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOINED_NO_TRAFFIC, sessionId)
989#define CSR_IS_ROAM_SUBSTATE_HO_NRT(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOINED_NON_REALTIME_TRAFFIC, sessionId)
990#define CSR_IS_ROAM_SUBSTATE_HO_RT(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOINED_REALTIME_TRAFFIC, sessionId)
991
992#define CSR_IS_PHY_MODE_B_ONLY(pMac) \
993 ((eCSR_DOT11_MODE_11b == (pMac)->roam.configParam.phyMode) ||\
994 (eCSR_DOT11_MODE_11b_ONLY == (pMac)->roam.configParam.phyMode))
995
996#define CSR_IS_PHY_MODE_G_ONLY(pMac) \
997 (eCSR_DOT11_MODE_11g == (pMac)->roam.configParam.phyMode || eCSR_DOT11_MODE_11g_ONLY == (pMac)->roam.configParam.phyMode)
998
999#define CSR_IS_PHY_MODE_A_ONLY(pMac) \
1000 ((eCSR_DOT11_MODE_11a == (pMac)->roam.configParam.phyMode) ||\
1001 (eCSR_DOT11_MODE_11a_ONLY == (pMac)->roam.configParam.phyMode))
1002
Jeff Johnsone7245742012-09-05 17:12:55 -07001003#ifdef WLAN_FEATURE_11AC
1004#define CSR_IS_PHY_MODE_DUAL_BAND(phyMode) \
1005 ((eCSR_DOT11_MODE_abg & (phyMode)) || (eCSR_DOT11_MODE_11n & (phyMode)) || \
1006 (eCSR_DOT11_MODE_11ac & (phyMode)) || \
1007 (eCSR_DOT11_MODE_TAURUS & (phyMode)) || \
1008 (eCSR_DOT11_MODE_AUTO & (phyMode)))
1009#else
Jeff Johnson295189b2012-06-20 16:38:30 -07001010#define CSR_IS_PHY_MODE_DUAL_BAND(phyMode) \
1011 ((eCSR_DOT11_MODE_abg & (phyMode)) || (eCSR_DOT11_MODE_11n & (phyMode)) || \
1012 (eCSR_DOT11_MODE_TAURUS & (phyMode)) || \
1013 (eCSR_DOT11_MODE_AUTO & (phyMode)))
Jeff Johnsone7245742012-09-05 17:12:55 -07001014#endif
1015
Jeff Johnson295189b2012-06-20 16:38:30 -07001016
1017// this function returns TRUE if the NIC is operating exclusively in the 2.4 GHz band, meaning
1018// it is NOT operating in the 5.0 GHz band.
1019#define CSR_IS_24_BAND_ONLY(pMac) \
1020 (eCSR_BAND_24 == (pMac)->roam.configParam.eBand)
1021
1022#define CSR_IS_5G_BAND_ONLY(pMac) \
1023 (eCSR_BAND_5G == (pMac)->roam.configParam.eBand)
1024
1025#define CSR_IS_RADIO_DUAL_BAND(pMac) \
1026 (eCSR_BAND_ALL == (pMac)->roam.configParam.bandCapability)
1027
1028#define CSR_IS_RADIO_BG_ONLY(pMac) \
1029 (eCSR_BAND_24 == (pMac)->roam.configParam.bandCapability)
1030
1031// this function returns TRUE if the NIC is operating exclusively in the 5.0 GHz band, meaning
1032// it is NOT operating in the 2.4 GHz band
1033#define CSR_IS_RADIO_A_ONLY(pMac) \
1034 (eCSR_BAND_5G == (pMac)->roam.configParam.bandCapability)
1035
1036// this function returns TRUE if the NIC is operating in both bands.
1037#define CSR_IS_OPEARTING_DUAL_BAND(pMac) \
1038 ((eCSR_BAND_ALL == (pMac)->roam.configParam.bandCapability) && (eCSR_BAND_ALL == (pMac)->roam.configParam.eBand))
1039
1040// this function returns TRUE if the NIC can operate in the 5.0 GHz band (could operate in the
1041// 2.4 GHz band also).
1042#define CSR_IS_OPERATING_A_BAND(pMac) \
1043 (CSR_IS_OPEARTING_DUAL_BAND((pMac)) || CSR_IS_RADIO_A_ONLY((pMac)) || CSR_IS_5G_BAND_ONLY((pMac)))
1044
1045// this function returns TRUE if the NIC can operate in the 2.4 GHz band (could operate in the
1046// 5.0 GHz band also).
1047#define CSR_IS_OPERATING_BG_BAND(pMac) \
1048 (CSR_IS_OPEARTING_DUAL_BAND((pMac)) || CSR_IS_RADIO_BG_ONLY((pMac)) || CSR_IS_24_BAND_ONLY((pMac)))
1049
1050#define CSR_IS_CHANNEL_5GHZ(chnNum) \
Jeff Johnsone7245742012-09-05 17:12:55 -07001051 (((chnNum) >= CSR_MIN_5GHz_CHANNEL_NUMBER) && ((chnNum) <= CSR_MAX_5GHz_CHANNEL_NUMBER))
Jeff Johnson295189b2012-06-20 16:38:30 -07001052
1053#define CSR_IS_CHANNEL_24GHZ(chnNum) \
1054 (((chnNum) > 0) && ((chnNum) <= CSR_MAX_24GHz_CHANNEL_NUMBER))
1055
1056#define CSR_IS_SAME_BAND_CHANNELS(ch1, ch2) (CSR_IS_CHANNEL_5GHZ(ch1) == CSR_IS_CHANNEL_5GHZ(ch2))
1057
1058
1059#define CSR_IS_11D_INFO_FOUND(pMac) \
1060 (0 != (pMac)->scan.channelOf11dInfo)
1061// DEAUTHIND
1062#define CSR_IS_ROAMING(pSession) ((CSR_IS_LOSTLINK_ROAMING((pSession)->roamingReason)) || \
1063 (eCsrDynamicRoaming == (pSession)->roamingReason) || \
1064 (eCsrReassocRoaming == (pSession)->roamingReason))
1065
1066
1067#define CSR_IS_SET_KEY_COMMAND( pCommand ) ( eSmeCommandSetKey == (pCommand)->command )
1068
1069#define CSR_IS_ADDTS_WHEN_ACMOFF_SUPPORTED(pMac) (pMac->roam.configParam.addTSWhenACMIsOff)
1070// DEAUTHIND
1071#define CSR_IS_LOSTLINK_ROAMING(reason) ((eCsrLostlinkRoamingDisassoc == (reason)) || (eCsrLostlinkRoamingDeauth == (reason)))
1072
1073//Stop CSR from asking for IMPS, This function doesn't disable IMPS from CSR
1074void csrScanSuspendIMPS( tpAniSirGlobal pMac );
1075//Start CSR from asking for IMPS. This function doesn't trigger CSR to request entering IMPS
1076//because IMPS maybe disabled.
1077void csrScanResumeIMPS( tpAniSirGlobal pMac );
1078
1079eHalStatus csrInitGetChannels(tpAniSirGlobal pMac);
1080
1081eHalStatus csrSetModifyProfileFields(tpAniSirGlobal pMac, tANI_U32 sessionId,
1082 tCsrRoamModifyProfileFields *pModifyProfileFields);
1083/* ---------------------------------------------------------------------------
1084 \fn csrGetModifyProfileFields
1085 \brief HDD or SME - QOS calls this function to get the current values of
1086 connected profile fields changing which can cause reassoc.
1087 This function must be called after CFG is downloaded and STA is in connected
1088 state.
1089 \param pModifyProfileFields - pointer to the connected profile fields
1090 changing which can cause reassoc
1091
1092 \return eHalStatus
1093 -------------------------------------------------------------------------------*/
1094eHalStatus csrGetModifyProfileFields(tpAniSirGlobal pMac, tANI_U32 sessionId,
1095 tCsrRoamModifyProfileFields * pModifyProfileFields);
1096void csrSetGlobalCfgs( tpAniSirGlobal pMac );
1097void csrSetDefaultDot11Mode( tpAniSirGlobal pMac );
1098void csrScanSetChannelMask(tpAniSirGlobal pMac, tCsrChannelInfo *pChannelInfo);
1099tANI_BOOLEAN csrIsConnStateDisconnected(tpAniSirGlobal pMac, tANI_U32 sessionId);
1100tANI_BOOLEAN csrIsConnStateConnectedIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1101tANI_BOOLEAN csrIsConnStateDisconnectedIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1102tANI_BOOLEAN csrIsConnStateConnectedInfra( tpAniSirGlobal pMac, tANI_U32 sessionId );
1103tANI_BOOLEAN csrIsConnStateConnected( tpAniSirGlobal pMac, tANI_U32 sessionId );
1104tANI_BOOLEAN csrIsConnStateInfra( tpAniSirGlobal pMac, tANI_U32 sessionId );
1105tANI_BOOLEAN csrIsConnStateIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1106tANI_BOOLEAN csrIsConnStateWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1107tANI_BOOLEAN csrIsConnStateConnectedWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1108tANI_BOOLEAN csrIsConnStateDisconnectedWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1109tANI_BOOLEAN csrIsAnySessionInConnectState( tpAniSirGlobal pMac );
1110tANI_BOOLEAN csrIsAllSessionDisconnected( tpAniSirGlobal pMac );
Madan Mohan Koyyalamudi48081ef2012-12-04 16:49:55 -08001111tANI_BOOLEAN csrIsStaSessionConnected( tpAniSirGlobal pMac );
1112tANI_BOOLEAN csrIsP2pSessionConnected( tpAniSirGlobal pMac );
Madan Mohan Koyyalamudid3d22592012-09-24 14:01:29 -07001113tANI_BOOLEAN csrIsAnySessionConnected( tpAniSirGlobal pMac );
Jeff Johnson295189b2012-06-20 16:38:30 -07001114tANI_BOOLEAN csrIsInfraConnected( tpAniSirGlobal pMac );
1115tANI_BOOLEAN csrIsConcurrentInfraConnected( tpAniSirGlobal pMac );
Jeff Johnsone7245742012-09-05 17:12:55 -07001116tANI_BOOLEAN csrIsConcurrentSessionRunning( tpAniSirGlobal pMac );
Jeff Johnsone7245742012-09-05 17:12:55 -07001117tANI_BOOLEAN csrIsInfraApStarted( tpAniSirGlobal pMac );
Jeff Johnson295189b2012-06-20 16:38:30 -07001118tANI_BOOLEAN csrIsIBSSStarted( tpAniSirGlobal pMac );
1119tANI_BOOLEAN csrIsBTAMPStarted( tpAniSirGlobal pMac );
1120tANI_BOOLEAN csrIsBTAMP( tpAniSirGlobal pMac, tANI_U32 sessionId );
1121eHalStatus csrIsBTAMPAllowed( tpAniSirGlobal pMac, tANI_U32 chnId );
Jeff Johnsone7245742012-09-05 17:12:55 -07001122tANI_BOOLEAN csrIsValidMcConcurrentSession(tpAniSirGlobal pMac, tANI_U32 sessionId,
1123 tSirBssDescription *pBssDesc);
Jeff Johnson295189b2012-06-20 16:38:30 -07001124#ifdef WLAN_SOFTAP_FEATURE
1125tANI_BOOLEAN csrIsConnStateConnectedInfraAp( tpAniSirGlobal pMac, tANI_U32 sessionId );
1126#endif
1127/*----------------------------------------------------------------------------
1128 \fn csrRoamRegisterLinkQualityIndCallback
1129
1130 \brief
1131 a CSR function to allow HDD to register a callback handler with CSR for
1132 link quality indications.
1133
1134 Only one callback may be registered at any time.
1135 In order to deregister the callback, a NULL cback may be provided.
1136
1137 Registration happens in the task context of the caller.
1138
1139 \param callback - Call back being registered
1140 \param pContext - user data
1141
1142 DEPENDENCIES: After CSR open
1143
1144 \return eHalStatus
1145-----------------------------------------------------------------------------*/
1146eHalStatus csrRoamRegisterLinkQualityIndCallback(tpAniSirGlobal pMac,
1147 csrRoamLinkQualityIndCallback callback,
1148 void *pContext);
1149/* ---------------------------------------------------------------------------
1150 \fn csrGetStatistics
1151 \brief csr function that client calls to register a callback to get
1152 different PHY level statistics from CSR.
1153
1154 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
1155 \param statsMask - The different category/categories of stats requester is looking for
1156 \param callback - SME sends back the requested stats using the callback
1157 \param periodicity - If requester needs periodic update, 0 means it's an one
1158 time request
1159 \param cache - If requester is happy with cached stats
1160 \param staId - The station ID for which the stats is requested for
1161 \param pContext - user context to be passed back along with the callback
1162
1163 \return eHalStatus
1164 ---------------------------------------------------------------------------*/
1165eHalStatus csrGetStatistics(tpAniSirGlobal pMac, eCsrStatsRequesterType requesterId,
1166 tANI_U32 statsMask,
1167 tCsrStatsCallback callback,
1168 tANI_U32 periodicity, tANI_BOOLEAN cache,
1169 tANI_U8 staId, void *pContext);
1170
1171
1172eHalStatus csrGetRssi(tpAniSirGlobal pMac,tCsrRssiCallback callback,tANI_U8 staId,tCsrBssid bssId,void * pContext,void * pVosContext);
1173eHalStatus csrRoamRegisterCallback(tpAniSirGlobal pMac, csrRoamCompleteCallback callback, void *pContext);
1174/* ---------------------------------------------------------------------------
1175 \fn csrGetConfigParam
1176 \brief HDD calls this function to get the global settings currently maintained by CSR.
1177 \param pParam - caller allocated memory
1178 \return eHalStatus
1179 -------------------------------------------------------------------------------*/
1180eHalStatus csrGetConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam);
1181
1182/* ---------------------------------------------------------------------------
1183 \fn csrMsgProcessor
1184 \brief HDD calls this function to change some global settings.
1185 caller must set the all fields or call csrGetConfigParam to prefill the fields.
1186 \param pParam - caller allocated memory
1187 \return eHalStatus
1188 -------------------------------------------------------------------------------*/
1189eHalStatus csrChangeDefaultConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam);
1190
1191
1192/* ---------------------------------------------------------------------------
1193 \fn csrMsgProcessor
1194 \brief HDD calls this function for the messages that are handled by CSR.
1195 \param pMsgBuf - a pointer to a buffer that maps to various structures base on the message type.
1196 The beginning of the buffer can always map to tSirSmeRsp.
1197 \return eHalStatus
1198 -------------------------------------------------------------------------------*/
1199eHalStatus csrMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf );
1200
1201/* ---------------------------------------------------------------------------
1202 \fn csrOpen
1203 \brief This function must be called before any API call to CSR.
1204 \return eHalStatus
1205 -------------------------------------------------------------------------------*/
1206eHalStatus csrOpen(tpAniSirGlobal pMac);
1207/* ---------------------------------------------------------------------------
1208 \fn csrClose
1209 \brief To close down CSR module. There should not be any API call into CSR after calling this function.
1210 \return eHalStatus
1211 -------------------------------------------------------------------------------*/
1212eHalStatus csrClose(tpAniSirGlobal pMac);
1213/* ---------------------------------------------------------------------------
1214 \fn csrStart
1215 \brief To start CSR.
1216 \return eHalStatus
1217 -------------------------------------------------------------------------------*/
1218eHalStatus csrStart(tpAniSirGlobal pMac);
1219/* ---------------------------------------------------------------------------
1220 \fn csrStop
1221 \brief To stop CSR. CSR still keeps its current setting.
1222 \return eHalStatus
1223 -------------------------------------------------------------------------------*/
1224eHalStatus csrStop(tpAniSirGlobal pMac);
1225/* ---------------------------------------------------------------------------
1226 \fn csrReady
1227 \brief To let CSR is ready to operate
1228 \return eHalStatus
1229 -------------------------------------------------------------------------------*/
1230eHalStatus csrReady(tpAniSirGlobal pMac);
1231
1232#ifdef FEATURE_WLAN_WAPI
1233eHalStatus csrRoamGetBKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pNum,
1234 tBkidCacheInfo *pBkidCache);
1235
1236
1237eHalStatus csrScanGetBKIDCandidateList(tpAniSirGlobal pMac, tANI_U32 sessionId,
1238 tBkidCandidateInfo *pBkidList, tANI_U32 *pNumItems );
1239tANI_U32 csrRoamGetNumBKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId);
1240eHalStatus csrRoamSetBKIDCache( tpAniSirGlobal pMac, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
1241 tANI_U32 numItems );
1242/* ---------------------------------------------------------------------------
1243 \fn csrRoamGetWapiReqIE
1244 \brief return the WAPI IE CSR passes to PE to JOIN request or START_BSS request
1245 \param pLen - caller allocated memory that has the length of pBuf as input. Upon returned, *pLen has the
1246 needed or IE length in pBuf.
1247 \param pBuf - Caller allocated memory that contain the IE field, if any, upon return
1248 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
1249 -------------------------------------------------------------------------------*/
1250eHalStatus csrRoamGetWapiReqIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf);
1251
1252/* ---------------------------------------------------------------------------
1253 \fn csrRoamGetWapiRspIE
1254 \brief return the WAPI IE from the beacon or probe rsp if connected
1255 \param pLen - caller allocated memory that has the length of pBuf as input. Upon returned, *pLen has the
1256 needed or IE length in pBuf.
1257 \param pBuf - Caller allocated memory that contain the IE field, if any, upon return
1258 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
1259 -------------------------------------------------------------------------------*/
1260eHalStatus csrRoamGetWapiRspIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf);
1261tANI_U8 csrConstructWapiIe( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
1262 tSirBssDescription *pSirBssDesc, tDot11fBeaconIEs *pIes, tCsrWapiIe *pWapiIe );
1263#endif /* FEATURE_WLAN_WAPI */
1264
1265#ifdef WLAN_SOFTAP_FEATURE
1266eHalStatus csrRoamUpdateAPWPSIE( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirAPWPSIEs *pAPWPSIES );
1267eHalStatus csrRoamUpdateWPARSNIEs( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirRSNie * pAPSirRSNie);
1268#endif
1269void csrSetCfgPrivacy( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy );
1270tANI_S8 csrGetInfraSessionId( tpAniSirGlobal pMac );
1271tANI_U8 csrGetInfraOperationChannel( tpAniSirGlobal pMac, tANI_U8 sessionId);
1272tANI_U8 csrGetConcurrentOperationChannel( tpAniSirGlobal pMac );
1273
1274eHalStatus csrRoamCopyConnectProfile(tpAniSirGlobal pMac, tANI_U32 sessionId,
1275 tCsrRoamConnectedProfile *pProfile);
1276tANI_BOOLEAN csrIsSetKeyAllowed(tpAniSirGlobal pMac, tANI_U32 sessionId);
1277
1278void csrSetOppositeBandChannelInfo( tpAniSirGlobal pMac );
1279void csrConstructCurrentValidChannelList( tpAniSirGlobal pMac, tDblLinkList *pChannelSetList,
1280 tANI_U8 *pChannelList, tANI_U8 bSize, tANI_U8 *pNumChannels );
1281
1282#endif
1283
1284#ifdef WLAN_FEATURE_VOWIFI_11R
1285//Returns whether the current association is a 11r assoc or not
1286tANI_BOOLEAN csrRoamIs11rAssoc(tpAniSirGlobal pMac);
1287#endif
1288
1289#ifdef FEATURE_WLAN_CCX
1290//Returns whether the current association is a CCX assoc or not
1291tANI_BOOLEAN csrRoamIsCCXAssoc(tpAniSirGlobal pMac);
1292#endif
1293
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001294//Remove this code once SLM_Sessionization is supported
1295//BMPS_WORKAROUND_NOT_NEEDED
Jeff Johnson295189b2012-06-20 16:38:30 -07001296void csrDisconnectAllActiveSessions(tpAniSirGlobal pMac);
Mohit Khanna349bc392012-09-11 17:24:52 -07001297
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001298#ifdef FEATURE_WLAN_LFR
1299//Returns whether "Legacy Fast Roaming" is enabled...or not
Madan Mohan Koyyalamudi03aae5f2012-11-28 01:51:22 +05301300tANI_BOOLEAN csrRoamIsFastRoamEnabled(tpAniSirGlobal pMac, tANI_U32 sessionId);
Madan Mohan Koyyalamudi470d2cf2012-09-28 14:43:44 -07001301tANI_BOOLEAN csrIsChannelPresentInList( tANI_U8 *pChannelList, int numChannels, tANI_U8 channel );
1302VOS_STATUS csrAddToChannelListFront( tANI_U8 *pChannelList, int numChannels, tANI_U8 channel );
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001303#endif
1304