blob: 0a16b2f3223fddff50cdbd6031bd55f96a01584b [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 Singhc98534e2015-06-12 10:44:34 +0530673 tANI_BOOLEAN ignorePeerErpInfo;
Abhishek Singhde51a412014-05-20 19:17:26 +0530674 tANI_BOOLEAN sendDeauthBeforeCon;
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +0530675#ifdef WLAN_FEATURE_AP_HT40_24G
676 tANI_BOOLEAN apHT40_24GEnabled;
677 tANI_U32 channelBondingAPMode24GHz; // Use for SAP/P2P GO 2.4GHz channel Bonding
678#endif
Sushant Kaushikc9682be2014-11-26 12:27:04 +0530679 tANI_U32 nOBSSScanWidthTriggerInterval;
Girish Gowli1c2fc802015-01-19 16:18:07 +0530680 tANI_U8 roamDelayStatsEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700681}tCsrConfig;
682
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800683typedef struct tagCsrChannelPowerInfo
Jeff Johnson295189b2012-06-20 16:38:30 -0700684{
685 tListElem link;
686 tANI_U8 firstChannel;
687 tANI_U8 numChannels;
688 tANI_U8 txPower;
689 tANI_U8 interChannelOffset;
690}tCsrChannelPowerInfo;
691
692typedef struct tagRoamJoinStatus
693{
694 tSirResultCodes statusCode;
695 //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 -0800696 tANI_U32 reasonCode;
Kiran Kumar Lokerec8550fa2013-04-15 22:23:00 -0700697 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -0700698}tCsrRoamJoinStatus;
699
700typedef struct tagCsrOsChannelMask
701{
702 tANI_U8 numChannels;
703 tANI_BOOLEAN scanEnabled[WNI_CFG_VALID_CHANNEL_LIST_LEN];
704 tANI_U8 channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
705}tCsrOsChannelMask;
706
Agrawal Ashish0b6984f2014-04-05 18:35:45 +0530707typedef struct tagCsrVotes11d
708{
709 tANI_U8 votes;
710 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN];
711}tCsrVotes11d;
Jeff Johnson295189b2012-06-20 16:38:30 -0700712
713typedef struct tagCsrScanStruct
714{
715 tScanProfile scanProfile;
716 tANI_U32 nextScanID;
Madan Mohan Koyyalamudica43cdf2012-09-24 13:15:49 -0700717 tDblLinkList scanResultList;
Jeff Johnson295189b2012-06-20 16:38:30 -0700718 tDblLinkList tempScanResults;
719 tANI_BOOLEAN fScanEnable;
720 tANI_BOOLEAN fFullScanIssued;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530721 vos_timer_t hTimerGetResult;
Jeff Johnson295189b2012-06-20 16:38:30 -0700722#ifdef WLAN_AP_STA_CONCURRENCY
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530723 vos_timer_t hTimerStaApConcTimer;
Jeff Johnson295189b2012-06-20 16:38:30 -0700724#endif
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530725 vos_timer_t hTimerIdleScan;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530726 vos_timer_t hTimerResultCfgAging;
Jeff Johnson295189b2012-06-20 16:38:30 -0700727 tPalTimerHandle hTimerBgScan;
728 //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 -0800729 tANI_U8 channelOf11dInfo;
730 tANI_U8 scanResultCfgAgingTime;
Jeff Johnson295189b2012-06-20 16:38:30 -0700731 //changes on every scan, a flag to tell whether conflict 11d info found on each BSS
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800732 tANI_BOOLEAN fAmbiguous11dInfoFound;
Jeff Johnson295189b2012-06-20 16:38:30 -0700733 //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 -0800734 tANI_BOOLEAN fCurrent11dInfoMatch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700735 tANI_BOOLEAN f11dInfoReset; //to indicate whether the 11d info in CFG is reset to default
736 tSirScanType curScanType;
737 tCsrChannel baseChannels; //This are all the supported channels AND(&) to the current eBand
738 tCsrChannel channels11d;
739 tChannelListWithPower defaultPowerTable[WNI_CFG_VALID_CHANNEL_LIST_LEN]; //From NV
740 tChannelListWithPower defaultPowerTable40MHz[WNI_CFG_VALID_CHANNEL_LIST_LEN]; //From NV
741 tANI_U32 numChannelsDefault; //total channels of NV
742 tCsrChannel base20MHzChannels; //The channel base to work on
743 tCsrChannel base40MHzChannels; //center channels for 40MHz channels
744 tDblLinkList channelPowerInfoList24;
745 tDblLinkList channelPowerInfoList5G;
746 tANI_U32 nLastAgeTimeOut;
747 tANI_U32 nAgingCountDown;
Gopichand Nakkala114718f2013-03-25 19:19:46 -0700748 tANI_U8 countryCodeDefault[WNI_CFG_COUNTRY_CODE_LEN]; //The country code from NV
749 tANI_U8 countryCodeCurrent[WNI_CFG_COUNTRY_CODE_LEN];
750 tANI_U8 countryCode11d[WNI_CFG_COUNTRY_CODE_LEN];
Jeff Johnson295189b2012-06-20 16:38:30 -0700751 v_REGDOMAIN_t domainIdDefault; //default regulatory domain
752 v_REGDOMAIN_t domainIdCurrent; //current regulatory domain
Agarwal Ashishd9d72602013-09-13 00:06:17 +0530753 tCsrBssid currentCountryBssid; // Bssid for current country code
Mihir Shetebc866f62014-02-13 16:08:53 +0530754 tANI_S8 currentCountryRSSI; // RSSI for current country code
Jeff Johnson295189b2012-06-20 16:38:30 -0700755 tANI_BOOLEAN f11dInfoApplied;
756 tANI_BOOLEAN fCancelIdleScan;
Agrawal Ashish0b6984f2014-04-05 18:35:45 +0530757 tANI_U8 countryCodeCount;
758 tCsrVotes11d votes11d[CSR_MAX_NUM_COUNTRY_CODE]; //counts for various advertized country codes
759 //in 11d IE from probe rsp or beacons of neighboring APs;
760 //will use the most popular one (max count)
761 tANI_U8 countryCodeElected[WNI_CFG_COUNTRY_CODE_LEN];
762
763
Jeff Johnson295189b2012-06-20 16:38:30 -0700764#ifdef FEATURE_WLAN_WAPI
765// tANI_U16 NumBkidCandidate;
766// tBkidCandidateInfo BkidCandidateInfo[CSR_MAX_BKID_ALLOWED]; /* Move this as part of SessionEntry */
767#endif /* FEATURE_WLAN_WAPI */
768 tANI_U8 numBGScanChannel; //number of valid channels in the bgScanChannelList
769 tANI_U8 bgScanChannelList[WNI_CFG_BG_SCAN_CHANNEL_LIST_LEN];
770 //the ChannelInfo member is not used in this structure.
771 //numBGScanChannel and bgScanChannelList are used for the BG scan channel info
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800772 tCsrBGScanRequest bgScanParams;
Jeff Johnson295189b2012-06-20 16:38:30 -0700773 tANI_BOOLEAN fRestartIdleScan;
774 tANI_U32 nIdleScanTimeGap; //the time since last trying to trigger idle scan
775 tCsrOsChannelMask osScanChannelMask;//keep a track of channels to be scnned while in traffic condition
776 tANI_U16 nBssLimit; //the maximum number of BSS in scan cache
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800777 /*channelPowerInfoList24 has been seen corrupted. Set this flag to true trying to
Jeff Johnson295189b2012-06-20 16:38:30 -0700778 * detect when it happens. Adding this into code because we can't reproduce it easily.
779 * We don't know when it happens. */
780 tANI_BOOLEAN fValidateList;
781 /*Customer wants to start with an active scan based on the default country code.
782 * This optimization will minimize the driver load to association time.
783 * Based on this flag we will bypass the initial passive scan needed for 11d
784 * to determine the country code & domain */
785 tANI_BOOLEAN fEnableBypass11d;
786
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800787 /*Customer wants to optimize the scan time. Avoiding scans(passive) on DFS
788 * channels while swipping through both bands can save some time
Jeff Johnson295189b2012-06-20 16:38:30 -0700789 * (apprx 1.3 sec) */
Padma, Santhosh Kumar814d0992015-05-05 18:52:43 +0530790 tANI_U8 fEnableDFSChnlScan;
Jeff Johnson295189b2012-06-20 16:38:30 -0700791
Jeff Johnsone7245742012-09-05 17:12:55 -0700792 /*
793 * To enable/disable scanning only 2.4Ghz channels on first scan
794 */
795 tANI_BOOLEAN fFirstScanOnly2GChnl;
796
Jeff Johnson295189b2012-06-20 16:38:30 -0700797 tANI_BOOLEAN fDropScanCmd; //true means we don't accept scan commands
798
799#ifdef WLAN_AP_STA_CONCURRENCY
800 tDblLinkList scanCmdPendingList;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800801#endif
Madan Mohan Koyyalamudi470d2cf2012-09-28 14:43:44 -0700802 tCsrChannel occupiedChannels; //This includes all channels on which candidate APs are found
Srinivas Girigowda41c7c5f2013-10-21 19:01:38 -0700803 tANI_S8 inScanResultBestAPRssi;
Mihir Shetefc7ff5b2014-01-27 11:30:05 +0530804
805 csrScanCompleteCallback callback11dScanDone;
Peng Xu2446a892014-09-05 17:21:18 +0530806 eCsrBand scanBandPreference; //This defines the band perference for scan
Agarwal Ashish8bd53ae2015-06-12 18:03:45 +0530807 bool fcc_constraint;
Jeff Johnson295189b2012-06-20 16:38:30 -0700808}tCsrScanStruct;
809
810
811//Save the connected information. This structure + connectedProfile
812//should contain all information about the connection
813typedef struct tagRoamCsrConnectedInfo
814{
815 tANI_U32 nBeaconLength; //the length, in bytes, of the beacon frame, can be 0
816 tANI_U32 nAssocReqLength; //the length, in bytes, of the assoc req frame, can be 0
817 tANI_U32 nAssocRspLength; //The length, in bytes, of the assoc rsp frame, can be 0
818#ifdef WLAN_FEATURE_VOWIFI_11R
819 tANI_U32 nRICRspLength; //Length of the parsed RIC response IEs received in reassoc response
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800820#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800821#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -0700822 tANI_U32 nTspecIeLength;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800823#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700824 tANI_U8 *pbFrames; //Point to a buffer contain the beacon, assoc req, assoc rsp frame, in that order
825 //user needs to use nBeaconLength, nAssocReqLength, nAssocRspLength to desice where
826 //each frame starts and ends.
827 tANI_U8 staId;
828}tCsrRoamConnectedInfo;
829
830
831typedef struct tagCsrLinkQualityIndInfo
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800832{
Jeff Johnson295189b2012-06-20 16:38:30 -0700833 csrRoamLinkQualityIndCallback callback;
834 void *context;
835}tCsrLinkQualityIndInfo;
836
837typedef struct tagCsrPeStatsReqInfo
838{
839 tListElem link; /* list links */
840 tANI_U32 statsMask;
841 tANI_U32 periodicity;
842 tANI_BOOLEAN rspPending;
843 vos_timer_t hPeStatsTimer;
844 tANI_BOOLEAN timerRunning;
845 tANI_U8 staId;
846 tANI_U8 numClient;
847 tpAniSirGlobal pMac;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800848 /* To remember if the peStats timer is stopped successfully or not */
Jeff Johnson295189b2012-06-20 16:38:30 -0700849 tANI_BOOLEAN timerStopFailed;
850
851}tCsrPeStatsReqInfo;
852
853typedef struct tagCsrStatsClientReqInfo
854{
855 tListElem link; /* list links */
856 eCsrStatsRequesterType requesterId;
857 tCsrStatsCallback callback;
858 tANI_U32 periodicity;
859 void *pContext;
860 tANI_U32 statsMask;
861 tCsrPeStatsReqInfo *pPeStaEntry;
862 tANI_U8 staId;
863 vos_timer_t timer;
864 tANI_BOOLEAN timerExpired;
865 tpAniSirGlobal pMac; // TODO: Confirm this change BTAMP
866}tCsrStatsClientReqInfo;
867
868typedef struct tagCsrTlStatsReqInfo
869{
870 tANI_U32 periodicity;
871 tANI_BOOLEAN timerRunning;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530872 vos_timer_t hTlStatsTimer;
Jeff Johnson295189b2012-06-20 16:38:30 -0700873 tANI_U8 numClient;
874}tCsrTlStatsReqInfo;
875
876typedef struct tagCsrRoamSession
877{
878 tANI_U8 sessionId; // Session ID
879 tANI_BOOLEAN sessionActive; // TRUE if it is used
880 tCsrBssid selfMacAddr; // For BT-AMP station, this serve as BSSID for self-BSS.
881 csrRoamCompleteCallback callback;
882 void *pContext;
883 eCsrConnectState connectState;
884 tCsrRoamConnectedProfile connectedProfile;
885 tCsrRoamConnectedInfo connectedInfo;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800886 tCsrRoamProfile *pCurRoamProfile;
Jeff Johnson295189b2012-06-20 16:38:30 -0700887 tSirBssDescription *pConnectBssDesc;
Kanchanapally, Vidyullatha0c611b02014-11-26 21:30:05 +0530888 tANI_U16 NumPmkidCache; /* valid no. of pmkid in the cache */
889 tANI_U16 CurCacheIndex; /* the index in pmkidcache to write next to */
Jeff Johnson295189b2012-06-20 16:38:30 -0700890 tPmkidCacheInfo PmkidCacheInfo[CSR_MAX_PMKID_ALLOWED];
891 tANI_U8 cJoinAttemps;
892 //This may or may not have the up-to-date valid channel list
893 //It is used to get WNI_CFG_VALID_CHANNEL_LIST and not allocate memory all the time
894 tSirMacChanNum validChannelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
895 tANI_S32 sPendingCommands; //0 means CSR is ok to low power
896#ifdef FEATURE_WLAN_WAPI
897 tANI_U16 NumBkidCache;
898 tBkidCacheInfo BkidCacheInfo[CSR_MAX_BKID_ALLOWED];
899#endif /* FEATURE_WLAN_WAPI */
900 tANI_BOOLEAN fRoaming; //indicate whether CSR is roaming (either via lostlink or dynamic roaming)
901 //to remember some parameters needed for START_BSS.
902 //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 -0800903 tCsrRoamStartBssParams bssParams;
Jeff Johnson295189b2012-06-20 16:38:30 -0700904 tANI_U32 nWpaRsnReqIeLength; //the byte count of pWpaRsnIE;
905 tANI_U8 *pWpaRsnReqIE; //this contain the WPA/RSN IE in assoc request or the one sent in beacon (IBSS)
906 tANI_U32 nWpaRsnRspIeLength; //the byte count for pWpaRsnRspIE
907 tANI_U8 *pWpaRsnRspIE; //this contain the WPA/RSN IE in beacon/probe rsp
908#ifdef FEATURE_WLAN_WAPI
909 tANI_U32 nWapiReqIeLength; //the byte count of pWapiReqIE;
910 tANI_U8 *pWapiReqIE; //this contain the WAPI IE in assoc request or the one sent in beacon (IBSS)
911 tANI_U32 nWapiRspIeLength; //the byte count for pWapiRspIE
912 tANI_U8 *pWapiRspIE; //this contain the WAPI IE in beacon/probe rsp
913#endif /* FEATURE_WLAN_WAPI */
Agarwal Ashish4f616132013-12-30 23:32:50 +0530914 tANI_U32 nAddIEScanLength; //length of addIeScan
915 /* This contains the additional IE in (unicast)
916 * probe request at the time of join
917 */
Ganesh Kondabattini7500fb32015-04-10 14:50:32 +0530918 tANI_U8 addIEScan[SIR_MAC_MAX_ADD_IE_LENGTH+2];
Jeff Johnson295189b2012-06-20 16:38:30 -0700919 tANI_U32 nAddIEAssocLength; //the byte count for pAddIeAssocIE
920 tANI_U8 *pAddIEAssoc; //this contains the additional IE in (re) assoc request
921
922 tANI_TIMESTAMP roamingStartTime; //in units of 10ms
923 tCsrTimerInfo roamingTimerInfo;
924 eCsrRoamingReason roamingReason;
925 tANI_BOOLEAN fCancelRoaming;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530926 vos_timer_t hTimerRoaming;
Jeff Johnson295189b2012-06-20 16:38:30 -0700927 eCsrRoamResult roamResult; //the roamResult that is used when the roaming timer fires
928 tCsrRoamJoinStatus joinFailStatusCode; //This is the reason code for join(assoc) failure
929 //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 -0800930 tANI_U32 roamingStatusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700931 tANI_U16 NumPmkidCandidate;
932 tPmkidCandidateInfo PmkidCandidateInfo[CSR_MAX_PMKID_ALLOWED];
933 #ifdef FEATURE_WLAN_WAPI
934 tANI_U16 NumBkidCandidate;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800935 tBkidCandidateInfo BkidCandidateInfo[CSR_MAX_BKID_ALLOWED];
Jeff Johnson295189b2012-06-20 16:38:30 -0700936#endif
937 tANI_BOOLEAN fWMMConnection;
Sandeep Puligillaaea98a22013-12-04 13:36:32 +0530938 tANI_BOOLEAN fQOSConnection;
939
Jeff Johnson295189b2012-06-20 16:38:30 -0700940#ifdef FEATURE_WLAN_BTAMP_UT_RF
941 //To retry a join later when it fails if so desired
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530942 vos_timer_t hTimerJoinRetry;
Jeff Johnson295189b2012-06-20 16:38:30 -0700943 tCsrTimerInfo joinRetryTimerInfo;
944 tANI_U32 maxRetryCount;
945#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800946#ifdef FEATURE_WLAN_ESE
947 tCsrEseCckmInfo eseCckmInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700948 tANI_BOOLEAN isPrevApInfoValid;
949 tSirMacSSid prevApSSID;
950 tCsrBssid prevApBssid;
951 tANI_U8 prevOpChannel;
952 tANI_U16 clientDissSecs;
953 tANI_U32 roamTS1;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800954#if defined(FEATURE_WLAN_ESE_UPLOAD)
955 tCsrEseCckmIe suppCckmIeInfo;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700956#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700957#endif
958 tANI_U8 bRefAssocStartCnt; //Tracking assoc start indication
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800959 /* to force the AP initiate fresh 802.1x authentication after re-association need to clear
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700960 * the PMKID cache. To clear the cache in this particular case this is added
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800961 * it is needed by the HS 2.0 passpoint certification 5.2.a and b testcases */
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700962 tANI_BOOLEAN fIgnorePMKIDCache;
Sushant Kaushikb4834d22015-07-15 15:29:05 +0530963 tANI_BOOLEAN abortConnection;
Jeff Johnson295189b2012-06-20 16:38:30 -0700964} tCsrRoamSession;
965
966typedef struct tagCsrRoamStruct
967{
968 tANI_U32 nextRoamId;
969 tDblLinkList roamCmdPendingList;
970 tDblLinkList channelList5G;
971 tDblLinkList channelList24;
972 tCsrConfig configParam;
973 tANI_U32 numChannelsEeprom; //total channels of eeprom
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800974 tCsrChannel base20MHzChannels; //The channel base to work on
975 tCsrChannel base40MHzChannels; //center channels for 40MHz channels
976 eCsrRoamState curState[CSR_ROAM_SESSION_MAX];
Jeff Johnson295189b2012-06-20 16:38:30 -0700977 eCsrRoamSubState curSubState[CSR_ROAM_SESSION_MAX];
978 //This may or may not have the up-to-date valid channel list
979 //It is used to get WNI_CFG_VALID_CHANNEL_LIST and not allocate memory all the time
980 tSirMacChanNum validChannelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
981 tANI_U32 numValidChannels; //total number of channels in CFG
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800982
Jeff Johnson295189b2012-06-20 16:38:30 -0700983 tANI_S32 sPendingCommands;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530984 vos_timer_t hTimerWaitForKey; //To support timeout for WaitForKey state
Jeff Johnson295189b2012-06-20 16:38:30 -0700985 tCsrSummaryStatsInfo summaryStatsInfo;
986 tCsrGlobalClassAStatsInfo classAStatsInfo;
987 tCsrGlobalClassBStatsInfo classBStatsInfo;
988 tCsrGlobalClassCStatsInfo classCStatsInfo;
989 tCsrGlobalClassDStatsInfo classDStatsInfo;
990 tCsrPerStaStatsInfo perStaStatsInfo[CSR_MAX_STA];
991 tDblLinkList statsClientReqList;
992 tDblLinkList peStatsReqList;
993 tCsrTlStatsReqInfo tlStatsReqInfo;
994 eCsrRoamLinkQualityInd vccLinkQuality;
995 tCsrLinkQualityIndInfo linkQualityIndInfo;
996 v_CONTEXT_t gVosContext; //used for interaction with TL
997 //To specify whether an association or a IBSS is WMM enabled
998 //This parameter is only valid during a join or start BSS command is being executed
999 //tANI_BOOLEAN fWMMConnection; /* Moving it to be part of roamsession */
1000 v_U8_t ucACWeights[WLANTL_MAX_AC];
1001 /* TODO : Upto here */
1002 tCsrTimerInfo WaitForKeyTimerInfo;
1003 tCsrRoamSession *roamSession;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001004 tANI_U32 transactionId; // Current transaction ID for internal use.
1005#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Jeff Johnson295189b2012-06-20 16:38:30 -07001006 tCsrNeighborRoamControlInfo neighborRoamInfo;
1007#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001008#ifdef FEATURE_WLAN_LFR
1009 tANI_U8 isFastRoamIniFeatureEnabled;
1010#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001011#ifdef FEATURE_WLAN_ESE
1012 tANI_U8 isEseIniFeatureEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -07001013#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001014#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -07001015 tANI_U8 RoamRssiDiff;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07001016 tANI_BOOLEAN isWESModeEnabled;
Jeff Johnson43971f52012-07-17 12:26:56 -07001017#endif
Leela Venkata Kiran Kumar Reddy Chirala56df73f2014-01-30 14:18:00 -08001018 tANI_U32 deauthRspStatus;
Jeff Johnson295189b2012-06-20 16:38:30 -07001019}tCsrRoamStruct;
1020
1021
1022#define GET_NEXT_ROAM_ID(pRoamStruct) (((pRoamStruct)->nextRoamId + 1 == 0) ? 1 : (pRoamStruct)->nextRoamId)
1023#define CSR_IS_ROAM_STATE(pMac, state, sessionId) ( (state) == (pMac)->roam.curState[sessionId] )
1024
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001025#define CSR_IS_ROAM_STOP(pMac, sessionId) CSR_IS_ROAM_STATE( (pMac), eCSR_ROAMING_STATE_STOP, sessionId )
1026#define CSR_IS_ROAM_INIT(pMac, sessionId) CSR_IS_ROAM_STATE( (pMac), eCSR_ROAMING_STATE_INIT, sessionId )
Jeff Johnson295189b2012-06-20 16:38:30 -07001027#define CSR_IS_ROAM_SCANNING(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_SCANNING, sessionId )
1028#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 -08001029#define CSR_IS_ROAM_IDLE(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_IDLE, sessionId )
Jeff Johnson295189b2012-06-20 16:38:30 -07001030#define CSR_IS_ROAM_JOINED(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_JOINED, sessionId )
1031
1032#define CSR_IS_ROAM_SUBSTATE(pMac, subState, sessionId) ((subState) == (pMac)->roam.curSubState[sessionId])
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001033#define CSR_IS_ROAM_SUBSTATE_JOIN_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOIN_REQ, sessionId)
1034#define CSR_IS_ROAM_SUBSTATE_AUTH_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_AUTH_REQ, sessionId)
1035#define CSR_IS_ROAM_SUBSTATE_REASSOC_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_REASSOC_REQ, sessionId)
1036#define CSR_IS_ROAM_SUBSTATE_DISASSOC_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_REQ, sessionId)
1037#define CSR_IS_ROAM_SUBSTATE_DISASSOC_NO_JOIN(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_NOTHING_TO_JOIN, sessionId)
1038#define CSR_IS_ROAM_SUBSTATE_REASSOC_FAIL(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_REASSOC_FAILURE, sessionId)
1039#define CSR_IS_ROAM_SUBSTATE_DISASSOC_FORCED(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_FORCED, sessionId)
1040#define CSR_IS_ROAM_SUBSTATE_DEAUTH_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DEAUTH_REQ, sessionId)
1041#define CSR_IS_ROAM_SUBSTATE_START_BSS_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_START_BSS_REQ, sessionId)
1042#define CSR_IS_ROAM_SUBSTATE_STOP_BSS_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_STOP_BSS_REQ, sessionId)
1043#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 -07001044#define CSR_IS_ROAM_SUBSTATE_CONFIG(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_CONFIG, sessionId)
1045#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 -08001046#define CSR_IS_ROAM_SUBSTATE_DISASSOC_HO(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_HANDOFF, sessionId)
1047#define CSR_IS_ROAM_SUBSTATE_HO_NT(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOINED_NO_TRAFFIC, sessionId)
1048#define CSR_IS_ROAM_SUBSTATE_HO_NRT(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOINED_NON_REALTIME_TRAFFIC, sessionId)
1049#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 -07001050
1051#define CSR_IS_PHY_MODE_B_ONLY(pMac) \
1052 ((eCSR_DOT11_MODE_11b == (pMac)->roam.configParam.phyMode) ||\
1053 (eCSR_DOT11_MODE_11b_ONLY == (pMac)->roam.configParam.phyMode))
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001054
Jeff Johnson295189b2012-06-20 16:38:30 -07001055#define CSR_IS_PHY_MODE_G_ONLY(pMac) \
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001056 (eCSR_DOT11_MODE_11g == (pMac)->roam.configParam.phyMode || eCSR_DOT11_MODE_11g_ONLY == (pMac)->roam.configParam.phyMode)
1057
Jeff Johnson295189b2012-06-20 16:38:30 -07001058#define CSR_IS_PHY_MODE_A_ONLY(pMac) \
1059 ((eCSR_DOT11_MODE_11a == (pMac)->roam.configParam.phyMode) ||\
1060 (eCSR_DOT11_MODE_11a_ONLY == (pMac)->roam.configParam.phyMode))
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001061
Jeff Johnsone7245742012-09-05 17:12:55 -07001062#ifdef WLAN_FEATURE_11AC
1063#define CSR_IS_PHY_MODE_DUAL_BAND(phyMode) \
1064 ((eCSR_DOT11_MODE_abg & (phyMode)) || (eCSR_DOT11_MODE_11n & (phyMode)) || \
1065 (eCSR_DOT11_MODE_11ac & (phyMode)) || \
1066 (eCSR_DOT11_MODE_TAURUS & (phyMode)) || \
1067 (eCSR_DOT11_MODE_AUTO & (phyMode)))
1068#else
Jeff Johnson295189b2012-06-20 16:38:30 -07001069#define CSR_IS_PHY_MODE_DUAL_BAND(phyMode) \
1070 ((eCSR_DOT11_MODE_abg & (phyMode)) || (eCSR_DOT11_MODE_11n & (phyMode)) || \
1071 (eCSR_DOT11_MODE_TAURUS & (phyMode)) || \
1072 (eCSR_DOT11_MODE_AUTO & (phyMode)))
Jeff Johnsone7245742012-09-05 17:12:55 -07001073#endif
1074
Jeff Johnson295189b2012-06-20 16:38:30 -07001075
1076// this function returns TRUE if the NIC is operating exclusively in the 2.4 GHz band, meaning
1077// it is NOT operating in the 5.0 GHz band.
1078#define CSR_IS_24_BAND_ONLY(pMac) \
1079 (eCSR_BAND_24 == (pMac)->roam.configParam.eBand)
1080
1081#define CSR_IS_5G_BAND_ONLY(pMac) \
1082 (eCSR_BAND_5G == (pMac)->roam.configParam.eBand)
1083
1084#define CSR_IS_RADIO_DUAL_BAND(pMac) \
1085 (eCSR_BAND_ALL == (pMac)->roam.configParam.bandCapability)
1086
1087#define CSR_IS_RADIO_BG_ONLY(pMac) \
1088 (eCSR_BAND_24 == (pMac)->roam.configParam.bandCapability)
1089
1090// this function returns TRUE if the NIC is operating exclusively in the 5.0 GHz band, meaning
1091// it is NOT operating in the 2.4 GHz band
1092#define CSR_IS_RADIO_A_ONLY(pMac) \
1093 (eCSR_BAND_5G == (pMac)->roam.configParam.bandCapability)
1094
1095// this function returns TRUE if the NIC is operating in both bands.
1096#define CSR_IS_OPEARTING_DUAL_BAND(pMac) \
1097 ((eCSR_BAND_ALL == (pMac)->roam.configParam.bandCapability) && (eCSR_BAND_ALL == (pMac)->roam.configParam.eBand))
1098
1099// this function returns TRUE if the NIC can operate in the 5.0 GHz band (could operate in the
1100// 2.4 GHz band also).
1101#define CSR_IS_OPERATING_A_BAND(pMac) \
1102 (CSR_IS_OPEARTING_DUAL_BAND((pMac)) || CSR_IS_RADIO_A_ONLY((pMac)) || CSR_IS_5G_BAND_ONLY((pMac)))
1103
1104// this function returns TRUE if the NIC can operate in the 2.4 GHz band (could operate in the
1105// 5.0 GHz band also).
1106#define CSR_IS_OPERATING_BG_BAND(pMac) \
1107 (CSR_IS_OPEARTING_DUAL_BAND((pMac)) || CSR_IS_RADIO_BG_ONLY((pMac)) || CSR_IS_24_BAND_ONLY((pMac)))
1108
1109#define CSR_IS_CHANNEL_5GHZ(chnNum) \
Jeff Johnsone7245742012-09-05 17:12:55 -07001110 (((chnNum) >= CSR_MIN_5GHz_CHANNEL_NUMBER) && ((chnNum) <= CSR_MAX_5GHz_CHANNEL_NUMBER))
Jeff Johnson295189b2012-06-20 16:38:30 -07001111
Srinivas Girigowdade697412013-02-14 16:31:48 -08001112#define CSR_IS_CHANNEL_DFS(chnNum) \
1113 (NV_CHANNEL_ENABLE != vos_nv_getChannelEnabledState(chnNum))
1114
Jeff Johnson295189b2012-06-20 16:38:30 -07001115#define CSR_IS_CHANNEL_24GHZ(chnNum) \
1116 (((chnNum) > 0) && ((chnNum) <= CSR_MAX_24GHz_CHANNEL_NUMBER))
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001117
Jeff Johnson295189b2012-06-20 16:38:30 -07001118#define CSR_IS_SAME_BAND_CHANNELS(ch1, ch2) (CSR_IS_CHANNEL_5GHZ(ch1) == CSR_IS_CHANNEL_5GHZ(ch2))
1119
1120
1121#define CSR_IS_11D_INFO_FOUND(pMac) \
1122 (0 != (pMac)->scan.channelOf11dInfo)
1123// DEAUTHIND
1124#define CSR_IS_ROAMING(pSession) ((CSR_IS_LOSTLINK_ROAMING((pSession)->roamingReason)) || \
1125 (eCsrDynamicRoaming == (pSession)->roamingReason) || \
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001126 (eCsrReassocRoaming == (pSession)->roamingReason))
Jeff Johnson295189b2012-06-20 16:38:30 -07001127
1128
1129#define CSR_IS_SET_KEY_COMMAND( pCommand ) ( eSmeCommandSetKey == (pCommand)->command )
1130
1131#define CSR_IS_ADDTS_WHEN_ACMOFF_SUPPORTED(pMac) (pMac->roam.configParam.addTSWhenACMIsOff)
1132// DEAUTHIND
1133#define CSR_IS_LOSTLINK_ROAMING(reason) ((eCsrLostlinkRoamingDisassoc == (reason)) || (eCsrLostlinkRoamingDeauth == (reason)))
1134
Venkata Prathyusha Kuntupalli239278b2013-03-26 15:58:18 -07001135#define CSR_IS_ROAMING_COMMAND(pCommand) ((eCsrLostLink1 == (pCommand)->u.roamCmd.roamReason) ||\
1136 (eCsrLostLink2 == (pCommand)->u.roamCmd.roamReason) ||\
1137 (eCsrLostLink3 == (pCommand)->u.roamCmd.roamReason) )
1138
1139
Jeff Johnson295189b2012-06-20 16:38:30 -07001140//Stop CSR from asking for IMPS, This function doesn't disable IMPS from CSR
1141void csrScanSuspendIMPS( tpAniSirGlobal pMac );
1142//Start CSR from asking for IMPS. This function doesn't trigger CSR to request entering IMPS
1143//because IMPS maybe disabled.
1144void csrScanResumeIMPS( tpAniSirGlobal pMac );
1145
1146eHalStatus csrInitGetChannels(tpAniSirGlobal pMac);
Srinivas, Dasari42bf7702014-02-07 11:29:53 +05301147eHalStatus csrScanFilterResults(tpAniSirGlobal pMac);
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +05301148eHalStatus csrScanFilterDFSResults(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -07001149
1150eHalStatus csrSetModifyProfileFields(tpAniSirGlobal pMac, tANI_U32 sessionId,
1151 tCsrRoamModifyProfileFields *pModifyProfileFields);
1152/* ---------------------------------------------------------------------------
1153 \fn csrGetModifyProfileFields
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001154 \brief HDD or SME - QOS calls this function to get the current values of
Jeff Johnson295189b2012-06-20 16:38:30 -07001155 connected profile fields changing which can cause reassoc.
1156 This function must be called after CFG is downloaded and STA is in connected
1157 state.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001158 \param pModifyProfileFields - pointer to the connected profile fields
Jeff Johnson295189b2012-06-20 16:38:30 -07001159 changing which can cause reassoc
1160
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001161 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001162 -------------------------------------------------------------------------------*/
1163eHalStatus csrGetModifyProfileFields(tpAniSirGlobal pMac, tANI_U32 sessionId,
1164 tCsrRoamModifyProfileFields * pModifyProfileFields);
1165void csrSetGlobalCfgs( tpAniSirGlobal pMac );
1166void csrSetDefaultDot11Mode( tpAniSirGlobal pMac );
1167void csrScanSetChannelMask(tpAniSirGlobal pMac, tCsrChannelInfo *pChannelInfo);
1168tANI_BOOLEAN csrIsConnStateDisconnected(tpAniSirGlobal pMac, tANI_U32 sessionId);
1169tANI_BOOLEAN csrIsConnStateConnectedIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1170tANI_BOOLEAN csrIsConnStateDisconnectedIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1171tANI_BOOLEAN csrIsConnStateConnectedInfra( tpAniSirGlobal pMac, tANI_U32 sessionId );
1172tANI_BOOLEAN csrIsConnStateConnected( tpAniSirGlobal pMac, tANI_U32 sessionId );
1173tANI_BOOLEAN csrIsConnStateInfra( tpAniSirGlobal pMac, tANI_U32 sessionId );
1174tANI_BOOLEAN csrIsConnStateIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1175tANI_BOOLEAN csrIsConnStateWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1176tANI_BOOLEAN csrIsConnStateConnectedWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1177tANI_BOOLEAN csrIsConnStateDisconnectedWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1178tANI_BOOLEAN csrIsAnySessionInConnectState( tpAniSirGlobal pMac );
1179tANI_BOOLEAN csrIsAllSessionDisconnected( tpAniSirGlobal pMac );
Madan Mohan Koyyalamudi48081ef2012-12-04 16:49:55 -08001180tANI_BOOLEAN csrIsStaSessionConnected( tpAniSirGlobal pMac );
1181tANI_BOOLEAN csrIsP2pSessionConnected( tpAniSirGlobal pMac );
Madan Mohan Koyyalamudid3d22592012-09-24 14:01:29 -07001182tANI_BOOLEAN csrIsAnySessionConnected( tpAniSirGlobal pMac );
Jeff Johnson295189b2012-06-20 16:38:30 -07001183tANI_BOOLEAN csrIsInfraConnected( tpAniSirGlobal pMac );
1184tANI_BOOLEAN csrIsConcurrentInfraConnected( tpAniSirGlobal pMac );
Jeff Johnsone7245742012-09-05 17:12:55 -07001185tANI_BOOLEAN csrIsConcurrentSessionRunning( tpAniSirGlobal pMac );
Jeff Johnsone7245742012-09-05 17:12:55 -07001186tANI_BOOLEAN csrIsInfraApStarted( tpAniSirGlobal pMac );
Jeff Johnson295189b2012-06-20 16:38:30 -07001187tANI_BOOLEAN csrIsIBSSStarted( tpAniSirGlobal pMac );
1188tANI_BOOLEAN csrIsBTAMPStarted( tpAniSirGlobal pMac );
1189tANI_BOOLEAN csrIsBTAMP( tpAniSirGlobal pMac, tANI_U32 sessionId );
1190eHalStatus csrIsBTAMPAllowed( tpAniSirGlobal pMac, tANI_U32 chnId );
Jeff Johnsone7245742012-09-05 17:12:55 -07001191tANI_BOOLEAN csrIsValidMcConcurrentSession(tpAniSirGlobal pMac, tANI_U32 sessionId,
1192 tSirBssDescription *pBssDesc);
Jeff Johnson295189b2012-06-20 16:38:30 -07001193tANI_BOOLEAN csrIsConnStateConnectedInfraAp( tpAniSirGlobal pMac, tANI_U32 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -07001194/*----------------------------------------------------------------------------
1195 \fn csrRoamRegisterLinkQualityIndCallback
1196
1197 \brief
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001198 a CSR function to allow HDD to register a callback handler with CSR for
1199 link quality indications.
Jeff Johnson295189b2012-06-20 16:38:30 -07001200
1201 Only one callback may be registered at any time.
1202 In order to deregister the callback, a NULL cback may be provided.
1203
1204 Registration happens in the task context of the caller.
1205
1206 \param callback - Call back being registered
1207 \param pContext - user data
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001208
Jeff Johnson295189b2012-06-20 16:38:30 -07001209 DEPENDENCIES: After CSR open
1210
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001211 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001212-----------------------------------------------------------------------------*/
1213eHalStatus csrRoamRegisterLinkQualityIndCallback(tpAniSirGlobal pMac,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001214 csrRoamLinkQualityIndCallback callback,
Jeff Johnson295189b2012-06-20 16:38:30 -07001215 void *pContext);
1216/* ---------------------------------------------------------------------------
1217 \fn csrGetStatistics
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001218 \brief csr function that client calls to register a callback to get
1219 different PHY level statistics from CSR.
1220
Jeff Johnson295189b2012-06-20 16:38:30 -07001221 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
1222 \param statsMask - The different category/categories of stats requester is looking for
1223 \param callback - SME sends back the requested stats using the callback
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001224 \param periodicity - If requester needs periodic update, 0 means it's an one
Jeff Johnson295189b2012-06-20 16:38:30 -07001225 time request
1226 \param cache - If requester is happy with cached stats
1227 \param staId - The station ID for which the stats is requested for
1228 \param pContext - user context to be passed back along with the callback
1229
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001230 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001231 ---------------------------------------------------------------------------*/
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001232eHalStatus csrGetStatistics(tpAniSirGlobal pMac, eCsrStatsRequesterType requesterId,
1233 tANI_U32 statsMask,
1234 tCsrStatsCallback callback,
1235 tANI_U32 periodicity, tANI_BOOLEAN cache,
Jeff Johnson295189b2012-06-20 16:38:30 -07001236 tANI_U8 staId, void *pContext);
1237
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +05301238/* ---------------------------------------------------------------------------
1239 \fn csrGetTLSTAState
1240 \helper function to get the TL STA State whenever the function is called.
1241
1242 \param staId - The staID to be passed to the TL
1243 to get the relevant TL STA State
1244 \return the state as tANI_U16
1245 ---------------------------------------------------------------------------*/
1246tANI_U16 csrGetTLSTAState(tpAniSirGlobal pMac, tANI_U8 staId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001247
1248eHalStatus csrGetRssi(tpAniSirGlobal pMac,tCsrRssiCallback callback,tANI_U8 staId,tCsrBssid bssId,void * pContext,void * pVosContext);
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05301249
1250/* ---------------------------------------------------------------------------
1251 \fn csrGetSnr
1252 \brief csr function that client calls to register a callback to get
1253 SNR stored in TL
1254
1255 \param callback - SME sends back the requested stats using the callback
1256 \param staId - The station ID for which the stats is requested for
1257 \param bssid - The bssid for the connected session
1258 \param pContext - user context to be passed back along with the callback
1259
1260 \return eHalStatus
1261 ---------------------------------------------------------------------------*/
1262eHalStatus csrGetSnr(tpAniSirGlobal pMac, tCsrSnrCallback callback,
1263 tANI_U8 staId, tCsrBssid bssId, void *pContext);
1264
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001265#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08001266eHalStatus csrGetRoamRssi(tpAniSirGlobal pMac,
1267 tCsrRssiCallback callback,
1268 tANI_U8 staId,
1269 tCsrBssid bssId,
1270 void * pContext,
1271 void * pVosContext);
1272#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001273
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001274#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001275eHalStatus csrGetTsmStats(tpAniSirGlobal pMac, tCsrTsmStatsCallback callback, tANI_U8 staId,
1276 tCsrBssid bssId, void *pContext, void* pVosContext,
1277 tANI_U8 tid);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001278#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001279
Jeff Johnson295189b2012-06-20 16:38:30 -07001280eHalStatus csrRoamRegisterCallback(tpAniSirGlobal pMac, csrRoamCompleteCallback callback, void *pContext);
1281/* ---------------------------------------------------------------------------
1282 \fn csrGetConfigParam
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001283 \brief HDD calls this function to get the global settings currently maintained by CSR.
Jeff Johnson295189b2012-06-20 16:38:30 -07001284 \param pParam - caller allocated memory
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001285 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001286 -------------------------------------------------------------------------------*/
1287eHalStatus csrGetConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam);
1288
1289/* ---------------------------------------------------------------------------
1290 \fn csrMsgProcessor
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001291 \brief HDD calls this function to change some global settings.
Jeff Johnson295189b2012-06-20 16:38:30 -07001292 caller must set the all fields or call csrGetConfigParam to prefill the fields.
1293 \param pParam - caller allocated memory
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001294 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001295 -------------------------------------------------------------------------------*/
1296eHalStatus csrChangeDefaultConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam);
1297
1298
1299/* ---------------------------------------------------------------------------
1300 \fn csrMsgProcessor
1301 \brief HDD calls this function for the messages that are handled by CSR.
1302 \param pMsgBuf - a pointer to a buffer that maps to various structures base on the message type.
1303 The beginning of the buffer can always map to tSirSmeRsp.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001304 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001305 -------------------------------------------------------------------------------*/
1306eHalStatus csrMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf );
1307
1308/* ---------------------------------------------------------------------------
1309 \fn csrOpen
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001310 \brief This function must be called before any API call to CSR.
1311 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001312 -------------------------------------------------------------------------------*/
1313eHalStatus csrOpen(tpAniSirGlobal pMac);
Mihir Shetee1093ba2014-01-21 20:13:32 +05301314
1315/* ---------------------------------------------------------------------------
1316 \fn csrInitChannels
1317 \brief This function must be called to initialize CSR channel lists
1318 \return eHalStatus
1319 -------------------------------------------------------------------------------*/
1320eHalStatus csrInitChannels(tpAniSirGlobal pMac);
1321
Mihir Shete04206452014-11-20 17:50:58 +05301322#ifdef CONFIG_ENABLE_LINUX_REG
Jeff Johnson295189b2012-06-20 16:38:30 -07001323/* ---------------------------------------------------------------------------
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301324 \fn csrInitChannelsForCC
1325 \brief This function must be called to issue reg hint
1326 \return eHalStatus
1327 -------------------------------------------------------------------------------*/
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301328eHalStatus csrInitChannelsForCC(tpAniSirGlobal pMac, driver_load_type init );
Mihir Shete04206452014-11-20 17:50:58 +05301329#endif
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301330
1331/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001332 \fn csrClose
1333 \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 -08001334 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001335 -------------------------------------------------------------------------------*/
1336eHalStatus csrClose(tpAniSirGlobal pMac);
1337/* ---------------------------------------------------------------------------
1338 \fn csrStart
1339 \brief To start CSR.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001340 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001341 -------------------------------------------------------------------------------*/
1342eHalStatus csrStart(tpAniSirGlobal pMac);
1343/* ---------------------------------------------------------------------------
1344 \fn csrStop
1345 \brief To stop CSR. CSR still keeps its current setting.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001346 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001347 -------------------------------------------------------------------------------*/
Kiet Lama72a2322013-11-15 11:18:11 +05301348eHalStatus csrStop(tpAniSirGlobal pMac, tHalStopType stopType);
Jeff Johnson295189b2012-06-20 16:38:30 -07001349/* ---------------------------------------------------------------------------
1350 \fn csrReady
1351 \brief To let CSR is ready to operate
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001352 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001353 -------------------------------------------------------------------------------*/
1354eHalStatus csrReady(tpAniSirGlobal pMac);
1355
1356#ifdef FEATURE_WLAN_WAPI
1357eHalStatus csrRoamGetBKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pNum,
1358 tBkidCacheInfo *pBkidCache);
1359
1360
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001361eHalStatus csrScanGetBKIDCandidateList(tpAniSirGlobal pMac, tANI_U32 sessionId,
Jeff Johnson295189b2012-06-20 16:38:30 -07001362 tBkidCandidateInfo *pBkidList, tANI_U32 *pNumItems );
1363tANI_U32 csrRoamGetNumBKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId);
1364eHalStatus csrRoamSetBKIDCache( tpAniSirGlobal pMac, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
1365 tANI_U32 numItems );
1366/* ---------------------------------------------------------------------------
1367 \fn csrRoamGetWapiReqIE
1368 \brief return the WAPI IE CSR passes to PE to JOIN request or START_BSS request
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001369 \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 -07001370 needed or IE length in pBuf.
1371 \param pBuf - Caller allocated memory that contain the IE field, if any, upon return
1372 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
1373 -------------------------------------------------------------------------------*/
1374eHalStatus csrRoamGetWapiReqIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf);
1375
1376/* ---------------------------------------------------------------------------
1377 \fn csrRoamGetWapiRspIE
1378 \brief return the WAPI IE from the beacon or probe rsp if connected
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001379 \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 -07001380 needed or IE length in pBuf.
1381 \param pBuf - Caller allocated memory that contain the IE field, if any, upon return
1382 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
1383 -------------------------------------------------------------------------------*/
1384eHalStatus csrRoamGetWapiRspIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf);
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001385tANI_U8 csrConstructWapiIe( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
Jeff Johnson295189b2012-06-20 16:38:30 -07001386 tSirBssDescription *pSirBssDesc, tDot11fBeaconIEs *pIes, tCsrWapiIe *pWapiIe );
1387#endif /* FEATURE_WLAN_WAPI */
1388
Jeff Johnson295189b2012-06-20 16:38:30 -07001389eHalStatus csrRoamUpdateAPWPSIE( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirAPWPSIEs *pAPWPSIES );
1390eHalStatus csrRoamUpdateWPARSNIEs( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirRSNie * pAPSirRSNie);
Jeff Johnson295189b2012-06-20 16:38:30 -07001391void csrSetCfgPrivacy( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy );
1392tANI_S8 csrGetInfraSessionId( tpAniSirGlobal pMac );
1393tANI_U8 csrGetInfraOperationChannel( tpAniSirGlobal pMac, tANI_U8 sessionId);
Sushant Kaushik1d732562014-05-21 14:15:37 +05301394tANI_BOOLEAN csrIsSessionClientAndConnected(tpAniSirGlobal pMac, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001395tANI_U8 csrGetConcurrentOperationChannel( tpAniSirGlobal pMac );
1396
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001397eHalStatus csrRoamCopyConnectProfile(tpAniSirGlobal pMac, tANI_U32 sessionId,
Jeff Johnson295189b2012-06-20 16:38:30 -07001398 tCsrRoamConnectedProfile *pProfile);
1399tANI_BOOLEAN csrIsSetKeyAllowed(tpAniSirGlobal pMac, tANI_U32 sessionId);
1400
1401void csrSetOppositeBandChannelInfo( tpAniSirGlobal pMac );
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001402void csrConstructCurrentValidChannelList( tpAniSirGlobal pMac, tDblLinkList *pChannelSetList,
Jeff Johnson295189b2012-06-20 16:38:30 -07001403 tANI_U8 *pChannelList, tANI_U8 bSize, tANI_U8 *pNumChannels );
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08001404
1405#ifdef FEATURE_WLAN_SCAN_PNO
Srikant Kuppa066904f2013-05-07 13:56:02 -07001406eHalStatus csrScanSavePreferredNetworkFound(tpAniSirGlobal pMac,
1407 tSirPrefNetworkFoundInd *pPrefNetworkFoundInd);
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08001408#endif //FEATURE_WLAN_SCAN_PNO
Jeff Johnson295189b2012-06-20 16:38:30 -07001409#endif
1410
1411#ifdef WLAN_FEATURE_VOWIFI_11R
1412//Returns whether the current association is a 11r assoc or not
1413tANI_BOOLEAN csrRoamIs11rAssoc(tpAniSirGlobal pMac);
1414#endif
1415
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001416#ifdef FEATURE_WLAN_ESE
1417//Returns whether the current association is a ESE assoc or not
1418tANI_BOOLEAN csrRoamIsESEAssoc(tpAniSirGlobal pMac);
1419tANI_BOOLEAN csrRoamIsEseIniFeatureEnabled(tpAniSirGlobal pMac);
1420tANI_BOOLEAN csrNeighborRoamIsESEAssoc(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -07001421#endif
1422
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001423//Remove this code once SLM_Sessionization is supported
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001424//BMPS_WORKAROUND_NOT_NEEDED
Jeff Johnson295189b2012-06-20 16:38:30 -07001425void csrDisconnectAllActiveSessions(tpAniSirGlobal pMac);
Mohit Khanna349bc392012-09-11 17:24:52 -07001426
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001427#ifdef FEATURE_WLAN_LFR
1428//Returns whether "Legacy Fast Roaming" is enabled...or not
Madan Mohan Koyyalamudi03aae5f2012-11-28 01:51:22 +05301429tANI_BOOLEAN csrRoamIsFastRoamEnabled(tpAniSirGlobal pMac, tANI_U32 sessionId);
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001430#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1431tANI_BOOLEAN csrRoamIsRoamOffloadScanEnabled(tpAniSirGlobal pMac);
1432#endif
Madan Mohan Koyyalamudi470d2cf2012-09-28 14:43:44 -07001433tANI_BOOLEAN csrIsChannelPresentInList( tANI_U8 *pChannelList, int numChannels, tANI_U8 channel );
1434VOS_STATUS csrAddToChannelListFront( tANI_U8 *pChannelList, int numChannels, tANI_U8 channel );
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001435#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1436eHalStatus csrScanRequestLfrResult(tpAniSirGlobal pMac, tANI_U32 sessionId,
1437 csrScanCompleteCallback callback, void *pContext);
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07001438eHalStatus csrRoamOffloadScanRspHdlr(tpAniSirGlobal pMac, tANI_U8 reason);
1439eHalStatus csrHandoffRequest(tpAniSirGlobal pMac, tCsrHandoffRequest *pHandoffInfo);
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001440#endif
1441tANI_BOOLEAN csrRoamIsStaMode(tpAniSirGlobal pMac, tANI_U32 sessionId);
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001442#endif
1443
Agarwal Ashish738843c2014-09-25 12:27:56 +05301444void csrDisableDfsChannel(tpAniSirGlobal pMac);