blob: f6e18de9b6cc84ac6b7a0040c08b9d277b02957d [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Leela Venkata Kiran Kumar Reddy Chirala56df73f2014-01-30 14:18:00 -08002 * Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
Gopichand Nakkala92f07d82013-01-08 21:16:34 -08003 *
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
Varun Reddy Yeturu9d4102c2013-12-02 15:47:03 -080082#define CSR_ROAM_SCAN_CHANNEL_SWITCH_TIME 3
Jeff Johnson295189b2012-06-20 16:38:30 -070083
84//Support for multiple session
85#define CSR_SESSION_ID_INVALID 0xFF // session ID invalid
86#define CSR_ROAM_SESSION_MAX 5 // No of sessions to be supported, and a
87 // session is for Infra, IBSS or BT-AMP
88
89#define CSR_IS_SESSION_VALID( pMac, sessionId ) ( ( (sessionId) < CSR_ROAM_SESSION_MAX ) \
90 && ( (pMac)->roam.roamSession[(sessionId)].sessionActive ) )
91#define CSR_GET_SESSION( pMac, sessionId ) \
92( \
93 (sessionId < CSR_ROAM_SESSION_MAX) ? \
94 (&(pMac)->roam.roamSession[(sessionId)]) :\
95 NULL \
96)
97
Srinivas Girigowda41c7c5f2013-10-21 19:01:38 -070098#define CSR_IS_SELECT_5GHZ_MARGIN( pMac ) \
99( \
100 (((pMac)->roam.configParam.nSelect5GHzMargin)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
101)
102
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -0800103#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
104#define CSR_IS_ROAM_PREFER_5GHZ( pMac ) \
105( \
106 (((pMac)->roam.configParam.nRoamPrefer5GHz)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
107)
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -0700108#define CSR_IS_ROAM_INTRA_BAND_ENABLED( pMac ) \
109( \
110 (((pMac)->roam.configParam.nRoamIntraBand)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
111)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -0800112#endif
113
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700114#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
115#define CSR_IS_ROAM_SCAN_OFFLOAD_ENABLED( pMac ) \
116( \
117 (((pMac)->roam.configParam.isRoamOffloadScanEnabled)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
118)
Srinivas Girigowda830bbd02013-06-13 19:44:16 -0700119
120#define CSR_IS_FASTROAM_IN_CONCURRENCY_INI_FEATURE_ENABLED( pMac ) \
121( \
122 (((pMac)->roam.configParam.bFastRoamInConIniFeatureEnabled)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
123)
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700124#endif
125
Madan Mohan Koyyalamudi470d2cf2012-09-28 14:43:44 -0700126//Support for "Fast roaming" (i.e., CCX, LFR, or 802.11r.)
127#define CSR_BG_SCAN_OCCUPIED_CHANNEL_LIST_LEN 15
Jeff Johnson295189b2012-06-20 16:38:30 -0700128
129typedef enum
130{
131 //eCSR_CFG_DOT11_MODE_BEST = 0,
132 eCSR_CFG_DOT11_MODE_TAURUS = 0,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800133 eCSR_CFG_DOT11_MODE_ABG,
134 eCSR_CFG_DOT11_MODE_11A,
135 eCSR_CFG_DOT11_MODE_11B,
136 eCSR_CFG_DOT11_MODE_11G,
137 eCSR_CFG_DOT11_MODE_11N,
138 eCSR_CFG_DOT11_MODE_POLARIS,
139 eCSR_CFG_DOT11_MODE_TITAN,
Jeff Johnsone7245742012-09-05 17:12:55 -0700140#ifdef WLAN_FEATURE_11AC
141 eCSR_CFG_DOT11_MODE_11AC,
142#endif
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800143 eCSR_CFG_DOT11_MODE_11G_ONLY,
144 eCSR_CFG_DOT11_MODE_11N_ONLY,
Jeff Johnsone7245742012-09-05 17:12:55 -0700145#ifdef WLAN_FEATURE_11AC
146 eCSR_CFG_DOT11_MODE_11AC_ONLY,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800147#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700148 //This value can never set to CFG. It is for CSR's internal use
149 eCSR_CFG_DOT11_MODE_AUTO,
150}eCsrCfgDot11Mode; //Used to determine what to set to the WNI_CFG_DOT11_MODE
151
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800152typedef enum etCsrRoamCommands
Jeff Johnson295189b2012-06-20 16:38:30 -0700153{
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800154 eCsrRoamNoCommand,
Jeff Johnson295189b2012-06-20 16:38:30 -0700155 eCsrRoamCommandScan,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800156 eCsrRoamCommandRoam,
157 eCsrRoamCommandWmStatusChange,
Jeff Johnson295189b2012-06-20 16:38:30 -0700158 eCsrRoamCommandSetKey,
159 eCsrRoamCommandRemoveKey,
160
161} eCsrRoamCommands;
162
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800163typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700164{
165 eCsrScanOther = 1,
166 eCsrScanLostLink1,
167 eCsrScanLostLink2,
168 eCsrScanLostLink3,
169 eCsrScanLostLink4,
170 eCsrScan11d1, //First 11d scan
171 eCsrScan11d2, //First 11d scan has failed
172 eCsrScan11dDone, //11d scan succeeded, try the rest of the channel
173 eCsrScanUserRequest,
174 eCsrScanGetResult,
175 eCsrScanSetBGScanParam, //used for HO too - bg scan request in NT Handoff sub-state
176 eCsrScanForSsid,
177 eCsrScanForCapsChange,
178 eCsrScanBGScanAbort,
179 eCsrScanBGScanEnable,
180 eCsrScanIdleScan,
181 eCsrScanGetScanChnInfo, //To get the list of channels scanned
182
183 eCsrScanBgScan, // bg scan request in NRT & RT Handoff sub-states
184 eCsrScanProbeBss, // directed probe on an entry from the candidate list - HO
185 eCsrScanAbortBgScan, //aborting a BG scan (meaning the scan is triggered by LIM timer)
186 eCsrScanAbortNormalScan, //aborting a normal scan (the scan is trigger by eWNI_SME_SCAN_REQ)
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700187 eCsrScanP2PFindPeer,
188 eCsrScanGetLfrResult, // get the LFR candidates from PE scan cache
Jeff Johnson295189b2012-06-20 16:38:30 -0700189}eCsrScanReason;
190
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800191typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700192{
193 eCsrNoConnection, // Roaming because we have not established the initial connection.
194 eCsrCapsChange, // roaming because LIM reported a Capability change in the associated AP.
195 eCsrForcedDisassoc, // roaming becuase someone asked us to Disassoc and stay disassociated.
196 eCsrHddIssued, // roaming because an 802.11 request was issued to the driver.
197 eCsrLostLink1, // roaming because we lost link to an associated AP
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800198 eCsrLostLink2,
Jeff Johnson295189b2012-06-20 16:38:30 -0700199 eCsrLostLink3,
200 eCsrForcedDisassocMICFailure, // roaming because we need to force a Disassoc due to MIC failure
201 eCsrHddIssuedReassocToSameAP,
202 eCsrSmeIssuedReassocToSameAP,
203 eCsrSmeIssuedReassocToDiffAP,
204 eCsrForcedDeauth, // roaming becuase someone asked us to deauth and stay disassociated.
205 eCsrSmeIssuedDisassocForHandoff, // will be issued by Handoff logic to disconect from current AP
206 eCsrSmeIssuedAssocToSimilarAP, // will be issued by Handoff logic to join a new AP with same profile
207 eCsrSmeIssuedIbssJoinFailure, // ibss join timer fired before any perr showed up, so shut down the network
208 eCsrForcedIbssLeave,
209 eCsrStopBss,
210 eCsrSmeIssuedFTReassoc,
211 eCsrForcedDisassocSta,
212 eCsrForcedDeauthSta,
Madan Mohan Koyyalamudi286b60e2012-10-11 12:59:07 -0700213 eCsrPerformPreauth,
Venkata Prathyusha Kuntupalli239278b2013-03-26 15:58:18 -0700214 eCsrLostLink1Abort,
215 eCsrLostLink2Abort,
216 eCsrLostLink3Abort,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800217
Jeff Johnson295189b2012-06-20 16:38:30 -0700218}eCsrRoamReason;
219
220typedef enum
221{
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800222 eCSR_ROAM_SUBSTATE_NONE = 0,
223 eCSR_ROAM_SUBSTATE_START_BSS_REQ,
224 eCSR_ROAM_SUBSTATE_JOIN_REQ,
225 eCSR_ROAM_SUBSTATE_REASSOC_REQ,
226 eCSR_ROAM_SUBSTATE_DISASSOC_REQ,
227 eCSR_ROAM_SUBSTATE_STOP_BSS_REQ,
228 eCSR_ROAM_SUBSTATE_DISCONNECT_CONTINUE_ROAMING, //Continue the current roam command after disconnect
229 eCSR_ROAM_SUBSTATE_AUTH_REQ,
230 eCSR_ROAM_SUBSTATE_CONFIG,
231 eCSR_ROAM_SUBSTATE_DEAUTH_REQ,
232 eCSR_ROAM_SUBSTATE_DISASSOC_NOTHING_TO_JOIN,
233 eCSR_ROAM_SUBSTATE_DISASSOC_REASSOC_FAILURE,
234 eCSR_ROAM_SUBSTATE_DISASSOC_FORCED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700235 eCSR_ROAM_SUBSTATE_WAIT_FOR_KEY,
236 eCSR_ROAM_SUBSTATE_DISASSOC_HANDOFF,
237 eCSR_ROAM_SUBSTATE_JOINED_NO_TRAFFIC,
238 eCSR_ROAM_SUBSTATE_JOINED_NON_REALTIME_TRAFFIC,
239 eCSR_ROAM_SUBSTATE_JOINED_REALTIME_TRAFFIC,
240// max is 15 unless the bitfield is expanded...
241} eCsrRoamSubState;
242
243
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800244typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700245{
246 eCSR_ROAMING_STATE_STOP = 0,
247 eCSR_ROAMING_STATE_IDLE,
248 eCSR_ROAMING_STATE_SCANNING,
249 eCSR_ROAMING_STATE_JOINING,
250 eCSR_ROAMING_STATE_JOINED,
251}eCsrRoamState;
252
253
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800254typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700255{
256 eCsrContinueRoaming,
257 eCsrStopRoaming,
258 eCsrStartIbss,
259 eCsrStartIbssSameIbss,
260 eCsrReassocToSelfNoCapChange,
Jeff Johnsone7245742012-09-05 17:12:55 -0700261 eCsrStopRoamingDueToConcurrency,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800262
Jeff Johnson295189b2012-06-20 16:38:30 -0700263}eCsrJoinState;
264
265typedef enum
266{
267 eCsrNotRoaming,
268 eCsrLostlinkRoamingDisassoc,
269 eCsrLostlinkRoamingDeauth,
270 eCsrDynamicRoaming,
271 eCsrReassocRoaming,
272}eCsrRoamingReason;
273
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800274typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700275{
276 eCsrDisassociated,
277 eCsrDeauthenticated
278
279}eCsrRoamWmStatusChangeTypes;
280
281typedef enum
282{
283 eCsrSummaryStats = 0,
284 eCsrGlobalClassAStats,
285 eCsrGlobalClassBStats,
286 eCsrGlobalClassCStats,
287 eCsrGlobalClassDStats,
288 eCsrPerStaStats,
289 eCsrMaxStats
290}eCsrRoamStatsClassTypes;
291
292#ifdef FEATURE_WLAN_DIAG_SUPPORT
293typedef enum
294{
295 eCSR_WLAN_STATUS_CONNECT =0,
296 eCSR_WLAN_STATUS_DISCONNECT
297
298}eCsrDiagWlanStatusEventSubtype;
299
300typedef enum
301{
302 eCSR_REASON_UNSPECIFIED = 0,
303 eCSR_REASON_USER_REQUESTED,
304 eCSR_REASON_MIC_ERROR,
305 eCSR_REASON_DISASSOC,
306 eCSR_REASON_DEAUTH,
307 eCSR_REASON_HANDOFF,
308
309}eCsrDiagWlanStatusEventReason;
310
311typedef enum
312{
313 eCSR_WLAN_HANDOFF_EVENT =0,
314
315}eCsrDiagWlanHandoffEventSubtype;
316
317typedef enum
318{
319 eCSR_WLAN_VCC_EVENT =0,
320
321}eCsrDiagWlanVccEventSubtype;
322
323#endif //FEATURE_WLAN_DIAG_SUPPORT
324
325typedef struct tagCsrChannel
326{
327 tANI_U8 numChannels;
328 tANI_U8 channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
329}tCsrChannel;
330
331typedef struct tagScanProfile
332{
333 tANI_U32 minChnTime;
334 tANI_U32 maxChnTime;
335 tANI_U32 restTime; //This is ignored if not associated
336 tANI_U32 numOfChannels;
337 tANI_U8 *pChannelList;
338 tSirScanType scanType; //active or passive
339 eCsrRoamBssType bssType; //BSS or IBSS
340 tANI_U8 ssid[WNI_CFG_SSID_LEN];
341 tANI_U8 bReturnAfter1stMatch;
342 tANI_U8 fUniqueResult;
343 tANI_U8 freshScan;
344 tCsrBssid bssid;
345}tScanProfile;
346
347typedef struct tagBssConfigParam
348{
349 eCsrMediaAccessType qosType;
350 tSirMacSSid SSID;
351 tANI_U32 uRTSThresh;
352 tANI_U32 uDeferThresh; //
353 eCsrCfgDot11Mode uCfgDot11Mode;
354 eCsrBand eBand;
355 tANI_U8 standardRate[CSR_DOT11_SUPPORTED_RATES_MAX];
356 tANI_U8 extendedRate[CSR_DOT11_EXTENDED_SUPPORTED_RATES_MAX];
357 eCsrExposedTxRate txRate;
358 tAniAuthType authType;
359 eCsrEncryptionType encType;
360 tANI_U32 uShortSlotTime;
361 tANI_U32 uHTSupport; //High throughput
362 tANI_U32 uPowerLimit;
363 tANI_U32 uHeartBeatThresh;
364 tANI_U32 uJoinTimeOut;
365 tSirMacCapabilityInfo BssCap;
366 tANI_BOOLEAN f11hSupport;
Jeff Johnsone7245742012-09-05 17:12:55 -0700367 ePhyChanBondState cbMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700368}tBssConfigParam;
369
370
371typedef struct tagCsrRoamStartBssParams
372{
373 tSirMacSSid ssId;
374 tCsrBssid bssid; //this is the BSSID for the party we want to join (only use for IBSS or WDS)
375 tSirNwType sirNwType;
Jeff Johnsone7245742012-09-05 17:12:55 -0700376 ePhyChanBondState cbMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700377 tSirMacRateSet operationalRateSet;
378 tSirMacRateSet extendedRateSet;
379 tANI_U8 operationChn;
380 eCsrCfgDot11Mode uCfgDot11Mode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700381 tANI_U8 privacy;
382 tANI_BOOLEAN fwdWPSPBCProbeReq;
383 tANI_BOOLEAN protEnabled;
384 tANI_BOOLEAN obssProtEnabled;
385 tAniAuthType authType;
386 tANI_U16 beaconInterval; //If this is 0, SME will fill in for caller.
387 tANI_U16 ht_protection;
388 tANI_U32 dtimPeriod;
389 tANI_U8 ApUapsdEnable;
390 tANI_U8 ssidHidden;
391 tANI_U8 wps_state;
Jeff Johnson295189b2012-06-20 16:38:30 -0700392 tVOS_CON_MODE bssPersona;
393 tANI_U16 nRSNIELength; //The byte count in the pRSNIE, if 0, pRSNIE is ignored.
394 tANI_U8 *pRSNIE; //If not null, it has the IE byte stream for RSN
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800395 tANI_BOOLEAN updatebeaconInterval; //Flag used to indicate update
396 // beaconInterval
Jeff Johnson295189b2012-06-20 16:38:30 -0700397}tCsrRoamStartBssParams;
398
399
400typedef struct tagScanCmd
401{
402 tANI_U32 scanID;
403 csrScanCompleteCallback callback;
404 void *pContext;
405 eCsrScanReason reason;
406 eCsrRoamState lastRoamState[CSR_ROAM_SESSION_MAX];
407 tCsrRoamProfile *pToRoamProfile;
408 tANI_U32 roamId; //this is the ID related to the pToRoamProfile
409 union
410 {
411 tCsrScanRequest scanRequest;
412 tCsrBGScanRequest bgScanRequest;
413 }u;
414}tScanCmd;
415
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800416typedef struct tagRoamCmd
Jeff Johnson295189b2012-06-20 16:38:30 -0700417{
418 tANI_U32 roamId;
419 eCsrRoamReason roamReason;
420 tCsrRoamProfile roamProfile;
421 tScanResultHandle hBSSList; //BSS list fits the profile
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800422 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 -0700423 tSirBssDescription *pLastRoamBss; //the last BSS we try and failed
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800424 tANI_BOOLEAN fReleaseBssList; //whether to free hBSSList
Jeff Johnson295189b2012-06-20 16:38:30 -0700425 tANI_BOOLEAN fReleaseProfile; //whether to free roamProfile
426 tANI_BOOLEAN fReassoc; //whether this command is for reassociation
427 tANI_BOOLEAN fUpdateCurRoamProfile; //whether pMac->roam.pCurRoamProfile needs to be updated
428 //this is for CSR internal used only. And it should not be assigned when creating the command
429 //This causes the roam command not to do anything.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800430 tANI_BOOLEAN fReassocToSelfNoCapChange;
Jeff Johnson295189b2012-06-20 16:38:30 -0700431
432 tANI_BOOLEAN fStopWds;
433 tSirMacAddr peerMac;
434 tSirMacReasonCodes reason;
435}tRoamCmd;
436
437typedef struct tagSetKeyCmd
438{
439 tANI_U32 roamId;
440 eCsrEncryptionType encType;
441 eCsrAuthType authType;
442 tAniKeyDirection keyDirection; //Tx, Rx or Tx-and-Rx
443 tSirMacAddr peerMac; //Peer's MAC address. ALL 1's for group key
444 tANI_U8 paeRole; //0 for supplicant
445 tANI_U8 keyId; // Kye index
446 tANI_U8 keyLength; //Number of bytes containing the key in pKey
447 tANI_U8 Key[CSR_MAX_KEY_LEN];
448 tANI_U8 keyRsc[CSR_MAX_RSC_LEN];
449} tSetKeyCmd;
450
451typedef struct tahRemoveKeyCmd
452{
453 tANI_U32 roamId;
454 eCsrEncryptionType encType;
455 eCsrAuthType authType;
456 tSirMacAddr peerMac; //Peer's MAC address. ALL 1's for group key
457 tANI_U8 keyId; //key index
458} tRemoveKeyCmd;
459
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800460typedef struct tagWmStatusChangeCmd
Jeff Johnson295189b2012-06-20 16:38:30 -0700461{
462 eCsrRoamWmStatusChangeTypes Type;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800463 union
464 {
Jeff Johnson295189b2012-06-20 16:38:30 -0700465 tSirSmeDeauthInd DeauthIndMsg;
466 tSirSmeDisassocInd DisassocIndMsg;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800467 }u;
Jeff Johnson295189b2012-06-20 16:38:30 -0700468
469}tWmStatusChangeCmd;
470
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700471
Jeff Johnson295189b2012-06-20 16:38:30 -0700472typedef struct tagAddStaForSessionCmd
473{
474 //Session self mac addr
475 tSirMacAddr selfMacAddr;
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700476 tVOS_CON_MODE currDeviceMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700477}tAddStaForSessionCmd;
478
479typedef struct tagDelStaForSessionCmd
480{
481 //Session self mac addr
482 tSirMacAddr selfMacAddr;
483 csrRoamSessionCloseCallback callback;
484 void *pContext;
485}tDelStaForSessionCmd;
486
487//This structure represents one scan request
488typedef struct tagCsrCmd
489{
490 tListElem Link;
491 eCsrRoamCommands command;
492 tANI_U8 sessionId; // Session ID for this command
493 union
494 {
495 tScanCmd scanCmd;
496 tRoamCmd roamCmd;
497 tWmStatusChangeCmd wmStatusChangeCmd;
498 tSetKeyCmd setKeyCmd;
499 tRemoveKeyCmd removeKeyCmd;
500 tAddStaForSessionCmd addStaSessionCmd;
501 tDelStaForSessionCmd delStaSessionCmd;
502 }u;
503}tCsrCmd;
504
505#ifdef WLAN_FEATURE_VOWIFI_11R
506typedef struct tagCsr11rConfig
507{
508 tANI_BOOLEAN IsFTResourceReqSupported;
509} tCsr11rConfig;
510#endif
511
512#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
513typedef struct tagCsrNeighborRoamConfig
514{
515 tANI_U32 nNeighborScanTimerPeriod;
516 tANI_U8 nNeighborLookupRssiThreshold;
517 tANI_U8 nNeighborReassocRssiThreshold;
518 tANI_U16 nNeighborScanMinChanTime;
519 tANI_U16 nNeighborScanMaxChanTime;
520 sCsrChannel neighborScanChanList;
521 tANI_U8 nMaxNeighborRetries;
522 tANI_U16 nNeighborResultsRefreshPeriod;
Srinivas Girigowdade697412013-02-14 16:31:48 -0800523 tANI_U16 nEmptyScanRefreshPeriod;
Jeff Johnson295189b2012-06-20 16:38:30 -0700524}tCsrNeighborRoamConfig;
525#endif
526
527typedef struct tagCsrConfig
528{
529 tANI_U32 agingCount;
530 tANI_U32 FragmentationThreshold;
531 tANI_U32 channelBondingMode24GHz;
532 tANI_U32 channelBondingMode5GHz;
533 tANI_U32 RTSThreshold;
534 eCsrPhyMode phyMode;
535 eCsrCfgDot11Mode uCfgDot11Mode;
536 eCsrBand eBand;
537 tANI_U32 HeartbeatThresh50;
538 tANI_U32 HeartbeatThresh24;
539 tANI_U32 bgScanInterval;
540 eCsrCBChoice cbChoice;
541 eCsrBand bandCapability; //indicate hw capability
542 eCsrRoamWmmUserModeType WMMSupportMode;
543 tANI_BOOLEAN Is11eSupportEnabled;
544 tANI_BOOLEAN Is11dSupportEnabled;
545 tANI_BOOLEAN Is11dSupportEnabledOriginal;
546 tANI_BOOLEAN Is11hSupportEnabled;
547 tANI_BOOLEAN shortSlotTime;
548 tANI_BOOLEAN ProprietaryRatesEnabled;
549 tANI_BOOLEAN fenableMCCMode;
550 tANI_U16 TxRate;
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -0800551 tANI_U8 fAllowMCCGODiffBI;
Jeff Johnson295189b2012-06-20 16:38:30 -0700552 tANI_U8 AdHocChannel24;
553 tANI_U8 AdHocChannel5G;
554 tANI_U32 impsSleepTime; //in units of microseconds
555 tANI_U32 scanAgeTimeNCNPS; //scan result aging time threshold when Not-Connect-No-Power-Save, in seconds
556 tANI_U32 scanAgeTimeNCPS; //scan result aging time threshold when Not-Connect-Power-Save, in seconds
557 tANI_U32 scanAgeTimeCNPS; //scan result aging time threshold when Connect-No-Power-Save, in seconds,
558 tANI_U32 scanAgeTimeCPS; //scan result aging time threshold when Connect-Power-Savein seconds
559 tANI_U32 BssPreferValue[CSR_NUM_RSSI_CAT]; //each RSSI category has one value
560 int RSSICat[CSR_NUM_RSSI_CAT];
561 tANI_U8 bCatRssiOffset; //to set the RSSI difference for each category
562 tANI_U32 nRoamingTime; //In seconds, CSR will try this long before gives up, 0 means no roaming
563 //Whether to limit the channels to the ones set in Csr11dInfo. If true, the opertaional
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800564 //channels are limited to the default channel list. It is an "AND" operation between the
Jeff Johnson295189b2012-06-20 16:38:30 -0700565 //default channels and the channels in the 802.11d IE.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800566 tANI_BOOLEAN fEnforce11dChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -0700567 //Country Code Priority
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800568 //0 = 802.11D > Configured Country > NV
Jeff Johnson295189b2012-06-20 16:38:30 -0700569 //1 = Configured Country > 802.11D > NV
570 tANI_BOOLEAN fSupplicantCountryCodeHasPriority;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800571 //When true, AP with unknown country code won't be see.
572 //"Unknown country code" means either Ap doesn't have 11d IE or we cannot
Jeff Johnson295189b2012-06-20 16:38:30 -0700573 //find a domain for the country code in its 11d IE.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800574 tANI_BOOLEAN fEnforceCountryCodeMatch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700575 //When true, only APs in the default domain can be seen. If the Ap has "unknown country
576 //code", or the doamin of the country code doesn't match the default domain, the Ap is
577 //not acceptable.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800578 tANI_BOOLEAN fEnforceDefaultDomain;
Jeff Johnson295189b2012-06-20 16:38:30 -0700579
580 tANI_U16 vccRssiThreshold;
581 tANI_U32 vccUlMacLossThreshold;
582
583 tANI_U32 nPassiveMinChnTime; //in units of milliseconds
584 tANI_U32 nPassiveMaxChnTime; //in units of milliseconds
585 tANI_U32 nActiveMinChnTime; //in units of milliseconds
586 tANI_U32 nActiveMaxChnTime; //in units of milliseconds
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800587
588 tANI_U32 nActiveMinChnTimeBtc; //in units of milliseconds
589 tANI_U32 nActiveMaxChnTimeBtc; //in units of milliseconds
Kiran Kumar Lokere458d7322013-05-29 14:29:43 -0700590 tANI_U8 disableAggWithBtc;
Madan Mohan Koyyalamudi4ff9cd62012-10-30 17:48:57 -0700591#ifdef WLAN_AP_STA_CONCURRENCY
592 tANI_U32 nPassiveMinChnTimeConc; //in units of milliseconds
593 tANI_U32 nPassiveMaxChnTimeConc; //in units of milliseconds
594 tANI_U32 nActiveMinChnTimeConc; //in units of milliseconds
595 tANI_U32 nActiveMaxChnTimeConc; //in units of milliseconds
596 tANI_U32 nRestTimeConc; //in units of milliseconds
Sudhir Sattayappa Kohallieb97d502013-05-22 23:16:42 -0700597 tANI_U8 nNumStaChanCombinedConc; //number of channels combined for
598 //Sta in each split scan operation
599 tANI_U8 nNumP2PChanCombinedConc; //number of channels combined for
600 //P2P in each split scan operation
Madan Mohan Koyyalamudi4ff9cd62012-10-30 17:48:57 -0700601#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700602
603 tANI_BOOLEAN IsIdleScanEnabled;
604 //in dBm, the maximum TX power
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800605 //The actual TX power is the lesser of this value and 11d.
Jeff Johnson295189b2012-06-20 16:38:30 -0700606 //If 11d is disable, the lesser of this and default setting.
607 tANI_U8 nTxPowerCap;
608 tANI_U32 statsReqPeriodicity; //stats request frequency from PE while in full power
609 tANI_U32 statsReqPeriodicityInPS;//stats request frequency from PE while in power save
Jeff Johnson295189b2012-06-20 16:38:30 -0700610 tANI_U32 dtimPeriod;
611 tANI_BOOLEAN ssidHidden;
Jeff Johnson295189b2012-06-20 16:38:30 -0700612
613#ifdef WLAN_FEATURE_VOWIFI_11R
614 tCsr11rConfig csr11rConfig;
615#endif
616
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700617#ifdef FEATURE_WLAN_LFR
Srinivas Girigowda830bbd02013-06-13 19:44:16 -0700618 tANI_U8 isFastRoamIniFeatureEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -0800619 tANI_U8 MAWCEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700620#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Srinivas Girigowda830bbd02013-06-13 19:44:16 -0700621 tANI_U8 isRoamOffloadScanEnabled;
622 tANI_BOOLEAN bFastRoamInConIniFeatureEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700623#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700624#endif
625
Jeff Johnson295189b2012-06-20 16:38:30 -0700626#ifdef FEATURE_WLAN_CCX
627 tANI_U8 isCcxIniFeatureEnabled;
628#endif
629
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700630#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700631 tANI_U8 isFastTransitionEnabled;
632 tANI_U8 RoamRssiDiff;
633 tANI_U8 nImmediateRoamRssiDiff;
634 tANI_BOOLEAN nRoamPrefer5GHz;
635 tANI_BOOLEAN nRoamIntraBand;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -0700636 tANI_BOOLEAN isWESModeEnabled;
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700637 tANI_BOOLEAN nRoamScanControl;
Varun Reddy Yeturu920df212013-05-22 08:07:23 -0700638 tANI_U8 nProbes;
639 tANI_U16 nRoamScanHomeAwayTime;
Jeff Johnson295189b2012-06-20 16:38:30 -0700640#endif
641
642#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
643 tCsrNeighborRoamConfig neighborRoamConfig;
644#endif
645
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800646 /* Instead of Reassoc, send ADDTS/DELTS even when ACM is off for that AC
Jeff Johnson295189b2012-06-20 16:38:30 -0700647 * This is mandated by WMM-AC certification */
648 tANI_BOOLEAN addTSWhenACMIsOff;
649
650 tANI_BOOLEAN fValidateList;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800651 //Remove this code once SLM_Sessionization is supported
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -0700652 //BMPS_WORKAROUND_NOT_NEEDED
Jeff Johnsone7245742012-09-05 17:12:55 -0700653 tANI_BOOLEAN doBMPSWorkaround;
Jeff Johnson295189b2012-06-20 16:38:30 -0700654
655 //To enable/disable scanning 2.4Ghz channels twice on a single scan request from HDD
656 tANI_BOOLEAN fScanTwice;
Jeff Johnsone7245742012-09-05 17:12:55 -0700657#ifdef WLAN_FEATURE_11AC
658 tANI_U32 nVhtChannelWidth;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -0800659 tANI_U8 txBFEnable;
Shailender Karmuchicc3fe442013-02-16 18:18:33 -0800660 tANI_U8 txBFCsnValue;
Ravi Joshi83bfaa12013-05-28 22:12:08 -0700661 tANI_BOOLEAN enableVhtFor24GHz;
Jeff Johnsone7245742012-09-05 17:12:55 -0700662#endif
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -0800663 tANI_U8 txLdpcEnable;
Jeff Johnson295189b2012-06-20 16:38:30 -0700664
Ravi Joshid2ca7c42013-07-23 08:37:49 -0700665 /*
666 * Enable/Disable heartbeat offload
667 */
668 tANI_BOOLEAN enableHeartBeatOffload;
krunal soni5afa96c2013-09-06 22:19:02 -0700669 tANI_U8 isAmsduSupportInAMPDU;
Srinivas Girigowda41c7c5f2013-10-21 19:01:38 -0700670 tANI_U8 nSelect5GHzMargin;
krunal sonie9002db2013-11-25 14:24:17 -0800671 tANI_U8 isCoalesingInIBSSAllowed;
Jeff Johnson295189b2012-06-20 16:38:30 -0700672}tCsrConfig;
673
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800674typedef struct tagCsrChannelPowerInfo
Jeff Johnson295189b2012-06-20 16:38:30 -0700675{
676 tListElem link;
677 tANI_U8 firstChannel;
678 tANI_U8 numChannels;
679 tANI_U8 txPower;
680 tANI_U8 interChannelOffset;
681}tCsrChannelPowerInfo;
682
683typedef struct tagRoamJoinStatus
684{
685 tSirResultCodes statusCode;
686 //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 -0800687 tANI_U32 reasonCode;
Kiran Kumar Lokerec8550fa2013-04-15 22:23:00 -0700688 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -0700689}tCsrRoamJoinStatus;
690
691typedef struct tagCsrOsChannelMask
692{
693 tANI_U8 numChannels;
694 tANI_BOOLEAN scanEnabled[WNI_CFG_VALID_CHANNEL_LIST_LEN];
695 tANI_U8 channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
696}tCsrOsChannelMask;
697
698
699typedef struct tagCsrScanStruct
700{
701 tScanProfile scanProfile;
702 tANI_U32 nextScanID;
Madan Mohan Koyyalamudica43cdf2012-09-24 13:15:49 -0700703 tDblLinkList scanResultList;
Jeff Johnson295189b2012-06-20 16:38:30 -0700704 tDblLinkList tempScanResults;
705 tANI_BOOLEAN fScanEnable;
706 tANI_BOOLEAN fFullScanIssued;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530707 vos_timer_t hTimerGetResult;
Jeff Johnson295189b2012-06-20 16:38:30 -0700708#ifdef WLAN_AP_STA_CONCURRENCY
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530709 vos_timer_t hTimerStaApConcTimer;
Jeff Johnson295189b2012-06-20 16:38:30 -0700710#endif
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530711 vos_timer_t hTimerIdleScan;
712 vos_timer_t hTimerResultAging;
713 vos_timer_t hTimerResultCfgAging;
Jeff Johnson295189b2012-06-20 16:38:30 -0700714 tPalTimerHandle hTimerBgScan;
715 //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 -0800716 tANI_U8 channelOf11dInfo;
717 tANI_U8 scanResultCfgAgingTime;
Jeff Johnson295189b2012-06-20 16:38:30 -0700718 //changes on every scan, a flag to tell whether conflict 11d info found on each BSS
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800719 tANI_BOOLEAN fAmbiguous11dInfoFound;
Jeff Johnson295189b2012-06-20 16:38:30 -0700720 //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 -0800721 tANI_BOOLEAN fCurrent11dInfoMatch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700722 tANI_BOOLEAN f11dInfoReset; //to indicate whether the 11d info in CFG is reset to default
723 tSirScanType curScanType;
724 tCsrChannel baseChannels; //This are all the supported channels AND(&) to the current eBand
725 tCsrChannel channels11d;
726 tChannelListWithPower defaultPowerTable[WNI_CFG_VALID_CHANNEL_LIST_LEN]; //From NV
727 tChannelListWithPower defaultPowerTable40MHz[WNI_CFG_VALID_CHANNEL_LIST_LEN]; //From NV
728 tANI_U32 numChannelsDefault; //total channels of NV
729 tCsrChannel base20MHzChannels; //The channel base to work on
730 tCsrChannel base40MHzChannels; //center channels for 40MHz channels
731 tDblLinkList channelPowerInfoList24;
732 tDblLinkList channelPowerInfoList5G;
733 tANI_U32 nLastAgeTimeOut;
734 tANI_U32 nAgingCountDown;
Gopichand Nakkala114718f2013-03-25 19:19:46 -0700735 tANI_U8 countryCodeDefault[WNI_CFG_COUNTRY_CODE_LEN]; //The country code from NV
736 tANI_U8 countryCodeCurrent[WNI_CFG_COUNTRY_CODE_LEN];
737 tANI_U8 countryCode11d[WNI_CFG_COUNTRY_CODE_LEN];
Jeff Johnson295189b2012-06-20 16:38:30 -0700738 v_REGDOMAIN_t domainIdDefault; //default regulatory domain
739 v_REGDOMAIN_t domainIdCurrent; //current regulatory domain
Agarwal Ashishd9d72602013-09-13 00:06:17 +0530740 tCsrBssid currentCountryBssid; // Bssid for current country code
Jeff Johnson295189b2012-06-20 16:38:30 -0700741 tANI_BOOLEAN f11dInfoApplied;
742 tANI_BOOLEAN fCancelIdleScan;
743#ifdef FEATURE_WLAN_WAPI
744// tANI_U16 NumBkidCandidate;
745// tBkidCandidateInfo BkidCandidateInfo[CSR_MAX_BKID_ALLOWED]; /* Move this as part of SessionEntry */
746#endif /* FEATURE_WLAN_WAPI */
747 tANI_U8 numBGScanChannel; //number of valid channels in the bgScanChannelList
748 tANI_U8 bgScanChannelList[WNI_CFG_BG_SCAN_CHANNEL_LIST_LEN];
749 //the ChannelInfo member is not used in this structure.
750 //numBGScanChannel and bgScanChannelList are used for the BG scan channel info
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800751 tCsrBGScanRequest bgScanParams;
Jeff Johnson295189b2012-06-20 16:38:30 -0700752 tANI_BOOLEAN fRestartIdleScan;
753 tANI_U32 nIdleScanTimeGap; //the time since last trying to trigger idle scan
754 tCsrOsChannelMask osScanChannelMask;//keep a track of channels to be scnned while in traffic condition
755 tANI_U16 nBssLimit; //the maximum number of BSS in scan cache
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800756 /*channelPowerInfoList24 has been seen corrupted. Set this flag to true trying to
Jeff Johnson295189b2012-06-20 16:38:30 -0700757 * detect when it happens. Adding this into code because we can't reproduce it easily.
758 * We don't know when it happens. */
759 tANI_BOOLEAN fValidateList;
760 /*Customer wants to start with an active scan based on the default country code.
761 * This optimization will minimize the driver load to association time.
762 * Based on this flag we will bypass the initial passive scan needed for 11d
763 * to determine the country code & domain */
764 tANI_BOOLEAN fEnableBypass11d;
765
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800766 /*Customer wants to optimize the scan time. Avoiding scans(passive) on DFS
767 * channels while swipping through both bands can save some time
Jeff Johnson295189b2012-06-20 16:38:30 -0700768 * (apprx 1.3 sec) */
769 tANI_BOOLEAN fEnableDFSChnlScan;
770
Jeff Johnsone7245742012-09-05 17:12:55 -0700771 /*
772 * To enable/disable scanning only 2.4Ghz channels on first scan
773 */
774 tANI_BOOLEAN fFirstScanOnly2GChnl;
775
Jeff Johnson295189b2012-06-20 16:38:30 -0700776 tANI_BOOLEAN fDropScanCmd; //true means we don't accept scan commands
777
778#ifdef WLAN_AP_STA_CONCURRENCY
779 tDblLinkList scanCmdPendingList;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800780#endif
Madan Mohan Koyyalamudi470d2cf2012-09-28 14:43:44 -0700781 tCsrChannel occupiedChannels; //This includes all channels on which candidate APs are found
Srinivas Girigowda41c7c5f2013-10-21 19:01:38 -0700782 tANI_S8 inScanResultBestAPRssi;
Mihir Shetefc7ff5b2014-01-27 11:30:05 +0530783
784 csrScanCompleteCallback callback11dScanDone;
Jeff Johnson295189b2012-06-20 16:38:30 -0700785}tCsrScanStruct;
786
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800787#ifdef FEATURE_WLAN_TDLS_INTERNAL
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800788/*
789 * struct to carry TDLS discovery info..
790 */
791typedef struct sCsrTdlsContext
792{
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800793 tDblLinkList tdlsPotentialPeerList ;
794 tANI_U16 tdlsCommonFlag ;
795 tANI_U16 tdlsCommonState ;
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800796 tANI_U16 tdlsPeerCount ;
797}tCsrTdlsCtxStruct;
798
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800799typedef struct sCsrTdlsPeerLinkInfo
800{
801 tListElem tdlsPeerStaLink ;
802 tSirTdlsPeerInfo tdlsDisPeerInfo ;
803}tCsrTdlsPeerLinkinfo ;
804#endif
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800805
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800806
807
Jeff Johnson295189b2012-06-20 16:38:30 -0700808
809//Save the connected information. This structure + connectedProfile
810//should contain all information about the connection
811typedef struct tagRoamCsrConnectedInfo
812{
813 tANI_U32 nBeaconLength; //the length, in bytes, of the beacon frame, can be 0
814 tANI_U32 nAssocReqLength; //the length, in bytes, of the assoc req frame, can be 0
815 tANI_U32 nAssocRspLength; //The length, in bytes, of the assoc rsp frame, can be 0
816#ifdef WLAN_FEATURE_VOWIFI_11R
817 tANI_U32 nRICRspLength; //Length of the parsed RIC response IEs received in reassoc response
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800818#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700819#ifdef FEATURE_WLAN_CCX
820 tANI_U32 nTspecIeLength;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800821#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700822 tANI_U8 *pbFrames; //Point to a buffer contain the beacon, assoc req, assoc rsp frame, in that order
823 //user needs to use nBeaconLength, nAssocReqLength, nAssocRspLength to desice where
824 //each frame starts and ends.
825 tANI_U8 staId;
826}tCsrRoamConnectedInfo;
827
828
829typedef struct tagCsrLinkQualityIndInfo
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800830{
Jeff Johnson295189b2012-06-20 16:38:30 -0700831 csrRoamLinkQualityIndCallback callback;
832 void *context;
833}tCsrLinkQualityIndInfo;
834
835typedef struct tagCsrPeStatsReqInfo
836{
837 tListElem link; /* list links */
838 tANI_U32 statsMask;
839 tANI_U32 periodicity;
840 tANI_BOOLEAN rspPending;
841 vos_timer_t hPeStatsTimer;
842 tANI_BOOLEAN timerRunning;
843 tANI_U8 staId;
844 tANI_U8 numClient;
845 tpAniSirGlobal pMac;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800846 /* To remember if the peStats timer is stopped successfully or not */
Jeff Johnson295189b2012-06-20 16:38:30 -0700847 tANI_BOOLEAN timerStopFailed;
848
849}tCsrPeStatsReqInfo;
850
851typedef struct tagCsrStatsClientReqInfo
852{
853 tListElem link; /* list links */
854 eCsrStatsRequesterType requesterId;
855 tCsrStatsCallback callback;
856 tANI_U32 periodicity;
857 void *pContext;
858 tANI_U32 statsMask;
859 tCsrPeStatsReqInfo *pPeStaEntry;
860 tANI_U8 staId;
861 vos_timer_t timer;
862 tANI_BOOLEAN timerExpired;
863 tpAniSirGlobal pMac; // TODO: Confirm this change BTAMP
864}tCsrStatsClientReqInfo;
865
866typedef struct tagCsrTlStatsReqInfo
867{
868 tANI_U32 periodicity;
869 tANI_BOOLEAN timerRunning;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530870 vos_timer_t hTlStatsTimer;
Jeff Johnson295189b2012-06-20 16:38:30 -0700871 tANI_U8 numClient;
872}tCsrTlStatsReqInfo;
873
874typedef struct tagCsrRoamSession
875{
876 tANI_U8 sessionId; // Session ID
877 tANI_BOOLEAN sessionActive; // TRUE if it is used
878 tCsrBssid selfMacAddr; // For BT-AMP station, this serve as BSSID for self-BSS.
879 csrRoamCompleteCallback callback;
880 void *pContext;
881 eCsrConnectState connectState;
882 tCsrRoamConnectedProfile connectedProfile;
883 tCsrRoamConnectedInfo connectedInfo;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800884 tCsrRoamProfile *pCurRoamProfile;
Jeff Johnson295189b2012-06-20 16:38:30 -0700885 tSirBssDescription *pConnectBssDesc;
886 tANI_U16 NumPmkidCache;
887 tPmkidCacheInfo PmkidCacheInfo[CSR_MAX_PMKID_ALLOWED];
888 tANI_U8 cJoinAttemps;
889 //This may or may not have the up-to-date valid channel list
890 //It is used to get WNI_CFG_VALID_CHANNEL_LIST and not allocate memory all the time
891 tSirMacChanNum validChannelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
892 tANI_S32 sPendingCommands; //0 means CSR is ok to low power
893#ifdef FEATURE_WLAN_WAPI
894 tANI_U16 NumBkidCache;
895 tBkidCacheInfo BkidCacheInfo[CSR_MAX_BKID_ALLOWED];
896#endif /* FEATURE_WLAN_WAPI */
897 tANI_BOOLEAN fRoaming; //indicate whether CSR is roaming (either via lostlink or dynamic roaming)
898 //to remember some parameters needed for START_BSS.
899 //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 -0800900 tCsrRoamStartBssParams bssParams;
Jeff Johnson295189b2012-06-20 16:38:30 -0700901 tANI_U32 nWpaRsnReqIeLength; //the byte count of pWpaRsnIE;
902 tANI_U8 *pWpaRsnReqIE; //this contain the WPA/RSN IE in assoc request or the one sent in beacon (IBSS)
903 tANI_U32 nWpaRsnRspIeLength; //the byte count for pWpaRsnRspIE
904 tANI_U8 *pWpaRsnRspIE; //this contain the WPA/RSN IE in beacon/probe rsp
905#ifdef FEATURE_WLAN_WAPI
906 tANI_U32 nWapiReqIeLength; //the byte count of pWapiReqIE;
907 tANI_U8 *pWapiReqIE; //this contain the WAPI IE in assoc request or the one sent in beacon (IBSS)
908 tANI_U32 nWapiRspIeLength; //the byte count for pWapiRspIE
909 tANI_U8 *pWapiRspIE; //this contain the WAPI IE in beacon/probe rsp
910#endif /* FEATURE_WLAN_WAPI */
Agarwal Ashish4f616132013-12-30 23:32:50 +0530911 tANI_U32 nAddIEScanLength; //length of addIeScan
912 /* This contains the additional IE in (unicast)
913 * probe request at the time of join
914 */
915 tANI_U8 addIEScan[SIR_MAC_MAX_IE_LENGTH+2];
Jeff Johnson295189b2012-06-20 16:38:30 -0700916 tANI_U32 nAddIEAssocLength; //the byte count for pAddIeAssocIE
917 tANI_U8 *pAddIEAssoc; //this contains the additional IE in (re) assoc request
918
919 tANI_TIMESTAMP roamingStartTime; //in units of 10ms
920 tCsrTimerInfo roamingTimerInfo;
921 eCsrRoamingReason roamingReason;
922 tANI_BOOLEAN fCancelRoaming;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530923 vos_timer_t hTimerRoaming;
Jeff Johnson295189b2012-06-20 16:38:30 -0700924 eCsrRoamResult roamResult; //the roamResult that is used when the roaming timer fires
925 tCsrRoamJoinStatus joinFailStatusCode; //This is the reason code for join(assoc) failure
926 //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 -0800927 tANI_U32 roamingStatusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700928 tANI_U16 NumPmkidCandidate;
929 tPmkidCandidateInfo PmkidCandidateInfo[CSR_MAX_PMKID_ALLOWED];
930 #ifdef FEATURE_WLAN_WAPI
931 tANI_U16 NumBkidCandidate;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800932 tBkidCandidateInfo BkidCandidateInfo[CSR_MAX_BKID_ALLOWED];
Jeff Johnson295189b2012-06-20 16:38:30 -0700933#endif
934 tANI_BOOLEAN fWMMConnection;
Sandeep Puligillaaea98a22013-12-04 13:36:32 +0530935 tANI_BOOLEAN fQOSConnection;
936
Jeff Johnson295189b2012-06-20 16:38:30 -0700937#ifdef FEATURE_WLAN_BTAMP_UT_RF
938 //To retry a join later when it fails if so desired
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530939 vos_timer_t hTimerJoinRetry;
Jeff Johnson295189b2012-06-20 16:38:30 -0700940 tCsrTimerInfo joinRetryTimerInfo;
941 tANI_U32 maxRetryCount;
942#endif
943#ifdef FEATURE_WLAN_CCX
944 tCsrCcxCckmInfo ccxCckmInfo;
945 tANI_BOOLEAN isPrevApInfoValid;
946 tSirMacSSid prevApSSID;
947 tCsrBssid prevApBssid;
948 tANI_U8 prevOpChannel;
949 tANI_U16 clientDissSecs;
950 tANI_U32 roamTS1;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700951#if defined(FEATURE_WLAN_CCX_UPLOAD)
952 tCsrCcxCckmIe suppCckmIeInfo;
953#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700954#endif
955 tANI_U8 bRefAssocStartCnt; //Tracking assoc start indication
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800956 /* to force the AP initiate fresh 802.1x authentication after re-association need to clear
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700957 * the PMKID cache. To clear the cache in this particular case this is added
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800958 * it is needed by the HS 2.0 passpoint certification 5.2.a and b testcases */
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700959 tANI_BOOLEAN fIgnorePMKIDCache;
Jeff Johnson295189b2012-06-20 16:38:30 -0700960} tCsrRoamSession;
961
962typedef struct tagCsrRoamStruct
963{
964 tANI_U32 nextRoamId;
965 tDblLinkList roamCmdPendingList;
966 tDblLinkList channelList5G;
967 tDblLinkList channelList24;
968 tCsrConfig configParam;
969 tANI_U32 numChannelsEeprom; //total channels of eeprom
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800970 tCsrChannel base20MHzChannels; //The channel base to work on
971 tCsrChannel base40MHzChannels; //center channels for 40MHz channels
972 eCsrRoamState curState[CSR_ROAM_SESSION_MAX];
Jeff Johnson295189b2012-06-20 16:38:30 -0700973 eCsrRoamSubState curSubState[CSR_ROAM_SESSION_MAX];
974 //This may or may not have the up-to-date valid channel list
975 //It is used to get WNI_CFG_VALID_CHANNEL_LIST and not allocate memory all the time
976 tSirMacChanNum validChannelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
977 tANI_U32 numValidChannels; //total number of channels in CFG
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800978
Jeff Johnson295189b2012-06-20 16:38:30 -0700979 tANI_S32 sPendingCommands;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530980 vos_timer_t hTimerWaitForKey; //To support timeout for WaitForKey state
Jeff Johnson295189b2012-06-20 16:38:30 -0700981 tCsrSummaryStatsInfo summaryStatsInfo;
982 tCsrGlobalClassAStatsInfo classAStatsInfo;
983 tCsrGlobalClassBStatsInfo classBStatsInfo;
984 tCsrGlobalClassCStatsInfo classCStatsInfo;
985 tCsrGlobalClassDStatsInfo classDStatsInfo;
986 tCsrPerStaStatsInfo perStaStatsInfo[CSR_MAX_STA];
987 tDblLinkList statsClientReqList;
988 tDblLinkList peStatsReqList;
989 tCsrTlStatsReqInfo tlStatsReqInfo;
990 eCsrRoamLinkQualityInd vccLinkQuality;
991 tCsrLinkQualityIndInfo linkQualityIndInfo;
992 v_CONTEXT_t gVosContext; //used for interaction with TL
993 //To specify whether an association or a IBSS is WMM enabled
994 //This parameter is only valid during a join or start BSS command is being executed
995 //tANI_BOOLEAN fWMMConnection; /* Moving it to be part of roamsession */
996 v_U8_t ucACWeights[WLANTL_MAX_AC];
997 /* TODO : Upto here */
998 tCsrTimerInfo WaitForKeyTimerInfo;
999 tCsrRoamSession *roamSession;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001000 tANI_U32 transactionId; // Current transaction ID for internal use.
1001#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Jeff Johnson295189b2012-06-20 16:38:30 -07001002 tCsrNeighborRoamControlInfo neighborRoamInfo;
1003#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001004#ifdef FEATURE_WLAN_LFR
1005 tANI_U8 isFastRoamIniFeatureEnabled;
1006#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001007#ifdef FEATURE_WLAN_CCX
1008 tANI_U8 isCcxIniFeatureEnabled;
1009#endif
Jeff Johnson43971f52012-07-17 12:26:56 -07001010#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -07001011 tANI_U8 RoamRssiDiff;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07001012 tANI_BOOLEAN isWESModeEnabled;
Jeff Johnson43971f52012-07-17 12:26:56 -07001013#endif
Leela Venkata Kiran Kumar Reddy Chirala56df73f2014-01-30 14:18:00 -08001014 tANI_U32 deauthRspStatus;
Jeff Johnson295189b2012-06-20 16:38:30 -07001015}tCsrRoamStruct;
1016
1017
1018#define GET_NEXT_ROAM_ID(pRoamStruct) (((pRoamStruct)->nextRoamId + 1 == 0) ? 1 : (pRoamStruct)->nextRoamId)
1019#define CSR_IS_ROAM_STATE(pMac, state, sessionId) ( (state) == (pMac)->roam.curState[sessionId] )
1020
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001021#define CSR_IS_ROAM_STOP(pMac, sessionId) CSR_IS_ROAM_STATE( (pMac), eCSR_ROAMING_STATE_STOP, sessionId )
1022#define CSR_IS_ROAM_INIT(pMac, sessionId) CSR_IS_ROAM_STATE( (pMac), eCSR_ROAMING_STATE_INIT, sessionId )
Jeff Johnson295189b2012-06-20 16:38:30 -07001023#define CSR_IS_ROAM_SCANNING(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_SCANNING, sessionId )
1024#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 -08001025#define CSR_IS_ROAM_IDLE(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_IDLE, sessionId )
Jeff Johnson295189b2012-06-20 16:38:30 -07001026#define CSR_IS_ROAM_JOINED(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_JOINED, sessionId )
1027
1028#define CSR_IS_ROAM_SUBSTATE(pMac, subState, sessionId) ((subState) == (pMac)->roam.curSubState[sessionId])
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001029#define CSR_IS_ROAM_SUBSTATE_JOIN_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOIN_REQ, sessionId)
1030#define CSR_IS_ROAM_SUBSTATE_AUTH_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_AUTH_REQ, sessionId)
1031#define CSR_IS_ROAM_SUBSTATE_REASSOC_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_REASSOC_REQ, sessionId)
1032#define CSR_IS_ROAM_SUBSTATE_DISASSOC_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_REQ, sessionId)
1033#define CSR_IS_ROAM_SUBSTATE_DISASSOC_NO_JOIN(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_NOTHING_TO_JOIN, sessionId)
1034#define CSR_IS_ROAM_SUBSTATE_REASSOC_FAIL(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_REASSOC_FAILURE, sessionId)
1035#define CSR_IS_ROAM_SUBSTATE_DISASSOC_FORCED(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_FORCED, sessionId)
1036#define CSR_IS_ROAM_SUBSTATE_DEAUTH_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DEAUTH_REQ, sessionId)
1037#define CSR_IS_ROAM_SUBSTATE_START_BSS_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_START_BSS_REQ, sessionId)
1038#define CSR_IS_ROAM_SUBSTATE_STOP_BSS_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_STOP_BSS_REQ, sessionId)
1039#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 -07001040#define CSR_IS_ROAM_SUBSTATE_CONFIG(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_CONFIG, sessionId)
1041#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 -08001042#define CSR_IS_ROAM_SUBSTATE_DISASSOC_HO(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_HANDOFF, sessionId)
1043#define CSR_IS_ROAM_SUBSTATE_HO_NT(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOINED_NO_TRAFFIC, sessionId)
1044#define CSR_IS_ROAM_SUBSTATE_HO_NRT(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOINED_NON_REALTIME_TRAFFIC, sessionId)
1045#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 -07001046
1047#define CSR_IS_PHY_MODE_B_ONLY(pMac) \
1048 ((eCSR_DOT11_MODE_11b == (pMac)->roam.configParam.phyMode) ||\
1049 (eCSR_DOT11_MODE_11b_ONLY == (pMac)->roam.configParam.phyMode))
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001050
Jeff Johnson295189b2012-06-20 16:38:30 -07001051#define CSR_IS_PHY_MODE_G_ONLY(pMac) \
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001052 (eCSR_DOT11_MODE_11g == (pMac)->roam.configParam.phyMode || eCSR_DOT11_MODE_11g_ONLY == (pMac)->roam.configParam.phyMode)
1053
Jeff Johnson295189b2012-06-20 16:38:30 -07001054#define CSR_IS_PHY_MODE_A_ONLY(pMac) \
1055 ((eCSR_DOT11_MODE_11a == (pMac)->roam.configParam.phyMode) ||\
1056 (eCSR_DOT11_MODE_11a_ONLY == (pMac)->roam.configParam.phyMode))
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001057
Jeff Johnsone7245742012-09-05 17:12:55 -07001058#ifdef WLAN_FEATURE_11AC
1059#define CSR_IS_PHY_MODE_DUAL_BAND(phyMode) \
1060 ((eCSR_DOT11_MODE_abg & (phyMode)) || (eCSR_DOT11_MODE_11n & (phyMode)) || \
1061 (eCSR_DOT11_MODE_11ac & (phyMode)) || \
1062 (eCSR_DOT11_MODE_TAURUS & (phyMode)) || \
1063 (eCSR_DOT11_MODE_AUTO & (phyMode)))
1064#else
Jeff Johnson295189b2012-06-20 16:38:30 -07001065#define CSR_IS_PHY_MODE_DUAL_BAND(phyMode) \
1066 ((eCSR_DOT11_MODE_abg & (phyMode)) || (eCSR_DOT11_MODE_11n & (phyMode)) || \
1067 (eCSR_DOT11_MODE_TAURUS & (phyMode)) || \
1068 (eCSR_DOT11_MODE_AUTO & (phyMode)))
Jeff Johnsone7245742012-09-05 17:12:55 -07001069#endif
1070
Jeff Johnson295189b2012-06-20 16:38:30 -07001071
1072// this function returns TRUE if the NIC is operating exclusively in the 2.4 GHz band, meaning
1073// it is NOT operating in the 5.0 GHz band.
1074#define CSR_IS_24_BAND_ONLY(pMac) \
1075 (eCSR_BAND_24 == (pMac)->roam.configParam.eBand)
1076
1077#define CSR_IS_5G_BAND_ONLY(pMac) \
1078 (eCSR_BAND_5G == (pMac)->roam.configParam.eBand)
1079
1080#define CSR_IS_RADIO_DUAL_BAND(pMac) \
1081 (eCSR_BAND_ALL == (pMac)->roam.configParam.bandCapability)
1082
1083#define CSR_IS_RADIO_BG_ONLY(pMac) \
1084 (eCSR_BAND_24 == (pMac)->roam.configParam.bandCapability)
1085
1086// this function returns TRUE if the NIC is operating exclusively in the 5.0 GHz band, meaning
1087// it is NOT operating in the 2.4 GHz band
1088#define CSR_IS_RADIO_A_ONLY(pMac) \
1089 (eCSR_BAND_5G == (pMac)->roam.configParam.bandCapability)
1090
1091// this function returns TRUE if the NIC is operating in both bands.
1092#define CSR_IS_OPEARTING_DUAL_BAND(pMac) \
1093 ((eCSR_BAND_ALL == (pMac)->roam.configParam.bandCapability) && (eCSR_BAND_ALL == (pMac)->roam.configParam.eBand))
1094
1095// this function returns TRUE if the NIC can operate in the 5.0 GHz band (could operate in the
1096// 2.4 GHz band also).
1097#define CSR_IS_OPERATING_A_BAND(pMac) \
1098 (CSR_IS_OPEARTING_DUAL_BAND((pMac)) || CSR_IS_RADIO_A_ONLY((pMac)) || CSR_IS_5G_BAND_ONLY((pMac)))
1099
1100// this function returns TRUE if the NIC can operate in the 2.4 GHz band (could operate in the
1101// 5.0 GHz band also).
1102#define CSR_IS_OPERATING_BG_BAND(pMac) \
1103 (CSR_IS_OPEARTING_DUAL_BAND((pMac)) || CSR_IS_RADIO_BG_ONLY((pMac)) || CSR_IS_24_BAND_ONLY((pMac)))
1104
1105#define CSR_IS_CHANNEL_5GHZ(chnNum) \
Jeff Johnsone7245742012-09-05 17:12:55 -07001106 (((chnNum) >= CSR_MIN_5GHz_CHANNEL_NUMBER) && ((chnNum) <= CSR_MAX_5GHz_CHANNEL_NUMBER))
Jeff Johnson295189b2012-06-20 16:38:30 -07001107
Srinivas Girigowdade697412013-02-14 16:31:48 -08001108#define CSR_IS_CHANNEL_DFS(chnNum) \
1109 (NV_CHANNEL_ENABLE != vos_nv_getChannelEnabledState(chnNum))
1110
Jeff Johnson295189b2012-06-20 16:38:30 -07001111#define CSR_IS_CHANNEL_24GHZ(chnNum) \
1112 (((chnNum) > 0) && ((chnNum) <= CSR_MAX_24GHz_CHANNEL_NUMBER))
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001113
Jeff Johnson295189b2012-06-20 16:38:30 -07001114#define CSR_IS_SAME_BAND_CHANNELS(ch1, ch2) (CSR_IS_CHANNEL_5GHZ(ch1) == CSR_IS_CHANNEL_5GHZ(ch2))
1115
1116
1117#define CSR_IS_11D_INFO_FOUND(pMac) \
1118 (0 != (pMac)->scan.channelOf11dInfo)
1119// DEAUTHIND
1120#define CSR_IS_ROAMING(pSession) ((CSR_IS_LOSTLINK_ROAMING((pSession)->roamingReason)) || \
1121 (eCsrDynamicRoaming == (pSession)->roamingReason) || \
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001122 (eCsrReassocRoaming == (pSession)->roamingReason))
Jeff Johnson295189b2012-06-20 16:38:30 -07001123
1124
1125#define CSR_IS_SET_KEY_COMMAND( pCommand ) ( eSmeCommandSetKey == (pCommand)->command )
1126
1127#define CSR_IS_ADDTS_WHEN_ACMOFF_SUPPORTED(pMac) (pMac->roam.configParam.addTSWhenACMIsOff)
1128// DEAUTHIND
1129#define CSR_IS_LOSTLINK_ROAMING(reason) ((eCsrLostlinkRoamingDisassoc == (reason)) || (eCsrLostlinkRoamingDeauth == (reason)))
1130
Venkata Prathyusha Kuntupalli239278b2013-03-26 15:58:18 -07001131#define CSR_IS_ROAMING_COMMAND(pCommand) ((eCsrLostLink1 == (pCommand)->u.roamCmd.roamReason) ||\
1132 (eCsrLostLink2 == (pCommand)->u.roamCmd.roamReason) ||\
1133 (eCsrLostLink3 == (pCommand)->u.roamCmd.roamReason) )
1134
1135
Jeff Johnson295189b2012-06-20 16:38:30 -07001136//Stop CSR from asking for IMPS, This function doesn't disable IMPS from CSR
1137void csrScanSuspendIMPS( tpAniSirGlobal pMac );
1138//Start CSR from asking for IMPS. This function doesn't trigger CSR to request entering IMPS
1139//because IMPS maybe disabled.
1140void csrScanResumeIMPS( tpAniSirGlobal pMac );
1141
1142eHalStatus csrInitGetChannels(tpAniSirGlobal pMac);
Agarwal Ashishfaef6692014-01-29 19:40:30 +05301143eHalStatus csrScanFilter11dResult(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -07001144
1145eHalStatus csrSetModifyProfileFields(tpAniSirGlobal pMac, tANI_U32 sessionId,
1146 tCsrRoamModifyProfileFields *pModifyProfileFields);
1147/* ---------------------------------------------------------------------------
1148 \fn csrGetModifyProfileFields
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001149 \brief HDD or SME - QOS calls this function to get the current values of
Jeff Johnson295189b2012-06-20 16:38:30 -07001150 connected profile fields changing which can cause reassoc.
1151 This function must be called after CFG is downloaded and STA is in connected
1152 state.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001153 \param pModifyProfileFields - pointer to the connected profile fields
Jeff Johnson295189b2012-06-20 16:38:30 -07001154 changing which can cause reassoc
1155
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001156 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001157 -------------------------------------------------------------------------------*/
1158eHalStatus csrGetModifyProfileFields(tpAniSirGlobal pMac, tANI_U32 sessionId,
1159 tCsrRoamModifyProfileFields * pModifyProfileFields);
1160void csrSetGlobalCfgs( tpAniSirGlobal pMac );
1161void csrSetDefaultDot11Mode( tpAniSirGlobal pMac );
1162void csrScanSetChannelMask(tpAniSirGlobal pMac, tCsrChannelInfo *pChannelInfo);
1163tANI_BOOLEAN csrIsConnStateDisconnected(tpAniSirGlobal pMac, tANI_U32 sessionId);
1164tANI_BOOLEAN csrIsConnStateConnectedIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1165tANI_BOOLEAN csrIsConnStateDisconnectedIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1166tANI_BOOLEAN csrIsConnStateConnectedInfra( tpAniSirGlobal pMac, tANI_U32 sessionId );
1167tANI_BOOLEAN csrIsConnStateConnected( tpAniSirGlobal pMac, tANI_U32 sessionId );
1168tANI_BOOLEAN csrIsConnStateInfra( tpAniSirGlobal pMac, tANI_U32 sessionId );
1169tANI_BOOLEAN csrIsConnStateIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1170tANI_BOOLEAN csrIsConnStateWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1171tANI_BOOLEAN csrIsConnStateConnectedWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1172tANI_BOOLEAN csrIsConnStateDisconnectedWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1173tANI_BOOLEAN csrIsAnySessionInConnectState( tpAniSirGlobal pMac );
1174tANI_BOOLEAN csrIsAllSessionDisconnected( tpAniSirGlobal pMac );
Madan Mohan Koyyalamudi48081ef2012-12-04 16:49:55 -08001175tANI_BOOLEAN csrIsStaSessionConnected( tpAniSirGlobal pMac );
1176tANI_BOOLEAN csrIsP2pSessionConnected( tpAniSirGlobal pMac );
Madan Mohan Koyyalamudid3d22592012-09-24 14:01:29 -07001177tANI_BOOLEAN csrIsAnySessionConnected( tpAniSirGlobal pMac );
Jeff Johnson295189b2012-06-20 16:38:30 -07001178tANI_BOOLEAN csrIsInfraConnected( tpAniSirGlobal pMac );
1179tANI_BOOLEAN csrIsConcurrentInfraConnected( tpAniSirGlobal pMac );
Jeff Johnsone7245742012-09-05 17:12:55 -07001180tANI_BOOLEAN csrIsConcurrentSessionRunning( tpAniSirGlobal pMac );
Jeff Johnsone7245742012-09-05 17:12:55 -07001181tANI_BOOLEAN csrIsInfraApStarted( tpAniSirGlobal pMac );
Jeff Johnson295189b2012-06-20 16:38:30 -07001182tANI_BOOLEAN csrIsIBSSStarted( tpAniSirGlobal pMac );
1183tANI_BOOLEAN csrIsBTAMPStarted( tpAniSirGlobal pMac );
1184tANI_BOOLEAN csrIsBTAMP( tpAniSirGlobal pMac, tANI_U32 sessionId );
1185eHalStatus csrIsBTAMPAllowed( tpAniSirGlobal pMac, tANI_U32 chnId );
Jeff Johnsone7245742012-09-05 17:12:55 -07001186tANI_BOOLEAN csrIsValidMcConcurrentSession(tpAniSirGlobal pMac, tANI_U32 sessionId,
1187 tSirBssDescription *pBssDesc);
Jeff Johnson295189b2012-06-20 16:38:30 -07001188tANI_BOOLEAN csrIsConnStateConnectedInfraAp( tpAniSirGlobal pMac, tANI_U32 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -07001189/*----------------------------------------------------------------------------
1190 \fn csrRoamRegisterLinkQualityIndCallback
1191
1192 \brief
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001193 a CSR function to allow HDD to register a callback handler with CSR for
1194 link quality indications.
Jeff Johnson295189b2012-06-20 16:38:30 -07001195
1196 Only one callback may be registered at any time.
1197 In order to deregister the callback, a NULL cback may be provided.
1198
1199 Registration happens in the task context of the caller.
1200
1201 \param callback - Call back being registered
1202 \param pContext - user data
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001203
Jeff Johnson295189b2012-06-20 16:38:30 -07001204 DEPENDENCIES: After CSR open
1205
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001206 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001207-----------------------------------------------------------------------------*/
1208eHalStatus csrRoamRegisterLinkQualityIndCallback(tpAniSirGlobal pMac,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001209 csrRoamLinkQualityIndCallback callback,
Jeff Johnson295189b2012-06-20 16:38:30 -07001210 void *pContext);
1211/* ---------------------------------------------------------------------------
1212 \fn csrGetStatistics
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001213 \brief csr function that client calls to register a callback to get
1214 different PHY level statistics from CSR.
1215
Jeff Johnson295189b2012-06-20 16:38:30 -07001216 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
1217 \param statsMask - The different category/categories of stats requester is looking for
1218 \param callback - SME sends back the requested stats using the callback
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001219 \param periodicity - If requester needs periodic update, 0 means it's an one
Jeff Johnson295189b2012-06-20 16:38:30 -07001220 time request
1221 \param cache - If requester is happy with cached stats
1222 \param staId - The station ID for which the stats is requested for
1223 \param pContext - user context to be passed back along with the callback
1224
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001225 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001226 ---------------------------------------------------------------------------*/
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001227eHalStatus csrGetStatistics(tpAniSirGlobal pMac, eCsrStatsRequesterType requesterId,
1228 tANI_U32 statsMask,
1229 tCsrStatsCallback callback,
1230 tANI_U32 periodicity, tANI_BOOLEAN cache,
Jeff Johnson295189b2012-06-20 16:38:30 -07001231 tANI_U8 staId, void *pContext);
1232
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +05301233/* ---------------------------------------------------------------------------
1234 \fn csrGetTLSTAState
1235 \helper function to get the TL STA State whenever the function is called.
1236
1237 \param staId - The staID to be passed to the TL
1238 to get the relevant TL STA State
1239 \return the state as tANI_U16
1240 ---------------------------------------------------------------------------*/
1241tANI_U16 csrGetTLSTAState(tpAniSirGlobal pMac, tANI_U8 staId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001242
1243eHalStatus csrGetRssi(tpAniSirGlobal pMac,tCsrRssiCallback callback,tANI_U8 staId,tCsrBssid bssId,void * pContext,void * pVosContext);
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05301244
1245/* ---------------------------------------------------------------------------
1246 \fn csrGetSnr
1247 \brief csr function that client calls to register a callback to get
1248 SNR stored in TL
1249
1250 \param callback - SME sends back the requested stats using the callback
1251 \param staId - The station ID for which the stats is requested for
1252 \param bssid - The bssid for the connected session
1253 \param pContext - user context to be passed back along with the callback
1254
1255 \return eHalStatus
1256 ---------------------------------------------------------------------------*/
1257eHalStatus csrGetSnr(tpAniSirGlobal pMac, tCsrSnrCallback callback,
1258 tANI_U8 staId, tCsrBssid bssId, void *pContext);
1259
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08001260#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_CCX || defined(FEATURE_WLAN_LFR)
1261eHalStatus csrGetRoamRssi(tpAniSirGlobal pMac,
1262 tCsrRssiCallback callback,
1263 tANI_U8 staId,
1264 tCsrBssid bssId,
1265 void * pContext,
1266 void * pVosContext);
1267#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001268
1269#if defined(FEATURE_WLAN_CCX) && defined(FEATURE_WLAN_CCX_UPLOAD)
1270eHalStatus csrGetTsmStats(tpAniSirGlobal pMac, tCsrTsmStatsCallback callback, tANI_U8 staId,
1271 tCsrBssid bssId, void *pContext, void* pVosContext,
1272 tANI_U8 tid);
1273#endif /* FEATURE_WLAN_CCX && FEATURE_WLAN_CCX_UPLOAD */
1274
Jeff Johnson295189b2012-06-20 16:38:30 -07001275eHalStatus csrRoamRegisterCallback(tpAniSirGlobal pMac, csrRoamCompleteCallback callback, void *pContext);
1276/* ---------------------------------------------------------------------------
1277 \fn csrGetConfigParam
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001278 \brief HDD calls this function to get the global settings currently maintained by CSR.
Jeff Johnson295189b2012-06-20 16:38:30 -07001279 \param pParam - caller allocated memory
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001280 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001281 -------------------------------------------------------------------------------*/
1282eHalStatus csrGetConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam);
1283
1284/* ---------------------------------------------------------------------------
1285 \fn csrMsgProcessor
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001286 \brief HDD calls this function to change some global settings.
Jeff Johnson295189b2012-06-20 16:38:30 -07001287 caller must set the all fields or call csrGetConfigParam to prefill the fields.
1288 \param pParam - caller allocated memory
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001289 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001290 -------------------------------------------------------------------------------*/
1291eHalStatus csrChangeDefaultConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam);
1292
1293
1294/* ---------------------------------------------------------------------------
1295 \fn csrMsgProcessor
1296 \brief HDD calls this function for the messages that are handled by CSR.
1297 \param pMsgBuf - a pointer to a buffer that maps to various structures base on the message type.
1298 The beginning of the buffer can always map to tSirSmeRsp.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001299 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001300 -------------------------------------------------------------------------------*/
1301eHalStatus csrMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf );
1302
1303/* ---------------------------------------------------------------------------
1304 \fn csrOpen
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001305 \brief This function must be called before any API call to CSR.
1306 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001307 -------------------------------------------------------------------------------*/
1308eHalStatus csrOpen(tpAniSirGlobal pMac);
Mihir Shetee1093ba2014-01-21 20:13:32 +05301309
1310/* ---------------------------------------------------------------------------
1311 \fn csrInitChannels
1312 \brief This function must be called to initialize CSR channel lists
1313 \return eHalStatus
1314 -------------------------------------------------------------------------------*/
1315eHalStatus csrInitChannels(tpAniSirGlobal pMac);
1316
Jeff Johnson295189b2012-06-20 16:38:30 -07001317/* ---------------------------------------------------------------------------
1318 \fn csrClose
1319 \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 -08001320 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001321 -------------------------------------------------------------------------------*/
1322eHalStatus csrClose(tpAniSirGlobal pMac);
1323/* ---------------------------------------------------------------------------
1324 \fn csrStart
1325 \brief To start CSR.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001326 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001327 -------------------------------------------------------------------------------*/
1328eHalStatus csrStart(tpAniSirGlobal pMac);
1329/* ---------------------------------------------------------------------------
1330 \fn csrStop
1331 \brief To stop CSR. CSR still keeps its current setting.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001332 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001333 -------------------------------------------------------------------------------*/
Kiet Lama72a2322013-11-15 11:18:11 +05301334eHalStatus csrStop(tpAniSirGlobal pMac, tHalStopType stopType);
Jeff Johnson295189b2012-06-20 16:38:30 -07001335/* ---------------------------------------------------------------------------
1336 \fn csrReady
1337 \brief To let CSR is ready to operate
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001338 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001339 -------------------------------------------------------------------------------*/
1340eHalStatus csrReady(tpAniSirGlobal pMac);
1341
1342#ifdef FEATURE_WLAN_WAPI
1343eHalStatus csrRoamGetBKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pNum,
1344 tBkidCacheInfo *pBkidCache);
1345
1346
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001347eHalStatus csrScanGetBKIDCandidateList(tpAniSirGlobal pMac, tANI_U32 sessionId,
Jeff Johnson295189b2012-06-20 16:38:30 -07001348 tBkidCandidateInfo *pBkidList, tANI_U32 *pNumItems );
1349tANI_U32 csrRoamGetNumBKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId);
1350eHalStatus csrRoamSetBKIDCache( tpAniSirGlobal pMac, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
1351 tANI_U32 numItems );
1352/* ---------------------------------------------------------------------------
1353 \fn csrRoamGetWapiReqIE
1354 \brief return the WAPI IE CSR passes to PE to JOIN request or START_BSS request
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001355 \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 -07001356 needed or IE length in pBuf.
1357 \param pBuf - Caller allocated memory that contain the IE field, if any, upon return
1358 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
1359 -------------------------------------------------------------------------------*/
1360eHalStatus csrRoamGetWapiReqIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf);
1361
1362/* ---------------------------------------------------------------------------
1363 \fn csrRoamGetWapiRspIE
1364 \brief return the WAPI IE from the beacon or probe rsp if connected
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001365 \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 -07001366 needed or IE length in pBuf.
1367 \param pBuf - Caller allocated memory that contain the IE field, if any, upon return
1368 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
1369 -------------------------------------------------------------------------------*/
1370eHalStatus csrRoamGetWapiRspIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf);
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001371tANI_U8 csrConstructWapiIe( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
Jeff Johnson295189b2012-06-20 16:38:30 -07001372 tSirBssDescription *pSirBssDesc, tDot11fBeaconIEs *pIes, tCsrWapiIe *pWapiIe );
1373#endif /* FEATURE_WLAN_WAPI */
1374
Jeff Johnson295189b2012-06-20 16:38:30 -07001375eHalStatus csrRoamUpdateAPWPSIE( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirAPWPSIEs *pAPWPSIES );
1376eHalStatus csrRoamUpdateWPARSNIEs( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirRSNie * pAPSirRSNie);
Jeff Johnson295189b2012-06-20 16:38:30 -07001377void csrSetCfgPrivacy( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy );
1378tANI_S8 csrGetInfraSessionId( tpAniSirGlobal pMac );
1379tANI_U8 csrGetInfraOperationChannel( tpAniSirGlobal pMac, tANI_U8 sessionId);
1380tANI_U8 csrGetConcurrentOperationChannel( tpAniSirGlobal pMac );
1381
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001382eHalStatus csrRoamCopyConnectProfile(tpAniSirGlobal pMac, tANI_U32 sessionId,
Jeff Johnson295189b2012-06-20 16:38:30 -07001383 tCsrRoamConnectedProfile *pProfile);
1384tANI_BOOLEAN csrIsSetKeyAllowed(tpAniSirGlobal pMac, tANI_U32 sessionId);
1385
1386void csrSetOppositeBandChannelInfo( tpAniSirGlobal pMac );
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001387void csrConstructCurrentValidChannelList( tpAniSirGlobal pMac, tDblLinkList *pChannelSetList,
Jeff Johnson295189b2012-06-20 16:38:30 -07001388 tANI_U8 *pChannelList, tANI_U8 bSize, tANI_U8 *pNumChannels );
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08001389
1390#ifdef FEATURE_WLAN_SCAN_PNO
Srikant Kuppa066904f2013-05-07 13:56:02 -07001391eHalStatus csrScanSavePreferredNetworkFound(tpAniSirGlobal pMac,
1392 tSirPrefNetworkFoundInd *pPrefNetworkFoundInd);
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08001393#endif //FEATURE_WLAN_SCAN_PNO
Jeff Johnson295189b2012-06-20 16:38:30 -07001394#endif
1395
1396#ifdef WLAN_FEATURE_VOWIFI_11R
1397//Returns whether the current association is a 11r assoc or not
1398tANI_BOOLEAN csrRoamIs11rAssoc(tpAniSirGlobal pMac);
1399#endif
1400
1401#ifdef FEATURE_WLAN_CCX
1402//Returns whether the current association is a CCX assoc or not
1403tANI_BOOLEAN csrRoamIsCCXAssoc(tpAniSirGlobal pMac);
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001404tANI_BOOLEAN csrRoamIsCcxIniFeatureEnabled(tpAniSirGlobal pMac);
1405tANI_BOOLEAN csrNeighborRoamIsCCXAssoc(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -07001406#endif
1407
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001408//Remove this code once SLM_Sessionization is supported
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001409//BMPS_WORKAROUND_NOT_NEEDED
Jeff Johnson295189b2012-06-20 16:38:30 -07001410void csrDisconnectAllActiveSessions(tpAniSirGlobal pMac);
Mohit Khanna349bc392012-09-11 17:24:52 -07001411
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001412#ifdef FEATURE_WLAN_LFR
1413//Returns whether "Legacy Fast Roaming" is enabled...or not
Madan Mohan Koyyalamudi03aae5f2012-11-28 01:51:22 +05301414tANI_BOOLEAN csrRoamIsFastRoamEnabled(tpAniSirGlobal pMac, tANI_U32 sessionId);
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001415#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1416tANI_BOOLEAN csrRoamIsRoamOffloadScanEnabled(tpAniSirGlobal pMac);
1417#endif
Madan Mohan Koyyalamudi470d2cf2012-09-28 14:43:44 -07001418tANI_BOOLEAN csrIsChannelPresentInList( tANI_U8 *pChannelList, int numChannels, tANI_U8 channel );
1419VOS_STATUS csrAddToChannelListFront( tANI_U8 *pChannelList, int numChannels, tANI_U8 channel );
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001420#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1421eHalStatus csrScanRequestLfrResult(tpAniSirGlobal pMac, tANI_U32 sessionId,
1422 csrScanCompleteCallback callback, void *pContext);
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07001423eHalStatus csrRoamOffloadScanRspHdlr(tpAniSirGlobal pMac, tANI_U8 reason);
1424eHalStatus csrHandoffRequest(tpAniSirGlobal pMac, tCsrHandoffRequest *pHandoffInfo);
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001425#endif
1426tANI_BOOLEAN csrRoamIsStaMode(tpAniSirGlobal pMac, tANI_U32 sessionId);
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001427#endif
1428