blob: 35960bdb77bb89b80b075f3b6ffd212c20fc772a [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Kiet Lam0fb93dd2014-02-19 00:32:59 -08002 * Copyright (c) 2011-2014 The Linux Foundation. All rights reserved.
3 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21
22/*
23 * Copyright (c) 2011-2014 Qualcomm Atheros, Inc.
24 * All Rights Reserved.
25 * Qualcomm Atheros Confidential and Proprietary.
26 *
27 */
28
Jeff Johnson295189b2012-06-20 16:38:30 -070029
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080030/** ------------------------------------------------------------------------- *
31 ------------------------------------------------------------------------- *
Jeff Johnson295189b2012-06-20 16:38:30 -070032
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080033
Jeff Johnson295189b2012-06-20 16:38:30 -070034 \file csrInternal.h
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080035
Jeff Johnson295189b2012-06-20 16:38:30 -070036 Define internal data structure for MAC.
Jeff Johnson295189b2012-06-20 16:38:30 -070037 ========================================================================== */
38#ifndef CSRINTERNAL_H__
39#define CSRINTERNAL_H__
40
Jeff Johnson295189b2012-06-20 16:38:30 -070041#include "vos_status.h"
42#include "vos_lock.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070043
44#include "palTimer.h"
45#include "csrSupport.h"
46#include "vos_nvitem.h"
47#include "wlan_qct_tl.h"
48
49#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
50#include "csrNeighborRoam.h"
51#endif
52
53#define CSR_MAX_STA (HAL_NUM_STA)
54
55#define CSR_SME_SCAN_FLAGS_DELETE_CACHE 0x80
56
57#define CSR_TITAN_MAX_RATE_MIMO_CB 240
58#define CSR_TITAN_MAX_RATE_MIMO 126
59
60//define scan return criteria. LIM should use these define as well
61#define CSR_SCAN_RETURN_AFTER_ALL_CHANNELS ( 0 )
62#define CSR_SCAN_RETURN_AFTER_FIRST_MATCH ( 0x01 )
63#define CSR_SCAN_RETURN_AFTER_5_BAND_11d_FOUND ( 0x80 )
64#define CSR_SCAN_RETURN_AFTER_24_BAND_11d_FOUND ( 0x40 )
65#define CSR_SCAN_RETURN_AFTER_EITHER_BAND_11d_FOUND ( CSR_SCAN_RETURN_AFTER_5_BAND_11d_FOUND | CSR_SCAN_RETURN_AFTER_24_BAND_11d_FOUND )
Madan Mohan Koyyalamudi4c8c6352012-10-15 16:40:16 -070066#define CSR_NUM_RSSI_CAT 15
Jeff Johnson295189b2012-06-20 16:38:30 -070067#define CSR_MAX_STATISTICS_REQ 10
Varun Reddy Yeturu9d4102c2013-12-02 15:47:03 -080068#define CSR_ROAM_SCAN_CHANNEL_SWITCH_TIME 3
Jeff Johnson295189b2012-06-20 16:38:30 -070069
70//Support for multiple session
71#define CSR_SESSION_ID_INVALID 0xFF // session ID invalid
72#define CSR_ROAM_SESSION_MAX 5 // No of sessions to be supported, and a
73 // session is for Infra, IBSS or BT-AMP
74
75#define CSR_IS_SESSION_VALID( pMac, sessionId ) ( ( (sessionId) < CSR_ROAM_SESSION_MAX ) \
76 && ( (pMac)->roam.roamSession[(sessionId)].sessionActive ) )
77#define CSR_GET_SESSION( pMac, sessionId ) \
78( \
79 (sessionId < CSR_ROAM_SESSION_MAX) ? \
80 (&(pMac)->roam.roamSession[(sessionId)]) :\
81 NULL \
82)
83
Srinivas Girigowda41c7c5f2013-10-21 19:01:38 -070084#define CSR_IS_SELECT_5GHZ_MARGIN( pMac ) \
85( \
86 (((pMac)->roam.configParam.nSelect5GHzMargin)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
87)
88
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -080089#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -080090#define CSR_IS_ROAM_PREFER_5GHZ( pMac ) \
91( \
92 (((pMac)->roam.configParam.nRoamPrefer5GHz)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
93)
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -070094#define CSR_IS_ROAM_INTRA_BAND_ENABLED( pMac ) \
95( \
96 (((pMac)->roam.configParam.nRoamIntraBand)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
97)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -080098#endif
99
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700100#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
101#define CSR_IS_ROAM_SCAN_OFFLOAD_ENABLED( pMac ) \
102( \
103 (((pMac)->roam.configParam.isRoamOffloadScanEnabled)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
104)
Srinivas Girigowda830bbd02013-06-13 19:44:16 -0700105
106#define CSR_IS_FASTROAM_IN_CONCURRENCY_INI_FEATURE_ENABLED( pMac ) \
107( \
108 (((pMac)->roam.configParam.bFastRoamInConIniFeatureEnabled)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
109)
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700110#endif
111
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800112//Support for "Fast roaming" (i.e., ESE, LFR, or 802.11r.)
Madan Mohan Koyyalamudi470d2cf2012-09-28 14:43:44 -0700113#define CSR_BG_SCAN_OCCUPIED_CHANNEL_LIST_LEN 15
Jeff Johnson295189b2012-06-20 16:38:30 -0700114
115typedef enum
116{
117 //eCSR_CFG_DOT11_MODE_BEST = 0,
118 eCSR_CFG_DOT11_MODE_TAURUS = 0,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800119 eCSR_CFG_DOT11_MODE_ABG,
120 eCSR_CFG_DOT11_MODE_11A,
121 eCSR_CFG_DOT11_MODE_11B,
122 eCSR_CFG_DOT11_MODE_11G,
123 eCSR_CFG_DOT11_MODE_11N,
124 eCSR_CFG_DOT11_MODE_POLARIS,
125 eCSR_CFG_DOT11_MODE_TITAN,
Jeff Johnsone7245742012-09-05 17:12:55 -0700126#ifdef WLAN_FEATURE_11AC
127 eCSR_CFG_DOT11_MODE_11AC,
128#endif
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800129 eCSR_CFG_DOT11_MODE_11G_ONLY,
130 eCSR_CFG_DOT11_MODE_11N_ONLY,
Jeff Johnsone7245742012-09-05 17:12:55 -0700131#ifdef WLAN_FEATURE_11AC
132 eCSR_CFG_DOT11_MODE_11AC_ONLY,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800133#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700134 //This value can never set to CFG. It is for CSR's internal use
135 eCSR_CFG_DOT11_MODE_AUTO,
136}eCsrCfgDot11Mode; //Used to determine what to set to the WNI_CFG_DOT11_MODE
137
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800138typedef enum etCsrRoamCommands
Jeff Johnson295189b2012-06-20 16:38:30 -0700139{
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800140 eCsrRoamNoCommand,
Jeff Johnson295189b2012-06-20 16:38:30 -0700141 eCsrRoamCommandScan,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800142 eCsrRoamCommandRoam,
143 eCsrRoamCommandWmStatusChange,
Jeff Johnson295189b2012-06-20 16:38:30 -0700144 eCsrRoamCommandSetKey,
145 eCsrRoamCommandRemoveKey,
146
147} eCsrRoamCommands;
148
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800149typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700150{
151 eCsrScanOther = 1,
152 eCsrScanLostLink1,
153 eCsrScanLostLink2,
154 eCsrScanLostLink3,
155 eCsrScanLostLink4,
156 eCsrScan11d1, //First 11d scan
157 eCsrScan11d2, //First 11d scan has failed
158 eCsrScan11dDone, //11d scan succeeded, try the rest of the channel
159 eCsrScanUserRequest,
160 eCsrScanGetResult,
161 eCsrScanSetBGScanParam, //used for HO too - bg scan request in NT Handoff sub-state
162 eCsrScanForSsid,
163 eCsrScanForCapsChange,
164 eCsrScanBGScanAbort,
165 eCsrScanBGScanEnable,
166 eCsrScanIdleScan,
167 eCsrScanGetScanChnInfo, //To get the list of channels scanned
168
169 eCsrScanBgScan, // bg scan request in NRT & RT Handoff sub-states
170 eCsrScanProbeBss, // directed probe on an entry from the candidate list - HO
171 eCsrScanAbortBgScan, //aborting a BG scan (meaning the scan is triggered by LIM timer)
172 eCsrScanAbortNormalScan, //aborting a normal scan (the scan is trigger by eWNI_SME_SCAN_REQ)
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700173 eCsrScanP2PFindPeer,
174 eCsrScanGetLfrResult, // get the LFR candidates from PE scan cache
Jeff Johnson295189b2012-06-20 16:38:30 -0700175}eCsrScanReason;
176
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800177typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700178{
179 eCsrNoConnection, // Roaming because we have not established the initial connection.
180 eCsrCapsChange, // roaming because LIM reported a Capability change in the associated AP.
181 eCsrForcedDisassoc, // roaming becuase someone asked us to Disassoc and stay disassociated.
182 eCsrHddIssued, // roaming because an 802.11 request was issued to the driver.
183 eCsrLostLink1, // roaming because we lost link to an associated AP
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800184 eCsrLostLink2,
Jeff Johnson295189b2012-06-20 16:38:30 -0700185 eCsrLostLink3,
186 eCsrForcedDisassocMICFailure, // roaming because we need to force a Disassoc due to MIC failure
187 eCsrHddIssuedReassocToSameAP,
188 eCsrSmeIssuedReassocToSameAP,
189 eCsrSmeIssuedReassocToDiffAP,
190 eCsrForcedDeauth, // roaming becuase someone asked us to deauth and stay disassociated.
191 eCsrSmeIssuedDisassocForHandoff, // will be issued by Handoff logic to disconect from current AP
192 eCsrSmeIssuedAssocToSimilarAP, // will be issued by Handoff logic to join a new AP with same profile
193 eCsrSmeIssuedIbssJoinFailure, // ibss join timer fired before any perr showed up, so shut down the network
194 eCsrForcedIbssLeave,
195 eCsrStopBss,
196 eCsrSmeIssuedFTReassoc,
197 eCsrForcedDisassocSta,
198 eCsrForcedDeauthSta,
Madan Mohan Koyyalamudi286b60e2012-10-11 12:59:07 -0700199 eCsrPerformPreauth,
Venkata Prathyusha Kuntupalli239278b2013-03-26 15:58:18 -0700200 eCsrLostLink1Abort,
201 eCsrLostLink2Abort,
202 eCsrLostLink3Abort,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800203
Jeff Johnson295189b2012-06-20 16:38:30 -0700204}eCsrRoamReason;
205
206typedef enum
207{
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800208 eCSR_ROAM_SUBSTATE_NONE = 0,
209 eCSR_ROAM_SUBSTATE_START_BSS_REQ,
210 eCSR_ROAM_SUBSTATE_JOIN_REQ,
211 eCSR_ROAM_SUBSTATE_REASSOC_REQ,
212 eCSR_ROAM_SUBSTATE_DISASSOC_REQ,
213 eCSR_ROAM_SUBSTATE_STOP_BSS_REQ,
214 eCSR_ROAM_SUBSTATE_DISCONNECT_CONTINUE_ROAMING, //Continue the current roam command after disconnect
215 eCSR_ROAM_SUBSTATE_AUTH_REQ,
216 eCSR_ROAM_SUBSTATE_CONFIG,
217 eCSR_ROAM_SUBSTATE_DEAUTH_REQ,
218 eCSR_ROAM_SUBSTATE_DISASSOC_NOTHING_TO_JOIN,
219 eCSR_ROAM_SUBSTATE_DISASSOC_REASSOC_FAILURE,
220 eCSR_ROAM_SUBSTATE_DISASSOC_FORCED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700221 eCSR_ROAM_SUBSTATE_WAIT_FOR_KEY,
222 eCSR_ROAM_SUBSTATE_DISASSOC_HANDOFF,
223 eCSR_ROAM_SUBSTATE_JOINED_NO_TRAFFIC,
224 eCSR_ROAM_SUBSTATE_JOINED_NON_REALTIME_TRAFFIC,
225 eCSR_ROAM_SUBSTATE_JOINED_REALTIME_TRAFFIC,
226// max is 15 unless the bitfield is expanded...
227} eCsrRoamSubState;
228
229
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800230typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700231{
232 eCSR_ROAMING_STATE_STOP = 0,
233 eCSR_ROAMING_STATE_IDLE,
234 eCSR_ROAMING_STATE_SCANNING,
235 eCSR_ROAMING_STATE_JOINING,
236 eCSR_ROAMING_STATE_JOINED,
237}eCsrRoamState;
238
239
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800240typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700241{
242 eCsrContinueRoaming,
243 eCsrStopRoaming,
244 eCsrStartIbss,
245 eCsrStartIbssSameIbss,
246 eCsrReassocToSelfNoCapChange,
Jeff Johnsone7245742012-09-05 17:12:55 -0700247 eCsrStopRoamingDueToConcurrency,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800248
Jeff Johnson295189b2012-06-20 16:38:30 -0700249}eCsrJoinState;
250
251typedef enum
252{
253 eCsrNotRoaming,
254 eCsrLostlinkRoamingDisassoc,
255 eCsrLostlinkRoamingDeauth,
256 eCsrDynamicRoaming,
257 eCsrReassocRoaming,
258}eCsrRoamingReason;
259
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800260typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700261{
262 eCsrDisassociated,
263 eCsrDeauthenticated
264
265}eCsrRoamWmStatusChangeTypes;
266
267typedef enum
268{
269 eCsrSummaryStats = 0,
270 eCsrGlobalClassAStats,
271 eCsrGlobalClassBStats,
272 eCsrGlobalClassCStats,
273 eCsrGlobalClassDStats,
274 eCsrPerStaStats,
275 eCsrMaxStats
276}eCsrRoamStatsClassTypes;
277
278#ifdef FEATURE_WLAN_DIAG_SUPPORT
279typedef enum
280{
281 eCSR_WLAN_STATUS_CONNECT =0,
282 eCSR_WLAN_STATUS_DISCONNECT
283
284}eCsrDiagWlanStatusEventSubtype;
285
286typedef enum
287{
288 eCSR_REASON_UNSPECIFIED = 0,
289 eCSR_REASON_USER_REQUESTED,
290 eCSR_REASON_MIC_ERROR,
291 eCSR_REASON_DISASSOC,
292 eCSR_REASON_DEAUTH,
293 eCSR_REASON_HANDOFF,
294
295}eCsrDiagWlanStatusEventReason;
296
297typedef enum
298{
299 eCSR_WLAN_HANDOFF_EVENT =0,
300
301}eCsrDiagWlanHandoffEventSubtype;
302
303typedef enum
304{
305 eCSR_WLAN_VCC_EVENT =0,
306
307}eCsrDiagWlanVccEventSubtype;
308
309#endif //FEATURE_WLAN_DIAG_SUPPORT
310
311typedef struct tagCsrChannel
312{
313 tANI_U8 numChannels;
314 tANI_U8 channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
315}tCsrChannel;
316
317typedef struct tagScanProfile
318{
319 tANI_U32 minChnTime;
320 tANI_U32 maxChnTime;
321 tANI_U32 restTime; //This is ignored if not associated
322 tANI_U32 numOfChannels;
323 tANI_U8 *pChannelList;
324 tSirScanType scanType; //active or passive
325 eCsrRoamBssType bssType; //BSS or IBSS
326 tANI_U8 ssid[WNI_CFG_SSID_LEN];
327 tANI_U8 bReturnAfter1stMatch;
328 tANI_U8 fUniqueResult;
329 tANI_U8 freshScan;
330 tCsrBssid bssid;
331}tScanProfile;
332
333typedef struct tagBssConfigParam
334{
335 eCsrMediaAccessType qosType;
336 tSirMacSSid SSID;
337 tANI_U32 uRTSThresh;
338 tANI_U32 uDeferThresh; //
339 eCsrCfgDot11Mode uCfgDot11Mode;
340 eCsrBand eBand;
341 tANI_U8 standardRate[CSR_DOT11_SUPPORTED_RATES_MAX];
342 tANI_U8 extendedRate[CSR_DOT11_EXTENDED_SUPPORTED_RATES_MAX];
343 eCsrExposedTxRate txRate;
344 tAniAuthType authType;
345 eCsrEncryptionType encType;
346 tANI_U32 uShortSlotTime;
347 tANI_U32 uHTSupport; //High throughput
348 tANI_U32 uPowerLimit;
349 tANI_U32 uHeartBeatThresh;
350 tANI_U32 uJoinTimeOut;
351 tSirMacCapabilityInfo BssCap;
352 tANI_BOOLEAN f11hSupport;
Jeff Johnsone7245742012-09-05 17:12:55 -0700353 ePhyChanBondState cbMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700354}tBssConfigParam;
355
356
357typedef struct tagCsrRoamStartBssParams
358{
359 tSirMacSSid ssId;
360 tCsrBssid bssid; //this is the BSSID for the party we want to join (only use for IBSS or WDS)
361 tSirNwType sirNwType;
Jeff Johnsone7245742012-09-05 17:12:55 -0700362 ePhyChanBondState cbMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700363 tSirMacRateSet operationalRateSet;
364 tSirMacRateSet extendedRateSet;
365 tANI_U8 operationChn;
366 eCsrCfgDot11Mode uCfgDot11Mode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700367 tANI_U8 privacy;
368 tANI_BOOLEAN fwdWPSPBCProbeReq;
369 tANI_BOOLEAN protEnabled;
370 tANI_BOOLEAN obssProtEnabled;
371 tAniAuthType authType;
372 tANI_U16 beaconInterval; //If this is 0, SME will fill in for caller.
373 tANI_U16 ht_protection;
374 tANI_U32 dtimPeriod;
375 tANI_U8 ApUapsdEnable;
376 tANI_U8 ssidHidden;
377 tANI_U8 wps_state;
Jeff Johnson295189b2012-06-20 16:38:30 -0700378 tVOS_CON_MODE bssPersona;
379 tANI_U16 nRSNIELength; //The byte count in the pRSNIE, if 0, pRSNIE is ignored.
380 tANI_U8 *pRSNIE; //If not null, it has the IE byte stream for RSN
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800381 tANI_BOOLEAN updatebeaconInterval; //Flag used to indicate update
382 // beaconInterval
Chet Lanctot8cecea22014-02-11 19:09:36 -0800383#ifdef WLAN_FEATURE_11W
384 tANI_BOOLEAN mfpCapable;
385 tANI_BOOLEAN mfpRequired;
386#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700387}tCsrRoamStartBssParams;
388
389
390typedef struct tagScanCmd
391{
392 tANI_U32 scanID;
393 csrScanCompleteCallback callback;
394 void *pContext;
395 eCsrScanReason reason;
396 eCsrRoamState lastRoamState[CSR_ROAM_SESSION_MAX];
397 tCsrRoamProfile *pToRoamProfile;
398 tANI_U32 roamId; //this is the ID related to the pToRoamProfile
399 union
400 {
401 tCsrScanRequest scanRequest;
402 tCsrBGScanRequest bgScanRequest;
403 }u;
Srinivas, Dasari187ca4e2014-02-07 12:40:09 +0530404 //This flag will be set while aborting the scan due to band change
405 tANI_BOOLEAN abortScanDueToBandChange;
Jeff Johnson295189b2012-06-20 16:38:30 -0700406}tScanCmd;
407
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800408typedef struct tagRoamCmd
Jeff Johnson295189b2012-06-20 16:38:30 -0700409{
410 tANI_U32 roamId;
411 eCsrRoamReason roamReason;
412 tCsrRoamProfile roamProfile;
413 tScanResultHandle hBSSList; //BSS list fits the profile
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800414 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 -0700415 tSirBssDescription *pLastRoamBss; //the last BSS we try and failed
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800416 tANI_BOOLEAN fReleaseBssList; //whether to free hBSSList
Jeff Johnson295189b2012-06-20 16:38:30 -0700417 tANI_BOOLEAN fReleaseProfile; //whether to free roamProfile
418 tANI_BOOLEAN fReassoc; //whether this command is for reassociation
419 tANI_BOOLEAN fUpdateCurRoamProfile; //whether pMac->roam.pCurRoamProfile needs to be updated
420 //this is for CSR internal used only. And it should not be assigned when creating the command
421 //This causes the roam command not to do anything.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800422 tANI_BOOLEAN fReassocToSelfNoCapChange;
Jeff Johnson295189b2012-06-20 16:38:30 -0700423
424 tANI_BOOLEAN fStopWds;
425 tSirMacAddr peerMac;
426 tSirMacReasonCodes reason;
427}tRoamCmd;
428
429typedef struct tagSetKeyCmd
430{
431 tANI_U32 roamId;
432 eCsrEncryptionType encType;
433 eCsrAuthType authType;
434 tAniKeyDirection keyDirection; //Tx, Rx or Tx-and-Rx
435 tSirMacAddr peerMac; //Peer's MAC address. ALL 1's for group key
436 tANI_U8 paeRole; //0 for supplicant
437 tANI_U8 keyId; // Kye index
438 tANI_U8 keyLength; //Number of bytes containing the key in pKey
439 tANI_U8 Key[CSR_MAX_KEY_LEN];
440 tANI_U8 keyRsc[CSR_MAX_RSC_LEN];
441} tSetKeyCmd;
442
443typedef struct tahRemoveKeyCmd
444{
445 tANI_U32 roamId;
446 eCsrEncryptionType encType;
447 eCsrAuthType authType;
448 tSirMacAddr peerMac; //Peer's MAC address. ALL 1's for group key
449 tANI_U8 keyId; //key index
450} tRemoveKeyCmd;
451
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800452typedef struct tagWmStatusChangeCmd
Jeff Johnson295189b2012-06-20 16:38:30 -0700453{
454 eCsrRoamWmStatusChangeTypes Type;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800455 union
456 {
Jeff Johnson295189b2012-06-20 16:38:30 -0700457 tSirSmeDeauthInd DeauthIndMsg;
458 tSirSmeDisassocInd DisassocIndMsg;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800459 }u;
Jeff Johnson295189b2012-06-20 16:38:30 -0700460
461}tWmStatusChangeCmd;
462
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700463
Jeff Johnson295189b2012-06-20 16:38:30 -0700464typedef struct tagAddStaForSessionCmd
465{
466 //Session self mac addr
467 tSirMacAddr selfMacAddr;
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700468 tVOS_CON_MODE currDeviceMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700469}tAddStaForSessionCmd;
470
471typedef struct tagDelStaForSessionCmd
472{
473 //Session self mac addr
474 tSirMacAddr selfMacAddr;
475 csrRoamSessionCloseCallback callback;
476 void *pContext;
477}tDelStaForSessionCmd;
478
479//This structure represents one scan request
480typedef struct tagCsrCmd
481{
482 tListElem Link;
483 eCsrRoamCommands command;
484 tANI_U8 sessionId; // Session ID for this command
485 union
486 {
487 tScanCmd scanCmd;
488 tRoamCmd roamCmd;
489 tWmStatusChangeCmd wmStatusChangeCmd;
490 tSetKeyCmd setKeyCmd;
491 tRemoveKeyCmd removeKeyCmd;
492 tAddStaForSessionCmd addStaSessionCmd;
493 tDelStaForSessionCmd delStaSessionCmd;
494 }u;
495}tCsrCmd;
496
497#ifdef WLAN_FEATURE_VOWIFI_11R
498typedef struct tagCsr11rConfig
499{
500 tANI_BOOLEAN IsFTResourceReqSupported;
501} tCsr11rConfig;
502#endif
503
504#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
505typedef struct tagCsrNeighborRoamConfig
506{
507 tANI_U32 nNeighborScanTimerPeriod;
508 tANI_U8 nNeighborLookupRssiThreshold;
509 tANI_U8 nNeighborReassocRssiThreshold;
510 tANI_U16 nNeighborScanMinChanTime;
511 tANI_U16 nNeighborScanMaxChanTime;
512 sCsrChannel neighborScanChanList;
513 tANI_U8 nMaxNeighborRetries;
514 tANI_U16 nNeighborResultsRefreshPeriod;
Srinivas Girigowdade697412013-02-14 16:31:48 -0800515 tANI_U16 nEmptyScanRefreshPeriod;
Jeff Johnson295189b2012-06-20 16:38:30 -0700516}tCsrNeighborRoamConfig;
517#endif
518
519typedef struct tagCsrConfig
520{
521 tANI_U32 agingCount;
522 tANI_U32 FragmentationThreshold;
523 tANI_U32 channelBondingMode24GHz;
524 tANI_U32 channelBondingMode5GHz;
525 tANI_U32 RTSThreshold;
526 eCsrPhyMode phyMode;
527 eCsrCfgDot11Mode uCfgDot11Mode;
528 eCsrBand eBand;
529 tANI_U32 HeartbeatThresh50;
530 tANI_U32 HeartbeatThresh24;
531 tANI_U32 bgScanInterval;
532 eCsrCBChoice cbChoice;
533 eCsrBand bandCapability; //indicate hw capability
534 eCsrRoamWmmUserModeType WMMSupportMode;
535 tANI_BOOLEAN Is11eSupportEnabled;
536 tANI_BOOLEAN Is11dSupportEnabled;
537 tANI_BOOLEAN Is11dSupportEnabledOriginal;
538 tANI_BOOLEAN Is11hSupportEnabled;
539 tANI_BOOLEAN shortSlotTime;
540 tANI_BOOLEAN ProprietaryRatesEnabled;
541 tANI_BOOLEAN fenableMCCMode;
542 tANI_U16 TxRate;
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -0800543 tANI_U8 fAllowMCCGODiffBI;
Jeff Johnson295189b2012-06-20 16:38:30 -0700544 tANI_U8 AdHocChannel24;
545 tANI_U8 AdHocChannel5G;
546 tANI_U32 impsSleepTime; //in units of microseconds
547 tANI_U32 scanAgeTimeNCNPS; //scan result aging time threshold when Not-Connect-No-Power-Save, in seconds
548 tANI_U32 scanAgeTimeNCPS; //scan result aging time threshold when Not-Connect-Power-Save, in seconds
549 tANI_U32 scanAgeTimeCNPS; //scan result aging time threshold when Connect-No-Power-Save, in seconds,
550 tANI_U32 scanAgeTimeCPS; //scan result aging time threshold when Connect-Power-Savein seconds
551 tANI_U32 BssPreferValue[CSR_NUM_RSSI_CAT]; //each RSSI category has one value
552 int RSSICat[CSR_NUM_RSSI_CAT];
553 tANI_U8 bCatRssiOffset; //to set the RSSI difference for each category
554 tANI_U32 nRoamingTime; //In seconds, CSR will try this long before gives up, 0 means no roaming
555 //Whether to limit the channels to the ones set in Csr11dInfo. If true, the opertaional
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800556 //channels are limited to the default channel list. It is an "AND" operation between the
Jeff Johnson295189b2012-06-20 16:38:30 -0700557 //default channels and the channels in the 802.11d IE.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800558 tANI_BOOLEAN fEnforce11dChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -0700559 //Country Code Priority
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800560 //0 = 802.11D > Configured Country > NV
Jeff Johnson295189b2012-06-20 16:38:30 -0700561 //1 = Configured Country > 802.11D > NV
562 tANI_BOOLEAN fSupplicantCountryCodeHasPriority;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800563 //When true, AP with unknown country code won't be see.
564 //"Unknown country code" means either Ap doesn't have 11d IE or we cannot
Jeff Johnson295189b2012-06-20 16:38:30 -0700565 //find a domain for the country code in its 11d IE.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800566 tANI_BOOLEAN fEnforceCountryCodeMatch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700567 //When true, only APs in the default domain can be seen. If the Ap has "unknown country
568 //code", or the doamin of the country code doesn't match the default domain, the Ap is
569 //not acceptable.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800570 tANI_BOOLEAN fEnforceDefaultDomain;
Jeff Johnson295189b2012-06-20 16:38:30 -0700571
572 tANI_U16 vccRssiThreshold;
573 tANI_U32 vccUlMacLossThreshold;
574
575 tANI_U32 nPassiveMinChnTime; //in units of milliseconds
576 tANI_U32 nPassiveMaxChnTime; //in units of milliseconds
577 tANI_U32 nActiveMinChnTime; //in units of milliseconds
578 tANI_U32 nActiveMaxChnTime; //in units of milliseconds
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800579
580 tANI_U32 nActiveMinChnTimeBtc; //in units of milliseconds
581 tANI_U32 nActiveMaxChnTimeBtc; //in units of milliseconds
Kiran Kumar Lokere458d7322013-05-29 14:29:43 -0700582 tANI_U8 disableAggWithBtc;
Madan Mohan Koyyalamudi4ff9cd62012-10-30 17:48:57 -0700583#ifdef WLAN_AP_STA_CONCURRENCY
584 tANI_U32 nPassiveMinChnTimeConc; //in units of milliseconds
585 tANI_U32 nPassiveMaxChnTimeConc; //in units of milliseconds
586 tANI_U32 nActiveMinChnTimeConc; //in units of milliseconds
587 tANI_U32 nActiveMaxChnTimeConc; //in units of milliseconds
588 tANI_U32 nRestTimeConc; //in units of milliseconds
Sudhir Sattayappa Kohallieb97d502013-05-22 23:16:42 -0700589 tANI_U8 nNumStaChanCombinedConc; //number of channels combined for
590 //Sta in each split scan operation
591 tANI_U8 nNumP2PChanCombinedConc; //number of channels combined for
592 //P2P in each split scan operation
Madan Mohan Koyyalamudi4ff9cd62012-10-30 17:48:57 -0700593#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700594
595 tANI_BOOLEAN IsIdleScanEnabled;
596 //in dBm, the maximum TX power
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800597 //The actual TX power is the lesser of this value and 11d.
Jeff Johnson295189b2012-06-20 16:38:30 -0700598 //If 11d is disable, the lesser of this and default setting.
599 tANI_U8 nTxPowerCap;
600 tANI_U32 statsReqPeriodicity; //stats request frequency from PE while in full power
601 tANI_U32 statsReqPeriodicityInPS;//stats request frequency from PE while in power save
Jeff Johnson295189b2012-06-20 16:38:30 -0700602 tANI_U32 dtimPeriod;
603 tANI_BOOLEAN ssidHidden;
Jeff Johnson295189b2012-06-20 16:38:30 -0700604
605#ifdef WLAN_FEATURE_VOWIFI_11R
606 tCsr11rConfig csr11rConfig;
607#endif
608
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700609#ifdef FEATURE_WLAN_LFR
Srinivas Girigowda830bbd02013-06-13 19:44:16 -0700610 tANI_U8 isFastRoamIniFeatureEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -0800611 tANI_U8 MAWCEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700612#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Srinivas Girigowda830bbd02013-06-13 19:44:16 -0700613 tANI_U8 isRoamOffloadScanEnabled;
614 tANI_BOOLEAN bFastRoamInConIniFeatureEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700615#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700616#endif
617
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800618#ifdef FEATURE_WLAN_ESE
619 tANI_U8 isEseIniFeatureEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700620#endif
621
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800622#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700623 tANI_U8 isFastTransitionEnabled;
624 tANI_U8 RoamRssiDiff;
625 tANI_U8 nImmediateRoamRssiDiff;
626 tANI_BOOLEAN nRoamPrefer5GHz;
627 tANI_BOOLEAN nRoamIntraBand;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -0700628 tANI_BOOLEAN isWESModeEnabled;
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700629 tANI_BOOLEAN nRoamScanControl;
Varun Reddy Yeturu920df212013-05-22 08:07:23 -0700630 tANI_U8 nProbes;
631 tANI_U16 nRoamScanHomeAwayTime;
Jeff Johnson295189b2012-06-20 16:38:30 -0700632#endif
633
634#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
635 tCsrNeighborRoamConfig neighborRoamConfig;
636#endif
637
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800638 /* Instead of Reassoc, send ADDTS/DELTS even when ACM is off for that AC
Jeff Johnson295189b2012-06-20 16:38:30 -0700639 * This is mandated by WMM-AC certification */
640 tANI_BOOLEAN addTSWhenACMIsOff;
641
642 tANI_BOOLEAN fValidateList;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800643 //Remove this code once SLM_Sessionization is supported
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -0700644 //BMPS_WORKAROUND_NOT_NEEDED
Jeff Johnsone7245742012-09-05 17:12:55 -0700645 tANI_BOOLEAN doBMPSWorkaround;
Jeff Johnson295189b2012-06-20 16:38:30 -0700646
647 //To enable/disable scanning 2.4Ghz channels twice on a single scan request from HDD
648 tANI_BOOLEAN fScanTwice;
Jeff Johnsone7245742012-09-05 17:12:55 -0700649#ifdef WLAN_FEATURE_11AC
650 tANI_U32 nVhtChannelWidth;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -0800651 tANI_U8 txBFEnable;
Shailender Karmuchicc3fe442013-02-16 18:18:33 -0800652 tANI_U8 txBFCsnValue;
Ravi Joshi83bfaa12013-05-28 22:12:08 -0700653 tANI_BOOLEAN enableVhtFor24GHz;
Jeff Johnsone7245742012-09-05 17:12:55 -0700654#endif
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -0800655 tANI_U8 txLdpcEnable;
Jeff Johnson295189b2012-06-20 16:38:30 -0700656
Ravi Joshid2ca7c42013-07-23 08:37:49 -0700657 /*
658 * Enable/Disable heartbeat offload
659 */
660 tANI_BOOLEAN enableHeartBeatOffload;
krunal soni5afa96c2013-09-06 22:19:02 -0700661 tANI_U8 isAmsduSupportInAMPDU;
Srinivas Girigowda41c7c5f2013-10-21 19:01:38 -0700662 tANI_U8 nSelect5GHzMargin;
krunal sonie9002db2013-11-25 14:24:17 -0800663 tANI_U8 isCoalesingInIBSSAllowed;
Sandeep Puligillac80f26e2014-03-11 18:36:10 +0530664 tANI_U8 allowDFSChannelRoam;
Jeff Johnson295189b2012-06-20 16:38:30 -0700665}tCsrConfig;
666
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800667typedef struct tagCsrChannelPowerInfo
Jeff Johnson295189b2012-06-20 16:38:30 -0700668{
669 tListElem link;
670 tANI_U8 firstChannel;
671 tANI_U8 numChannels;
672 tANI_U8 txPower;
673 tANI_U8 interChannelOffset;
674}tCsrChannelPowerInfo;
675
676typedef struct tagRoamJoinStatus
677{
678 tSirResultCodes statusCode;
679 //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 -0800680 tANI_U32 reasonCode;
Kiran Kumar Lokerec8550fa2013-04-15 22:23:00 -0700681 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -0700682}tCsrRoamJoinStatus;
683
684typedef struct tagCsrOsChannelMask
685{
686 tANI_U8 numChannels;
687 tANI_BOOLEAN scanEnabled[WNI_CFG_VALID_CHANNEL_LIST_LEN];
688 tANI_U8 channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
689}tCsrOsChannelMask;
690
691
692typedef struct tagCsrScanStruct
693{
694 tScanProfile scanProfile;
695 tANI_U32 nextScanID;
Madan Mohan Koyyalamudica43cdf2012-09-24 13:15:49 -0700696 tDblLinkList scanResultList;
Jeff Johnson295189b2012-06-20 16:38:30 -0700697 tDblLinkList tempScanResults;
698 tANI_BOOLEAN fScanEnable;
699 tANI_BOOLEAN fFullScanIssued;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530700 vos_timer_t hTimerGetResult;
Jeff Johnson295189b2012-06-20 16:38:30 -0700701#ifdef WLAN_AP_STA_CONCURRENCY
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530702 vos_timer_t hTimerStaApConcTimer;
Jeff Johnson295189b2012-06-20 16:38:30 -0700703#endif
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530704 vos_timer_t hTimerIdleScan;
705 vos_timer_t hTimerResultAging;
706 vos_timer_t hTimerResultCfgAging;
Jeff Johnson295189b2012-06-20 16:38:30 -0700707 tPalTimerHandle hTimerBgScan;
708 //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 -0800709 tANI_U8 channelOf11dInfo;
710 tANI_U8 scanResultCfgAgingTime;
Jeff Johnson295189b2012-06-20 16:38:30 -0700711 //changes on every scan, a flag to tell whether conflict 11d info found on each BSS
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800712 tANI_BOOLEAN fAmbiguous11dInfoFound;
Jeff Johnson295189b2012-06-20 16:38:30 -0700713 //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 -0800714 tANI_BOOLEAN fCurrent11dInfoMatch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700715 tANI_BOOLEAN f11dInfoReset; //to indicate whether the 11d info in CFG is reset to default
716 tSirScanType curScanType;
717 tCsrChannel baseChannels; //This are all the supported channels AND(&) to the current eBand
718 tCsrChannel channels11d;
719 tChannelListWithPower defaultPowerTable[WNI_CFG_VALID_CHANNEL_LIST_LEN]; //From NV
720 tChannelListWithPower defaultPowerTable40MHz[WNI_CFG_VALID_CHANNEL_LIST_LEN]; //From NV
721 tANI_U32 numChannelsDefault; //total channels of NV
722 tCsrChannel base20MHzChannels; //The channel base to work on
723 tCsrChannel base40MHzChannels; //center channels for 40MHz channels
724 tDblLinkList channelPowerInfoList24;
725 tDblLinkList channelPowerInfoList5G;
726 tANI_U32 nLastAgeTimeOut;
727 tANI_U32 nAgingCountDown;
Gopichand Nakkala114718f2013-03-25 19:19:46 -0700728 tANI_U8 countryCodeDefault[WNI_CFG_COUNTRY_CODE_LEN]; //The country code from NV
729 tANI_U8 countryCodeCurrent[WNI_CFG_COUNTRY_CODE_LEN];
730 tANI_U8 countryCode11d[WNI_CFG_COUNTRY_CODE_LEN];
Jeff Johnson295189b2012-06-20 16:38:30 -0700731 v_REGDOMAIN_t domainIdDefault; //default regulatory domain
732 v_REGDOMAIN_t domainIdCurrent; //current regulatory domain
Agarwal Ashishd9d72602013-09-13 00:06:17 +0530733 tCsrBssid currentCountryBssid; // Bssid for current country code
Mihir Shetebc866f62014-02-13 16:08:53 +0530734 tANI_S8 currentCountryRSSI; // RSSI for current country code
Jeff Johnson295189b2012-06-20 16:38:30 -0700735 tANI_BOOLEAN f11dInfoApplied;
736 tANI_BOOLEAN fCancelIdleScan;
737#ifdef FEATURE_WLAN_WAPI
738// tANI_U16 NumBkidCandidate;
739// tBkidCandidateInfo BkidCandidateInfo[CSR_MAX_BKID_ALLOWED]; /* Move this as part of SessionEntry */
740#endif /* FEATURE_WLAN_WAPI */
741 tANI_U8 numBGScanChannel; //number of valid channels in the bgScanChannelList
742 tANI_U8 bgScanChannelList[WNI_CFG_BG_SCAN_CHANNEL_LIST_LEN];
743 //the ChannelInfo member is not used in this structure.
744 //numBGScanChannel and bgScanChannelList are used for the BG scan channel info
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800745 tCsrBGScanRequest bgScanParams;
Jeff Johnson295189b2012-06-20 16:38:30 -0700746 tANI_BOOLEAN fRestartIdleScan;
747 tANI_U32 nIdleScanTimeGap; //the time since last trying to trigger idle scan
748 tCsrOsChannelMask osScanChannelMask;//keep a track of channels to be scnned while in traffic condition
749 tANI_U16 nBssLimit; //the maximum number of BSS in scan cache
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800750 /*channelPowerInfoList24 has been seen corrupted. Set this flag to true trying to
Jeff Johnson295189b2012-06-20 16:38:30 -0700751 * detect when it happens. Adding this into code because we can't reproduce it easily.
752 * We don't know when it happens. */
753 tANI_BOOLEAN fValidateList;
754 /*Customer wants to start with an active scan based on the default country code.
755 * This optimization will minimize the driver load to association time.
756 * Based on this flag we will bypass the initial passive scan needed for 11d
757 * to determine the country code & domain */
758 tANI_BOOLEAN fEnableBypass11d;
759
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800760 /*Customer wants to optimize the scan time. Avoiding scans(passive) on DFS
761 * channels while swipping through both bands can save some time
Jeff Johnson295189b2012-06-20 16:38:30 -0700762 * (apprx 1.3 sec) */
763 tANI_BOOLEAN fEnableDFSChnlScan;
764
Jeff Johnsone7245742012-09-05 17:12:55 -0700765 /*
766 * To enable/disable scanning only 2.4Ghz channels on first scan
767 */
768 tANI_BOOLEAN fFirstScanOnly2GChnl;
769
Jeff Johnson295189b2012-06-20 16:38:30 -0700770 tANI_BOOLEAN fDropScanCmd; //true means we don't accept scan commands
771
772#ifdef WLAN_AP_STA_CONCURRENCY
773 tDblLinkList scanCmdPendingList;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800774#endif
Madan Mohan Koyyalamudi470d2cf2012-09-28 14:43:44 -0700775 tCsrChannel occupiedChannels; //This includes all channels on which candidate APs are found
Srinivas Girigowda41c7c5f2013-10-21 19:01:38 -0700776 tANI_S8 inScanResultBestAPRssi;
Mihir Shetefc7ff5b2014-01-27 11:30:05 +0530777
778 csrScanCompleteCallback callback11dScanDone;
Jeff Johnson295189b2012-06-20 16:38:30 -0700779}tCsrScanStruct;
780
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800781#ifdef FEATURE_WLAN_TDLS_INTERNAL
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800782/*
783 * struct to carry TDLS discovery info..
784 */
785typedef struct sCsrTdlsContext
786{
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800787 tDblLinkList tdlsPotentialPeerList ;
788 tANI_U16 tdlsCommonFlag ;
789 tANI_U16 tdlsCommonState ;
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800790 tANI_U16 tdlsPeerCount ;
791}tCsrTdlsCtxStruct;
792
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800793typedef struct sCsrTdlsPeerLinkInfo
794{
795 tListElem tdlsPeerStaLink ;
796 tSirTdlsPeerInfo tdlsDisPeerInfo ;
797}tCsrTdlsPeerLinkinfo ;
798#endif
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800799
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800800
801
Jeff Johnson295189b2012-06-20 16:38:30 -0700802
803//Save the connected information. This structure + connectedProfile
804//should contain all information about the connection
805typedef struct tagRoamCsrConnectedInfo
806{
807 tANI_U32 nBeaconLength; //the length, in bytes, of the beacon frame, can be 0
808 tANI_U32 nAssocReqLength; //the length, in bytes, of the assoc req frame, can be 0
809 tANI_U32 nAssocRspLength; //The length, in bytes, of the assoc rsp frame, can be 0
810#ifdef WLAN_FEATURE_VOWIFI_11R
811 tANI_U32 nRICRspLength; //Length of the parsed RIC response IEs received in reassoc response
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800812#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800813#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -0700814 tANI_U32 nTspecIeLength;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800815#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700816 tANI_U8 *pbFrames; //Point to a buffer contain the beacon, assoc req, assoc rsp frame, in that order
817 //user needs to use nBeaconLength, nAssocReqLength, nAssocRspLength to desice where
818 //each frame starts and ends.
819 tANI_U8 staId;
820}tCsrRoamConnectedInfo;
821
822
823typedef struct tagCsrLinkQualityIndInfo
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800824{
Jeff Johnson295189b2012-06-20 16:38:30 -0700825 csrRoamLinkQualityIndCallback callback;
826 void *context;
827}tCsrLinkQualityIndInfo;
828
829typedef struct tagCsrPeStatsReqInfo
830{
831 tListElem link; /* list links */
832 tANI_U32 statsMask;
833 tANI_U32 periodicity;
834 tANI_BOOLEAN rspPending;
835 vos_timer_t hPeStatsTimer;
836 tANI_BOOLEAN timerRunning;
837 tANI_U8 staId;
838 tANI_U8 numClient;
839 tpAniSirGlobal pMac;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800840 /* To remember if the peStats timer is stopped successfully or not */
Jeff Johnson295189b2012-06-20 16:38:30 -0700841 tANI_BOOLEAN timerStopFailed;
842
843}tCsrPeStatsReqInfo;
844
845typedef struct tagCsrStatsClientReqInfo
846{
847 tListElem link; /* list links */
848 eCsrStatsRequesterType requesterId;
849 tCsrStatsCallback callback;
850 tANI_U32 periodicity;
851 void *pContext;
852 tANI_U32 statsMask;
853 tCsrPeStatsReqInfo *pPeStaEntry;
854 tANI_U8 staId;
855 vos_timer_t timer;
856 tANI_BOOLEAN timerExpired;
857 tpAniSirGlobal pMac; // TODO: Confirm this change BTAMP
858}tCsrStatsClientReqInfo;
859
860typedef struct tagCsrTlStatsReqInfo
861{
862 tANI_U32 periodicity;
863 tANI_BOOLEAN timerRunning;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530864 vos_timer_t hTlStatsTimer;
Jeff Johnson295189b2012-06-20 16:38:30 -0700865 tANI_U8 numClient;
866}tCsrTlStatsReqInfo;
867
868typedef struct tagCsrRoamSession
869{
870 tANI_U8 sessionId; // Session ID
871 tANI_BOOLEAN sessionActive; // TRUE if it is used
872 tCsrBssid selfMacAddr; // For BT-AMP station, this serve as BSSID for self-BSS.
873 csrRoamCompleteCallback callback;
874 void *pContext;
875 eCsrConnectState connectState;
876 tCsrRoamConnectedProfile connectedProfile;
877 tCsrRoamConnectedInfo connectedInfo;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800878 tCsrRoamProfile *pCurRoamProfile;
Jeff Johnson295189b2012-06-20 16:38:30 -0700879 tSirBssDescription *pConnectBssDesc;
880 tANI_U16 NumPmkidCache;
881 tPmkidCacheInfo PmkidCacheInfo[CSR_MAX_PMKID_ALLOWED];
882 tANI_U8 cJoinAttemps;
883 //This may or may not have the up-to-date valid channel list
884 //It is used to get WNI_CFG_VALID_CHANNEL_LIST and not allocate memory all the time
885 tSirMacChanNum validChannelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
886 tANI_S32 sPendingCommands; //0 means CSR is ok to low power
887#ifdef FEATURE_WLAN_WAPI
888 tANI_U16 NumBkidCache;
889 tBkidCacheInfo BkidCacheInfo[CSR_MAX_BKID_ALLOWED];
890#endif /* FEATURE_WLAN_WAPI */
891 tANI_BOOLEAN fRoaming; //indicate whether CSR is roaming (either via lostlink or dynamic roaming)
892 //to remember some parameters needed for START_BSS.
893 //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 -0800894 tCsrRoamStartBssParams bssParams;
Jeff Johnson295189b2012-06-20 16:38:30 -0700895 tANI_U32 nWpaRsnReqIeLength; //the byte count of pWpaRsnIE;
896 tANI_U8 *pWpaRsnReqIE; //this contain the WPA/RSN IE in assoc request or the one sent in beacon (IBSS)
897 tANI_U32 nWpaRsnRspIeLength; //the byte count for pWpaRsnRspIE
898 tANI_U8 *pWpaRsnRspIE; //this contain the WPA/RSN IE in beacon/probe rsp
899#ifdef FEATURE_WLAN_WAPI
900 tANI_U32 nWapiReqIeLength; //the byte count of pWapiReqIE;
901 tANI_U8 *pWapiReqIE; //this contain the WAPI IE in assoc request or the one sent in beacon (IBSS)
902 tANI_U32 nWapiRspIeLength; //the byte count for pWapiRspIE
903 tANI_U8 *pWapiRspIE; //this contain the WAPI IE in beacon/probe rsp
904#endif /* FEATURE_WLAN_WAPI */
Agarwal Ashish4f616132013-12-30 23:32:50 +0530905 tANI_U32 nAddIEScanLength; //length of addIeScan
906 /* This contains the additional IE in (unicast)
907 * probe request at the time of join
908 */
909 tANI_U8 addIEScan[SIR_MAC_MAX_IE_LENGTH+2];
Jeff Johnson295189b2012-06-20 16:38:30 -0700910 tANI_U32 nAddIEAssocLength; //the byte count for pAddIeAssocIE
911 tANI_U8 *pAddIEAssoc; //this contains the additional IE in (re) assoc request
912
913 tANI_TIMESTAMP roamingStartTime; //in units of 10ms
914 tCsrTimerInfo roamingTimerInfo;
915 eCsrRoamingReason roamingReason;
916 tANI_BOOLEAN fCancelRoaming;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530917 vos_timer_t hTimerRoaming;
Jeff Johnson295189b2012-06-20 16:38:30 -0700918 eCsrRoamResult roamResult; //the roamResult that is used when the roaming timer fires
919 tCsrRoamJoinStatus joinFailStatusCode; //This is the reason code for join(assoc) failure
920 //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 -0800921 tANI_U32 roamingStatusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700922 tANI_U16 NumPmkidCandidate;
923 tPmkidCandidateInfo PmkidCandidateInfo[CSR_MAX_PMKID_ALLOWED];
924 #ifdef FEATURE_WLAN_WAPI
925 tANI_U16 NumBkidCandidate;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800926 tBkidCandidateInfo BkidCandidateInfo[CSR_MAX_BKID_ALLOWED];
Jeff Johnson295189b2012-06-20 16:38:30 -0700927#endif
928 tANI_BOOLEAN fWMMConnection;
Sandeep Puligillaaea98a22013-12-04 13:36:32 +0530929 tANI_BOOLEAN fQOSConnection;
930
Jeff Johnson295189b2012-06-20 16:38:30 -0700931#ifdef FEATURE_WLAN_BTAMP_UT_RF
932 //To retry a join later when it fails if so desired
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530933 vos_timer_t hTimerJoinRetry;
Jeff Johnson295189b2012-06-20 16:38:30 -0700934 tCsrTimerInfo joinRetryTimerInfo;
935 tANI_U32 maxRetryCount;
936#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800937#ifdef FEATURE_WLAN_ESE
938 tCsrEseCckmInfo eseCckmInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700939 tANI_BOOLEAN isPrevApInfoValid;
940 tSirMacSSid prevApSSID;
941 tCsrBssid prevApBssid;
942 tANI_U8 prevOpChannel;
943 tANI_U16 clientDissSecs;
944 tANI_U32 roamTS1;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800945#if defined(FEATURE_WLAN_ESE_UPLOAD)
946 tCsrEseCckmIe suppCckmIeInfo;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700947#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700948#endif
949 tANI_U8 bRefAssocStartCnt; //Tracking assoc start indication
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800950 /* to force the AP initiate fresh 802.1x authentication after re-association need to clear
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700951 * the PMKID cache. To clear the cache in this particular case this is added
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800952 * it is needed by the HS 2.0 passpoint certification 5.2.a and b testcases */
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700953 tANI_BOOLEAN fIgnorePMKIDCache;
Jeff Johnson295189b2012-06-20 16:38:30 -0700954} tCsrRoamSession;
955
956typedef struct tagCsrRoamStruct
957{
958 tANI_U32 nextRoamId;
959 tDblLinkList roamCmdPendingList;
960 tDblLinkList channelList5G;
961 tDblLinkList channelList24;
962 tCsrConfig configParam;
963 tANI_U32 numChannelsEeprom; //total channels of eeprom
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800964 tCsrChannel base20MHzChannels; //The channel base to work on
965 tCsrChannel base40MHzChannels; //center channels for 40MHz channels
966 eCsrRoamState curState[CSR_ROAM_SESSION_MAX];
Jeff Johnson295189b2012-06-20 16:38:30 -0700967 eCsrRoamSubState curSubState[CSR_ROAM_SESSION_MAX];
968 //This may or may not have the up-to-date valid channel list
969 //It is used to get WNI_CFG_VALID_CHANNEL_LIST and not allocate memory all the time
970 tSirMacChanNum validChannelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
971 tANI_U32 numValidChannels; //total number of channels in CFG
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800972
Jeff Johnson295189b2012-06-20 16:38:30 -0700973 tANI_S32 sPendingCommands;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530974 vos_timer_t hTimerWaitForKey; //To support timeout for WaitForKey state
Jeff Johnson295189b2012-06-20 16:38:30 -0700975 tCsrSummaryStatsInfo summaryStatsInfo;
976 tCsrGlobalClassAStatsInfo classAStatsInfo;
977 tCsrGlobalClassBStatsInfo classBStatsInfo;
978 tCsrGlobalClassCStatsInfo classCStatsInfo;
979 tCsrGlobalClassDStatsInfo classDStatsInfo;
980 tCsrPerStaStatsInfo perStaStatsInfo[CSR_MAX_STA];
981 tDblLinkList statsClientReqList;
982 tDblLinkList peStatsReqList;
983 tCsrTlStatsReqInfo tlStatsReqInfo;
984 eCsrRoamLinkQualityInd vccLinkQuality;
985 tCsrLinkQualityIndInfo linkQualityIndInfo;
986 v_CONTEXT_t gVosContext; //used for interaction with TL
987 //To specify whether an association or a IBSS is WMM enabled
988 //This parameter is only valid during a join or start BSS command is being executed
989 //tANI_BOOLEAN fWMMConnection; /* Moving it to be part of roamsession */
990 v_U8_t ucACWeights[WLANTL_MAX_AC];
991 /* TODO : Upto here */
992 tCsrTimerInfo WaitForKeyTimerInfo;
993 tCsrRoamSession *roamSession;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800994 tANI_U32 transactionId; // Current transaction ID for internal use.
995#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Jeff Johnson295189b2012-06-20 16:38:30 -0700996 tCsrNeighborRoamControlInfo neighborRoamInfo;
997#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700998#ifdef FEATURE_WLAN_LFR
999 tANI_U8 isFastRoamIniFeatureEnabled;
1000#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001001#ifdef FEATURE_WLAN_ESE
1002 tANI_U8 isEseIniFeatureEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -07001003#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001004#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -07001005 tANI_U8 RoamRssiDiff;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07001006 tANI_BOOLEAN isWESModeEnabled;
Jeff Johnson43971f52012-07-17 12:26:56 -07001007#endif
Leela Venkata Kiran Kumar Reddy Chirala56df73f2014-01-30 14:18:00 -08001008 tANI_U32 deauthRspStatus;
Jeff Johnson295189b2012-06-20 16:38:30 -07001009}tCsrRoamStruct;
1010
1011
1012#define GET_NEXT_ROAM_ID(pRoamStruct) (((pRoamStruct)->nextRoamId + 1 == 0) ? 1 : (pRoamStruct)->nextRoamId)
1013#define CSR_IS_ROAM_STATE(pMac, state, sessionId) ( (state) == (pMac)->roam.curState[sessionId] )
1014
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001015#define CSR_IS_ROAM_STOP(pMac, sessionId) CSR_IS_ROAM_STATE( (pMac), eCSR_ROAMING_STATE_STOP, sessionId )
1016#define CSR_IS_ROAM_INIT(pMac, sessionId) CSR_IS_ROAM_STATE( (pMac), eCSR_ROAMING_STATE_INIT, sessionId )
Jeff Johnson295189b2012-06-20 16:38:30 -07001017#define CSR_IS_ROAM_SCANNING(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_SCANNING, sessionId )
1018#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 -08001019#define CSR_IS_ROAM_IDLE(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_IDLE, sessionId )
Jeff Johnson295189b2012-06-20 16:38:30 -07001020#define CSR_IS_ROAM_JOINED(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_JOINED, sessionId )
1021
1022#define CSR_IS_ROAM_SUBSTATE(pMac, subState, sessionId) ((subState) == (pMac)->roam.curSubState[sessionId])
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001023#define CSR_IS_ROAM_SUBSTATE_JOIN_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOIN_REQ, sessionId)
1024#define CSR_IS_ROAM_SUBSTATE_AUTH_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_AUTH_REQ, sessionId)
1025#define CSR_IS_ROAM_SUBSTATE_REASSOC_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_REASSOC_REQ, sessionId)
1026#define CSR_IS_ROAM_SUBSTATE_DISASSOC_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_REQ, sessionId)
1027#define CSR_IS_ROAM_SUBSTATE_DISASSOC_NO_JOIN(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_NOTHING_TO_JOIN, sessionId)
1028#define CSR_IS_ROAM_SUBSTATE_REASSOC_FAIL(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_REASSOC_FAILURE, sessionId)
1029#define CSR_IS_ROAM_SUBSTATE_DISASSOC_FORCED(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_FORCED, sessionId)
1030#define CSR_IS_ROAM_SUBSTATE_DEAUTH_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DEAUTH_REQ, sessionId)
1031#define CSR_IS_ROAM_SUBSTATE_START_BSS_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_START_BSS_REQ, sessionId)
1032#define CSR_IS_ROAM_SUBSTATE_STOP_BSS_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_STOP_BSS_REQ, sessionId)
1033#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 -07001034#define CSR_IS_ROAM_SUBSTATE_CONFIG(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_CONFIG, sessionId)
1035#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 -08001036#define CSR_IS_ROAM_SUBSTATE_DISASSOC_HO(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_HANDOFF, sessionId)
1037#define CSR_IS_ROAM_SUBSTATE_HO_NT(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOINED_NO_TRAFFIC, sessionId)
1038#define CSR_IS_ROAM_SUBSTATE_HO_NRT(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOINED_NON_REALTIME_TRAFFIC, sessionId)
1039#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 -07001040
1041#define CSR_IS_PHY_MODE_B_ONLY(pMac) \
1042 ((eCSR_DOT11_MODE_11b == (pMac)->roam.configParam.phyMode) ||\
1043 (eCSR_DOT11_MODE_11b_ONLY == (pMac)->roam.configParam.phyMode))
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001044
Jeff Johnson295189b2012-06-20 16:38:30 -07001045#define CSR_IS_PHY_MODE_G_ONLY(pMac) \
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001046 (eCSR_DOT11_MODE_11g == (pMac)->roam.configParam.phyMode || eCSR_DOT11_MODE_11g_ONLY == (pMac)->roam.configParam.phyMode)
1047
Jeff Johnson295189b2012-06-20 16:38:30 -07001048#define CSR_IS_PHY_MODE_A_ONLY(pMac) \
1049 ((eCSR_DOT11_MODE_11a == (pMac)->roam.configParam.phyMode) ||\
1050 (eCSR_DOT11_MODE_11a_ONLY == (pMac)->roam.configParam.phyMode))
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001051
Jeff Johnsone7245742012-09-05 17:12:55 -07001052#ifdef WLAN_FEATURE_11AC
1053#define CSR_IS_PHY_MODE_DUAL_BAND(phyMode) \
1054 ((eCSR_DOT11_MODE_abg & (phyMode)) || (eCSR_DOT11_MODE_11n & (phyMode)) || \
1055 (eCSR_DOT11_MODE_11ac & (phyMode)) || \
1056 (eCSR_DOT11_MODE_TAURUS & (phyMode)) || \
1057 (eCSR_DOT11_MODE_AUTO & (phyMode)))
1058#else
Jeff Johnson295189b2012-06-20 16:38:30 -07001059#define CSR_IS_PHY_MODE_DUAL_BAND(phyMode) \
1060 ((eCSR_DOT11_MODE_abg & (phyMode)) || (eCSR_DOT11_MODE_11n & (phyMode)) || \
1061 (eCSR_DOT11_MODE_TAURUS & (phyMode)) || \
1062 (eCSR_DOT11_MODE_AUTO & (phyMode)))
Jeff Johnsone7245742012-09-05 17:12:55 -07001063#endif
1064
Jeff Johnson295189b2012-06-20 16:38:30 -07001065
1066// this function returns TRUE if the NIC is operating exclusively in the 2.4 GHz band, meaning
1067// it is NOT operating in the 5.0 GHz band.
1068#define CSR_IS_24_BAND_ONLY(pMac) \
1069 (eCSR_BAND_24 == (pMac)->roam.configParam.eBand)
1070
1071#define CSR_IS_5G_BAND_ONLY(pMac) \
1072 (eCSR_BAND_5G == (pMac)->roam.configParam.eBand)
1073
1074#define CSR_IS_RADIO_DUAL_BAND(pMac) \
1075 (eCSR_BAND_ALL == (pMac)->roam.configParam.bandCapability)
1076
1077#define CSR_IS_RADIO_BG_ONLY(pMac) \
1078 (eCSR_BAND_24 == (pMac)->roam.configParam.bandCapability)
1079
1080// this function returns TRUE if the NIC is operating exclusively in the 5.0 GHz band, meaning
1081// it is NOT operating in the 2.4 GHz band
1082#define CSR_IS_RADIO_A_ONLY(pMac) \
1083 (eCSR_BAND_5G == (pMac)->roam.configParam.bandCapability)
1084
1085// this function returns TRUE if the NIC is operating in both bands.
1086#define CSR_IS_OPEARTING_DUAL_BAND(pMac) \
1087 ((eCSR_BAND_ALL == (pMac)->roam.configParam.bandCapability) && (eCSR_BAND_ALL == (pMac)->roam.configParam.eBand))
1088
1089// this function returns TRUE if the NIC can operate in the 5.0 GHz band (could operate in the
1090// 2.4 GHz band also).
1091#define CSR_IS_OPERATING_A_BAND(pMac) \
1092 (CSR_IS_OPEARTING_DUAL_BAND((pMac)) || CSR_IS_RADIO_A_ONLY((pMac)) || CSR_IS_5G_BAND_ONLY((pMac)))
1093
1094// this function returns TRUE if the NIC can operate in the 2.4 GHz band (could operate in the
1095// 5.0 GHz band also).
1096#define CSR_IS_OPERATING_BG_BAND(pMac) \
1097 (CSR_IS_OPEARTING_DUAL_BAND((pMac)) || CSR_IS_RADIO_BG_ONLY((pMac)) || CSR_IS_24_BAND_ONLY((pMac)))
1098
1099#define CSR_IS_CHANNEL_5GHZ(chnNum) \
Jeff Johnsone7245742012-09-05 17:12:55 -07001100 (((chnNum) >= CSR_MIN_5GHz_CHANNEL_NUMBER) && ((chnNum) <= CSR_MAX_5GHz_CHANNEL_NUMBER))
Jeff Johnson295189b2012-06-20 16:38:30 -07001101
Srinivas Girigowdade697412013-02-14 16:31:48 -08001102#define CSR_IS_CHANNEL_DFS(chnNum) \
1103 (NV_CHANNEL_ENABLE != vos_nv_getChannelEnabledState(chnNum))
1104
Jeff Johnson295189b2012-06-20 16:38:30 -07001105#define CSR_IS_CHANNEL_24GHZ(chnNum) \
1106 (((chnNum) > 0) && ((chnNum) <= CSR_MAX_24GHz_CHANNEL_NUMBER))
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001107
Jeff Johnson295189b2012-06-20 16:38:30 -07001108#define CSR_IS_SAME_BAND_CHANNELS(ch1, ch2) (CSR_IS_CHANNEL_5GHZ(ch1) == CSR_IS_CHANNEL_5GHZ(ch2))
1109
1110
1111#define CSR_IS_11D_INFO_FOUND(pMac) \
1112 (0 != (pMac)->scan.channelOf11dInfo)
1113// DEAUTHIND
1114#define CSR_IS_ROAMING(pSession) ((CSR_IS_LOSTLINK_ROAMING((pSession)->roamingReason)) || \
1115 (eCsrDynamicRoaming == (pSession)->roamingReason) || \
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001116 (eCsrReassocRoaming == (pSession)->roamingReason))
Jeff Johnson295189b2012-06-20 16:38:30 -07001117
1118
1119#define CSR_IS_SET_KEY_COMMAND( pCommand ) ( eSmeCommandSetKey == (pCommand)->command )
1120
1121#define CSR_IS_ADDTS_WHEN_ACMOFF_SUPPORTED(pMac) (pMac->roam.configParam.addTSWhenACMIsOff)
1122// DEAUTHIND
1123#define CSR_IS_LOSTLINK_ROAMING(reason) ((eCsrLostlinkRoamingDisassoc == (reason)) || (eCsrLostlinkRoamingDeauth == (reason)))
1124
Venkata Prathyusha Kuntupalli239278b2013-03-26 15:58:18 -07001125#define CSR_IS_ROAMING_COMMAND(pCommand) ((eCsrLostLink1 == (pCommand)->u.roamCmd.roamReason) ||\
1126 (eCsrLostLink2 == (pCommand)->u.roamCmd.roamReason) ||\
1127 (eCsrLostLink3 == (pCommand)->u.roamCmd.roamReason) )
1128
1129
Jeff Johnson295189b2012-06-20 16:38:30 -07001130//Stop CSR from asking for IMPS, This function doesn't disable IMPS from CSR
1131void csrScanSuspendIMPS( tpAniSirGlobal pMac );
1132//Start CSR from asking for IMPS. This function doesn't trigger CSR to request entering IMPS
1133//because IMPS maybe disabled.
1134void csrScanResumeIMPS( tpAniSirGlobal pMac );
1135
1136eHalStatus csrInitGetChannels(tpAniSirGlobal pMac);
Srinivas, Dasari42bf7702014-02-07 11:29:53 +05301137eHalStatus csrScanFilterResults(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -07001138
1139eHalStatus csrSetModifyProfileFields(tpAniSirGlobal pMac, tANI_U32 sessionId,
1140 tCsrRoamModifyProfileFields *pModifyProfileFields);
1141/* ---------------------------------------------------------------------------
1142 \fn csrGetModifyProfileFields
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001143 \brief HDD or SME - QOS calls this function to get the current values of
Jeff Johnson295189b2012-06-20 16:38:30 -07001144 connected profile fields changing which can cause reassoc.
1145 This function must be called after CFG is downloaded and STA is in connected
1146 state.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001147 \param pModifyProfileFields - pointer to the connected profile fields
Jeff Johnson295189b2012-06-20 16:38:30 -07001148 changing which can cause reassoc
1149
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001150 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001151 -------------------------------------------------------------------------------*/
1152eHalStatus csrGetModifyProfileFields(tpAniSirGlobal pMac, tANI_U32 sessionId,
1153 tCsrRoamModifyProfileFields * pModifyProfileFields);
1154void csrSetGlobalCfgs( tpAniSirGlobal pMac );
1155void csrSetDefaultDot11Mode( tpAniSirGlobal pMac );
1156void csrScanSetChannelMask(tpAniSirGlobal pMac, tCsrChannelInfo *pChannelInfo);
1157tANI_BOOLEAN csrIsConnStateDisconnected(tpAniSirGlobal pMac, tANI_U32 sessionId);
1158tANI_BOOLEAN csrIsConnStateConnectedIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1159tANI_BOOLEAN csrIsConnStateDisconnectedIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1160tANI_BOOLEAN csrIsConnStateConnectedInfra( tpAniSirGlobal pMac, tANI_U32 sessionId );
1161tANI_BOOLEAN csrIsConnStateConnected( tpAniSirGlobal pMac, tANI_U32 sessionId );
1162tANI_BOOLEAN csrIsConnStateInfra( tpAniSirGlobal pMac, tANI_U32 sessionId );
1163tANI_BOOLEAN csrIsConnStateIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1164tANI_BOOLEAN csrIsConnStateWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1165tANI_BOOLEAN csrIsConnStateConnectedWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1166tANI_BOOLEAN csrIsConnStateDisconnectedWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1167tANI_BOOLEAN csrIsAnySessionInConnectState( tpAniSirGlobal pMac );
1168tANI_BOOLEAN csrIsAllSessionDisconnected( tpAniSirGlobal pMac );
Madan Mohan Koyyalamudi48081ef2012-12-04 16:49:55 -08001169tANI_BOOLEAN csrIsStaSessionConnected( tpAniSirGlobal pMac );
1170tANI_BOOLEAN csrIsP2pSessionConnected( tpAniSirGlobal pMac );
Madan Mohan Koyyalamudid3d22592012-09-24 14:01:29 -07001171tANI_BOOLEAN csrIsAnySessionConnected( tpAniSirGlobal pMac );
Jeff Johnson295189b2012-06-20 16:38:30 -07001172tANI_BOOLEAN csrIsInfraConnected( tpAniSirGlobal pMac );
1173tANI_BOOLEAN csrIsConcurrentInfraConnected( tpAniSirGlobal pMac );
Jeff Johnsone7245742012-09-05 17:12:55 -07001174tANI_BOOLEAN csrIsConcurrentSessionRunning( tpAniSirGlobal pMac );
Jeff Johnsone7245742012-09-05 17:12:55 -07001175tANI_BOOLEAN csrIsInfraApStarted( tpAniSirGlobal pMac );
Jeff Johnson295189b2012-06-20 16:38:30 -07001176tANI_BOOLEAN csrIsIBSSStarted( tpAniSirGlobal pMac );
1177tANI_BOOLEAN csrIsBTAMPStarted( tpAniSirGlobal pMac );
1178tANI_BOOLEAN csrIsBTAMP( tpAniSirGlobal pMac, tANI_U32 sessionId );
1179eHalStatus csrIsBTAMPAllowed( tpAniSirGlobal pMac, tANI_U32 chnId );
Jeff Johnsone7245742012-09-05 17:12:55 -07001180tANI_BOOLEAN csrIsValidMcConcurrentSession(tpAniSirGlobal pMac, tANI_U32 sessionId,
1181 tSirBssDescription *pBssDesc);
Jeff Johnson295189b2012-06-20 16:38:30 -07001182tANI_BOOLEAN csrIsConnStateConnectedInfraAp( tpAniSirGlobal pMac, tANI_U32 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -07001183/*----------------------------------------------------------------------------
1184 \fn csrRoamRegisterLinkQualityIndCallback
1185
1186 \brief
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001187 a CSR function to allow HDD to register a callback handler with CSR for
1188 link quality indications.
Jeff Johnson295189b2012-06-20 16:38:30 -07001189
1190 Only one callback may be registered at any time.
1191 In order to deregister the callback, a NULL cback may be provided.
1192
1193 Registration happens in the task context of the caller.
1194
1195 \param callback - Call back being registered
1196 \param pContext - user data
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001197
Jeff Johnson295189b2012-06-20 16:38:30 -07001198 DEPENDENCIES: After CSR open
1199
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001200 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001201-----------------------------------------------------------------------------*/
1202eHalStatus csrRoamRegisterLinkQualityIndCallback(tpAniSirGlobal pMac,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001203 csrRoamLinkQualityIndCallback callback,
Jeff Johnson295189b2012-06-20 16:38:30 -07001204 void *pContext);
1205/* ---------------------------------------------------------------------------
1206 \fn csrGetStatistics
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001207 \brief csr function that client calls to register a callback to get
1208 different PHY level statistics from CSR.
1209
Jeff Johnson295189b2012-06-20 16:38:30 -07001210 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
1211 \param statsMask - The different category/categories of stats requester is looking for
1212 \param callback - SME sends back the requested stats using the callback
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001213 \param periodicity - If requester needs periodic update, 0 means it's an one
Jeff Johnson295189b2012-06-20 16:38:30 -07001214 time request
1215 \param cache - If requester is happy with cached stats
1216 \param staId - The station ID for which the stats is requested for
1217 \param pContext - user context to be passed back along with the callback
1218
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001219 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001220 ---------------------------------------------------------------------------*/
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001221eHalStatus csrGetStatistics(tpAniSirGlobal pMac, eCsrStatsRequesterType requesterId,
1222 tANI_U32 statsMask,
1223 tCsrStatsCallback callback,
1224 tANI_U32 periodicity, tANI_BOOLEAN cache,
Jeff Johnson295189b2012-06-20 16:38:30 -07001225 tANI_U8 staId, void *pContext);
1226
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +05301227/* ---------------------------------------------------------------------------
1228 \fn csrGetTLSTAState
1229 \helper function to get the TL STA State whenever the function is called.
1230
1231 \param staId - The staID to be passed to the TL
1232 to get the relevant TL STA State
1233 \return the state as tANI_U16
1234 ---------------------------------------------------------------------------*/
1235tANI_U16 csrGetTLSTAState(tpAniSirGlobal pMac, tANI_U8 staId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001236
1237eHalStatus csrGetRssi(tpAniSirGlobal pMac,tCsrRssiCallback callback,tANI_U8 staId,tCsrBssid bssId,void * pContext,void * pVosContext);
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05301238
1239/* ---------------------------------------------------------------------------
1240 \fn csrGetSnr
1241 \brief csr function that client calls to register a callback to get
1242 SNR stored in TL
1243
1244 \param callback - SME sends back the requested stats using the callback
1245 \param staId - The station ID for which the stats is requested for
1246 \param bssid - The bssid for the connected session
1247 \param pContext - user context to be passed back along with the callback
1248
1249 \return eHalStatus
1250 ---------------------------------------------------------------------------*/
1251eHalStatus csrGetSnr(tpAniSirGlobal pMac, tCsrSnrCallback callback,
1252 tANI_U8 staId, tCsrBssid bssId, void *pContext);
1253
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001254#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08001255eHalStatus csrGetRoamRssi(tpAniSirGlobal pMac,
1256 tCsrRssiCallback callback,
1257 tANI_U8 staId,
1258 tCsrBssid bssId,
1259 void * pContext,
1260 void * pVosContext);
1261#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001262
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001263#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001264eHalStatus csrGetTsmStats(tpAniSirGlobal pMac, tCsrTsmStatsCallback callback, tANI_U8 staId,
1265 tCsrBssid bssId, void *pContext, void* pVosContext,
1266 tANI_U8 tid);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001267#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001268
Jeff Johnson295189b2012-06-20 16:38:30 -07001269eHalStatus csrRoamRegisterCallback(tpAniSirGlobal pMac, csrRoamCompleteCallback callback, void *pContext);
1270/* ---------------------------------------------------------------------------
1271 \fn csrGetConfigParam
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001272 \brief HDD calls this function to get the global settings currently maintained by CSR.
Jeff Johnson295189b2012-06-20 16:38:30 -07001273 \param pParam - caller allocated memory
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001274 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001275 -------------------------------------------------------------------------------*/
1276eHalStatus csrGetConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam);
1277
1278/* ---------------------------------------------------------------------------
1279 \fn csrMsgProcessor
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001280 \brief HDD calls this function to change some global settings.
Jeff Johnson295189b2012-06-20 16:38:30 -07001281 caller must set the all fields or call csrGetConfigParam to prefill the fields.
1282 \param pParam - caller allocated memory
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001283 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001284 -------------------------------------------------------------------------------*/
1285eHalStatus csrChangeDefaultConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam);
1286
1287
1288/* ---------------------------------------------------------------------------
1289 \fn csrMsgProcessor
1290 \brief HDD calls this function for the messages that are handled by CSR.
1291 \param pMsgBuf - a pointer to a buffer that maps to various structures base on the message type.
1292 The beginning of the buffer can always map to tSirSmeRsp.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001293 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001294 -------------------------------------------------------------------------------*/
1295eHalStatus csrMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf );
1296
1297/* ---------------------------------------------------------------------------
1298 \fn csrOpen
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001299 \brief This function must be called before any API call to CSR.
1300 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001301 -------------------------------------------------------------------------------*/
1302eHalStatus csrOpen(tpAniSirGlobal pMac);
Mihir Shetee1093ba2014-01-21 20:13:32 +05301303
1304/* ---------------------------------------------------------------------------
1305 \fn csrInitChannels
1306 \brief This function must be called to initialize CSR channel lists
1307 \return eHalStatus
1308 -------------------------------------------------------------------------------*/
1309eHalStatus csrInitChannels(tpAniSirGlobal pMac);
1310
Jeff Johnson295189b2012-06-20 16:38:30 -07001311/* ---------------------------------------------------------------------------
1312 \fn csrClose
1313 \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 -08001314 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001315 -------------------------------------------------------------------------------*/
1316eHalStatus csrClose(tpAniSirGlobal pMac);
1317/* ---------------------------------------------------------------------------
1318 \fn csrStart
1319 \brief To start CSR.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001320 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001321 -------------------------------------------------------------------------------*/
1322eHalStatus csrStart(tpAniSirGlobal pMac);
1323/* ---------------------------------------------------------------------------
1324 \fn csrStop
1325 \brief To stop CSR. CSR still keeps its current setting.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001326 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001327 -------------------------------------------------------------------------------*/
Kiet Lama72a2322013-11-15 11:18:11 +05301328eHalStatus csrStop(tpAniSirGlobal pMac, tHalStopType stopType);
Jeff Johnson295189b2012-06-20 16:38:30 -07001329/* ---------------------------------------------------------------------------
1330 \fn csrReady
1331 \brief To let CSR is ready to operate
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001332 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001333 -------------------------------------------------------------------------------*/
1334eHalStatus csrReady(tpAniSirGlobal pMac);
1335
1336#ifdef FEATURE_WLAN_WAPI
1337eHalStatus csrRoamGetBKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pNum,
1338 tBkidCacheInfo *pBkidCache);
1339
1340
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001341eHalStatus csrScanGetBKIDCandidateList(tpAniSirGlobal pMac, tANI_U32 sessionId,
Jeff Johnson295189b2012-06-20 16:38:30 -07001342 tBkidCandidateInfo *pBkidList, tANI_U32 *pNumItems );
1343tANI_U32 csrRoamGetNumBKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId);
1344eHalStatus csrRoamSetBKIDCache( tpAniSirGlobal pMac, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
1345 tANI_U32 numItems );
1346/* ---------------------------------------------------------------------------
1347 \fn csrRoamGetWapiReqIE
1348 \brief return the WAPI IE CSR passes to PE to JOIN request or START_BSS request
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001349 \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 -07001350 needed or IE length in pBuf.
1351 \param pBuf - Caller allocated memory that contain the IE field, if any, upon return
1352 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
1353 -------------------------------------------------------------------------------*/
1354eHalStatus csrRoamGetWapiReqIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf);
1355
1356/* ---------------------------------------------------------------------------
1357 \fn csrRoamGetWapiRspIE
1358 \brief return the WAPI IE from the beacon or probe rsp if connected
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001359 \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 -07001360 needed or IE length in pBuf.
1361 \param pBuf - Caller allocated memory that contain the IE field, if any, upon return
1362 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
1363 -------------------------------------------------------------------------------*/
1364eHalStatus csrRoamGetWapiRspIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf);
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001365tANI_U8 csrConstructWapiIe( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
Jeff Johnson295189b2012-06-20 16:38:30 -07001366 tSirBssDescription *pSirBssDesc, tDot11fBeaconIEs *pIes, tCsrWapiIe *pWapiIe );
1367#endif /* FEATURE_WLAN_WAPI */
1368
Jeff Johnson295189b2012-06-20 16:38:30 -07001369eHalStatus csrRoamUpdateAPWPSIE( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirAPWPSIEs *pAPWPSIES );
1370eHalStatus csrRoamUpdateWPARSNIEs( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirRSNie * pAPSirRSNie);
Jeff Johnson295189b2012-06-20 16:38:30 -07001371void csrSetCfgPrivacy( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy );
1372tANI_S8 csrGetInfraSessionId( tpAniSirGlobal pMac );
1373tANI_U8 csrGetInfraOperationChannel( tpAniSirGlobal pMac, tANI_U8 sessionId);
1374tANI_U8 csrGetConcurrentOperationChannel( tpAniSirGlobal pMac );
1375
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001376eHalStatus csrRoamCopyConnectProfile(tpAniSirGlobal pMac, tANI_U32 sessionId,
Jeff Johnson295189b2012-06-20 16:38:30 -07001377 tCsrRoamConnectedProfile *pProfile);
1378tANI_BOOLEAN csrIsSetKeyAllowed(tpAniSirGlobal pMac, tANI_U32 sessionId);
1379
1380void csrSetOppositeBandChannelInfo( tpAniSirGlobal pMac );
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001381void csrConstructCurrentValidChannelList( tpAniSirGlobal pMac, tDblLinkList *pChannelSetList,
Jeff Johnson295189b2012-06-20 16:38:30 -07001382 tANI_U8 *pChannelList, tANI_U8 bSize, tANI_U8 *pNumChannels );
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08001383
1384#ifdef FEATURE_WLAN_SCAN_PNO
Srikant Kuppa066904f2013-05-07 13:56:02 -07001385eHalStatus csrScanSavePreferredNetworkFound(tpAniSirGlobal pMac,
1386 tSirPrefNetworkFoundInd *pPrefNetworkFoundInd);
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08001387#endif //FEATURE_WLAN_SCAN_PNO
Jeff Johnson295189b2012-06-20 16:38:30 -07001388#endif
1389
1390#ifdef WLAN_FEATURE_VOWIFI_11R
1391//Returns whether the current association is a 11r assoc or not
1392tANI_BOOLEAN csrRoamIs11rAssoc(tpAniSirGlobal pMac);
1393#endif
1394
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001395#ifdef FEATURE_WLAN_ESE
1396//Returns whether the current association is a ESE assoc or not
1397tANI_BOOLEAN csrRoamIsESEAssoc(tpAniSirGlobal pMac);
1398tANI_BOOLEAN csrRoamIsEseIniFeatureEnabled(tpAniSirGlobal pMac);
1399tANI_BOOLEAN csrNeighborRoamIsESEAssoc(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -07001400#endif
1401
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001402//Remove this code once SLM_Sessionization is supported
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001403//BMPS_WORKAROUND_NOT_NEEDED
Jeff Johnson295189b2012-06-20 16:38:30 -07001404void csrDisconnectAllActiveSessions(tpAniSirGlobal pMac);
Mohit Khanna349bc392012-09-11 17:24:52 -07001405
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001406#ifdef FEATURE_WLAN_LFR
1407//Returns whether "Legacy Fast Roaming" is enabled...or not
Madan Mohan Koyyalamudi03aae5f2012-11-28 01:51:22 +05301408tANI_BOOLEAN csrRoamIsFastRoamEnabled(tpAniSirGlobal pMac, tANI_U32 sessionId);
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001409#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1410tANI_BOOLEAN csrRoamIsRoamOffloadScanEnabled(tpAniSirGlobal pMac);
1411#endif
Madan Mohan Koyyalamudi470d2cf2012-09-28 14:43:44 -07001412tANI_BOOLEAN csrIsChannelPresentInList( tANI_U8 *pChannelList, int numChannels, tANI_U8 channel );
1413VOS_STATUS csrAddToChannelListFront( tANI_U8 *pChannelList, int numChannels, tANI_U8 channel );
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001414#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1415eHalStatus csrScanRequestLfrResult(tpAniSirGlobal pMac, tANI_U32 sessionId,
1416 csrScanCompleteCallback callback, void *pContext);
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07001417eHalStatus csrRoamOffloadScanRspHdlr(tpAniSirGlobal pMac, tANI_U8 reason);
1418eHalStatus csrHandoffRequest(tpAniSirGlobal pMac, tCsrHandoffRequest *pHandoffInfo);
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001419#endif
1420tANI_BOOLEAN csrRoamIsStaMode(tpAniSirGlobal pMac, tANI_U32 sessionId);
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001421#endif
1422