blob: d6be316926b93ce302b9174ffad0a9e2894e9104 [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/*
Kiet Lama7f454d2014-07-24 12:04:06 -070023 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
Kiet Lam0fb93dd2014-02-19 00:32:59 -080026 */
27
Jeff Johnson295189b2012-06-20 16:38:30 -070028
Kiet Lama7f454d2014-07-24 12:04:06 -070029
30
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080031/** ------------------------------------------------------------------------- *
32 ------------------------------------------------------------------------- *
Jeff Johnson295189b2012-06-20 16:38:30 -070033
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080034
Jeff Johnson295189b2012-06-20 16:38:30 -070035 \file csrInternal.h
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080036
Jeff Johnson295189b2012-06-20 16:38:30 -070037 Define internal data structure for MAC.
Jeff Johnson295189b2012-06-20 16:38:30 -070038 ========================================================================== */
39#ifndef CSRINTERNAL_H__
40#define CSRINTERNAL_H__
41
Jeff Johnson295189b2012-06-20 16:38:30 -070042#include "vos_status.h"
43#include "vos_lock.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070044
45#include "palTimer.h"
46#include "csrSupport.h"
47#include "vos_nvitem.h"
48#include "wlan_qct_tl.h"
49
50#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
51#include "csrNeighborRoam.h"
52#endif
53
54#define CSR_MAX_STA (HAL_NUM_STA)
55
56#define CSR_SME_SCAN_FLAGS_DELETE_CACHE 0x80
57
58#define CSR_TITAN_MAX_RATE_MIMO_CB 240
59#define CSR_TITAN_MAX_RATE_MIMO 126
60
61//define scan return criteria. LIM should use these define as well
62#define CSR_SCAN_RETURN_AFTER_ALL_CHANNELS ( 0 )
63#define CSR_SCAN_RETURN_AFTER_FIRST_MATCH ( 0x01 )
64#define CSR_SCAN_RETURN_AFTER_5_BAND_11d_FOUND ( 0x80 )
65#define CSR_SCAN_RETURN_AFTER_24_BAND_11d_FOUND ( 0x40 )
66#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 -070067#define CSR_NUM_RSSI_CAT 15
Jeff Johnson295189b2012-06-20 16:38:30 -070068#define CSR_MAX_STATISTICS_REQ 10
Varun Reddy Yeturu9d4102c2013-12-02 15:47:03 -080069#define CSR_ROAM_SCAN_CHANNEL_SWITCH_TIME 3
Jeff Johnson295189b2012-06-20 16:38:30 -070070
71//Support for multiple session
72#define CSR_SESSION_ID_INVALID 0xFF // session ID invalid
73#define CSR_ROAM_SESSION_MAX 5 // No of sessions to be supported, and a
74 // session is for Infra, IBSS or BT-AMP
75
76#define CSR_IS_SESSION_VALID( pMac, sessionId ) ( ( (sessionId) < CSR_ROAM_SESSION_MAX ) \
77 && ( (pMac)->roam.roamSession[(sessionId)].sessionActive ) )
78#define CSR_GET_SESSION( pMac, sessionId ) \
79( \
80 (sessionId < CSR_ROAM_SESSION_MAX) ? \
81 (&(pMac)->roam.roamSession[(sessionId)]) :\
82 NULL \
83)
84
Agrawal Ashish0b6984f2014-04-05 18:35:45 +053085#define CSR_MAX_NUM_COUNTRY_CODE 100
Srinivas Girigowda41c7c5f2013-10-21 19:01:38 -070086#define CSR_IS_SELECT_5GHZ_MARGIN( pMac ) \
87( \
88 (((pMac)->roam.configParam.nSelect5GHzMargin)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
89)
90
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -080091#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -080092#define CSR_IS_ROAM_PREFER_5GHZ( pMac ) \
93( \
94 (((pMac)->roam.configParam.nRoamPrefer5GHz)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
95)
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -070096#define CSR_IS_ROAM_INTRA_BAND_ENABLED( pMac ) \
97( \
98 (((pMac)->roam.configParam.nRoamIntraBand)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
99)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -0800100#endif
101
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700102#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
103#define CSR_IS_ROAM_SCAN_OFFLOAD_ENABLED( pMac ) \
104( \
105 (((pMac)->roam.configParam.isRoamOffloadScanEnabled)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
106)
Srinivas Girigowda830bbd02013-06-13 19:44:16 -0700107
108#define CSR_IS_FASTROAM_IN_CONCURRENCY_INI_FEATURE_ENABLED( pMac ) \
109( \
110 (((pMac)->roam.configParam.bFastRoamInConIniFeatureEnabled)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
111)
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700112#endif
113
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800114//Support for "Fast roaming" (i.e., ESE, LFR, or 802.11r.)
Madan Mohan Koyyalamudi470d2cf2012-09-28 14:43:44 -0700115#define CSR_BG_SCAN_OCCUPIED_CHANNEL_LIST_LEN 15
Jeff Johnson295189b2012-06-20 16:38:30 -0700116
117typedef enum
118{
119 //eCSR_CFG_DOT11_MODE_BEST = 0,
120 eCSR_CFG_DOT11_MODE_TAURUS = 0,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800121 eCSR_CFG_DOT11_MODE_ABG,
122 eCSR_CFG_DOT11_MODE_11A,
123 eCSR_CFG_DOT11_MODE_11B,
124 eCSR_CFG_DOT11_MODE_11G,
125 eCSR_CFG_DOT11_MODE_11N,
126 eCSR_CFG_DOT11_MODE_POLARIS,
127 eCSR_CFG_DOT11_MODE_TITAN,
Jeff Johnsone7245742012-09-05 17:12:55 -0700128#ifdef WLAN_FEATURE_11AC
129 eCSR_CFG_DOT11_MODE_11AC,
130#endif
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800131 eCSR_CFG_DOT11_MODE_11G_ONLY,
132 eCSR_CFG_DOT11_MODE_11N_ONLY,
Jeff Johnsone7245742012-09-05 17:12:55 -0700133#ifdef WLAN_FEATURE_11AC
134 eCSR_CFG_DOT11_MODE_11AC_ONLY,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800135#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700136 //This value can never set to CFG. It is for CSR's internal use
137 eCSR_CFG_DOT11_MODE_AUTO,
138}eCsrCfgDot11Mode; //Used to determine what to set to the WNI_CFG_DOT11_MODE
139
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800140typedef enum etCsrRoamCommands
Jeff Johnson295189b2012-06-20 16:38:30 -0700141{
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800142 eCsrRoamNoCommand,
Jeff Johnson295189b2012-06-20 16:38:30 -0700143 eCsrRoamCommandScan,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800144 eCsrRoamCommandRoam,
145 eCsrRoamCommandWmStatusChange,
Jeff Johnson295189b2012-06-20 16:38:30 -0700146 eCsrRoamCommandSetKey,
147 eCsrRoamCommandRemoveKey,
148
149} eCsrRoamCommands;
150
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800151typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700152{
153 eCsrScanOther = 1,
154 eCsrScanLostLink1,
155 eCsrScanLostLink2,
156 eCsrScanLostLink3,
157 eCsrScanLostLink4,
158 eCsrScan11d1, //First 11d scan
159 eCsrScan11d2, //First 11d scan has failed
160 eCsrScan11dDone, //11d scan succeeded, try the rest of the channel
161 eCsrScanUserRequest,
162 eCsrScanGetResult,
163 eCsrScanSetBGScanParam, //used for HO too - bg scan request in NT Handoff sub-state
164 eCsrScanForSsid,
165 eCsrScanForCapsChange,
166 eCsrScanBGScanAbort,
167 eCsrScanBGScanEnable,
168 eCsrScanIdleScan,
169 eCsrScanGetScanChnInfo, //To get the list of channels scanned
170
171 eCsrScanBgScan, // bg scan request in NRT & RT Handoff sub-states
172 eCsrScanProbeBss, // directed probe on an entry from the candidate list - HO
173 eCsrScanAbortBgScan, //aborting a BG scan (meaning the scan is triggered by LIM timer)
174 eCsrScanAbortNormalScan, //aborting a normal scan (the scan is trigger by eWNI_SME_SCAN_REQ)
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700175 eCsrScanP2PFindPeer,
176 eCsrScanGetLfrResult, // get the LFR candidates from PE scan cache
Jeff Johnson295189b2012-06-20 16:38:30 -0700177}eCsrScanReason;
178
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800179typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700180{
181 eCsrNoConnection, // Roaming because we have not established the initial connection.
182 eCsrCapsChange, // roaming because LIM reported a Capability change in the associated AP.
183 eCsrForcedDisassoc, // roaming becuase someone asked us to Disassoc and stay disassociated.
184 eCsrHddIssued, // roaming because an 802.11 request was issued to the driver.
185 eCsrLostLink1, // roaming because we lost link to an associated AP
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800186 eCsrLostLink2,
Jeff Johnson295189b2012-06-20 16:38:30 -0700187 eCsrLostLink3,
188 eCsrForcedDisassocMICFailure, // roaming because we need to force a Disassoc due to MIC failure
189 eCsrHddIssuedReassocToSameAP,
190 eCsrSmeIssuedReassocToSameAP,
191 eCsrSmeIssuedReassocToDiffAP,
192 eCsrForcedDeauth, // roaming becuase someone asked us to deauth and stay disassociated.
193 eCsrSmeIssuedDisassocForHandoff, // will be issued by Handoff logic to disconect from current AP
194 eCsrSmeIssuedAssocToSimilarAP, // will be issued by Handoff logic to join a new AP with same profile
195 eCsrSmeIssuedIbssJoinFailure, // ibss join timer fired before any perr showed up, so shut down the network
196 eCsrForcedIbssLeave,
197 eCsrStopBss,
198 eCsrSmeIssuedFTReassoc,
199 eCsrForcedDisassocSta,
200 eCsrForcedDeauthSta,
Madan Mohan Koyyalamudi286b60e2012-10-11 12:59:07 -0700201 eCsrPerformPreauth,
Venkata Prathyusha Kuntupalli239278b2013-03-26 15:58:18 -0700202 eCsrLostLink1Abort,
203 eCsrLostLink2Abort,
204 eCsrLostLink3Abort,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800205
Jeff Johnson295189b2012-06-20 16:38:30 -0700206}eCsrRoamReason;
207
208typedef enum
209{
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800210 eCSR_ROAM_SUBSTATE_NONE = 0,
211 eCSR_ROAM_SUBSTATE_START_BSS_REQ,
212 eCSR_ROAM_SUBSTATE_JOIN_REQ,
213 eCSR_ROAM_SUBSTATE_REASSOC_REQ,
214 eCSR_ROAM_SUBSTATE_DISASSOC_REQ,
215 eCSR_ROAM_SUBSTATE_STOP_BSS_REQ,
216 eCSR_ROAM_SUBSTATE_DISCONNECT_CONTINUE_ROAMING, //Continue the current roam command after disconnect
217 eCSR_ROAM_SUBSTATE_AUTH_REQ,
218 eCSR_ROAM_SUBSTATE_CONFIG,
219 eCSR_ROAM_SUBSTATE_DEAUTH_REQ,
220 eCSR_ROAM_SUBSTATE_DISASSOC_NOTHING_TO_JOIN,
221 eCSR_ROAM_SUBSTATE_DISASSOC_REASSOC_FAILURE,
222 eCSR_ROAM_SUBSTATE_DISASSOC_FORCED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700223 eCSR_ROAM_SUBSTATE_WAIT_FOR_KEY,
224 eCSR_ROAM_SUBSTATE_DISASSOC_HANDOFF,
225 eCSR_ROAM_SUBSTATE_JOINED_NO_TRAFFIC,
226 eCSR_ROAM_SUBSTATE_JOINED_NON_REALTIME_TRAFFIC,
227 eCSR_ROAM_SUBSTATE_JOINED_REALTIME_TRAFFIC,
228// max is 15 unless the bitfield is expanded...
229} eCsrRoamSubState;
230
231
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800232typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700233{
234 eCSR_ROAMING_STATE_STOP = 0,
235 eCSR_ROAMING_STATE_IDLE,
236 eCSR_ROAMING_STATE_SCANNING,
237 eCSR_ROAMING_STATE_JOINING,
238 eCSR_ROAMING_STATE_JOINED,
239}eCsrRoamState;
240
241
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800242typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700243{
244 eCsrContinueRoaming,
245 eCsrStopRoaming,
246 eCsrStartIbss,
247 eCsrStartIbssSameIbss,
248 eCsrReassocToSelfNoCapChange,
Jeff Johnsone7245742012-09-05 17:12:55 -0700249 eCsrStopRoamingDueToConcurrency,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800250
Jeff Johnson295189b2012-06-20 16:38:30 -0700251}eCsrJoinState;
252
253typedef enum
254{
255 eCsrNotRoaming,
256 eCsrLostlinkRoamingDisassoc,
257 eCsrLostlinkRoamingDeauth,
258 eCsrDynamicRoaming,
259 eCsrReassocRoaming,
260}eCsrRoamingReason;
261
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800262typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700263{
264 eCsrDisassociated,
265 eCsrDeauthenticated
266
267}eCsrRoamWmStatusChangeTypes;
268
269typedef enum
270{
271 eCsrSummaryStats = 0,
272 eCsrGlobalClassAStats,
273 eCsrGlobalClassBStats,
274 eCsrGlobalClassCStats,
275 eCsrGlobalClassDStats,
276 eCsrPerStaStats,
277 eCsrMaxStats
278}eCsrRoamStatsClassTypes;
279
280#ifdef FEATURE_WLAN_DIAG_SUPPORT
281typedef enum
282{
283 eCSR_WLAN_STATUS_CONNECT =0,
284 eCSR_WLAN_STATUS_DISCONNECT
285
286}eCsrDiagWlanStatusEventSubtype;
287
288typedef enum
289{
290 eCSR_REASON_UNSPECIFIED = 0,
291 eCSR_REASON_USER_REQUESTED,
292 eCSR_REASON_MIC_ERROR,
293 eCSR_REASON_DISASSOC,
294 eCSR_REASON_DEAUTH,
295 eCSR_REASON_HANDOFF,
296
297}eCsrDiagWlanStatusEventReason;
298
299typedef enum
300{
301 eCSR_WLAN_HANDOFF_EVENT =0,
302
303}eCsrDiagWlanHandoffEventSubtype;
304
305typedef enum
306{
307 eCSR_WLAN_VCC_EVENT =0,
308
309}eCsrDiagWlanVccEventSubtype;
310
311#endif //FEATURE_WLAN_DIAG_SUPPORT
312
313typedef struct tagCsrChannel
314{
315 tANI_U8 numChannels;
316 tANI_U8 channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
317}tCsrChannel;
318
319typedef struct tagScanProfile
320{
321 tANI_U32 minChnTime;
322 tANI_U32 maxChnTime;
323 tANI_U32 restTime; //This is ignored if not associated
324 tANI_U32 numOfChannels;
325 tANI_U8 *pChannelList;
326 tSirScanType scanType; //active or passive
327 eCsrRoamBssType bssType; //BSS or IBSS
328 tANI_U8 ssid[WNI_CFG_SSID_LEN];
329 tANI_U8 bReturnAfter1stMatch;
330 tANI_U8 fUniqueResult;
331 tANI_U8 freshScan;
332 tCsrBssid bssid;
333}tScanProfile;
334
335typedef struct tagBssConfigParam
336{
337 eCsrMediaAccessType qosType;
338 tSirMacSSid SSID;
339 tANI_U32 uRTSThresh;
340 tANI_U32 uDeferThresh; //
341 eCsrCfgDot11Mode uCfgDot11Mode;
342 eCsrBand eBand;
343 tANI_U8 standardRate[CSR_DOT11_SUPPORTED_RATES_MAX];
344 tANI_U8 extendedRate[CSR_DOT11_EXTENDED_SUPPORTED_RATES_MAX];
345 eCsrExposedTxRate txRate;
346 tAniAuthType authType;
347 eCsrEncryptionType encType;
348 tANI_U32 uShortSlotTime;
349 tANI_U32 uHTSupport; //High throughput
350 tANI_U32 uPowerLimit;
351 tANI_U32 uHeartBeatThresh;
352 tANI_U32 uJoinTimeOut;
353 tSirMacCapabilityInfo BssCap;
354 tANI_BOOLEAN f11hSupport;
Jeff Johnsone7245742012-09-05 17:12:55 -0700355 ePhyChanBondState cbMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700356}tBssConfigParam;
357
358
359typedef struct tagCsrRoamStartBssParams
360{
361 tSirMacSSid ssId;
362 tCsrBssid bssid; //this is the BSSID for the party we want to join (only use for IBSS or WDS)
363 tSirNwType sirNwType;
Jeff Johnsone7245742012-09-05 17:12:55 -0700364 ePhyChanBondState cbMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700365 tSirMacRateSet operationalRateSet;
366 tSirMacRateSet extendedRateSet;
367 tANI_U8 operationChn;
368 eCsrCfgDot11Mode uCfgDot11Mode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700369 tANI_U8 privacy;
370 tANI_BOOLEAN fwdWPSPBCProbeReq;
371 tANI_BOOLEAN protEnabled;
372 tANI_BOOLEAN obssProtEnabled;
373 tAniAuthType authType;
374 tANI_U16 beaconInterval; //If this is 0, SME will fill in for caller.
375 tANI_U16 ht_protection;
376 tANI_U32 dtimPeriod;
377 tANI_U8 ApUapsdEnable;
378 tANI_U8 ssidHidden;
379 tANI_U8 wps_state;
Jeff Johnson295189b2012-06-20 16:38:30 -0700380 tVOS_CON_MODE bssPersona;
381 tANI_U16 nRSNIELength; //The byte count in the pRSNIE, if 0, pRSNIE is ignored.
382 tANI_U8 *pRSNIE; //If not null, it has the IE byte stream for RSN
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800383 tANI_BOOLEAN updatebeaconInterval; //Flag used to indicate update
384 // beaconInterval
Chet Lanctot8cecea22014-02-11 19:09:36 -0800385#ifdef WLAN_FEATURE_11W
386 tANI_BOOLEAN mfpCapable;
387 tANI_BOOLEAN mfpRequired;
388#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700389}tCsrRoamStartBssParams;
390
391
392typedef struct tagScanCmd
393{
394 tANI_U32 scanID;
395 csrScanCompleteCallback callback;
396 void *pContext;
397 eCsrScanReason reason;
398 eCsrRoamState lastRoamState[CSR_ROAM_SESSION_MAX];
399 tCsrRoamProfile *pToRoamProfile;
400 tANI_U32 roamId; //this is the ID related to the pToRoamProfile
401 union
402 {
403 tCsrScanRequest scanRequest;
404 tCsrBGScanRequest bgScanRequest;
405 }u;
Srinivas, Dasari187ca4e2014-02-07 12:40:09 +0530406 //This flag will be set while aborting the scan due to band change
407 tANI_BOOLEAN abortScanDueToBandChange;
Jeff Johnson295189b2012-06-20 16:38:30 -0700408}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;
Mukul Sharmad49b3d62014-09-02 01:45:32 +0530518 tANI_U8 nNeighborInitialForcedRoamTo5GhEnable;
Jeff Johnson295189b2012-06-20 16:38:30 -0700519}tCsrNeighborRoamConfig;
520#endif
521
522typedef struct tagCsrConfig
523{
524 tANI_U32 agingCount;
525 tANI_U32 FragmentationThreshold;
526 tANI_U32 channelBondingMode24GHz;
527 tANI_U32 channelBondingMode5GHz;
528 tANI_U32 RTSThreshold;
529 eCsrPhyMode phyMode;
530 eCsrCfgDot11Mode uCfgDot11Mode;
531 eCsrBand eBand;
532 tANI_U32 HeartbeatThresh50;
533 tANI_U32 HeartbeatThresh24;
534 tANI_U32 bgScanInterval;
535 eCsrCBChoice cbChoice;
536 eCsrBand bandCapability; //indicate hw capability
537 eCsrRoamWmmUserModeType WMMSupportMode;
538 tANI_BOOLEAN Is11eSupportEnabled;
539 tANI_BOOLEAN Is11dSupportEnabled;
540 tANI_BOOLEAN Is11dSupportEnabledOriginal;
541 tANI_BOOLEAN Is11hSupportEnabled;
542 tANI_BOOLEAN shortSlotTime;
543 tANI_BOOLEAN ProprietaryRatesEnabled;
544 tANI_BOOLEAN fenableMCCMode;
545 tANI_U16 TxRate;
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -0800546 tANI_U8 fAllowMCCGODiffBI;
Jeff Johnson295189b2012-06-20 16:38:30 -0700547 tANI_U8 AdHocChannel24;
548 tANI_U8 AdHocChannel5G;
549 tANI_U32 impsSleepTime; //in units of microseconds
550 tANI_U32 scanAgeTimeNCNPS; //scan result aging time threshold when Not-Connect-No-Power-Save, in seconds
551 tANI_U32 scanAgeTimeNCPS; //scan result aging time threshold when Not-Connect-Power-Save, in seconds
552 tANI_U32 scanAgeTimeCNPS; //scan result aging time threshold when Connect-No-Power-Save, in seconds,
553 tANI_U32 scanAgeTimeCPS; //scan result aging time threshold when Connect-Power-Savein seconds
554 tANI_U32 BssPreferValue[CSR_NUM_RSSI_CAT]; //each RSSI category has one value
555 int RSSICat[CSR_NUM_RSSI_CAT];
556 tANI_U8 bCatRssiOffset; //to set the RSSI difference for each category
557 tANI_U32 nRoamingTime; //In seconds, CSR will try this long before gives up, 0 means no roaming
558 //Whether to limit the channels to the ones set in Csr11dInfo. If true, the opertaional
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800559 //channels are limited to the default channel list. It is an "AND" operation between the
Jeff Johnson295189b2012-06-20 16:38:30 -0700560 //default channels and the channels in the 802.11d IE.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800561 tANI_BOOLEAN fEnforce11dChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -0700562 //Country Code Priority
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800563 //0 = 802.11D > Configured Country > NV
Jeff Johnson295189b2012-06-20 16:38:30 -0700564 //1 = Configured Country > 802.11D > NV
565 tANI_BOOLEAN fSupplicantCountryCodeHasPriority;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800566 //When true, AP with unknown country code won't be see.
567 //"Unknown country code" means either Ap doesn't have 11d IE or we cannot
Jeff Johnson295189b2012-06-20 16:38:30 -0700568 //find a domain for the country code in its 11d IE.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800569 tANI_BOOLEAN fEnforceCountryCodeMatch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700570 //When true, only APs in the default domain can be seen. If the Ap has "unknown country
571 //code", or the doamin of the country code doesn't match the default domain, the Ap is
572 //not acceptable.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800573 tANI_BOOLEAN fEnforceDefaultDomain;
Abhishek Singh2ec36ab2014-08-07 16:14:25 +0530574 //When set, It enforece country code even if 11doriginal is true
575 tANI_BOOLEAN fEnforceCountryCode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700576 tANI_U16 vccRssiThreshold;
577 tANI_U32 vccUlMacLossThreshold;
578
579 tANI_U32 nPassiveMinChnTime; //in units of milliseconds
580 tANI_U32 nPassiveMaxChnTime; //in units of milliseconds
581 tANI_U32 nActiveMinChnTime; //in units of milliseconds
582 tANI_U32 nActiveMaxChnTime; //in units of milliseconds
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800583
c_hpothu059edb02014-03-12 21:44:28 +0530584 tANI_U32 nInitialDwellTime; //in units of milliseconds
585
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800586 tANI_U32 nActiveMinChnTimeBtc; //in units of milliseconds
587 tANI_U32 nActiveMaxChnTimeBtc; //in units of milliseconds
Kiran Kumar Lokere458d7322013-05-29 14:29:43 -0700588 tANI_U8 disableAggWithBtc;
Madan Mohan Koyyalamudi4ff9cd62012-10-30 17:48:57 -0700589#ifdef WLAN_AP_STA_CONCURRENCY
590 tANI_U32 nPassiveMinChnTimeConc; //in units of milliseconds
591 tANI_U32 nPassiveMaxChnTimeConc; //in units of milliseconds
592 tANI_U32 nActiveMinChnTimeConc; //in units of milliseconds
593 tANI_U32 nActiveMaxChnTimeConc; //in units of milliseconds
594 tANI_U32 nRestTimeConc; //in units of milliseconds
Sudhir Sattayappa Kohallieb97d502013-05-22 23:16:42 -0700595 tANI_U8 nNumStaChanCombinedConc; //number of channels combined for
596 //Sta in each split scan operation
597 tANI_U8 nNumP2PChanCombinedConc; //number of channels combined for
598 //P2P in each split scan operation
Madan Mohan Koyyalamudi4ff9cd62012-10-30 17:48:57 -0700599#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700600
601 tANI_BOOLEAN IsIdleScanEnabled;
602 //in dBm, the maximum TX power
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800603 //The actual TX power is the lesser of this value and 11d.
Jeff Johnson295189b2012-06-20 16:38:30 -0700604 //If 11d is disable, the lesser of this and default setting.
605 tANI_U8 nTxPowerCap;
606 tANI_U32 statsReqPeriodicity; //stats request frequency from PE while in full power
607 tANI_U32 statsReqPeriodicityInPS;//stats request frequency from PE while in power save
Jeff Johnson295189b2012-06-20 16:38:30 -0700608 tANI_U32 dtimPeriod;
609 tANI_BOOLEAN ssidHidden;
Jeff Johnson295189b2012-06-20 16:38:30 -0700610
611#ifdef WLAN_FEATURE_VOWIFI_11R
612 tCsr11rConfig csr11rConfig;
613#endif
614
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700615#ifdef FEATURE_WLAN_LFR
Srinivas Girigowda830bbd02013-06-13 19:44:16 -0700616 tANI_U8 isFastRoamIniFeatureEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -0800617 tANI_U8 MAWCEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700618#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Srinivas Girigowda830bbd02013-06-13 19:44:16 -0700619 tANI_U8 isRoamOffloadScanEnabled;
620 tANI_BOOLEAN bFastRoamInConIniFeatureEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700621#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700622#endif
623
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800624#ifdef FEATURE_WLAN_ESE
625 tANI_U8 isEseIniFeatureEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700626#endif
627
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800628#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700629 tANI_U8 isFastTransitionEnabled;
630 tANI_U8 RoamRssiDiff;
631 tANI_U8 nImmediateRoamRssiDiff;
632 tANI_BOOLEAN nRoamPrefer5GHz;
633 tANI_BOOLEAN nRoamIntraBand;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -0700634 tANI_BOOLEAN isWESModeEnabled;
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700635 tANI_BOOLEAN nRoamScanControl;
Varun Reddy Yeturu920df212013-05-22 08:07:23 -0700636 tANI_U8 nProbes;
637 tANI_U16 nRoamScanHomeAwayTime;
Jeff Johnson295189b2012-06-20 16:38:30 -0700638#endif
639
640#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
641 tCsrNeighborRoamConfig neighborRoamConfig;
642#endif
643
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800644 /* Instead of Reassoc, send ADDTS/DELTS even when ACM is off for that AC
Jeff Johnson295189b2012-06-20 16:38:30 -0700645 * This is mandated by WMM-AC certification */
646 tANI_BOOLEAN addTSWhenACMIsOff;
647
648 tANI_BOOLEAN fValidateList;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800649 //Remove this code once SLM_Sessionization is supported
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -0700650 //BMPS_WORKAROUND_NOT_NEEDED
Jeff Johnsone7245742012-09-05 17:12:55 -0700651 tANI_BOOLEAN doBMPSWorkaround;
Jeff Johnson295189b2012-06-20 16:38:30 -0700652
653 //To enable/disable scanning 2.4Ghz channels twice on a single scan request from HDD
654 tANI_BOOLEAN fScanTwice;
Jeff Johnsone7245742012-09-05 17:12:55 -0700655#ifdef WLAN_FEATURE_11AC
656 tANI_U32 nVhtChannelWidth;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -0800657 tANI_U8 txBFEnable;
Shailender Karmuchicc3fe442013-02-16 18:18:33 -0800658 tANI_U8 txBFCsnValue;
Ravi Joshi83bfaa12013-05-28 22:12:08 -0700659 tANI_BOOLEAN enableVhtFor24GHz;
Abhishek Singh6d5d29c2014-07-03 14:25:22 +0530660 tANI_U8 txMuBformee;
Jeff Johnsone7245742012-09-05 17:12:55 -0700661#endif
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -0800662 tANI_U8 txLdpcEnable;
Jeff Johnson295189b2012-06-20 16:38:30 -0700663
Ravi Joshid2ca7c42013-07-23 08:37:49 -0700664 /*
665 * Enable/Disable heartbeat offload
666 */
667 tANI_BOOLEAN enableHeartBeatOffload;
krunal soni5afa96c2013-09-06 22:19:02 -0700668 tANI_U8 isAmsduSupportInAMPDU;
Srinivas Girigowda41c7c5f2013-10-21 19:01:38 -0700669 tANI_U8 nSelect5GHzMargin;
krunal sonie9002db2013-11-25 14:24:17 -0800670 tANI_U8 isCoalesingInIBSSAllowed;
Sandeep Puligillac80f26e2014-03-11 18:36:10 +0530671 tANI_U8 allowDFSChannelRoam;
c_hpothu0d5a7352014-03-22 12:30:25 +0530672 tANI_BOOLEAN initialScanSkipDFSCh;
Abhishek Singhde51a412014-05-20 19:17:26 +0530673 tANI_BOOLEAN sendDeauthBeforeCon;
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +0530674#ifdef WLAN_FEATURE_AP_HT40_24G
675 tANI_BOOLEAN apHT40_24GEnabled;
676 tANI_U32 channelBondingAPMode24GHz; // Use for SAP/P2P GO 2.4GHz channel Bonding
677#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700678}tCsrConfig;
679
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800680typedef struct tagCsrChannelPowerInfo
Jeff Johnson295189b2012-06-20 16:38:30 -0700681{
682 tListElem link;
683 tANI_U8 firstChannel;
684 tANI_U8 numChannels;
685 tANI_U8 txPower;
686 tANI_U8 interChannelOffset;
687}tCsrChannelPowerInfo;
688
689typedef struct tagRoamJoinStatus
690{
691 tSirResultCodes statusCode;
692 //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 -0800693 tANI_U32 reasonCode;
Kiran Kumar Lokerec8550fa2013-04-15 22:23:00 -0700694 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -0700695}tCsrRoamJoinStatus;
696
697typedef struct tagCsrOsChannelMask
698{
699 tANI_U8 numChannels;
700 tANI_BOOLEAN scanEnabled[WNI_CFG_VALID_CHANNEL_LIST_LEN];
701 tANI_U8 channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
702}tCsrOsChannelMask;
703
Agrawal Ashish0b6984f2014-04-05 18:35:45 +0530704typedef struct tagCsrVotes11d
705{
706 tANI_U8 votes;
707 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN];
708}tCsrVotes11d;
Jeff Johnson295189b2012-06-20 16:38:30 -0700709
710typedef struct tagCsrScanStruct
711{
712 tScanProfile scanProfile;
713 tANI_U32 nextScanID;
Madan Mohan Koyyalamudica43cdf2012-09-24 13:15:49 -0700714 tDblLinkList scanResultList;
Jeff Johnson295189b2012-06-20 16:38:30 -0700715 tDblLinkList tempScanResults;
716 tANI_BOOLEAN fScanEnable;
717 tANI_BOOLEAN fFullScanIssued;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530718 vos_timer_t hTimerGetResult;
Jeff Johnson295189b2012-06-20 16:38:30 -0700719#ifdef WLAN_AP_STA_CONCURRENCY
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530720 vos_timer_t hTimerStaApConcTimer;
Jeff Johnson295189b2012-06-20 16:38:30 -0700721#endif
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530722 vos_timer_t hTimerIdleScan;
723 vos_timer_t hTimerResultAging;
724 vos_timer_t hTimerResultCfgAging;
Jeff Johnson295189b2012-06-20 16:38:30 -0700725 tPalTimerHandle hTimerBgScan;
726 //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 -0800727 tANI_U8 channelOf11dInfo;
728 tANI_U8 scanResultCfgAgingTime;
Jeff Johnson295189b2012-06-20 16:38:30 -0700729 //changes on every scan, a flag to tell whether conflict 11d info found on each BSS
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800730 tANI_BOOLEAN fAmbiguous11dInfoFound;
Jeff Johnson295189b2012-06-20 16:38:30 -0700731 //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 -0800732 tANI_BOOLEAN fCurrent11dInfoMatch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700733 tANI_BOOLEAN f11dInfoReset; //to indicate whether the 11d info in CFG is reset to default
734 tSirScanType curScanType;
735 tCsrChannel baseChannels; //This are all the supported channels AND(&) to the current eBand
736 tCsrChannel channels11d;
737 tChannelListWithPower defaultPowerTable[WNI_CFG_VALID_CHANNEL_LIST_LEN]; //From NV
738 tChannelListWithPower defaultPowerTable40MHz[WNI_CFG_VALID_CHANNEL_LIST_LEN]; //From NV
739 tANI_U32 numChannelsDefault; //total channels of NV
740 tCsrChannel base20MHzChannels; //The channel base to work on
741 tCsrChannel base40MHzChannels; //center channels for 40MHz channels
742 tDblLinkList channelPowerInfoList24;
743 tDblLinkList channelPowerInfoList5G;
744 tANI_U32 nLastAgeTimeOut;
745 tANI_U32 nAgingCountDown;
Gopichand Nakkala114718f2013-03-25 19:19:46 -0700746 tANI_U8 countryCodeDefault[WNI_CFG_COUNTRY_CODE_LEN]; //The country code from NV
747 tANI_U8 countryCodeCurrent[WNI_CFG_COUNTRY_CODE_LEN];
748 tANI_U8 countryCode11d[WNI_CFG_COUNTRY_CODE_LEN];
Jeff Johnson295189b2012-06-20 16:38:30 -0700749 v_REGDOMAIN_t domainIdDefault; //default regulatory domain
750 v_REGDOMAIN_t domainIdCurrent; //current regulatory domain
Agarwal Ashishd9d72602013-09-13 00:06:17 +0530751 tCsrBssid currentCountryBssid; // Bssid for current country code
Mihir Shetebc866f62014-02-13 16:08:53 +0530752 tANI_S8 currentCountryRSSI; // RSSI for current country code
Jeff Johnson295189b2012-06-20 16:38:30 -0700753 tANI_BOOLEAN f11dInfoApplied;
754 tANI_BOOLEAN fCancelIdleScan;
Agrawal Ashish0b6984f2014-04-05 18:35:45 +0530755 tANI_U8 countryCodeCount;
756 tCsrVotes11d votes11d[CSR_MAX_NUM_COUNTRY_CODE]; //counts for various advertized country codes
757 //in 11d IE from probe rsp or beacons of neighboring APs;
758 //will use the most popular one (max count)
759 tANI_U8 countryCodeElected[WNI_CFG_COUNTRY_CODE_LEN];
760
761
Jeff Johnson295189b2012-06-20 16:38:30 -0700762#ifdef FEATURE_WLAN_WAPI
763// tANI_U16 NumBkidCandidate;
764// tBkidCandidateInfo BkidCandidateInfo[CSR_MAX_BKID_ALLOWED]; /* Move this as part of SessionEntry */
765#endif /* FEATURE_WLAN_WAPI */
766 tANI_U8 numBGScanChannel; //number of valid channels in the bgScanChannelList
767 tANI_U8 bgScanChannelList[WNI_CFG_BG_SCAN_CHANNEL_LIST_LEN];
768 //the ChannelInfo member is not used in this structure.
769 //numBGScanChannel and bgScanChannelList are used for the BG scan channel info
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800770 tCsrBGScanRequest bgScanParams;
Jeff Johnson295189b2012-06-20 16:38:30 -0700771 tANI_BOOLEAN fRestartIdleScan;
772 tANI_U32 nIdleScanTimeGap; //the time since last trying to trigger idle scan
773 tCsrOsChannelMask osScanChannelMask;//keep a track of channels to be scnned while in traffic condition
774 tANI_U16 nBssLimit; //the maximum number of BSS in scan cache
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800775 /*channelPowerInfoList24 has been seen corrupted. Set this flag to true trying to
Jeff Johnson295189b2012-06-20 16:38:30 -0700776 * detect when it happens. Adding this into code because we can't reproduce it easily.
777 * We don't know when it happens. */
778 tANI_BOOLEAN fValidateList;
779 /*Customer wants to start with an active scan based on the default country code.
780 * This optimization will minimize the driver load to association time.
781 * Based on this flag we will bypass the initial passive scan needed for 11d
782 * to determine the country code & domain */
783 tANI_BOOLEAN fEnableBypass11d;
784
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800785 /*Customer wants to optimize the scan time. Avoiding scans(passive) on DFS
786 * channels while swipping through both bands can save some time
Jeff Johnson295189b2012-06-20 16:38:30 -0700787 * (apprx 1.3 sec) */
788 tANI_BOOLEAN fEnableDFSChnlScan;
789
Jeff Johnsone7245742012-09-05 17:12:55 -0700790 /*
791 * To enable/disable scanning only 2.4Ghz channels on first scan
792 */
793 tANI_BOOLEAN fFirstScanOnly2GChnl;
794
Jeff Johnson295189b2012-06-20 16:38:30 -0700795 tANI_BOOLEAN fDropScanCmd; //true means we don't accept scan commands
796
797#ifdef WLAN_AP_STA_CONCURRENCY
798 tDblLinkList scanCmdPendingList;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800799#endif
Madan Mohan Koyyalamudi470d2cf2012-09-28 14:43:44 -0700800 tCsrChannel occupiedChannels; //This includes all channels on which candidate APs are found
Srinivas Girigowda41c7c5f2013-10-21 19:01:38 -0700801 tANI_S8 inScanResultBestAPRssi;
Mihir Shetefc7ff5b2014-01-27 11:30:05 +0530802
803 csrScanCompleteCallback callback11dScanDone;
Peng Xu2446a892014-09-05 17:21:18 +0530804 eCsrBand scanBandPreference; //This defines the band perference for scan
Jeff Johnson295189b2012-06-20 16:38:30 -0700805}tCsrScanStruct;
806
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800807#ifdef FEATURE_WLAN_TDLS_INTERNAL
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800808/*
809 * struct to carry TDLS discovery info..
810 */
811typedef struct sCsrTdlsContext
812{
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800813 tDblLinkList tdlsPotentialPeerList ;
814 tANI_U16 tdlsCommonFlag ;
815 tANI_U16 tdlsCommonState ;
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800816 tANI_U16 tdlsPeerCount ;
817}tCsrTdlsCtxStruct;
818
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800819typedef struct sCsrTdlsPeerLinkInfo
820{
821 tListElem tdlsPeerStaLink ;
822 tSirTdlsPeerInfo tdlsDisPeerInfo ;
823}tCsrTdlsPeerLinkinfo ;
824#endif
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800825
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800826
827
Jeff Johnson295189b2012-06-20 16:38:30 -0700828
829//Save the connected information. This structure + connectedProfile
830//should contain all information about the connection
831typedef struct tagRoamCsrConnectedInfo
832{
833 tANI_U32 nBeaconLength; //the length, in bytes, of the beacon frame, can be 0
834 tANI_U32 nAssocReqLength; //the length, in bytes, of the assoc req frame, can be 0
835 tANI_U32 nAssocRspLength; //The length, in bytes, of the assoc rsp frame, can be 0
836#ifdef WLAN_FEATURE_VOWIFI_11R
837 tANI_U32 nRICRspLength; //Length of the parsed RIC response IEs received in reassoc response
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800838#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800839#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -0700840 tANI_U32 nTspecIeLength;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800841#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700842 tANI_U8 *pbFrames; //Point to a buffer contain the beacon, assoc req, assoc rsp frame, in that order
843 //user needs to use nBeaconLength, nAssocReqLength, nAssocRspLength to desice where
844 //each frame starts and ends.
845 tANI_U8 staId;
846}tCsrRoamConnectedInfo;
847
848
849typedef struct tagCsrLinkQualityIndInfo
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800850{
Jeff Johnson295189b2012-06-20 16:38:30 -0700851 csrRoamLinkQualityIndCallback callback;
852 void *context;
853}tCsrLinkQualityIndInfo;
854
855typedef struct tagCsrPeStatsReqInfo
856{
857 tListElem link; /* list links */
858 tANI_U32 statsMask;
859 tANI_U32 periodicity;
860 tANI_BOOLEAN rspPending;
861 vos_timer_t hPeStatsTimer;
862 tANI_BOOLEAN timerRunning;
863 tANI_U8 staId;
864 tANI_U8 numClient;
865 tpAniSirGlobal pMac;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800866 /* To remember if the peStats timer is stopped successfully or not */
Jeff Johnson295189b2012-06-20 16:38:30 -0700867 tANI_BOOLEAN timerStopFailed;
868
869}tCsrPeStatsReqInfo;
870
871typedef struct tagCsrStatsClientReqInfo
872{
873 tListElem link; /* list links */
874 eCsrStatsRequesterType requesterId;
875 tCsrStatsCallback callback;
876 tANI_U32 periodicity;
877 void *pContext;
878 tANI_U32 statsMask;
879 tCsrPeStatsReqInfo *pPeStaEntry;
880 tANI_U8 staId;
881 vos_timer_t timer;
882 tANI_BOOLEAN timerExpired;
883 tpAniSirGlobal pMac; // TODO: Confirm this change BTAMP
884}tCsrStatsClientReqInfo;
885
886typedef struct tagCsrTlStatsReqInfo
887{
888 tANI_U32 periodicity;
889 tANI_BOOLEAN timerRunning;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530890 vos_timer_t hTlStatsTimer;
Jeff Johnson295189b2012-06-20 16:38:30 -0700891 tANI_U8 numClient;
892}tCsrTlStatsReqInfo;
893
894typedef struct tagCsrRoamSession
895{
896 tANI_U8 sessionId; // Session ID
897 tANI_BOOLEAN sessionActive; // TRUE if it is used
898 tCsrBssid selfMacAddr; // For BT-AMP station, this serve as BSSID for self-BSS.
899 csrRoamCompleteCallback callback;
900 void *pContext;
901 eCsrConnectState connectState;
902 tCsrRoamConnectedProfile connectedProfile;
903 tCsrRoamConnectedInfo connectedInfo;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800904 tCsrRoamProfile *pCurRoamProfile;
Jeff Johnson295189b2012-06-20 16:38:30 -0700905 tSirBssDescription *pConnectBssDesc;
906 tANI_U16 NumPmkidCache;
907 tPmkidCacheInfo PmkidCacheInfo[CSR_MAX_PMKID_ALLOWED];
908 tANI_U8 cJoinAttemps;
909 //This may or may not have the up-to-date valid channel list
910 //It is used to get WNI_CFG_VALID_CHANNEL_LIST and not allocate memory all the time
911 tSirMacChanNum validChannelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
912 tANI_S32 sPendingCommands; //0 means CSR is ok to low power
913#ifdef FEATURE_WLAN_WAPI
914 tANI_U16 NumBkidCache;
915 tBkidCacheInfo BkidCacheInfo[CSR_MAX_BKID_ALLOWED];
916#endif /* FEATURE_WLAN_WAPI */
917 tANI_BOOLEAN fRoaming; //indicate whether CSR is roaming (either via lostlink or dynamic roaming)
918 //to remember some parameters needed for START_BSS.
919 //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 -0800920 tCsrRoamStartBssParams bssParams;
Jeff Johnson295189b2012-06-20 16:38:30 -0700921 tANI_U32 nWpaRsnReqIeLength; //the byte count of pWpaRsnIE;
922 tANI_U8 *pWpaRsnReqIE; //this contain the WPA/RSN IE in assoc request or the one sent in beacon (IBSS)
923 tANI_U32 nWpaRsnRspIeLength; //the byte count for pWpaRsnRspIE
924 tANI_U8 *pWpaRsnRspIE; //this contain the WPA/RSN IE in beacon/probe rsp
925#ifdef FEATURE_WLAN_WAPI
926 tANI_U32 nWapiReqIeLength; //the byte count of pWapiReqIE;
927 tANI_U8 *pWapiReqIE; //this contain the WAPI IE in assoc request or the one sent in beacon (IBSS)
928 tANI_U32 nWapiRspIeLength; //the byte count for pWapiRspIE
929 tANI_U8 *pWapiRspIE; //this contain the WAPI IE in beacon/probe rsp
930#endif /* FEATURE_WLAN_WAPI */
Agarwal Ashish4f616132013-12-30 23:32:50 +0530931 tANI_U32 nAddIEScanLength; //length of addIeScan
932 /* This contains the additional IE in (unicast)
933 * probe request at the time of join
934 */
935 tANI_U8 addIEScan[SIR_MAC_MAX_IE_LENGTH+2];
Jeff Johnson295189b2012-06-20 16:38:30 -0700936 tANI_U32 nAddIEAssocLength; //the byte count for pAddIeAssocIE
937 tANI_U8 *pAddIEAssoc; //this contains the additional IE in (re) assoc request
938
939 tANI_TIMESTAMP roamingStartTime; //in units of 10ms
940 tCsrTimerInfo roamingTimerInfo;
941 eCsrRoamingReason roamingReason;
942 tANI_BOOLEAN fCancelRoaming;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530943 vos_timer_t hTimerRoaming;
Jeff Johnson295189b2012-06-20 16:38:30 -0700944 eCsrRoamResult roamResult; //the roamResult that is used when the roaming timer fires
945 tCsrRoamJoinStatus joinFailStatusCode; //This is the reason code for join(assoc) failure
946 //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 -0800947 tANI_U32 roamingStatusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700948 tANI_U16 NumPmkidCandidate;
949 tPmkidCandidateInfo PmkidCandidateInfo[CSR_MAX_PMKID_ALLOWED];
950 #ifdef FEATURE_WLAN_WAPI
951 tANI_U16 NumBkidCandidate;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800952 tBkidCandidateInfo BkidCandidateInfo[CSR_MAX_BKID_ALLOWED];
Jeff Johnson295189b2012-06-20 16:38:30 -0700953#endif
954 tANI_BOOLEAN fWMMConnection;
Sandeep Puligillaaea98a22013-12-04 13:36:32 +0530955 tANI_BOOLEAN fQOSConnection;
956
Jeff Johnson295189b2012-06-20 16:38:30 -0700957#ifdef FEATURE_WLAN_BTAMP_UT_RF
958 //To retry a join later when it fails if so desired
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530959 vos_timer_t hTimerJoinRetry;
Jeff Johnson295189b2012-06-20 16:38:30 -0700960 tCsrTimerInfo joinRetryTimerInfo;
961 tANI_U32 maxRetryCount;
962#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800963#ifdef FEATURE_WLAN_ESE
964 tCsrEseCckmInfo eseCckmInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700965 tANI_BOOLEAN isPrevApInfoValid;
966 tSirMacSSid prevApSSID;
967 tCsrBssid prevApBssid;
968 tANI_U8 prevOpChannel;
969 tANI_U16 clientDissSecs;
970 tANI_U32 roamTS1;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800971#if defined(FEATURE_WLAN_ESE_UPLOAD)
972 tCsrEseCckmIe suppCckmIeInfo;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700973#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700974#endif
975 tANI_U8 bRefAssocStartCnt; //Tracking assoc start indication
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800976 /* to force the AP initiate fresh 802.1x authentication after re-association need to clear
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700977 * the PMKID cache. To clear the cache in this particular case this is added
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800978 * it is needed by the HS 2.0 passpoint certification 5.2.a and b testcases */
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700979 tANI_BOOLEAN fIgnorePMKIDCache;
Jeff Johnson295189b2012-06-20 16:38:30 -0700980} tCsrRoamSession;
981
982typedef struct tagCsrRoamStruct
983{
984 tANI_U32 nextRoamId;
985 tDblLinkList roamCmdPendingList;
986 tDblLinkList channelList5G;
987 tDblLinkList channelList24;
988 tCsrConfig configParam;
989 tANI_U32 numChannelsEeprom; //total channels of eeprom
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800990 tCsrChannel base20MHzChannels; //The channel base to work on
991 tCsrChannel base40MHzChannels; //center channels for 40MHz channels
992 eCsrRoamState curState[CSR_ROAM_SESSION_MAX];
Jeff Johnson295189b2012-06-20 16:38:30 -0700993 eCsrRoamSubState curSubState[CSR_ROAM_SESSION_MAX];
994 //This may or may not have the up-to-date valid channel list
995 //It is used to get WNI_CFG_VALID_CHANNEL_LIST and not allocate memory all the time
996 tSirMacChanNum validChannelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
997 tANI_U32 numValidChannels; //total number of channels in CFG
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800998
Jeff Johnson295189b2012-06-20 16:38:30 -0700999 tANI_S32 sPendingCommands;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +05301000 vos_timer_t hTimerWaitForKey; //To support timeout for WaitForKey state
Jeff Johnson295189b2012-06-20 16:38:30 -07001001 tCsrSummaryStatsInfo summaryStatsInfo;
1002 tCsrGlobalClassAStatsInfo classAStatsInfo;
1003 tCsrGlobalClassBStatsInfo classBStatsInfo;
1004 tCsrGlobalClassCStatsInfo classCStatsInfo;
1005 tCsrGlobalClassDStatsInfo classDStatsInfo;
1006 tCsrPerStaStatsInfo perStaStatsInfo[CSR_MAX_STA];
1007 tDblLinkList statsClientReqList;
1008 tDblLinkList peStatsReqList;
1009 tCsrTlStatsReqInfo tlStatsReqInfo;
1010 eCsrRoamLinkQualityInd vccLinkQuality;
1011 tCsrLinkQualityIndInfo linkQualityIndInfo;
1012 v_CONTEXT_t gVosContext; //used for interaction with TL
1013 //To specify whether an association or a IBSS is WMM enabled
1014 //This parameter is only valid during a join or start BSS command is being executed
1015 //tANI_BOOLEAN fWMMConnection; /* Moving it to be part of roamsession */
1016 v_U8_t ucACWeights[WLANTL_MAX_AC];
1017 /* TODO : Upto here */
1018 tCsrTimerInfo WaitForKeyTimerInfo;
1019 tCsrRoamSession *roamSession;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001020 tANI_U32 transactionId; // Current transaction ID for internal use.
1021#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Jeff Johnson295189b2012-06-20 16:38:30 -07001022 tCsrNeighborRoamControlInfo neighborRoamInfo;
1023#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001024#ifdef FEATURE_WLAN_LFR
1025 tANI_U8 isFastRoamIniFeatureEnabled;
1026#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001027#ifdef FEATURE_WLAN_ESE
1028 tANI_U8 isEseIniFeatureEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -07001029#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001030#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -07001031 tANI_U8 RoamRssiDiff;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07001032 tANI_BOOLEAN isWESModeEnabled;
Jeff Johnson43971f52012-07-17 12:26:56 -07001033#endif
Leela Venkata Kiran Kumar Reddy Chirala56df73f2014-01-30 14:18:00 -08001034 tANI_U32 deauthRspStatus;
Jeff Johnson295189b2012-06-20 16:38:30 -07001035}tCsrRoamStruct;
1036
1037
1038#define GET_NEXT_ROAM_ID(pRoamStruct) (((pRoamStruct)->nextRoamId + 1 == 0) ? 1 : (pRoamStruct)->nextRoamId)
1039#define CSR_IS_ROAM_STATE(pMac, state, sessionId) ( (state) == (pMac)->roam.curState[sessionId] )
1040
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001041#define CSR_IS_ROAM_STOP(pMac, sessionId) CSR_IS_ROAM_STATE( (pMac), eCSR_ROAMING_STATE_STOP, sessionId )
1042#define CSR_IS_ROAM_INIT(pMac, sessionId) CSR_IS_ROAM_STATE( (pMac), eCSR_ROAMING_STATE_INIT, sessionId )
Jeff Johnson295189b2012-06-20 16:38:30 -07001043#define CSR_IS_ROAM_SCANNING(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_SCANNING, sessionId )
1044#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 -08001045#define CSR_IS_ROAM_IDLE(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_IDLE, sessionId )
Jeff Johnson295189b2012-06-20 16:38:30 -07001046#define CSR_IS_ROAM_JOINED(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_JOINED, sessionId )
1047
1048#define CSR_IS_ROAM_SUBSTATE(pMac, subState, sessionId) ((subState) == (pMac)->roam.curSubState[sessionId])
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001049#define CSR_IS_ROAM_SUBSTATE_JOIN_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOIN_REQ, sessionId)
1050#define CSR_IS_ROAM_SUBSTATE_AUTH_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_AUTH_REQ, sessionId)
1051#define CSR_IS_ROAM_SUBSTATE_REASSOC_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_REASSOC_REQ, sessionId)
1052#define CSR_IS_ROAM_SUBSTATE_DISASSOC_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_REQ, sessionId)
1053#define CSR_IS_ROAM_SUBSTATE_DISASSOC_NO_JOIN(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_NOTHING_TO_JOIN, sessionId)
1054#define CSR_IS_ROAM_SUBSTATE_REASSOC_FAIL(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_REASSOC_FAILURE, sessionId)
1055#define CSR_IS_ROAM_SUBSTATE_DISASSOC_FORCED(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_FORCED, sessionId)
1056#define CSR_IS_ROAM_SUBSTATE_DEAUTH_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DEAUTH_REQ, sessionId)
1057#define CSR_IS_ROAM_SUBSTATE_START_BSS_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_START_BSS_REQ, sessionId)
1058#define CSR_IS_ROAM_SUBSTATE_STOP_BSS_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_STOP_BSS_REQ, sessionId)
1059#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 -07001060#define CSR_IS_ROAM_SUBSTATE_CONFIG(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_CONFIG, sessionId)
1061#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 -08001062#define CSR_IS_ROAM_SUBSTATE_DISASSOC_HO(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_HANDOFF, sessionId)
1063#define CSR_IS_ROAM_SUBSTATE_HO_NT(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOINED_NO_TRAFFIC, sessionId)
1064#define CSR_IS_ROAM_SUBSTATE_HO_NRT(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOINED_NON_REALTIME_TRAFFIC, sessionId)
1065#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 -07001066
1067#define CSR_IS_PHY_MODE_B_ONLY(pMac) \
1068 ((eCSR_DOT11_MODE_11b == (pMac)->roam.configParam.phyMode) ||\
1069 (eCSR_DOT11_MODE_11b_ONLY == (pMac)->roam.configParam.phyMode))
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001070
Jeff Johnson295189b2012-06-20 16:38:30 -07001071#define CSR_IS_PHY_MODE_G_ONLY(pMac) \
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001072 (eCSR_DOT11_MODE_11g == (pMac)->roam.configParam.phyMode || eCSR_DOT11_MODE_11g_ONLY == (pMac)->roam.configParam.phyMode)
1073
Jeff Johnson295189b2012-06-20 16:38:30 -07001074#define CSR_IS_PHY_MODE_A_ONLY(pMac) \
1075 ((eCSR_DOT11_MODE_11a == (pMac)->roam.configParam.phyMode) ||\
1076 (eCSR_DOT11_MODE_11a_ONLY == (pMac)->roam.configParam.phyMode))
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001077
Jeff Johnsone7245742012-09-05 17:12:55 -07001078#ifdef WLAN_FEATURE_11AC
1079#define CSR_IS_PHY_MODE_DUAL_BAND(phyMode) \
1080 ((eCSR_DOT11_MODE_abg & (phyMode)) || (eCSR_DOT11_MODE_11n & (phyMode)) || \
1081 (eCSR_DOT11_MODE_11ac & (phyMode)) || \
1082 (eCSR_DOT11_MODE_TAURUS & (phyMode)) || \
1083 (eCSR_DOT11_MODE_AUTO & (phyMode)))
1084#else
Jeff Johnson295189b2012-06-20 16:38:30 -07001085#define CSR_IS_PHY_MODE_DUAL_BAND(phyMode) \
1086 ((eCSR_DOT11_MODE_abg & (phyMode)) || (eCSR_DOT11_MODE_11n & (phyMode)) || \
1087 (eCSR_DOT11_MODE_TAURUS & (phyMode)) || \
1088 (eCSR_DOT11_MODE_AUTO & (phyMode)))
Jeff Johnsone7245742012-09-05 17:12:55 -07001089#endif
1090
Jeff Johnson295189b2012-06-20 16:38:30 -07001091
1092// this function returns TRUE if the NIC is operating exclusively in the 2.4 GHz band, meaning
1093// it is NOT operating in the 5.0 GHz band.
1094#define CSR_IS_24_BAND_ONLY(pMac) \
1095 (eCSR_BAND_24 == (pMac)->roam.configParam.eBand)
1096
1097#define CSR_IS_5G_BAND_ONLY(pMac) \
1098 (eCSR_BAND_5G == (pMac)->roam.configParam.eBand)
1099
1100#define CSR_IS_RADIO_DUAL_BAND(pMac) \
1101 (eCSR_BAND_ALL == (pMac)->roam.configParam.bandCapability)
1102
1103#define CSR_IS_RADIO_BG_ONLY(pMac) \
1104 (eCSR_BAND_24 == (pMac)->roam.configParam.bandCapability)
1105
1106// this function returns TRUE if the NIC is operating exclusively in the 5.0 GHz band, meaning
1107// it is NOT operating in the 2.4 GHz band
1108#define CSR_IS_RADIO_A_ONLY(pMac) \
1109 (eCSR_BAND_5G == (pMac)->roam.configParam.bandCapability)
1110
1111// this function returns TRUE if the NIC is operating in both bands.
1112#define CSR_IS_OPEARTING_DUAL_BAND(pMac) \
1113 ((eCSR_BAND_ALL == (pMac)->roam.configParam.bandCapability) && (eCSR_BAND_ALL == (pMac)->roam.configParam.eBand))
1114
1115// this function returns TRUE if the NIC can operate in the 5.0 GHz band (could operate in the
1116// 2.4 GHz band also).
1117#define CSR_IS_OPERATING_A_BAND(pMac) \
1118 (CSR_IS_OPEARTING_DUAL_BAND((pMac)) || CSR_IS_RADIO_A_ONLY((pMac)) || CSR_IS_5G_BAND_ONLY((pMac)))
1119
1120// this function returns TRUE if the NIC can operate in the 2.4 GHz band (could operate in the
1121// 5.0 GHz band also).
1122#define CSR_IS_OPERATING_BG_BAND(pMac) \
1123 (CSR_IS_OPEARTING_DUAL_BAND((pMac)) || CSR_IS_RADIO_BG_ONLY((pMac)) || CSR_IS_24_BAND_ONLY((pMac)))
1124
1125#define CSR_IS_CHANNEL_5GHZ(chnNum) \
Jeff Johnsone7245742012-09-05 17:12:55 -07001126 (((chnNum) >= CSR_MIN_5GHz_CHANNEL_NUMBER) && ((chnNum) <= CSR_MAX_5GHz_CHANNEL_NUMBER))
Jeff Johnson295189b2012-06-20 16:38:30 -07001127
Srinivas Girigowdade697412013-02-14 16:31:48 -08001128#define CSR_IS_CHANNEL_DFS(chnNum) \
1129 (NV_CHANNEL_ENABLE != vos_nv_getChannelEnabledState(chnNum))
1130
Jeff Johnson295189b2012-06-20 16:38:30 -07001131#define CSR_IS_CHANNEL_24GHZ(chnNum) \
1132 (((chnNum) > 0) && ((chnNum) <= CSR_MAX_24GHz_CHANNEL_NUMBER))
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001133
Jeff Johnson295189b2012-06-20 16:38:30 -07001134#define CSR_IS_SAME_BAND_CHANNELS(ch1, ch2) (CSR_IS_CHANNEL_5GHZ(ch1) == CSR_IS_CHANNEL_5GHZ(ch2))
1135
1136
1137#define CSR_IS_11D_INFO_FOUND(pMac) \
1138 (0 != (pMac)->scan.channelOf11dInfo)
1139// DEAUTHIND
1140#define CSR_IS_ROAMING(pSession) ((CSR_IS_LOSTLINK_ROAMING((pSession)->roamingReason)) || \
1141 (eCsrDynamicRoaming == (pSession)->roamingReason) || \
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001142 (eCsrReassocRoaming == (pSession)->roamingReason))
Jeff Johnson295189b2012-06-20 16:38:30 -07001143
1144
1145#define CSR_IS_SET_KEY_COMMAND( pCommand ) ( eSmeCommandSetKey == (pCommand)->command )
1146
1147#define CSR_IS_ADDTS_WHEN_ACMOFF_SUPPORTED(pMac) (pMac->roam.configParam.addTSWhenACMIsOff)
1148// DEAUTHIND
1149#define CSR_IS_LOSTLINK_ROAMING(reason) ((eCsrLostlinkRoamingDisassoc == (reason)) || (eCsrLostlinkRoamingDeauth == (reason)))
1150
Venkata Prathyusha Kuntupalli239278b2013-03-26 15:58:18 -07001151#define CSR_IS_ROAMING_COMMAND(pCommand) ((eCsrLostLink1 == (pCommand)->u.roamCmd.roamReason) ||\
1152 (eCsrLostLink2 == (pCommand)->u.roamCmd.roamReason) ||\
1153 (eCsrLostLink3 == (pCommand)->u.roamCmd.roamReason) )
1154
1155
Jeff Johnson295189b2012-06-20 16:38:30 -07001156//Stop CSR from asking for IMPS, This function doesn't disable IMPS from CSR
1157void csrScanSuspendIMPS( tpAniSirGlobal pMac );
1158//Start CSR from asking for IMPS. This function doesn't trigger CSR to request entering IMPS
1159//because IMPS maybe disabled.
1160void csrScanResumeIMPS( tpAniSirGlobal pMac );
1161
1162eHalStatus csrInitGetChannels(tpAniSirGlobal pMac);
Srinivas, Dasari42bf7702014-02-07 11:29:53 +05301163eHalStatus csrScanFilterResults(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -07001164
1165eHalStatus csrSetModifyProfileFields(tpAniSirGlobal pMac, tANI_U32 sessionId,
1166 tCsrRoamModifyProfileFields *pModifyProfileFields);
1167/* ---------------------------------------------------------------------------
1168 \fn csrGetModifyProfileFields
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001169 \brief HDD or SME - QOS calls this function to get the current values of
Jeff Johnson295189b2012-06-20 16:38:30 -07001170 connected profile fields changing which can cause reassoc.
1171 This function must be called after CFG is downloaded and STA is in connected
1172 state.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001173 \param pModifyProfileFields - pointer to the connected profile fields
Jeff Johnson295189b2012-06-20 16:38:30 -07001174 changing which can cause reassoc
1175
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001176 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001177 -------------------------------------------------------------------------------*/
1178eHalStatus csrGetModifyProfileFields(tpAniSirGlobal pMac, tANI_U32 sessionId,
1179 tCsrRoamModifyProfileFields * pModifyProfileFields);
1180void csrSetGlobalCfgs( tpAniSirGlobal pMac );
1181void csrSetDefaultDot11Mode( tpAniSirGlobal pMac );
1182void csrScanSetChannelMask(tpAniSirGlobal pMac, tCsrChannelInfo *pChannelInfo);
1183tANI_BOOLEAN csrIsConnStateDisconnected(tpAniSirGlobal pMac, tANI_U32 sessionId);
1184tANI_BOOLEAN csrIsConnStateConnectedIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1185tANI_BOOLEAN csrIsConnStateDisconnectedIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1186tANI_BOOLEAN csrIsConnStateConnectedInfra( tpAniSirGlobal pMac, tANI_U32 sessionId );
1187tANI_BOOLEAN csrIsConnStateConnected( tpAniSirGlobal pMac, tANI_U32 sessionId );
1188tANI_BOOLEAN csrIsConnStateInfra( tpAniSirGlobal pMac, tANI_U32 sessionId );
1189tANI_BOOLEAN csrIsConnStateIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1190tANI_BOOLEAN csrIsConnStateWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1191tANI_BOOLEAN csrIsConnStateConnectedWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1192tANI_BOOLEAN csrIsConnStateDisconnectedWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1193tANI_BOOLEAN csrIsAnySessionInConnectState( tpAniSirGlobal pMac );
1194tANI_BOOLEAN csrIsAllSessionDisconnected( tpAniSirGlobal pMac );
Madan Mohan Koyyalamudi48081ef2012-12-04 16:49:55 -08001195tANI_BOOLEAN csrIsStaSessionConnected( tpAniSirGlobal pMac );
1196tANI_BOOLEAN csrIsP2pSessionConnected( tpAniSirGlobal pMac );
Madan Mohan Koyyalamudid3d22592012-09-24 14:01:29 -07001197tANI_BOOLEAN csrIsAnySessionConnected( tpAniSirGlobal pMac );
Jeff Johnson295189b2012-06-20 16:38:30 -07001198tANI_BOOLEAN csrIsInfraConnected( tpAniSirGlobal pMac );
1199tANI_BOOLEAN csrIsConcurrentInfraConnected( tpAniSirGlobal pMac );
Jeff Johnsone7245742012-09-05 17:12:55 -07001200tANI_BOOLEAN csrIsConcurrentSessionRunning( tpAniSirGlobal pMac );
Jeff Johnsone7245742012-09-05 17:12:55 -07001201tANI_BOOLEAN csrIsInfraApStarted( tpAniSirGlobal pMac );
Jeff Johnson295189b2012-06-20 16:38:30 -07001202tANI_BOOLEAN csrIsIBSSStarted( tpAniSirGlobal pMac );
1203tANI_BOOLEAN csrIsBTAMPStarted( tpAniSirGlobal pMac );
1204tANI_BOOLEAN csrIsBTAMP( tpAniSirGlobal pMac, tANI_U32 sessionId );
1205eHalStatus csrIsBTAMPAllowed( tpAniSirGlobal pMac, tANI_U32 chnId );
Jeff Johnsone7245742012-09-05 17:12:55 -07001206tANI_BOOLEAN csrIsValidMcConcurrentSession(tpAniSirGlobal pMac, tANI_U32 sessionId,
1207 tSirBssDescription *pBssDesc);
Jeff Johnson295189b2012-06-20 16:38:30 -07001208tANI_BOOLEAN csrIsConnStateConnectedInfraAp( tpAniSirGlobal pMac, tANI_U32 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -07001209/*----------------------------------------------------------------------------
1210 \fn csrRoamRegisterLinkQualityIndCallback
1211
1212 \brief
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001213 a CSR function to allow HDD to register a callback handler with CSR for
1214 link quality indications.
Jeff Johnson295189b2012-06-20 16:38:30 -07001215
1216 Only one callback may be registered at any time.
1217 In order to deregister the callback, a NULL cback may be provided.
1218
1219 Registration happens in the task context of the caller.
1220
1221 \param callback - Call back being registered
1222 \param pContext - user data
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001223
Jeff Johnson295189b2012-06-20 16:38:30 -07001224 DEPENDENCIES: After CSR open
1225
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001226 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001227-----------------------------------------------------------------------------*/
1228eHalStatus csrRoamRegisterLinkQualityIndCallback(tpAniSirGlobal pMac,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001229 csrRoamLinkQualityIndCallback callback,
Jeff Johnson295189b2012-06-20 16:38:30 -07001230 void *pContext);
1231/* ---------------------------------------------------------------------------
1232 \fn csrGetStatistics
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001233 \brief csr function that client calls to register a callback to get
1234 different PHY level statistics from CSR.
1235
Jeff Johnson295189b2012-06-20 16:38:30 -07001236 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
1237 \param statsMask - The different category/categories of stats requester is looking for
1238 \param callback - SME sends back the requested stats using the callback
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001239 \param periodicity - If requester needs periodic update, 0 means it's an one
Jeff Johnson295189b2012-06-20 16:38:30 -07001240 time request
1241 \param cache - If requester is happy with cached stats
1242 \param staId - The station ID for which the stats is requested for
1243 \param pContext - user context to be passed back along with the callback
1244
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001245 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001246 ---------------------------------------------------------------------------*/
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001247eHalStatus csrGetStatistics(tpAniSirGlobal pMac, eCsrStatsRequesterType requesterId,
1248 tANI_U32 statsMask,
1249 tCsrStatsCallback callback,
1250 tANI_U32 periodicity, tANI_BOOLEAN cache,
Jeff Johnson295189b2012-06-20 16:38:30 -07001251 tANI_U8 staId, void *pContext);
1252
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +05301253/* ---------------------------------------------------------------------------
1254 \fn csrGetTLSTAState
1255 \helper function to get the TL STA State whenever the function is called.
1256
1257 \param staId - The staID to be passed to the TL
1258 to get the relevant TL STA State
1259 \return the state as tANI_U16
1260 ---------------------------------------------------------------------------*/
1261tANI_U16 csrGetTLSTAState(tpAniSirGlobal pMac, tANI_U8 staId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001262
1263eHalStatus csrGetRssi(tpAniSirGlobal pMac,tCsrRssiCallback callback,tANI_U8 staId,tCsrBssid bssId,void * pContext,void * pVosContext);
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05301264
1265/* ---------------------------------------------------------------------------
1266 \fn csrGetSnr
1267 \brief csr function that client calls to register a callback to get
1268 SNR stored in TL
1269
1270 \param callback - SME sends back the requested stats using the callback
1271 \param staId - The station ID for which the stats is requested for
1272 \param bssid - The bssid for the connected session
1273 \param pContext - user context to be passed back along with the callback
1274
1275 \return eHalStatus
1276 ---------------------------------------------------------------------------*/
1277eHalStatus csrGetSnr(tpAniSirGlobal pMac, tCsrSnrCallback callback,
1278 tANI_U8 staId, tCsrBssid bssId, void *pContext);
1279
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001280#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08001281eHalStatus csrGetRoamRssi(tpAniSirGlobal pMac,
1282 tCsrRssiCallback callback,
1283 tANI_U8 staId,
1284 tCsrBssid bssId,
1285 void * pContext,
1286 void * pVosContext);
1287#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001288
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001289#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001290eHalStatus csrGetTsmStats(tpAniSirGlobal pMac, tCsrTsmStatsCallback callback, tANI_U8 staId,
1291 tCsrBssid bssId, void *pContext, void* pVosContext,
1292 tANI_U8 tid);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001293#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001294
Jeff Johnson295189b2012-06-20 16:38:30 -07001295eHalStatus csrRoamRegisterCallback(tpAniSirGlobal pMac, csrRoamCompleteCallback callback, void *pContext);
1296/* ---------------------------------------------------------------------------
1297 \fn csrGetConfigParam
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001298 \brief HDD calls this function to get the global settings currently maintained by CSR.
Jeff Johnson295189b2012-06-20 16:38:30 -07001299 \param pParam - caller allocated memory
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001300 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001301 -------------------------------------------------------------------------------*/
1302eHalStatus csrGetConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam);
1303
1304/* ---------------------------------------------------------------------------
1305 \fn csrMsgProcessor
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001306 \brief HDD calls this function to change some global settings.
Jeff Johnson295189b2012-06-20 16:38:30 -07001307 caller must set the all fields or call csrGetConfigParam to prefill the fields.
1308 \param pParam - caller allocated memory
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001309 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001310 -------------------------------------------------------------------------------*/
1311eHalStatus csrChangeDefaultConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam);
1312
1313
1314/* ---------------------------------------------------------------------------
1315 \fn csrMsgProcessor
1316 \brief HDD calls this function for the messages that are handled by CSR.
1317 \param pMsgBuf - a pointer to a buffer that maps to various structures base on the message type.
1318 The beginning of the buffer can always map to tSirSmeRsp.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001319 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001320 -------------------------------------------------------------------------------*/
1321eHalStatus csrMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf );
1322
1323/* ---------------------------------------------------------------------------
1324 \fn csrOpen
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001325 \brief This function must be called before any API call to CSR.
1326 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001327 -------------------------------------------------------------------------------*/
1328eHalStatus csrOpen(tpAniSirGlobal pMac);
Mihir Shetee1093ba2014-01-21 20:13:32 +05301329
1330/* ---------------------------------------------------------------------------
1331 \fn csrInitChannels
1332 \brief This function must be called to initialize CSR channel lists
1333 \return eHalStatus
1334 -------------------------------------------------------------------------------*/
1335eHalStatus csrInitChannels(tpAniSirGlobal pMac);
1336
Mihir Shete04206452014-11-20 17:50:58 +05301337#ifdef CONFIG_ENABLE_LINUX_REG
Jeff Johnson295189b2012-06-20 16:38:30 -07001338/* ---------------------------------------------------------------------------
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301339 \fn csrInitChannelsForCC
1340 \brief This function must be called to issue reg hint
1341 \return eHalStatus
1342 -------------------------------------------------------------------------------*/
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301343eHalStatus csrInitChannelsForCC(tpAniSirGlobal pMac, driver_load_type init );
Mihir Shete04206452014-11-20 17:50:58 +05301344#endif
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301345
1346/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001347 \fn csrClose
1348 \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 -08001349 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001350 -------------------------------------------------------------------------------*/
1351eHalStatus csrClose(tpAniSirGlobal pMac);
1352/* ---------------------------------------------------------------------------
1353 \fn csrStart
1354 \brief To start CSR.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001355 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001356 -------------------------------------------------------------------------------*/
1357eHalStatus csrStart(tpAniSirGlobal pMac);
1358/* ---------------------------------------------------------------------------
1359 \fn csrStop
1360 \brief To stop CSR. CSR still keeps its current setting.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001361 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001362 -------------------------------------------------------------------------------*/
Kiet Lama72a2322013-11-15 11:18:11 +05301363eHalStatus csrStop(tpAniSirGlobal pMac, tHalStopType stopType);
Jeff Johnson295189b2012-06-20 16:38:30 -07001364/* ---------------------------------------------------------------------------
1365 \fn csrReady
1366 \brief To let CSR is ready to operate
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001367 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001368 -------------------------------------------------------------------------------*/
1369eHalStatus csrReady(tpAniSirGlobal pMac);
1370
1371#ifdef FEATURE_WLAN_WAPI
1372eHalStatus csrRoamGetBKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pNum,
1373 tBkidCacheInfo *pBkidCache);
1374
1375
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001376eHalStatus csrScanGetBKIDCandidateList(tpAniSirGlobal pMac, tANI_U32 sessionId,
Jeff Johnson295189b2012-06-20 16:38:30 -07001377 tBkidCandidateInfo *pBkidList, tANI_U32 *pNumItems );
1378tANI_U32 csrRoamGetNumBKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId);
1379eHalStatus csrRoamSetBKIDCache( tpAniSirGlobal pMac, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
1380 tANI_U32 numItems );
1381/* ---------------------------------------------------------------------------
1382 \fn csrRoamGetWapiReqIE
1383 \brief return the WAPI IE CSR passes to PE to JOIN request or START_BSS request
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001384 \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 -07001385 needed or IE length in pBuf.
1386 \param pBuf - Caller allocated memory that contain the IE field, if any, upon return
1387 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
1388 -------------------------------------------------------------------------------*/
1389eHalStatus csrRoamGetWapiReqIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf);
1390
1391/* ---------------------------------------------------------------------------
1392 \fn csrRoamGetWapiRspIE
1393 \brief return the WAPI IE from the beacon or probe rsp if connected
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001394 \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 -07001395 needed or IE length in pBuf.
1396 \param pBuf - Caller allocated memory that contain the IE field, if any, upon return
1397 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
1398 -------------------------------------------------------------------------------*/
1399eHalStatus csrRoamGetWapiRspIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf);
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001400tANI_U8 csrConstructWapiIe( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
Jeff Johnson295189b2012-06-20 16:38:30 -07001401 tSirBssDescription *pSirBssDesc, tDot11fBeaconIEs *pIes, tCsrWapiIe *pWapiIe );
1402#endif /* FEATURE_WLAN_WAPI */
1403
Jeff Johnson295189b2012-06-20 16:38:30 -07001404eHalStatus csrRoamUpdateAPWPSIE( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirAPWPSIEs *pAPWPSIES );
1405eHalStatus csrRoamUpdateWPARSNIEs( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirRSNie * pAPSirRSNie);
Jeff Johnson295189b2012-06-20 16:38:30 -07001406void csrSetCfgPrivacy( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy );
1407tANI_S8 csrGetInfraSessionId( tpAniSirGlobal pMac );
1408tANI_U8 csrGetInfraOperationChannel( tpAniSirGlobal pMac, tANI_U8 sessionId);
Sushant Kaushik1d732562014-05-21 14:15:37 +05301409tANI_BOOLEAN csrIsSessionClientAndConnected(tpAniSirGlobal pMac, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001410tANI_U8 csrGetConcurrentOperationChannel( tpAniSirGlobal pMac );
1411
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001412eHalStatus csrRoamCopyConnectProfile(tpAniSirGlobal pMac, tANI_U32 sessionId,
Jeff Johnson295189b2012-06-20 16:38:30 -07001413 tCsrRoamConnectedProfile *pProfile);
1414tANI_BOOLEAN csrIsSetKeyAllowed(tpAniSirGlobal pMac, tANI_U32 sessionId);
1415
1416void csrSetOppositeBandChannelInfo( tpAniSirGlobal pMac );
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001417void csrConstructCurrentValidChannelList( tpAniSirGlobal pMac, tDblLinkList *pChannelSetList,
Jeff Johnson295189b2012-06-20 16:38:30 -07001418 tANI_U8 *pChannelList, tANI_U8 bSize, tANI_U8 *pNumChannels );
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08001419
1420#ifdef FEATURE_WLAN_SCAN_PNO
Srikant Kuppa066904f2013-05-07 13:56:02 -07001421eHalStatus csrScanSavePreferredNetworkFound(tpAniSirGlobal pMac,
1422 tSirPrefNetworkFoundInd *pPrefNetworkFoundInd);
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08001423#endif //FEATURE_WLAN_SCAN_PNO
Jeff Johnson295189b2012-06-20 16:38:30 -07001424#endif
1425
1426#ifdef WLAN_FEATURE_VOWIFI_11R
1427//Returns whether the current association is a 11r assoc or not
1428tANI_BOOLEAN csrRoamIs11rAssoc(tpAniSirGlobal pMac);
1429#endif
1430
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001431#ifdef FEATURE_WLAN_ESE
1432//Returns whether the current association is a ESE assoc or not
1433tANI_BOOLEAN csrRoamIsESEAssoc(tpAniSirGlobal pMac);
1434tANI_BOOLEAN csrRoamIsEseIniFeatureEnabled(tpAniSirGlobal pMac);
1435tANI_BOOLEAN csrNeighborRoamIsESEAssoc(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -07001436#endif
1437
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001438//Remove this code once SLM_Sessionization is supported
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001439//BMPS_WORKAROUND_NOT_NEEDED
Jeff Johnson295189b2012-06-20 16:38:30 -07001440void csrDisconnectAllActiveSessions(tpAniSirGlobal pMac);
Mohit Khanna349bc392012-09-11 17:24:52 -07001441
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001442#ifdef FEATURE_WLAN_LFR
1443//Returns whether "Legacy Fast Roaming" is enabled...or not
Madan Mohan Koyyalamudi03aae5f2012-11-28 01:51:22 +05301444tANI_BOOLEAN csrRoamIsFastRoamEnabled(tpAniSirGlobal pMac, tANI_U32 sessionId);
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001445#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1446tANI_BOOLEAN csrRoamIsRoamOffloadScanEnabled(tpAniSirGlobal pMac);
1447#endif
Madan Mohan Koyyalamudi470d2cf2012-09-28 14:43:44 -07001448tANI_BOOLEAN csrIsChannelPresentInList( tANI_U8 *pChannelList, int numChannels, tANI_U8 channel );
1449VOS_STATUS csrAddToChannelListFront( tANI_U8 *pChannelList, int numChannels, tANI_U8 channel );
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001450#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1451eHalStatus csrScanRequestLfrResult(tpAniSirGlobal pMac, tANI_U32 sessionId,
1452 csrScanCompleteCallback callback, void *pContext);
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07001453eHalStatus csrRoamOffloadScanRspHdlr(tpAniSirGlobal pMac, tANI_U8 reason);
1454eHalStatus csrHandoffRequest(tpAniSirGlobal pMac, tCsrHandoffRequest *pHandoffInfo);
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001455#endif
1456tANI_BOOLEAN csrRoamIsStaMode(tpAniSirGlobal pMac, tANI_U32 sessionId);
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001457#endif
1458
Agarwal Ashish738843c2014-09-25 12:27:56 +05301459void csrDisableDfsChannel(tpAniSirGlobal pMac);