blob: 84d3bd2ff591dc7321d6f47000aad7c6e1c1fe80 [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 Girigowdaad34ca92013-10-22 10:54:29 -0700629 tANI_BOOLEAN isWESModeEnabled;
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700630 tANI_BOOLEAN nRoamScanControl;
Varun Reddy Yeturu920df212013-05-22 08:07:23 -0700631 tANI_U8 nProbes;
632 tANI_U16 nRoamScanHomeAwayTime;
Jeff Johnson295189b2012-06-20 16:38:30 -0700633#endif
634
635#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
636 tCsrNeighborRoamConfig neighborRoamConfig;
637#endif
638
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800639 /* Instead of Reassoc, send ADDTS/DELTS even when ACM is off for that AC
Jeff Johnson295189b2012-06-20 16:38:30 -0700640 * This is mandated by WMM-AC certification */
641 tANI_BOOLEAN addTSWhenACMIsOff;
642
643 tANI_BOOLEAN fValidateList;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800644 //Remove this code once SLM_Sessionization is supported
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -0700645 //BMPS_WORKAROUND_NOT_NEEDED
Jeff Johnsone7245742012-09-05 17:12:55 -0700646 tANI_BOOLEAN doBMPSWorkaround;
Jeff Johnson295189b2012-06-20 16:38:30 -0700647
648 //To enable/disable scanning 2.4Ghz channels twice on a single scan request from HDD
649 tANI_BOOLEAN fScanTwice;
Jeff Johnsone7245742012-09-05 17:12:55 -0700650#ifdef WLAN_FEATURE_11AC
651 tANI_U32 nVhtChannelWidth;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -0800652 tANI_U8 txBFEnable;
Shailender Karmuchicc3fe442013-02-16 18:18:33 -0800653 tANI_U8 txBFCsnValue;
Ravi Joshi83bfaa12013-05-28 22:12:08 -0700654 tANI_BOOLEAN enableVhtFor24GHz;
Jeff Johnsone7245742012-09-05 17:12:55 -0700655#endif
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -0800656 tANI_U8 txLdpcEnable;
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;
krunal soni5afa96c2013-09-06 22:19:02 -0700662 tANI_U8 isAmsduSupportInAMPDU;
Jeff Johnson295189b2012-06-20 16:38:30 -0700663}tCsrConfig;
664
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800665typedef struct tagCsrChannelPowerInfo
Jeff Johnson295189b2012-06-20 16:38:30 -0700666{
667 tListElem link;
668 tANI_U8 firstChannel;
669 tANI_U8 numChannels;
670 tANI_U8 txPower;
671 tANI_U8 interChannelOffset;
672}tCsrChannelPowerInfo;
673
674typedef struct tagRoamJoinStatus
675{
676 tSirResultCodes statusCode;
677 //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 -0800678 tANI_U32 reasonCode;
Kiran Kumar Lokerec8550fa2013-04-15 22:23:00 -0700679 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -0700680}tCsrRoamJoinStatus;
681
682typedef struct tagCsrOsChannelMask
683{
684 tANI_U8 numChannels;
685 tANI_BOOLEAN scanEnabled[WNI_CFG_VALID_CHANNEL_LIST_LEN];
686 tANI_U8 channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
687}tCsrOsChannelMask;
688
689
690typedef struct tagCsrScanStruct
691{
692 tScanProfile scanProfile;
693 tANI_U32 nextScanID;
Madan Mohan Koyyalamudica43cdf2012-09-24 13:15:49 -0700694 tDblLinkList scanResultList;
Jeff Johnson295189b2012-06-20 16:38:30 -0700695 tDblLinkList tempScanResults;
696 tANI_BOOLEAN fScanEnable;
697 tANI_BOOLEAN fFullScanIssued;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530698 vos_timer_t hTimerGetResult;
Jeff Johnson295189b2012-06-20 16:38:30 -0700699#ifdef WLAN_AP_STA_CONCURRENCY
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530700 vos_timer_t hTimerStaApConcTimer;
Jeff Johnson295189b2012-06-20 16:38:30 -0700701#endif
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530702 vos_timer_t hTimerIdleScan;
703 vos_timer_t hTimerResultAging;
704 vos_timer_t hTimerResultCfgAging;
Jeff Johnson295189b2012-06-20 16:38:30 -0700705 tPalTimerHandle hTimerBgScan;
706 //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 -0800707 tANI_U8 channelOf11dInfo;
708 tANI_U8 scanResultCfgAgingTime;
Jeff Johnson295189b2012-06-20 16:38:30 -0700709 //changes on every scan, a flag to tell whether conflict 11d info found on each BSS
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800710 tANI_BOOLEAN fAmbiguous11dInfoFound;
Jeff Johnson295189b2012-06-20 16:38:30 -0700711 //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 -0800712 tANI_BOOLEAN fCurrent11dInfoMatch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700713 tANI_BOOLEAN f11dInfoReset; //to indicate whether the 11d info in CFG is reset to default
714 tSirScanType curScanType;
715 tCsrChannel baseChannels; //This are all the supported channels AND(&) to the current eBand
716 tCsrChannel channels11d;
717 tChannelListWithPower defaultPowerTable[WNI_CFG_VALID_CHANNEL_LIST_LEN]; //From NV
718 tChannelListWithPower defaultPowerTable40MHz[WNI_CFG_VALID_CHANNEL_LIST_LEN]; //From NV
719 tANI_U32 numChannelsDefault; //total channels of NV
720 tCsrChannel base20MHzChannels; //The channel base to work on
721 tCsrChannel base40MHzChannels; //center channels for 40MHz channels
722 tDblLinkList channelPowerInfoList24;
723 tDblLinkList channelPowerInfoList5G;
724 tANI_U32 nLastAgeTimeOut;
725 tANI_U32 nAgingCountDown;
Gopichand Nakkala114718f2013-03-25 19:19:46 -0700726 tANI_U8 countryCodeDefault[WNI_CFG_COUNTRY_CODE_LEN]; //The country code from NV
727 tANI_U8 countryCodeCurrent[WNI_CFG_COUNTRY_CODE_LEN];
728 tANI_U8 countryCode11d[WNI_CFG_COUNTRY_CODE_LEN];
Jeff Johnson295189b2012-06-20 16:38:30 -0700729 v_REGDOMAIN_t domainIdDefault; //default regulatory domain
730 v_REGDOMAIN_t domainIdCurrent; //current regulatory domain
Agarwal Ashishd9d72602013-09-13 00:06:17 +0530731 tCsrBssid currentCountryBssid; // Bssid for current country code
Jeff Johnson295189b2012-06-20 16:38:30 -0700732 tANI_BOOLEAN f11dInfoApplied;
733 tANI_BOOLEAN fCancelIdleScan;
734#ifdef FEATURE_WLAN_WAPI
735// tANI_U16 NumBkidCandidate;
736// tBkidCandidateInfo BkidCandidateInfo[CSR_MAX_BKID_ALLOWED]; /* Move this as part of SessionEntry */
737#endif /* FEATURE_WLAN_WAPI */
738 tANI_U8 numBGScanChannel; //number of valid channels in the bgScanChannelList
739 tANI_U8 bgScanChannelList[WNI_CFG_BG_SCAN_CHANNEL_LIST_LEN];
740 //the ChannelInfo member is not used in this structure.
741 //numBGScanChannel and bgScanChannelList are used for the BG scan channel info
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800742 tCsrBGScanRequest bgScanParams;
Jeff Johnson295189b2012-06-20 16:38:30 -0700743 tANI_BOOLEAN fRestartIdleScan;
744 tANI_U32 nIdleScanTimeGap; //the time since last trying to trigger idle scan
745 tCsrOsChannelMask osScanChannelMask;//keep a track of channels to be scnned while in traffic condition
746 tANI_U16 nBssLimit; //the maximum number of BSS in scan cache
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800747 /*channelPowerInfoList24 has been seen corrupted. Set this flag to true trying to
Jeff Johnson295189b2012-06-20 16:38:30 -0700748 * detect when it happens. Adding this into code because we can't reproduce it easily.
749 * We don't know when it happens. */
750 tANI_BOOLEAN fValidateList;
751 /*Customer wants to start with an active scan based on the default country code.
752 * This optimization will minimize the driver load to association time.
753 * Based on this flag we will bypass the initial passive scan needed for 11d
754 * to determine the country code & domain */
755 tANI_BOOLEAN fEnableBypass11d;
756
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800757 /*Customer wants to optimize the scan time. Avoiding scans(passive) on DFS
758 * channels while swipping through both bands can save some time
Jeff Johnson295189b2012-06-20 16:38:30 -0700759 * (apprx 1.3 sec) */
760 tANI_BOOLEAN fEnableDFSChnlScan;
761
Jeff Johnsone7245742012-09-05 17:12:55 -0700762 /*
763 * To enable/disable scanning only 2.4Ghz channels on first scan
764 */
765 tANI_BOOLEAN fFirstScanOnly2GChnl;
766
Jeff Johnson295189b2012-06-20 16:38:30 -0700767 tANI_BOOLEAN fDropScanCmd; //true means we don't accept scan commands
768
769#ifdef WLAN_AP_STA_CONCURRENCY
770 tDblLinkList scanCmdPendingList;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800771#endif
Madan Mohan Koyyalamudi470d2cf2012-09-28 14:43:44 -0700772 tCsrChannel occupiedChannels; //This includes all channels on which candidate APs are found
Jeff Johnson295189b2012-06-20 16:38:30 -0700773}tCsrScanStruct;
774
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800775#ifdef FEATURE_WLAN_TDLS_INTERNAL
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800776/*
777 * struct to carry TDLS discovery info..
778 */
779typedef struct sCsrTdlsContext
780{
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800781 tDblLinkList tdlsPotentialPeerList ;
782 tANI_U16 tdlsCommonFlag ;
783 tANI_U16 tdlsCommonState ;
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800784 tANI_U16 tdlsPeerCount ;
785}tCsrTdlsCtxStruct;
786
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800787typedef struct sCsrTdlsPeerLinkInfo
788{
789 tListElem tdlsPeerStaLink ;
790 tSirTdlsPeerInfo tdlsDisPeerInfo ;
791}tCsrTdlsPeerLinkinfo ;
792#endif
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800793
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800794
795
Jeff Johnson295189b2012-06-20 16:38:30 -0700796
797//Save the connected information. This structure + connectedProfile
798//should contain all information about the connection
799typedef struct tagRoamCsrConnectedInfo
800{
801 tANI_U32 nBeaconLength; //the length, in bytes, of the beacon frame, can be 0
802 tANI_U32 nAssocReqLength; //the length, in bytes, of the assoc req frame, can be 0
803 tANI_U32 nAssocRspLength; //The length, in bytes, of the assoc rsp frame, can be 0
804#ifdef WLAN_FEATURE_VOWIFI_11R
805 tANI_U32 nRICRspLength; //Length of the parsed RIC response IEs received in reassoc response
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800806#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700807#ifdef FEATURE_WLAN_CCX
808 tANI_U32 nTspecIeLength;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800809#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700810 tANI_U8 *pbFrames; //Point to a buffer contain the beacon, assoc req, assoc rsp frame, in that order
811 //user needs to use nBeaconLength, nAssocReqLength, nAssocRspLength to desice where
812 //each frame starts and ends.
813 tANI_U8 staId;
814}tCsrRoamConnectedInfo;
815
816
817typedef struct tagCsrLinkQualityIndInfo
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800818{
Jeff Johnson295189b2012-06-20 16:38:30 -0700819 csrRoamLinkQualityIndCallback callback;
820 void *context;
821}tCsrLinkQualityIndInfo;
822
823typedef struct tagCsrPeStatsReqInfo
824{
825 tListElem link; /* list links */
826 tANI_U32 statsMask;
827 tANI_U32 periodicity;
828 tANI_BOOLEAN rspPending;
829 vos_timer_t hPeStatsTimer;
830 tANI_BOOLEAN timerRunning;
831 tANI_U8 staId;
832 tANI_U8 numClient;
833 tpAniSirGlobal pMac;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800834 /* To remember if the peStats timer is stopped successfully or not */
Jeff Johnson295189b2012-06-20 16:38:30 -0700835 tANI_BOOLEAN timerStopFailed;
836
837}tCsrPeStatsReqInfo;
838
839typedef struct tagCsrStatsClientReqInfo
840{
841 tListElem link; /* list links */
842 eCsrStatsRequesterType requesterId;
843 tCsrStatsCallback callback;
844 tANI_U32 periodicity;
845 void *pContext;
846 tANI_U32 statsMask;
847 tCsrPeStatsReqInfo *pPeStaEntry;
848 tANI_U8 staId;
849 vos_timer_t timer;
850 tANI_BOOLEAN timerExpired;
851 tpAniSirGlobal pMac; // TODO: Confirm this change BTAMP
852}tCsrStatsClientReqInfo;
853
854typedef struct tagCsrTlStatsReqInfo
855{
856 tANI_U32 periodicity;
857 tANI_BOOLEAN timerRunning;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530858 vos_timer_t hTlStatsTimer;
Jeff Johnson295189b2012-06-20 16:38:30 -0700859 tANI_U8 numClient;
860}tCsrTlStatsReqInfo;
861
862typedef struct tagCsrRoamSession
863{
864 tANI_U8 sessionId; // Session ID
865 tANI_BOOLEAN sessionActive; // TRUE if it is used
866 tCsrBssid selfMacAddr; // For BT-AMP station, this serve as BSSID for self-BSS.
867 csrRoamCompleteCallback callback;
868 void *pContext;
869 eCsrConnectState connectState;
870 tCsrRoamConnectedProfile connectedProfile;
871 tCsrRoamConnectedInfo connectedInfo;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800872 tCsrRoamProfile *pCurRoamProfile;
Jeff Johnson295189b2012-06-20 16:38:30 -0700873 tSirBssDescription *pConnectBssDesc;
874 tANI_U16 NumPmkidCache;
875 tPmkidCacheInfo PmkidCacheInfo[CSR_MAX_PMKID_ALLOWED];
876 tANI_U8 cJoinAttemps;
877 //This may or may not have the up-to-date valid channel list
878 //It is used to get WNI_CFG_VALID_CHANNEL_LIST and not allocate memory all the time
879 tSirMacChanNum validChannelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
880 tANI_S32 sPendingCommands; //0 means CSR is ok to low power
881#ifdef FEATURE_WLAN_WAPI
882 tANI_U16 NumBkidCache;
883 tBkidCacheInfo BkidCacheInfo[CSR_MAX_BKID_ALLOWED];
884#endif /* FEATURE_WLAN_WAPI */
885 tANI_BOOLEAN fRoaming; //indicate whether CSR is roaming (either via lostlink or dynamic roaming)
886 //to remember some parameters needed for START_BSS.
887 //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 -0800888 tCsrRoamStartBssParams bssParams;
Jeff Johnson295189b2012-06-20 16:38:30 -0700889 tANI_U32 nWpaRsnReqIeLength; //the byte count of pWpaRsnIE;
890 tANI_U8 *pWpaRsnReqIE; //this contain the WPA/RSN IE in assoc request or the one sent in beacon (IBSS)
891 tANI_U32 nWpaRsnRspIeLength; //the byte count for pWpaRsnRspIE
892 tANI_U8 *pWpaRsnRspIE; //this contain the WPA/RSN IE in beacon/probe rsp
893#ifdef FEATURE_WLAN_WAPI
894 tANI_U32 nWapiReqIeLength; //the byte count of pWapiReqIE;
895 tANI_U8 *pWapiReqIE; //this contain the WAPI IE in assoc request or the one sent in beacon (IBSS)
896 tANI_U32 nWapiRspIeLength; //the byte count for pWapiRspIE
897 tANI_U8 *pWapiRspIE; //this contain the WAPI IE in beacon/probe rsp
898#endif /* FEATURE_WLAN_WAPI */
899 tANI_U32 nAddIEScanLength; //the byte count of pAddIeScanIE;
900 tANI_U8 *pAddIEScan; //this contains the additional IE in (unicast) probe request at the time of join
901 tANI_U32 nAddIEAssocLength; //the byte count for pAddIeAssocIE
902 tANI_U8 *pAddIEAssoc; //this contains the additional IE in (re) assoc request
903
904 tANI_TIMESTAMP roamingStartTime; //in units of 10ms
905 tCsrTimerInfo roamingTimerInfo;
906 eCsrRoamingReason roamingReason;
907 tANI_BOOLEAN fCancelRoaming;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530908 vos_timer_t hTimerRoaming;
Jeff Johnson295189b2012-06-20 16:38:30 -0700909 eCsrRoamResult roamResult; //the roamResult that is used when the roaming timer fires
910 tCsrRoamJoinStatus joinFailStatusCode; //This is the reason code for join(assoc) failure
911 //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 -0800912 tANI_U32 roamingStatusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700913 tANI_U16 NumPmkidCandidate;
914 tPmkidCandidateInfo PmkidCandidateInfo[CSR_MAX_PMKID_ALLOWED];
915 #ifdef FEATURE_WLAN_WAPI
916 tANI_U16 NumBkidCandidate;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800917 tBkidCandidateInfo BkidCandidateInfo[CSR_MAX_BKID_ALLOWED];
Jeff Johnson295189b2012-06-20 16:38:30 -0700918#endif
919 tANI_BOOLEAN fWMMConnection;
920#ifdef FEATURE_WLAN_BTAMP_UT_RF
921 //To retry a join later when it fails if so desired
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530922 vos_timer_t hTimerJoinRetry;
Jeff Johnson295189b2012-06-20 16:38:30 -0700923 tCsrTimerInfo joinRetryTimerInfo;
924 tANI_U32 maxRetryCount;
925#endif
926#ifdef FEATURE_WLAN_CCX
927 tCsrCcxCckmInfo ccxCckmInfo;
928 tANI_BOOLEAN isPrevApInfoValid;
929 tSirMacSSid prevApSSID;
930 tCsrBssid prevApBssid;
931 tANI_U8 prevOpChannel;
932 tANI_U16 clientDissSecs;
933 tANI_U32 roamTS1;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700934#if defined(FEATURE_WLAN_CCX_UPLOAD)
935 tCsrCcxCckmIe suppCckmIeInfo;
936#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700937#endif
938 tANI_U8 bRefAssocStartCnt; //Tracking assoc start indication
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800939 /* to force the AP initiate fresh 802.1x authentication after re-association need to clear
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700940 * the PMKID cache. To clear the cache in this particular case this is added
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800941 * it is needed by the HS 2.0 passpoint certification 5.2.a and b testcases */
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700942 tANI_BOOLEAN fIgnorePMKIDCache;
Jeff Johnson295189b2012-06-20 16:38:30 -0700943} tCsrRoamSession;
944
945typedef struct tagCsrRoamStruct
946{
947 tANI_U32 nextRoamId;
948 tDblLinkList roamCmdPendingList;
949 tDblLinkList channelList5G;
950 tDblLinkList channelList24;
951 tCsrConfig configParam;
952 tANI_U32 numChannelsEeprom; //total channels of eeprom
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800953 tCsrChannel base20MHzChannels; //The channel base to work on
954 tCsrChannel base40MHzChannels; //center channels for 40MHz channels
955 eCsrRoamState curState[CSR_ROAM_SESSION_MAX];
Jeff Johnson295189b2012-06-20 16:38:30 -0700956 eCsrRoamSubState curSubState[CSR_ROAM_SESSION_MAX];
957 //This may or may not have the up-to-date valid channel list
958 //It is used to get WNI_CFG_VALID_CHANNEL_LIST and not allocate memory all the time
959 tSirMacChanNum validChannelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
960 tANI_U32 numValidChannels; //total number of channels in CFG
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800961
Jeff Johnson295189b2012-06-20 16:38:30 -0700962 tANI_S32 sPendingCommands;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530963 vos_timer_t hTimerWaitForKey; //To support timeout for WaitForKey state
Jeff Johnson295189b2012-06-20 16:38:30 -0700964 tCsrSummaryStatsInfo summaryStatsInfo;
965 tCsrGlobalClassAStatsInfo classAStatsInfo;
966 tCsrGlobalClassBStatsInfo classBStatsInfo;
967 tCsrGlobalClassCStatsInfo classCStatsInfo;
968 tCsrGlobalClassDStatsInfo classDStatsInfo;
969 tCsrPerStaStatsInfo perStaStatsInfo[CSR_MAX_STA];
970 tDblLinkList statsClientReqList;
971 tDblLinkList peStatsReqList;
972 tCsrTlStatsReqInfo tlStatsReqInfo;
973 eCsrRoamLinkQualityInd vccLinkQuality;
974 tCsrLinkQualityIndInfo linkQualityIndInfo;
975 v_CONTEXT_t gVosContext; //used for interaction with TL
976 //To specify whether an association or a IBSS is WMM enabled
977 //This parameter is only valid during a join or start BSS command is being executed
978 //tANI_BOOLEAN fWMMConnection; /* Moving it to be part of roamsession */
979 v_U8_t ucACWeights[WLANTL_MAX_AC];
980 /* TODO : Upto here */
981 tCsrTimerInfo WaitForKeyTimerInfo;
982 tCsrRoamSession *roamSession;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800983 tANI_U32 transactionId; // Current transaction ID for internal use.
984#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Jeff Johnson295189b2012-06-20 16:38:30 -0700985 tCsrNeighborRoamControlInfo neighborRoamInfo;
986#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700987#ifdef FEATURE_WLAN_LFR
988 tANI_U8 isFastRoamIniFeatureEnabled;
989#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700990#ifdef FEATURE_WLAN_CCX
991 tANI_U8 isCcxIniFeatureEnabled;
992#endif
Jeff Johnson43971f52012-07-17 12:26:56 -0700993#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700994 tANI_U8 RoamRssiDiff;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -0700995 tANI_BOOLEAN isWESModeEnabled;
Jeff Johnson43971f52012-07-17 12:26:56 -0700996#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700997}tCsrRoamStruct;
998
999
1000#define GET_NEXT_ROAM_ID(pRoamStruct) (((pRoamStruct)->nextRoamId + 1 == 0) ? 1 : (pRoamStruct)->nextRoamId)
1001#define CSR_IS_ROAM_STATE(pMac, state, sessionId) ( (state) == (pMac)->roam.curState[sessionId] )
1002
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001003#define CSR_IS_ROAM_STOP(pMac, sessionId) CSR_IS_ROAM_STATE( (pMac), eCSR_ROAMING_STATE_STOP, sessionId )
1004#define CSR_IS_ROAM_INIT(pMac, sessionId) CSR_IS_ROAM_STATE( (pMac), eCSR_ROAMING_STATE_INIT, sessionId )
Jeff Johnson295189b2012-06-20 16:38:30 -07001005#define CSR_IS_ROAM_SCANNING(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_SCANNING, sessionId )
1006#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 -08001007#define CSR_IS_ROAM_IDLE(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_IDLE, sessionId )
Jeff Johnson295189b2012-06-20 16:38:30 -07001008#define CSR_IS_ROAM_JOINED(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_JOINED, sessionId )
1009
1010#define CSR_IS_ROAM_SUBSTATE(pMac, subState, sessionId) ((subState) == (pMac)->roam.curSubState[sessionId])
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001011#define CSR_IS_ROAM_SUBSTATE_JOIN_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOIN_REQ, sessionId)
1012#define CSR_IS_ROAM_SUBSTATE_AUTH_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_AUTH_REQ, sessionId)
1013#define CSR_IS_ROAM_SUBSTATE_REASSOC_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_REASSOC_REQ, sessionId)
1014#define CSR_IS_ROAM_SUBSTATE_DISASSOC_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_REQ, sessionId)
1015#define CSR_IS_ROAM_SUBSTATE_DISASSOC_NO_JOIN(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_NOTHING_TO_JOIN, sessionId)
1016#define CSR_IS_ROAM_SUBSTATE_REASSOC_FAIL(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_REASSOC_FAILURE, sessionId)
1017#define CSR_IS_ROAM_SUBSTATE_DISASSOC_FORCED(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_FORCED, sessionId)
1018#define CSR_IS_ROAM_SUBSTATE_DEAUTH_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DEAUTH_REQ, sessionId)
1019#define CSR_IS_ROAM_SUBSTATE_START_BSS_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_START_BSS_REQ, sessionId)
1020#define CSR_IS_ROAM_SUBSTATE_STOP_BSS_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_STOP_BSS_REQ, sessionId)
1021#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 -07001022#define CSR_IS_ROAM_SUBSTATE_CONFIG(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_CONFIG, sessionId)
1023#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 -08001024#define CSR_IS_ROAM_SUBSTATE_DISASSOC_HO(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_HANDOFF, sessionId)
1025#define CSR_IS_ROAM_SUBSTATE_HO_NT(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOINED_NO_TRAFFIC, sessionId)
1026#define CSR_IS_ROAM_SUBSTATE_HO_NRT(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOINED_NON_REALTIME_TRAFFIC, sessionId)
1027#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 -07001028
1029#define CSR_IS_PHY_MODE_B_ONLY(pMac) \
1030 ((eCSR_DOT11_MODE_11b == (pMac)->roam.configParam.phyMode) ||\
1031 (eCSR_DOT11_MODE_11b_ONLY == (pMac)->roam.configParam.phyMode))
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001032
Jeff Johnson295189b2012-06-20 16:38:30 -07001033#define CSR_IS_PHY_MODE_G_ONLY(pMac) \
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001034 (eCSR_DOT11_MODE_11g == (pMac)->roam.configParam.phyMode || eCSR_DOT11_MODE_11g_ONLY == (pMac)->roam.configParam.phyMode)
1035
Jeff Johnson295189b2012-06-20 16:38:30 -07001036#define CSR_IS_PHY_MODE_A_ONLY(pMac) \
1037 ((eCSR_DOT11_MODE_11a == (pMac)->roam.configParam.phyMode) ||\
1038 (eCSR_DOT11_MODE_11a_ONLY == (pMac)->roam.configParam.phyMode))
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001039
Jeff Johnsone7245742012-09-05 17:12:55 -07001040#ifdef WLAN_FEATURE_11AC
1041#define CSR_IS_PHY_MODE_DUAL_BAND(phyMode) \
1042 ((eCSR_DOT11_MODE_abg & (phyMode)) || (eCSR_DOT11_MODE_11n & (phyMode)) || \
1043 (eCSR_DOT11_MODE_11ac & (phyMode)) || \
1044 (eCSR_DOT11_MODE_TAURUS & (phyMode)) || \
1045 (eCSR_DOT11_MODE_AUTO & (phyMode)))
1046#else
Jeff Johnson295189b2012-06-20 16:38:30 -07001047#define CSR_IS_PHY_MODE_DUAL_BAND(phyMode) \
1048 ((eCSR_DOT11_MODE_abg & (phyMode)) || (eCSR_DOT11_MODE_11n & (phyMode)) || \
1049 (eCSR_DOT11_MODE_TAURUS & (phyMode)) || \
1050 (eCSR_DOT11_MODE_AUTO & (phyMode)))
Jeff Johnsone7245742012-09-05 17:12:55 -07001051#endif
1052
Jeff Johnson295189b2012-06-20 16:38:30 -07001053
1054// this function returns TRUE if the NIC is operating exclusively in the 2.4 GHz band, meaning
1055// it is NOT operating in the 5.0 GHz band.
1056#define CSR_IS_24_BAND_ONLY(pMac) \
1057 (eCSR_BAND_24 == (pMac)->roam.configParam.eBand)
1058
1059#define CSR_IS_5G_BAND_ONLY(pMac) \
1060 (eCSR_BAND_5G == (pMac)->roam.configParam.eBand)
1061
1062#define CSR_IS_RADIO_DUAL_BAND(pMac) \
1063 (eCSR_BAND_ALL == (pMac)->roam.configParam.bandCapability)
1064
1065#define CSR_IS_RADIO_BG_ONLY(pMac) \
1066 (eCSR_BAND_24 == (pMac)->roam.configParam.bandCapability)
1067
1068// this function returns TRUE if the NIC is operating exclusively in the 5.0 GHz band, meaning
1069// it is NOT operating in the 2.4 GHz band
1070#define CSR_IS_RADIO_A_ONLY(pMac) \
1071 (eCSR_BAND_5G == (pMac)->roam.configParam.bandCapability)
1072
1073// this function returns TRUE if the NIC is operating in both bands.
1074#define CSR_IS_OPEARTING_DUAL_BAND(pMac) \
1075 ((eCSR_BAND_ALL == (pMac)->roam.configParam.bandCapability) && (eCSR_BAND_ALL == (pMac)->roam.configParam.eBand))
1076
1077// this function returns TRUE if the NIC can operate in the 5.0 GHz band (could operate in the
1078// 2.4 GHz band also).
1079#define CSR_IS_OPERATING_A_BAND(pMac) \
1080 (CSR_IS_OPEARTING_DUAL_BAND((pMac)) || CSR_IS_RADIO_A_ONLY((pMac)) || CSR_IS_5G_BAND_ONLY((pMac)))
1081
1082// this function returns TRUE if the NIC can operate in the 2.4 GHz band (could operate in the
1083// 5.0 GHz band also).
1084#define CSR_IS_OPERATING_BG_BAND(pMac) \
1085 (CSR_IS_OPEARTING_DUAL_BAND((pMac)) || CSR_IS_RADIO_BG_ONLY((pMac)) || CSR_IS_24_BAND_ONLY((pMac)))
1086
1087#define CSR_IS_CHANNEL_5GHZ(chnNum) \
Jeff Johnsone7245742012-09-05 17:12:55 -07001088 (((chnNum) >= CSR_MIN_5GHz_CHANNEL_NUMBER) && ((chnNum) <= CSR_MAX_5GHz_CHANNEL_NUMBER))
Jeff Johnson295189b2012-06-20 16:38:30 -07001089
Srinivas Girigowdade697412013-02-14 16:31:48 -08001090#define CSR_IS_CHANNEL_DFS(chnNum) \
1091 (NV_CHANNEL_ENABLE != vos_nv_getChannelEnabledState(chnNum))
1092
Jeff Johnson295189b2012-06-20 16:38:30 -07001093#define CSR_IS_CHANNEL_24GHZ(chnNum) \
1094 (((chnNum) > 0) && ((chnNum) <= CSR_MAX_24GHz_CHANNEL_NUMBER))
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001095
Jeff Johnson295189b2012-06-20 16:38:30 -07001096#define CSR_IS_SAME_BAND_CHANNELS(ch1, ch2) (CSR_IS_CHANNEL_5GHZ(ch1) == CSR_IS_CHANNEL_5GHZ(ch2))
1097
1098
1099#define CSR_IS_11D_INFO_FOUND(pMac) \
1100 (0 != (pMac)->scan.channelOf11dInfo)
1101// DEAUTHIND
1102#define CSR_IS_ROAMING(pSession) ((CSR_IS_LOSTLINK_ROAMING((pSession)->roamingReason)) || \
1103 (eCsrDynamicRoaming == (pSession)->roamingReason) || \
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001104 (eCsrReassocRoaming == (pSession)->roamingReason))
Jeff Johnson295189b2012-06-20 16:38:30 -07001105
1106
1107#define CSR_IS_SET_KEY_COMMAND( pCommand ) ( eSmeCommandSetKey == (pCommand)->command )
1108
1109#define CSR_IS_ADDTS_WHEN_ACMOFF_SUPPORTED(pMac) (pMac->roam.configParam.addTSWhenACMIsOff)
1110// DEAUTHIND
1111#define CSR_IS_LOSTLINK_ROAMING(reason) ((eCsrLostlinkRoamingDisassoc == (reason)) || (eCsrLostlinkRoamingDeauth == (reason)))
1112
Venkata Prathyusha Kuntupalli239278b2013-03-26 15:58:18 -07001113#define CSR_IS_ROAMING_COMMAND(pCommand) ((eCsrLostLink1 == (pCommand)->u.roamCmd.roamReason) ||\
1114 (eCsrLostLink2 == (pCommand)->u.roamCmd.roamReason) ||\
1115 (eCsrLostLink3 == (pCommand)->u.roamCmd.roamReason) )
1116
1117
Jeff Johnson295189b2012-06-20 16:38:30 -07001118//Stop CSR from asking for IMPS, This function doesn't disable IMPS from CSR
1119void csrScanSuspendIMPS( tpAniSirGlobal pMac );
1120//Start CSR from asking for IMPS. This function doesn't trigger CSR to request entering IMPS
1121//because IMPS maybe disabled.
1122void csrScanResumeIMPS( tpAniSirGlobal pMac );
1123
1124eHalStatus csrInitGetChannels(tpAniSirGlobal pMac);
Venkata Prathyusha Kuntupalli316247e2013-03-15 17:45:25 -07001125// Getting the 5GHz Channel list
1126eHalStatus csrGet5GChannels(tpAniSirGlobal pMac);
1127// Getting the 2.4GHz Channel list
1128eHalStatus csrGet24GChannels(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -07001129
1130eHalStatus csrSetModifyProfileFields(tpAniSirGlobal pMac, tANI_U32 sessionId,
1131 tCsrRoamModifyProfileFields *pModifyProfileFields);
1132/* ---------------------------------------------------------------------------
1133 \fn csrGetModifyProfileFields
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001134 \brief HDD or SME - QOS calls this function to get the current values of
Jeff Johnson295189b2012-06-20 16:38:30 -07001135 connected profile fields changing which can cause reassoc.
1136 This function must be called after CFG is downloaded and STA is in connected
1137 state.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001138 \param pModifyProfileFields - pointer to the connected profile fields
Jeff Johnson295189b2012-06-20 16:38:30 -07001139 changing which can cause reassoc
1140
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001141 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001142 -------------------------------------------------------------------------------*/
1143eHalStatus csrGetModifyProfileFields(tpAniSirGlobal pMac, tANI_U32 sessionId,
1144 tCsrRoamModifyProfileFields * pModifyProfileFields);
1145void csrSetGlobalCfgs( tpAniSirGlobal pMac );
1146void csrSetDefaultDot11Mode( tpAniSirGlobal pMac );
1147void csrScanSetChannelMask(tpAniSirGlobal pMac, tCsrChannelInfo *pChannelInfo);
1148tANI_BOOLEAN csrIsConnStateDisconnected(tpAniSirGlobal pMac, tANI_U32 sessionId);
1149tANI_BOOLEAN csrIsConnStateConnectedIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1150tANI_BOOLEAN csrIsConnStateDisconnectedIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1151tANI_BOOLEAN csrIsConnStateConnectedInfra( tpAniSirGlobal pMac, tANI_U32 sessionId );
1152tANI_BOOLEAN csrIsConnStateConnected( tpAniSirGlobal pMac, tANI_U32 sessionId );
1153tANI_BOOLEAN csrIsConnStateInfra( tpAniSirGlobal pMac, tANI_U32 sessionId );
1154tANI_BOOLEAN csrIsConnStateIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1155tANI_BOOLEAN csrIsConnStateWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1156tANI_BOOLEAN csrIsConnStateConnectedWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1157tANI_BOOLEAN csrIsConnStateDisconnectedWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1158tANI_BOOLEAN csrIsAnySessionInConnectState( tpAniSirGlobal pMac );
1159tANI_BOOLEAN csrIsAllSessionDisconnected( tpAniSirGlobal pMac );
Madan Mohan Koyyalamudi48081ef2012-12-04 16:49:55 -08001160tANI_BOOLEAN csrIsStaSessionConnected( tpAniSirGlobal pMac );
1161tANI_BOOLEAN csrIsP2pSessionConnected( tpAniSirGlobal pMac );
Madan Mohan Koyyalamudid3d22592012-09-24 14:01:29 -07001162tANI_BOOLEAN csrIsAnySessionConnected( tpAniSirGlobal pMac );
Jeff Johnson295189b2012-06-20 16:38:30 -07001163tANI_BOOLEAN csrIsInfraConnected( tpAniSirGlobal pMac );
1164tANI_BOOLEAN csrIsConcurrentInfraConnected( tpAniSirGlobal pMac );
Jeff Johnsone7245742012-09-05 17:12:55 -07001165tANI_BOOLEAN csrIsConcurrentSessionRunning( tpAniSirGlobal pMac );
Jeff Johnsone7245742012-09-05 17:12:55 -07001166tANI_BOOLEAN csrIsInfraApStarted( tpAniSirGlobal pMac );
Jeff Johnson295189b2012-06-20 16:38:30 -07001167tANI_BOOLEAN csrIsIBSSStarted( tpAniSirGlobal pMac );
1168tANI_BOOLEAN csrIsBTAMPStarted( tpAniSirGlobal pMac );
1169tANI_BOOLEAN csrIsBTAMP( tpAniSirGlobal pMac, tANI_U32 sessionId );
1170eHalStatus csrIsBTAMPAllowed( tpAniSirGlobal pMac, tANI_U32 chnId );
Jeff Johnsone7245742012-09-05 17:12:55 -07001171tANI_BOOLEAN csrIsValidMcConcurrentSession(tpAniSirGlobal pMac, tANI_U32 sessionId,
1172 tSirBssDescription *pBssDesc);
Jeff Johnson295189b2012-06-20 16:38:30 -07001173tANI_BOOLEAN csrIsConnStateConnectedInfraAp( tpAniSirGlobal pMac, tANI_U32 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -07001174/*----------------------------------------------------------------------------
1175 \fn csrRoamRegisterLinkQualityIndCallback
1176
1177 \brief
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001178 a CSR function to allow HDD to register a callback handler with CSR for
1179 link quality indications.
Jeff Johnson295189b2012-06-20 16:38:30 -07001180
1181 Only one callback may be registered at any time.
1182 In order to deregister the callback, a NULL cback may be provided.
1183
1184 Registration happens in the task context of the caller.
1185
1186 \param callback - Call back being registered
1187 \param pContext - user data
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001188
Jeff Johnson295189b2012-06-20 16:38:30 -07001189 DEPENDENCIES: After CSR open
1190
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001191 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001192-----------------------------------------------------------------------------*/
1193eHalStatus csrRoamRegisterLinkQualityIndCallback(tpAniSirGlobal pMac,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001194 csrRoamLinkQualityIndCallback callback,
Jeff Johnson295189b2012-06-20 16:38:30 -07001195 void *pContext);
1196/* ---------------------------------------------------------------------------
1197 \fn csrGetStatistics
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001198 \brief csr function that client calls to register a callback to get
1199 different PHY level statistics from CSR.
1200
Jeff Johnson295189b2012-06-20 16:38:30 -07001201 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
1202 \param statsMask - The different category/categories of stats requester is looking for
1203 \param callback - SME sends back the requested stats using the callback
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001204 \param periodicity - If requester needs periodic update, 0 means it's an one
Jeff Johnson295189b2012-06-20 16:38:30 -07001205 time request
1206 \param cache - If requester is happy with cached stats
1207 \param staId - The station ID for which the stats is requested for
1208 \param pContext - user context to be passed back along with the callback
1209
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001210 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001211 ---------------------------------------------------------------------------*/
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001212eHalStatus csrGetStatistics(tpAniSirGlobal pMac, eCsrStatsRequesterType requesterId,
1213 tANI_U32 statsMask,
1214 tCsrStatsCallback callback,
1215 tANI_U32 periodicity, tANI_BOOLEAN cache,
Jeff Johnson295189b2012-06-20 16:38:30 -07001216 tANI_U8 staId, void *pContext);
1217
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +05301218/* ---------------------------------------------------------------------------
1219 \fn csrGetTLSTAState
1220 \helper function to get the TL STA State whenever the function is called.
1221
1222 \param staId - The staID to be passed to the TL
1223 to get the relevant TL STA State
1224 \return the state as tANI_U16
1225 ---------------------------------------------------------------------------*/
1226tANI_U16 csrGetTLSTAState(tpAniSirGlobal pMac, tANI_U8 staId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001227
1228eHalStatus csrGetRssi(tpAniSirGlobal pMac,tCsrRssiCallback callback,tANI_U8 staId,tCsrBssid bssId,void * pContext,void * pVosContext);
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05301229
1230/* ---------------------------------------------------------------------------
1231 \fn csrGetSnr
1232 \brief csr function that client calls to register a callback to get
1233 SNR stored in TL
1234
1235 \param callback - SME sends back the requested stats using the callback
1236 \param staId - The station ID for which the stats is requested for
1237 \param bssid - The bssid for the connected session
1238 \param pContext - user context to be passed back along with the callback
1239
1240 \return eHalStatus
1241 ---------------------------------------------------------------------------*/
1242eHalStatus csrGetSnr(tpAniSirGlobal pMac, tCsrSnrCallback callback,
1243 tANI_U8 staId, tCsrBssid bssId, void *pContext);
1244
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08001245#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_CCX || defined(FEATURE_WLAN_LFR)
1246eHalStatus csrGetRoamRssi(tpAniSirGlobal pMac,
1247 tCsrRssiCallback callback,
1248 tANI_U8 staId,
1249 tCsrBssid bssId,
1250 void * pContext,
1251 void * pVosContext);
1252#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001253
1254#if defined(FEATURE_WLAN_CCX) && defined(FEATURE_WLAN_CCX_UPLOAD)
1255eHalStatus csrGetTsmStats(tpAniSirGlobal pMac, tCsrTsmStatsCallback callback, tANI_U8 staId,
1256 tCsrBssid bssId, void *pContext, void* pVosContext,
1257 tANI_U8 tid);
1258#endif /* FEATURE_WLAN_CCX && FEATURE_WLAN_CCX_UPLOAD */
1259
Jeff Johnson295189b2012-06-20 16:38:30 -07001260eHalStatus csrRoamRegisterCallback(tpAniSirGlobal pMac, csrRoamCompleteCallback callback, void *pContext);
1261/* ---------------------------------------------------------------------------
1262 \fn csrGetConfigParam
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001263 \brief HDD calls this function to get the global settings currently maintained by CSR.
Jeff Johnson295189b2012-06-20 16:38:30 -07001264 \param pParam - caller allocated memory
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001265 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001266 -------------------------------------------------------------------------------*/
1267eHalStatus csrGetConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam);
1268
1269/* ---------------------------------------------------------------------------
1270 \fn csrMsgProcessor
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001271 \brief HDD calls this function to change some global settings.
Jeff Johnson295189b2012-06-20 16:38:30 -07001272 caller must set the all fields or call csrGetConfigParam to prefill the fields.
1273 \param pParam - caller allocated memory
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001274 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001275 -------------------------------------------------------------------------------*/
1276eHalStatus csrChangeDefaultConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam);
1277
1278
1279/* ---------------------------------------------------------------------------
1280 \fn csrMsgProcessor
1281 \brief HDD calls this function for the messages that are handled by CSR.
1282 \param pMsgBuf - a pointer to a buffer that maps to various structures base on the message type.
1283 The beginning of the buffer can always map to tSirSmeRsp.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001284 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001285 -------------------------------------------------------------------------------*/
1286eHalStatus csrMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf );
1287
1288/* ---------------------------------------------------------------------------
1289 \fn csrOpen
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001290 \brief This function must be called before any API call to CSR.
1291 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001292 -------------------------------------------------------------------------------*/
1293eHalStatus csrOpen(tpAniSirGlobal pMac);
1294/* ---------------------------------------------------------------------------
1295 \fn csrClose
1296 \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 -08001297 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001298 -------------------------------------------------------------------------------*/
1299eHalStatus csrClose(tpAniSirGlobal pMac);
1300/* ---------------------------------------------------------------------------
1301 \fn csrStart
1302 \brief To start CSR.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001303 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001304 -------------------------------------------------------------------------------*/
1305eHalStatus csrStart(tpAniSirGlobal pMac);
1306/* ---------------------------------------------------------------------------
1307 \fn csrStop
1308 \brief To stop CSR. CSR still keeps its current setting.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001309 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001310 -------------------------------------------------------------------------------*/
1311eHalStatus csrStop(tpAniSirGlobal pMac);
1312/* ---------------------------------------------------------------------------
1313 \fn csrReady
1314 \brief To let CSR is ready to operate
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001315 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001316 -------------------------------------------------------------------------------*/
1317eHalStatus csrReady(tpAniSirGlobal pMac);
1318
1319#ifdef FEATURE_WLAN_WAPI
1320eHalStatus csrRoamGetBKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pNum,
1321 tBkidCacheInfo *pBkidCache);
1322
1323
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001324eHalStatus csrScanGetBKIDCandidateList(tpAniSirGlobal pMac, tANI_U32 sessionId,
Jeff Johnson295189b2012-06-20 16:38:30 -07001325 tBkidCandidateInfo *pBkidList, tANI_U32 *pNumItems );
1326tANI_U32 csrRoamGetNumBKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId);
1327eHalStatus csrRoamSetBKIDCache( tpAniSirGlobal pMac, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
1328 tANI_U32 numItems );
1329/* ---------------------------------------------------------------------------
1330 \fn csrRoamGetWapiReqIE
1331 \brief return the WAPI IE CSR passes to PE to JOIN request or START_BSS request
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001332 \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 -07001333 needed or IE length in pBuf.
1334 \param pBuf - Caller allocated memory that contain the IE field, if any, upon return
1335 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
1336 -------------------------------------------------------------------------------*/
1337eHalStatus csrRoamGetWapiReqIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf);
1338
1339/* ---------------------------------------------------------------------------
1340 \fn csrRoamGetWapiRspIE
1341 \brief return the WAPI IE from the beacon or probe rsp if connected
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001342 \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 -07001343 needed or IE length in pBuf.
1344 \param pBuf - Caller allocated memory that contain the IE field, if any, upon return
1345 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
1346 -------------------------------------------------------------------------------*/
1347eHalStatus csrRoamGetWapiRspIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf);
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001348tANI_U8 csrConstructWapiIe( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
Jeff Johnson295189b2012-06-20 16:38:30 -07001349 tSirBssDescription *pSirBssDesc, tDot11fBeaconIEs *pIes, tCsrWapiIe *pWapiIe );
1350#endif /* FEATURE_WLAN_WAPI */
1351
Jeff Johnson295189b2012-06-20 16:38:30 -07001352eHalStatus csrRoamUpdateAPWPSIE( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirAPWPSIEs *pAPWPSIES );
1353eHalStatus csrRoamUpdateWPARSNIEs( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirRSNie * pAPSirRSNie);
Jeff Johnson295189b2012-06-20 16:38:30 -07001354void csrSetCfgPrivacy( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy );
1355tANI_S8 csrGetInfraSessionId( tpAniSirGlobal pMac );
1356tANI_U8 csrGetInfraOperationChannel( tpAniSirGlobal pMac, tANI_U8 sessionId);
1357tANI_U8 csrGetConcurrentOperationChannel( tpAniSirGlobal pMac );
1358
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001359eHalStatus csrRoamCopyConnectProfile(tpAniSirGlobal pMac, tANI_U32 sessionId,
Jeff Johnson295189b2012-06-20 16:38:30 -07001360 tCsrRoamConnectedProfile *pProfile);
1361tANI_BOOLEAN csrIsSetKeyAllowed(tpAniSirGlobal pMac, tANI_U32 sessionId);
1362
1363void csrSetOppositeBandChannelInfo( tpAniSirGlobal pMac );
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001364void csrConstructCurrentValidChannelList( tpAniSirGlobal pMac, tDblLinkList *pChannelSetList,
Jeff Johnson295189b2012-06-20 16:38:30 -07001365 tANI_U8 *pChannelList, tANI_U8 bSize, tANI_U8 *pNumChannels );
Srikant Kuppa066904f2013-05-07 13:56:02 -07001366eHalStatus csrScanSavePreferredNetworkFound(tpAniSirGlobal pMac,
1367 tSirPrefNetworkFoundInd *pPrefNetworkFoundInd);
Jeff Johnson295189b2012-06-20 16:38:30 -07001368#endif
1369
1370#ifdef WLAN_FEATURE_VOWIFI_11R
1371//Returns whether the current association is a 11r assoc or not
1372tANI_BOOLEAN csrRoamIs11rAssoc(tpAniSirGlobal pMac);
1373#endif
1374
1375#ifdef FEATURE_WLAN_CCX
1376//Returns whether the current association is a CCX assoc or not
1377tANI_BOOLEAN csrRoamIsCCXAssoc(tpAniSirGlobal pMac);
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001378tANI_BOOLEAN csrRoamIsCcxIniFeatureEnabled(tpAniSirGlobal pMac);
1379tANI_BOOLEAN csrNeighborRoamIsCCXAssoc(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -07001380#endif
1381
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001382//Remove this code once SLM_Sessionization is supported
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001383//BMPS_WORKAROUND_NOT_NEEDED
Jeff Johnson295189b2012-06-20 16:38:30 -07001384void csrDisconnectAllActiveSessions(tpAniSirGlobal pMac);
Mohit Khanna349bc392012-09-11 17:24:52 -07001385
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001386#ifdef FEATURE_WLAN_LFR
1387//Returns whether "Legacy Fast Roaming" is enabled...or not
Madan Mohan Koyyalamudi03aae5f2012-11-28 01:51:22 +05301388tANI_BOOLEAN csrRoamIsFastRoamEnabled(tpAniSirGlobal pMac, tANI_U32 sessionId);
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001389#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1390tANI_BOOLEAN csrRoamIsRoamOffloadScanEnabled(tpAniSirGlobal pMac);
1391#endif
Madan Mohan Koyyalamudi470d2cf2012-09-28 14:43:44 -07001392tANI_BOOLEAN csrIsChannelPresentInList( tANI_U8 *pChannelList, int numChannels, tANI_U8 channel );
1393VOS_STATUS csrAddToChannelListFront( tANI_U8 *pChannelList, int numChannels, tANI_U8 channel );
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001394#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1395eHalStatus csrScanRequestLfrResult(tpAniSirGlobal pMac, tANI_U32 sessionId,
1396 csrScanCompleteCallback callback, void *pContext);
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07001397eHalStatus csrRoamOffloadScanRspHdlr(tpAniSirGlobal pMac, tANI_U8 reason);
1398eHalStatus csrHandoffRequest(tpAniSirGlobal pMac, tCsrHandoffRequest *pHandoffInfo);
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001399#endif
1400tANI_BOOLEAN csrRoamIsStaMode(tpAniSirGlobal pMac, tANI_U32 sessionId);
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001401#endif
1402