blob: 2810059e3df92e4e3d33b1642f5a29ac3ad830c3 [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 Koyyalamudi62b55b02012-12-03 16:45:39 -0800579 tANI_U8 nImmediateRoamRssiDiff;
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -0800580 tANI_BOOLEAN nRoamPrefer5GHz;
Jeff Johnson295189b2012-06-20 16:38:30 -0700581#endif
582
583#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
584 tCsrNeighborRoamConfig neighborRoamConfig;
585#endif
586
587 /* Instead of Reassoc, send ADDTS/DELTS even when ACM is off for that AC
588 * This is mandated by WMM-AC certification */
589 tANI_BOOLEAN addTSWhenACMIsOff;
590
591 tANI_BOOLEAN fValidateList;
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -0700592 //Remove this code once SLM_Sessionization is supported
593 //BMPS_WORKAROUND_NOT_NEEDED
Jeff Johnsone7245742012-09-05 17:12:55 -0700594 tANI_BOOLEAN doBMPSWorkaround;
Jeff Johnson295189b2012-06-20 16:38:30 -0700595
596 //To enable/disable scanning 2.4Ghz channels twice on a single scan request from HDD
597 tANI_BOOLEAN fScanTwice;
Jeff Johnsone7245742012-09-05 17:12:55 -0700598#ifdef WLAN_FEATURE_11AC
599 tANI_U32 nVhtChannelWidth;
600#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700601
602}tCsrConfig;
603
604typedef struct tagCsrChannelPowerInfo
605{
606 tListElem link;
607 tANI_U8 firstChannel;
608 tANI_U8 numChannels;
609 tANI_U8 txPower;
610 tANI_U8 interChannelOffset;
611}tCsrChannelPowerInfo;
612
613typedef struct tagRoamJoinStatus
614{
615 tSirResultCodes statusCode;
616 //this is set to unspecified if statusCode indicates timeout. Or it is the failed reason from the other BSS(per 802.11 spec)
617 tANI_U32 reasonCode;
618}tCsrRoamJoinStatus;
619
620typedef struct tagCsrOsChannelMask
621{
622 tANI_U8 numChannels;
623 tANI_BOOLEAN scanEnabled[WNI_CFG_VALID_CHANNEL_LIST_LEN];
624 tANI_U8 channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
625}tCsrOsChannelMask;
626
627
628typedef struct tagCsrScanStruct
629{
630 tScanProfile scanProfile;
631 tANI_U32 nextScanID;
Madan Mohan Koyyalamudica43cdf2012-09-24 13:15:49 -0700632 tDblLinkList scanResultList;
Jeff Johnson295189b2012-06-20 16:38:30 -0700633 tDblLinkList tempScanResults;
634 tANI_BOOLEAN fScanEnable;
635 tANI_BOOLEAN fFullScanIssued;
636 tPalTimerHandle hTimerGetResult;
637#ifdef WLAN_AP_STA_CONCURRENCY
638 tPalTimerHandle hTimerStaApConcTimer;
639#endif
640 tPalTimerHandle hTimerIdleScan;
641 tPalTimerHandle hTimerResultAging;
642 tPalTimerHandle hTimerBgScan;
643 //changes on every scan, it is used as a flag for whether 11d info is found on every scan
644 tANI_U8 channelOf11dInfo;
645 //changes on every scan, a flag to tell whether conflict 11d info found on each BSS
646 tANI_BOOLEAN fAmbiguous11dInfoFound;
647 //Tush: changes on every scan, a flag to tell whether the applied 11d info present in one of the scan results
648 tANI_BOOLEAN fCurrent11dInfoMatch;
649 tANI_BOOLEAN f11dInfoReset; //to indicate whether the 11d info in CFG is reset to default
650 tSirScanType curScanType;
651 tCsrChannel baseChannels; //This are all the supported channels AND(&) to the current eBand
652 tCsrChannel channels11d;
653 tChannelListWithPower defaultPowerTable[WNI_CFG_VALID_CHANNEL_LIST_LEN]; //From NV
654 tChannelListWithPower defaultPowerTable40MHz[WNI_CFG_VALID_CHANNEL_LIST_LEN]; //From NV
655 tANI_U32 numChannelsDefault; //total channels of NV
656 tCsrChannel base20MHzChannels; //The channel base to work on
657 tCsrChannel base40MHzChannels; //center channels for 40MHz channels
658 tDblLinkList channelPowerInfoList24;
659 tDblLinkList channelPowerInfoList5G;
660 tANI_U32 nLastAgeTimeOut;
661 tANI_U32 nAgingCountDown;
662 tANI_U8 countryCodeDefault[WNI_CFG_COUNTRY_CODE_LEN+1]; //The country code from NV
663 tANI_U8 countryCodeCurrent[WNI_CFG_COUNTRY_CODE_LEN+1];
664 tANI_U8 countryCode11d[WNI_CFG_COUNTRY_CODE_LEN+1];
665 v_REGDOMAIN_t domainIdDefault; //default regulatory domain
666 v_REGDOMAIN_t domainIdCurrent; //current regulatory domain
667 tANI_BOOLEAN f11dInfoApplied;
668 tANI_BOOLEAN fCancelIdleScan;
669#ifdef FEATURE_WLAN_WAPI
670// tANI_U16 NumBkidCandidate;
671// tBkidCandidateInfo BkidCandidateInfo[CSR_MAX_BKID_ALLOWED]; /* Move this as part of SessionEntry */
672#endif /* FEATURE_WLAN_WAPI */
673 tANI_U8 numBGScanChannel; //number of valid channels in the bgScanChannelList
674 tANI_U8 bgScanChannelList[WNI_CFG_BG_SCAN_CHANNEL_LIST_LEN];
675 //the ChannelInfo member is not used in this structure.
676 //numBGScanChannel and bgScanChannelList are used for the BG scan channel info
677 tCsrBGScanRequest bgScanParams;
678 tANI_BOOLEAN fRestartIdleScan;
679 tANI_U32 nIdleScanTimeGap; //the time since last trying to trigger idle scan
680 tCsrOsChannelMask osScanChannelMask;//keep a track of channels to be scnned while in traffic condition
681 tANI_U16 nBssLimit; //the maximum number of BSS in scan cache
682 /*channelPowerInfoList24 has been seen corrupted. Set this flag to true trying to
683 * detect when it happens. Adding this into code because we can't reproduce it easily.
684 * We don't know when it happens. */
685 tANI_BOOLEAN fValidateList;
686 /*Customer wants to start with an active scan based on the default country code.
687 * This optimization will minimize the driver load to association time.
688 * Based on this flag we will bypass the initial passive scan needed for 11d
689 * to determine the country code & domain */
690 tANI_BOOLEAN fEnableBypass11d;
691
692 /*Customer wants to optimize the scan time. Avoiding scans(passive) on DFS
693 * channels while swipping through both bands can save some time
694 * (apprx 1.3 sec) */
695 tANI_BOOLEAN fEnableDFSChnlScan;
696
Jeff Johnsone7245742012-09-05 17:12:55 -0700697 /*
698 * To enable/disable scanning only 2.4Ghz channels on first scan
699 */
700 tANI_BOOLEAN fFirstScanOnly2GChnl;
701
Jeff Johnson295189b2012-06-20 16:38:30 -0700702 tANI_BOOLEAN fDropScanCmd; //true means we don't accept scan commands
703
704#ifdef WLAN_AP_STA_CONCURRENCY
705 tDblLinkList scanCmdPendingList;
706#endif
Madan Mohan Koyyalamudi470d2cf2012-09-28 14:43:44 -0700707 tCsrChannel occupiedChannels; //This includes all channels on which candidate APs are found
Madan Mohan Koyyalamudi3f65e312012-11-06 15:31:12 -0800708
709 tANI_BOOLEAN fIgnore_chan165;
Jeff Johnson295189b2012-06-20 16:38:30 -0700710}tCsrScanStruct;
711
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800712#ifdef FEATURE_WLAN_TDLS
713/*
714 * struct to carry TDLS discovery info..
715 */
716typedef struct sCsrTdlsContext
717{
718#ifdef FEATURE_WLAN_TDLS_INTERNAL
719 tDblLinkList tdlsPotentialPeerList ;
720 tANI_U16 tdlsCommonFlag ;
721 tANI_U16 tdlsCommonState ;
722#endif
723 tANI_U16 tdlsPeerCount ;
724}tCsrTdlsCtxStruct;
725
726#ifdef FEATURE_WLAN_TDLS_INTERNAL
727typedef struct sCsrTdlsPeerLinkInfo
728{
729 tListElem tdlsPeerStaLink ;
730 tSirTdlsPeerInfo tdlsDisPeerInfo ;
731}tCsrTdlsPeerLinkinfo ;
732#endif
733#endif
734
735
Jeff Johnson295189b2012-06-20 16:38:30 -0700736
737//Save the connected information. This structure + connectedProfile
738//should contain all information about the connection
739typedef struct tagRoamCsrConnectedInfo
740{
741 tANI_U32 nBeaconLength; //the length, in bytes, of the beacon frame, can be 0
742 tANI_U32 nAssocReqLength; //the length, in bytes, of the assoc req frame, can be 0
743 tANI_U32 nAssocRspLength; //The length, in bytes, of the assoc rsp frame, can be 0
744#ifdef WLAN_FEATURE_VOWIFI_11R
745 tANI_U32 nRICRspLength; //Length of the parsed RIC response IEs received in reassoc response
746#endif
747#ifdef FEATURE_WLAN_CCX
748 tANI_U32 nTspecIeLength;
749#endif
750 tANI_U8 *pbFrames; //Point to a buffer contain the beacon, assoc req, assoc rsp frame, in that order
751 //user needs to use nBeaconLength, nAssocReqLength, nAssocRspLength to desice where
752 //each frame starts and ends.
753 tANI_U8 staId;
754}tCsrRoamConnectedInfo;
755
756
757typedef struct tagCsrLinkQualityIndInfo
758{
759 csrRoamLinkQualityIndCallback callback;
760 void *context;
761}tCsrLinkQualityIndInfo;
762
763typedef struct tagCsrPeStatsReqInfo
764{
765 tListElem link; /* list links */
766 tANI_U32 statsMask;
767 tANI_U32 periodicity;
768 tANI_BOOLEAN rspPending;
769 vos_timer_t hPeStatsTimer;
770 tANI_BOOLEAN timerRunning;
771 tANI_U8 staId;
772 tANI_U8 numClient;
773 tpAniSirGlobal pMac;
774 /* To remember if the peStats timer is stopped successfully or not */
775 tANI_BOOLEAN timerStopFailed;
776
777}tCsrPeStatsReqInfo;
778
779typedef struct tagCsrStatsClientReqInfo
780{
781 tListElem link; /* list links */
782 eCsrStatsRequesterType requesterId;
783 tCsrStatsCallback callback;
784 tANI_U32 periodicity;
785 void *pContext;
786 tANI_U32 statsMask;
787 tCsrPeStatsReqInfo *pPeStaEntry;
788 tANI_U8 staId;
789 vos_timer_t timer;
790 tANI_BOOLEAN timerExpired;
791 tpAniSirGlobal pMac; // TODO: Confirm this change BTAMP
792}tCsrStatsClientReqInfo;
793
794typedef struct tagCsrTlStatsReqInfo
795{
796 tANI_U32 periodicity;
797 tANI_BOOLEAN timerRunning;
798 tPalTimerHandle hTlStatsTimer;
799 tANI_U8 numClient;
800}tCsrTlStatsReqInfo;
801
802typedef struct tagCsrRoamSession
803{
804 tANI_U8 sessionId; // Session ID
805 tANI_BOOLEAN sessionActive; // TRUE if it is used
806 tCsrBssid selfMacAddr; // For BT-AMP station, this serve as BSSID for self-BSS.
807 csrRoamCompleteCallback callback;
808 void *pContext;
809 eCsrConnectState connectState;
810 tCsrRoamConnectedProfile connectedProfile;
811 tCsrRoamConnectedInfo connectedInfo;
812 tCsrRoamProfile *pCurRoamProfile;
813 tSirBssDescription *pConnectBssDesc;
814 tANI_U16 NumPmkidCache;
815 tPmkidCacheInfo PmkidCacheInfo[CSR_MAX_PMKID_ALLOWED];
816 tANI_U8 cJoinAttemps;
817 //This may or may not have the up-to-date valid channel list
818 //It is used to get WNI_CFG_VALID_CHANNEL_LIST and not allocate memory all the time
819 tSirMacChanNum validChannelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
820 tANI_S32 sPendingCommands; //0 means CSR is ok to low power
821#ifdef FEATURE_WLAN_WAPI
822 tANI_U16 NumBkidCache;
823 tBkidCacheInfo BkidCacheInfo[CSR_MAX_BKID_ALLOWED];
824#endif /* FEATURE_WLAN_WAPI */
825 tANI_BOOLEAN fRoaming; //indicate whether CSR is roaming (either via lostlink or dynamic roaming)
826 //to remember some parameters needed for START_BSS.
827 //All member must be set every time we try to join or start an IBSS or BT-AMP
828 tCsrRoamStartBssParams bssParams;
829 tANI_U32 nWpaRsnReqIeLength; //the byte count of pWpaRsnIE;
830 tANI_U8 *pWpaRsnReqIE; //this contain the WPA/RSN IE in assoc request or the one sent in beacon (IBSS)
831 tANI_U32 nWpaRsnRspIeLength; //the byte count for pWpaRsnRspIE
832 tANI_U8 *pWpaRsnRspIE; //this contain the WPA/RSN IE in beacon/probe rsp
833#ifdef FEATURE_WLAN_WAPI
834 tANI_U32 nWapiReqIeLength; //the byte count of pWapiReqIE;
835 tANI_U8 *pWapiReqIE; //this contain the WAPI IE in assoc request or the one sent in beacon (IBSS)
836 tANI_U32 nWapiRspIeLength; //the byte count for pWapiRspIE
837 tANI_U8 *pWapiRspIE; //this contain the WAPI IE in beacon/probe rsp
838#endif /* FEATURE_WLAN_WAPI */
839 tANI_U32 nAddIEScanLength; //the byte count of pAddIeScanIE;
840 tANI_U8 *pAddIEScan; //this contains the additional IE in (unicast) probe request at the time of join
841 tANI_U32 nAddIEAssocLength; //the byte count for pAddIeAssocIE
842 tANI_U8 *pAddIEAssoc; //this contains the additional IE in (re) assoc request
843
844 tANI_TIMESTAMP roamingStartTime; //in units of 10ms
845 tCsrTimerInfo roamingTimerInfo;
846 eCsrRoamingReason roamingReason;
847 tANI_BOOLEAN fCancelRoaming;
848 tPalTimerHandle hTimerRoaming;
849 tPalTimerHandle hTimerIbssJoining;
850 tCsrTimerInfo ibssJoinTimerInfo;
851 tANI_BOOLEAN ibss_join_pending;
852 eCsrRoamResult roamResult; //the roamResult that is used when the roaming timer fires
853 tCsrRoamJoinStatus joinFailStatusCode; //This is the reason code for join(assoc) failure
854 //The status code returned from PE for deauth or disassoc (in case of lostlink), or our own dynamic roaming
855 tANI_U32 roamingStatusCode;
856 tANI_U16 NumPmkidCandidate;
857 tPmkidCandidateInfo PmkidCandidateInfo[CSR_MAX_PMKID_ALLOWED];
858 #ifdef FEATURE_WLAN_WAPI
859 tANI_U16 NumBkidCandidate;
860 tBkidCandidateInfo BkidCandidateInfo[CSR_MAX_BKID_ALLOWED];
861#endif
862 tANI_BOOLEAN fWMMConnection;
863#ifdef FEATURE_WLAN_BTAMP_UT_RF
864 //To retry a join later when it fails if so desired
865 tPalTimerHandle hTimerJoinRetry;
866 tCsrTimerInfo joinRetryTimerInfo;
867 tANI_U32 maxRetryCount;
868#endif
869#ifdef FEATURE_WLAN_CCX
870 tCsrCcxCckmInfo ccxCckmInfo;
871 tANI_BOOLEAN isPrevApInfoValid;
872 tSirMacSSid prevApSSID;
873 tCsrBssid prevApBssid;
874 tANI_U8 prevOpChannel;
875 tANI_U16 clientDissSecs;
876 tANI_U32 roamTS1;
877#endif
878 tANI_U8 bRefAssocStartCnt; //Tracking assoc start indication
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700879 /* to force the AP initiate fresh 802.1x authentication after re-association need to clear
880 * the PMKID cache. To clear the cache in this particular case this is added
881 * it is needed by the HS 2.0 passpoint certification 5.2.a and b testcases */
882 tANI_BOOLEAN fIgnorePMKIDCache;
Jeff Johnson295189b2012-06-20 16:38:30 -0700883} tCsrRoamSession;
884
885typedef struct tagCsrRoamStruct
886{
887 tANI_U32 nextRoamId;
888 tDblLinkList roamCmdPendingList;
889 tDblLinkList channelList5G;
890 tDblLinkList channelList24;
891 tCsrConfig configParam;
892 tANI_U32 numChannelsEeprom; //total channels of eeprom
893 tCsrChannel base20MHzChannels; //The channel base to work on
894 tCsrChannel base40MHzChannels; //center channels for 40MHz channels
895 eCsrRoamState curState[CSR_ROAM_SESSION_MAX];
896 eCsrRoamSubState curSubState[CSR_ROAM_SESSION_MAX];
897 //This may or may not have the up-to-date valid channel list
898 //It is used to get WNI_CFG_VALID_CHANNEL_LIST and not allocate memory all the time
899 tSirMacChanNum validChannelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
900 tANI_U32 numValidChannels; //total number of channels in CFG
901
902 tANI_S32 sPendingCommands;
Jeff Johnson295189b2012-06-20 16:38:30 -0700903 tPalTimerHandle hTimerWaitForKey; //To support timeout for WaitForKey state
904 tCsrSummaryStatsInfo summaryStatsInfo;
905 tCsrGlobalClassAStatsInfo classAStatsInfo;
906 tCsrGlobalClassBStatsInfo classBStatsInfo;
907 tCsrGlobalClassCStatsInfo classCStatsInfo;
908 tCsrGlobalClassDStatsInfo classDStatsInfo;
909 tCsrPerStaStatsInfo perStaStatsInfo[CSR_MAX_STA];
910 tDblLinkList statsClientReqList;
911 tDblLinkList peStatsReqList;
912 tCsrTlStatsReqInfo tlStatsReqInfo;
913 eCsrRoamLinkQualityInd vccLinkQuality;
914 tCsrLinkQualityIndInfo linkQualityIndInfo;
915 v_CONTEXT_t gVosContext; //used for interaction with TL
916 //To specify whether an association or a IBSS is WMM enabled
917 //This parameter is only valid during a join or start BSS command is being executed
918 //tANI_BOOLEAN fWMMConnection; /* Moving it to be part of roamsession */
919 v_U8_t ucACWeights[WLANTL_MAX_AC];
920 /* TODO : Upto here */
921 tCsrTimerInfo WaitForKeyTimerInfo;
922 tCsrRoamSession *roamSession;
923 tANI_U32 transactionId; // Current transaction ID for internal use.
924#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
925 tCsrNeighborRoamControlInfo neighborRoamInfo;
926#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700927#ifdef FEATURE_WLAN_LFR
928 tANI_U8 isFastRoamIniFeatureEnabled;
929#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700930#ifdef FEATURE_WLAN_CCX
931 tANI_U8 isCcxIniFeatureEnabled;
932#endif
Jeff Johnson43971f52012-07-17 12:26:56 -0700933#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
934 tANI_U8 RoamRssiDiff;
935#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700936}tCsrRoamStruct;
937
938
939#define GET_NEXT_ROAM_ID(pRoamStruct) (((pRoamStruct)->nextRoamId + 1 == 0) ? 1 : (pRoamStruct)->nextRoamId)
940#define CSR_IS_ROAM_STATE(pMac, state, sessionId) ( (state) == (pMac)->roam.curState[sessionId] )
941
942#define CSR_IS_ROAM_STOP(pMac, sessionId) CSR_IS_ROAM_STATE( (pMac), eCSR_ROAMING_STATE_STOP, sessionId )
943#define CSR_IS_ROAM_INIT(pMac, sessionId) CSR_IS_ROAM_STATE( (pMac), eCSR_ROAMING_STATE_INIT, sessionId )
944#define CSR_IS_ROAM_SCANNING(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_SCANNING, sessionId )
945#define CSR_IS_ROAM_JOINING(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_JOINING, sessionId )
946#define CSR_IS_ROAM_IDLE(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_IDLE, sessionId )
947#define CSR_IS_ROAM_JOINED(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_JOINED, sessionId )
948
949#define CSR_IS_ROAM_SUBSTATE(pMac, subState, sessionId) ((subState) == (pMac)->roam.curSubState[sessionId])
950#define CSR_IS_ROAM_SUBSTATE_JOIN_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOIN_REQ, sessionId)
951#define CSR_IS_ROAM_SUBSTATE_AUTH_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_AUTH_REQ, sessionId)
952#define CSR_IS_ROAM_SUBSTATE_REASSOC_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_REASSOC_REQ, sessionId)
953#define CSR_IS_ROAM_SUBSTATE_DISASSOC_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_REQ, sessionId)
954#define CSR_IS_ROAM_SUBSTATE_DISASSOC_NO_JOIN(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_NOTHING_TO_JOIN, sessionId)
955#define CSR_IS_ROAM_SUBSTATE_REASSOC_FAIL(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_REASSOC_FAILURE, sessionId)
956#define CSR_IS_ROAM_SUBSTATE_DISASSOC_FORCED(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_FORCED, sessionId)
957#define CSR_IS_ROAM_SUBSTATE_DEAUTH_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DEAUTH_REQ, sessionId)
958#define CSR_IS_ROAM_SUBSTATE_START_BSS_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_START_BSS_REQ, sessionId)
959#define CSR_IS_ROAM_SUBSTATE_STOP_BSS_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_STOP_BSS_REQ, sessionId)
960#define CSR_IS_ROAM_SUBSTATE_DISCONNECT_CONTINUE(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISCONNECT_CONTINUE_ROAMING, sessionId)
961#define CSR_IS_ROAM_SUBSTATE_CONFIG(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_CONFIG, sessionId)
962#define CSR_IS_ROAM_SUBSTATE_WAITFORKEY(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_WAIT_FOR_KEY, sessionId)
963#define CSR_IS_ROAM_SUBSTATE_DISASSOC_HO(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_HANDOFF, sessionId)
964#define CSR_IS_ROAM_SUBSTATE_HO_NT(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOINED_NO_TRAFFIC, sessionId)
965#define CSR_IS_ROAM_SUBSTATE_HO_NRT(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOINED_NON_REALTIME_TRAFFIC, sessionId)
966#define CSR_IS_ROAM_SUBSTATE_HO_RT(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOINED_REALTIME_TRAFFIC, sessionId)
967
968#define CSR_IS_PHY_MODE_B_ONLY(pMac) \
969 ((eCSR_DOT11_MODE_11b == (pMac)->roam.configParam.phyMode) ||\
970 (eCSR_DOT11_MODE_11b_ONLY == (pMac)->roam.configParam.phyMode))
971
972#define CSR_IS_PHY_MODE_G_ONLY(pMac) \
973 (eCSR_DOT11_MODE_11g == (pMac)->roam.configParam.phyMode || eCSR_DOT11_MODE_11g_ONLY == (pMac)->roam.configParam.phyMode)
974
975#define CSR_IS_PHY_MODE_A_ONLY(pMac) \
976 ((eCSR_DOT11_MODE_11a == (pMac)->roam.configParam.phyMode) ||\
977 (eCSR_DOT11_MODE_11a_ONLY == (pMac)->roam.configParam.phyMode))
978
Jeff Johnsone7245742012-09-05 17:12:55 -0700979#ifdef WLAN_FEATURE_11AC
980#define CSR_IS_PHY_MODE_DUAL_BAND(phyMode) \
981 ((eCSR_DOT11_MODE_abg & (phyMode)) || (eCSR_DOT11_MODE_11n & (phyMode)) || \
982 (eCSR_DOT11_MODE_11ac & (phyMode)) || \
983 (eCSR_DOT11_MODE_TAURUS & (phyMode)) || \
984 (eCSR_DOT11_MODE_AUTO & (phyMode)))
985#else
Jeff Johnson295189b2012-06-20 16:38:30 -0700986#define CSR_IS_PHY_MODE_DUAL_BAND(phyMode) \
987 ((eCSR_DOT11_MODE_abg & (phyMode)) || (eCSR_DOT11_MODE_11n & (phyMode)) || \
988 (eCSR_DOT11_MODE_TAURUS & (phyMode)) || \
989 (eCSR_DOT11_MODE_AUTO & (phyMode)))
Jeff Johnsone7245742012-09-05 17:12:55 -0700990#endif
991
Jeff Johnson295189b2012-06-20 16:38:30 -0700992
993// this function returns TRUE if the NIC is operating exclusively in the 2.4 GHz band, meaning
994// it is NOT operating in the 5.0 GHz band.
995#define CSR_IS_24_BAND_ONLY(pMac) \
996 (eCSR_BAND_24 == (pMac)->roam.configParam.eBand)
997
998#define CSR_IS_5G_BAND_ONLY(pMac) \
999 (eCSR_BAND_5G == (pMac)->roam.configParam.eBand)
1000
1001#define CSR_IS_RADIO_DUAL_BAND(pMac) \
1002 (eCSR_BAND_ALL == (pMac)->roam.configParam.bandCapability)
1003
1004#define CSR_IS_RADIO_BG_ONLY(pMac) \
1005 (eCSR_BAND_24 == (pMac)->roam.configParam.bandCapability)
1006
1007// this function returns TRUE if the NIC is operating exclusively in the 5.0 GHz band, meaning
1008// it is NOT operating in the 2.4 GHz band
1009#define CSR_IS_RADIO_A_ONLY(pMac) \
1010 (eCSR_BAND_5G == (pMac)->roam.configParam.bandCapability)
1011
1012// this function returns TRUE if the NIC is operating in both bands.
1013#define CSR_IS_OPEARTING_DUAL_BAND(pMac) \
1014 ((eCSR_BAND_ALL == (pMac)->roam.configParam.bandCapability) && (eCSR_BAND_ALL == (pMac)->roam.configParam.eBand))
1015
1016// this function returns TRUE if the NIC can operate in the 5.0 GHz band (could operate in the
1017// 2.4 GHz band also).
1018#define CSR_IS_OPERATING_A_BAND(pMac) \
1019 (CSR_IS_OPEARTING_DUAL_BAND((pMac)) || CSR_IS_RADIO_A_ONLY((pMac)) || CSR_IS_5G_BAND_ONLY((pMac)))
1020
1021// this function returns TRUE if the NIC can operate in the 2.4 GHz band (could operate in the
1022// 5.0 GHz band also).
1023#define CSR_IS_OPERATING_BG_BAND(pMac) \
1024 (CSR_IS_OPEARTING_DUAL_BAND((pMac)) || CSR_IS_RADIO_BG_ONLY((pMac)) || CSR_IS_24_BAND_ONLY((pMac)))
1025
1026#define CSR_IS_CHANNEL_5GHZ(chnNum) \
Jeff Johnsone7245742012-09-05 17:12:55 -07001027 (((chnNum) >= CSR_MIN_5GHz_CHANNEL_NUMBER) && ((chnNum) <= CSR_MAX_5GHz_CHANNEL_NUMBER))
Jeff Johnson295189b2012-06-20 16:38:30 -07001028
1029#define CSR_IS_CHANNEL_24GHZ(chnNum) \
1030 (((chnNum) > 0) && ((chnNum) <= CSR_MAX_24GHz_CHANNEL_NUMBER))
1031
1032#define CSR_IS_SAME_BAND_CHANNELS(ch1, ch2) (CSR_IS_CHANNEL_5GHZ(ch1) == CSR_IS_CHANNEL_5GHZ(ch2))
1033
1034
1035#define CSR_IS_11D_INFO_FOUND(pMac) \
1036 (0 != (pMac)->scan.channelOf11dInfo)
1037// DEAUTHIND
1038#define CSR_IS_ROAMING(pSession) ((CSR_IS_LOSTLINK_ROAMING((pSession)->roamingReason)) || \
1039 (eCsrDynamicRoaming == (pSession)->roamingReason) || \
1040 (eCsrReassocRoaming == (pSession)->roamingReason))
1041
1042
1043#define CSR_IS_SET_KEY_COMMAND( pCommand ) ( eSmeCommandSetKey == (pCommand)->command )
1044
1045#define CSR_IS_ADDTS_WHEN_ACMOFF_SUPPORTED(pMac) (pMac->roam.configParam.addTSWhenACMIsOff)
1046// DEAUTHIND
1047#define CSR_IS_LOSTLINK_ROAMING(reason) ((eCsrLostlinkRoamingDisassoc == (reason)) || (eCsrLostlinkRoamingDeauth == (reason)))
1048
1049//Stop CSR from asking for IMPS, This function doesn't disable IMPS from CSR
1050void csrScanSuspendIMPS( tpAniSirGlobal pMac );
1051//Start CSR from asking for IMPS. This function doesn't trigger CSR to request entering IMPS
1052//because IMPS maybe disabled.
1053void csrScanResumeIMPS( tpAniSirGlobal pMac );
1054
1055eHalStatus csrInitGetChannels(tpAniSirGlobal pMac);
1056
1057eHalStatus csrSetModifyProfileFields(tpAniSirGlobal pMac, tANI_U32 sessionId,
1058 tCsrRoamModifyProfileFields *pModifyProfileFields);
1059/* ---------------------------------------------------------------------------
1060 \fn csrGetModifyProfileFields
1061 \brief HDD or SME - QOS calls this function to get the current values of
1062 connected profile fields changing which can cause reassoc.
1063 This function must be called after CFG is downloaded and STA is in connected
1064 state.
1065 \param pModifyProfileFields - pointer to the connected profile fields
1066 changing which can cause reassoc
1067
1068 \return eHalStatus
1069 -------------------------------------------------------------------------------*/
1070eHalStatus csrGetModifyProfileFields(tpAniSirGlobal pMac, tANI_U32 sessionId,
1071 tCsrRoamModifyProfileFields * pModifyProfileFields);
1072void csrSetGlobalCfgs( tpAniSirGlobal pMac );
1073void csrSetDefaultDot11Mode( tpAniSirGlobal pMac );
1074void csrScanSetChannelMask(tpAniSirGlobal pMac, tCsrChannelInfo *pChannelInfo);
1075tANI_BOOLEAN csrIsConnStateDisconnected(tpAniSirGlobal pMac, tANI_U32 sessionId);
1076tANI_BOOLEAN csrIsConnStateConnectedIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1077tANI_BOOLEAN csrIsConnStateDisconnectedIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1078tANI_BOOLEAN csrIsConnStateConnectedInfra( tpAniSirGlobal pMac, tANI_U32 sessionId );
1079tANI_BOOLEAN csrIsConnStateConnected( tpAniSirGlobal pMac, tANI_U32 sessionId );
1080tANI_BOOLEAN csrIsConnStateInfra( tpAniSirGlobal pMac, tANI_U32 sessionId );
1081tANI_BOOLEAN csrIsConnStateIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1082tANI_BOOLEAN csrIsConnStateWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1083tANI_BOOLEAN csrIsConnStateConnectedWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1084tANI_BOOLEAN csrIsConnStateDisconnectedWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1085tANI_BOOLEAN csrIsAnySessionInConnectState( tpAniSirGlobal pMac );
1086tANI_BOOLEAN csrIsAllSessionDisconnected( tpAniSirGlobal pMac );
Madan Mohan Koyyalamudi48081ef2012-12-04 16:49:55 -08001087tANI_BOOLEAN csrIsStaSessionConnected( tpAniSirGlobal pMac );
1088tANI_BOOLEAN csrIsP2pSessionConnected( tpAniSirGlobal pMac );
Madan Mohan Koyyalamudid3d22592012-09-24 14:01:29 -07001089tANI_BOOLEAN csrIsAnySessionConnected( tpAniSirGlobal pMac );
Jeff Johnson295189b2012-06-20 16:38:30 -07001090tANI_BOOLEAN csrIsInfraConnected( tpAniSirGlobal pMac );
1091tANI_BOOLEAN csrIsConcurrentInfraConnected( tpAniSirGlobal pMac );
Jeff Johnsone7245742012-09-05 17:12:55 -07001092tANI_BOOLEAN csrIsConcurrentSessionRunning( tpAniSirGlobal pMac );
Jeff Johnsone7245742012-09-05 17:12:55 -07001093tANI_BOOLEAN csrIsInfraApStarted( tpAniSirGlobal pMac );
Jeff Johnson295189b2012-06-20 16:38:30 -07001094tANI_BOOLEAN csrIsIBSSStarted( tpAniSirGlobal pMac );
1095tANI_BOOLEAN csrIsBTAMPStarted( tpAniSirGlobal pMac );
1096tANI_BOOLEAN csrIsBTAMP( tpAniSirGlobal pMac, tANI_U32 sessionId );
1097eHalStatus csrIsBTAMPAllowed( tpAniSirGlobal pMac, tANI_U32 chnId );
Jeff Johnsone7245742012-09-05 17:12:55 -07001098tANI_BOOLEAN csrIsValidMcConcurrentSession(tpAniSirGlobal pMac, tANI_U32 sessionId,
1099 tSirBssDescription *pBssDesc);
Jeff Johnson295189b2012-06-20 16:38:30 -07001100#ifdef WLAN_SOFTAP_FEATURE
1101tANI_BOOLEAN csrIsConnStateConnectedInfraAp( tpAniSirGlobal pMac, tANI_U32 sessionId );
1102#endif
1103/*----------------------------------------------------------------------------
1104 \fn csrRoamRegisterLinkQualityIndCallback
1105
1106 \brief
1107 a CSR function to allow HDD to register a callback handler with CSR for
1108 link quality indications.
1109
1110 Only one callback may be registered at any time.
1111 In order to deregister the callback, a NULL cback may be provided.
1112
1113 Registration happens in the task context of the caller.
1114
1115 \param callback - Call back being registered
1116 \param pContext - user data
1117
1118 DEPENDENCIES: After CSR open
1119
1120 \return eHalStatus
1121-----------------------------------------------------------------------------*/
1122eHalStatus csrRoamRegisterLinkQualityIndCallback(tpAniSirGlobal pMac,
1123 csrRoamLinkQualityIndCallback callback,
1124 void *pContext);
1125/* ---------------------------------------------------------------------------
1126 \fn csrGetStatistics
1127 \brief csr function that client calls to register a callback to get
1128 different PHY level statistics from CSR.
1129
1130 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
1131 \param statsMask - The different category/categories of stats requester is looking for
1132 \param callback - SME sends back the requested stats using the callback
1133 \param periodicity - If requester needs periodic update, 0 means it's an one
1134 time request
1135 \param cache - If requester is happy with cached stats
1136 \param staId - The station ID for which the stats is requested for
1137 \param pContext - user context to be passed back along with the callback
1138
1139 \return eHalStatus
1140 ---------------------------------------------------------------------------*/
1141eHalStatus csrGetStatistics(tpAniSirGlobal pMac, eCsrStatsRequesterType requesterId,
1142 tANI_U32 statsMask,
1143 tCsrStatsCallback callback,
1144 tANI_U32 periodicity, tANI_BOOLEAN cache,
1145 tANI_U8 staId, void *pContext);
1146
1147
1148eHalStatus csrGetRssi(tpAniSirGlobal pMac,tCsrRssiCallback callback,tANI_U8 staId,tCsrBssid bssId,void * pContext,void * pVosContext);
1149eHalStatus csrRoamRegisterCallback(tpAniSirGlobal pMac, csrRoamCompleteCallback callback, void *pContext);
1150/* ---------------------------------------------------------------------------
1151 \fn csrGetConfigParam
1152 \brief HDD calls this function to get the global settings currently maintained by CSR.
1153 \param pParam - caller allocated memory
1154 \return eHalStatus
1155 -------------------------------------------------------------------------------*/
1156eHalStatus csrGetConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam);
1157
1158/* ---------------------------------------------------------------------------
1159 \fn csrMsgProcessor
1160 \brief HDD calls this function to change some global settings.
1161 caller must set the all fields or call csrGetConfigParam to prefill the fields.
1162 \param pParam - caller allocated memory
1163 \return eHalStatus
1164 -------------------------------------------------------------------------------*/
1165eHalStatus csrChangeDefaultConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam);
1166
1167
1168/* ---------------------------------------------------------------------------
1169 \fn csrMsgProcessor
1170 \brief HDD calls this function for the messages that are handled by CSR.
1171 \param pMsgBuf - a pointer to a buffer that maps to various structures base on the message type.
1172 The beginning of the buffer can always map to tSirSmeRsp.
1173 \return eHalStatus
1174 -------------------------------------------------------------------------------*/
1175eHalStatus csrMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf );
1176
1177/* ---------------------------------------------------------------------------
1178 \fn csrOpen
1179 \brief This function must be called before any API call to CSR.
1180 \return eHalStatus
1181 -------------------------------------------------------------------------------*/
1182eHalStatus csrOpen(tpAniSirGlobal pMac);
1183/* ---------------------------------------------------------------------------
1184 \fn csrClose
1185 \brief To close down CSR module. There should not be any API call into CSR after calling this function.
1186 \return eHalStatus
1187 -------------------------------------------------------------------------------*/
1188eHalStatus csrClose(tpAniSirGlobal pMac);
1189/* ---------------------------------------------------------------------------
1190 \fn csrStart
1191 \brief To start CSR.
1192 \return eHalStatus
1193 -------------------------------------------------------------------------------*/
1194eHalStatus csrStart(tpAniSirGlobal pMac);
1195/* ---------------------------------------------------------------------------
1196 \fn csrStop
1197 \brief To stop CSR. CSR still keeps its current setting.
1198 \return eHalStatus
1199 -------------------------------------------------------------------------------*/
1200eHalStatus csrStop(tpAniSirGlobal pMac);
1201/* ---------------------------------------------------------------------------
1202 \fn csrReady
1203 \brief To let CSR is ready to operate
1204 \return eHalStatus
1205 -------------------------------------------------------------------------------*/
1206eHalStatus csrReady(tpAniSirGlobal pMac);
1207
1208#ifdef FEATURE_WLAN_WAPI
1209eHalStatus csrRoamGetBKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pNum,
1210 tBkidCacheInfo *pBkidCache);
1211
1212
1213eHalStatus csrScanGetBKIDCandidateList(tpAniSirGlobal pMac, tANI_U32 sessionId,
1214 tBkidCandidateInfo *pBkidList, tANI_U32 *pNumItems );
1215tANI_U32 csrRoamGetNumBKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId);
1216eHalStatus csrRoamSetBKIDCache( tpAniSirGlobal pMac, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
1217 tANI_U32 numItems );
1218/* ---------------------------------------------------------------------------
1219 \fn csrRoamGetWapiReqIE
1220 \brief return the WAPI IE CSR passes to PE to JOIN request or START_BSS request
1221 \param pLen - caller allocated memory that has the length of pBuf as input. Upon returned, *pLen has the
1222 needed or IE length in pBuf.
1223 \param pBuf - Caller allocated memory that contain the IE field, if any, upon return
1224 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
1225 -------------------------------------------------------------------------------*/
1226eHalStatus csrRoamGetWapiReqIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf);
1227
1228/* ---------------------------------------------------------------------------
1229 \fn csrRoamGetWapiRspIE
1230 \brief return the WAPI IE from the beacon or probe rsp if connected
1231 \param pLen - caller allocated memory that has the length of pBuf as input. Upon returned, *pLen has the
1232 needed or IE length in pBuf.
1233 \param pBuf - Caller allocated memory that contain the IE field, if any, upon return
1234 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
1235 -------------------------------------------------------------------------------*/
1236eHalStatus csrRoamGetWapiRspIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf);
1237tANI_U8 csrConstructWapiIe( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
1238 tSirBssDescription *pSirBssDesc, tDot11fBeaconIEs *pIes, tCsrWapiIe *pWapiIe );
1239#endif /* FEATURE_WLAN_WAPI */
1240
1241#ifdef WLAN_SOFTAP_FEATURE
1242eHalStatus csrRoamUpdateAPWPSIE( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirAPWPSIEs *pAPWPSIES );
1243eHalStatus csrRoamUpdateWPARSNIEs( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirRSNie * pAPSirRSNie);
1244#endif
1245void csrSetCfgPrivacy( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy );
1246tANI_S8 csrGetInfraSessionId( tpAniSirGlobal pMac );
1247tANI_U8 csrGetInfraOperationChannel( tpAniSirGlobal pMac, tANI_U8 sessionId);
1248tANI_U8 csrGetConcurrentOperationChannel( tpAniSirGlobal pMac );
1249
1250eHalStatus csrRoamCopyConnectProfile(tpAniSirGlobal pMac, tANI_U32 sessionId,
1251 tCsrRoamConnectedProfile *pProfile);
1252tANI_BOOLEAN csrIsSetKeyAllowed(tpAniSirGlobal pMac, tANI_U32 sessionId);
1253
1254void csrSetOppositeBandChannelInfo( tpAniSirGlobal pMac );
1255void csrConstructCurrentValidChannelList( tpAniSirGlobal pMac, tDblLinkList *pChannelSetList,
1256 tANI_U8 *pChannelList, tANI_U8 bSize, tANI_U8 *pNumChannels );
1257
1258#endif
1259
1260#ifdef WLAN_FEATURE_VOWIFI_11R
1261//Returns whether the current association is a 11r assoc or not
1262tANI_BOOLEAN csrRoamIs11rAssoc(tpAniSirGlobal pMac);
1263#endif
1264
1265#ifdef FEATURE_WLAN_CCX
1266//Returns whether the current association is a CCX assoc or not
1267tANI_BOOLEAN csrRoamIsCCXAssoc(tpAniSirGlobal pMac);
1268#endif
1269
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001270//Remove this code once SLM_Sessionization is supported
1271//BMPS_WORKAROUND_NOT_NEEDED
Jeff Johnson295189b2012-06-20 16:38:30 -07001272void csrDisconnectAllActiveSessions(tpAniSirGlobal pMac);
Mohit Khanna349bc392012-09-11 17:24:52 -07001273
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001274#ifdef FEATURE_WLAN_LFR
1275//Returns whether "Legacy Fast Roaming" is enabled...or not
Madan Mohan Koyyalamudi03aae5f2012-11-28 01:51:22 +05301276tANI_BOOLEAN csrRoamIsFastRoamEnabled(tpAniSirGlobal pMac, tANI_U32 sessionId);
Madan Mohan Koyyalamudi470d2cf2012-09-28 14:43:44 -07001277tANI_BOOLEAN csrIsChannelPresentInList( tANI_U8 *pChannelList, int numChannels, tANI_U8 channel );
1278VOS_STATUS csrAddToChannelListFront( tANI_U8 *pChannelList, int numChannels, tANI_U8 channel );
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001279#endif
1280