blob: 1eb601f4f7fd6e1545a11e206d27c7c4d7574ef8 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Gopichand Nakkala92f07d82013-01-08 21:16:34 -08002 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
3 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21/*
Jeff Johnson32d95a32012-09-10 13:15:23 -070022 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
Jeff Johnson295189b2012-06-20 16:38:30 -070023 *
24 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
25 *
26 *
27 * Permission to use, copy, modify, and/or distribute this software for
28 * any purpose with or without fee is hereby granted, provided that the
29 * above copyright notice and this permission notice appear in all
30 * copies.
31 *
32 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
33 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
34 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
35 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
36 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
37 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
38 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
39 * PERFORMANCE OF THIS SOFTWARE.
40 */
41
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080042/** ------------------------------------------------------------------------- *
43 ------------------------------------------------------------------------- *
Jeff Johnson295189b2012-06-20 16:38:30 -070044
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080045
Jeff Johnson295189b2012-06-20 16:38:30 -070046 \file csrInternal.h
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080047
Jeff Johnson295189b2012-06-20 16:38:30 -070048 Define internal data structure for MAC.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080049
50 Copyright (C) 2006 Airgo Networks, Incorporated
Jeff Johnson295189b2012-06-20 16:38:30 -070051 ========================================================================== */
52#ifndef CSRINTERNAL_H__
53#define CSRINTERNAL_H__
54
Jeff Johnson295189b2012-06-20 16:38:30 -070055#include "vos_status.h"
56#include "vos_lock.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070057
58#include "palTimer.h"
59#include "csrSupport.h"
60#include "vos_nvitem.h"
61#include "wlan_qct_tl.h"
62
63#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
64#include "csrNeighborRoam.h"
65#endif
66
67#define CSR_MAX_STA (HAL_NUM_STA)
68
69#define CSR_SME_SCAN_FLAGS_DELETE_CACHE 0x80
70
71#define CSR_TITAN_MAX_RATE_MIMO_CB 240
72#define CSR_TITAN_MAX_RATE_MIMO 126
73
74//define scan return criteria. LIM should use these define as well
75#define CSR_SCAN_RETURN_AFTER_ALL_CHANNELS ( 0 )
76#define CSR_SCAN_RETURN_AFTER_FIRST_MATCH ( 0x01 )
77#define CSR_SCAN_RETURN_AFTER_5_BAND_11d_FOUND ( 0x80 )
78#define CSR_SCAN_RETURN_AFTER_24_BAND_11d_FOUND ( 0x40 )
79#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 -070080#define CSR_NUM_RSSI_CAT 15
Jeff Johnson295189b2012-06-20 16:38:30 -070081#define CSR_MAX_STATISTICS_REQ 10
82
83//Support for multiple session
84#define CSR_SESSION_ID_INVALID 0xFF // session ID invalid
85#define CSR_ROAM_SESSION_MAX 5 // No of sessions to be supported, and a
86 // session is for Infra, IBSS or BT-AMP
87
88#define CSR_IS_SESSION_VALID( pMac, sessionId ) ( ( (sessionId) < CSR_ROAM_SESSION_MAX ) \
89 && ( (pMac)->roam.roamSession[(sessionId)].sessionActive ) )
90#define CSR_GET_SESSION( pMac, sessionId ) \
91( \
92 (sessionId < CSR_ROAM_SESSION_MAX) ? \
93 (&(pMac)->roam.roamSession[(sessionId)]) :\
94 NULL \
95)
96
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -080097#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
98#define CSR_IS_ROAM_PREFER_5GHZ( pMac ) \
99( \
100 (((pMac)->roam.configParam.nRoamPrefer5GHz)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
101)
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -0700102#define CSR_IS_ROAM_INTRA_BAND_ENABLED( pMac ) \
103( \
104 (((pMac)->roam.configParam.nRoamIntraBand)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
105)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -0800106#endif
107
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700108#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
109#define CSR_IS_ROAM_SCAN_OFFLOAD_ENABLED( pMac ) \
110( \
111 (((pMac)->roam.configParam.isRoamOffloadScanEnabled)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
112)
Srinivas Girigowda830bbd02013-06-13 19:44:16 -0700113
114#define CSR_IS_FASTROAM_IN_CONCURRENCY_INI_FEATURE_ENABLED( pMac ) \
115( \
116 (((pMac)->roam.configParam.bFastRoamInConIniFeatureEnabled)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
117)
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700118#endif
119
Madan Mohan Koyyalamudi470d2cf2012-09-28 14:43:44 -0700120//Support for "Fast roaming" (i.e., CCX, LFR, or 802.11r.)
121#define CSR_BG_SCAN_OCCUPIED_CHANNEL_LIST_LEN 15
Jeff Johnson295189b2012-06-20 16:38:30 -0700122
123typedef enum
124{
125 //eCSR_CFG_DOT11_MODE_BEST = 0,
126 eCSR_CFG_DOT11_MODE_TAURUS = 0,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800127 eCSR_CFG_DOT11_MODE_ABG,
128 eCSR_CFG_DOT11_MODE_11A,
129 eCSR_CFG_DOT11_MODE_11B,
130 eCSR_CFG_DOT11_MODE_11G,
131 eCSR_CFG_DOT11_MODE_11N,
132 eCSR_CFG_DOT11_MODE_POLARIS,
133 eCSR_CFG_DOT11_MODE_TITAN,
Jeff Johnsone7245742012-09-05 17:12:55 -0700134#ifdef WLAN_FEATURE_11AC
135 eCSR_CFG_DOT11_MODE_11AC,
136#endif
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800137 eCSR_CFG_DOT11_MODE_11G_ONLY,
138 eCSR_CFG_DOT11_MODE_11N_ONLY,
Jeff Johnsone7245742012-09-05 17:12:55 -0700139#ifdef WLAN_FEATURE_11AC
140 eCSR_CFG_DOT11_MODE_11AC_ONLY,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800141#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700142 //This value can never set to CFG. It is for CSR's internal use
143 eCSR_CFG_DOT11_MODE_AUTO,
144}eCsrCfgDot11Mode; //Used to determine what to set to the WNI_CFG_DOT11_MODE
145
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800146typedef enum etCsrRoamCommands
Jeff Johnson295189b2012-06-20 16:38:30 -0700147{
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800148 eCsrRoamNoCommand,
Jeff Johnson295189b2012-06-20 16:38:30 -0700149 eCsrRoamCommandScan,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800150 eCsrRoamCommandRoam,
151 eCsrRoamCommandWmStatusChange,
Jeff Johnson295189b2012-06-20 16:38:30 -0700152 eCsrRoamCommandSetKey,
153 eCsrRoamCommandRemoveKey,
154
155} eCsrRoamCommands;
156
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800157typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700158{
159 eCsrScanOther = 1,
160 eCsrScanLostLink1,
161 eCsrScanLostLink2,
162 eCsrScanLostLink3,
163 eCsrScanLostLink4,
164 eCsrScan11d1, //First 11d scan
165 eCsrScan11d2, //First 11d scan has failed
166 eCsrScan11dDone, //11d scan succeeded, try the rest of the channel
167 eCsrScanUserRequest,
168 eCsrScanGetResult,
169 eCsrScanSetBGScanParam, //used for HO too - bg scan request in NT Handoff sub-state
170 eCsrScanForSsid,
171 eCsrScanForCapsChange,
172 eCsrScanBGScanAbort,
173 eCsrScanBGScanEnable,
174 eCsrScanIdleScan,
175 eCsrScanGetScanChnInfo, //To get the list of channels scanned
176
177 eCsrScanBgScan, // bg scan request in NRT & RT Handoff sub-states
178 eCsrScanProbeBss, // directed probe on an entry from the candidate list - HO
179 eCsrScanAbortBgScan, //aborting a BG scan (meaning the scan is triggered by LIM timer)
180 eCsrScanAbortNormalScan, //aborting a normal scan (the scan is trigger by eWNI_SME_SCAN_REQ)
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700181 eCsrScanP2PFindPeer,
182 eCsrScanGetLfrResult, // get the LFR candidates from PE scan cache
Jeff Johnson295189b2012-06-20 16:38:30 -0700183}eCsrScanReason;
184
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800185typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700186{
187 eCsrNoConnection, // Roaming because we have not established the initial connection.
188 eCsrCapsChange, // roaming because LIM reported a Capability change in the associated AP.
189 eCsrForcedDisassoc, // roaming becuase someone asked us to Disassoc and stay disassociated.
190 eCsrHddIssued, // roaming because an 802.11 request was issued to the driver.
191 eCsrLostLink1, // roaming because we lost link to an associated AP
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800192 eCsrLostLink2,
Jeff Johnson295189b2012-06-20 16:38:30 -0700193 eCsrLostLink3,
194 eCsrForcedDisassocMICFailure, // roaming because we need to force a Disassoc due to MIC failure
195 eCsrHddIssuedReassocToSameAP,
196 eCsrSmeIssuedReassocToSameAP,
197 eCsrSmeIssuedReassocToDiffAP,
198 eCsrForcedDeauth, // roaming becuase someone asked us to deauth and stay disassociated.
199 eCsrSmeIssuedDisassocForHandoff, // will be issued by Handoff logic to disconect from current AP
200 eCsrSmeIssuedAssocToSimilarAP, // will be issued by Handoff logic to join a new AP with same profile
201 eCsrSmeIssuedIbssJoinFailure, // ibss join timer fired before any perr showed up, so shut down the network
202 eCsrForcedIbssLeave,
203 eCsrStopBss,
204 eCsrSmeIssuedFTReassoc,
205 eCsrForcedDisassocSta,
206 eCsrForcedDeauthSta,
Madan Mohan Koyyalamudi286b60e2012-10-11 12:59:07 -0700207 eCsrPerformPreauth,
Venkata Prathyusha Kuntupalli239278b2013-03-26 15:58:18 -0700208 eCsrLostLink1Abort,
209 eCsrLostLink2Abort,
210 eCsrLostLink3Abort,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800211
Jeff Johnson295189b2012-06-20 16:38:30 -0700212}eCsrRoamReason;
213
214typedef enum
215{
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800216 eCSR_ROAM_SUBSTATE_NONE = 0,
217 eCSR_ROAM_SUBSTATE_START_BSS_REQ,
218 eCSR_ROAM_SUBSTATE_JOIN_REQ,
219 eCSR_ROAM_SUBSTATE_REASSOC_REQ,
220 eCSR_ROAM_SUBSTATE_DISASSOC_REQ,
221 eCSR_ROAM_SUBSTATE_STOP_BSS_REQ,
222 eCSR_ROAM_SUBSTATE_DISCONNECT_CONTINUE_ROAMING, //Continue the current roam command after disconnect
223 eCSR_ROAM_SUBSTATE_AUTH_REQ,
224 eCSR_ROAM_SUBSTATE_CONFIG,
225 eCSR_ROAM_SUBSTATE_DEAUTH_REQ,
226 eCSR_ROAM_SUBSTATE_DISASSOC_NOTHING_TO_JOIN,
227 eCSR_ROAM_SUBSTATE_DISASSOC_REASSOC_FAILURE,
228 eCSR_ROAM_SUBSTATE_DISASSOC_FORCED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700229 eCSR_ROAM_SUBSTATE_WAIT_FOR_KEY,
230 eCSR_ROAM_SUBSTATE_DISASSOC_HANDOFF,
231 eCSR_ROAM_SUBSTATE_JOINED_NO_TRAFFIC,
232 eCSR_ROAM_SUBSTATE_JOINED_NON_REALTIME_TRAFFIC,
233 eCSR_ROAM_SUBSTATE_JOINED_REALTIME_TRAFFIC,
234// max is 15 unless the bitfield is expanded...
235} eCsrRoamSubState;
236
237
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800238typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700239{
240 eCSR_ROAMING_STATE_STOP = 0,
241 eCSR_ROAMING_STATE_IDLE,
242 eCSR_ROAMING_STATE_SCANNING,
243 eCSR_ROAMING_STATE_JOINING,
244 eCSR_ROAMING_STATE_JOINED,
245}eCsrRoamState;
246
247
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800248typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700249{
250 eCsrContinueRoaming,
251 eCsrStopRoaming,
252 eCsrStartIbss,
253 eCsrStartIbssSameIbss,
254 eCsrReassocToSelfNoCapChange,
Jeff Johnsone7245742012-09-05 17:12:55 -0700255 eCsrStopRoamingDueToConcurrency,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800256
Jeff Johnson295189b2012-06-20 16:38:30 -0700257}eCsrJoinState;
258
259typedef enum
260{
261 eCsrNotRoaming,
262 eCsrLostlinkRoamingDisassoc,
263 eCsrLostlinkRoamingDeauth,
264 eCsrDynamicRoaming,
265 eCsrReassocRoaming,
266}eCsrRoamingReason;
267
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800268typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700269{
270 eCsrDisassociated,
271 eCsrDeauthenticated
272
273}eCsrRoamWmStatusChangeTypes;
274
275typedef enum
276{
277 eCsrSummaryStats = 0,
278 eCsrGlobalClassAStats,
279 eCsrGlobalClassBStats,
280 eCsrGlobalClassCStats,
281 eCsrGlobalClassDStats,
282 eCsrPerStaStats,
283 eCsrMaxStats
284}eCsrRoamStatsClassTypes;
285
286#ifdef FEATURE_WLAN_DIAG_SUPPORT
287typedef enum
288{
289 eCSR_WLAN_STATUS_CONNECT =0,
290 eCSR_WLAN_STATUS_DISCONNECT
291
292}eCsrDiagWlanStatusEventSubtype;
293
294typedef enum
295{
296 eCSR_REASON_UNSPECIFIED = 0,
297 eCSR_REASON_USER_REQUESTED,
298 eCSR_REASON_MIC_ERROR,
299 eCSR_REASON_DISASSOC,
300 eCSR_REASON_DEAUTH,
301 eCSR_REASON_HANDOFF,
302
303}eCsrDiagWlanStatusEventReason;
304
305typedef enum
306{
307 eCSR_WLAN_HANDOFF_EVENT =0,
308
309}eCsrDiagWlanHandoffEventSubtype;
310
311typedef enum
312{
313 eCSR_WLAN_VCC_EVENT =0,
314
315}eCsrDiagWlanVccEventSubtype;
316
317#endif //FEATURE_WLAN_DIAG_SUPPORT
318
319typedef struct tagCsrChannel
320{
321 tANI_U8 numChannels;
322 tANI_U8 channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
323}tCsrChannel;
324
325typedef struct tagScanProfile
326{
327 tANI_U32 minChnTime;
328 tANI_U32 maxChnTime;
329 tANI_U32 restTime; //This is ignored if not associated
330 tANI_U32 numOfChannels;
331 tANI_U8 *pChannelList;
332 tSirScanType scanType; //active or passive
333 eCsrRoamBssType bssType; //BSS or IBSS
334 tANI_U8 ssid[WNI_CFG_SSID_LEN];
335 tANI_U8 bReturnAfter1stMatch;
336 tANI_U8 fUniqueResult;
337 tANI_U8 freshScan;
338 tCsrBssid bssid;
339}tScanProfile;
340
341typedef struct tagBssConfigParam
342{
343 eCsrMediaAccessType qosType;
344 tSirMacSSid SSID;
345 tANI_U32 uRTSThresh;
346 tANI_U32 uDeferThresh; //
347 eCsrCfgDot11Mode uCfgDot11Mode;
348 eCsrBand eBand;
349 tANI_U8 standardRate[CSR_DOT11_SUPPORTED_RATES_MAX];
350 tANI_U8 extendedRate[CSR_DOT11_EXTENDED_SUPPORTED_RATES_MAX];
351 eCsrExposedTxRate txRate;
352 tAniAuthType authType;
353 eCsrEncryptionType encType;
354 tANI_U32 uShortSlotTime;
355 tANI_U32 uHTSupport; //High throughput
356 tANI_U32 uPowerLimit;
357 tANI_U32 uHeartBeatThresh;
358 tANI_U32 uJoinTimeOut;
359 tSirMacCapabilityInfo BssCap;
360 tANI_BOOLEAN f11hSupport;
Jeff Johnsone7245742012-09-05 17:12:55 -0700361 ePhyChanBondState cbMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700362}tBssConfigParam;
363
364
365typedef struct tagCsrRoamStartBssParams
366{
367 tSirMacSSid ssId;
368 tCsrBssid bssid; //this is the BSSID for the party we want to join (only use for IBSS or WDS)
369 tSirNwType sirNwType;
Jeff Johnsone7245742012-09-05 17:12:55 -0700370 ePhyChanBondState cbMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700371 tSirMacRateSet operationalRateSet;
372 tSirMacRateSet extendedRateSet;
373 tANI_U8 operationChn;
374 eCsrCfgDot11Mode uCfgDot11Mode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700375 tANI_U8 privacy;
376 tANI_BOOLEAN fwdWPSPBCProbeReq;
377 tANI_BOOLEAN protEnabled;
378 tANI_BOOLEAN obssProtEnabled;
379 tAniAuthType authType;
380 tANI_U16 beaconInterval; //If this is 0, SME will fill in for caller.
381 tANI_U16 ht_protection;
382 tANI_U32 dtimPeriod;
383 tANI_U8 ApUapsdEnable;
384 tANI_U8 ssidHidden;
385 tANI_U8 wps_state;
Jeff Johnson295189b2012-06-20 16:38:30 -0700386 tVOS_CON_MODE bssPersona;
387 tANI_U16 nRSNIELength; //The byte count in the pRSNIE, if 0, pRSNIE is ignored.
388 tANI_U8 *pRSNIE; //If not null, it has the IE byte stream for RSN
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800389 tANI_BOOLEAN updatebeaconInterval; //Flag used to indicate update
390 // beaconInterval
Jeff Johnson295189b2012-06-20 16:38:30 -0700391}tCsrRoamStartBssParams;
392
393
394typedef struct tagScanCmd
395{
396 tANI_U32 scanID;
397 csrScanCompleteCallback callback;
398 void *pContext;
399 eCsrScanReason reason;
400 eCsrRoamState lastRoamState[CSR_ROAM_SESSION_MAX];
401 tCsrRoamProfile *pToRoamProfile;
402 tANI_U32 roamId; //this is the ID related to the pToRoamProfile
403 union
404 {
405 tCsrScanRequest scanRequest;
406 tCsrBGScanRequest bgScanRequest;
407 }u;
408}tScanCmd;
409
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800410typedef struct tagRoamCmd
Jeff Johnson295189b2012-06-20 16:38:30 -0700411{
412 tANI_U32 roamId;
413 eCsrRoamReason roamReason;
414 tCsrRoamProfile roamProfile;
415 tScanResultHandle hBSSList; //BSS list fits the profile
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800416 tListElem *pRoamBssEntry; //point to the current BSS in the list that is roaming. It starts from head to tail
Jeff Johnson295189b2012-06-20 16:38:30 -0700417 tSirBssDescription *pLastRoamBss; //the last BSS we try and failed
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800418 tANI_BOOLEAN fReleaseBssList; //whether to free hBSSList
Jeff Johnson295189b2012-06-20 16:38:30 -0700419 tANI_BOOLEAN fReleaseProfile; //whether to free roamProfile
420 tANI_BOOLEAN fReassoc; //whether this command is for reassociation
421 tANI_BOOLEAN fUpdateCurRoamProfile; //whether pMac->roam.pCurRoamProfile needs to be updated
422 //this is for CSR internal used only. And it should not be assigned when creating the command
423 //This causes the roam command not to do anything.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800424 tANI_BOOLEAN fReassocToSelfNoCapChange;
Jeff Johnson295189b2012-06-20 16:38:30 -0700425
426 tANI_BOOLEAN fStopWds;
427 tSirMacAddr peerMac;
428 tSirMacReasonCodes reason;
429}tRoamCmd;
430
431typedef struct tagSetKeyCmd
432{
433 tANI_U32 roamId;
434 eCsrEncryptionType encType;
435 eCsrAuthType authType;
436 tAniKeyDirection keyDirection; //Tx, Rx or Tx-and-Rx
437 tSirMacAddr peerMac; //Peer's MAC address. ALL 1's for group key
438 tANI_U8 paeRole; //0 for supplicant
439 tANI_U8 keyId; // Kye index
440 tANI_U8 keyLength; //Number of bytes containing the key in pKey
441 tANI_U8 Key[CSR_MAX_KEY_LEN];
442 tANI_U8 keyRsc[CSR_MAX_RSC_LEN];
443} tSetKeyCmd;
444
445typedef struct tahRemoveKeyCmd
446{
447 tANI_U32 roamId;
448 eCsrEncryptionType encType;
449 eCsrAuthType authType;
450 tSirMacAddr peerMac; //Peer's MAC address. ALL 1's for group key
451 tANI_U8 keyId; //key index
452} tRemoveKeyCmd;
453
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800454typedef struct tagWmStatusChangeCmd
Jeff Johnson295189b2012-06-20 16:38:30 -0700455{
456 eCsrRoamWmStatusChangeTypes Type;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800457 union
458 {
Jeff Johnson295189b2012-06-20 16:38:30 -0700459 tSirSmeDeauthInd DeauthIndMsg;
460 tSirSmeDisassocInd DisassocIndMsg;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800461 }u;
Jeff Johnson295189b2012-06-20 16:38:30 -0700462
463}tWmStatusChangeCmd;
464
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700465
Jeff Johnson295189b2012-06-20 16:38:30 -0700466typedef struct tagAddStaForSessionCmd
467{
468 //Session self mac addr
469 tSirMacAddr selfMacAddr;
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700470 tVOS_CON_MODE currDeviceMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700471}tAddStaForSessionCmd;
472
473typedef struct tagDelStaForSessionCmd
474{
475 //Session self mac addr
476 tSirMacAddr selfMacAddr;
477 csrRoamSessionCloseCallback callback;
478 void *pContext;
479}tDelStaForSessionCmd;
480
481//This structure represents one scan request
482typedef struct tagCsrCmd
483{
484 tListElem Link;
485 eCsrRoamCommands command;
486 tANI_U8 sessionId; // Session ID for this command
487 union
488 {
489 tScanCmd scanCmd;
490 tRoamCmd roamCmd;
491 tWmStatusChangeCmd wmStatusChangeCmd;
492 tSetKeyCmd setKeyCmd;
493 tRemoveKeyCmd removeKeyCmd;
494 tAddStaForSessionCmd addStaSessionCmd;
495 tDelStaForSessionCmd delStaSessionCmd;
496 }u;
497}tCsrCmd;
498
499#ifdef WLAN_FEATURE_VOWIFI_11R
500typedef struct tagCsr11rConfig
501{
502 tANI_BOOLEAN IsFTResourceReqSupported;
503} tCsr11rConfig;
504#endif
505
506#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
507typedef struct tagCsrNeighborRoamConfig
508{
509 tANI_U32 nNeighborScanTimerPeriod;
510 tANI_U8 nNeighborLookupRssiThreshold;
511 tANI_U8 nNeighborReassocRssiThreshold;
512 tANI_U16 nNeighborScanMinChanTime;
513 tANI_U16 nNeighborScanMaxChanTime;
514 sCsrChannel neighborScanChanList;
515 tANI_U8 nMaxNeighborRetries;
516 tANI_U16 nNeighborResultsRefreshPeriod;
Srinivas Girigowdade697412013-02-14 16:31:48 -0800517 tANI_U16 nEmptyScanRefreshPeriod;
Jeff Johnson295189b2012-06-20 16:38:30 -0700518}tCsrNeighborRoamConfig;
519#endif
520
521typedef struct tagCsrConfig
522{
523 tANI_U32 agingCount;
524 tANI_U32 FragmentationThreshold;
525 tANI_U32 channelBondingMode24GHz;
526 tANI_U32 channelBondingMode5GHz;
527 tANI_U32 RTSThreshold;
528 eCsrPhyMode phyMode;
529 eCsrCfgDot11Mode uCfgDot11Mode;
530 eCsrBand eBand;
531 tANI_U32 HeartbeatThresh50;
532 tANI_U32 HeartbeatThresh24;
533 tANI_U32 bgScanInterval;
534 eCsrCBChoice cbChoice;
535 eCsrBand bandCapability; //indicate hw capability
536 eCsrRoamWmmUserModeType WMMSupportMode;
537 tANI_BOOLEAN Is11eSupportEnabled;
538 tANI_BOOLEAN Is11dSupportEnabled;
539 tANI_BOOLEAN Is11dSupportEnabledOriginal;
540 tANI_BOOLEAN Is11hSupportEnabled;
541 tANI_BOOLEAN shortSlotTime;
542 tANI_BOOLEAN ProprietaryRatesEnabled;
543 tANI_BOOLEAN fenableMCCMode;
544 tANI_U16 TxRate;
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -0800545 tANI_U8 fAllowMCCGODiffBI;
Jeff Johnson295189b2012-06-20 16:38:30 -0700546 tANI_U8 AdHocChannel24;
547 tANI_U8 AdHocChannel5G;
548 tANI_U32 impsSleepTime; //in units of microseconds
549 tANI_U32 scanAgeTimeNCNPS; //scan result aging time threshold when Not-Connect-No-Power-Save, in seconds
550 tANI_U32 scanAgeTimeNCPS; //scan result aging time threshold when Not-Connect-Power-Save, in seconds
551 tANI_U32 scanAgeTimeCNPS; //scan result aging time threshold when Connect-No-Power-Save, in seconds,
552 tANI_U32 scanAgeTimeCPS; //scan result aging time threshold when Connect-Power-Savein seconds
553 tANI_U32 BssPreferValue[CSR_NUM_RSSI_CAT]; //each RSSI category has one value
554 int RSSICat[CSR_NUM_RSSI_CAT];
555 tANI_U8 bCatRssiOffset; //to set the RSSI difference for each category
556 tANI_U32 nRoamingTime; //In seconds, CSR will try this long before gives up, 0 means no roaming
557 //Whether to limit the channels to the ones set in Csr11dInfo. If true, the opertaional
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800558 //channels are limited to the default channel list. It is an "AND" operation between the
Jeff Johnson295189b2012-06-20 16:38:30 -0700559 //default channels and the channels in the 802.11d IE.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800560 tANI_BOOLEAN fEnforce11dChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -0700561 //Country Code Priority
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800562 //0 = 802.11D > Configured Country > NV
Jeff Johnson295189b2012-06-20 16:38:30 -0700563 //1 = Configured Country > 802.11D > NV
564 tANI_BOOLEAN fSupplicantCountryCodeHasPriority;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800565 //When true, AP with unknown country code won't be see.
566 //"Unknown country code" means either Ap doesn't have 11d IE or we cannot
Jeff Johnson295189b2012-06-20 16:38:30 -0700567 //find a domain for the country code in its 11d IE.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800568 tANI_BOOLEAN fEnforceCountryCodeMatch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700569 //When true, only APs in the default domain can be seen. If the Ap has "unknown country
570 //code", or the doamin of the country code doesn't match the default domain, the Ap is
571 //not acceptable.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800572 tANI_BOOLEAN fEnforceDefaultDomain;
Jeff Johnson295189b2012-06-20 16:38:30 -0700573
574 tANI_U16 vccRssiThreshold;
575 tANI_U32 vccUlMacLossThreshold;
576
577 tANI_U32 nPassiveMinChnTime; //in units of milliseconds
578 tANI_U32 nPassiveMaxChnTime; //in units of milliseconds
579 tANI_U32 nActiveMinChnTime; //in units of milliseconds
580 tANI_U32 nActiveMaxChnTime; //in units of milliseconds
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800581
582 tANI_U32 nActiveMinChnTimeBtc; //in units of milliseconds
583 tANI_U32 nActiveMaxChnTimeBtc; //in units of milliseconds
Kiran Kumar Lokere458d7322013-05-29 14:29:43 -0700584 tANI_U8 disableAggWithBtc;
Madan Mohan Koyyalamudi4ff9cd62012-10-30 17:48:57 -0700585#ifdef WLAN_AP_STA_CONCURRENCY
586 tANI_U32 nPassiveMinChnTimeConc; //in units of milliseconds
587 tANI_U32 nPassiveMaxChnTimeConc; //in units of milliseconds
588 tANI_U32 nActiveMinChnTimeConc; //in units of milliseconds
589 tANI_U32 nActiveMaxChnTimeConc; //in units of milliseconds
590 tANI_U32 nRestTimeConc; //in units of milliseconds
Sudhir Sattayappa Kohallieb97d502013-05-22 23:16:42 -0700591 tANI_U8 nNumStaChanCombinedConc; //number of channels combined for
592 //Sta in each split scan operation
593 tANI_U8 nNumP2PChanCombinedConc; //number of channels combined for
594 //P2P in each split scan operation
Madan Mohan Koyyalamudi4ff9cd62012-10-30 17:48:57 -0700595#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700596
597 tANI_BOOLEAN IsIdleScanEnabled;
598 //in dBm, the maximum TX power
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800599 //The actual TX power is the lesser of this value and 11d.
Jeff Johnson295189b2012-06-20 16:38:30 -0700600 //If 11d is disable, the lesser of this and default setting.
601 tANI_U8 nTxPowerCap;
602 tANI_U32 statsReqPeriodicity; //stats request frequency from PE while in full power
603 tANI_U32 statsReqPeriodicityInPS;//stats request frequency from PE while in power save
Jeff Johnson295189b2012-06-20 16:38:30 -0700604 tANI_U32 dtimPeriod;
605 tANI_BOOLEAN ssidHidden;
Jeff Johnson295189b2012-06-20 16:38:30 -0700606
607#ifdef WLAN_FEATURE_VOWIFI_11R
608 tCsr11rConfig csr11rConfig;
609#endif
610
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700611#ifdef FEATURE_WLAN_LFR
Srinivas Girigowda830bbd02013-06-13 19:44:16 -0700612 tANI_U8 isFastRoamIniFeatureEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700613#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Srinivas Girigowda830bbd02013-06-13 19:44:16 -0700614 tANI_U8 isRoamOffloadScanEnabled;
615 tANI_BOOLEAN bFastRoamInConIniFeatureEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700616#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700617#endif
618
Jeff Johnson295189b2012-06-20 16:38:30 -0700619#ifdef FEATURE_WLAN_CCX
620 tANI_U8 isCcxIniFeatureEnabled;
621#endif
622
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700623#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700624 tANI_U8 isFastTransitionEnabled;
625 tANI_U8 RoamRssiDiff;
626 tANI_U8 nImmediateRoamRssiDiff;
627 tANI_BOOLEAN nRoamPrefer5GHz;
628 tANI_BOOLEAN nRoamIntraBand;
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700629 tANI_BOOLEAN nRoamScanControl;
Varun Reddy Yeturu920df212013-05-22 08:07:23 -0700630 tANI_U8 nProbes;
631 tANI_U16 nRoamScanHomeAwayTime;
Jeff Johnson295189b2012-06-20 16:38:30 -0700632#endif
633
634#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
635 tCsrNeighborRoamConfig neighborRoamConfig;
636#endif
637
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800638 /* Instead of Reassoc, send ADDTS/DELTS even when ACM is off for that AC
Jeff Johnson295189b2012-06-20 16:38:30 -0700639 * This is mandated by WMM-AC certification */
640 tANI_BOOLEAN addTSWhenACMIsOff;
641
642 tANI_BOOLEAN fValidateList;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800643 //Remove this code once SLM_Sessionization is supported
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -0700644 //BMPS_WORKAROUND_NOT_NEEDED
Jeff Johnsone7245742012-09-05 17:12:55 -0700645 tANI_BOOLEAN doBMPSWorkaround;
Jeff Johnson295189b2012-06-20 16:38:30 -0700646
647 //To enable/disable scanning 2.4Ghz channels twice on a single scan request from HDD
648 tANI_BOOLEAN fScanTwice;
Jeff Johnsone7245742012-09-05 17:12:55 -0700649#ifdef WLAN_FEATURE_11AC
650 tANI_U32 nVhtChannelWidth;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -0800651 tANI_U8 txBFEnable;
Shailender Karmuchicc3fe442013-02-16 18:18:33 -0800652 tANI_U8 txBFCsnValue;
Ravi Joshi83bfaa12013-05-28 22:12:08 -0700653 tANI_BOOLEAN enableVhtFor24GHz;
Jeff Johnsone7245742012-09-05 17:12:55 -0700654#endif
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -0800655 tANI_U8 txLdpcEnable;
krunal soni4f087d22013-07-29 16:32:26 -0700656 tANI_BOOLEAN enableOxygenNwk;
Jeff Johnson295189b2012-06-20 16:38:30 -0700657
Ravi Joshid2ca7c42013-07-23 08:37:49 -0700658 /*
659 * Enable/Disable heartbeat offload
660 */
661 tANI_BOOLEAN enableHeartBeatOffload;
Jeff Johnson295189b2012-06-20 16:38:30 -0700662}tCsrConfig;
663
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800664typedef struct tagCsrChannelPowerInfo
Jeff Johnson295189b2012-06-20 16:38:30 -0700665{
666 tListElem link;
667 tANI_U8 firstChannel;
668 tANI_U8 numChannels;
669 tANI_U8 txPower;
670 tANI_U8 interChannelOffset;
671}tCsrChannelPowerInfo;
672
673typedef struct tagRoamJoinStatus
674{
675 tSirResultCodes statusCode;
676 //this is set to unspecified if statusCode indicates timeout. Or it is the failed reason from the other BSS(per 802.11 spec)
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800677 tANI_U32 reasonCode;
Kiran Kumar Lokerec8550fa2013-04-15 22:23:00 -0700678 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -0700679}tCsrRoamJoinStatus;
680
681typedef struct tagCsrOsChannelMask
682{
683 tANI_U8 numChannels;
684 tANI_BOOLEAN scanEnabled[WNI_CFG_VALID_CHANNEL_LIST_LEN];
685 tANI_U8 channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
686}tCsrOsChannelMask;
687
688
689typedef struct tagCsrScanStruct
690{
691 tScanProfile scanProfile;
692 tANI_U32 nextScanID;
Madan Mohan Koyyalamudica43cdf2012-09-24 13:15:49 -0700693 tDblLinkList scanResultList;
Jeff Johnson295189b2012-06-20 16:38:30 -0700694 tDblLinkList tempScanResults;
695 tANI_BOOLEAN fScanEnable;
696 tANI_BOOLEAN fFullScanIssued;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530697 vos_timer_t hTimerGetResult;
Jeff Johnson295189b2012-06-20 16:38:30 -0700698#ifdef WLAN_AP_STA_CONCURRENCY
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530699 vos_timer_t hTimerStaApConcTimer;
Jeff Johnson295189b2012-06-20 16:38:30 -0700700#endif
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530701 vos_timer_t hTimerIdleScan;
702 vos_timer_t hTimerResultAging;
703 vos_timer_t hTimerResultCfgAging;
Jeff Johnson295189b2012-06-20 16:38:30 -0700704 tPalTimerHandle hTimerBgScan;
705 //changes on every scan, it is used as a flag for whether 11d info is found on every scan
Sandeep Puligilla2b6dc632012-12-17 14:44:16 -0800706 tANI_U8 channelOf11dInfo;
707 tANI_U8 scanResultCfgAgingTime;
Jeff Johnson295189b2012-06-20 16:38:30 -0700708 //changes on every scan, a flag to tell whether conflict 11d info found on each BSS
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800709 tANI_BOOLEAN fAmbiguous11dInfoFound;
Jeff Johnson295189b2012-06-20 16:38:30 -0700710 //Tush: changes on every scan, a flag to tell whether the applied 11d info present in one of the scan results
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800711 tANI_BOOLEAN fCurrent11dInfoMatch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700712 tANI_BOOLEAN f11dInfoReset; //to indicate whether the 11d info in CFG is reset to default
713 tSirScanType curScanType;
714 tCsrChannel baseChannels; //This are all the supported channels AND(&) to the current eBand
715 tCsrChannel channels11d;
716 tChannelListWithPower defaultPowerTable[WNI_CFG_VALID_CHANNEL_LIST_LEN]; //From NV
717 tChannelListWithPower defaultPowerTable40MHz[WNI_CFG_VALID_CHANNEL_LIST_LEN]; //From NV
718 tANI_U32 numChannelsDefault; //total channels of NV
719 tCsrChannel base20MHzChannels; //The channel base to work on
720 tCsrChannel base40MHzChannels; //center channels for 40MHz channels
721 tDblLinkList channelPowerInfoList24;
722 tDblLinkList channelPowerInfoList5G;
723 tANI_U32 nLastAgeTimeOut;
724 tANI_U32 nAgingCountDown;
Gopichand Nakkala114718f2013-03-25 19:19:46 -0700725 tANI_U8 countryCodeDefault[WNI_CFG_COUNTRY_CODE_LEN]; //The country code from NV
726 tANI_U8 countryCodeCurrent[WNI_CFG_COUNTRY_CODE_LEN];
727 tANI_U8 countryCode11d[WNI_CFG_COUNTRY_CODE_LEN];
Jeff Johnson295189b2012-06-20 16:38:30 -0700728 v_REGDOMAIN_t domainIdDefault; //default regulatory domain
729 v_REGDOMAIN_t domainIdCurrent; //current regulatory domain
730 tANI_BOOLEAN f11dInfoApplied;
731 tANI_BOOLEAN fCancelIdleScan;
732#ifdef FEATURE_WLAN_WAPI
733// tANI_U16 NumBkidCandidate;
734// tBkidCandidateInfo BkidCandidateInfo[CSR_MAX_BKID_ALLOWED]; /* Move this as part of SessionEntry */
735#endif /* FEATURE_WLAN_WAPI */
736 tANI_U8 numBGScanChannel; //number of valid channels in the bgScanChannelList
737 tANI_U8 bgScanChannelList[WNI_CFG_BG_SCAN_CHANNEL_LIST_LEN];
738 //the ChannelInfo member is not used in this structure.
739 //numBGScanChannel and bgScanChannelList are used for the BG scan channel info
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800740 tCsrBGScanRequest bgScanParams;
Jeff Johnson295189b2012-06-20 16:38:30 -0700741 tANI_BOOLEAN fRestartIdleScan;
742 tANI_U32 nIdleScanTimeGap; //the time since last trying to trigger idle scan
743 tCsrOsChannelMask osScanChannelMask;//keep a track of channels to be scnned while in traffic condition
744 tANI_U16 nBssLimit; //the maximum number of BSS in scan cache
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800745 /*channelPowerInfoList24 has been seen corrupted. Set this flag to true trying to
Jeff Johnson295189b2012-06-20 16:38:30 -0700746 * detect when it happens. Adding this into code because we can't reproduce it easily.
747 * We don't know when it happens. */
748 tANI_BOOLEAN fValidateList;
749 /*Customer wants to start with an active scan based on the default country code.
750 * This optimization will minimize the driver load to association time.
751 * Based on this flag we will bypass the initial passive scan needed for 11d
752 * to determine the country code & domain */
753 tANI_BOOLEAN fEnableBypass11d;
754
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800755 /*Customer wants to optimize the scan time. Avoiding scans(passive) on DFS
756 * channels while swipping through both bands can save some time
Jeff Johnson295189b2012-06-20 16:38:30 -0700757 * (apprx 1.3 sec) */
758 tANI_BOOLEAN fEnableDFSChnlScan;
759
Jeff Johnsone7245742012-09-05 17:12:55 -0700760 /*
761 * To enable/disable scanning only 2.4Ghz channels on first scan
762 */
763 tANI_BOOLEAN fFirstScanOnly2GChnl;
764
Jeff Johnson295189b2012-06-20 16:38:30 -0700765 tANI_BOOLEAN fDropScanCmd; //true means we don't accept scan commands
766
767#ifdef WLAN_AP_STA_CONCURRENCY
768 tDblLinkList scanCmdPendingList;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800769#endif
Madan Mohan Koyyalamudi470d2cf2012-09-28 14:43:44 -0700770 tCsrChannel occupiedChannels; //This includes all channels on which candidate APs are found
Jeff Johnson295189b2012-06-20 16:38:30 -0700771}tCsrScanStruct;
772
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800773#ifdef FEATURE_WLAN_TDLS_INTERNAL
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800774/*
775 * struct to carry TDLS discovery info..
776 */
777typedef struct sCsrTdlsContext
778{
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800779 tDblLinkList tdlsPotentialPeerList ;
780 tANI_U16 tdlsCommonFlag ;
781 tANI_U16 tdlsCommonState ;
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800782 tANI_U16 tdlsPeerCount ;
783}tCsrTdlsCtxStruct;
784
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800785typedef struct sCsrTdlsPeerLinkInfo
786{
787 tListElem tdlsPeerStaLink ;
788 tSirTdlsPeerInfo tdlsDisPeerInfo ;
789}tCsrTdlsPeerLinkinfo ;
790#endif
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800791
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800792
793
Jeff Johnson295189b2012-06-20 16:38:30 -0700794
795//Save the connected information. This structure + connectedProfile
796//should contain all information about the connection
797typedef struct tagRoamCsrConnectedInfo
798{
799 tANI_U32 nBeaconLength; //the length, in bytes, of the beacon frame, can be 0
800 tANI_U32 nAssocReqLength; //the length, in bytes, of the assoc req frame, can be 0
801 tANI_U32 nAssocRspLength; //The length, in bytes, of the assoc rsp frame, can be 0
802#ifdef WLAN_FEATURE_VOWIFI_11R
803 tANI_U32 nRICRspLength; //Length of the parsed RIC response IEs received in reassoc response
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800804#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700805#ifdef FEATURE_WLAN_CCX
806 tANI_U32 nTspecIeLength;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800807#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700808 tANI_U8 *pbFrames; //Point to a buffer contain the beacon, assoc req, assoc rsp frame, in that order
809 //user needs to use nBeaconLength, nAssocReqLength, nAssocRspLength to desice where
810 //each frame starts and ends.
811 tANI_U8 staId;
812}tCsrRoamConnectedInfo;
813
814
815typedef struct tagCsrLinkQualityIndInfo
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800816{
Jeff Johnson295189b2012-06-20 16:38:30 -0700817 csrRoamLinkQualityIndCallback callback;
818 void *context;
819}tCsrLinkQualityIndInfo;
820
821typedef struct tagCsrPeStatsReqInfo
822{
823 tListElem link; /* list links */
824 tANI_U32 statsMask;
825 tANI_U32 periodicity;
826 tANI_BOOLEAN rspPending;
827 vos_timer_t hPeStatsTimer;
828 tANI_BOOLEAN timerRunning;
829 tANI_U8 staId;
830 tANI_U8 numClient;
831 tpAniSirGlobal pMac;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800832 /* To remember if the peStats timer is stopped successfully or not */
Jeff Johnson295189b2012-06-20 16:38:30 -0700833 tANI_BOOLEAN timerStopFailed;
834
835}tCsrPeStatsReqInfo;
836
837typedef struct tagCsrStatsClientReqInfo
838{
839 tListElem link; /* list links */
840 eCsrStatsRequesterType requesterId;
841 tCsrStatsCallback callback;
842 tANI_U32 periodicity;
843 void *pContext;
844 tANI_U32 statsMask;
845 tCsrPeStatsReqInfo *pPeStaEntry;
846 tANI_U8 staId;
847 vos_timer_t timer;
848 tANI_BOOLEAN timerExpired;
849 tpAniSirGlobal pMac; // TODO: Confirm this change BTAMP
850}tCsrStatsClientReqInfo;
851
852typedef struct tagCsrTlStatsReqInfo
853{
854 tANI_U32 periodicity;
855 tANI_BOOLEAN timerRunning;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530856 vos_timer_t hTlStatsTimer;
Jeff Johnson295189b2012-06-20 16:38:30 -0700857 tANI_U8 numClient;
858}tCsrTlStatsReqInfo;
859
860typedef struct tagCsrRoamSession
861{
862 tANI_U8 sessionId; // Session ID
863 tANI_BOOLEAN sessionActive; // TRUE if it is used
864 tCsrBssid selfMacAddr; // For BT-AMP station, this serve as BSSID for self-BSS.
865 csrRoamCompleteCallback callback;
866 void *pContext;
867 eCsrConnectState connectState;
868 tCsrRoamConnectedProfile connectedProfile;
869 tCsrRoamConnectedInfo connectedInfo;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800870 tCsrRoamProfile *pCurRoamProfile;
Jeff Johnson295189b2012-06-20 16:38:30 -0700871 tSirBssDescription *pConnectBssDesc;
872 tANI_U16 NumPmkidCache;
873 tPmkidCacheInfo PmkidCacheInfo[CSR_MAX_PMKID_ALLOWED];
874 tANI_U8 cJoinAttemps;
875 //This may or may not have the up-to-date valid channel list
876 //It is used to get WNI_CFG_VALID_CHANNEL_LIST and not allocate memory all the time
877 tSirMacChanNum validChannelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
878 tANI_S32 sPendingCommands; //0 means CSR is ok to low power
879#ifdef FEATURE_WLAN_WAPI
880 tANI_U16 NumBkidCache;
881 tBkidCacheInfo BkidCacheInfo[CSR_MAX_BKID_ALLOWED];
882#endif /* FEATURE_WLAN_WAPI */
883 tANI_BOOLEAN fRoaming; //indicate whether CSR is roaming (either via lostlink or dynamic roaming)
884 //to remember some parameters needed for START_BSS.
885 //All member must be set every time we try to join or start an IBSS or BT-AMP
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800886 tCsrRoamStartBssParams bssParams;
Jeff Johnson295189b2012-06-20 16:38:30 -0700887 tANI_U32 nWpaRsnReqIeLength; //the byte count of pWpaRsnIE;
888 tANI_U8 *pWpaRsnReqIE; //this contain the WPA/RSN IE in assoc request or the one sent in beacon (IBSS)
889 tANI_U32 nWpaRsnRspIeLength; //the byte count for pWpaRsnRspIE
890 tANI_U8 *pWpaRsnRspIE; //this contain the WPA/RSN IE in beacon/probe rsp
891#ifdef FEATURE_WLAN_WAPI
892 tANI_U32 nWapiReqIeLength; //the byte count of pWapiReqIE;
893 tANI_U8 *pWapiReqIE; //this contain the WAPI IE in assoc request or the one sent in beacon (IBSS)
894 tANI_U32 nWapiRspIeLength; //the byte count for pWapiRspIE
895 tANI_U8 *pWapiRspIE; //this contain the WAPI IE in beacon/probe rsp
896#endif /* FEATURE_WLAN_WAPI */
897 tANI_U32 nAddIEScanLength; //the byte count of pAddIeScanIE;
898 tANI_U8 *pAddIEScan; //this contains the additional IE in (unicast) probe request at the time of join
899 tANI_U32 nAddIEAssocLength; //the byte count for pAddIeAssocIE
900 tANI_U8 *pAddIEAssoc; //this contains the additional IE in (re) assoc request
901
902 tANI_TIMESTAMP roamingStartTime; //in units of 10ms
903 tCsrTimerInfo roamingTimerInfo;
904 eCsrRoamingReason roamingReason;
905 tANI_BOOLEAN fCancelRoaming;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530906 vos_timer_t hTimerRoaming;
907 vos_timer_t hTimerIbssJoining;
Jeff Johnson295189b2012-06-20 16:38:30 -0700908 tCsrTimerInfo ibssJoinTimerInfo;
909 tANI_BOOLEAN ibss_join_pending;
910 eCsrRoamResult roamResult; //the roamResult that is used when the roaming timer fires
911 tCsrRoamJoinStatus joinFailStatusCode; //This is the reason code for join(assoc) failure
912 //The status code returned from PE for deauth or disassoc (in case of lostlink), or our own dynamic roaming
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800913 tANI_U32 roamingStatusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700914 tANI_U16 NumPmkidCandidate;
915 tPmkidCandidateInfo PmkidCandidateInfo[CSR_MAX_PMKID_ALLOWED];
916 #ifdef FEATURE_WLAN_WAPI
917 tANI_U16 NumBkidCandidate;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800918 tBkidCandidateInfo BkidCandidateInfo[CSR_MAX_BKID_ALLOWED];
Jeff Johnson295189b2012-06-20 16:38:30 -0700919#endif
920 tANI_BOOLEAN fWMMConnection;
921#ifdef FEATURE_WLAN_BTAMP_UT_RF
922 //To retry a join later when it fails if so desired
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530923 vos_timer_t hTimerJoinRetry;
Jeff Johnson295189b2012-06-20 16:38:30 -0700924 tCsrTimerInfo joinRetryTimerInfo;
925 tANI_U32 maxRetryCount;
926#endif
927#ifdef FEATURE_WLAN_CCX
928 tCsrCcxCckmInfo ccxCckmInfo;
929 tANI_BOOLEAN isPrevApInfoValid;
930 tSirMacSSid prevApSSID;
931 tCsrBssid prevApBssid;
932 tANI_U8 prevOpChannel;
933 tANI_U16 clientDissSecs;
934 tANI_U32 roamTS1;
935#endif
936 tANI_U8 bRefAssocStartCnt; //Tracking assoc start indication
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800937 /* to force the AP initiate fresh 802.1x authentication after re-association need to clear
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700938 * the PMKID cache. To clear the cache in this particular case this is added
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800939 * it is needed by the HS 2.0 passpoint certification 5.2.a and b testcases */
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700940 tANI_BOOLEAN fIgnorePMKIDCache;
Jeff Johnson295189b2012-06-20 16:38:30 -0700941} tCsrRoamSession;
942
943typedef struct tagCsrRoamStruct
944{
945 tANI_U32 nextRoamId;
946 tDblLinkList roamCmdPendingList;
947 tDblLinkList channelList5G;
948 tDblLinkList channelList24;
949 tCsrConfig configParam;
950 tANI_U32 numChannelsEeprom; //total channels of eeprom
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800951 tCsrChannel base20MHzChannels; //The channel base to work on
952 tCsrChannel base40MHzChannels; //center channels for 40MHz channels
953 eCsrRoamState curState[CSR_ROAM_SESSION_MAX];
Jeff Johnson295189b2012-06-20 16:38:30 -0700954 eCsrRoamSubState curSubState[CSR_ROAM_SESSION_MAX];
955 //This may or may not have the up-to-date valid channel list
956 //It is used to get WNI_CFG_VALID_CHANNEL_LIST and not allocate memory all the time
957 tSirMacChanNum validChannelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
958 tANI_U32 numValidChannels; //total number of channels in CFG
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800959
Jeff Johnson295189b2012-06-20 16:38:30 -0700960 tANI_S32 sPendingCommands;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530961 vos_timer_t hTimerWaitForKey; //To support timeout for WaitForKey state
Jeff Johnson295189b2012-06-20 16:38:30 -0700962 tCsrSummaryStatsInfo summaryStatsInfo;
963 tCsrGlobalClassAStatsInfo classAStatsInfo;
964 tCsrGlobalClassBStatsInfo classBStatsInfo;
965 tCsrGlobalClassCStatsInfo classCStatsInfo;
966 tCsrGlobalClassDStatsInfo classDStatsInfo;
967 tCsrPerStaStatsInfo perStaStatsInfo[CSR_MAX_STA];
968 tDblLinkList statsClientReqList;
969 tDblLinkList peStatsReqList;
970 tCsrTlStatsReqInfo tlStatsReqInfo;
971 eCsrRoamLinkQualityInd vccLinkQuality;
972 tCsrLinkQualityIndInfo linkQualityIndInfo;
973 v_CONTEXT_t gVosContext; //used for interaction with TL
974 //To specify whether an association or a IBSS is WMM enabled
975 //This parameter is only valid during a join or start BSS command is being executed
976 //tANI_BOOLEAN fWMMConnection; /* Moving it to be part of roamsession */
977 v_U8_t ucACWeights[WLANTL_MAX_AC];
978 /* TODO : Upto here */
979 tCsrTimerInfo WaitForKeyTimerInfo;
980 tCsrRoamSession *roamSession;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800981 tANI_U32 transactionId; // Current transaction ID for internal use.
982#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Jeff Johnson295189b2012-06-20 16:38:30 -0700983 tCsrNeighborRoamControlInfo neighborRoamInfo;
984#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700985#ifdef FEATURE_WLAN_LFR
986 tANI_U8 isFastRoamIniFeatureEnabled;
987#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700988#ifdef FEATURE_WLAN_CCX
989 tANI_U8 isCcxIniFeatureEnabled;
990#endif
Jeff Johnson43971f52012-07-17 12:26:56 -0700991#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700992 tANI_U8 RoamRssiDiff;
Jeff Johnson43971f52012-07-17 12:26:56 -0700993#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700994}tCsrRoamStruct;
995
996
997#define GET_NEXT_ROAM_ID(pRoamStruct) (((pRoamStruct)->nextRoamId + 1 == 0) ? 1 : (pRoamStruct)->nextRoamId)
998#define CSR_IS_ROAM_STATE(pMac, state, sessionId) ( (state) == (pMac)->roam.curState[sessionId] )
999
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001000#define CSR_IS_ROAM_STOP(pMac, sessionId) CSR_IS_ROAM_STATE( (pMac), eCSR_ROAMING_STATE_STOP, sessionId )
1001#define CSR_IS_ROAM_INIT(pMac, sessionId) CSR_IS_ROAM_STATE( (pMac), eCSR_ROAMING_STATE_INIT, sessionId )
Jeff Johnson295189b2012-06-20 16:38:30 -07001002#define CSR_IS_ROAM_SCANNING(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_SCANNING, sessionId )
1003#define CSR_IS_ROAM_JOINING(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_JOINING, sessionId )
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001004#define CSR_IS_ROAM_IDLE(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_IDLE, sessionId )
Jeff Johnson295189b2012-06-20 16:38:30 -07001005#define CSR_IS_ROAM_JOINED(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_JOINED, sessionId )
1006
1007#define CSR_IS_ROAM_SUBSTATE(pMac, subState, sessionId) ((subState) == (pMac)->roam.curSubState[sessionId])
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001008#define CSR_IS_ROAM_SUBSTATE_JOIN_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOIN_REQ, sessionId)
1009#define CSR_IS_ROAM_SUBSTATE_AUTH_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_AUTH_REQ, sessionId)
1010#define CSR_IS_ROAM_SUBSTATE_REASSOC_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_REASSOC_REQ, sessionId)
1011#define CSR_IS_ROAM_SUBSTATE_DISASSOC_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_REQ, sessionId)
1012#define CSR_IS_ROAM_SUBSTATE_DISASSOC_NO_JOIN(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_NOTHING_TO_JOIN, sessionId)
1013#define CSR_IS_ROAM_SUBSTATE_REASSOC_FAIL(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_REASSOC_FAILURE, sessionId)
1014#define CSR_IS_ROAM_SUBSTATE_DISASSOC_FORCED(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_FORCED, sessionId)
1015#define CSR_IS_ROAM_SUBSTATE_DEAUTH_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DEAUTH_REQ, sessionId)
1016#define CSR_IS_ROAM_SUBSTATE_START_BSS_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_START_BSS_REQ, sessionId)
1017#define CSR_IS_ROAM_SUBSTATE_STOP_BSS_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_STOP_BSS_REQ, sessionId)
1018#define CSR_IS_ROAM_SUBSTATE_DISCONNECT_CONTINUE(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISCONNECT_CONTINUE_ROAMING, sessionId)
Jeff Johnson295189b2012-06-20 16:38:30 -07001019#define CSR_IS_ROAM_SUBSTATE_CONFIG(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_CONFIG, sessionId)
1020#define CSR_IS_ROAM_SUBSTATE_WAITFORKEY(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_WAIT_FOR_KEY, sessionId)
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001021#define CSR_IS_ROAM_SUBSTATE_DISASSOC_HO(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_HANDOFF, sessionId)
1022#define CSR_IS_ROAM_SUBSTATE_HO_NT(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOINED_NO_TRAFFIC, sessionId)
1023#define CSR_IS_ROAM_SUBSTATE_HO_NRT(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOINED_NON_REALTIME_TRAFFIC, sessionId)
1024#define CSR_IS_ROAM_SUBSTATE_HO_RT(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOINED_REALTIME_TRAFFIC, sessionId)
Jeff Johnson295189b2012-06-20 16:38:30 -07001025
1026#define CSR_IS_PHY_MODE_B_ONLY(pMac) \
1027 ((eCSR_DOT11_MODE_11b == (pMac)->roam.configParam.phyMode) ||\
1028 (eCSR_DOT11_MODE_11b_ONLY == (pMac)->roam.configParam.phyMode))
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001029
Jeff Johnson295189b2012-06-20 16:38:30 -07001030#define CSR_IS_PHY_MODE_G_ONLY(pMac) \
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001031 (eCSR_DOT11_MODE_11g == (pMac)->roam.configParam.phyMode || eCSR_DOT11_MODE_11g_ONLY == (pMac)->roam.configParam.phyMode)
1032
Jeff Johnson295189b2012-06-20 16:38:30 -07001033#define CSR_IS_PHY_MODE_A_ONLY(pMac) \
1034 ((eCSR_DOT11_MODE_11a == (pMac)->roam.configParam.phyMode) ||\
1035 (eCSR_DOT11_MODE_11a_ONLY == (pMac)->roam.configParam.phyMode))
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001036
Jeff Johnsone7245742012-09-05 17:12:55 -07001037#ifdef WLAN_FEATURE_11AC
1038#define CSR_IS_PHY_MODE_DUAL_BAND(phyMode) \
1039 ((eCSR_DOT11_MODE_abg & (phyMode)) || (eCSR_DOT11_MODE_11n & (phyMode)) || \
1040 (eCSR_DOT11_MODE_11ac & (phyMode)) || \
1041 (eCSR_DOT11_MODE_TAURUS & (phyMode)) || \
1042 (eCSR_DOT11_MODE_AUTO & (phyMode)))
1043#else
Jeff Johnson295189b2012-06-20 16:38:30 -07001044#define CSR_IS_PHY_MODE_DUAL_BAND(phyMode) \
1045 ((eCSR_DOT11_MODE_abg & (phyMode)) || (eCSR_DOT11_MODE_11n & (phyMode)) || \
1046 (eCSR_DOT11_MODE_TAURUS & (phyMode)) || \
1047 (eCSR_DOT11_MODE_AUTO & (phyMode)))
Jeff Johnsone7245742012-09-05 17:12:55 -07001048#endif
1049
Jeff Johnson295189b2012-06-20 16:38:30 -07001050
1051// this function returns TRUE if the NIC is operating exclusively in the 2.4 GHz band, meaning
1052// it is NOT operating in the 5.0 GHz band.
1053#define CSR_IS_24_BAND_ONLY(pMac) \
1054 (eCSR_BAND_24 == (pMac)->roam.configParam.eBand)
1055
1056#define CSR_IS_5G_BAND_ONLY(pMac) \
1057 (eCSR_BAND_5G == (pMac)->roam.configParam.eBand)
1058
1059#define CSR_IS_RADIO_DUAL_BAND(pMac) \
1060 (eCSR_BAND_ALL == (pMac)->roam.configParam.bandCapability)
1061
1062#define CSR_IS_RADIO_BG_ONLY(pMac) \
1063 (eCSR_BAND_24 == (pMac)->roam.configParam.bandCapability)
1064
1065// this function returns TRUE if the NIC is operating exclusively in the 5.0 GHz band, meaning
1066// it is NOT operating in the 2.4 GHz band
1067#define CSR_IS_RADIO_A_ONLY(pMac) \
1068 (eCSR_BAND_5G == (pMac)->roam.configParam.bandCapability)
1069
1070// this function returns TRUE if the NIC is operating in both bands.
1071#define CSR_IS_OPEARTING_DUAL_BAND(pMac) \
1072 ((eCSR_BAND_ALL == (pMac)->roam.configParam.bandCapability) && (eCSR_BAND_ALL == (pMac)->roam.configParam.eBand))
1073
1074// this function returns TRUE if the NIC can operate in the 5.0 GHz band (could operate in the
1075// 2.4 GHz band also).
1076#define CSR_IS_OPERATING_A_BAND(pMac) \
1077 (CSR_IS_OPEARTING_DUAL_BAND((pMac)) || CSR_IS_RADIO_A_ONLY((pMac)) || CSR_IS_5G_BAND_ONLY((pMac)))
1078
1079// this function returns TRUE if the NIC can operate in the 2.4 GHz band (could operate in the
1080// 5.0 GHz band also).
1081#define CSR_IS_OPERATING_BG_BAND(pMac) \
1082 (CSR_IS_OPEARTING_DUAL_BAND((pMac)) || CSR_IS_RADIO_BG_ONLY((pMac)) || CSR_IS_24_BAND_ONLY((pMac)))
1083
1084#define CSR_IS_CHANNEL_5GHZ(chnNum) \
Jeff Johnsone7245742012-09-05 17:12:55 -07001085 (((chnNum) >= CSR_MIN_5GHz_CHANNEL_NUMBER) && ((chnNum) <= CSR_MAX_5GHz_CHANNEL_NUMBER))
Jeff Johnson295189b2012-06-20 16:38:30 -07001086
Srinivas Girigowdade697412013-02-14 16:31:48 -08001087#define CSR_IS_CHANNEL_DFS(chnNum) \
1088 (NV_CHANNEL_ENABLE != vos_nv_getChannelEnabledState(chnNum))
1089
Jeff Johnson295189b2012-06-20 16:38:30 -07001090#define CSR_IS_CHANNEL_24GHZ(chnNum) \
1091 (((chnNum) > 0) && ((chnNum) <= CSR_MAX_24GHz_CHANNEL_NUMBER))
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001092
Jeff Johnson295189b2012-06-20 16:38:30 -07001093#define CSR_IS_SAME_BAND_CHANNELS(ch1, ch2) (CSR_IS_CHANNEL_5GHZ(ch1) == CSR_IS_CHANNEL_5GHZ(ch2))
1094
1095
1096#define CSR_IS_11D_INFO_FOUND(pMac) \
1097 (0 != (pMac)->scan.channelOf11dInfo)
1098// DEAUTHIND
1099#define CSR_IS_ROAMING(pSession) ((CSR_IS_LOSTLINK_ROAMING((pSession)->roamingReason)) || \
1100 (eCsrDynamicRoaming == (pSession)->roamingReason) || \
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001101 (eCsrReassocRoaming == (pSession)->roamingReason))
Jeff Johnson295189b2012-06-20 16:38:30 -07001102
1103
1104#define CSR_IS_SET_KEY_COMMAND( pCommand ) ( eSmeCommandSetKey == (pCommand)->command )
1105
1106#define CSR_IS_ADDTS_WHEN_ACMOFF_SUPPORTED(pMac) (pMac->roam.configParam.addTSWhenACMIsOff)
1107// DEAUTHIND
1108#define CSR_IS_LOSTLINK_ROAMING(reason) ((eCsrLostlinkRoamingDisassoc == (reason)) || (eCsrLostlinkRoamingDeauth == (reason)))
1109
Venkata Prathyusha Kuntupalli239278b2013-03-26 15:58:18 -07001110#define CSR_IS_ROAMING_COMMAND(pCommand) ((eCsrLostLink1 == (pCommand)->u.roamCmd.roamReason) ||\
1111 (eCsrLostLink2 == (pCommand)->u.roamCmd.roamReason) ||\
1112 (eCsrLostLink3 == (pCommand)->u.roamCmd.roamReason) )
1113
1114
Jeff Johnson295189b2012-06-20 16:38:30 -07001115//Stop CSR from asking for IMPS, This function doesn't disable IMPS from CSR
1116void csrScanSuspendIMPS( tpAniSirGlobal pMac );
1117//Start CSR from asking for IMPS. This function doesn't trigger CSR to request entering IMPS
1118//because IMPS maybe disabled.
1119void csrScanResumeIMPS( tpAniSirGlobal pMac );
1120
1121eHalStatus csrInitGetChannels(tpAniSirGlobal pMac);
Venkata Prathyusha Kuntupalli316247e2013-03-15 17:45:25 -07001122// Getting the 5GHz Channel list
1123eHalStatus csrGet5GChannels(tpAniSirGlobal pMac);
1124// Getting the 2.4GHz Channel list
1125eHalStatus csrGet24GChannels(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -07001126
1127eHalStatus csrSetModifyProfileFields(tpAniSirGlobal pMac, tANI_U32 sessionId,
1128 tCsrRoamModifyProfileFields *pModifyProfileFields);
1129/* ---------------------------------------------------------------------------
1130 \fn csrGetModifyProfileFields
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001131 \brief HDD or SME - QOS calls this function to get the current values of
Jeff Johnson295189b2012-06-20 16:38:30 -07001132 connected profile fields changing which can cause reassoc.
1133 This function must be called after CFG is downloaded and STA is in connected
1134 state.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001135 \param pModifyProfileFields - pointer to the connected profile fields
Jeff Johnson295189b2012-06-20 16:38:30 -07001136 changing which can cause reassoc
1137
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001138 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001139 -------------------------------------------------------------------------------*/
1140eHalStatus csrGetModifyProfileFields(tpAniSirGlobal pMac, tANI_U32 sessionId,
1141 tCsrRoamModifyProfileFields * pModifyProfileFields);
1142void csrSetGlobalCfgs( tpAniSirGlobal pMac );
1143void csrSetDefaultDot11Mode( tpAniSirGlobal pMac );
1144void csrScanSetChannelMask(tpAniSirGlobal pMac, tCsrChannelInfo *pChannelInfo);
1145tANI_BOOLEAN csrIsConnStateDisconnected(tpAniSirGlobal pMac, tANI_U32 sessionId);
1146tANI_BOOLEAN csrIsConnStateConnectedIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1147tANI_BOOLEAN csrIsConnStateDisconnectedIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1148tANI_BOOLEAN csrIsConnStateConnectedInfra( tpAniSirGlobal pMac, tANI_U32 sessionId );
1149tANI_BOOLEAN csrIsConnStateConnected( tpAniSirGlobal pMac, tANI_U32 sessionId );
1150tANI_BOOLEAN csrIsConnStateInfra( tpAniSirGlobal pMac, tANI_U32 sessionId );
1151tANI_BOOLEAN csrIsConnStateIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1152tANI_BOOLEAN csrIsConnStateWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1153tANI_BOOLEAN csrIsConnStateConnectedWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1154tANI_BOOLEAN csrIsConnStateDisconnectedWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1155tANI_BOOLEAN csrIsAnySessionInConnectState( tpAniSirGlobal pMac );
1156tANI_BOOLEAN csrIsAllSessionDisconnected( tpAniSirGlobal pMac );
Madan Mohan Koyyalamudi48081ef2012-12-04 16:49:55 -08001157tANI_BOOLEAN csrIsStaSessionConnected( tpAniSirGlobal pMac );
1158tANI_BOOLEAN csrIsP2pSessionConnected( tpAniSirGlobal pMac );
Madan Mohan Koyyalamudid3d22592012-09-24 14:01:29 -07001159tANI_BOOLEAN csrIsAnySessionConnected( tpAniSirGlobal pMac );
Jeff Johnson295189b2012-06-20 16:38:30 -07001160tANI_BOOLEAN csrIsInfraConnected( tpAniSirGlobal pMac );
1161tANI_BOOLEAN csrIsConcurrentInfraConnected( tpAniSirGlobal pMac );
Jeff Johnsone7245742012-09-05 17:12:55 -07001162tANI_BOOLEAN csrIsConcurrentSessionRunning( tpAniSirGlobal pMac );
Jeff Johnsone7245742012-09-05 17:12:55 -07001163tANI_BOOLEAN csrIsInfraApStarted( tpAniSirGlobal pMac );
Jeff Johnson295189b2012-06-20 16:38:30 -07001164tANI_BOOLEAN csrIsIBSSStarted( tpAniSirGlobal pMac );
1165tANI_BOOLEAN csrIsBTAMPStarted( tpAniSirGlobal pMac );
1166tANI_BOOLEAN csrIsBTAMP( tpAniSirGlobal pMac, tANI_U32 sessionId );
1167eHalStatus csrIsBTAMPAllowed( tpAniSirGlobal pMac, tANI_U32 chnId );
Jeff Johnsone7245742012-09-05 17:12:55 -07001168tANI_BOOLEAN csrIsValidMcConcurrentSession(tpAniSirGlobal pMac, tANI_U32 sessionId,
1169 tSirBssDescription *pBssDesc);
Jeff Johnson295189b2012-06-20 16:38:30 -07001170tANI_BOOLEAN csrIsConnStateConnectedInfraAp( tpAniSirGlobal pMac, tANI_U32 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -07001171/*----------------------------------------------------------------------------
1172 \fn csrRoamRegisterLinkQualityIndCallback
1173
1174 \brief
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001175 a CSR function to allow HDD to register a callback handler with CSR for
1176 link quality indications.
Jeff Johnson295189b2012-06-20 16:38:30 -07001177
1178 Only one callback may be registered at any time.
1179 In order to deregister the callback, a NULL cback may be provided.
1180
1181 Registration happens in the task context of the caller.
1182
1183 \param callback - Call back being registered
1184 \param pContext - user data
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001185
Jeff Johnson295189b2012-06-20 16:38:30 -07001186 DEPENDENCIES: After CSR open
1187
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001188 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001189-----------------------------------------------------------------------------*/
1190eHalStatus csrRoamRegisterLinkQualityIndCallback(tpAniSirGlobal pMac,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001191 csrRoamLinkQualityIndCallback callback,
Jeff Johnson295189b2012-06-20 16:38:30 -07001192 void *pContext);
1193/* ---------------------------------------------------------------------------
1194 \fn csrGetStatistics
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001195 \brief csr function that client calls to register a callback to get
1196 different PHY level statistics from CSR.
1197
Jeff Johnson295189b2012-06-20 16:38:30 -07001198 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
1199 \param statsMask - The different category/categories of stats requester is looking for
1200 \param callback - SME sends back the requested stats using the callback
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001201 \param periodicity - If requester needs periodic update, 0 means it's an one
Jeff Johnson295189b2012-06-20 16:38:30 -07001202 time request
1203 \param cache - If requester is happy with cached stats
1204 \param staId - The station ID for which the stats is requested for
1205 \param pContext - user context to be passed back along with the callback
1206
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001207 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001208 ---------------------------------------------------------------------------*/
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001209eHalStatus csrGetStatistics(tpAniSirGlobal pMac, eCsrStatsRequesterType requesterId,
1210 tANI_U32 statsMask,
1211 tCsrStatsCallback callback,
1212 tANI_U32 periodicity, tANI_BOOLEAN cache,
Jeff Johnson295189b2012-06-20 16:38:30 -07001213 tANI_U8 staId, void *pContext);
1214
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +05301215/* ---------------------------------------------------------------------------
1216 \fn csrGetTLSTAState
1217 \helper function to get the TL STA State whenever the function is called.
1218
1219 \param staId - The staID to be passed to the TL
1220 to get the relevant TL STA State
1221 \return the state as tANI_U16
1222 ---------------------------------------------------------------------------*/
1223tANI_U16 csrGetTLSTAState(tpAniSirGlobal pMac, tANI_U8 staId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001224
1225eHalStatus csrGetRssi(tpAniSirGlobal pMac,tCsrRssiCallback callback,tANI_U8 staId,tCsrBssid bssId,void * pContext,void * pVosContext);
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08001226#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_CCX || defined(FEATURE_WLAN_LFR)
1227eHalStatus csrGetRoamRssi(tpAniSirGlobal pMac,
1228 tCsrRssiCallback callback,
1229 tANI_U8 staId,
1230 tCsrBssid bssId,
1231 void * pContext,
1232 void * pVosContext);
1233#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001234eHalStatus csrRoamRegisterCallback(tpAniSirGlobal pMac, csrRoamCompleteCallback callback, void *pContext);
1235/* ---------------------------------------------------------------------------
1236 \fn csrGetConfigParam
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001237 \brief HDD calls this function to get the global settings currently maintained by CSR.
Jeff Johnson295189b2012-06-20 16:38:30 -07001238 \param pParam - caller allocated memory
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001239 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001240 -------------------------------------------------------------------------------*/
1241eHalStatus csrGetConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam);
1242
1243/* ---------------------------------------------------------------------------
1244 \fn csrMsgProcessor
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001245 \brief HDD calls this function to change some global settings.
Jeff Johnson295189b2012-06-20 16:38:30 -07001246 caller must set the all fields or call csrGetConfigParam to prefill the fields.
1247 \param pParam - caller allocated memory
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001248 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001249 -------------------------------------------------------------------------------*/
1250eHalStatus csrChangeDefaultConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam);
1251
1252
1253/* ---------------------------------------------------------------------------
1254 \fn csrMsgProcessor
1255 \brief HDD calls this function for the messages that are handled by CSR.
1256 \param pMsgBuf - a pointer to a buffer that maps to various structures base on the message type.
1257 The beginning of the buffer can always map to tSirSmeRsp.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001258 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001259 -------------------------------------------------------------------------------*/
1260eHalStatus csrMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf );
1261
1262/* ---------------------------------------------------------------------------
1263 \fn csrOpen
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001264 \brief This function must be called before any API call to CSR.
1265 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001266 -------------------------------------------------------------------------------*/
1267eHalStatus csrOpen(tpAniSirGlobal pMac);
1268/* ---------------------------------------------------------------------------
1269 \fn csrClose
1270 \brief To close down CSR module. There should not be any API call into CSR after calling this function.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001271 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001272 -------------------------------------------------------------------------------*/
1273eHalStatus csrClose(tpAniSirGlobal pMac);
1274/* ---------------------------------------------------------------------------
1275 \fn csrStart
1276 \brief To start CSR.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001277 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001278 -------------------------------------------------------------------------------*/
1279eHalStatus csrStart(tpAniSirGlobal pMac);
1280/* ---------------------------------------------------------------------------
1281 \fn csrStop
1282 \brief To stop CSR. CSR still keeps its current setting.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001283 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001284 -------------------------------------------------------------------------------*/
1285eHalStatus csrStop(tpAniSirGlobal pMac);
1286/* ---------------------------------------------------------------------------
1287 \fn csrReady
1288 \brief To let CSR is ready to operate
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001289 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001290 -------------------------------------------------------------------------------*/
1291eHalStatus csrReady(tpAniSirGlobal pMac);
1292
1293#ifdef FEATURE_WLAN_WAPI
1294eHalStatus csrRoamGetBKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pNum,
1295 tBkidCacheInfo *pBkidCache);
1296
1297
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001298eHalStatus csrScanGetBKIDCandidateList(tpAniSirGlobal pMac, tANI_U32 sessionId,
Jeff Johnson295189b2012-06-20 16:38:30 -07001299 tBkidCandidateInfo *pBkidList, tANI_U32 *pNumItems );
1300tANI_U32 csrRoamGetNumBKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId);
1301eHalStatus csrRoamSetBKIDCache( tpAniSirGlobal pMac, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
1302 tANI_U32 numItems );
1303/* ---------------------------------------------------------------------------
1304 \fn csrRoamGetWapiReqIE
1305 \brief return the WAPI IE CSR passes to PE to JOIN request or START_BSS request
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001306 \param pLen - caller allocated memory that has the length of pBuf as input. Upon returned, *pLen has the
Jeff Johnson295189b2012-06-20 16:38:30 -07001307 needed or IE length in pBuf.
1308 \param pBuf - Caller allocated memory that contain the IE field, if any, upon return
1309 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
1310 -------------------------------------------------------------------------------*/
1311eHalStatus csrRoamGetWapiReqIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf);
1312
1313/* ---------------------------------------------------------------------------
1314 \fn csrRoamGetWapiRspIE
1315 \brief return the WAPI IE from the beacon or probe rsp if connected
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001316 \param pLen - caller allocated memory that has the length of pBuf as input. Upon returned, *pLen has the
Jeff Johnson295189b2012-06-20 16:38:30 -07001317 needed or IE length in pBuf.
1318 \param pBuf - Caller allocated memory that contain the IE field, if any, upon return
1319 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
1320 -------------------------------------------------------------------------------*/
1321eHalStatus csrRoamGetWapiRspIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf);
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001322tANI_U8 csrConstructWapiIe( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
Jeff Johnson295189b2012-06-20 16:38:30 -07001323 tSirBssDescription *pSirBssDesc, tDot11fBeaconIEs *pIes, tCsrWapiIe *pWapiIe );
1324#endif /* FEATURE_WLAN_WAPI */
1325
Jeff Johnson295189b2012-06-20 16:38:30 -07001326eHalStatus csrRoamUpdateAPWPSIE( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirAPWPSIEs *pAPWPSIES );
1327eHalStatus csrRoamUpdateWPARSNIEs( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirRSNie * pAPSirRSNie);
Jeff Johnson295189b2012-06-20 16:38:30 -07001328void csrSetCfgPrivacy( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy );
1329tANI_S8 csrGetInfraSessionId( tpAniSirGlobal pMac );
1330tANI_U8 csrGetInfraOperationChannel( tpAniSirGlobal pMac, tANI_U8 sessionId);
1331tANI_U8 csrGetConcurrentOperationChannel( tpAniSirGlobal pMac );
1332
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001333eHalStatus csrRoamCopyConnectProfile(tpAniSirGlobal pMac, tANI_U32 sessionId,
Jeff Johnson295189b2012-06-20 16:38:30 -07001334 tCsrRoamConnectedProfile *pProfile);
1335tANI_BOOLEAN csrIsSetKeyAllowed(tpAniSirGlobal pMac, tANI_U32 sessionId);
1336
1337void csrSetOppositeBandChannelInfo( tpAniSirGlobal pMac );
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001338void csrConstructCurrentValidChannelList( tpAniSirGlobal pMac, tDblLinkList *pChannelSetList,
Jeff Johnson295189b2012-06-20 16:38:30 -07001339 tANI_U8 *pChannelList, tANI_U8 bSize, tANI_U8 *pNumChannels );
Srikant Kuppa066904f2013-05-07 13:56:02 -07001340eHalStatus csrScanSavePreferredNetworkFound(tpAniSirGlobal pMac,
1341 tSirPrefNetworkFoundInd *pPrefNetworkFoundInd);
Jeff Johnson295189b2012-06-20 16:38:30 -07001342#endif
1343
1344#ifdef WLAN_FEATURE_VOWIFI_11R
1345//Returns whether the current association is a 11r assoc or not
1346tANI_BOOLEAN csrRoamIs11rAssoc(tpAniSirGlobal pMac);
1347#endif
1348
1349#ifdef FEATURE_WLAN_CCX
1350//Returns whether the current association is a CCX assoc or not
1351tANI_BOOLEAN csrRoamIsCCXAssoc(tpAniSirGlobal pMac);
1352#endif
1353
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001354//Remove this code once SLM_Sessionization is supported
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001355//BMPS_WORKAROUND_NOT_NEEDED
Jeff Johnson295189b2012-06-20 16:38:30 -07001356void csrDisconnectAllActiveSessions(tpAniSirGlobal pMac);
Mohit Khanna349bc392012-09-11 17:24:52 -07001357
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001358#ifdef FEATURE_WLAN_LFR
1359//Returns whether "Legacy Fast Roaming" is enabled...or not
Madan Mohan Koyyalamudi03aae5f2012-11-28 01:51:22 +05301360tANI_BOOLEAN csrRoamIsFastRoamEnabled(tpAniSirGlobal pMac, tANI_U32 sessionId);
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001361#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1362tANI_BOOLEAN csrRoamIsRoamOffloadScanEnabled(tpAniSirGlobal pMac);
1363#endif
Madan Mohan Koyyalamudi470d2cf2012-09-28 14:43:44 -07001364tANI_BOOLEAN csrIsChannelPresentInList( tANI_U8 *pChannelList, int numChannels, tANI_U8 channel );
1365VOS_STATUS csrAddToChannelListFront( tANI_U8 *pChannelList, int numChannels, tANI_U8 channel );
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001366#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1367eHalStatus csrScanRequestLfrResult(tpAniSirGlobal pMac, tANI_U32 sessionId,
1368 csrScanCompleteCallback callback, void *pContext);
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07001369eHalStatus csrRoamOffloadScanRspHdlr(tpAniSirGlobal pMac, tANI_U8 reason);
1370eHalStatus csrHandoffRequest(tpAniSirGlobal pMac, tCsrHandoffRequest *pHandoffInfo);
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001371#endif
1372tANI_BOOLEAN csrRoamIsStaMode(tpAniSirGlobal pMac, tANI_U32 sessionId);
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001373#endif
1374