blob: e6bb97ad09e4b75c7f9fd7264e936cfafeff60dd [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Kiet Lam0fb93dd2014-02-19 00:32:59 -08002 * Copyright (c) 2011-2014 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
22/*
23 * Copyright (c) 2011-2014 Qualcomm Atheros, Inc.
24 * All Rights Reserved.
25 * Qualcomm Atheros Confidential and Proprietary.
26 *
27 */
28
Jeff Johnson295189b2012-06-20 16:38:30 -070029
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080030/** ------------------------------------------------------------------------- *
31 ------------------------------------------------------------------------- *
Jeff Johnson295189b2012-06-20 16:38:30 -070032
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080033
Jeff Johnson295189b2012-06-20 16:38:30 -070034 \file csrInternal.h
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080035
Jeff Johnson295189b2012-06-20 16:38:30 -070036 Define internal data structure for MAC.
Jeff Johnson295189b2012-06-20 16:38:30 -070037 ========================================================================== */
38#ifndef CSRINTERNAL_H__
39#define CSRINTERNAL_H__
40
Jeff Johnson295189b2012-06-20 16:38:30 -070041#include "vos_status.h"
42#include "vos_lock.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070043
44#include "palTimer.h"
45#include "csrSupport.h"
46#include "vos_nvitem.h"
47#include "wlan_qct_tl.h"
48
49#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
50#include "csrNeighborRoam.h"
51#endif
52
53#define CSR_MAX_STA (HAL_NUM_STA)
54
55#define CSR_SME_SCAN_FLAGS_DELETE_CACHE 0x80
56
57#define CSR_TITAN_MAX_RATE_MIMO_CB 240
58#define CSR_TITAN_MAX_RATE_MIMO 126
59
60//define scan return criteria. LIM should use these define as well
61#define CSR_SCAN_RETURN_AFTER_ALL_CHANNELS ( 0 )
62#define CSR_SCAN_RETURN_AFTER_FIRST_MATCH ( 0x01 )
63#define CSR_SCAN_RETURN_AFTER_5_BAND_11d_FOUND ( 0x80 )
64#define CSR_SCAN_RETURN_AFTER_24_BAND_11d_FOUND ( 0x40 )
65#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 -070066#define CSR_NUM_RSSI_CAT 15
Jeff Johnson295189b2012-06-20 16:38:30 -070067#define CSR_MAX_STATISTICS_REQ 10
Varun Reddy Yeturu9d4102c2013-12-02 15:47:03 -080068#define CSR_ROAM_SCAN_CHANNEL_SWITCH_TIME 3
Jeff Johnson295189b2012-06-20 16:38:30 -070069
70//Support for multiple session
71#define CSR_SESSION_ID_INVALID 0xFF // session ID invalid
72#define CSR_ROAM_SESSION_MAX 5 // No of sessions to be supported, and a
73 // session is for Infra, IBSS or BT-AMP
74
75#define CSR_IS_SESSION_VALID( pMac, sessionId ) ( ( (sessionId) < CSR_ROAM_SESSION_MAX ) \
76 && ( (pMac)->roam.roamSession[(sessionId)].sessionActive ) )
77#define CSR_GET_SESSION( pMac, sessionId ) \
78( \
79 (sessionId < CSR_ROAM_SESSION_MAX) ? \
80 (&(pMac)->roam.roamSession[(sessionId)]) :\
81 NULL \
82)
83
Agrawal Ashish0b6984f2014-04-05 18:35:45 +053084#define CSR_MAX_NUM_COUNTRY_CODE 100
Srinivas Girigowda41c7c5f2013-10-21 19:01:38 -070085#define CSR_IS_SELECT_5GHZ_MARGIN( pMac ) \
86( \
87 (((pMac)->roam.configParam.nSelect5GHzMargin)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
88)
89
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -080090#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -080091#define CSR_IS_ROAM_PREFER_5GHZ( pMac ) \
92( \
93 (((pMac)->roam.configParam.nRoamPrefer5GHz)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
94)
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -070095#define CSR_IS_ROAM_INTRA_BAND_ENABLED( pMac ) \
96( \
97 (((pMac)->roam.configParam.nRoamIntraBand)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
98)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -080099#endif
100
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700101#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
102#define CSR_IS_ROAM_SCAN_OFFLOAD_ENABLED( pMac ) \
103( \
104 (((pMac)->roam.configParam.isRoamOffloadScanEnabled)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
105)
Srinivas Girigowda830bbd02013-06-13 19:44:16 -0700106
107#define CSR_IS_FASTROAM_IN_CONCURRENCY_INI_FEATURE_ENABLED( pMac ) \
108( \
109 (((pMac)->roam.configParam.bFastRoamInConIniFeatureEnabled)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
110)
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700111#endif
112
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800113//Support for "Fast roaming" (i.e., ESE, LFR, or 802.11r.)
Madan Mohan Koyyalamudi470d2cf2012-09-28 14:43:44 -0700114#define CSR_BG_SCAN_OCCUPIED_CHANNEL_LIST_LEN 15
Jeff Johnson295189b2012-06-20 16:38:30 -0700115
116typedef enum
117{
118 //eCSR_CFG_DOT11_MODE_BEST = 0,
119 eCSR_CFG_DOT11_MODE_TAURUS = 0,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800120 eCSR_CFG_DOT11_MODE_ABG,
121 eCSR_CFG_DOT11_MODE_11A,
122 eCSR_CFG_DOT11_MODE_11B,
123 eCSR_CFG_DOT11_MODE_11G,
124 eCSR_CFG_DOT11_MODE_11N,
125 eCSR_CFG_DOT11_MODE_POLARIS,
126 eCSR_CFG_DOT11_MODE_TITAN,
Jeff Johnsone7245742012-09-05 17:12:55 -0700127#ifdef WLAN_FEATURE_11AC
128 eCSR_CFG_DOT11_MODE_11AC,
129#endif
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800130 eCSR_CFG_DOT11_MODE_11G_ONLY,
131 eCSR_CFG_DOT11_MODE_11N_ONLY,
Jeff Johnsone7245742012-09-05 17:12:55 -0700132#ifdef WLAN_FEATURE_11AC
133 eCSR_CFG_DOT11_MODE_11AC_ONLY,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800134#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700135 //This value can never set to CFG. It is for CSR's internal use
136 eCSR_CFG_DOT11_MODE_AUTO,
137}eCsrCfgDot11Mode; //Used to determine what to set to the WNI_CFG_DOT11_MODE
138
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800139typedef enum etCsrRoamCommands
Jeff Johnson295189b2012-06-20 16:38:30 -0700140{
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800141 eCsrRoamNoCommand,
Jeff Johnson295189b2012-06-20 16:38:30 -0700142 eCsrRoamCommandScan,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800143 eCsrRoamCommandRoam,
144 eCsrRoamCommandWmStatusChange,
Jeff Johnson295189b2012-06-20 16:38:30 -0700145 eCsrRoamCommandSetKey,
146 eCsrRoamCommandRemoveKey,
147
148} eCsrRoamCommands;
149
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800150typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700151{
152 eCsrScanOther = 1,
153 eCsrScanLostLink1,
154 eCsrScanLostLink2,
155 eCsrScanLostLink3,
156 eCsrScanLostLink4,
157 eCsrScan11d1, //First 11d scan
158 eCsrScan11d2, //First 11d scan has failed
159 eCsrScan11dDone, //11d scan succeeded, try the rest of the channel
160 eCsrScanUserRequest,
161 eCsrScanGetResult,
162 eCsrScanSetBGScanParam, //used for HO too - bg scan request in NT Handoff sub-state
163 eCsrScanForSsid,
164 eCsrScanForCapsChange,
165 eCsrScanBGScanAbort,
166 eCsrScanBGScanEnable,
167 eCsrScanIdleScan,
168 eCsrScanGetScanChnInfo, //To get the list of channels scanned
169
170 eCsrScanBgScan, // bg scan request in NRT & RT Handoff sub-states
171 eCsrScanProbeBss, // directed probe on an entry from the candidate list - HO
172 eCsrScanAbortBgScan, //aborting a BG scan (meaning the scan is triggered by LIM timer)
173 eCsrScanAbortNormalScan, //aborting a normal scan (the scan is trigger by eWNI_SME_SCAN_REQ)
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700174 eCsrScanP2PFindPeer,
175 eCsrScanGetLfrResult, // get the LFR candidates from PE scan cache
Jeff Johnson295189b2012-06-20 16:38:30 -0700176}eCsrScanReason;
177
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800178typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700179{
180 eCsrNoConnection, // Roaming because we have not established the initial connection.
181 eCsrCapsChange, // roaming because LIM reported a Capability change in the associated AP.
182 eCsrForcedDisassoc, // roaming becuase someone asked us to Disassoc and stay disassociated.
183 eCsrHddIssued, // roaming because an 802.11 request was issued to the driver.
184 eCsrLostLink1, // roaming because we lost link to an associated AP
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800185 eCsrLostLink2,
Jeff Johnson295189b2012-06-20 16:38:30 -0700186 eCsrLostLink3,
187 eCsrForcedDisassocMICFailure, // roaming because we need to force a Disassoc due to MIC failure
188 eCsrHddIssuedReassocToSameAP,
189 eCsrSmeIssuedReassocToSameAP,
190 eCsrSmeIssuedReassocToDiffAP,
191 eCsrForcedDeauth, // roaming becuase someone asked us to deauth and stay disassociated.
192 eCsrSmeIssuedDisassocForHandoff, // will be issued by Handoff logic to disconect from current AP
193 eCsrSmeIssuedAssocToSimilarAP, // will be issued by Handoff logic to join a new AP with same profile
194 eCsrSmeIssuedIbssJoinFailure, // ibss join timer fired before any perr showed up, so shut down the network
195 eCsrForcedIbssLeave,
196 eCsrStopBss,
197 eCsrSmeIssuedFTReassoc,
198 eCsrForcedDisassocSta,
199 eCsrForcedDeauthSta,
Madan Mohan Koyyalamudi286b60e2012-10-11 12:59:07 -0700200 eCsrPerformPreauth,
Venkata Prathyusha Kuntupalli239278b2013-03-26 15:58:18 -0700201 eCsrLostLink1Abort,
202 eCsrLostLink2Abort,
203 eCsrLostLink3Abort,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800204
Jeff Johnson295189b2012-06-20 16:38:30 -0700205}eCsrRoamReason;
206
207typedef enum
208{
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800209 eCSR_ROAM_SUBSTATE_NONE = 0,
210 eCSR_ROAM_SUBSTATE_START_BSS_REQ,
211 eCSR_ROAM_SUBSTATE_JOIN_REQ,
212 eCSR_ROAM_SUBSTATE_REASSOC_REQ,
213 eCSR_ROAM_SUBSTATE_DISASSOC_REQ,
214 eCSR_ROAM_SUBSTATE_STOP_BSS_REQ,
215 eCSR_ROAM_SUBSTATE_DISCONNECT_CONTINUE_ROAMING, //Continue the current roam command after disconnect
216 eCSR_ROAM_SUBSTATE_AUTH_REQ,
217 eCSR_ROAM_SUBSTATE_CONFIG,
218 eCSR_ROAM_SUBSTATE_DEAUTH_REQ,
219 eCSR_ROAM_SUBSTATE_DISASSOC_NOTHING_TO_JOIN,
220 eCSR_ROAM_SUBSTATE_DISASSOC_REASSOC_FAILURE,
221 eCSR_ROAM_SUBSTATE_DISASSOC_FORCED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700222 eCSR_ROAM_SUBSTATE_WAIT_FOR_KEY,
223 eCSR_ROAM_SUBSTATE_DISASSOC_HANDOFF,
224 eCSR_ROAM_SUBSTATE_JOINED_NO_TRAFFIC,
225 eCSR_ROAM_SUBSTATE_JOINED_NON_REALTIME_TRAFFIC,
226 eCSR_ROAM_SUBSTATE_JOINED_REALTIME_TRAFFIC,
227// max is 15 unless the bitfield is expanded...
228} eCsrRoamSubState;
229
230
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800231typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700232{
233 eCSR_ROAMING_STATE_STOP = 0,
234 eCSR_ROAMING_STATE_IDLE,
235 eCSR_ROAMING_STATE_SCANNING,
236 eCSR_ROAMING_STATE_JOINING,
237 eCSR_ROAMING_STATE_JOINED,
238}eCsrRoamState;
239
240
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800241typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700242{
243 eCsrContinueRoaming,
244 eCsrStopRoaming,
245 eCsrStartIbss,
246 eCsrStartIbssSameIbss,
247 eCsrReassocToSelfNoCapChange,
Jeff Johnsone7245742012-09-05 17:12:55 -0700248 eCsrStopRoamingDueToConcurrency,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800249
Jeff Johnson295189b2012-06-20 16:38:30 -0700250}eCsrJoinState;
251
252typedef enum
253{
254 eCsrNotRoaming,
255 eCsrLostlinkRoamingDisassoc,
256 eCsrLostlinkRoamingDeauth,
257 eCsrDynamicRoaming,
258 eCsrReassocRoaming,
259}eCsrRoamingReason;
260
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800261typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700262{
263 eCsrDisassociated,
264 eCsrDeauthenticated
265
266}eCsrRoamWmStatusChangeTypes;
267
268typedef enum
269{
270 eCsrSummaryStats = 0,
271 eCsrGlobalClassAStats,
272 eCsrGlobalClassBStats,
273 eCsrGlobalClassCStats,
274 eCsrGlobalClassDStats,
275 eCsrPerStaStats,
276 eCsrMaxStats
277}eCsrRoamStatsClassTypes;
278
279#ifdef FEATURE_WLAN_DIAG_SUPPORT
280typedef enum
281{
282 eCSR_WLAN_STATUS_CONNECT =0,
283 eCSR_WLAN_STATUS_DISCONNECT
284
285}eCsrDiagWlanStatusEventSubtype;
286
287typedef enum
288{
289 eCSR_REASON_UNSPECIFIED = 0,
290 eCSR_REASON_USER_REQUESTED,
291 eCSR_REASON_MIC_ERROR,
292 eCSR_REASON_DISASSOC,
293 eCSR_REASON_DEAUTH,
294 eCSR_REASON_HANDOFF,
295
296}eCsrDiagWlanStatusEventReason;
297
298typedef enum
299{
300 eCSR_WLAN_HANDOFF_EVENT =0,
301
302}eCsrDiagWlanHandoffEventSubtype;
303
304typedef enum
305{
306 eCSR_WLAN_VCC_EVENT =0,
307
308}eCsrDiagWlanVccEventSubtype;
309
310#endif //FEATURE_WLAN_DIAG_SUPPORT
311
312typedef struct tagCsrChannel
313{
314 tANI_U8 numChannels;
315 tANI_U8 channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
316}tCsrChannel;
317
318typedef struct tagScanProfile
319{
320 tANI_U32 minChnTime;
321 tANI_U32 maxChnTime;
322 tANI_U32 restTime; //This is ignored if not associated
323 tANI_U32 numOfChannels;
324 tANI_U8 *pChannelList;
325 tSirScanType scanType; //active or passive
326 eCsrRoamBssType bssType; //BSS or IBSS
327 tANI_U8 ssid[WNI_CFG_SSID_LEN];
328 tANI_U8 bReturnAfter1stMatch;
329 tANI_U8 fUniqueResult;
330 tANI_U8 freshScan;
331 tCsrBssid bssid;
332}tScanProfile;
333
334typedef struct tagBssConfigParam
335{
336 eCsrMediaAccessType qosType;
337 tSirMacSSid SSID;
338 tANI_U32 uRTSThresh;
339 tANI_U32 uDeferThresh; //
340 eCsrCfgDot11Mode uCfgDot11Mode;
341 eCsrBand eBand;
342 tANI_U8 standardRate[CSR_DOT11_SUPPORTED_RATES_MAX];
343 tANI_U8 extendedRate[CSR_DOT11_EXTENDED_SUPPORTED_RATES_MAX];
344 eCsrExposedTxRate txRate;
345 tAniAuthType authType;
346 eCsrEncryptionType encType;
347 tANI_U32 uShortSlotTime;
348 tANI_U32 uHTSupport; //High throughput
349 tANI_U32 uPowerLimit;
350 tANI_U32 uHeartBeatThresh;
351 tANI_U32 uJoinTimeOut;
352 tSirMacCapabilityInfo BssCap;
353 tANI_BOOLEAN f11hSupport;
Jeff Johnsone7245742012-09-05 17:12:55 -0700354 ePhyChanBondState cbMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700355}tBssConfigParam;
356
357
358typedef struct tagCsrRoamStartBssParams
359{
360 tSirMacSSid ssId;
361 tCsrBssid bssid; //this is the BSSID for the party we want to join (only use for IBSS or WDS)
362 tSirNwType sirNwType;
Jeff Johnsone7245742012-09-05 17:12:55 -0700363 ePhyChanBondState cbMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700364 tSirMacRateSet operationalRateSet;
365 tSirMacRateSet extendedRateSet;
366 tANI_U8 operationChn;
367 eCsrCfgDot11Mode uCfgDot11Mode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700368 tANI_U8 privacy;
369 tANI_BOOLEAN fwdWPSPBCProbeReq;
370 tANI_BOOLEAN protEnabled;
371 tANI_BOOLEAN obssProtEnabled;
372 tAniAuthType authType;
373 tANI_U16 beaconInterval; //If this is 0, SME will fill in for caller.
374 tANI_U16 ht_protection;
375 tANI_U32 dtimPeriod;
376 tANI_U8 ApUapsdEnable;
377 tANI_U8 ssidHidden;
378 tANI_U8 wps_state;
Jeff Johnson295189b2012-06-20 16:38:30 -0700379 tVOS_CON_MODE bssPersona;
380 tANI_U16 nRSNIELength; //The byte count in the pRSNIE, if 0, pRSNIE is ignored.
381 tANI_U8 *pRSNIE; //If not null, it has the IE byte stream for RSN
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800382 tANI_BOOLEAN updatebeaconInterval; //Flag used to indicate update
383 // beaconInterval
Chet Lanctot8cecea22014-02-11 19:09:36 -0800384#ifdef WLAN_FEATURE_11W
385 tANI_BOOLEAN mfpCapable;
386 tANI_BOOLEAN mfpRequired;
387#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700388}tCsrRoamStartBssParams;
389
390
391typedef struct tagScanCmd
392{
393 tANI_U32 scanID;
394 csrScanCompleteCallback callback;
395 void *pContext;
396 eCsrScanReason reason;
397 eCsrRoamState lastRoamState[CSR_ROAM_SESSION_MAX];
398 tCsrRoamProfile *pToRoamProfile;
399 tANI_U32 roamId; //this is the ID related to the pToRoamProfile
400 union
401 {
402 tCsrScanRequest scanRequest;
403 tCsrBGScanRequest bgScanRequest;
404 }u;
Srinivas, Dasari187ca4e2014-02-07 12:40:09 +0530405 //This flag will be set while aborting the scan due to band change
406 tANI_BOOLEAN abortScanDueToBandChange;
Jeff Johnson295189b2012-06-20 16:38:30 -0700407}tScanCmd;
408
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800409typedef struct tagRoamCmd
Jeff Johnson295189b2012-06-20 16:38:30 -0700410{
411 tANI_U32 roamId;
412 eCsrRoamReason roamReason;
413 tCsrRoamProfile roamProfile;
414 tScanResultHandle hBSSList; //BSS list fits the profile
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800415 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 -0700416 tSirBssDescription *pLastRoamBss; //the last BSS we try and failed
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800417 tANI_BOOLEAN fReleaseBssList; //whether to free hBSSList
Jeff Johnson295189b2012-06-20 16:38:30 -0700418 tANI_BOOLEAN fReleaseProfile; //whether to free roamProfile
419 tANI_BOOLEAN fReassoc; //whether this command is for reassociation
420 tANI_BOOLEAN fUpdateCurRoamProfile; //whether pMac->roam.pCurRoamProfile needs to be updated
421 //this is for CSR internal used only. And it should not be assigned when creating the command
422 //This causes the roam command not to do anything.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800423 tANI_BOOLEAN fReassocToSelfNoCapChange;
Jeff Johnson295189b2012-06-20 16:38:30 -0700424
425 tANI_BOOLEAN fStopWds;
426 tSirMacAddr peerMac;
427 tSirMacReasonCodes reason;
428}tRoamCmd;
429
430typedef struct tagSetKeyCmd
431{
432 tANI_U32 roamId;
433 eCsrEncryptionType encType;
434 eCsrAuthType authType;
435 tAniKeyDirection keyDirection; //Tx, Rx or Tx-and-Rx
436 tSirMacAddr peerMac; //Peer's MAC address. ALL 1's for group key
437 tANI_U8 paeRole; //0 for supplicant
438 tANI_U8 keyId; // Kye index
439 tANI_U8 keyLength; //Number of bytes containing the key in pKey
440 tANI_U8 Key[CSR_MAX_KEY_LEN];
441 tANI_U8 keyRsc[CSR_MAX_RSC_LEN];
442} tSetKeyCmd;
443
444typedef struct tahRemoveKeyCmd
445{
446 tANI_U32 roamId;
447 eCsrEncryptionType encType;
448 eCsrAuthType authType;
449 tSirMacAddr peerMac; //Peer's MAC address. ALL 1's for group key
450 tANI_U8 keyId; //key index
451} tRemoveKeyCmd;
452
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800453typedef struct tagWmStatusChangeCmd
Jeff Johnson295189b2012-06-20 16:38:30 -0700454{
455 eCsrRoamWmStatusChangeTypes Type;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800456 union
457 {
Jeff Johnson295189b2012-06-20 16:38:30 -0700458 tSirSmeDeauthInd DeauthIndMsg;
459 tSirSmeDisassocInd DisassocIndMsg;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800460 }u;
Jeff Johnson295189b2012-06-20 16:38:30 -0700461
462}tWmStatusChangeCmd;
463
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700464
Jeff Johnson295189b2012-06-20 16:38:30 -0700465typedef struct tagAddStaForSessionCmd
466{
467 //Session self mac addr
468 tSirMacAddr selfMacAddr;
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700469 tVOS_CON_MODE currDeviceMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700470}tAddStaForSessionCmd;
471
472typedef struct tagDelStaForSessionCmd
473{
474 //Session self mac addr
475 tSirMacAddr selfMacAddr;
476 csrRoamSessionCloseCallback callback;
477 void *pContext;
478}tDelStaForSessionCmd;
479
480//This structure represents one scan request
481typedef struct tagCsrCmd
482{
483 tListElem Link;
484 eCsrRoamCommands command;
485 tANI_U8 sessionId; // Session ID for this command
486 union
487 {
488 tScanCmd scanCmd;
489 tRoamCmd roamCmd;
490 tWmStatusChangeCmd wmStatusChangeCmd;
491 tSetKeyCmd setKeyCmd;
492 tRemoveKeyCmd removeKeyCmd;
493 tAddStaForSessionCmd addStaSessionCmd;
494 tDelStaForSessionCmd delStaSessionCmd;
495 }u;
496}tCsrCmd;
497
498#ifdef WLAN_FEATURE_VOWIFI_11R
499typedef struct tagCsr11rConfig
500{
501 tANI_BOOLEAN IsFTResourceReqSupported;
502} tCsr11rConfig;
503#endif
504
505#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
506typedef struct tagCsrNeighborRoamConfig
507{
508 tANI_U32 nNeighborScanTimerPeriod;
509 tANI_U8 nNeighborLookupRssiThreshold;
510 tANI_U8 nNeighborReassocRssiThreshold;
511 tANI_U16 nNeighborScanMinChanTime;
512 tANI_U16 nNeighborScanMaxChanTime;
513 sCsrChannel neighborScanChanList;
514 tANI_U8 nMaxNeighborRetries;
515 tANI_U16 nNeighborResultsRefreshPeriod;
Srinivas Girigowdade697412013-02-14 16:31:48 -0800516 tANI_U16 nEmptyScanRefreshPeriod;
Jeff Johnson295189b2012-06-20 16:38:30 -0700517}tCsrNeighborRoamConfig;
518#endif
519
520typedef struct tagCsrConfig
521{
522 tANI_U32 agingCount;
523 tANI_U32 FragmentationThreshold;
524 tANI_U32 channelBondingMode24GHz;
525 tANI_U32 channelBondingMode5GHz;
526 tANI_U32 RTSThreshold;
527 eCsrPhyMode phyMode;
528 eCsrCfgDot11Mode uCfgDot11Mode;
529 eCsrBand eBand;
530 tANI_U32 HeartbeatThresh50;
531 tANI_U32 HeartbeatThresh24;
532 tANI_U32 bgScanInterval;
533 eCsrCBChoice cbChoice;
534 eCsrBand bandCapability; //indicate hw capability
535 eCsrRoamWmmUserModeType WMMSupportMode;
536 tANI_BOOLEAN Is11eSupportEnabled;
537 tANI_BOOLEAN Is11dSupportEnabled;
538 tANI_BOOLEAN Is11dSupportEnabledOriginal;
539 tANI_BOOLEAN Is11hSupportEnabled;
540 tANI_BOOLEAN shortSlotTime;
541 tANI_BOOLEAN ProprietaryRatesEnabled;
542 tANI_BOOLEAN fenableMCCMode;
543 tANI_U16 TxRate;
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -0800544 tANI_U8 fAllowMCCGODiffBI;
Jeff Johnson295189b2012-06-20 16:38:30 -0700545 tANI_U8 AdHocChannel24;
546 tANI_U8 AdHocChannel5G;
547 tANI_U32 impsSleepTime; //in units of microseconds
548 tANI_U32 scanAgeTimeNCNPS; //scan result aging time threshold when Not-Connect-No-Power-Save, in seconds
549 tANI_U32 scanAgeTimeNCPS; //scan result aging time threshold when Not-Connect-Power-Save, in seconds
550 tANI_U32 scanAgeTimeCNPS; //scan result aging time threshold when Connect-No-Power-Save, in seconds,
551 tANI_U32 scanAgeTimeCPS; //scan result aging time threshold when Connect-Power-Savein seconds
552 tANI_U32 BssPreferValue[CSR_NUM_RSSI_CAT]; //each RSSI category has one value
553 int RSSICat[CSR_NUM_RSSI_CAT];
554 tANI_U8 bCatRssiOffset; //to set the RSSI difference for each category
555 tANI_U32 nRoamingTime; //In seconds, CSR will try this long before gives up, 0 means no roaming
556 //Whether to limit the channels to the ones set in Csr11dInfo. If true, the opertaional
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800557 //channels are limited to the default channel list. It is an "AND" operation between the
Jeff Johnson295189b2012-06-20 16:38:30 -0700558 //default channels and the channels in the 802.11d IE.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800559 tANI_BOOLEAN fEnforce11dChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -0700560 //Country Code Priority
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800561 //0 = 802.11D > Configured Country > NV
Jeff Johnson295189b2012-06-20 16:38:30 -0700562 //1 = Configured Country > 802.11D > NV
563 tANI_BOOLEAN fSupplicantCountryCodeHasPriority;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800564 //When true, AP with unknown country code won't be see.
565 //"Unknown country code" means either Ap doesn't have 11d IE or we cannot
Jeff Johnson295189b2012-06-20 16:38:30 -0700566 //find a domain for the country code in its 11d IE.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800567 tANI_BOOLEAN fEnforceCountryCodeMatch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700568 //When true, only APs in the default domain can be seen. If the Ap has "unknown country
569 //code", or the doamin of the country code doesn't match the default domain, the Ap is
570 //not acceptable.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800571 tANI_BOOLEAN fEnforceDefaultDomain;
Jeff Johnson295189b2012-06-20 16:38:30 -0700572
573 tANI_U16 vccRssiThreshold;
574 tANI_U32 vccUlMacLossThreshold;
575
576 tANI_U32 nPassiveMinChnTime; //in units of milliseconds
577 tANI_U32 nPassiveMaxChnTime; //in units of milliseconds
578 tANI_U32 nActiveMinChnTime; //in units of milliseconds
579 tANI_U32 nActiveMaxChnTime; //in units of milliseconds
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800580
c_hpothu059edb02014-03-12 21:44:28 +0530581 tANI_U32 nInitialDwellTime; //in units of milliseconds
582
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800583 tANI_U32 nActiveMinChnTimeBtc; //in units of milliseconds
584 tANI_U32 nActiveMaxChnTimeBtc; //in units of milliseconds
Kiran Kumar Lokere458d7322013-05-29 14:29:43 -0700585 tANI_U8 disableAggWithBtc;
Madan Mohan Koyyalamudi4ff9cd62012-10-30 17:48:57 -0700586#ifdef WLAN_AP_STA_CONCURRENCY
587 tANI_U32 nPassiveMinChnTimeConc; //in units of milliseconds
588 tANI_U32 nPassiveMaxChnTimeConc; //in units of milliseconds
589 tANI_U32 nActiveMinChnTimeConc; //in units of milliseconds
590 tANI_U32 nActiveMaxChnTimeConc; //in units of milliseconds
591 tANI_U32 nRestTimeConc; //in units of milliseconds
Sudhir Sattayappa Kohallieb97d502013-05-22 23:16:42 -0700592 tANI_U8 nNumStaChanCombinedConc; //number of channels combined for
593 //Sta in each split scan operation
594 tANI_U8 nNumP2PChanCombinedConc; //number of channels combined for
595 //P2P in each split scan operation
Madan Mohan Koyyalamudi4ff9cd62012-10-30 17:48:57 -0700596#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700597
598 tANI_BOOLEAN IsIdleScanEnabled;
599 //in dBm, the maximum TX power
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800600 //The actual TX power is the lesser of this value and 11d.
Jeff Johnson295189b2012-06-20 16:38:30 -0700601 //If 11d is disable, the lesser of this and default setting.
602 tANI_U8 nTxPowerCap;
603 tANI_U32 statsReqPeriodicity; //stats request frequency from PE while in full power
604 tANI_U32 statsReqPeriodicityInPS;//stats request frequency from PE while in power save
Jeff Johnson295189b2012-06-20 16:38:30 -0700605 tANI_U32 dtimPeriod;
606 tANI_BOOLEAN ssidHidden;
Jeff Johnson295189b2012-06-20 16:38:30 -0700607
608#ifdef WLAN_FEATURE_VOWIFI_11R
609 tCsr11rConfig csr11rConfig;
610#endif
611
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700612#ifdef FEATURE_WLAN_LFR
Srinivas Girigowda830bbd02013-06-13 19:44:16 -0700613 tANI_U8 isFastRoamIniFeatureEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -0800614 tANI_U8 MAWCEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700615#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Srinivas Girigowda830bbd02013-06-13 19:44:16 -0700616 tANI_U8 isRoamOffloadScanEnabled;
617 tANI_BOOLEAN bFastRoamInConIniFeatureEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700618#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700619#endif
620
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800621#ifdef FEATURE_WLAN_ESE
622 tANI_U8 isEseIniFeatureEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700623#endif
624
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800625#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700626 tANI_U8 isFastTransitionEnabled;
627 tANI_U8 RoamRssiDiff;
628 tANI_U8 nImmediateRoamRssiDiff;
629 tANI_BOOLEAN nRoamPrefer5GHz;
630 tANI_BOOLEAN nRoamIntraBand;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -0700631 tANI_BOOLEAN isWESModeEnabled;
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700632 tANI_BOOLEAN nRoamScanControl;
Varun Reddy Yeturu920df212013-05-22 08:07:23 -0700633 tANI_U8 nProbes;
634 tANI_U16 nRoamScanHomeAwayTime;
Jeff Johnson295189b2012-06-20 16:38:30 -0700635#endif
636
637#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
638 tCsrNeighborRoamConfig neighborRoamConfig;
639#endif
640
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800641 /* Instead of Reassoc, send ADDTS/DELTS even when ACM is off for that AC
Jeff Johnson295189b2012-06-20 16:38:30 -0700642 * This is mandated by WMM-AC certification */
643 tANI_BOOLEAN addTSWhenACMIsOff;
644
645 tANI_BOOLEAN fValidateList;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800646 //Remove this code once SLM_Sessionization is supported
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -0700647 //BMPS_WORKAROUND_NOT_NEEDED
Jeff Johnsone7245742012-09-05 17:12:55 -0700648 tANI_BOOLEAN doBMPSWorkaround;
Jeff Johnson295189b2012-06-20 16:38:30 -0700649
650 //To enable/disable scanning 2.4Ghz channels twice on a single scan request from HDD
651 tANI_BOOLEAN fScanTwice;
Jeff Johnsone7245742012-09-05 17:12:55 -0700652#ifdef WLAN_FEATURE_11AC
653 tANI_U32 nVhtChannelWidth;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -0800654 tANI_U8 txBFEnable;
Shailender Karmuchicc3fe442013-02-16 18:18:33 -0800655 tANI_U8 txBFCsnValue;
Ravi Joshi83bfaa12013-05-28 22:12:08 -0700656 tANI_BOOLEAN enableVhtFor24GHz;
Jeff Johnsone7245742012-09-05 17:12:55 -0700657#endif
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -0800658 tANI_U8 txLdpcEnable;
Jeff Johnson295189b2012-06-20 16:38:30 -0700659
Ravi Joshid2ca7c42013-07-23 08:37:49 -0700660 /*
661 * Enable/Disable heartbeat offload
662 */
663 tANI_BOOLEAN enableHeartBeatOffload;
krunal soni5afa96c2013-09-06 22:19:02 -0700664 tANI_U8 isAmsduSupportInAMPDU;
Srinivas Girigowda41c7c5f2013-10-21 19:01:38 -0700665 tANI_U8 nSelect5GHzMargin;
krunal sonie9002db2013-11-25 14:24:17 -0800666 tANI_U8 isCoalesingInIBSSAllowed;
Sandeep Puligillac80f26e2014-03-11 18:36:10 +0530667 tANI_U8 allowDFSChannelRoam;
c_hpothu0d5a7352014-03-22 12:30:25 +0530668 tANI_BOOLEAN initialScanSkipDFSCh;
Jeff Johnson295189b2012-06-20 16:38:30 -0700669}tCsrConfig;
670
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800671typedef struct tagCsrChannelPowerInfo
Jeff Johnson295189b2012-06-20 16:38:30 -0700672{
673 tListElem link;
674 tANI_U8 firstChannel;
675 tANI_U8 numChannels;
676 tANI_U8 txPower;
677 tANI_U8 interChannelOffset;
678}tCsrChannelPowerInfo;
679
680typedef struct tagRoamJoinStatus
681{
682 tSirResultCodes statusCode;
683 //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 -0800684 tANI_U32 reasonCode;
Kiran Kumar Lokerec8550fa2013-04-15 22:23:00 -0700685 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -0700686}tCsrRoamJoinStatus;
687
688typedef struct tagCsrOsChannelMask
689{
690 tANI_U8 numChannels;
691 tANI_BOOLEAN scanEnabled[WNI_CFG_VALID_CHANNEL_LIST_LEN];
692 tANI_U8 channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
693}tCsrOsChannelMask;
694
Agrawal Ashish0b6984f2014-04-05 18:35:45 +0530695typedef struct tagCsrVotes11d
696{
697 tANI_U8 votes;
698 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN];
699}tCsrVotes11d;
Jeff Johnson295189b2012-06-20 16:38:30 -0700700
701typedef struct tagCsrScanStruct
702{
703 tScanProfile scanProfile;
704 tANI_U32 nextScanID;
Madan Mohan Koyyalamudica43cdf2012-09-24 13:15:49 -0700705 tDblLinkList scanResultList;
Jeff Johnson295189b2012-06-20 16:38:30 -0700706 tDblLinkList tempScanResults;
707 tANI_BOOLEAN fScanEnable;
708 tANI_BOOLEAN fFullScanIssued;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530709 vos_timer_t hTimerGetResult;
Jeff Johnson295189b2012-06-20 16:38:30 -0700710#ifdef WLAN_AP_STA_CONCURRENCY
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530711 vos_timer_t hTimerStaApConcTimer;
Jeff Johnson295189b2012-06-20 16:38:30 -0700712#endif
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530713 vos_timer_t hTimerIdleScan;
714 vos_timer_t hTimerResultAging;
715 vos_timer_t hTimerResultCfgAging;
Jeff Johnson295189b2012-06-20 16:38:30 -0700716 tPalTimerHandle hTimerBgScan;
717 //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 -0800718 tANI_U8 channelOf11dInfo;
719 tANI_U8 scanResultCfgAgingTime;
Jeff Johnson295189b2012-06-20 16:38:30 -0700720 //changes on every scan, a flag to tell whether conflict 11d info found on each BSS
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800721 tANI_BOOLEAN fAmbiguous11dInfoFound;
Jeff Johnson295189b2012-06-20 16:38:30 -0700722 //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 -0800723 tANI_BOOLEAN fCurrent11dInfoMatch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700724 tANI_BOOLEAN f11dInfoReset; //to indicate whether the 11d info in CFG is reset to default
725 tSirScanType curScanType;
726 tCsrChannel baseChannels; //This are all the supported channels AND(&) to the current eBand
727 tCsrChannel channels11d;
728 tChannelListWithPower defaultPowerTable[WNI_CFG_VALID_CHANNEL_LIST_LEN]; //From NV
729 tChannelListWithPower defaultPowerTable40MHz[WNI_CFG_VALID_CHANNEL_LIST_LEN]; //From NV
730 tANI_U32 numChannelsDefault; //total channels of NV
731 tCsrChannel base20MHzChannels; //The channel base to work on
732 tCsrChannel base40MHzChannels; //center channels for 40MHz channels
733 tDblLinkList channelPowerInfoList24;
734 tDblLinkList channelPowerInfoList5G;
735 tANI_U32 nLastAgeTimeOut;
736 tANI_U32 nAgingCountDown;
Gopichand Nakkala114718f2013-03-25 19:19:46 -0700737 tANI_U8 countryCodeDefault[WNI_CFG_COUNTRY_CODE_LEN]; //The country code from NV
738 tANI_U8 countryCodeCurrent[WNI_CFG_COUNTRY_CODE_LEN];
739 tANI_U8 countryCode11d[WNI_CFG_COUNTRY_CODE_LEN];
Jeff Johnson295189b2012-06-20 16:38:30 -0700740 v_REGDOMAIN_t domainIdDefault; //default regulatory domain
741 v_REGDOMAIN_t domainIdCurrent; //current regulatory domain
Agarwal Ashishd9d72602013-09-13 00:06:17 +0530742 tCsrBssid currentCountryBssid; // Bssid for current country code
Mihir Shetebc866f62014-02-13 16:08:53 +0530743 tANI_S8 currentCountryRSSI; // RSSI for current country code
Jeff Johnson295189b2012-06-20 16:38:30 -0700744 tANI_BOOLEAN f11dInfoApplied;
745 tANI_BOOLEAN fCancelIdleScan;
Agrawal Ashish0b6984f2014-04-05 18:35:45 +0530746 tANI_U8 countryCodeCount;
747 tCsrVotes11d votes11d[CSR_MAX_NUM_COUNTRY_CODE]; //counts for various advertized country codes
748 //in 11d IE from probe rsp or beacons of neighboring APs;
749 //will use the most popular one (max count)
750 tANI_U8 countryCodeElected[WNI_CFG_COUNTRY_CODE_LEN];
751
752
Jeff Johnson295189b2012-06-20 16:38:30 -0700753#ifdef FEATURE_WLAN_WAPI
754// tANI_U16 NumBkidCandidate;
755// tBkidCandidateInfo BkidCandidateInfo[CSR_MAX_BKID_ALLOWED]; /* Move this as part of SessionEntry */
756#endif /* FEATURE_WLAN_WAPI */
757 tANI_U8 numBGScanChannel; //number of valid channels in the bgScanChannelList
758 tANI_U8 bgScanChannelList[WNI_CFG_BG_SCAN_CHANNEL_LIST_LEN];
759 //the ChannelInfo member is not used in this structure.
760 //numBGScanChannel and bgScanChannelList are used for the BG scan channel info
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800761 tCsrBGScanRequest bgScanParams;
Jeff Johnson295189b2012-06-20 16:38:30 -0700762 tANI_BOOLEAN fRestartIdleScan;
763 tANI_U32 nIdleScanTimeGap; //the time since last trying to trigger idle scan
764 tCsrOsChannelMask osScanChannelMask;//keep a track of channels to be scnned while in traffic condition
765 tANI_U16 nBssLimit; //the maximum number of BSS in scan cache
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800766 /*channelPowerInfoList24 has been seen corrupted. Set this flag to true trying to
Jeff Johnson295189b2012-06-20 16:38:30 -0700767 * detect when it happens. Adding this into code because we can't reproduce it easily.
768 * We don't know when it happens. */
769 tANI_BOOLEAN fValidateList;
770 /*Customer wants to start with an active scan based on the default country code.
771 * This optimization will minimize the driver load to association time.
772 * Based on this flag we will bypass the initial passive scan needed for 11d
773 * to determine the country code & domain */
774 tANI_BOOLEAN fEnableBypass11d;
775
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800776 /*Customer wants to optimize the scan time. Avoiding scans(passive) on DFS
777 * channels while swipping through both bands can save some time
Jeff Johnson295189b2012-06-20 16:38:30 -0700778 * (apprx 1.3 sec) */
779 tANI_BOOLEAN fEnableDFSChnlScan;
780
Jeff Johnsone7245742012-09-05 17:12:55 -0700781 /*
782 * To enable/disable scanning only 2.4Ghz channels on first scan
783 */
784 tANI_BOOLEAN fFirstScanOnly2GChnl;
785
Jeff Johnson295189b2012-06-20 16:38:30 -0700786 tANI_BOOLEAN fDropScanCmd; //true means we don't accept scan commands
787
788#ifdef WLAN_AP_STA_CONCURRENCY
789 tDblLinkList scanCmdPendingList;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800790#endif
Madan Mohan Koyyalamudi470d2cf2012-09-28 14:43:44 -0700791 tCsrChannel occupiedChannels; //This includes all channels on which candidate APs are found
Srinivas Girigowda41c7c5f2013-10-21 19:01:38 -0700792 tANI_S8 inScanResultBestAPRssi;
Mihir Shetefc7ff5b2014-01-27 11:30:05 +0530793
794 csrScanCompleteCallback callback11dScanDone;
Jeff Johnson295189b2012-06-20 16:38:30 -0700795}tCsrScanStruct;
796
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800797#ifdef FEATURE_WLAN_TDLS_INTERNAL
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800798/*
799 * struct to carry TDLS discovery info..
800 */
801typedef struct sCsrTdlsContext
802{
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800803 tDblLinkList tdlsPotentialPeerList ;
804 tANI_U16 tdlsCommonFlag ;
805 tANI_U16 tdlsCommonState ;
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800806 tANI_U16 tdlsPeerCount ;
807}tCsrTdlsCtxStruct;
808
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800809typedef struct sCsrTdlsPeerLinkInfo
810{
811 tListElem tdlsPeerStaLink ;
812 tSirTdlsPeerInfo tdlsDisPeerInfo ;
813}tCsrTdlsPeerLinkinfo ;
814#endif
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800815
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800816
817
Jeff Johnson295189b2012-06-20 16:38:30 -0700818
819//Save the connected information. This structure + connectedProfile
820//should contain all information about the connection
821typedef struct tagRoamCsrConnectedInfo
822{
823 tANI_U32 nBeaconLength; //the length, in bytes, of the beacon frame, can be 0
824 tANI_U32 nAssocReqLength; //the length, in bytes, of the assoc req frame, can be 0
825 tANI_U32 nAssocRspLength; //The length, in bytes, of the assoc rsp frame, can be 0
826#ifdef WLAN_FEATURE_VOWIFI_11R
827 tANI_U32 nRICRspLength; //Length of the parsed RIC response IEs received in reassoc response
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800828#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800829#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -0700830 tANI_U32 nTspecIeLength;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800831#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700832 tANI_U8 *pbFrames; //Point to a buffer contain the beacon, assoc req, assoc rsp frame, in that order
833 //user needs to use nBeaconLength, nAssocReqLength, nAssocRspLength to desice where
834 //each frame starts and ends.
835 tANI_U8 staId;
836}tCsrRoamConnectedInfo;
837
838
839typedef struct tagCsrLinkQualityIndInfo
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800840{
Jeff Johnson295189b2012-06-20 16:38:30 -0700841 csrRoamLinkQualityIndCallback callback;
842 void *context;
843}tCsrLinkQualityIndInfo;
844
845typedef struct tagCsrPeStatsReqInfo
846{
847 tListElem link; /* list links */
848 tANI_U32 statsMask;
849 tANI_U32 periodicity;
850 tANI_BOOLEAN rspPending;
851 vos_timer_t hPeStatsTimer;
852 tANI_BOOLEAN timerRunning;
853 tANI_U8 staId;
854 tANI_U8 numClient;
855 tpAniSirGlobal pMac;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800856 /* To remember if the peStats timer is stopped successfully or not */
Jeff Johnson295189b2012-06-20 16:38:30 -0700857 tANI_BOOLEAN timerStopFailed;
858
859}tCsrPeStatsReqInfo;
860
861typedef struct tagCsrStatsClientReqInfo
862{
863 tListElem link; /* list links */
864 eCsrStatsRequesterType requesterId;
865 tCsrStatsCallback callback;
866 tANI_U32 periodicity;
867 void *pContext;
868 tANI_U32 statsMask;
869 tCsrPeStatsReqInfo *pPeStaEntry;
870 tANI_U8 staId;
871 vos_timer_t timer;
872 tANI_BOOLEAN timerExpired;
873 tpAniSirGlobal pMac; // TODO: Confirm this change BTAMP
874}tCsrStatsClientReqInfo;
875
876typedef struct tagCsrTlStatsReqInfo
877{
878 tANI_U32 periodicity;
879 tANI_BOOLEAN timerRunning;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530880 vos_timer_t hTlStatsTimer;
Jeff Johnson295189b2012-06-20 16:38:30 -0700881 tANI_U8 numClient;
882}tCsrTlStatsReqInfo;
883
884typedef struct tagCsrRoamSession
885{
886 tANI_U8 sessionId; // Session ID
887 tANI_BOOLEAN sessionActive; // TRUE if it is used
888 tCsrBssid selfMacAddr; // For BT-AMP station, this serve as BSSID for self-BSS.
889 csrRoamCompleteCallback callback;
890 void *pContext;
891 eCsrConnectState connectState;
892 tCsrRoamConnectedProfile connectedProfile;
893 tCsrRoamConnectedInfo connectedInfo;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800894 tCsrRoamProfile *pCurRoamProfile;
Jeff Johnson295189b2012-06-20 16:38:30 -0700895 tSirBssDescription *pConnectBssDesc;
896 tANI_U16 NumPmkidCache;
897 tPmkidCacheInfo PmkidCacheInfo[CSR_MAX_PMKID_ALLOWED];
898 tANI_U8 cJoinAttemps;
899 //This may or may not have the up-to-date valid channel list
900 //It is used to get WNI_CFG_VALID_CHANNEL_LIST and not allocate memory all the time
901 tSirMacChanNum validChannelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
902 tANI_S32 sPendingCommands; //0 means CSR is ok to low power
903#ifdef FEATURE_WLAN_WAPI
904 tANI_U16 NumBkidCache;
905 tBkidCacheInfo BkidCacheInfo[CSR_MAX_BKID_ALLOWED];
906#endif /* FEATURE_WLAN_WAPI */
907 tANI_BOOLEAN fRoaming; //indicate whether CSR is roaming (either via lostlink or dynamic roaming)
908 //to remember some parameters needed for START_BSS.
909 //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 -0800910 tCsrRoamStartBssParams bssParams;
Jeff Johnson295189b2012-06-20 16:38:30 -0700911 tANI_U32 nWpaRsnReqIeLength; //the byte count of pWpaRsnIE;
912 tANI_U8 *pWpaRsnReqIE; //this contain the WPA/RSN IE in assoc request or the one sent in beacon (IBSS)
913 tANI_U32 nWpaRsnRspIeLength; //the byte count for pWpaRsnRspIE
914 tANI_U8 *pWpaRsnRspIE; //this contain the WPA/RSN IE in beacon/probe rsp
915#ifdef FEATURE_WLAN_WAPI
916 tANI_U32 nWapiReqIeLength; //the byte count of pWapiReqIE;
917 tANI_U8 *pWapiReqIE; //this contain the WAPI IE in assoc request or the one sent in beacon (IBSS)
918 tANI_U32 nWapiRspIeLength; //the byte count for pWapiRspIE
919 tANI_U8 *pWapiRspIE; //this contain the WAPI IE in beacon/probe rsp
920#endif /* FEATURE_WLAN_WAPI */
Agarwal Ashish4f616132013-12-30 23:32:50 +0530921 tANI_U32 nAddIEScanLength; //length of addIeScan
922 /* This contains the additional IE in (unicast)
923 * probe request at the time of join
924 */
925 tANI_U8 addIEScan[SIR_MAC_MAX_IE_LENGTH+2];
Jeff Johnson295189b2012-06-20 16:38:30 -0700926 tANI_U32 nAddIEAssocLength; //the byte count for pAddIeAssocIE
927 tANI_U8 *pAddIEAssoc; //this contains the additional IE in (re) assoc request
928
929 tANI_TIMESTAMP roamingStartTime; //in units of 10ms
930 tCsrTimerInfo roamingTimerInfo;
931 eCsrRoamingReason roamingReason;
932 tANI_BOOLEAN fCancelRoaming;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530933 vos_timer_t hTimerRoaming;
Jeff Johnson295189b2012-06-20 16:38:30 -0700934 eCsrRoamResult roamResult; //the roamResult that is used when the roaming timer fires
935 tCsrRoamJoinStatus joinFailStatusCode; //This is the reason code for join(assoc) failure
936 //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 -0800937 tANI_U32 roamingStatusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700938 tANI_U16 NumPmkidCandidate;
939 tPmkidCandidateInfo PmkidCandidateInfo[CSR_MAX_PMKID_ALLOWED];
940 #ifdef FEATURE_WLAN_WAPI
941 tANI_U16 NumBkidCandidate;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800942 tBkidCandidateInfo BkidCandidateInfo[CSR_MAX_BKID_ALLOWED];
Jeff Johnson295189b2012-06-20 16:38:30 -0700943#endif
944 tANI_BOOLEAN fWMMConnection;
Sandeep Puligillaaea98a22013-12-04 13:36:32 +0530945 tANI_BOOLEAN fQOSConnection;
946
Jeff Johnson295189b2012-06-20 16:38:30 -0700947#ifdef FEATURE_WLAN_BTAMP_UT_RF
948 //To retry a join later when it fails if so desired
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530949 vos_timer_t hTimerJoinRetry;
Jeff Johnson295189b2012-06-20 16:38:30 -0700950 tCsrTimerInfo joinRetryTimerInfo;
951 tANI_U32 maxRetryCount;
952#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800953#ifdef FEATURE_WLAN_ESE
954 tCsrEseCckmInfo eseCckmInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700955 tANI_BOOLEAN isPrevApInfoValid;
956 tSirMacSSid prevApSSID;
957 tCsrBssid prevApBssid;
958 tANI_U8 prevOpChannel;
959 tANI_U16 clientDissSecs;
960 tANI_U32 roamTS1;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800961#if defined(FEATURE_WLAN_ESE_UPLOAD)
962 tCsrEseCckmIe suppCckmIeInfo;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700963#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700964#endif
965 tANI_U8 bRefAssocStartCnt; //Tracking assoc start indication
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800966 /* to force the AP initiate fresh 802.1x authentication after re-association need to clear
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700967 * the PMKID cache. To clear the cache in this particular case this is added
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800968 * it is needed by the HS 2.0 passpoint certification 5.2.a and b testcases */
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700969 tANI_BOOLEAN fIgnorePMKIDCache;
Jeff Johnson295189b2012-06-20 16:38:30 -0700970} tCsrRoamSession;
971
972typedef struct tagCsrRoamStruct
973{
974 tANI_U32 nextRoamId;
975 tDblLinkList roamCmdPendingList;
976 tDblLinkList channelList5G;
977 tDblLinkList channelList24;
978 tCsrConfig configParam;
979 tANI_U32 numChannelsEeprom; //total channels of eeprom
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800980 tCsrChannel base20MHzChannels; //The channel base to work on
981 tCsrChannel base40MHzChannels; //center channels for 40MHz channels
982 eCsrRoamState curState[CSR_ROAM_SESSION_MAX];
Jeff Johnson295189b2012-06-20 16:38:30 -0700983 eCsrRoamSubState curSubState[CSR_ROAM_SESSION_MAX];
984 //This may or may not have the up-to-date valid channel list
985 //It is used to get WNI_CFG_VALID_CHANNEL_LIST and not allocate memory all the time
986 tSirMacChanNum validChannelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
987 tANI_U32 numValidChannels; //total number of channels in CFG
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800988
Jeff Johnson295189b2012-06-20 16:38:30 -0700989 tANI_S32 sPendingCommands;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530990 vos_timer_t hTimerWaitForKey; //To support timeout for WaitForKey state
Jeff Johnson295189b2012-06-20 16:38:30 -0700991 tCsrSummaryStatsInfo summaryStatsInfo;
992 tCsrGlobalClassAStatsInfo classAStatsInfo;
993 tCsrGlobalClassBStatsInfo classBStatsInfo;
994 tCsrGlobalClassCStatsInfo classCStatsInfo;
995 tCsrGlobalClassDStatsInfo classDStatsInfo;
996 tCsrPerStaStatsInfo perStaStatsInfo[CSR_MAX_STA];
997 tDblLinkList statsClientReqList;
998 tDblLinkList peStatsReqList;
999 tCsrTlStatsReqInfo tlStatsReqInfo;
1000 eCsrRoamLinkQualityInd vccLinkQuality;
1001 tCsrLinkQualityIndInfo linkQualityIndInfo;
1002 v_CONTEXT_t gVosContext; //used for interaction with TL
1003 //To specify whether an association or a IBSS is WMM enabled
1004 //This parameter is only valid during a join or start BSS command is being executed
1005 //tANI_BOOLEAN fWMMConnection; /* Moving it to be part of roamsession */
1006 v_U8_t ucACWeights[WLANTL_MAX_AC];
1007 /* TODO : Upto here */
1008 tCsrTimerInfo WaitForKeyTimerInfo;
1009 tCsrRoamSession *roamSession;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001010 tANI_U32 transactionId; // Current transaction ID for internal use.
1011#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Jeff Johnson295189b2012-06-20 16:38:30 -07001012 tCsrNeighborRoamControlInfo neighborRoamInfo;
1013#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001014#ifdef FEATURE_WLAN_LFR
1015 tANI_U8 isFastRoamIniFeatureEnabled;
1016#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001017#ifdef FEATURE_WLAN_ESE
1018 tANI_U8 isEseIniFeatureEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -07001019#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001020#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -07001021 tANI_U8 RoamRssiDiff;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07001022 tANI_BOOLEAN isWESModeEnabled;
Jeff Johnson43971f52012-07-17 12:26:56 -07001023#endif
Leela Venkata Kiran Kumar Reddy Chirala56df73f2014-01-30 14:18:00 -08001024 tANI_U32 deauthRspStatus;
Jeff Johnson295189b2012-06-20 16:38:30 -07001025}tCsrRoamStruct;
1026
1027
1028#define GET_NEXT_ROAM_ID(pRoamStruct) (((pRoamStruct)->nextRoamId + 1 == 0) ? 1 : (pRoamStruct)->nextRoamId)
1029#define CSR_IS_ROAM_STATE(pMac, state, sessionId) ( (state) == (pMac)->roam.curState[sessionId] )
1030
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001031#define CSR_IS_ROAM_STOP(pMac, sessionId) CSR_IS_ROAM_STATE( (pMac), eCSR_ROAMING_STATE_STOP, sessionId )
1032#define CSR_IS_ROAM_INIT(pMac, sessionId) CSR_IS_ROAM_STATE( (pMac), eCSR_ROAMING_STATE_INIT, sessionId )
Jeff Johnson295189b2012-06-20 16:38:30 -07001033#define CSR_IS_ROAM_SCANNING(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_SCANNING, sessionId )
1034#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 -08001035#define CSR_IS_ROAM_IDLE(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_IDLE, sessionId )
Jeff Johnson295189b2012-06-20 16:38:30 -07001036#define CSR_IS_ROAM_JOINED(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_JOINED, sessionId )
1037
1038#define CSR_IS_ROAM_SUBSTATE(pMac, subState, sessionId) ((subState) == (pMac)->roam.curSubState[sessionId])
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001039#define CSR_IS_ROAM_SUBSTATE_JOIN_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOIN_REQ, sessionId)
1040#define CSR_IS_ROAM_SUBSTATE_AUTH_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_AUTH_REQ, sessionId)
1041#define CSR_IS_ROAM_SUBSTATE_REASSOC_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_REASSOC_REQ, sessionId)
1042#define CSR_IS_ROAM_SUBSTATE_DISASSOC_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_REQ, sessionId)
1043#define CSR_IS_ROAM_SUBSTATE_DISASSOC_NO_JOIN(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_NOTHING_TO_JOIN, sessionId)
1044#define CSR_IS_ROAM_SUBSTATE_REASSOC_FAIL(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_REASSOC_FAILURE, sessionId)
1045#define CSR_IS_ROAM_SUBSTATE_DISASSOC_FORCED(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_FORCED, sessionId)
1046#define CSR_IS_ROAM_SUBSTATE_DEAUTH_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DEAUTH_REQ, sessionId)
1047#define CSR_IS_ROAM_SUBSTATE_START_BSS_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_START_BSS_REQ, sessionId)
1048#define CSR_IS_ROAM_SUBSTATE_STOP_BSS_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_STOP_BSS_REQ, sessionId)
1049#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 -07001050#define CSR_IS_ROAM_SUBSTATE_CONFIG(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_CONFIG, sessionId)
1051#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 -08001052#define CSR_IS_ROAM_SUBSTATE_DISASSOC_HO(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_HANDOFF, sessionId)
1053#define CSR_IS_ROAM_SUBSTATE_HO_NT(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOINED_NO_TRAFFIC, sessionId)
1054#define CSR_IS_ROAM_SUBSTATE_HO_NRT(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOINED_NON_REALTIME_TRAFFIC, sessionId)
1055#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 -07001056
1057#define CSR_IS_PHY_MODE_B_ONLY(pMac) \
1058 ((eCSR_DOT11_MODE_11b == (pMac)->roam.configParam.phyMode) ||\
1059 (eCSR_DOT11_MODE_11b_ONLY == (pMac)->roam.configParam.phyMode))
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001060
Jeff Johnson295189b2012-06-20 16:38:30 -07001061#define CSR_IS_PHY_MODE_G_ONLY(pMac) \
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001062 (eCSR_DOT11_MODE_11g == (pMac)->roam.configParam.phyMode || eCSR_DOT11_MODE_11g_ONLY == (pMac)->roam.configParam.phyMode)
1063
Jeff Johnson295189b2012-06-20 16:38:30 -07001064#define CSR_IS_PHY_MODE_A_ONLY(pMac) \
1065 ((eCSR_DOT11_MODE_11a == (pMac)->roam.configParam.phyMode) ||\
1066 (eCSR_DOT11_MODE_11a_ONLY == (pMac)->roam.configParam.phyMode))
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001067
Jeff Johnsone7245742012-09-05 17:12:55 -07001068#ifdef WLAN_FEATURE_11AC
1069#define CSR_IS_PHY_MODE_DUAL_BAND(phyMode) \
1070 ((eCSR_DOT11_MODE_abg & (phyMode)) || (eCSR_DOT11_MODE_11n & (phyMode)) || \
1071 (eCSR_DOT11_MODE_11ac & (phyMode)) || \
1072 (eCSR_DOT11_MODE_TAURUS & (phyMode)) || \
1073 (eCSR_DOT11_MODE_AUTO & (phyMode)))
1074#else
Jeff Johnson295189b2012-06-20 16:38:30 -07001075#define CSR_IS_PHY_MODE_DUAL_BAND(phyMode) \
1076 ((eCSR_DOT11_MODE_abg & (phyMode)) || (eCSR_DOT11_MODE_11n & (phyMode)) || \
1077 (eCSR_DOT11_MODE_TAURUS & (phyMode)) || \
1078 (eCSR_DOT11_MODE_AUTO & (phyMode)))
Jeff Johnsone7245742012-09-05 17:12:55 -07001079#endif
1080
Jeff Johnson295189b2012-06-20 16:38:30 -07001081
1082// this function returns TRUE if the NIC is operating exclusively in the 2.4 GHz band, meaning
1083// it is NOT operating in the 5.0 GHz band.
1084#define CSR_IS_24_BAND_ONLY(pMac) \
1085 (eCSR_BAND_24 == (pMac)->roam.configParam.eBand)
1086
1087#define CSR_IS_5G_BAND_ONLY(pMac) \
1088 (eCSR_BAND_5G == (pMac)->roam.configParam.eBand)
1089
1090#define CSR_IS_RADIO_DUAL_BAND(pMac) \
1091 (eCSR_BAND_ALL == (pMac)->roam.configParam.bandCapability)
1092
1093#define CSR_IS_RADIO_BG_ONLY(pMac) \
1094 (eCSR_BAND_24 == (pMac)->roam.configParam.bandCapability)
1095
1096// this function returns TRUE if the NIC is operating exclusively in the 5.0 GHz band, meaning
1097// it is NOT operating in the 2.4 GHz band
1098#define CSR_IS_RADIO_A_ONLY(pMac) \
1099 (eCSR_BAND_5G == (pMac)->roam.configParam.bandCapability)
1100
1101// this function returns TRUE if the NIC is operating in both bands.
1102#define CSR_IS_OPEARTING_DUAL_BAND(pMac) \
1103 ((eCSR_BAND_ALL == (pMac)->roam.configParam.bandCapability) && (eCSR_BAND_ALL == (pMac)->roam.configParam.eBand))
1104
1105// this function returns TRUE if the NIC can operate in the 5.0 GHz band (could operate in the
1106// 2.4 GHz band also).
1107#define CSR_IS_OPERATING_A_BAND(pMac) \
1108 (CSR_IS_OPEARTING_DUAL_BAND((pMac)) || CSR_IS_RADIO_A_ONLY((pMac)) || CSR_IS_5G_BAND_ONLY((pMac)))
1109
1110// this function returns TRUE if the NIC can operate in the 2.4 GHz band (could operate in the
1111// 5.0 GHz band also).
1112#define CSR_IS_OPERATING_BG_BAND(pMac) \
1113 (CSR_IS_OPEARTING_DUAL_BAND((pMac)) || CSR_IS_RADIO_BG_ONLY((pMac)) || CSR_IS_24_BAND_ONLY((pMac)))
1114
1115#define CSR_IS_CHANNEL_5GHZ(chnNum) \
Jeff Johnsone7245742012-09-05 17:12:55 -07001116 (((chnNum) >= CSR_MIN_5GHz_CHANNEL_NUMBER) && ((chnNum) <= CSR_MAX_5GHz_CHANNEL_NUMBER))
Jeff Johnson295189b2012-06-20 16:38:30 -07001117
Srinivas Girigowdade697412013-02-14 16:31:48 -08001118#define CSR_IS_CHANNEL_DFS(chnNum) \
1119 (NV_CHANNEL_ENABLE != vos_nv_getChannelEnabledState(chnNum))
1120
Jeff Johnson295189b2012-06-20 16:38:30 -07001121#define CSR_IS_CHANNEL_24GHZ(chnNum) \
1122 (((chnNum) > 0) && ((chnNum) <= CSR_MAX_24GHz_CHANNEL_NUMBER))
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001123
Jeff Johnson295189b2012-06-20 16:38:30 -07001124#define CSR_IS_SAME_BAND_CHANNELS(ch1, ch2) (CSR_IS_CHANNEL_5GHZ(ch1) == CSR_IS_CHANNEL_5GHZ(ch2))
1125
1126
1127#define CSR_IS_11D_INFO_FOUND(pMac) \
1128 (0 != (pMac)->scan.channelOf11dInfo)
1129// DEAUTHIND
1130#define CSR_IS_ROAMING(pSession) ((CSR_IS_LOSTLINK_ROAMING((pSession)->roamingReason)) || \
1131 (eCsrDynamicRoaming == (pSession)->roamingReason) || \
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001132 (eCsrReassocRoaming == (pSession)->roamingReason))
Jeff Johnson295189b2012-06-20 16:38:30 -07001133
1134
1135#define CSR_IS_SET_KEY_COMMAND( pCommand ) ( eSmeCommandSetKey == (pCommand)->command )
1136
1137#define CSR_IS_ADDTS_WHEN_ACMOFF_SUPPORTED(pMac) (pMac->roam.configParam.addTSWhenACMIsOff)
1138// DEAUTHIND
1139#define CSR_IS_LOSTLINK_ROAMING(reason) ((eCsrLostlinkRoamingDisassoc == (reason)) || (eCsrLostlinkRoamingDeauth == (reason)))
1140
Venkata Prathyusha Kuntupalli239278b2013-03-26 15:58:18 -07001141#define CSR_IS_ROAMING_COMMAND(pCommand) ((eCsrLostLink1 == (pCommand)->u.roamCmd.roamReason) ||\
1142 (eCsrLostLink2 == (pCommand)->u.roamCmd.roamReason) ||\
1143 (eCsrLostLink3 == (pCommand)->u.roamCmd.roamReason) )
1144
1145
Jeff Johnson295189b2012-06-20 16:38:30 -07001146//Stop CSR from asking for IMPS, This function doesn't disable IMPS from CSR
1147void csrScanSuspendIMPS( tpAniSirGlobal pMac );
1148//Start CSR from asking for IMPS. This function doesn't trigger CSR to request entering IMPS
1149//because IMPS maybe disabled.
1150void csrScanResumeIMPS( tpAniSirGlobal pMac );
1151
1152eHalStatus csrInitGetChannels(tpAniSirGlobal pMac);
Srinivas, Dasari42bf7702014-02-07 11:29:53 +05301153eHalStatus csrScanFilterResults(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -07001154
1155eHalStatus csrSetModifyProfileFields(tpAniSirGlobal pMac, tANI_U32 sessionId,
1156 tCsrRoamModifyProfileFields *pModifyProfileFields);
1157/* ---------------------------------------------------------------------------
1158 \fn csrGetModifyProfileFields
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001159 \brief HDD or SME - QOS calls this function to get the current values of
Jeff Johnson295189b2012-06-20 16:38:30 -07001160 connected profile fields changing which can cause reassoc.
1161 This function must be called after CFG is downloaded and STA is in connected
1162 state.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001163 \param pModifyProfileFields - pointer to the connected profile fields
Jeff Johnson295189b2012-06-20 16:38:30 -07001164 changing which can cause reassoc
1165
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001166 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001167 -------------------------------------------------------------------------------*/
1168eHalStatus csrGetModifyProfileFields(tpAniSirGlobal pMac, tANI_U32 sessionId,
1169 tCsrRoamModifyProfileFields * pModifyProfileFields);
1170void csrSetGlobalCfgs( tpAniSirGlobal pMac );
1171void csrSetDefaultDot11Mode( tpAniSirGlobal pMac );
1172void csrScanSetChannelMask(tpAniSirGlobal pMac, tCsrChannelInfo *pChannelInfo);
1173tANI_BOOLEAN csrIsConnStateDisconnected(tpAniSirGlobal pMac, tANI_U32 sessionId);
1174tANI_BOOLEAN csrIsConnStateConnectedIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1175tANI_BOOLEAN csrIsConnStateDisconnectedIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1176tANI_BOOLEAN csrIsConnStateConnectedInfra( tpAniSirGlobal pMac, tANI_U32 sessionId );
1177tANI_BOOLEAN csrIsConnStateConnected( tpAniSirGlobal pMac, tANI_U32 sessionId );
1178tANI_BOOLEAN csrIsConnStateInfra( tpAniSirGlobal pMac, tANI_U32 sessionId );
1179tANI_BOOLEAN csrIsConnStateIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1180tANI_BOOLEAN csrIsConnStateWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1181tANI_BOOLEAN csrIsConnStateConnectedWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1182tANI_BOOLEAN csrIsConnStateDisconnectedWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1183tANI_BOOLEAN csrIsAnySessionInConnectState( tpAniSirGlobal pMac );
1184tANI_BOOLEAN csrIsAllSessionDisconnected( tpAniSirGlobal pMac );
Madan Mohan Koyyalamudi48081ef2012-12-04 16:49:55 -08001185tANI_BOOLEAN csrIsStaSessionConnected( tpAniSirGlobal pMac );
1186tANI_BOOLEAN csrIsP2pSessionConnected( tpAniSirGlobal pMac );
Madan Mohan Koyyalamudid3d22592012-09-24 14:01:29 -07001187tANI_BOOLEAN csrIsAnySessionConnected( tpAniSirGlobal pMac );
Jeff Johnson295189b2012-06-20 16:38:30 -07001188tANI_BOOLEAN csrIsInfraConnected( tpAniSirGlobal pMac );
1189tANI_BOOLEAN csrIsConcurrentInfraConnected( tpAniSirGlobal pMac );
Jeff Johnsone7245742012-09-05 17:12:55 -07001190tANI_BOOLEAN csrIsConcurrentSessionRunning( tpAniSirGlobal pMac );
Jeff Johnsone7245742012-09-05 17:12:55 -07001191tANI_BOOLEAN csrIsInfraApStarted( tpAniSirGlobal pMac );
Jeff Johnson295189b2012-06-20 16:38:30 -07001192tANI_BOOLEAN csrIsIBSSStarted( tpAniSirGlobal pMac );
1193tANI_BOOLEAN csrIsBTAMPStarted( tpAniSirGlobal pMac );
1194tANI_BOOLEAN csrIsBTAMP( tpAniSirGlobal pMac, tANI_U32 sessionId );
1195eHalStatus csrIsBTAMPAllowed( tpAniSirGlobal pMac, tANI_U32 chnId );
Jeff Johnsone7245742012-09-05 17:12:55 -07001196tANI_BOOLEAN csrIsValidMcConcurrentSession(tpAniSirGlobal pMac, tANI_U32 sessionId,
1197 tSirBssDescription *pBssDesc);
Jeff Johnson295189b2012-06-20 16:38:30 -07001198tANI_BOOLEAN csrIsConnStateConnectedInfraAp( tpAniSirGlobal pMac, tANI_U32 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -07001199/*----------------------------------------------------------------------------
1200 \fn csrRoamRegisterLinkQualityIndCallback
1201
1202 \brief
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001203 a CSR function to allow HDD to register a callback handler with CSR for
1204 link quality indications.
Jeff Johnson295189b2012-06-20 16:38:30 -07001205
1206 Only one callback may be registered at any time.
1207 In order to deregister the callback, a NULL cback may be provided.
1208
1209 Registration happens in the task context of the caller.
1210
1211 \param callback - Call back being registered
1212 \param pContext - user data
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001213
Jeff Johnson295189b2012-06-20 16:38:30 -07001214 DEPENDENCIES: After CSR open
1215
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001216 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001217-----------------------------------------------------------------------------*/
1218eHalStatus csrRoamRegisterLinkQualityIndCallback(tpAniSirGlobal pMac,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001219 csrRoamLinkQualityIndCallback callback,
Jeff Johnson295189b2012-06-20 16:38:30 -07001220 void *pContext);
1221/* ---------------------------------------------------------------------------
1222 \fn csrGetStatistics
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001223 \brief csr function that client calls to register a callback to get
1224 different PHY level statistics from CSR.
1225
Jeff Johnson295189b2012-06-20 16:38:30 -07001226 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
1227 \param statsMask - The different category/categories of stats requester is looking for
1228 \param callback - SME sends back the requested stats using the callback
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001229 \param periodicity - If requester needs periodic update, 0 means it's an one
Jeff Johnson295189b2012-06-20 16:38:30 -07001230 time request
1231 \param cache - If requester is happy with cached stats
1232 \param staId - The station ID for which the stats is requested for
1233 \param pContext - user context to be passed back along with the callback
1234
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001235 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001236 ---------------------------------------------------------------------------*/
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001237eHalStatus csrGetStatistics(tpAniSirGlobal pMac, eCsrStatsRequesterType requesterId,
1238 tANI_U32 statsMask,
1239 tCsrStatsCallback callback,
1240 tANI_U32 periodicity, tANI_BOOLEAN cache,
Jeff Johnson295189b2012-06-20 16:38:30 -07001241 tANI_U8 staId, void *pContext);
1242
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +05301243/* ---------------------------------------------------------------------------
1244 \fn csrGetTLSTAState
1245 \helper function to get the TL STA State whenever the function is called.
1246
1247 \param staId - The staID to be passed to the TL
1248 to get the relevant TL STA State
1249 \return the state as tANI_U16
1250 ---------------------------------------------------------------------------*/
1251tANI_U16 csrGetTLSTAState(tpAniSirGlobal pMac, tANI_U8 staId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001252
1253eHalStatus csrGetRssi(tpAniSirGlobal pMac,tCsrRssiCallback callback,tANI_U8 staId,tCsrBssid bssId,void * pContext,void * pVosContext);
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05301254
1255/* ---------------------------------------------------------------------------
1256 \fn csrGetSnr
1257 \brief csr function that client calls to register a callback to get
1258 SNR stored in TL
1259
1260 \param callback - SME sends back the requested stats using the callback
1261 \param staId - The station ID for which the stats is requested for
1262 \param bssid - The bssid for the connected session
1263 \param pContext - user context to be passed back along with the callback
1264
1265 \return eHalStatus
1266 ---------------------------------------------------------------------------*/
1267eHalStatus csrGetSnr(tpAniSirGlobal pMac, tCsrSnrCallback callback,
1268 tANI_U8 staId, tCsrBssid bssId, void *pContext);
1269
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001270#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08001271eHalStatus csrGetRoamRssi(tpAniSirGlobal pMac,
1272 tCsrRssiCallback callback,
1273 tANI_U8 staId,
1274 tCsrBssid bssId,
1275 void * pContext,
1276 void * pVosContext);
1277#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001278
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001279#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001280eHalStatus csrGetTsmStats(tpAniSirGlobal pMac, tCsrTsmStatsCallback callback, tANI_U8 staId,
1281 tCsrBssid bssId, void *pContext, void* pVosContext,
1282 tANI_U8 tid);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001283#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001284
Jeff Johnson295189b2012-06-20 16:38:30 -07001285eHalStatus csrRoamRegisterCallback(tpAniSirGlobal pMac, csrRoamCompleteCallback callback, void *pContext);
1286/* ---------------------------------------------------------------------------
1287 \fn csrGetConfigParam
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001288 \brief HDD calls this function to get the global settings currently maintained by CSR.
Jeff Johnson295189b2012-06-20 16:38:30 -07001289 \param pParam - caller allocated memory
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001290 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001291 -------------------------------------------------------------------------------*/
1292eHalStatus csrGetConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam);
1293
1294/* ---------------------------------------------------------------------------
1295 \fn csrMsgProcessor
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001296 \brief HDD calls this function to change some global settings.
Jeff Johnson295189b2012-06-20 16:38:30 -07001297 caller must set the all fields or call csrGetConfigParam to prefill the fields.
1298 \param pParam - caller allocated memory
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001299 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001300 -------------------------------------------------------------------------------*/
1301eHalStatus csrChangeDefaultConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam);
1302
1303
1304/* ---------------------------------------------------------------------------
1305 \fn csrMsgProcessor
1306 \brief HDD calls this function for the messages that are handled by CSR.
1307 \param pMsgBuf - a pointer to a buffer that maps to various structures base on the message type.
1308 The beginning of the buffer can always map to tSirSmeRsp.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001309 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001310 -------------------------------------------------------------------------------*/
1311eHalStatus csrMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf );
1312
1313/* ---------------------------------------------------------------------------
1314 \fn csrOpen
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001315 \brief This function must be called before any API call to CSR.
1316 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001317 -------------------------------------------------------------------------------*/
1318eHalStatus csrOpen(tpAniSirGlobal pMac);
Mihir Shetee1093ba2014-01-21 20:13:32 +05301319
1320/* ---------------------------------------------------------------------------
1321 \fn csrInitChannels
1322 \brief This function must be called to initialize CSR channel lists
1323 \return eHalStatus
1324 -------------------------------------------------------------------------------*/
1325eHalStatus csrInitChannels(tpAniSirGlobal pMac);
1326
Jeff Johnson295189b2012-06-20 16:38:30 -07001327/* ---------------------------------------------------------------------------
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301328 \fn csrInitChannelsForCC
1329 \brief This function must be called to issue reg hint
1330 \return eHalStatus
1331 -------------------------------------------------------------------------------*/
1332eHalStatus csrInitChannelsForCC(tpAniSirGlobal pMac);
1333
1334/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001335 \fn csrClose
1336 \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 -08001337 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001338 -------------------------------------------------------------------------------*/
1339eHalStatus csrClose(tpAniSirGlobal pMac);
1340/* ---------------------------------------------------------------------------
1341 \fn csrStart
1342 \brief To start CSR.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001343 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001344 -------------------------------------------------------------------------------*/
1345eHalStatus csrStart(tpAniSirGlobal pMac);
1346/* ---------------------------------------------------------------------------
1347 \fn csrStop
1348 \brief To stop CSR. CSR still keeps its current setting.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001349 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001350 -------------------------------------------------------------------------------*/
Kiet Lama72a2322013-11-15 11:18:11 +05301351eHalStatus csrStop(tpAniSirGlobal pMac, tHalStopType stopType);
Jeff Johnson295189b2012-06-20 16:38:30 -07001352/* ---------------------------------------------------------------------------
1353 \fn csrReady
1354 \brief To let CSR is ready to operate
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001355 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001356 -------------------------------------------------------------------------------*/
1357eHalStatus csrReady(tpAniSirGlobal pMac);
1358
1359#ifdef FEATURE_WLAN_WAPI
1360eHalStatus csrRoamGetBKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pNum,
1361 tBkidCacheInfo *pBkidCache);
1362
1363
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001364eHalStatus csrScanGetBKIDCandidateList(tpAniSirGlobal pMac, tANI_U32 sessionId,
Jeff Johnson295189b2012-06-20 16:38:30 -07001365 tBkidCandidateInfo *pBkidList, tANI_U32 *pNumItems );
1366tANI_U32 csrRoamGetNumBKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId);
1367eHalStatus csrRoamSetBKIDCache( tpAniSirGlobal pMac, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
1368 tANI_U32 numItems );
1369/* ---------------------------------------------------------------------------
1370 \fn csrRoamGetWapiReqIE
1371 \brief return the WAPI IE CSR passes to PE to JOIN request or START_BSS request
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001372 \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 -07001373 needed or IE length in pBuf.
1374 \param pBuf - Caller allocated memory that contain the IE field, if any, upon return
1375 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
1376 -------------------------------------------------------------------------------*/
1377eHalStatus csrRoamGetWapiReqIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf);
1378
1379/* ---------------------------------------------------------------------------
1380 \fn csrRoamGetWapiRspIE
1381 \brief return the WAPI IE from the beacon or probe rsp if connected
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001382 \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 -07001383 needed or IE length in pBuf.
1384 \param pBuf - Caller allocated memory that contain the IE field, if any, upon return
1385 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
1386 -------------------------------------------------------------------------------*/
1387eHalStatus csrRoamGetWapiRspIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf);
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001388tANI_U8 csrConstructWapiIe( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
Jeff Johnson295189b2012-06-20 16:38:30 -07001389 tSirBssDescription *pSirBssDesc, tDot11fBeaconIEs *pIes, tCsrWapiIe *pWapiIe );
1390#endif /* FEATURE_WLAN_WAPI */
1391
Jeff Johnson295189b2012-06-20 16:38:30 -07001392eHalStatus csrRoamUpdateAPWPSIE( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirAPWPSIEs *pAPWPSIES );
1393eHalStatus csrRoamUpdateWPARSNIEs( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirRSNie * pAPSirRSNie);
Jeff Johnson295189b2012-06-20 16:38:30 -07001394void csrSetCfgPrivacy( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy );
1395tANI_S8 csrGetInfraSessionId( tpAniSirGlobal pMac );
1396tANI_U8 csrGetInfraOperationChannel( tpAniSirGlobal pMac, tANI_U8 sessionId);
1397tANI_U8 csrGetConcurrentOperationChannel( tpAniSirGlobal pMac );
1398
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001399eHalStatus csrRoamCopyConnectProfile(tpAniSirGlobal pMac, tANI_U32 sessionId,
Jeff Johnson295189b2012-06-20 16:38:30 -07001400 tCsrRoamConnectedProfile *pProfile);
1401tANI_BOOLEAN csrIsSetKeyAllowed(tpAniSirGlobal pMac, tANI_U32 sessionId);
1402
1403void csrSetOppositeBandChannelInfo( tpAniSirGlobal pMac );
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001404void csrConstructCurrentValidChannelList( tpAniSirGlobal pMac, tDblLinkList *pChannelSetList,
Jeff Johnson295189b2012-06-20 16:38:30 -07001405 tANI_U8 *pChannelList, tANI_U8 bSize, tANI_U8 *pNumChannels );
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08001406
1407#ifdef FEATURE_WLAN_SCAN_PNO
Srikant Kuppa066904f2013-05-07 13:56:02 -07001408eHalStatus csrScanSavePreferredNetworkFound(tpAniSirGlobal pMac,
1409 tSirPrefNetworkFoundInd *pPrefNetworkFoundInd);
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08001410#endif //FEATURE_WLAN_SCAN_PNO
Jeff Johnson295189b2012-06-20 16:38:30 -07001411#endif
1412
1413#ifdef WLAN_FEATURE_VOWIFI_11R
1414//Returns whether the current association is a 11r assoc or not
1415tANI_BOOLEAN csrRoamIs11rAssoc(tpAniSirGlobal pMac);
1416#endif
1417
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001418#ifdef FEATURE_WLAN_ESE
1419//Returns whether the current association is a ESE assoc or not
1420tANI_BOOLEAN csrRoamIsESEAssoc(tpAniSirGlobal pMac);
1421tANI_BOOLEAN csrRoamIsEseIniFeatureEnabled(tpAniSirGlobal pMac);
1422tANI_BOOLEAN csrNeighborRoamIsESEAssoc(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -07001423#endif
1424
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001425//Remove this code once SLM_Sessionization is supported
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001426//BMPS_WORKAROUND_NOT_NEEDED
Jeff Johnson295189b2012-06-20 16:38:30 -07001427void csrDisconnectAllActiveSessions(tpAniSirGlobal pMac);
Mohit Khanna349bc392012-09-11 17:24:52 -07001428
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001429#ifdef FEATURE_WLAN_LFR
1430//Returns whether "Legacy Fast Roaming" is enabled...or not
Madan Mohan Koyyalamudi03aae5f2012-11-28 01:51:22 +05301431tANI_BOOLEAN csrRoamIsFastRoamEnabled(tpAniSirGlobal pMac, tANI_U32 sessionId);
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001432#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1433tANI_BOOLEAN csrRoamIsRoamOffloadScanEnabled(tpAniSirGlobal pMac);
1434#endif
Madan Mohan Koyyalamudi470d2cf2012-09-28 14:43:44 -07001435tANI_BOOLEAN csrIsChannelPresentInList( tANI_U8 *pChannelList, int numChannels, tANI_U8 channel );
1436VOS_STATUS csrAddToChannelListFront( tANI_U8 *pChannelList, int numChannels, tANI_U8 channel );
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001437#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1438eHalStatus csrScanRequestLfrResult(tpAniSirGlobal pMac, tANI_U32 sessionId,
1439 csrScanCompleteCallback callback, void *pContext);
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07001440eHalStatus csrRoamOffloadScanRspHdlr(tpAniSirGlobal pMac, tANI_U8 reason);
1441eHalStatus csrHandoffRequest(tpAniSirGlobal pMac, tCsrHandoffRequest *pHandoffInfo);
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001442#endif
1443tANI_BOOLEAN csrRoamIsStaMode(tpAniSirGlobal pMac, tANI_U32 sessionId);
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001444#endif
1445