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