blob: 53da1d795caa75f32bac1a9f8eb0f52f7d726e42 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Gopichand Nakkala92f07d82013-01-08 21:16:34 -08002 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
3 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21/*
Jeff Johnson32d95a32012-09-10 13:15:23 -070022 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
Jeff Johnson295189b2012-06-20 16:38:30 -070023 *
24 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
25 *
26 *
27 * Permission to use, copy, modify, and/or distribute this software for
28 * any purpose with or without fee is hereby granted, provided that the
29 * above copyright notice and this permission notice appear in all
30 * copies.
31 *
32 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
33 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
34 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
35 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
36 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
37 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
38 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
39 * PERFORMANCE OF THIS SOFTWARE.
40 */
41
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080042/** ------------------------------------------------------------------------- *
43 ------------------------------------------------------------------------- *
Jeff Johnson295189b2012-06-20 16:38:30 -070044
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080045
Jeff Johnson295189b2012-06-20 16:38:30 -070046 \file csrInternal.h
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080047
Jeff Johnson295189b2012-06-20 16:38:30 -070048 Define internal data structure for MAC.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080049
50 Copyright (C) 2006 Airgo Networks, Incorporated
Jeff Johnson295189b2012-06-20 16:38:30 -070051 ========================================================================== */
52#ifndef CSRINTERNAL_H__
53#define CSRINTERNAL_H__
54
Jeff Johnson295189b2012-06-20 16:38:30 -070055#include "vos_status.h"
56#include "vos_lock.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070057
58#include "palTimer.h"
59#include "csrSupport.h"
60#include "vos_nvitem.h"
61#include "wlan_qct_tl.h"
62
63#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
64#include "csrNeighborRoam.h"
65#endif
66
67#define CSR_MAX_STA (HAL_NUM_STA)
68
69#define CSR_SME_SCAN_FLAGS_DELETE_CACHE 0x80
70
71#define CSR_TITAN_MAX_RATE_MIMO_CB 240
72#define CSR_TITAN_MAX_RATE_MIMO 126
73
74//define scan return criteria. LIM should use these define as well
75#define CSR_SCAN_RETURN_AFTER_ALL_CHANNELS ( 0 )
76#define CSR_SCAN_RETURN_AFTER_FIRST_MATCH ( 0x01 )
77#define CSR_SCAN_RETURN_AFTER_5_BAND_11d_FOUND ( 0x80 )
78#define CSR_SCAN_RETURN_AFTER_24_BAND_11d_FOUND ( 0x40 )
79#define CSR_SCAN_RETURN_AFTER_EITHER_BAND_11d_FOUND ( CSR_SCAN_RETURN_AFTER_5_BAND_11d_FOUND | CSR_SCAN_RETURN_AFTER_24_BAND_11d_FOUND )
Madan Mohan Koyyalamudi4c8c6352012-10-15 16:40:16 -070080#define CSR_NUM_RSSI_CAT 15
Jeff Johnson295189b2012-06-20 16:38:30 -070081#define CSR_MAX_STATISTICS_REQ 10
82
83//Support for multiple session
84#define CSR_SESSION_ID_INVALID 0xFF // session ID invalid
85#define CSR_ROAM_SESSION_MAX 5 // No of sessions to be supported, and a
86 // session is for Infra, IBSS or BT-AMP
87
88#define CSR_IS_SESSION_VALID( pMac, sessionId ) ( ( (sessionId) < CSR_ROAM_SESSION_MAX ) \
89 && ( (pMac)->roam.roamSession[(sessionId)].sessionActive ) )
90#define CSR_GET_SESSION( pMac, sessionId ) \
91( \
92 (sessionId < CSR_ROAM_SESSION_MAX) ? \
93 (&(pMac)->roam.roamSession[(sessionId)]) :\
94 NULL \
95)
96
Srinivas Girigowda41c7c5f2013-10-21 19:01:38 -070097#define CSR_IS_SELECT_5GHZ_MARGIN( pMac ) \
98( \
99 (((pMac)->roam.configParam.nSelect5GHzMargin)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
100)
101
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -0800102#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
103#define CSR_IS_ROAM_PREFER_5GHZ( pMac ) \
104( \
105 (((pMac)->roam.configParam.nRoamPrefer5GHz)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
106)
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -0700107#define CSR_IS_ROAM_INTRA_BAND_ENABLED( pMac ) \
108( \
109 (((pMac)->roam.configParam.nRoamIntraBand)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
110)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -0800111#endif
112
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700113#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
114#define CSR_IS_ROAM_SCAN_OFFLOAD_ENABLED( pMac ) \
115( \
116 (((pMac)->roam.configParam.isRoamOffloadScanEnabled)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
117)
Srinivas Girigowda830bbd02013-06-13 19:44:16 -0700118
119#define CSR_IS_FASTROAM_IN_CONCURRENCY_INI_FEATURE_ENABLED( pMac ) \
120( \
121 (((pMac)->roam.configParam.bFastRoamInConIniFeatureEnabled)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
122)
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700123#endif
124
Madan Mohan Koyyalamudi470d2cf2012-09-28 14:43:44 -0700125//Support for "Fast roaming" (i.e., CCX, LFR, or 802.11r.)
126#define CSR_BG_SCAN_OCCUPIED_CHANNEL_LIST_LEN 15
Jeff Johnson295189b2012-06-20 16:38:30 -0700127
128typedef enum
129{
130 //eCSR_CFG_DOT11_MODE_BEST = 0,
131 eCSR_CFG_DOT11_MODE_TAURUS = 0,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800132 eCSR_CFG_DOT11_MODE_ABG,
133 eCSR_CFG_DOT11_MODE_11A,
134 eCSR_CFG_DOT11_MODE_11B,
135 eCSR_CFG_DOT11_MODE_11G,
136 eCSR_CFG_DOT11_MODE_11N,
137 eCSR_CFG_DOT11_MODE_POLARIS,
138 eCSR_CFG_DOT11_MODE_TITAN,
Jeff Johnsone7245742012-09-05 17:12:55 -0700139#ifdef WLAN_FEATURE_11AC
140 eCSR_CFG_DOT11_MODE_11AC,
141#endif
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800142 eCSR_CFG_DOT11_MODE_11G_ONLY,
143 eCSR_CFG_DOT11_MODE_11N_ONLY,
Jeff Johnsone7245742012-09-05 17:12:55 -0700144#ifdef WLAN_FEATURE_11AC
145 eCSR_CFG_DOT11_MODE_11AC_ONLY,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800146#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700147 //This value can never set to CFG. It is for CSR's internal use
148 eCSR_CFG_DOT11_MODE_AUTO,
149}eCsrCfgDot11Mode; //Used to determine what to set to the WNI_CFG_DOT11_MODE
150
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800151typedef enum etCsrRoamCommands
Jeff Johnson295189b2012-06-20 16:38:30 -0700152{
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800153 eCsrRoamNoCommand,
Jeff Johnson295189b2012-06-20 16:38:30 -0700154 eCsrRoamCommandScan,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800155 eCsrRoamCommandRoam,
156 eCsrRoamCommandWmStatusChange,
Jeff Johnson295189b2012-06-20 16:38:30 -0700157 eCsrRoamCommandSetKey,
158 eCsrRoamCommandRemoveKey,
159
160} eCsrRoamCommands;
161
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800162typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700163{
164 eCsrScanOther = 1,
165 eCsrScanLostLink1,
166 eCsrScanLostLink2,
167 eCsrScanLostLink3,
168 eCsrScanLostLink4,
169 eCsrScan11d1, //First 11d scan
170 eCsrScan11d2, //First 11d scan has failed
171 eCsrScan11dDone, //11d scan succeeded, try the rest of the channel
172 eCsrScanUserRequest,
173 eCsrScanGetResult,
174 eCsrScanSetBGScanParam, //used for HO too - bg scan request in NT Handoff sub-state
175 eCsrScanForSsid,
176 eCsrScanForCapsChange,
177 eCsrScanBGScanAbort,
178 eCsrScanBGScanEnable,
179 eCsrScanIdleScan,
180 eCsrScanGetScanChnInfo, //To get the list of channels scanned
181
182 eCsrScanBgScan, // bg scan request in NRT & RT Handoff sub-states
183 eCsrScanProbeBss, // directed probe on an entry from the candidate list - HO
184 eCsrScanAbortBgScan, //aborting a BG scan (meaning the scan is triggered by LIM timer)
185 eCsrScanAbortNormalScan, //aborting a normal scan (the scan is trigger by eWNI_SME_SCAN_REQ)
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700186 eCsrScanP2PFindPeer,
187 eCsrScanGetLfrResult, // get the LFR candidates from PE scan cache
Jeff Johnson295189b2012-06-20 16:38:30 -0700188}eCsrScanReason;
189
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800190typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700191{
192 eCsrNoConnection, // Roaming because we have not established the initial connection.
193 eCsrCapsChange, // roaming because LIM reported a Capability change in the associated AP.
194 eCsrForcedDisassoc, // roaming becuase someone asked us to Disassoc and stay disassociated.
195 eCsrHddIssued, // roaming because an 802.11 request was issued to the driver.
196 eCsrLostLink1, // roaming because we lost link to an associated AP
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800197 eCsrLostLink2,
Jeff Johnson295189b2012-06-20 16:38:30 -0700198 eCsrLostLink3,
199 eCsrForcedDisassocMICFailure, // roaming because we need to force a Disassoc due to MIC failure
200 eCsrHddIssuedReassocToSameAP,
201 eCsrSmeIssuedReassocToSameAP,
202 eCsrSmeIssuedReassocToDiffAP,
203 eCsrForcedDeauth, // roaming becuase someone asked us to deauth and stay disassociated.
204 eCsrSmeIssuedDisassocForHandoff, // will be issued by Handoff logic to disconect from current AP
205 eCsrSmeIssuedAssocToSimilarAP, // will be issued by Handoff logic to join a new AP with same profile
206 eCsrSmeIssuedIbssJoinFailure, // ibss join timer fired before any perr showed up, so shut down the network
207 eCsrForcedIbssLeave,
208 eCsrStopBss,
209 eCsrSmeIssuedFTReassoc,
210 eCsrForcedDisassocSta,
211 eCsrForcedDeauthSta,
Madan Mohan Koyyalamudi286b60e2012-10-11 12:59:07 -0700212 eCsrPerformPreauth,
Venkata Prathyusha Kuntupalli239278b2013-03-26 15:58:18 -0700213 eCsrLostLink1Abort,
214 eCsrLostLink2Abort,
215 eCsrLostLink3Abort,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800216
Jeff Johnson295189b2012-06-20 16:38:30 -0700217}eCsrRoamReason;
218
219typedef enum
220{
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800221 eCSR_ROAM_SUBSTATE_NONE = 0,
222 eCSR_ROAM_SUBSTATE_START_BSS_REQ,
223 eCSR_ROAM_SUBSTATE_JOIN_REQ,
224 eCSR_ROAM_SUBSTATE_REASSOC_REQ,
225 eCSR_ROAM_SUBSTATE_DISASSOC_REQ,
226 eCSR_ROAM_SUBSTATE_STOP_BSS_REQ,
227 eCSR_ROAM_SUBSTATE_DISCONNECT_CONTINUE_ROAMING, //Continue the current roam command after disconnect
228 eCSR_ROAM_SUBSTATE_AUTH_REQ,
229 eCSR_ROAM_SUBSTATE_CONFIG,
230 eCSR_ROAM_SUBSTATE_DEAUTH_REQ,
231 eCSR_ROAM_SUBSTATE_DISASSOC_NOTHING_TO_JOIN,
232 eCSR_ROAM_SUBSTATE_DISASSOC_REASSOC_FAILURE,
233 eCSR_ROAM_SUBSTATE_DISASSOC_FORCED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700234 eCSR_ROAM_SUBSTATE_WAIT_FOR_KEY,
235 eCSR_ROAM_SUBSTATE_DISASSOC_HANDOFF,
236 eCSR_ROAM_SUBSTATE_JOINED_NO_TRAFFIC,
237 eCSR_ROAM_SUBSTATE_JOINED_NON_REALTIME_TRAFFIC,
238 eCSR_ROAM_SUBSTATE_JOINED_REALTIME_TRAFFIC,
239// max is 15 unless the bitfield is expanded...
240} eCsrRoamSubState;
241
242
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800243typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700244{
245 eCSR_ROAMING_STATE_STOP = 0,
246 eCSR_ROAMING_STATE_IDLE,
247 eCSR_ROAMING_STATE_SCANNING,
248 eCSR_ROAMING_STATE_JOINING,
249 eCSR_ROAMING_STATE_JOINED,
250}eCsrRoamState;
251
252
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800253typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700254{
255 eCsrContinueRoaming,
256 eCsrStopRoaming,
257 eCsrStartIbss,
258 eCsrStartIbssSameIbss,
259 eCsrReassocToSelfNoCapChange,
Jeff Johnsone7245742012-09-05 17:12:55 -0700260 eCsrStopRoamingDueToConcurrency,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800261
Jeff Johnson295189b2012-06-20 16:38:30 -0700262}eCsrJoinState;
263
264typedef enum
265{
266 eCsrNotRoaming,
267 eCsrLostlinkRoamingDisassoc,
268 eCsrLostlinkRoamingDeauth,
269 eCsrDynamicRoaming,
270 eCsrReassocRoaming,
271}eCsrRoamingReason;
272
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800273typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700274{
275 eCsrDisassociated,
276 eCsrDeauthenticated
277
278}eCsrRoamWmStatusChangeTypes;
279
280typedef enum
281{
282 eCsrSummaryStats = 0,
283 eCsrGlobalClassAStats,
284 eCsrGlobalClassBStats,
285 eCsrGlobalClassCStats,
286 eCsrGlobalClassDStats,
287 eCsrPerStaStats,
288 eCsrMaxStats
289}eCsrRoamStatsClassTypes;
290
291#ifdef FEATURE_WLAN_DIAG_SUPPORT
292typedef enum
293{
294 eCSR_WLAN_STATUS_CONNECT =0,
295 eCSR_WLAN_STATUS_DISCONNECT
296
297}eCsrDiagWlanStatusEventSubtype;
298
299typedef enum
300{
301 eCSR_REASON_UNSPECIFIED = 0,
302 eCSR_REASON_USER_REQUESTED,
303 eCSR_REASON_MIC_ERROR,
304 eCSR_REASON_DISASSOC,
305 eCSR_REASON_DEAUTH,
306 eCSR_REASON_HANDOFF,
307
308}eCsrDiagWlanStatusEventReason;
309
310typedef enum
311{
312 eCSR_WLAN_HANDOFF_EVENT =0,
313
314}eCsrDiagWlanHandoffEventSubtype;
315
316typedef enum
317{
318 eCSR_WLAN_VCC_EVENT =0,
319
320}eCsrDiagWlanVccEventSubtype;
321
322#endif //FEATURE_WLAN_DIAG_SUPPORT
323
324typedef struct tagCsrChannel
325{
326 tANI_U8 numChannels;
327 tANI_U8 channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
328}tCsrChannel;
329
330typedef struct tagScanProfile
331{
332 tANI_U32 minChnTime;
333 tANI_U32 maxChnTime;
334 tANI_U32 restTime; //This is ignored if not associated
335 tANI_U32 numOfChannels;
336 tANI_U8 *pChannelList;
337 tSirScanType scanType; //active or passive
338 eCsrRoamBssType bssType; //BSS or IBSS
339 tANI_U8 ssid[WNI_CFG_SSID_LEN];
340 tANI_U8 bReturnAfter1stMatch;
341 tANI_U8 fUniqueResult;
342 tANI_U8 freshScan;
343 tCsrBssid bssid;
344}tScanProfile;
345
346typedef struct tagBssConfigParam
347{
348 eCsrMediaAccessType qosType;
349 tSirMacSSid SSID;
350 tANI_U32 uRTSThresh;
351 tANI_U32 uDeferThresh; //
352 eCsrCfgDot11Mode uCfgDot11Mode;
353 eCsrBand eBand;
354 tANI_U8 standardRate[CSR_DOT11_SUPPORTED_RATES_MAX];
355 tANI_U8 extendedRate[CSR_DOT11_EXTENDED_SUPPORTED_RATES_MAX];
356 eCsrExposedTxRate txRate;
357 tAniAuthType authType;
358 eCsrEncryptionType encType;
359 tANI_U32 uShortSlotTime;
360 tANI_U32 uHTSupport; //High throughput
361 tANI_U32 uPowerLimit;
362 tANI_U32 uHeartBeatThresh;
363 tANI_U32 uJoinTimeOut;
364 tSirMacCapabilityInfo BssCap;
365 tANI_BOOLEAN f11hSupport;
Jeff Johnsone7245742012-09-05 17:12:55 -0700366 ePhyChanBondState cbMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700367}tBssConfigParam;
368
369
370typedef struct tagCsrRoamStartBssParams
371{
372 tSirMacSSid ssId;
373 tCsrBssid bssid; //this is the BSSID for the party we want to join (only use for IBSS or WDS)
374 tSirNwType sirNwType;
Jeff Johnsone7245742012-09-05 17:12:55 -0700375 ePhyChanBondState cbMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700376 tSirMacRateSet operationalRateSet;
377 tSirMacRateSet extendedRateSet;
378 tANI_U8 operationChn;
379 eCsrCfgDot11Mode uCfgDot11Mode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700380 tANI_U8 privacy;
381 tANI_BOOLEAN fwdWPSPBCProbeReq;
382 tANI_BOOLEAN protEnabled;
383 tANI_BOOLEAN obssProtEnabled;
384 tAniAuthType authType;
385 tANI_U16 beaconInterval; //If this is 0, SME will fill in for caller.
386 tANI_U16 ht_protection;
387 tANI_U32 dtimPeriod;
388 tANI_U8 ApUapsdEnable;
389 tANI_U8 ssidHidden;
390 tANI_U8 wps_state;
Jeff Johnson295189b2012-06-20 16:38:30 -0700391 tVOS_CON_MODE bssPersona;
392 tANI_U16 nRSNIELength; //The byte count in the pRSNIE, if 0, pRSNIE is ignored.
393 tANI_U8 *pRSNIE; //If not null, it has the IE byte stream for RSN
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800394 tANI_BOOLEAN updatebeaconInterval; //Flag used to indicate update
395 // beaconInterval
Jeff Johnson295189b2012-06-20 16:38:30 -0700396}tCsrRoamStartBssParams;
397
398
399typedef struct tagScanCmd
400{
401 tANI_U32 scanID;
402 csrScanCompleteCallback callback;
403 void *pContext;
404 eCsrScanReason reason;
405 eCsrRoamState lastRoamState[CSR_ROAM_SESSION_MAX];
406 tCsrRoamProfile *pToRoamProfile;
407 tANI_U32 roamId; //this is the ID related to the pToRoamProfile
408 union
409 {
410 tCsrScanRequest scanRequest;
411 tCsrBGScanRequest bgScanRequest;
412 }u;
413}tScanCmd;
414
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800415typedef struct tagRoamCmd
Jeff Johnson295189b2012-06-20 16:38:30 -0700416{
417 tANI_U32 roamId;
418 eCsrRoamReason roamReason;
419 tCsrRoamProfile roamProfile;
420 tScanResultHandle hBSSList; //BSS list fits the profile
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800421 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 -0700422 tSirBssDescription *pLastRoamBss; //the last BSS we try and failed
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800423 tANI_BOOLEAN fReleaseBssList; //whether to free hBSSList
Jeff Johnson295189b2012-06-20 16:38:30 -0700424 tANI_BOOLEAN fReleaseProfile; //whether to free roamProfile
425 tANI_BOOLEAN fReassoc; //whether this command is for reassociation
426 tANI_BOOLEAN fUpdateCurRoamProfile; //whether pMac->roam.pCurRoamProfile needs to be updated
427 //this is for CSR internal used only. And it should not be assigned when creating the command
428 //This causes the roam command not to do anything.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800429 tANI_BOOLEAN fReassocToSelfNoCapChange;
Jeff Johnson295189b2012-06-20 16:38:30 -0700430
431 tANI_BOOLEAN fStopWds;
432 tSirMacAddr peerMac;
433 tSirMacReasonCodes reason;
434}tRoamCmd;
435
436typedef struct tagSetKeyCmd
437{
438 tANI_U32 roamId;
439 eCsrEncryptionType encType;
440 eCsrAuthType authType;
441 tAniKeyDirection keyDirection; //Tx, Rx or Tx-and-Rx
442 tSirMacAddr peerMac; //Peer's MAC address. ALL 1's for group key
443 tANI_U8 paeRole; //0 for supplicant
444 tANI_U8 keyId; // Kye index
445 tANI_U8 keyLength; //Number of bytes containing the key in pKey
446 tANI_U8 Key[CSR_MAX_KEY_LEN];
447 tANI_U8 keyRsc[CSR_MAX_RSC_LEN];
448} tSetKeyCmd;
449
450typedef struct tahRemoveKeyCmd
451{
452 tANI_U32 roamId;
453 eCsrEncryptionType encType;
454 eCsrAuthType authType;
455 tSirMacAddr peerMac; //Peer's MAC address. ALL 1's for group key
456 tANI_U8 keyId; //key index
457} tRemoveKeyCmd;
458
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800459typedef struct tagWmStatusChangeCmd
Jeff Johnson295189b2012-06-20 16:38:30 -0700460{
461 eCsrRoamWmStatusChangeTypes Type;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800462 union
463 {
Jeff Johnson295189b2012-06-20 16:38:30 -0700464 tSirSmeDeauthInd DeauthIndMsg;
465 tSirSmeDisassocInd DisassocIndMsg;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800466 }u;
Jeff Johnson295189b2012-06-20 16:38:30 -0700467
468}tWmStatusChangeCmd;
469
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700470
Jeff Johnson295189b2012-06-20 16:38:30 -0700471typedef struct tagAddStaForSessionCmd
472{
473 //Session self mac addr
474 tSirMacAddr selfMacAddr;
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700475 tVOS_CON_MODE currDeviceMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700476}tAddStaForSessionCmd;
477
478typedef struct tagDelStaForSessionCmd
479{
480 //Session self mac addr
481 tSirMacAddr selfMacAddr;
482 csrRoamSessionCloseCallback callback;
483 void *pContext;
484}tDelStaForSessionCmd;
485
486//This structure represents one scan request
487typedef struct tagCsrCmd
488{
489 tListElem Link;
490 eCsrRoamCommands command;
491 tANI_U8 sessionId; // Session ID for this command
492 union
493 {
494 tScanCmd scanCmd;
495 tRoamCmd roamCmd;
496 tWmStatusChangeCmd wmStatusChangeCmd;
497 tSetKeyCmd setKeyCmd;
498 tRemoveKeyCmd removeKeyCmd;
499 tAddStaForSessionCmd addStaSessionCmd;
500 tDelStaForSessionCmd delStaSessionCmd;
501 }u;
502}tCsrCmd;
503
504#ifdef WLAN_FEATURE_VOWIFI_11R
505typedef struct tagCsr11rConfig
506{
507 tANI_BOOLEAN IsFTResourceReqSupported;
508} tCsr11rConfig;
509#endif
510
511#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
512typedef struct tagCsrNeighborRoamConfig
513{
514 tANI_U32 nNeighborScanTimerPeriod;
515 tANI_U8 nNeighborLookupRssiThreshold;
516 tANI_U8 nNeighborReassocRssiThreshold;
517 tANI_U16 nNeighborScanMinChanTime;
518 tANI_U16 nNeighborScanMaxChanTime;
519 sCsrChannel neighborScanChanList;
520 tANI_U8 nMaxNeighborRetries;
521 tANI_U16 nNeighborResultsRefreshPeriod;
Srinivas Girigowdade697412013-02-14 16:31:48 -0800522 tANI_U16 nEmptyScanRefreshPeriod;
Jeff Johnson295189b2012-06-20 16:38:30 -0700523}tCsrNeighborRoamConfig;
524#endif
525
526typedef struct tagCsrConfig
527{
528 tANI_U32 agingCount;
529 tANI_U32 FragmentationThreshold;
530 tANI_U32 channelBondingMode24GHz;
531 tANI_U32 channelBondingMode5GHz;
532 tANI_U32 RTSThreshold;
533 eCsrPhyMode phyMode;
534 eCsrCfgDot11Mode uCfgDot11Mode;
535 eCsrBand eBand;
536 tANI_U32 HeartbeatThresh50;
537 tANI_U32 HeartbeatThresh24;
538 tANI_U32 bgScanInterval;
539 eCsrCBChoice cbChoice;
540 eCsrBand bandCapability; //indicate hw capability
541 eCsrRoamWmmUserModeType WMMSupportMode;
542 tANI_BOOLEAN Is11eSupportEnabled;
543 tANI_BOOLEAN Is11dSupportEnabled;
544 tANI_BOOLEAN Is11dSupportEnabledOriginal;
545 tANI_BOOLEAN Is11hSupportEnabled;
546 tANI_BOOLEAN shortSlotTime;
547 tANI_BOOLEAN ProprietaryRatesEnabled;
548 tANI_BOOLEAN fenableMCCMode;
549 tANI_U16 TxRate;
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -0800550 tANI_U8 fAllowMCCGODiffBI;
Jeff Johnson295189b2012-06-20 16:38:30 -0700551 tANI_U8 AdHocChannel24;
552 tANI_U8 AdHocChannel5G;
553 tANI_U32 impsSleepTime; //in units of microseconds
554 tANI_U32 scanAgeTimeNCNPS; //scan result aging time threshold when Not-Connect-No-Power-Save, in seconds
555 tANI_U32 scanAgeTimeNCPS; //scan result aging time threshold when Not-Connect-Power-Save, in seconds
556 tANI_U32 scanAgeTimeCNPS; //scan result aging time threshold when Connect-No-Power-Save, in seconds,
557 tANI_U32 scanAgeTimeCPS; //scan result aging time threshold when Connect-Power-Savein seconds
558 tANI_U32 BssPreferValue[CSR_NUM_RSSI_CAT]; //each RSSI category has one value
559 int RSSICat[CSR_NUM_RSSI_CAT];
560 tANI_U8 bCatRssiOffset; //to set the RSSI difference for each category
561 tANI_U32 nRoamingTime; //In seconds, CSR will try this long before gives up, 0 means no roaming
562 //Whether to limit the channels to the ones set in Csr11dInfo. If true, the opertaional
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800563 //channels are limited to the default channel list. It is an "AND" operation between the
Jeff Johnson295189b2012-06-20 16:38:30 -0700564 //default channels and the channels in the 802.11d IE.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800565 tANI_BOOLEAN fEnforce11dChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -0700566 //Country Code Priority
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800567 //0 = 802.11D > Configured Country > NV
Jeff Johnson295189b2012-06-20 16:38:30 -0700568 //1 = Configured Country > 802.11D > NV
569 tANI_BOOLEAN fSupplicantCountryCodeHasPriority;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800570 //When true, AP with unknown country code won't be see.
571 //"Unknown country code" means either Ap doesn't have 11d IE or we cannot
Jeff Johnson295189b2012-06-20 16:38:30 -0700572 //find a domain for the country code in its 11d IE.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800573 tANI_BOOLEAN fEnforceCountryCodeMatch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700574 //When true, only APs in the default domain can be seen. If the Ap has "unknown country
575 //code", or the doamin of the country code doesn't match the default domain, the Ap is
576 //not acceptable.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800577 tANI_BOOLEAN fEnforceDefaultDomain;
Jeff Johnson295189b2012-06-20 16:38:30 -0700578
579 tANI_U16 vccRssiThreshold;
580 tANI_U32 vccUlMacLossThreshold;
581
582 tANI_U32 nPassiveMinChnTime; //in units of milliseconds
583 tANI_U32 nPassiveMaxChnTime; //in units of milliseconds
584 tANI_U32 nActiveMinChnTime; //in units of milliseconds
585 tANI_U32 nActiveMaxChnTime; //in units of milliseconds
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800586
587 tANI_U32 nActiveMinChnTimeBtc; //in units of milliseconds
588 tANI_U32 nActiveMaxChnTimeBtc; //in units of milliseconds
Kiran Kumar Lokere458d7322013-05-29 14:29:43 -0700589 tANI_U8 disableAggWithBtc;
Madan Mohan Koyyalamudi4ff9cd62012-10-30 17:48:57 -0700590#ifdef WLAN_AP_STA_CONCURRENCY
591 tANI_U32 nPassiveMinChnTimeConc; //in units of milliseconds
592 tANI_U32 nPassiveMaxChnTimeConc; //in units of milliseconds
593 tANI_U32 nActiveMinChnTimeConc; //in units of milliseconds
594 tANI_U32 nActiveMaxChnTimeConc; //in units of milliseconds
595 tANI_U32 nRestTimeConc; //in units of milliseconds
Sudhir Sattayappa Kohallieb97d502013-05-22 23:16:42 -0700596 tANI_U8 nNumStaChanCombinedConc; //number of channels combined for
597 //Sta in each split scan operation
598 tANI_U8 nNumP2PChanCombinedConc; //number of channels combined for
599 //P2P in each split scan operation
Madan Mohan Koyyalamudi4ff9cd62012-10-30 17:48:57 -0700600#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700601
602 tANI_BOOLEAN IsIdleScanEnabled;
603 //in dBm, the maximum TX power
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800604 //The actual TX power is the lesser of this value and 11d.
Jeff Johnson295189b2012-06-20 16:38:30 -0700605 //If 11d is disable, the lesser of this and default setting.
606 tANI_U8 nTxPowerCap;
607 tANI_U32 statsReqPeriodicity; //stats request frequency from PE while in full power
608 tANI_U32 statsReqPeriodicityInPS;//stats request frequency from PE while in power save
Jeff Johnson295189b2012-06-20 16:38:30 -0700609 tANI_U32 dtimPeriod;
610 tANI_BOOLEAN ssidHidden;
Jeff Johnson295189b2012-06-20 16:38:30 -0700611
612#ifdef WLAN_FEATURE_VOWIFI_11R
613 tCsr11rConfig csr11rConfig;
614#endif
615
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700616#ifdef FEATURE_WLAN_LFR
Srinivas Girigowda830bbd02013-06-13 19:44:16 -0700617 tANI_U8 isFastRoamIniFeatureEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -0800618 tANI_U8 MAWCEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700619#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Srinivas Girigowda830bbd02013-06-13 19:44:16 -0700620 tANI_U8 isRoamOffloadScanEnabled;
621 tANI_BOOLEAN bFastRoamInConIniFeatureEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700622#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700623#endif
624
Jeff Johnson295189b2012-06-20 16:38:30 -0700625#ifdef FEATURE_WLAN_CCX
626 tANI_U8 isCcxIniFeatureEnabled;
627#endif
628
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700629#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700630 tANI_U8 isFastTransitionEnabled;
631 tANI_U8 RoamRssiDiff;
632 tANI_U8 nImmediateRoamRssiDiff;
633 tANI_BOOLEAN nRoamPrefer5GHz;
634 tANI_BOOLEAN nRoamIntraBand;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -0700635 tANI_BOOLEAN isWESModeEnabled;
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700636 tANI_BOOLEAN nRoamScanControl;
Varun Reddy Yeturu920df212013-05-22 08:07:23 -0700637 tANI_U8 nProbes;
638 tANI_U16 nRoamScanHomeAwayTime;
Jeff Johnson295189b2012-06-20 16:38:30 -0700639#endif
640
641#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
642 tCsrNeighborRoamConfig neighborRoamConfig;
643#endif
644
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800645 /* Instead of Reassoc, send ADDTS/DELTS even when ACM is off for that AC
Jeff Johnson295189b2012-06-20 16:38:30 -0700646 * This is mandated by WMM-AC certification */
647 tANI_BOOLEAN addTSWhenACMIsOff;
648
649 tANI_BOOLEAN fValidateList;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800650 //Remove this code once SLM_Sessionization is supported
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -0700651 //BMPS_WORKAROUND_NOT_NEEDED
Jeff Johnsone7245742012-09-05 17:12:55 -0700652 tANI_BOOLEAN doBMPSWorkaround;
Jeff Johnson295189b2012-06-20 16:38:30 -0700653
654 //To enable/disable scanning 2.4Ghz channels twice on a single scan request from HDD
655 tANI_BOOLEAN fScanTwice;
Jeff Johnsone7245742012-09-05 17:12:55 -0700656#ifdef WLAN_FEATURE_11AC
657 tANI_U32 nVhtChannelWidth;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -0800658 tANI_U8 txBFEnable;
Shailender Karmuchicc3fe442013-02-16 18:18:33 -0800659 tANI_U8 txBFCsnValue;
Ravi Joshi83bfaa12013-05-28 22:12:08 -0700660 tANI_BOOLEAN enableVhtFor24GHz;
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;
Jeff Johnson295189b2012-06-20 16:38:30 -0700670}tCsrConfig;
671
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800672typedef struct tagCsrChannelPowerInfo
Jeff Johnson295189b2012-06-20 16:38:30 -0700673{
674 tListElem link;
675 tANI_U8 firstChannel;
676 tANI_U8 numChannels;
677 tANI_U8 txPower;
678 tANI_U8 interChannelOffset;
679}tCsrChannelPowerInfo;
680
681typedef struct tagRoamJoinStatus
682{
683 tSirResultCodes statusCode;
684 //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 -0800685 tANI_U32 reasonCode;
Kiran Kumar Lokerec8550fa2013-04-15 22:23:00 -0700686 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -0700687}tCsrRoamJoinStatus;
688
689typedef struct tagCsrOsChannelMask
690{
691 tANI_U8 numChannels;
692 tANI_BOOLEAN scanEnabled[WNI_CFG_VALID_CHANNEL_LIST_LEN];
693 tANI_U8 channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
694}tCsrOsChannelMask;
695
696
697typedef struct tagCsrScanStruct
698{
699 tScanProfile scanProfile;
700 tANI_U32 nextScanID;
Madan Mohan Koyyalamudica43cdf2012-09-24 13:15:49 -0700701 tDblLinkList scanResultList;
Jeff Johnson295189b2012-06-20 16:38:30 -0700702 tDblLinkList tempScanResults;
703 tANI_BOOLEAN fScanEnable;
704 tANI_BOOLEAN fFullScanIssued;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530705 vos_timer_t hTimerGetResult;
Jeff Johnson295189b2012-06-20 16:38:30 -0700706#ifdef WLAN_AP_STA_CONCURRENCY
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530707 vos_timer_t hTimerStaApConcTimer;
Jeff Johnson295189b2012-06-20 16:38:30 -0700708#endif
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530709 vos_timer_t hTimerIdleScan;
710 vos_timer_t hTimerResultAging;
711 vos_timer_t hTimerResultCfgAging;
Jeff Johnson295189b2012-06-20 16:38:30 -0700712 tPalTimerHandle hTimerBgScan;
713 //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 -0800714 tANI_U8 channelOf11dInfo;
715 tANI_U8 scanResultCfgAgingTime;
Jeff Johnson295189b2012-06-20 16:38:30 -0700716 //changes on every scan, a flag to tell whether conflict 11d info found on each BSS
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800717 tANI_BOOLEAN fAmbiguous11dInfoFound;
Jeff Johnson295189b2012-06-20 16:38:30 -0700718 //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 -0800719 tANI_BOOLEAN fCurrent11dInfoMatch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700720 tANI_BOOLEAN f11dInfoReset; //to indicate whether the 11d info in CFG is reset to default
721 tSirScanType curScanType;
722 tCsrChannel baseChannels; //This are all the supported channels AND(&) to the current eBand
723 tCsrChannel channels11d;
724 tChannelListWithPower defaultPowerTable[WNI_CFG_VALID_CHANNEL_LIST_LEN]; //From NV
725 tChannelListWithPower defaultPowerTable40MHz[WNI_CFG_VALID_CHANNEL_LIST_LEN]; //From NV
726 tANI_U32 numChannelsDefault; //total channels of NV
727 tCsrChannel base20MHzChannels; //The channel base to work on
728 tCsrChannel base40MHzChannels; //center channels for 40MHz channels
729 tDblLinkList channelPowerInfoList24;
730 tDblLinkList channelPowerInfoList5G;
731 tANI_U32 nLastAgeTimeOut;
732 tANI_U32 nAgingCountDown;
Gopichand Nakkala114718f2013-03-25 19:19:46 -0700733 tANI_U8 countryCodeDefault[WNI_CFG_COUNTRY_CODE_LEN]; //The country code from NV
734 tANI_U8 countryCodeCurrent[WNI_CFG_COUNTRY_CODE_LEN];
735 tANI_U8 countryCode11d[WNI_CFG_COUNTRY_CODE_LEN];
Jeff Johnson295189b2012-06-20 16:38:30 -0700736 v_REGDOMAIN_t domainIdDefault; //default regulatory domain
737 v_REGDOMAIN_t domainIdCurrent; //current regulatory domain
Agarwal Ashishd9d72602013-09-13 00:06:17 +0530738 tCsrBssid currentCountryBssid; // Bssid for current country code
Jeff Johnson295189b2012-06-20 16:38:30 -0700739 tANI_BOOLEAN f11dInfoApplied;
740 tANI_BOOLEAN fCancelIdleScan;
741#ifdef FEATURE_WLAN_WAPI
742// tANI_U16 NumBkidCandidate;
743// tBkidCandidateInfo BkidCandidateInfo[CSR_MAX_BKID_ALLOWED]; /* Move this as part of SessionEntry */
744#endif /* FEATURE_WLAN_WAPI */
745 tANI_U8 numBGScanChannel; //number of valid channels in the bgScanChannelList
746 tANI_U8 bgScanChannelList[WNI_CFG_BG_SCAN_CHANNEL_LIST_LEN];
747 //the ChannelInfo member is not used in this structure.
748 //numBGScanChannel and bgScanChannelList are used for the BG scan channel info
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800749 tCsrBGScanRequest bgScanParams;
Jeff Johnson295189b2012-06-20 16:38:30 -0700750 tANI_BOOLEAN fRestartIdleScan;
751 tANI_U32 nIdleScanTimeGap; //the time since last trying to trigger idle scan
752 tCsrOsChannelMask osScanChannelMask;//keep a track of channels to be scnned while in traffic condition
753 tANI_U16 nBssLimit; //the maximum number of BSS in scan cache
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800754 /*channelPowerInfoList24 has been seen corrupted. Set this flag to true trying to
Jeff Johnson295189b2012-06-20 16:38:30 -0700755 * detect when it happens. Adding this into code because we can't reproduce it easily.
756 * We don't know when it happens. */
757 tANI_BOOLEAN fValidateList;
758 /*Customer wants to start with an active scan based on the default country code.
759 * This optimization will minimize the driver load to association time.
760 * Based on this flag we will bypass the initial passive scan needed for 11d
761 * to determine the country code & domain */
762 tANI_BOOLEAN fEnableBypass11d;
763
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800764 /*Customer wants to optimize the scan time. Avoiding scans(passive) on DFS
765 * channels while swipping through both bands can save some time
Jeff Johnson295189b2012-06-20 16:38:30 -0700766 * (apprx 1.3 sec) */
767 tANI_BOOLEAN fEnableDFSChnlScan;
768
Jeff Johnsone7245742012-09-05 17:12:55 -0700769 /*
770 * To enable/disable scanning only 2.4Ghz channels on first scan
771 */
772 tANI_BOOLEAN fFirstScanOnly2GChnl;
773
Jeff Johnson295189b2012-06-20 16:38:30 -0700774 tANI_BOOLEAN fDropScanCmd; //true means we don't accept scan commands
775
776#ifdef WLAN_AP_STA_CONCURRENCY
777 tDblLinkList scanCmdPendingList;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800778#endif
Madan Mohan Koyyalamudi470d2cf2012-09-28 14:43:44 -0700779 tCsrChannel occupiedChannels; //This includes all channels on which candidate APs are found
Srinivas Girigowda41c7c5f2013-10-21 19:01:38 -0700780 tANI_S8 inScanResultBestAPRssi;
Jeff Johnson295189b2012-06-20 16:38:30 -0700781}tCsrScanStruct;
782
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800783#ifdef FEATURE_WLAN_TDLS_INTERNAL
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800784/*
785 * struct to carry TDLS discovery info..
786 */
787typedef struct sCsrTdlsContext
788{
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800789 tDblLinkList tdlsPotentialPeerList ;
790 tANI_U16 tdlsCommonFlag ;
791 tANI_U16 tdlsCommonState ;
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800792 tANI_U16 tdlsPeerCount ;
793}tCsrTdlsCtxStruct;
794
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800795typedef struct sCsrTdlsPeerLinkInfo
796{
797 tListElem tdlsPeerStaLink ;
798 tSirTdlsPeerInfo tdlsDisPeerInfo ;
799}tCsrTdlsPeerLinkinfo ;
800#endif
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800801
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800802
803
Jeff Johnson295189b2012-06-20 16:38:30 -0700804
805//Save the connected information. This structure + connectedProfile
806//should contain all information about the connection
807typedef struct tagRoamCsrConnectedInfo
808{
809 tANI_U32 nBeaconLength; //the length, in bytes, of the beacon frame, can be 0
810 tANI_U32 nAssocReqLength; //the length, in bytes, of the assoc req frame, can be 0
811 tANI_U32 nAssocRspLength; //The length, in bytes, of the assoc rsp frame, can be 0
812#ifdef WLAN_FEATURE_VOWIFI_11R
813 tANI_U32 nRICRspLength; //Length of the parsed RIC response IEs received in reassoc response
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800814#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700815#ifdef FEATURE_WLAN_CCX
816 tANI_U32 nTspecIeLength;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800817#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700818 tANI_U8 *pbFrames; //Point to a buffer contain the beacon, assoc req, assoc rsp frame, in that order
819 //user needs to use nBeaconLength, nAssocReqLength, nAssocRspLength to desice where
820 //each frame starts and ends.
821 tANI_U8 staId;
822}tCsrRoamConnectedInfo;
823
824
825typedef struct tagCsrLinkQualityIndInfo
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800826{
Jeff Johnson295189b2012-06-20 16:38:30 -0700827 csrRoamLinkQualityIndCallback callback;
828 void *context;
829}tCsrLinkQualityIndInfo;
830
831typedef struct tagCsrPeStatsReqInfo
832{
833 tListElem link; /* list links */
834 tANI_U32 statsMask;
835 tANI_U32 periodicity;
836 tANI_BOOLEAN rspPending;
837 vos_timer_t hPeStatsTimer;
838 tANI_BOOLEAN timerRunning;
839 tANI_U8 staId;
840 tANI_U8 numClient;
841 tpAniSirGlobal pMac;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800842 /* To remember if the peStats timer is stopped successfully or not */
Jeff Johnson295189b2012-06-20 16:38:30 -0700843 tANI_BOOLEAN timerStopFailed;
844
845}tCsrPeStatsReqInfo;
846
847typedef struct tagCsrStatsClientReqInfo
848{
849 tListElem link; /* list links */
850 eCsrStatsRequesterType requesterId;
851 tCsrStatsCallback callback;
852 tANI_U32 periodicity;
853 void *pContext;
854 tANI_U32 statsMask;
855 tCsrPeStatsReqInfo *pPeStaEntry;
856 tANI_U8 staId;
857 vos_timer_t timer;
858 tANI_BOOLEAN timerExpired;
859 tpAniSirGlobal pMac; // TODO: Confirm this change BTAMP
860}tCsrStatsClientReqInfo;
861
862typedef struct tagCsrTlStatsReqInfo
863{
864 tANI_U32 periodicity;
865 tANI_BOOLEAN timerRunning;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530866 vos_timer_t hTlStatsTimer;
Jeff Johnson295189b2012-06-20 16:38:30 -0700867 tANI_U8 numClient;
868}tCsrTlStatsReqInfo;
869
870typedef struct tagCsrRoamSession
871{
872 tANI_U8 sessionId; // Session ID
873 tANI_BOOLEAN sessionActive; // TRUE if it is used
874 tCsrBssid selfMacAddr; // For BT-AMP station, this serve as BSSID for self-BSS.
875 csrRoamCompleteCallback callback;
876 void *pContext;
877 eCsrConnectState connectState;
878 tCsrRoamConnectedProfile connectedProfile;
879 tCsrRoamConnectedInfo connectedInfo;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800880 tCsrRoamProfile *pCurRoamProfile;
Jeff Johnson295189b2012-06-20 16:38:30 -0700881 tSirBssDescription *pConnectBssDesc;
882 tANI_U16 NumPmkidCache;
883 tPmkidCacheInfo PmkidCacheInfo[CSR_MAX_PMKID_ALLOWED];
884 tANI_U8 cJoinAttemps;
885 //This may or may not have the up-to-date valid channel list
886 //It is used to get WNI_CFG_VALID_CHANNEL_LIST and not allocate memory all the time
887 tSirMacChanNum validChannelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
888 tANI_S32 sPendingCommands; //0 means CSR is ok to low power
889#ifdef FEATURE_WLAN_WAPI
890 tANI_U16 NumBkidCache;
891 tBkidCacheInfo BkidCacheInfo[CSR_MAX_BKID_ALLOWED];
892#endif /* FEATURE_WLAN_WAPI */
893 tANI_BOOLEAN fRoaming; //indicate whether CSR is roaming (either via lostlink or dynamic roaming)
894 //to remember some parameters needed for START_BSS.
895 //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 -0800896 tCsrRoamStartBssParams bssParams;
Jeff Johnson295189b2012-06-20 16:38:30 -0700897 tANI_U32 nWpaRsnReqIeLength; //the byte count of pWpaRsnIE;
898 tANI_U8 *pWpaRsnReqIE; //this contain the WPA/RSN IE in assoc request or the one sent in beacon (IBSS)
899 tANI_U32 nWpaRsnRspIeLength; //the byte count for pWpaRsnRspIE
900 tANI_U8 *pWpaRsnRspIE; //this contain the WPA/RSN IE in beacon/probe rsp
901#ifdef FEATURE_WLAN_WAPI
902 tANI_U32 nWapiReqIeLength; //the byte count of pWapiReqIE;
903 tANI_U8 *pWapiReqIE; //this contain the WAPI IE in assoc request or the one sent in beacon (IBSS)
904 tANI_U32 nWapiRspIeLength; //the byte count for pWapiRspIE
905 tANI_U8 *pWapiRspIE; //this contain the WAPI IE in beacon/probe rsp
906#endif /* FEATURE_WLAN_WAPI */
907 tANI_U32 nAddIEScanLength; //the byte count of pAddIeScanIE;
908 tANI_U8 *pAddIEScan; //this contains the additional IE in (unicast) probe request at the time of join
909 tANI_U32 nAddIEAssocLength; //the byte count for pAddIeAssocIE
910 tANI_U8 *pAddIEAssoc; //this contains the additional IE in (re) assoc request
911
912 tANI_TIMESTAMP roamingStartTime; //in units of 10ms
913 tCsrTimerInfo roamingTimerInfo;
914 eCsrRoamingReason roamingReason;
915 tANI_BOOLEAN fCancelRoaming;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530916 vos_timer_t hTimerRoaming;
Jeff Johnson295189b2012-06-20 16:38:30 -0700917 eCsrRoamResult roamResult; //the roamResult that is used when the roaming timer fires
918 tCsrRoamJoinStatus joinFailStatusCode; //This is the reason code for join(assoc) failure
919 //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 -0800920 tANI_U32 roamingStatusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700921 tANI_U16 NumPmkidCandidate;
922 tPmkidCandidateInfo PmkidCandidateInfo[CSR_MAX_PMKID_ALLOWED];
923 #ifdef FEATURE_WLAN_WAPI
924 tANI_U16 NumBkidCandidate;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800925 tBkidCandidateInfo BkidCandidateInfo[CSR_MAX_BKID_ALLOWED];
Jeff Johnson295189b2012-06-20 16:38:30 -0700926#endif
927 tANI_BOOLEAN fWMMConnection;
928#ifdef FEATURE_WLAN_BTAMP_UT_RF
929 //To retry a join later when it fails if so desired
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530930 vos_timer_t hTimerJoinRetry;
Jeff Johnson295189b2012-06-20 16:38:30 -0700931 tCsrTimerInfo joinRetryTimerInfo;
932 tANI_U32 maxRetryCount;
933#endif
934#ifdef FEATURE_WLAN_CCX
935 tCsrCcxCckmInfo ccxCckmInfo;
936 tANI_BOOLEAN isPrevApInfoValid;
937 tSirMacSSid prevApSSID;
938 tCsrBssid prevApBssid;
939 tANI_U8 prevOpChannel;
940 tANI_U16 clientDissSecs;
941 tANI_U32 roamTS1;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700942#if defined(FEATURE_WLAN_CCX_UPLOAD)
943 tCsrCcxCckmIe suppCckmIeInfo;
944#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700945#endif
946 tANI_U8 bRefAssocStartCnt; //Tracking assoc start indication
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800947 /* to force the AP initiate fresh 802.1x authentication after re-association need to clear
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700948 * the PMKID cache. To clear the cache in this particular case this is added
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800949 * it is needed by the HS 2.0 passpoint certification 5.2.a and b testcases */
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700950 tANI_BOOLEAN fIgnorePMKIDCache;
Jeff Johnson295189b2012-06-20 16:38:30 -0700951} tCsrRoamSession;
952
953typedef struct tagCsrRoamStruct
954{
955 tANI_U32 nextRoamId;
956 tDblLinkList roamCmdPendingList;
957 tDblLinkList channelList5G;
958 tDblLinkList channelList24;
959 tCsrConfig configParam;
960 tANI_U32 numChannelsEeprom; //total channels of eeprom
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800961 tCsrChannel base20MHzChannels; //The channel base to work on
962 tCsrChannel base40MHzChannels; //center channels for 40MHz channels
963 eCsrRoamState curState[CSR_ROAM_SESSION_MAX];
Jeff Johnson295189b2012-06-20 16:38:30 -0700964 eCsrRoamSubState curSubState[CSR_ROAM_SESSION_MAX];
965 //This may or may not have the up-to-date valid channel list
966 //It is used to get WNI_CFG_VALID_CHANNEL_LIST and not allocate memory all the time
967 tSirMacChanNum validChannelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
968 tANI_U32 numValidChannels; //total number of channels in CFG
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800969
Jeff Johnson295189b2012-06-20 16:38:30 -0700970 tANI_S32 sPendingCommands;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530971 vos_timer_t hTimerWaitForKey; //To support timeout for WaitForKey state
Jeff Johnson295189b2012-06-20 16:38:30 -0700972 tCsrSummaryStatsInfo summaryStatsInfo;
973 tCsrGlobalClassAStatsInfo classAStatsInfo;
974 tCsrGlobalClassBStatsInfo classBStatsInfo;
975 tCsrGlobalClassCStatsInfo classCStatsInfo;
976 tCsrGlobalClassDStatsInfo classDStatsInfo;
977 tCsrPerStaStatsInfo perStaStatsInfo[CSR_MAX_STA];
978 tDblLinkList statsClientReqList;
979 tDblLinkList peStatsReqList;
980 tCsrTlStatsReqInfo tlStatsReqInfo;
981 eCsrRoamLinkQualityInd vccLinkQuality;
982 tCsrLinkQualityIndInfo linkQualityIndInfo;
983 v_CONTEXT_t gVosContext; //used for interaction with TL
984 //To specify whether an association or a IBSS is WMM enabled
985 //This parameter is only valid during a join or start BSS command is being executed
986 //tANI_BOOLEAN fWMMConnection; /* Moving it to be part of roamsession */
987 v_U8_t ucACWeights[WLANTL_MAX_AC];
988 /* TODO : Upto here */
989 tCsrTimerInfo WaitForKeyTimerInfo;
990 tCsrRoamSession *roamSession;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800991 tANI_U32 transactionId; // Current transaction ID for internal use.
992#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Jeff Johnson295189b2012-06-20 16:38:30 -0700993 tCsrNeighborRoamControlInfo neighborRoamInfo;
994#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700995#ifdef FEATURE_WLAN_LFR
996 tANI_U8 isFastRoamIniFeatureEnabled;
997#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700998#ifdef FEATURE_WLAN_CCX
999 tANI_U8 isCcxIniFeatureEnabled;
1000#endif
Jeff Johnson43971f52012-07-17 12:26:56 -07001001#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -07001002 tANI_U8 RoamRssiDiff;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07001003 tANI_BOOLEAN isWESModeEnabled;
Jeff Johnson43971f52012-07-17 12:26:56 -07001004#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001005}tCsrRoamStruct;
1006
1007
1008#define GET_NEXT_ROAM_ID(pRoamStruct) (((pRoamStruct)->nextRoamId + 1 == 0) ? 1 : (pRoamStruct)->nextRoamId)
1009#define CSR_IS_ROAM_STATE(pMac, state, sessionId) ( (state) == (pMac)->roam.curState[sessionId] )
1010
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001011#define CSR_IS_ROAM_STOP(pMac, sessionId) CSR_IS_ROAM_STATE( (pMac), eCSR_ROAMING_STATE_STOP, sessionId )
1012#define CSR_IS_ROAM_INIT(pMac, sessionId) CSR_IS_ROAM_STATE( (pMac), eCSR_ROAMING_STATE_INIT, sessionId )
Jeff Johnson295189b2012-06-20 16:38:30 -07001013#define CSR_IS_ROAM_SCANNING(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_SCANNING, sessionId )
1014#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 -08001015#define CSR_IS_ROAM_IDLE(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_IDLE, sessionId )
Jeff Johnson295189b2012-06-20 16:38:30 -07001016#define CSR_IS_ROAM_JOINED(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_JOINED, sessionId )
1017
1018#define CSR_IS_ROAM_SUBSTATE(pMac, subState, sessionId) ((subState) == (pMac)->roam.curSubState[sessionId])
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001019#define CSR_IS_ROAM_SUBSTATE_JOIN_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOIN_REQ, sessionId)
1020#define CSR_IS_ROAM_SUBSTATE_AUTH_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_AUTH_REQ, sessionId)
1021#define CSR_IS_ROAM_SUBSTATE_REASSOC_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_REASSOC_REQ, sessionId)
1022#define CSR_IS_ROAM_SUBSTATE_DISASSOC_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_REQ, sessionId)
1023#define CSR_IS_ROAM_SUBSTATE_DISASSOC_NO_JOIN(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_NOTHING_TO_JOIN, sessionId)
1024#define CSR_IS_ROAM_SUBSTATE_REASSOC_FAIL(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_REASSOC_FAILURE, sessionId)
1025#define CSR_IS_ROAM_SUBSTATE_DISASSOC_FORCED(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_FORCED, sessionId)
1026#define CSR_IS_ROAM_SUBSTATE_DEAUTH_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DEAUTH_REQ, sessionId)
1027#define CSR_IS_ROAM_SUBSTATE_START_BSS_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_START_BSS_REQ, sessionId)
1028#define CSR_IS_ROAM_SUBSTATE_STOP_BSS_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_STOP_BSS_REQ, sessionId)
1029#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 -07001030#define CSR_IS_ROAM_SUBSTATE_CONFIG(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_CONFIG, sessionId)
1031#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 -08001032#define CSR_IS_ROAM_SUBSTATE_DISASSOC_HO(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_HANDOFF, sessionId)
1033#define CSR_IS_ROAM_SUBSTATE_HO_NT(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOINED_NO_TRAFFIC, sessionId)
1034#define CSR_IS_ROAM_SUBSTATE_HO_NRT(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOINED_NON_REALTIME_TRAFFIC, sessionId)
1035#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 -07001036
1037#define CSR_IS_PHY_MODE_B_ONLY(pMac) \
1038 ((eCSR_DOT11_MODE_11b == (pMac)->roam.configParam.phyMode) ||\
1039 (eCSR_DOT11_MODE_11b_ONLY == (pMac)->roam.configParam.phyMode))
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001040
Jeff Johnson295189b2012-06-20 16:38:30 -07001041#define CSR_IS_PHY_MODE_G_ONLY(pMac) \
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001042 (eCSR_DOT11_MODE_11g == (pMac)->roam.configParam.phyMode || eCSR_DOT11_MODE_11g_ONLY == (pMac)->roam.configParam.phyMode)
1043
Jeff Johnson295189b2012-06-20 16:38:30 -07001044#define CSR_IS_PHY_MODE_A_ONLY(pMac) \
1045 ((eCSR_DOT11_MODE_11a == (pMac)->roam.configParam.phyMode) ||\
1046 (eCSR_DOT11_MODE_11a_ONLY == (pMac)->roam.configParam.phyMode))
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001047
Jeff Johnsone7245742012-09-05 17:12:55 -07001048#ifdef WLAN_FEATURE_11AC
1049#define CSR_IS_PHY_MODE_DUAL_BAND(phyMode) \
1050 ((eCSR_DOT11_MODE_abg & (phyMode)) || (eCSR_DOT11_MODE_11n & (phyMode)) || \
1051 (eCSR_DOT11_MODE_11ac & (phyMode)) || \
1052 (eCSR_DOT11_MODE_TAURUS & (phyMode)) || \
1053 (eCSR_DOT11_MODE_AUTO & (phyMode)))
1054#else
Jeff Johnson295189b2012-06-20 16:38:30 -07001055#define CSR_IS_PHY_MODE_DUAL_BAND(phyMode) \
1056 ((eCSR_DOT11_MODE_abg & (phyMode)) || (eCSR_DOT11_MODE_11n & (phyMode)) || \
1057 (eCSR_DOT11_MODE_TAURUS & (phyMode)) || \
1058 (eCSR_DOT11_MODE_AUTO & (phyMode)))
Jeff Johnsone7245742012-09-05 17:12:55 -07001059#endif
1060
Jeff Johnson295189b2012-06-20 16:38:30 -07001061
1062// this function returns TRUE if the NIC is operating exclusively in the 2.4 GHz band, meaning
1063// it is NOT operating in the 5.0 GHz band.
1064#define CSR_IS_24_BAND_ONLY(pMac) \
1065 (eCSR_BAND_24 == (pMac)->roam.configParam.eBand)
1066
1067#define CSR_IS_5G_BAND_ONLY(pMac) \
1068 (eCSR_BAND_5G == (pMac)->roam.configParam.eBand)
1069
1070#define CSR_IS_RADIO_DUAL_BAND(pMac) \
1071 (eCSR_BAND_ALL == (pMac)->roam.configParam.bandCapability)
1072
1073#define CSR_IS_RADIO_BG_ONLY(pMac) \
1074 (eCSR_BAND_24 == (pMac)->roam.configParam.bandCapability)
1075
1076// this function returns TRUE if the NIC is operating exclusively in the 5.0 GHz band, meaning
1077// it is NOT operating in the 2.4 GHz band
1078#define CSR_IS_RADIO_A_ONLY(pMac) \
1079 (eCSR_BAND_5G == (pMac)->roam.configParam.bandCapability)
1080
1081// this function returns TRUE if the NIC is operating in both bands.
1082#define CSR_IS_OPEARTING_DUAL_BAND(pMac) \
1083 ((eCSR_BAND_ALL == (pMac)->roam.configParam.bandCapability) && (eCSR_BAND_ALL == (pMac)->roam.configParam.eBand))
1084
1085// this function returns TRUE if the NIC can operate in the 5.0 GHz band (could operate in the
1086// 2.4 GHz band also).
1087#define CSR_IS_OPERATING_A_BAND(pMac) \
1088 (CSR_IS_OPEARTING_DUAL_BAND((pMac)) || CSR_IS_RADIO_A_ONLY((pMac)) || CSR_IS_5G_BAND_ONLY((pMac)))
1089
1090// this function returns TRUE if the NIC can operate in the 2.4 GHz band (could operate in the
1091// 5.0 GHz band also).
1092#define CSR_IS_OPERATING_BG_BAND(pMac) \
1093 (CSR_IS_OPEARTING_DUAL_BAND((pMac)) || CSR_IS_RADIO_BG_ONLY((pMac)) || CSR_IS_24_BAND_ONLY((pMac)))
1094
1095#define CSR_IS_CHANNEL_5GHZ(chnNum) \
Jeff Johnsone7245742012-09-05 17:12:55 -07001096 (((chnNum) >= CSR_MIN_5GHz_CHANNEL_NUMBER) && ((chnNum) <= CSR_MAX_5GHz_CHANNEL_NUMBER))
Jeff Johnson295189b2012-06-20 16:38:30 -07001097
Srinivas Girigowdade697412013-02-14 16:31:48 -08001098#define CSR_IS_CHANNEL_DFS(chnNum) \
1099 (NV_CHANNEL_ENABLE != vos_nv_getChannelEnabledState(chnNum))
1100
Jeff Johnson295189b2012-06-20 16:38:30 -07001101#define CSR_IS_CHANNEL_24GHZ(chnNum) \
1102 (((chnNum) > 0) && ((chnNum) <= CSR_MAX_24GHz_CHANNEL_NUMBER))
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001103
Jeff Johnson295189b2012-06-20 16:38:30 -07001104#define CSR_IS_SAME_BAND_CHANNELS(ch1, ch2) (CSR_IS_CHANNEL_5GHZ(ch1) == CSR_IS_CHANNEL_5GHZ(ch2))
1105
1106
1107#define CSR_IS_11D_INFO_FOUND(pMac) \
1108 (0 != (pMac)->scan.channelOf11dInfo)
1109// DEAUTHIND
1110#define CSR_IS_ROAMING(pSession) ((CSR_IS_LOSTLINK_ROAMING((pSession)->roamingReason)) || \
1111 (eCsrDynamicRoaming == (pSession)->roamingReason) || \
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001112 (eCsrReassocRoaming == (pSession)->roamingReason))
Jeff Johnson295189b2012-06-20 16:38:30 -07001113
1114
1115#define CSR_IS_SET_KEY_COMMAND( pCommand ) ( eSmeCommandSetKey == (pCommand)->command )
1116
1117#define CSR_IS_ADDTS_WHEN_ACMOFF_SUPPORTED(pMac) (pMac->roam.configParam.addTSWhenACMIsOff)
1118// DEAUTHIND
1119#define CSR_IS_LOSTLINK_ROAMING(reason) ((eCsrLostlinkRoamingDisassoc == (reason)) || (eCsrLostlinkRoamingDeauth == (reason)))
1120
Venkata Prathyusha Kuntupalli239278b2013-03-26 15:58:18 -07001121#define CSR_IS_ROAMING_COMMAND(pCommand) ((eCsrLostLink1 == (pCommand)->u.roamCmd.roamReason) ||\
1122 (eCsrLostLink2 == (pCommand)->u.roamCmd.roamReason) ||\
1123 (eCsrLostLink3 == (pCommand)->u.roamCmd.roamReason) )
1124
1125
Jeff Johnson295189b2012-06-20 16:38:30 -07001126//Stop CSR from asking for IMPS, This function doesn't disable IMPS from CSR
1127void csrScanSuspendIMPS( tpAniSirGlobal pMac );
1128//Start CSR from asking for IMPS. This function doesn't trigger CSR to request entering IMPS
1129//because IMPS maybe disabled.
1130void csrScanResumeIMPS( tpAniSirGlobal pMac );
1131
1132eHalStatus csrInitGetChannels(tpAniSirGlobal pMac);
1133
1134eHalStatus csrSetModifyProfileFields(tpAniSirGlobal pMac, tANI_U32 sessionId,
1135 tCsrRoamModifyProfileFields *pModifyProfileFields);
1136/* ---------------------------------------------------------------------------
1137 \fn csrGetModifyProfileFields
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001138 \brief HDD or SME - QOS calls this function to get the current values of
Jeff Johnson295189b2012-06-20 16:38:30 -07001139 connected profile fields changing which can cause reassoc.
1140 This function must be called after CFG is downloaded and STA is in connected
1141 state.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001142 \param pModifyProfileFields - pointer to the connected profile fields
Jeff Johnson295189b2012-06-20 16:38:30 -07001143 changing which can cause reassoc
1144
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001145 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001146 -------------------------------------------------------------------------------*/
1147eHalStatus csrGetModifyProfileFields(tpAniSirGlobal pMac, tANI_U32 sessionId,
1148 tCsrRoamModifyProfileFields * pModifyProfileFields);
1149void csrSetGlobalCfgs( tpAniSirGlobal pMac );
1150void csrSetDefaultDot11Mode( tpAniSirGlobal pMac );
1151void csrScanSetChannelMask(tpAniSirGlobal pMac, tCsrChannelInfo *pChannelInfo);
1152tANI_BOOLEAN csrIsConnStateDisconnected(tpAniSirGlobal pMac, tANI_U32 sessionId);
1153tANI_BOOLEAN csrIsConnStateConnectedIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1154tANI_BOOLEAN csrIsConnStateDisconnectedIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1155tANI_BOOLEAN csrIsConnStateConnectedInfra( tpAniSirGlobal pMac, tANI_U32 sessionId );
1156tANI_BOOLEAN csrIsConnStateConnected( tpAniSirGlobal pMac, tANI_U32 sessionId );
1157tANI_BOOLEAN csrIsConnStateInfra( tpAniSirGlobal pMac, tANI_U32 sessionId );
1158tANI_BOOLEAN csrIsConnStateIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1159tANI_BOOLEAN csrIsConnStateWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1160tANI_BOOLEAN csrIsConnStateConnectedWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1161tANI_BOOLEAN csrIsConnStateDisconnectedWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1162tANI_BOOLEAN csrIsAnySessionInConnectState( tpAniSirGlobal pMac );
1163tANI_BOOLEAN csrIsAllSessionDisconnected( tpAniSirGlobal pMac );
Madan Mohan Koyyalamudi48081ef2012-12-04 16:49:55 -08001164tANI_BOOLEAN csrIsStaSessionConnected( tpAniSirGlobal pMac );
1165tANI_BOOLEAN csrIsP2pSessionConnected( tpAniSirGlobal pMac );
Madan Mohan Koyyalamudid3d22592012-09-24 14:01:29 -07001166tANI_BOOLEAN csrIsAnySessionConnected( tpAniSirGlobal pMac );
Jeff Johnson295189b2012-06-20 16:38:30 -07001167tANI_BOOLEAN csrIsInfraConnected( tpAniSirGlobal pMac );
1168tANI_BOOLEAN csrIsConcurrentInfraConnected( tpAniSirGlobal pMac );
Jeff Johnsone7245742012-09-05 17:12:55 -07001169tANI_BOOLEAN csrIsConcurrentSessionRunning( tpAniSirGlobal pMac );
Jeff Johnsone7245742012-09-05 17:12:55 -07001170tANI_BOOLEAN csrIsInfraApStarted( tpAniSirGlobal pMac );
Jeff Johnson295189b2012-06-20 16:38:30 -07001171tANI_BOOLEAN csrIsIBSSStarted( tpAniSirGlobal pMac );
1172tANI_BOOLEAN csrIsBTAMPStarted( tpAniSirGlobal pMac );
1173tANI_BOOLEAN csrIsBTAMP( tpAniSirGlobal pMac, tANI_U32 sessionId );
1174eHalStatus csrIsBTAMPAllowed( tpAniSirGlobal pMac, tANI_U32 chnId );
Jeff Johnsone7245742012-09-05 17:12:55 -07001175tANI_BOOLEAN csrIsValidMcConcurrentSession(tpAniSirGlobal pMac, tANI_U32 sessionId,
1176 tSirBssDescription *pBssDesc);
Jeff Johnson295189b2012-06-20 16:38:30 -07001177tANI_BOOLEAN csrIsConnStateConnectedInfraAp( tpAniSirGlobal pMac, tANI_U32 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -07001178/*----------------------------------------------------------------------------
1179 \fn csrRoamRegisterLinkQualityIndCallback
1180
1181 \brief
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001182 a CSR function to allow HDD to register a callback handler with CSR for
1183 link quality indications.
Jeff Johnson295189b2012-06-20 16:38:30 -07001184
1185 Only one callback may be registered at any time.
1186 In order to deregister the callback, a NULL cback may be provided.
1187
1188 Registration happens in the task context of the caller.
1189
1190 \param callback - Call back being registered
1191 \param pContext - user data
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001192
Jeff Johnson295189b2012-06-20 16:38:30 -07001193 DEPENDENCIES: After CSR open
1194
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001195 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001196-----------------------------------------------------------------------------*/
1197eHalStatus csrRoamRegisterLinkQualityIndCallback(tpAniSirGlobal pMac,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001198 csrRoamLinkQualityIndCallback callback,
Jeff Johnson295189b2012-06-20 16:38:30 -07001199 void *pContext);
1200/* ---------------------------------------------------------------------------
1201 \fn csrGetStatistics
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001202 \brief csr function that client calls to register a callback to get
1203 different PHY level statistics from CSR.
1204
Jeff Johnson295189b2012-06-20 16:38:30 -07001205 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
1206 \param statsMask - The different category/categories of stats requester is looking for
1207 \param callback - SME sends back the requested stats using the callback
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001208 \param periodicity - If requester needs periodic update, 0 means it's an one
Jeff Johnson295189b2012-06-20 16:38:30 -07001209 time request
1210 \param cache - If requester is happy with cached stats
1211 \param staId - The station ID for which the stats is requested for
1212 \param pContext - user context to be passed back along with the callback
1213
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001214 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001215 ---------------------------------------------------------------------------*/
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001216eHalStatus csrGetStatistics(tpAniSirGlobal pMac, eCsrStatsRequesterType requesterId,
1217 tANI_U32 statsMask,
1218 tCsrStatsCallback callback,
1219 tANI_U32 periodicity, tANI_BOOLEAN cache,
Jeff Johnson295189b2012-06-20 16:38:30 -07001220 tANI_U8 staId, void *pContext);
1221
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +05301222/* ---------------------------------------------------------------------------
1223 \fn csrGetTLSTAState
1224 \helper function to get the TL STA State whenever the function is called.
1225
1226 \param staId - The staID to be passed to the TL
1227 to get the relevant TL STA State
1228 \return the state as tANI_U16
1229 ---------------------------------------------------------------------------*/
1230tANI_U16 csrGetTLSTAState(tpAniSirGlobal pMac, tANI_U8 staId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001231
1232eHalStatus csrGetRssi(tpAniSirGlobal pMac,tCsrRssiCallback callback,tANI_U8 staId,tCsrBssid bssId,void * pContext,void * pVosContext);
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05301233
1234/* ---------------------------------------------------------------------------
1235 \fn csrGetSnr
1236 \brief csr function that client calls to register a callback to get
1237 SNR stored in TL
1238
1239 \param callback - SME sends back the requested stats using the callback
1240 \param staId - The station ID for which the stats is requested for
1241 \param bssid - The bssid for the connected session
1242 \param pContext - user context to be passed back along with the callback
1243
1244 \return eHalStatus
1245 ---------------------------------------------------------------------------*/
1246eHalStatus csrGetSnr(tpAniSirGlobal pMac, tCsrSnrCallback callback,
1247 tANI_U8 staId, tCsrBssid bssId, void *pContext);
1248
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08001249#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_CCX || defined(FEATURE_WLAN_LFR)
1250eHalStatus csrGetRoamRssi(tpAniSirGlobal pMac,
1251 tCsrRssiCallback callback,
1252 tANI_U8 staId,
1253 tCsrBssid bssId,
1254 void * pContext,
1255 void * pVosContext);
1256#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001257
1258#if defined(FEATURE_WLAN_CCX) && defined(FEATURE_WLAN_CCX_UPLOAD)
1259eHalStatus csrGetTsmStats(tpAniSirGlobal pMac, tCsrTsmStatsCallback callback, tANI_U8 staId,
1260 tCsrBssid bssId, void *pContext, void* pVosContext,
1261 tANI_U8 tid);
1262#endif /* FEATURE_WLAN_CCX && FEATURE_WLAN_CCX_UPLOAD */
1263
Jeff Johnson295189b2012-06-20 16:38:30 -07001264eHalStatus csrRoamRegisterCallback(tpAniSirGlobal pMac, csrRoamCompleteCallback callback, void *pContext);
1265/* ---------------------------------------------------------------------------
1266 \fn csrGetConfigParam
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001267 \brief HDD calls this function to get the global settings currently maintained by CSR.
Jeff Johnson295189b2012-06-20 16:38:30 -07001268 \param pParam - caller allocated memory
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001269 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001270 -------------------------------------------------------------------------------*/
1271eHalStatus csrGetConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam);
1272
1273/* ---------------------------------------------------------------------------
1274 \fn csrMsgProcessor
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001275 \brief HDD calls this function to change some global settings.
Jeff Johnson295189b2012-06-20 16:38:30 -07001276 caller must set the all fields or call csrGetConfigParam to prefill the fields.
1277 \param pParam - caller allocated memory
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001278 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001279 -------------------------------------------------------------------------------*/
1280eHalStatus csrChangeDefaultConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam);
1281
1282
1283/* ---------------------------------------------------------------------------
1284 \fn csrMsgProcessor
1285 \brief HDD calls this function for the messages that are handled by CSR.
1286 \param pMsgBuf - a pointer to a buffer that maps to various structures base on the message type.
1287 The beginning of the buffer can always map to tSirSmeRsp.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001288 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001289 -------------------------------------------------------------------------------*/
1290eHalStatus csrMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf );
1291
1292/* ---------------------------------------------------------------------------
1293 \fn csrOpen
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001294 \brief This function must be called before any API call to CSR.
1295 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001296 -------------------------------------------------------------------------------*/
1297eHalStatus csrOpen(tpAniSirGlobal pMac);
1298/* ---------------------------------------------------------------------------
1299 \fn csrClose
1300 \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 -08001301 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001302 -------------------------------------------------------------------------------*/
1303eHalStatus csrClose(tpAniSirGlobal pMac);
1304/* ---------------------------------------------------------------------------
1305 \fn csrStart
1306 \brief To start CSR.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001307 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001308 -------------------------------------------------------------------------------*/
1309eHalStatus csrStart(tpAniSirGlobal pMac);
1310/* ---------------------------------------------------------------------------
1311 \fn csrStop
1312 \brief To stop CSR. CSR still keeps its current setting.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001313 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001314 -------------------------------------------------------------------------------*/
1315eHalStatus csrStop(tpAniSirGlobal pMac);
1316/* ---------------------------------------------------------------------------
1317 \fn csrReady
1318 \brief To let CSR is ready to operate
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001319 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001320 -------------------------------------------------------------------------------*/
1321eHalStatus csrReady(tpAniSirGlobal pMac);
1322
1323#ifdef FEATURE_WLAN_WAPI
1324eHalStatus csrRoamGetBKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pNum,
1325 tBkidCacheInfo *pBkidCache);
1326
1327
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001328eHalStatus csrScanGetBKIDCandidateList(tpAniSirGlobal pMac, tANI_U32 sessionId,
Jeff Johnson295189b2012-06-20 16:38:30 -07001329 tBkidCandidateInfo *pBkidList, tANI_U32 *pNumItems );
1330tANI_U32 csrRoamGetNumBKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId);
1331eHalStatus csrRoamSetBKIDCache( tpAniSirGlobal pMac, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
1332 tANI_U32 numItems );
1333/* ---------------------------------------------------------------------------
1334 \fn csrRoamGetWapiReqIE
1335 \brief return the WAPI IE CSR passes to PE to JOIN request or START_BSS request
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001336 \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 -07001337 needed or IE length in pBuf.
1338 \param pBuf - Caller allocated memory that contain the IE field, if any, upon return
1339 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
1340 -------------------------------------------------------------------------------*/
1341eHalStatus csrRoamGetWapiReqIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf);
1342
1343/* ---------------------------------------------------------------------------
1344 \fn csrRoamGetWapiRspIE
1345 \brief return the WAPI IE from the beacon or probe rsp if connected
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001346 \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 -07001347 needed or IE length in pBuf.
1348 \param pBuf - Caller allocated memory that contain the IE field, if any, upon return
1349 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
1350 -------------------------------------------------------------------------------*/
1351eHalStatus csrRoamGetWapiRspIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf);
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001352tANI_U8 csrConstructWapiIe( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
Jeff Johnson295189b2012-06-20 16:38:30 -07001353 tSirBssDescription *pSirBssDesc, tDot11fBeaconIEs *pIes, tCsrWapiIe *pWapiIe );
1354#endif /* FEATURE_WLAN_WAPI */
1355
Jeff Johnson295189b2012-06-20 16:38:30 -07001356eHalStatus csrRoamUpdateAPWPSIE( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirAPWPSIEs *pAPWPSIES );
1357eHalStatus csrRoamUpdateWPARSNIEs( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirRSNie * pAPSirRSNie);
Jeff Johnson295189b2012-06-20 16:38:30 -07001358void csrSetCfgPrivacy( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy );
1359tANI_S8 csrGetInfraSessionId( tpAniSirGlobal pMac );
1360tANI_U8 csrGetInfraOperationChannel( tpAniSirGlobal pMac, tANI_U8 sessionId);
1361tANI_U8 csrGetConcurrentOperationChannel( tpAniSirGlobal pMac );
1362
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001363eHalStatus csrRoamCopyConnectProfile(tpAniSirGlobal pMac, tANI_U32 sessionId,
Jeff Johnson295189b2012-06-20 16:38:30 -07001364 tCsrRoamConnectedProfile *pProfile);
1365tANI_BOOLEAN csrIsSetKeyAllowed(tpAniSirGlobal pMac, tANI_U32 sessionId);
1366
1367void csrSetOppositeBandChannelInfo( tpAniSirGlobal pMac );
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001368void csrConstructCurrentValidChannelList( tpAniSirGlobal pMac, tDblLinkList *pChannelSetList,
Jeff Johnson295189b2012-06-20 16:38:30 -07001369 tANI_U8 *pChannelList, tANI_U8 bSize, tANI_U8 *pNumChannels );
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08001370
1371#ifdef FEATURE_WLAN_SCAN_PNO
Srikant Kuppa066904f2013-05-07 13:56:02 -07001372eHalStatus csrScanSavePreferredNetworkFound(tpAniSirGlobal pMac,
1373 tSirPrefNetworkFoundInd *pPrefNetworkFoundInd);
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08001374#endif //FEATURE_WLAN_SCAN_PNO
Jeff Johnson295189b2012-06-20 16:38:30 -07001375#endif
1376
1377#ifdef WLAN_FEATURE_VOWIFI_11R
1378//Returns whether the current association is a 11r assoc or not
1379tANI_BOOLEAN csrRoamIs11rAssoc(tpAniSirGlobal pMac);
1380#endif
1381
1382#ifdef FEATURE_WLAN_CCX
1383//Returns whether the current association is a CCX assoc or not
1384tANI_BOOLEAN csrRoamIsCCXAssoc(tpAniSirGlobal pMac);
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001385tANI_BOOLEAN csrRoamIsCcxIniFeatureEnabled(tpAniSirGlobal pMac);
1386tANI_BOOLEAN csrNeighborRoamIsCCXAssoc(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -07001387#endif
1388
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001389//Remove this code once SLM_Sessionization is supported
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001390//BMPS_WORKAROUND_NOT_NEEDED
Jeff Johnson295189b2012-06-20 16:38:30 -07001391void csrDisconnectAllActiveSessions(tpAniSirGlobal pMac);
Mohit Khanna349bc392012-09-11 17:24:52 -07001392
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001393#ifdef FEATURE_WLAN_LFR
1394//Returns whether "Legacy Fast Roaming" is enabled...or not
Madan Mohan Koyyalamudi03aae5f2012-11-28 01:51:22 +05301395tANI_BOOLEAN csrRoamIsFastRoamEnabled(tpAniSirGlobal pMac, tANI_U32 sessionId);
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001396#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1397tANI_BOOLEAN csrRoamIsRoamOffloadScanEnabled(tpAniSirGlobal pMac);
1398#endif
Madan Mohan Koyyalamudi470d2cf2012-09-28 14:43:44 -07001399tANI_BOOLEAN csrIsChannelPresentInList( tANI_U8 *pChannelList, int numChannels, tANI_U8 channel );
1400VOS_STATUS csrAddToChannelListFront( tANI_U8 *pChannelList, int numChannels, tANI_U8 channel );
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001401#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1402eHalStatus csrScanRequestLfrResult(tpAniSirGlobal pMac, tANI_U32 sessionId,
1403 csrScanCompleteCallback callback, void *pContext);
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07001404eHalStatus csrRoamOffloadScanRspHdlr(tpAniSirGlobal pMac, tANI_U8 reason);
1405eHalStatus csrHandoffRequest(tpAniSirGlobal pMac, tCsrHandoffRequest *pHandoffInfo);
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001406#endif
1407tANI_BOOLEAN csrRoamIsStaMode(tpAniSirGlobal pMac, tANI_U32 sessionId);
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001408#endif
1409