blob: 4687e5eda42c792bbc3aae2fb9abb79c5cd05cb1 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Kiet Lamaa8e15a2014-02-11 23:30:06 -08002* Copyright (c) 2011-2014 Qualcomm Atheros, Inc.
3* All Rights Reserved.
4* Qualcomm Atheros Confidential and Proprietary.
5*/
Jeff Johnson295189b2012-06-20 16:38:30 -07006
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08007/** ------------------------------------------------------------------------- *
8 ------------------------------------------------------------------------- *
Jeff Johnson295189b2012-06-20 16:38:30 -07009
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080010
Jeff Johnson295189b2012-06-20 16:38:30 -070011 \file csrInternal.h
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080012
Jeff Johnson295189b2012-06-20 16:38:30 -070013 Define internal data structure for MAC.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080014
15 Copyright (C) 2006 Airgo Networks, Incorporated
Jeff Johnson295189b2012-06-20 16:38:30 -070016 ========================================================================== */
17#ifndef CSRINTERNAL_H__
18#define CSRINTERNAL_H__
19
Jeff Johnson295189b2012-06-20 16:38:30 -070020#include "vos_status.h"
21#include "vos_lock.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070022
23#include "palTimer.h"
24#include "csrSupport.h"
25#include "vos_nvitem.h"
26#include "wlan_qct_tl.h"
27
28#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
29#include "csrNeighborRoam.h"
30#endif
31
32#define CSR_MAX_STA (HAL_NUM_STA)
33
34#define CSR_SME_SCAN_FLAGS_DELETE_CACHE 0x80
35
36#define CSR_TITAN_MAX_RATE_MIMO_CB 240
37#define CSR_TITAN_MAX_RATE_MIMO 126
38
39//define scan return criteria. LIM should use these define as well
40#define CSR_SCAN_RETURN_AFTER_ALL_CHANNELS ( 0 )
41#define CSR_SCAN_RETURN_AFTER_FIRST_MATCH ( 0x01 )
42#define CSR_SCAN_RETURN_AFTER_5_BAND_11d_FOUND ( 0x80 )
43#define CSR_SCAN_RETURN_AFTER_24_BAND_11d_FOUND ( 0x40 )
44#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 -070045#define CSR_NUM_RSSI_CAT 15
Jeff Johnson295189b2012-06-20 16:38:30 -070046#define CSR_MAX_STATISTICS_REQ 10
Varun Reddy Yeturu9d4102c2013-12-02 15:47:03 -080047#define CSR_ROAM_SCAN_CHANNEL_SWITCH_TIME 3
Jeff Johnson295189b2012-06-20 16:38:30 -070048
49//Support for multiple session
50#define CSR_SESSION_ID_INVALID 0xFF // session ID invalid
51#define CSR_ROAM_SESSION_MAX 5 // No of sessions to be supported, and a
52 // session is for Infra, IBSS or BT-AMP
53
54#define CSR_IS_SESSION_VALID( pMac, sessionId ) ( ( (sessionId) < CSR_ROAM_SESSION_MAX ) \
55 && ( (pMac)->roam.roamSession[(sessionId)].sessionActive ) )
56#define CSR_GET_SESSION( pMac, sessionId ) \
57( \
58 (sessionId < CSR_ROAM_SESSION_MAX) ? \
59 (&(pMac)->roam.roamSession[(sessionId)]) :\
60 NULL \
61)
62
Srinivas Girigowda41c7c5f2013-10-21 19:01:38 -070063#define CSR_IS_SELECT_5GHZ_MARGIN( pMac ) \
64( \
65 (((pMac)->roam.configParam.nSelect5GHzMargin)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
66)
67
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -080068#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
69#define CSR_IS_ROAM_PREFER_5GHZ( pMac ) \
70( \
71 (((pMac)->roam.configParam.nRoamPrefer5GHz)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
72)
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -070073#define CSR_IS_ROAM_INTRA_BAND_ENABLED( pMac ) \
74( \
75 (((pMac)->roam.configParam.nRoamIntraBand)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
76)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -080077#endif
78
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -070079#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
80#define CSR_IS_ROAM_SCAN_OFFLOAD_ENABLED( pMac ) \
81( \
82 (((pMac)->roam.configParam.isRoamOffloadScanEnabled)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
83)
Srinivas Girigowda830bbd02013-06-13 19:44:16 -070084
85#define CSR_IS_FASTROAM_IN_CONCURRENCY_INI_FEATURE_ENABLED( pMac ) \
86( \
87 (((pMac)->roam.configParam.bFastRoamInConIniFeatureEnabled)?eANI_BOOLEAN_TRUE:eANI_BOOLEAN_FALSE) \
88)
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -070089#endif
90
Madan Mohan Koyyalamudi470d2cf2012-09-28 14:43:44 -070091//Support for "Fast roaming" (i.e., CCX, LFR, or 802.11r.)
92#define CSR_BG_SCAN_OCCUPIED_CHANNEL_LIST_LEN 15
Jeff Johnson295189b2012-06-20 16:38:30 -070093
94typedef enum
95{
96 //eCSR_CFG_DOT11_MODE_BEST = 0,
97 eCSR_CFG_DOT11_MODE_TAURUS = 0,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080098 eCSR_CFG_DOT11_MODE_ABG,
99 eCSR_CFG_DOT11_MODE_11A,
100 eCSR_CFG_DOT11_MODE_11B,
101 eCSR_CFG_DOT11_MODE_11G,
102 eCSR_CFG_DOT11_MODE_11N,
103 eCSR_CFG_DOT11_MODE_POLARIS,
104 eCSR_CFG_DOT11_MODE_TITAN,
Jeff Johnsone7245742012-09-05 17:12:55 -0700105#ifdef WLAN_FEATURE_11AC
106 eCSR_CFG_DOT11_MODE_11AC,
107#endif
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800108 eCSR_CFG_DOT11_MODE_11G_ONLY,
109 eCSR_CFG_DOT11_MODE_11N_ONLY,
Jeff Johnsone7245742012-09-05 17:12:55 -0700110#ifdef WLAN_FEATURE_11AC
111 eCSR_CFG_DOT11_MODE_11AC_ONLY,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800112#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700113 //This value can never set to CFG. It is for CSR's internal use
114 eCSR_CFG_DOT11_MODE_AUTO,
115}eCsrCfgDot11Mode; //Used to determine what to set to the WNI_CFG_DOT11_MODE
116
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800117typedef enum etCsrRoamCommands
Jeff Johnson295189b2012-06-20 16:38:30 -0700118{
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800119 eCsrRoamNoCommand,
Jeff Johnson295189b2012-06-20 16:38:30 -0700120 eCsrRoamCommandScan,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800121 eCsrRoamCommandRoam,
122 eCsrRoamCommandWmStatusChange,
Jeff Johnson295189b2012-06-20 16:38:30 -0700123 eCsrRoamCommandSetKey,
124 eCsrRoamCommandRemoveKey,
125
126} eCsrRoamCommands;
127
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800128typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700129{
130 eCsrScanOther = 1,
131 eCsrScanLostLink1,
132 eCsrScanLostLink2,
133 eCsrScanLostLink3,
134 eCsrScanLostLink4,
135 eCsrScan11d1, //First 11d scan
136 eCsrScan11d2, //First 11d scan has failed
137 eCsrScan11dDone, //11d scan succeeded, try the rest of the channel
138 eCsrScanUserRequest,
139 eCsrScanGetResult,
140 eCsrScanSetBGScanParam, //used for HO too - bg scan request in NT Handoff sub-state
141 eCsrScanForSsid,
142 eCsrScanForCapsChange,
143 eCsrScanBGScanAbort,
144 eCsrScanBGScanEnable,
145 eCsrScanIdleScan,
146 eCsrScanGetScanChnInfo, //To get the list of channels scanned
147
148 eCsrScanBgScan, // bg scan request in NRT & RT Handoff sub-states
149 eCsrScanProbeBss, // directed probe on an entry from the candidate list - HO
150 eCsrScanAbortBgScan, //aborting a BG scan (meaning the scan is triggered by LIM timer)
151 eCsrScanAbortNormalScan, //aborting a normal scan (the scan is trigger by eWNI_SME_SCAN_REQ)
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700152 eCsrScanP2PFindPeer,
153 eCsrScanGetLfrResult, // get the LFR candidates from PE scan cache
Jeff Johnson295189b2012-06-20 16:38:30 -0700154}eCsrScanReason;
155
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800156typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700157{
158 eCsrNoConnection, // Roaming because we have not established the initial connection.
159 eCsrCapsChange, // roaming because LIM reported a Capability change in the associated AP.
160 eCsrForcedDisassoc, // roaming becuase someone asked us to Disassoc and stay disassociated.
161 eCsrHddIssued, // roaming because an 802.11 request was issued to the driver.
162 eCsrLostLink1, // roaming because we lost link to an associated AP
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800163 eCsrLostLink2,
Jeff Johnson295189b2012-06-20 16:38:30 -0700164 eCsrLostLink3,
165 eCsrForcedDisassocMICFailure, // roaming because we need to force a Disassoc due to MIC failure
166 eCsrHddIssuedReassocToSameAP,
167 eCsrSmeIssuedReassocToSameAP,
168 eCsrSmeIssuedReassocToDiffAP,
169 eCsrForcedDeauth, // roaming becuase someone asked us to deauth and stay disassociated.
170 eCsrSmeIssuedDisassocForHandoff, // will be issued by Handoff logic to disconect from current AP
171 eCsrSmeIssuedAssocToSimilarAP, // will be issued by Handoff logic to join a new AP with same profile
172 eCsrSmeIssuedIbssJoinFailure, // ibss join timer fired before any perr showed up, so shut down the network
173 eCsrForcedIbssLeave,
174 eCsrStopBss,
175 eCsrSmeIssuedFTReassoc,
176 eCsrForcedDisassocSta,
177 eCsrForcedDeauthSta,
Madan Mohan Koyyalamudi286b60e2012-10-11 12:59:07 -0700178 eCsrPerformPreauth,
Venkata Prathyusha Kuntupalli239278b2013-03-26 15:58:18 -0700179 eCsrLostLink1Abort,
180 eCsrLostLink2Abort,
181 eCsrLostLink3Abort,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800182
Jeff Johnson295189b2012-06-20 16:38:30 -0700183}eCsrRoamReason;
184
185typedef enum
186{
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800187 eCSR_ROAM_SUBSTATE_NONE = 0,
188 eCSR_ROAM_SUBSTATE_START_BSS_REQ,
189 eCSR_ROAM_SUBSTATE_JOIN_REQ,
190 eCSR_ROAM_SUBSTATE_REASSOC_REQ,
191 eCSR_ROAM_SUBSTATE_DISASSOC_REQ,
192 eCSR_ROAM_SUBSTATE_STOP_BSS_REQ,
193 eCSR_ROAM_SUBSTATE_DISCONNECT_CONTINUE_ROAMING, //Continue the current roam command after disconnect
194 eCSR_ROAM_SUBSTATE_AUTH_REQ,
195 eCSR_ROAM_SUBSTATE_CONFIG,
196 eCSR_ROAM_SUBSTATE_DEAUTH_REQ,
197 eCSR_ROAM_SUBSTATE_DISASSOC_NOTHING_TO_JOIN,
198 eCSR_ROAM_SUBSTATE_DISASSOC_REASSOC_FAILURE,
199 eCSR_ROAM_SUBSTATE_DISASSOC_FORCED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700200 eCSR_ROAM_SUBSTATE_WAIT_FOR_KEY,
201 eCSR_ROAM_SUBSTATE_DISASSOC_HANDOFF,
202 eCSR_ROAM_SUBSTATE_JOINED_NO_TRAFFIC,
203 eCSR_ROAM_SUBSTATE_JOINED_NON_REALTIME_TRAFFIC,
204 eCSR_ROAM_SUBSTATE_JOINED_REALTIME_TRAFFIC,
205// max is 15 unless the bitfield is expanded...
206} eCsrRoamSubState;
207
208
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800209typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700210{
211 eCSR_ROAMING_STATE_STOP = 0,
212 eCSR_ROAMING_STATE_IDLE,
213 eCSR_ROAMING_STATE_SCANNING,
214 eCSR_ROAMING_STATE_JOINING,
215 eCSR_ROAMING_STATE_JOINED,
216}eCsrRoamState;
217
218
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800219typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700220{
221 eCsrContinueRoaming,
222 eCsrStopRoaming,
223 eCsrStartIbss,
224 eCsrStartIbssSameIbss,
225 eCsrReassocToSelfNoCapChange,
Jeff Johnsone7245742012-09-05 17:12:55 -0700226 eCsrStopRoamingDueToConcurrency,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800227
Jeff Johnson295189b2012-06-20 16:38:30 -0700228}eCsrJoinState;
229
230typedef enum
231{
232 eCsrNotRoaming,
233 eCsrLostlinkRoamingDisassoc,
234 eCsrLostlinkRoamingDeauth,
235 eCsrDynamicRoaming,
236 eCsrReassocRoaming,
237}eCsrRoamingReason;
238
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800239typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700240{
241 eCsrDisassociated,
242 eCsrDeauthenticated
243
244}eCsrRoamWmStatusChangeTypes;
245
246typedef enum
247{
248 eCsrSummaryStats = 0,
249 eCsrGlobalClassAStats,
250 eCsrGlobalClassBStats,
251 eCsrGlobalClassCStats,
252 eCsrGlobalClassDStats,
253 eCsrPerStaStats,
254 eCsrMaxStats
255}eCsrRoamStatsClassTypes;
256
257#ifdef FEATURE_WLAN_DIAG_SUPPORT
258typedef enum
259{
260 eCSR_WLAN_STATUS_CONNECT =0,
261 eCSR_WLAN_STATUS_DISCONNECT
262
263}eCsrDiagWlanStatusEventSubtype;
264
265typedef enum
266{
267 eCSR_REASON_UNSPECIFIED = 0,
268 eCSR_REASON_USER_REQUESTED,
269 eCSR_REASON_MIC_ERROR,
270 eCSR_REASON_DISASSOC,
271 eCSR_REASON_DEAUTH,
272 eCSR_REASON_HANDOFF,
273
274}eCsrDiagWlanStatusEventReason;
275
276typedef enum
277{
278 eCSR_WLAN_HANDOFF_EVENT =0,
279
280}eCsrDiagWlanHandoffEventSubtype;
281
282typedef enum
283{
284 eCSR_WLAN_VCC_EVENT =0,
285
286}eCsrDiagWlanVccEventSubtype;
287
288#endif //FEATURE_WLAN_DIAG_SUPPORT
289
290typedef struct tagCsrChannel
291{
292 tANI_U8 numChannels;
293 tANI_U8 channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
294}tCsrChannel;
295
296typedef struct tagScanProfile
297{
298 tANI_U32 minChnTime;
299 tANI_U32 maxChnTime;
300 tANI_U32 restTime; //This is ignored if not associated
301 tANI_U32 numOfChannels;
302 tANI_U8 *pChannelList;
303 tSirScanType scanType; //active or passive
304 eCsrRoamBssType bssType; //BSS or IBSS
305 tANI_U8 ssid[WNI_CFG_SSID_LEN];
306 tANI_U8 bReturnAfter1stMatch;
307 tANI_U8 fUniqueResult;
308 tANI_U8 freshScan;
309 tCsrBssid bssid;
310}tScanProfile;
311
312typedef struct tagBssConfigParam
313{
314 eCsrMediaAccessType qosType;
315 tSirMacSSid SSID;
316 tANI_U32 uRTSThresh;
317 tANI_U32 uDeferThresh; //
318 eCsrCfgDot11Mode uCfgDot11Mode;
319 eCsrBand eBand;
320 tANI_U8 standardRate[CSR_DOT11_SUPPORTED_RATES_MAX];
321 tANI_U8 extendedRate[CSR_DOT11_EXTENDED_SUPPORTED_RATES_MAX];
322 eCsrExposedTxRate txRate;
323 tAniAuthType authType;
324 eCsrEncryptionType encType;
325 tANI_U32 uShortSlotTime;
326 tANI_U32 uHTSupport; //High throughput
327 tANI_U32 uPowerLimit;
328 tANI_U32 uHeartBeatThresh;
329 tANI_U32 uJoinTimeOut;
330 tSirMacCapabilityInfo BssCap;
331 tANI_BOOLEAN f11hSupport;
Jeff Johnsone7245742012-09-05 17:12:55 -0700332 ePhyChanBondState cbMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700333}tBssConfigParam;
334
335
336typedef struct tagCsrRoamStartBssParams
337{
338 tSirMacSSid ssId;
339 tCsrBssid bssid; //this is the BSSID for the party we want to join (only use for IBSS or WDS)
340 tSirNwType sirNwType;
Jeff Johnsone7245742012-09-05 17:12:55 -0700341 ePhyChanBondState cbMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700342 tSirMacRateSet operationalRateSet;
343 tSirMacRateSet extendedRateSet;
344 tANI_U8 operationChn;
345 eCsrCfgDot11Mode uCfgDot11Mode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700346 tANI_U8 privacy;
347 tANI_BOOLEAN fwdWPSPBCProbeReq;
348 tANI_BOOLEAN protEnabled;
349 tANI_BOOLEAN obssProtEnabled;
350 tAniAuthType authType;
351 tANI_U16 beaconInterval; //If this is 0, SME will fill in for caller.
352 tANI_U16 ht_protection;
353 tANI_U32 dtimPeriod;
354 tANI_U8 ApUapsdEnable;
355 tANI_U8 ssidHidden;
356 tANI_U8 wps_state;
Jeff Johnson295189b2012-06-20 16:38:30 -0700357 tVOS_CON_MODE bssPersona;
358 tANI_U16 nRSNIELength; //The byte count in the pRSNIE, if 0, pRSNIE is ignored.
359 tANI_U8 *pRSNIE; //If not null, it has the IE byte stream for RSN
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800360 tANI_BOOLEAN updatebeaconInterval; //Flag used to indicate update
361 // beaconInterval
Jeff Johnson295189b2012-06-20 16:38:30 -0700362}tCsrRoamStartBssParams;
363
364
365typedef struct tagScanCmd
366{
367 tANI_U32 scanID;
368 csrScanCompleteCallback callback;
369 void *pContext;
370 eCsrScanReason reason;
371 eCsrRoamState lastRoamState[CSR_ROAM_SESSION_MAX];
372 tCsrRoamProfile *pToRoamProfile;
373 tANI_U32 roamId; //this is the ID related to the pToRoamProfile
374 union
375 {
376 tCsrScanRequest scanRequest;
377 tCsrBGScanRequest bgScanRequest;
378 }u;
Srinivas, Dasari187ca4e2014-02-07 12:40:09 +0530379 //This flag will be set while aborting the scan due to band change
380 tANI_BOOLEAN abortScanDueToBandChange;
Jeff Johnson295189b2012-06-20 16:38:30 -0700381}tScanCmd;
382
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800383typedef struct tagRoamCmd
Jeff Johnson295189b2012-06-20 16:38:30 -0700384{
385 tANI_U32 roamId;
386 eCsrRoamReason roamReason;
387 tCsrRoamProfile roamProfile;
388 tScanResultHandle hBSSList; //BSS list fits the profile
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800389 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 -0700390 tSirBssDescription *pLastRoamBss; //the last BSS we try and failed
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800391 tANI_BOOLEAN fReleaseBssList; //whether to free hBSSList
Jeff Johnson295189b2012-06-20 16:38:30 -0700392 tANI_BOOLEAN fReleaseProfile; //whether to free roamProfile
393 tANI_BOOLEAN fReassoc; //whether this command is for reassociation
394 tANI_BOOLEAN fUpdateCurRoamProfile; //whether pMac->roam.pCurRoamProfile needs to be updated
395 //this is for CSR internal used only. And it should not be assigned when creating the command
396 //This causes the roam command not to do anything.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800397 tANI_BOOLEAN fReassocToSelfNoCapChange;
Jeff Johnson295189b2012-06-20 16:38:30 -0700398
399 tANI_BOOLEAN fStopWds;
400 tSirMacAddr peerMac;
401 tSirMacReasonCodes reason;
402}tRoamCmd;
403
404typedef struct tagSetKeyCmd
405{
406 tANI_U32 roamId;
407 eCsrEncryptionType encType;
408 eCsrAuthType authType;
409 tAniKeyDirection keyDirection; //Tx, Rx or Tx-and-Rx
410 tSirMacAddr peerMac; //Peer's MAC address. ALL 1's for group key
411 tANI_U8 paeRole; //0 for supplicant
412 tANI_U8 keyId; // Kye index
413 tANI_U8 keyLength; //Number of bytes containing the key in pKey
414 tANI_U8 Key[CSR_MAX_KEY_LEN];
415 tANI_U8 keyRsc[CSR_MAX_RSC_LEN];
416} tSetKeyCmd;
417
418typedef struct tahRemoveKeyCmd
419{
420 tANI_U32 roamId;
421 eCsrEncryptionType encType;
422 eCsrAuthType authType;
423 tSirMacAddr peerMac; //Peer's MAC address. ALL 1's for group key
424 tANI_U8 keyId; //key index
425} tRemoveKeyCmd;
426
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800427typedef struct tagWmStatusChangeCmd
Jeff Johnson295189b2012-06-20 16:38:30 -0700428{
429 eCsrRoamWmStatusChangeTypes Type;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800430 union
431 {
Jeff Johnson295189b2012-06-20 16:38:30 -0700432 tSirSmeDeauthInd DeauthIndMsg;
433 tSirSmeDisassocInd DisassocIndMsg;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800434 }u;
Jeff Johnson295189b2012-06-20 16:38:30 -0700435
436}tWmStatusChangeCmd;
437
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700438
Jeff Johnson295189b2012-06-20 16:38:30 -0700439typedef struct tagAddStaForSessionCmd
440{
441 //Session self mac addr
442 tSirMacAddr selfMacAddr;
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700443 tVOS_CON_MODE currDeviceMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700444}tAddStaForSessionCmd;
445
446typedef struct tagDelStaForSessionCmd
447{
448 //Session self mac addr
449 tSirMacAddr selfMacAddr;
450 csrRoamSessionCloseCallback callback;
451 void *pContext;
452}tDelStaForSessionCmd;
453
454//This structure represents one scan request
455typedef struct tagCsrCmd
456{
457 tListElem Link;
458 eCsrRoamCommands command;
459 tANI_U8 sessionId; // Session ID for this command
460 union
461 {
462 tScanCmd scanCmd;
463 tRoamCmd roamCmd;
464 tWmStatusChangeCmd wmStatusChangeCmd;
465 tSetKeyCmd setKeyCmd;
466 tRemoveKeyCmd removeKeyCmd;
467 tAddStaForSessionCmd addStaSessionCmd;
468 tDelStaForSessionCmd delStaSessionCmd;
469 }u;
470}tCsrCmd;
471
472#ifdef WLAN_FEATURE_VOWIFI_11R
473typedef struct tagCsr11rConfig
474{
475 tANI_BOOLEAN IsFTResourceReqSupported;
476} tCsr11rConfig;
477#endif
478
479#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
480typedef struct tagCsrNeighborRoamConfig
481{
482 tANI_U32 nNeighborScanTimerPeriod;
483 tANI_U8 nNeighborLookupRssiThreshold;
484 tANI_U8 nNeighborReassocRssiThreshold;
485 tANI_U16 nNeighborScanMinChanTime;
486 tANI_U16 nNeighborScanMaxChanTime;
487 sCsrChannel neighborScanChanList;
488 tANI_U8 nMaxNeighborRetries;
489 tANI_U16 nNeighborResultsRefreshPeriod;
Srinivas Girigowdade697412013-02-14 16:31:48 -0800490 tANI_U16 nEmptyScanRefreshPeriod;
Jeff Johnson295189b2012-06-20 16:38:30 -0700491}tCsrNeighborRoamConfig;
492#endif
493
494typedef struct tagCsrConfig
495{
496 tANI_U32 agingCount;
497 tANI_U32 FragmentationThreshold;
498 tANI_U32 channelBondingMode24GHz;
499 tANI_U32 channelBondingMode5GHz;
500 tANI_U32 RTSThreshold;
501 eCsrPhyMode phyMode;
502 eCsrCfgDot11Mode uCfgDot11Mode;
503 eCsrBand eBand;
504 tANI_U32 HeartbeatThresh50;
505 tANI_U32 HeartbeatThresh24;
506 tANI_U32 bgScanInterval;
507 eCsrCBChoice cbChoice;
508 eCsrBand bandCapability; //indicate hw capability
509 eCsrRoamWmmUserModeType WMMSupportMode;
510 tANI_BOOLEAN Is11eSupportEnabled;
511 tANI_BOOLEAN Is11dSupportEnabled;
512 tANI_BOOLEAN Is11dSupportEnabledOriginal;
513 tANI_BOOLEAN Is11hSupportEnabled;
514 tANI_BOOLEAN shortSlotTime;
515 tANI_BOOLEAN ProprietaryRatesEnabled;
516 tANI_BOOLEAN fenableMCCMode;
517 tANI_U16 TxRate;
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -0800518 tANI_U8 fAllowMCCGODiffBI;
Jeff Johnson295189b2012-06-20 16:38:30 -0700519 tANI_U8 AdHocChannel24;
520 tANI_U8 AdHocChannel5G;
521 tANI_U32 impsSleepTime; //in units of microseconds
522 tANI_U32 scanAgeTimeNCNPS; //scan result aging time threshold when Not-Connect-No-Power-Save, in seconds
523 tANI_U32 scanAgeTimeNCPS; //scan result aging time threshold when Not-Connect-Power-Save, in seconds
524 tANI_U32 scanAgeTimeCNPS; //scan result aging time threshold when Connect-No-Power-Save, in seconds,
525 tANI_U32 scanAgeTimeCPS; //scan result aging time threshold when Connect-Power-Savein seconds
526 tANI_U32 BssPreferValue[CSR_NUM_RSSI_CAT]; //each RSSI category has one value
527 int RSSICat[CSR_NUM_RSSI_CAT];
528 tANI_U8 bCatRssiOffset; //to set the RSSI difference for each category
529 tANI_U32 nRoamingTime; //In seconds, CSR will try this long before gives up, 0 means no roaming
530 //Whether to limit the channels to the ones set in Csr11dInfo. If true, the opertaional
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800531 //channels are limited to the default channel list. It is an "AND" operation between the
Jeff Johnson295189b2012-06-20 16:38:30 -0700532 //default channels and the channels in the 802.11d IE.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800533 tANI_BOOLEAN fEnforce11dChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -0700534 //Country Code Priority
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800535 //0 = 802.11D > Configured Country > NV
Jeff Johnson295189b2012-06-20 16:38:30 -0700536 //1 = Configured Country > 802.11D > NV
537 tANI_BOOLEAN fSupplicantCountryCodeHasPriority;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800538 //When true, AP with unknown country code won't be see.
539 //"Unknown country code" means either Ap doesn't have 11d IE or we cannot
Jeff Johnson295189b2012-06-20 16:38:30 -0700540 //find a domain for the country code in its 11d IE.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800541 tANI_BOOLEAN fEnforceCountryCodeMatch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700542 //When true, only APs in the default domain can be seen. If the Ap has "unknown country
543 //code", or the doamin of the country code doesn't match the default domain, the Ap is
544 //not acceptable.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800545 tANI_BOOLEAN fEnforceDefaultDomain;
Jeff Johnson295189b2012-06-20 16:38:30 -0700546
547 tANI_U16 vccRssiThreshold;
548 tANI_U32 vccUlMacLossThreshold;
549
550 tANI_U32 nPassiveMinChnTime; //in units of milliseconds
551 tANI_U32 nPassiveMaxChnTime; //in units of milliseconds
552 tANI_U32 nActiveMinChnTime; //in units of milliseconds
553 tANI_U32 nActiveMaxChnTime; //in units of milliseconds
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800554
555 tANI_U32 nActiveMinChnTimeBtc; //in units of milliseconds
556 tANI_U32 nActiveMaxChnTimeBtc; //in units of milliseconds
Kiran Kumar Lokere458d7322013-05-29 14:29:43 -0700557 tANI_U8 disableAggWithBtc;
Madan Mohan Koyyalamudi4ff9cd62012-10-30 17:48:57 -0700558#ifdef WLAN_AP_STA_CONCURRENCY
559 tANI_U32 nPassiveMinChnTimeConc; //in units of milliseconds
560 tANI_U32 nPassiveMaxChnTimeConc; //in units of milliseconds
561 tANI_U32 nActiveMinChnTimeConc; //in units of milliseconds
562 tANI_U32 nActiveMaxChnTimeConc; //in units of milliseconds
563 tANI_U32 nRestTimeConc; //in units of milliseconds
Sudhir Sattayappa Kohallieb97d502013-05-22 23:16:42 -0700564 tANI_U8 nNumStaChanCombinedConc; //number of channels combined for
565 //Sta in each split scan operation
566 tANI_U8 nNumP2PChanCombinedConc; //number of channels combined for
567 //P2P in each split scan operation
Madan Mohan Koyyalamudi4ff9cd62012-10-30 17:48:57 -0700568#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700569
570 tANI_BOOLEAN IsIdleScanEnabled;
571 //in dBm, the maximum TX power
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800572 //The actual TX power is the lesser of this value and 11d.
Jeff Johnson295189b2012-06-20 16:38:30 -0700573 //If 11d is disable, the lesser of this and default setting.
574 tANI_U8 nTxPowerCap;
575 tANI_U32 statsReqPeriodicity; //stats request frequency from PE while in full power
576 tANI_U32 statsReqPeriodicityInPS;//stats request frequency from PE while in power save
Jeff Johnson295189b2012-06-20 16:38:30 -0700577 tANI_U32 dtimPeriod;
578 tANI_BOOLEAN ssidHidden;
Jeff Johnson295189b2012-06-20 16:38:30 -0700579
580#ifdef WLAN_FEATURE_VOWIFI_11R
581 tCsr11rConfig csr11rConfig;
582#endif
583
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700584#ifdef FEATURE_WLAN_LFR
Srinivas Girigowda830bbd02013-06-13 19:44:16 -0700585 tANI_U8 isFastRoamIniFeatureEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -0800586 tANI_U8 MAWCEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700587#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Srinivas Girigowda830bbd02013-06-13 19:44:16 -0700588 tANI_U8 isRoamOffloadScanEnabled;
589 tANI_BOOLEAN bFastRoamInConIniFeatureEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700590#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700591#endif
592
Jeff Johnson295189b2012-06-20 16:38:30 -0700593#ifdef FEATURE_WLAN_CCX
594 tANI_U8 isCcxIniFeatureEnabled;
595#endif
596
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700597#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700598 tANI_U8 isFastTransitionEnabled;
599 tANI_U8 RoamRssiDiff;
600 tANI_U8 nImmediateRoamRssiDiff;
601 tANI_BOOLEAN nRoamPrefer5GHz;
602 tANI_BOOLEAN nRoamIntraBand;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -0700603 tANI_BOOLEAN isWESModeEnabled;
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700604 tANI_BOOLEAN nRoamScanControl;
Varun Reddy Yeturu920df212013-05-22 08:07:23 -0700605 tANI_U8 nProbes;
606 tANI_U16 nRoamScanHomeAwayTime;
Jeff Johnson295189b2012-06-20 16:38:30 -0700607#endif
608
609#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
610 tCsrNeighborRoamConfig neighborRoamConfig;
611#endif
612
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800613 /* Instead of Reassoc, send ADDTS/DELTS even when ACM is off for that AC
Jeff Johnson295189b2012-06-20 16:38:30 -0700614 * This is mandated by WMM-AC certification */
615 tANI_BOOLEAN addTSWhenACMIsOff;
616
617 tANI_BOOLEAN fValidateList;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800618 //Remove this code once SLM_Sessionization is supported
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -0700619 //BMPS_WORKAROUND_NOT_NEEDED
Jeff Johnsone7245742012-09-05 17:12:55 -0700620 tANI_BOOLEAN doBMPSWorkaround;
Jeff Johnson295189b2012-06-20 16:38:30 -0700621
622 //To enable/disable scanning 2.4Ghz channels twice on a single scan request from HDD
623 tANI_BOOLEAN fScanTwice;
Jeff Johnsone7245742012-09-05 17:12:55 -0700624#ifdef WLAN_FEATURE_11AC
625 tANI_U32 nVhtChannelWidth;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -0800626 tANI_U8 txBFEnable;
Shailender Karmuchicc3fe442013-02-16 18:18:33 -0800627 tANI_U8 txBFCsnValue;
Ravi Joshi83bfaa12013-05-28 22:12:08 -0700628 tANI_BOOLEAN enableVhtFor24GHz;
Jeff Johnsone7245742012-09-05 17:12:55 -0700629#endif
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -0800630 tANI_U8 txLdpcEnable;
Jeff Johnson295189b2012-06-20 16:38:30 -0700631
Ravi Joshid2ca7c42013-07-23 08:37:49 -0700632 /*
633 * Enable/Disable heartbeat offload
634 */
635 tANI_BOOLEAN enableHeartBeatOffload;
krunal soni5afa96c2013-09-06 22:19:02 -0700636 tANI_U8 isAmsduSupportInAMPDU;
Srinivas Girigowda41c7c5f2013-10-21 19:01:38 -0700637 tANI_U8 nSelect5GHzMargin;
krunal sonie9002db2013-11-25 14:24:17 -0800638 tANI_U8 isCoalesingInIBSSAllowed;
Jeff Johnson295189b2012-06-20 16:38:30 -0700639}tCsrConfig;
640
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800641typedef struct tagCsrChannelPowerInfo
Jeff Johnson295189b2012-06-20 16:38:30 -0700642{
643 tListElem link;
644 tANI_U8 firstChannel;
645 tANI_U8 numChannels;
646 tANI_U8 txPower;
647 tANI_U8 interChannelOffset;
648}tCsrChannelPowerInfo;
649
650typedef struct tagRoamJoinStatus
651{
652 tSirResultCodes statusCode;
653 //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 -0800654 tANI_U32 reasonCode;
Kiran Kumar Lokerec8550fa2013-04-15 22:23:00 -0700655 tSirMacAddr bssId;
Jeff Johnson295189b2012-06-20 16:38:30 -0700656}tCsrRoamJoinStatus;
657
658typedef struct tagCsrOsChannelMask
659{
660 tANI_U8 numChannels;
661 tANI_BOOLEAN scanEnabled[WNI_CFG_VALID_CHANNEL_LIST_LEN];
662 tANI_U8 channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
663}tCsrOsChannelMask;
664
665
666typedef struct tagCsrScanStruct
667{
668 tScanProfile scanProfile;
669 tANI_U32 nextScanID;
Madan Mohan Koyyalamudica43cdf2012-09-24 13:15:49 -0700670 tDblLinkList scanResultList;
Jeff Johnson295189b2012-06-20 16:38:30 -0700671 tDblLinkList tempScanResults;
672 tANI_BOOLEAN fScanEnable;
673 tANI_BOOLEAN fFullScanIssued;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530674 vos_timer_t hTimerGetResult;
Jeff Johnson295189b2012-06-20 16:38:30 -0700675#ifdef WLAN_AP_STA_CONCURRENCY
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530676 vos_timer_t hTimerStaApConcTimer;
Jeff Johnson295189b2012-06-20 16:38:30 -0700677#endif
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530678 vos_timer_t hTimerIdleScan;
679 vos_timer_t hTimerResultAging;
680 vos_timer_t hTimerResultCfgAging;
Jeff Johnson295189b2012-06-20 16:38:30 -0700681 tPalTimerHandle hTimerBgScan;
682 //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 -0800683 tANI_U8 channelOf11dInfo;
684 tANI_U8 scanResultCfgAgingTime;
Jeff Johnson295189b2012-06-20 16:38:30 -0700685 //changes on every scan, a flag to tell whether conflict 11d info found on each BSS
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800686 tANI_BOOLEAN fAmbiguous11dInfoFound;
Jeff Johnson295189b2012-06-20 16:38:30 -0700687 //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 -0800688 tANI_BOOLEAN fCurrent11dInfoMatch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700689 tANI_BOOLEAN f11dInfoReset; //to indicate whether the 11d info in CFG is reset to default
690 tSirScanType curScanType;
691 tCsrChannel baseChannels; //This are all the supported channels AND(&) to the current eBand
692 tCsrChannel channels11d;
693 tChannelListWithPower defaultPowerTable[WNI_CFG_VALID_CHANNEL_LIST_LEN]; //From NV
694 tChannelListWithPower defaultPowerTable40MHz[WNI_CFG_VALID_CHANNEL_LIST_LEN]; //From NV
695 tANI_U32 numChannelsDefault; //total channels of NV
696 tCsrChannel base20MHzChannels; //The channel base to work on
697 tCsrChannel base40MHzChannels; //center channels for 40MHz channels
698 tDblLinkList channelPowerInfoList24;
699 tDblLinkList channelPowerInfoList5G;
700 tANI_U32 nLastAgeTimeOut;
701 tANI_U32 nAgingCountDown;
Gopichand Nakkala114718f2013-03-25 19:19:46 -0700702 tANI_U8 countryCodeDefault[WNI_CFG_COUNTRY_CODE_LEN]; //The country code from NV
703 tANI_U8 countryCodeCurrent[WNI_CFG_COUNTRY_CODE_LEN];
704 tANI_U8 countryCode11d[WNI_CFG_COUNTRY_CODE_LEN];
Jeff Johnson295189b2012-06-20 16:38:30 -0700705 v_REGDOMAIN_t domainIdDefault; //default regulatory domain
706 v_REGDOMAIN_t domainIdCurrent; //current regulatory domain
Agarwal Ashishd9d72602013-09-13 00:06:17 +0530707 tCsrBssid currentCountryBssid; // Bssid for current country code
Jeff Johnson295189b2012-06-20 16:38:30 -0700708 tANI_BOOLEAN f11dInfoApplied;
709 tANI_BOOLEAN fCancelIdleScan;
710#ifdef FEATURE_WLAN_WAPI
711// tANI_U16 NumBkidCandidate;
712// tBkidCandidateInfo BkidCandidateInfo[CSR_MAX_BKID_ALLOWED]; /* Move this as part of SessionEntry */
713#endif /* FEATURE_WLAN_WAPI */
714 tANI_U8 numBGScanChannel; //number of valid channels in the bgScanChannelList
715 tANI_U8 bgScanChannelList[WNI_CFG_BG_SCAN_CHANNEL_LIST_LEN];
716 //the ChannelInfo member is not used in this structure.
717 //numBGScanChannel and bgScanChannelList are used for the BG scan channel info
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800718 tCsrBGScanRequest bgScanParams;
Jeff Johnson295189b2012-06-20 16:38:30 -0700719 tANI_BOOLEAN fRestartIdleScan;
720 tANI_U32 nIdleScanTimeGap; //the time since last trying to trigger idle scan
721 tCsrOsChannelMask osScanChannelMask;//keep a track of channels to be scnned while in traffic condition
722 tANI_U16 nBssLimit; //the maximum number of BSS in scan cache
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800723 /*channelPowerInfoList24 has been seen corrupted. Set this flag to true trying to
Jeff Johnson295189b2012-06-20 16:38:30 -0700724 * detect when it happens. Adding this into code because we can't reproduce it easily.
725 * We don't know when it happens. */
726 tANI_BOOLEAN fValidateList;
727 /*Customer wants to start with an active scan based on the default country code.
728 * This optimization will minimize the driver load to association time.
729 * Based on this flag we will bypass the initial passive scan needed for 11d
730 * to determine the country code & domain */
731 tANI_BOOLEAN fEnableBypass11d;
732
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800733 /*Customer wants to optimize the scan time. Avoiding scans(passive) on DFS
734 * channels while swipping through both bands can save some time
Jeff Johnson295189b2012-06-20 16:38:30 -0700735 * (apprx 1.3 sec) */
736 tANI_BOOLEAN fEnableDFSChnlScan;
737
Jeff Johnsone7245742012-09-05 17:12:55 -0700738 /*
739 * To enable/disable scanning only 2.4Ghz channels on first scan
740 */
741 tANI_BOOLEAN fFirstScanOnly2GChnl;
742
Jeff Johnson295189b2012-06-20 16:38:30 -0700743 tANI_BOOLEAN fDropScanCmd; //true means we don't accept scan commands
744
745#ifdef WLAN_AP_STA_CONCURRENCY
746 tDblLinkList scanCmdPendingList;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800747#endif
Madan Mohan Koyyalamudi470d2cf2012-09-28 14:43:44 -0700748 tCsrChannel occupiedChannels; //This includes all channels on which candidate APs are found
Srinivas Girigowda41c7c5f2013-10-21 19:01:38 -0700749 tANI_S8 inScanResultBestAPRssi;
Mihir Shetefc7ff5b2014-01-27 11:30:05 +0530750
751 csrScanCompleteCallback callback11dScanDone;
Jeff Johnson295189b2012-06-20 16:38:30 -0700752}tCsrScanStruct;
753
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800754#ifdef FEATURE_WLAN_TDLS_INTERNAL
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800755/*
756 * struct to carry TDLS discovery info..
757 */
758typedef struct sCsrTdlsContext
759{
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800760 tDblLinkList tdlsPotentialPeerList ;
761 tANI_U16 tdlsCommonFlag ;
762 tANI_U16 tdlsCommonState ;
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800763 tANI_U16 tdlsPeerCount ;
764}tCsrTdlsCtxStruct;
765
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800766typedef struct sCsrTdlsPeerLinkInfo
767{
768 tListElem tdlsPeerStaLink ;
769 tSirTdlsPeerInfo tdlsDisPeerInfo ;
770}tCsrTdlsPeerLinkinfo ;
771#endif
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800772
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800773
774
Jeff Johnson295189b2012-06-20 16:38:30 -0700775
776//Save the connected information. This structure + connectedProfile
777//should contain all information about the connection
778typedef struct tagRoamCsrConnectedInfo
779{
780 tANI_U32 nBeaconLength; //the length, in bytes, of the beacon frame, can be 0
781 tANI_U32 nAssocReqLength; //the length, in bytes, of the assoc req frame, can be 0
782 tANI_U32 nAssocRspLength; //The length, in bytes, of the assoc rsp frame, can be 0
783#ifdef WLAN_FEATURE_VOWIFI_11R
784 tANI_U32 nRICRspLength; //Length of the parsed RIC response IEs received in reassoc response
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800785#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700786#ifdef FEATURE_WLAN_CCX
787 tANI_U32 nTspecIeLength;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800788#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700789 tANI_U8 *pbFrames; //Point to a buffer contain the beacon, assoc req, assoc rsp frame, in that order
790 //user needs to use nBeaconLength, nAssocReqLength, nAssocRspLength to desice where
791 //each frame starts and ends.
792 tANI_U8 staId;
793}tCsrRoamConnectedInfo;
794
795
796typedef struct tagCsrLinkQualityIndInfo
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800797{
Jeff Johnson295189b2012-06-20 16:38:30 -0700798 csrRoamLinkQualityIndCallback callback;
799 void *context;
800}tCsrLinkQualityIndInfo;
801
802typedef struct tagCsrPeStatsReqInfo
803{
804 tListElem link; /* list links */
805 tANI_U32 statsMask;
806 tANI_U32 periodicity;
807 tANI_BOOLEAN rspPending;
808 vos_timer_t hPeStatsTimer;
809 tANI_BOOLEAN timerRunning;
810 tANI_U8 staId;
811 tANI_U8 numClient;
812 tpAniSirGlobal pMac;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800813 /* To remember if the peStats timer is stopped successfully or not */
Jeff Johnson295189b2012-06-20 16:38:30 -0700814 tANI_BOOLEAN timerStopFailed;
815
816}tCsrPeStatsReqInfo;
817
818typedef struct tagCsrStatsClientReqInfo
819{
820 tListElem link; /* list links */
821 eCsrStatsRequesterType requesterId;
822 tCsrStatsCallback callback;
823 tANI_U32 periodicity;
824 void *pContext;
825 tANI_U32 statsMask;
826 tCsrPeStatsReqInfo *pPeStaEntry;
827 tANI_U8 staId;
828 vos_timer_t timer;
829 tANI_BOOLEAN timerExpired;
830 tpAniSirGlobal pMac; // TODO: Confirm this change BTAMP
831}tCsrStatsClientReqInfo;
832
833typedef struct tagCsrTlStatsReqInfo
834{
835 tANI_U32 periodicity;
836 tANI_BOOLEAN timerRunning;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530837 vos_timer_t hTlStatsTimer;
Jeff Johnson295189b2012-06-20 16:38:30 -0700838 tANI_U8 numClient;
839}tCsrTlStatsReqInfo;
840
841typedef struct tagCsrRoamSession
842{
843 tANI_U8 sessionId; // Session ID
844 tANI_BOOLEAN sessionActive; // TRUE if it is used
845 tCsrBssid selfMacAddr; // For BT-AMP station, this serve as BSSID for self-BSS.
846 csrRoamCompleteCallback callback;
847 void *pContext;
848 eCsrConnectState connectState;
849 tCsrRoamConnectedProfile connectedProfile;
850 tCsrRoamConnectedInfo connectedInfo;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800851 tCsrRoamProfile *pCurRoamProfile;
Jeff Johnson295189b2012-06-20 16:38:30 -0700852 tSirBssDescription *pConnectBssDesc;
853 tANI_U16 NumPmkidCache;
854 tPmkidCacheInfo PmkidCacheInfo[CSR_MAX_PMKID_ALLOWED];
855 tANI_U8 cJoinAttemps;
856 //This may or may not have the up-to-date valid channel list
857 //It is used to get WNI_CFG_VALID_CHANNEL_LIST and not allocate memory all the time
858 tSirMacChanNum validChannelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
859 tANI_S32 sPendingCommands; //0 means CSR is ok to low power
860#ifdef FEATURE_WLAN_WAPI
861 tANI_U16 NumBkidCache;
862 tBkidCacheInfo BkidCacheInfo[CSR_MAX_BKID_ALLOWED];
863#endif /* FEATURE_WLAN_WAPI */
864 tANI_BOOLEAN fRoaming; //indicate whether CSR is roaming (either via lostlink or dynamic roaming)
865 //to remember some parameters needed for START_BSS.
866 //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 -0800867 tCsrRoamStartBssParams bssParams;
Jeff Johnson295189b2012-06-20 16:38:30 -0700868 tANI_U32 nWpaRsnReqIeLength; //the byte count of pWpaRsnIE;
869 tANI_U8 *pWpaRsnReqIE; //this contain the WPA/RSN IE in assoc request or the one sent in beacon (IBSS)
870 tANI_U32 nWpaRsnRspIeLength; //the byte count for pWpaRsnRspIE
871 tANI_U8 *pWpaRsnRspIE; //this contain the WPA/RSN IE in beacon/probe rsp
872#ifdef FEATURE_WLAN_WAPI
873 tANI_U32 nWapiReqIeLength; //the byte count of pWapiReqIE;
874 tANI_U8 *pWapiReqIE; //this contain the WAPI IE in assoc request or the one sent in beacon (IBSS)
875 tANI_U32 nWapiRspIeLength; //the byte count for pWapiRspIE
876 tANI_U8 *pWapiRspIE; //this contain the WAPI IE in beacon/probe rsp
877#endif /* FEATURE_WLAN_WAPI */
Agarwal Ashish4f616132013-12-30 23:32:50 +0530878 tANI_U32 nAddIEScanLength; //length of addIeScan
879 /* This contains the additional IE in (unicast)
880 * probe request at the time of join
881 */
882 tANI_U8 addIEScan[SIR_MAC_MAX_IE_LENGTH+2];
Jeff Johnson295189b2012-06-20 16:38:30 -0700883 tANI_U32 nAddIEAssocLength; //the byte count for pAddIeAssocIE
884 tANI_U8 *pAddIEAssoc; //this contains the additional IE in (re) assoc request
885
886 tANI_TIMESTAMP roamingStartTime; //in units of 10ms
887 tCsrTimerInfo roamingTimerInfo;
888 eCsrRoamingReason roamingReason;
889 tANI_BOOLEAN fCancelRoaming;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530890 vos_timer_t hTimerRoaming;
Jeff Johnson295189b2012-06-20 16:38:30 -0700891 eCsrRoamResult roamResult; //the roamResult that is used when the roaming timer fires
892 tCsrRoamJoinStatus joinFailStatusCode; //This is the reason code for join(assoc) failure
893 //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 -0800894 tANI_U32 roamingStatusCode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700895 tANI_U16 NumPmkidCandidate;
896 tPmkidCandidateInfo PmkidCandidateInfo[CSR_MAX_PMKID_ALLOWED];
897 #ifdef FEATURE_WLAN_WAPI
898 tANI_U16 NumBkidCandidate;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800899 tBkidCandidateInfo BkidCandidateInfo[CSR_MAX_BKID_ALLOWED];
Jeff Johnson295189b2012-06-20 16:38:30 -0700900#endif
901 tANI_BOOLEAN fWMMConnection;
Sandeep Puligillaaea98a22013-12-04 13:36:32 +0530902 tANI_BOOLEAN fQOSConnection;
903
Jeff Johnson295189b2012-06-20 16:38:30 -0700904#ifdef FEATURE_WLAN_BTAMP_UT_RF
905 //To retry a join later when it fails if so desired
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530906 vos_timer_t hTimerJoinRetry;
Jeff Johnson295189b2012-06-20 16:38:30 -0700907 tCsrTimerInfo joinRetryTimerInfo;
908 tANI_U32 maxRetryCount;
909#endif
910#ifdef FEATURE_WLAN_CCX
911 tCsrCcxCckmInfo ccxCckmInfo;
912 tANI_BOOLEAN isPrevApInfoValid;
913 tSirMacSSid prevApSSID;
914 tCsrBssid prevApBssid;
915 tANI_U8 prevOpChannel;
916 tANI_U16 clientDissSecs;
917 tANI_U32 roamTS1;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700918#if defined(FEATURE_WLAN_CCX_UPLOAD)
919 tCsrCcxCckmIe suppCckmIeInfo;
920#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700921#endif
922 tANI_U8 bRefAssocStartCnt; //Tracking assoc start indication
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800923 /* to force the AP initiate fresh 802.1x authentication after re-association need to clear
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700924 * the PMKID cache. To clear the cache in this particular case this is added
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800925 * it is needed by the HS 2.0 passpoint certification 5.2.a and b testcases */
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700926 tANI_BOOLEAN fIgnorePMKIDCache;
Jeff Johnson295189b2012-06-20 16:38:30 -0700927} tCsrRoamSession;
928
929typedef struct tagCsrRoamStruct
930{
931 tANI_U32 nextRoamId;
932 tDblLinkList roamCmdPendingList;
933 tDblLinkList channelList5G;
934 tDblLinkList channelList24;
935 tCsrConfig configParam;
936 tANI_U32 numChannelsEeprom; //total channels of eeprom
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800937 tCsrChannel base20MHzChannels; //The channel base to work on
938 tCsrChannel base40MHzChannels; //center channels for 40MHz channels
939 eCsrRoamState curState[CSR_ROAM_SESSION_MAX];
Jeff Johnson295189b2012-06-20 16:38:30 -0700940 eCsrRoamSubState curSubState[CSR_ROAM_SESSION_MAX];
941 //This may or may not have the up-to-date valid channel list
942 //It is used to get WNI_CFG_VALID_CHANNEL_LIST and not allocate memory all the time
943 tSirMacChanNum validChannelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
944 tANI_U32 numValidChannels; //total number of channels in CFG
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800945
Jeff Johnson295189b2012-06-20 16:38:30 -0700946 tANI_S32 sPendingCommands;
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +0530947 vos_timer_t hTimerWaitForKey; //To support timeout for WaitForKey state
Jeff Johnson295189b2012-06-20 16:38:30 -0700948 tCsrSummaryStatsInfo summaryStatsInfo;
949 tCsrGlobalClassAStatsInfo classAStatsInfo;
950 tCsrGlobalClassBStatsInfo classBStatsInfo;
951 tCsrGlobalClassCStatsInfo classCStatsInfo;
952 tCsrGlobalClassDStatsInfo classDStatsInfo;
953 tCsrPerStaStatsInfo perStaStatsInfo[CSR_MAX_STA];
954 tDblLinkList statsClientReqList;
955 tDblLinkList peStatsReqList;
956 tCsrTlStatsReqInfo tlStatsReqInfo;
957 eCsrRoamLinkQualityInd vccLinkQuality;
958 tCsrLinkQualityIndInfo linkQualityIndInfo;
959 v_CONTEXT_t gVosContext; //used for interaction with TL
960 //To specify whether an association or a IBSS is WMM enabled
961 //This parameter is only valid during a join or start BSS command is being executed
962 //tANI_BOOLEAN fWMMConnection; /* Moving it to be part of roamsession */
963 v_U8_t ucACWeights[WLANTL_MAX_AC];
964 /* TODO : Upto here */
965 tCsrTimerInfo WaitForKeyTimerInfo;
966 tCsrRoamSession *roamSession;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800967 tANI_U32 transactionId; // Current transaction ID for internal use.
968#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Jeff Johnson295189b2012-06-20 16:38:30 -0700969 tCsrNeighborRoamControlInfo neighborRoamInfo;
970#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700971#ifdef FEATURE_WLAN_LFR
972 tANI_U8 isFastRoamIniFeatureEnabled;
973#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700974#ifdef FEATURE_WLAN_CCX
975 tANI_U8 isCcxIniFeatureEnabled;
976#endif
Jeff Johnson43971f52012-07-17 12:26:56 -0700977#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700978 tANI_U8 RoamRssiDiff;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -0700979 tANI_BOOLEAN isWESModeEnabled;
Jeff Johnson43971f52012-07-17 12:26:56 -0700980#endif
Leela Venkata Kiran Kumar Reddy Chirala56df73f2014-01-30 14:18:00 -0800981 tANI_U32 deauthRspStatus;
Jeff Johnson295189b2012-06-20 16:38:30 -0700982}tCsrRoamStruct;
983
984
985#define GET_NEXT_ROAM_ID(pRoamStruct) (((pRoamStruct)->nextRoamId + 1 == 0) ? 1 : (pRoamStruct)->nextRoamId)
986#define CSR_IS_ROAM_STATE(pMac, state, sessionId) ( (state) == (pMac)->roam.curState[sessionId] )
987
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800988#define CSR_IS_ROAM_STOP(pMac, sessionId) CSR_IS_ROAM_STATE( (pMac), eCSR_ROAMING_STATE_STOP, sessionId )
989#define CSR_IS_ROAM_INIT(pMac, sessionId) CSR_IS_ROAM_STATE( (pMac), eCSR_ROAMING_STATE_INIT, sessionId )
Jeff Johnson295189b2012-06-20 16:38:30 -0700990#define CSR_IS_ROAM_SCANNING(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_SCANNING, sessionId )
991#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 -0800992#define CSR_IS_ROAM_IDLE(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_IDLE, sessionId )
Jeff Johnson295189b2012-06-20 16:38:30 -0700993#define CSR_IS_ROAM_JOINED(pMac, sessionId) CSR_IS_ROAM_STATE( pMac, eCSR_ROAMING_STATE_JOINED, sessionId )
994
995#define CSR_IS_ROAM_SUBSTATE(pMac, subState, sessionId) ((subState) == (pMac)->roam.curSubState[sessionId])
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800996#define CSR_IS_ROAM_SUBSTATE_JOIN_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOIN_REQ, sessionId)
997#define CSR_IS_ROAM_SUBSTATE_AUTH_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_AUTH_REQ, sessionId)
998#define CSR_IS_ROAM_SUBSTATE_REASSOC_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_REASSOC_REQ, sessionId)
999#define CSR_IS_ROAM_SUBSTATE_DISASSOC_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_REQ, sessionId)
1000#define CSR_IS_ROAM_SUBSTATE_DISASSOC_NO_JOIN(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_NOTHING_TO_JOIN, sessionId)
1001#define CSR_IS_ROAM_SUBSTATE_REASSOC_FAIL(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_REASSOC_FAILURE, sessionId)
1002#define CSR_IS_ROAM_SUBSTATE_DISASSOC_FORCED(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_FORCED, sessionId)
1003#define CSR_IS_ROAM_SUBSTATE_DEAUTH_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DEAUTH_REQ, sessionId)
1004#define CSR_IS_ROAM_SUBSTATE_START_BSS_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_START_BSS_REQ, sessionId)
1005#define CSR_IS_ROAM_SUBSTATE_STOP_BSS_REQ(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_STOP_BSS_REQ, sessionId)
1006#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 -07001007#define CSR_IS_ROAM_SUBSTATE_CONFIG(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_CONFIG, sessionId)
1008#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 -08001009#define CSR_IS_ROAM_SUBSTATE_DISASSOC_HO(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_DISASSOC_HANDOFF, sessionId)
1010#define CSR_IS_ROAM_SUBSTATE_HO_NT(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOINED_NO_TRAFFIC, sessionId)
1011#define CSR_IS_ROAM_SUBSTATE_HO_NRT(pMac, sessionId) CSR_IS_ROAM_SUBSTATE((pMac), eCSR_ROAM_SUBSTATE_JOINED_NON_REALTIME_TRAFFIC, sessionId)
1012#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 -07001013
1014#define CSR_IS_PHY_MODE_B_ONLY(pMac) \
1015 ((eCSR_DOT11_MODE_11b == (pMac)->roam.configParam.phyMode) ||\
1016 (eCSR_DOT11_MODE_11b_ONLY == (pMac)->roam.configParam.phyMode))
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001017
Jeff Johnson295189b2012-06-20 16:38:30 -07001018#define CSR_IS_PHY_MODE_G_ONLY(pMac) \
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001019 (eCSR_DOT11_MODE_11g == (pMac)->roam.configParam.phyMode || eCSR_DOT11_MODE_11g_ONLY == (pMac)->roam.configParam.phyMode)
1020
Jeff Johnson295189b2012-06-20 16:38:30 -07001021#define CSR_IS_PHY_MODE_A_ONLY(pMac) \
1022 ((eCSR_DOT11_MODE_11a == (pMac)->roam.configParam.phyMode) ||\
1023 (eCSR_DOT11_MODE_11a_ONLY == (pMac)->roam.configParam.phyMode))
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001024
Jeff Johnsone7245742012-09-05 17:12:55 -07001025#ifdef WLAN_FEATURE_11AC
1026#define CSR_IS_PHY_MODE_DUAL_BAND(phyMode) \
1027 ((eCSR_DOT11_MODE_abg & (phyMode)) || (eCSR_DOT11_MODE_11n & (phyMode)) || \
1028 (eCSR_DOT11_MODE_11ac & (phyMode)) || \
1029 (eCSR_DOT11_MODE_TAURUS & (phyMode)) || \
1030 (eCSR_DOT11_MODE_AUTO & (phyMode)))
1031#else
Jeff Johnson295189b2012-06-20 16:38:30 -07001032#define CSR_IS_PHY_MODE_DUAL_BAND(phyMode) \
1033 ((eCSR_DOT11_MODE_abg & (phyMode)) || (eCSR_DOT11_MODE_11n & (phyMode)) || \
1034 (eCSR_DOT11_MODE_TAURUS & (phyMode)) || \
1035 (eCSR_DOT11_MODE_AUTO & (phyMode)))
Jeff Johnsone7245742012-09-05 17:12:55 -07001036#endif
1037
Jeff Johnson295189b2012-06-20 16:38:30 -07001038
1039// this function returns TRUE if the NIC is operating exclusively in the 2.4 GHz band, meaning
1040// it is NOT operating in the 5.0 GHz band.
1041#define CSR_IS_24_BAND_ONLY(pMac) \
1042 (eCSR_BAND_24 == (pMac)->roam.configParam.eBand)
1043
1044#define CSR_IS_5G_BAND_ONLY(pMac) \
1045 (eCSR_BAND_5G == (pMac)->roam.configParam.eBand)
1046
1047#define CSR_IS_RADIO_DUAL_BAND(pMac) \
1048 (eCSR_BAND_ALL == (pMac)->roam.configParam.bandCapability)
1049
1050#define CSR_IS_RADIO_BG_ONLY(pMac) \
1051 (eCSR_BAND_24 == (pMac)->roam.configParam.bandCapability)
1052
1053// this function returns TRUE if the NIC is operating exclusively in the 5.0 GHz band, meaning
1054// it is NOT operating in the 2.4 GHz band
1055#define CSR_IS_RADIO_A_ONLY(pMac) \
1056 (eCSR_BAND_5G == (pMac)->roam.configParam.bandCapability)
1057
1058// this function returns TRUE if the NIC is operating in both bands.
1059#define CSR_IS_OPEARTING_DUAL_BAND(pMac) \
1060 ((eCSR_BAND_ALL == (pMac)->roam.configParam.bandCapability) && (eCSR_BAND_ALL == (pMac)->roam.configParam.eBand))
1061
1062// this function returns TRUE if the NIC can operate in the 5.0 GHz band (could operate in the
1063// 2.4 GHz band also).
1064#define CSR_IS_OPERATING_A_BAND(pMac) \
1065 (CSR_IS_OPEARTING_DUAL_BAND((pMac)) || CSR_IS_RADIO_A_ONLY((pMac)) || CSR_IS_5G_BAND_ONLY((pMac)))
1066
1067// this function returns TRUE if the NIC can operate in the 2.4 GHz band (could operate in the
1068// 5.0 GHz band also).
1069#define CSR_IS_OPERATING_BG_BAND(pMac) \
1070 (CSR_IS_OPEARTING_DUAL_BAND((pMac)) || CSR_IS_RADIO_BG_ONLY((pMac)) || CSR_IS_24_BAND_ONLY((pMac)))
1071
1072#define CSR_IS_CHANNEL_5GHZ(chnNum) \
Jeff Johnsone7245742012-09-05 17:12:55 -07001073 (((chnNum) >= CSR_MIN_5GHz_CHANNEL_NUMBER) && ((chnNum) <= CSR_MAX_5GHz_CHANNEL_NUMBER))
Jeff Johnson295189b2012-06-20 16:38:30 -07001074
Srinivas Girigowdade697412013-02-14 16:31:48 -08001075#define CSR_IS_CHANNEL_DFS(chnNum) \
1076 (NV_CHANNEL_ENABLE != vos_nv_getChannelEnabledState(chnNum))
1077
Jeff Johnson295189b2012-06-20 16:38:30 -07001078#define CSR_IS_CHANNEL_24GHZ(chnNum) \
1079 (((chnNum) > 0) && ((chnNum) <= CSR_MAX_24GHz_CHANNEL_NUMBER))
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001080
Jeff Johnson295189b2012-06-20 16:38:30 -07001081#define CSR_IS_SAME_BAND_CHANNELS(ch1, ch2) (CSR_IS_CHANNEL_5GHZ(ch1) == CSR_IS_CHANNEL_5GHZ(ch2))
1082
1083
1084#define CSR_IS_11D_INFO_FOUND(pMac) \
1085 (0 != (pMac)->scan.channelOf11dInfo)
1086// DEAUTHIND
1087#define CSR_IS_ROAMING(pSession) ((CSR_IS_LOSTLINK_ROAMING((pSession)->roamingReason)) || \
1088 (eCsrDynamicRoaming == (pSession)->roamingReason) || \
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001089 (eCsrReassocRoaming == (pSession)->roamingReason))
Jeff Johnson295189b2012-06-20 16:38:30 -07001090
1091
1092#define CSR_IS_SET_KEY_COMMAND( pCommand ) ( eSmeCommandSetKey == (pCommand)->command )
1093
1094#define CSR_IS_ADDTS_WHEN_ACMOFF_SUPPORTED(pMac) (pMac->roam.configParam.addTSWhenACMIsOff)
1095// DEAUTHIND
1096#define CSR_IS_LOSTLINK_ROAMING(reason) ((eCsrLostlinkRoamingDisassoc == (reason)) || (eCsrLostlinkRoamingDeauth == (reason)))
1097
Venkata Prathyusha Kuntupalli239278b2013-03-26 15:58:18 -07001098#define CSR_IS_ROAMING_COMMAND(pCommand) ((eCsrLostLink1 == (pCommand)->u.roamCmd.roamReason) ||\
1099 (eCsrLostLink2 == (pCommand)->u.roamCmd.roamReason) ||\
1100 (eCsrLostLink3 == (pCommand)->u.roamCmd.roamReason) )
1101
1102
Jeff Johnson295189b2012-06-20 16:38:30 -07001103//Stop CSR from asking for IMPS, This function doesn't disable IMPS from CSR
1104void csrScanSuspendIMPS( tpAniSirGlobal pMac );
1105//Start CSR from asking for IMPS. This function doesn't trigger CSR to request entering IMPS
1106//because IMPS maybe disabled.
1107void csrScanResumeIMPS( tpAniSirGlobal pMac );
1108
1109eHalStatus csrInitGetChannels(tpAniSirGlobal pMac);
Srinivas, Dasari42bf7702014-02-07 11:29:53 +05301110eHalStatus csrScanFilterResults(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -07001111
1112eHalStatus csrSetModifyProfileFields(tpAniSirGlobal pMac, tANI_U32 sessionId,
1113 tCsrRoamModifyProfileFields *pModifyProfileFields);
1114/* ---------------------------------------------------------------------------
1115 \fn csrGetModifyProfileFields
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001116 \brief HDD or SME - QOS calls this function to get the current values of
Jeff Johnson295189b2012-06-20 16:38:30 -07001117 connected profile fields changing which can cause reassoc.
1118 This function must be called after CFG is downloaded and STA is in connected
1119 state.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001120 \param pModifyProfileFields - pointer to the connected profile fields
Jeff Johnson295189b2012-06-20 16:38:30 -07001121 changing which can cause reassoc
1122
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001123 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001124 -------------------------------------------------------------------------------*/
1125eHalStatus csrGetModifyProfileFields(tpAniSirGlobal pMac, tANI_U32 sessionId,
1126 tCsrRoamModifyProfileFields * pModifyProfileFields);
1127void csrSetGlobalCfgs( tpAniSirGlobal pMac );
1128void csrSetDefaultDot11Mode( tpAniSirGlobal pMac );
1129void csrScanSetChannelMask(tpAniSirGlobal pMac, tCsrChannelInfo *pChannelInfo);
1130tANI_BOOLEAN csrIsConnStateDisconnected(tpAniSirGlobal pMac, tANI_U32 sessionId);
1131tANI_BOOLEAN csrIsConnStateConnectedIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1132tANI_BOOLEAN csrIsConnStateDisconnectedIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1133tANI_BOOLEAN csrIsConnStateConnectedInfra( tpAniSirGlobal pMac, tANI_U32 sessionId );
1134tANI_BOOLEAN csrIsConnStateConnected( tpAniSirGlobal pMac, tANI_U32 sessionId );
1135tANI_BOOLEAN csrIsConnStateInfra( tpAniSirGlobal pMac, tANI_U32 sessionId );
1136tANI_BOOLEAN csrIsConnStateIbss( tpAniSirGlobal pMac, tANI_U32 sessionId );
1137tANI_BOOLEAN csrIsConnStateWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1138tANI_BOOLEAN csrIsConnStateConnectedWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1139tANI_BOOLEAN csrIsConnStateDisconnectedWds( tpAniSirGlobal pMac, tANI_U32 sessionId );
1140tANI_BOOLEAN csrIsAnySessionInConnectState( tpAniSirGlobal pMac );
1141tANI_BOOLEAN csrIsAllSessionDisconnected( tpAniSirGlobal pMac );
Madan Mohan Koyyalamudi48081ef2012-12-04 16:49:55 -08001142tANI_BOOLEAN csrIsStaSessionConnected( tpAniSirGlobal pMac );
1143tANI_BOOLEAN csrIsP2pSessionConnected( tpAniSirGlobal pMac );
Madan Mohan Koyyalamudid3d22592012-09-24 14:01:29 -07001144tANI_BOOLEAN csrIsAnySessionConnected( tpAniSirGlobal pMac );
Jeff Johnson295189b2012-06-20 16:38:30 -07001145tANI_BOOLEAN csrIsInfraConnected( tpAniSirGlobal pMac );
1146tANI_BOOLEAN csrIsConcurrentInfraConnected( tpAniSirGlobal pMac );
Jeff Johnsone7245742012-09-05 17:12:55 -07001147tANI_BOOLEAN csrIsConcurrentSessionRunning( tpAniSirGlobal pMac );
Jeff Johnsone7245742012-09-05 17:12:55 -07001148tANI_BOOLEAN csrIsInfraApStarted( tpAniSirGlobal pMac );
Jeff Johnson295189b2012-06-20 16:38:30 -07001149tANI_BOOLEAN csrIsIBSSStarted( tpAniSirGlobal pMac );
1150tANI_BOOLEAN csrIsBTAMPStarted( tpAniSirGlobal pMac );
1151tANI_BOOLEAN csrIsBTAMP( tpAniSirGlobal pMac, tANI_U32 sessionId );
1152eHalStatus csrIsBTAMPAllowed( tpAniSirGlobal pMac, tANI_U32 chnId );
Jeff Johnsone7245742012-09-05 17:12:55 -07001153tANI_BOOLEAN csrIsValidMcConcurrentSession(tpAniSirGlobal pMac, tANI_U32 sessionId,
1154 tSirBssDescription *pBssDesc);
Jeff Johnson295189b2012-06-20 16:38:30 -07001155tANI_BOOLEAN csrIsConnStateConnectedInfraAp( tpAniSirGlobal pMac, tANI_U32 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -07001156/*----------------------------------------------------------------------------
1157 \fn csrRoamRegisterLinkQualityIndCallback
1158
1159 \brief
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001160 a CSR function to allow HDD to register a callback handler with CSR for
1161 link quality indications.
Jeff Johnson295189b2012-06-20 16:38:30 -07001162
1163 Only one callback may be registered at any time.
1164 In order to deregister the callback, a NULL cback may be provided.
1165
1166 Registration happens in the task context of the caller.
1167
1168 \param callback - Call back being registered
1169 \param pContext - user data
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001170
Jeff Johnson295189b2012-06-20 16:38:30 -07001171 DEPENDENCIES: After CSR open
1172
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001173 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001174-----------------------------------------------------------------------------*/
1175eHalStatus csrRoamRegisterLinkQualityIndCallback(tpAniSirGlobal pMac,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001176 csrRoamLinkQualityIndCallback callback,
Jeff Johnson295189b2012-06-20 16:38:30 -07001177 void *pContext);
1178/* ---------------------------------------------------------------------------
1179 \fn csrGetStatistics
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001180 \brief csr function that client calls to register a callback to get
1181 different PHY level statistics from CSR.
1182
Jeff Johnson295189b2012-06-20 16:38:30 -07001183 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
1184 \param statsMask - The different category/categories of stats requester is looking for
1185 \param callback - SME sends back the requested stats using the callback
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001186 \param periodicity - If requester needs periodic update, 0 means it's an one
Jeff Johnson295189b2012-06-20 16:38:30 -07001187 time request
1188 \param cache - If requester is happy with cached stats
1189 \param staId - The station ID for which the stats is requested for
1190 \param pContext - user context to be passed back along with the callback
1191
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001192 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001193 ---------------------------------------------------------------------------*/
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001194eHalStatus csrGetStatistics(tpAniSirGlobal pMac, eCsrStatsRequesterType requesterId,
1195 tANI_U32 statsMask,
1196 tCsrStatsCallback callback,
1197 tANI_U32 periodicity, tANI_BOOLEAN cache,
Jeff Johnson295189b2012-06-20 16:38:30 -07001198 tANI_U8 staId, void *pContext);
1199
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +05301200/* ---------------------------------------------------------------------------
1201 \fn csrGetTLSTAState
1202 \helper function to get the TL STA State whenever the function is called.
1203
1204 \param staId - The staID to be passed to the TL
1205 to get the relevant TL STA State
1206 \return the state as tANI_U16
1207 ---------------------------------------------------------------------------*/
1208tANI_U16 csrGetTLSTAState(tpAniSirGlobal pMac, tANI_U8 staId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001209
1210eHalStatus csrGetRssi(tpAniSirGlobal pMac,tCsrRssiCallback callback,tANI_U8 staId,tCsrBssid bssId,void * pContext,void * pVosContext);
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05301211
1212/* ---------------------------------------------------------------------------
1213 \fn csrGetSnr
1214 \brief csr function that client calls to register a callback to get
1215 SNR stored in TL
1216
1217 \param callback - SME sends back the requested stats using the callback
1218 \param staId - The station ID for which the stats is requested for
1219 \param bssid - The bssid for the connected session
1220 \param pContext - user context to be passed back along with the callback
1221
1222 \return eHalStatus
1223 ---------------------------------------------------------------------------*/
1224eHalStatus csrGetSnr(tpAniSirGlobal pMac, tCsrSnrCallback callback,
1225 tANI_U8 staId, tCsrBssid bssId, void *pContext);
1226
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08001227#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_CCX || defined(FEATURE_WLAN_LFR)
1228eHalStatus csrGetRoamRssi(tpAniSirGlobal pMac,
1229 tCsrRssiCallback callback,
1230 tANI_U8 staId,
1231 tCsrBssid bssId,
1232 void * pContext,
1233 void * pVosContext);
1234#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001235
1236#if defined(FEATURE_WLAN_CCX) && defined(FEATURE_WLAN_CCX_UPLOAD)
1237eHalStatus csrGetTsmStats(tpAniSirGlobal pMac, tCsrTsmStatsCallback callback, tANI_U8 staId,
1238 tCsrBssid bssId, void *pContext, void* pVosContext,
1239 tANI_U8 tid);
1240#endif /* FEATURE_WLAN_CCX && FEATURE_WLAN_CCX_UPLOAD */
1241
Jeff Johnson295189b2012-06-20 16:38:30 -07001242eHalStatus csrRoamRegisterCallback(tpAniSirGlobal pMac, csrRoamCompleteCallback callback, void *pContext);
1243/* ---------------------------------------------------------------------------
1244 \fn csrGetConfigParam
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001245 \brief HDD calls this function to get the global settings currently maintained by CSR.
Jeff Johnson295189b2012-06-20 16:38:30 -07001246 \param pParam - caller allocated memory
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001247 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001248 -------------------------------------------------------------------------------*/
1249eHalStatus csrGetConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam);
1250
1251/* ---------------------------------------------------------------------------
1252 \fn csrMsgProcessor
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001253 \brief HDD calls this function to change some global settings.
Jeff Johnson295189b2012-06-20 16:38:30 -07001254 caller must set the all fields or call csrGetConfigParam to prefill the fields.
1255 \param pParam - caller allocated memory
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001256 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001257 -------------------------------------------------------------------------------*/
1258eHalStatus csrChangeDefaultConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam);
1259
1260
1261/* ---------------------------------------------------------------------------
1262 \fn csrMsgProcessor
1263 \brief HDD calls this function for the messages that are handled by CSR.
1264 \param pMsgBuf - a pointer to a buffer that maps to various structures base on the message type.
1265 The beginning of the buffer can always map to tSirSmeRsp.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001266 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001267 -------------------------------------------------------------------------------*/
1268eHalStatus csrMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf );
1269
1270/* ---------------------------------------------------------------------------
1271 \fn csrOpen
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001272 \brief This function must be called before any API call to CSR.
1273 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001274 -------------------------------------------------------------------------------*/
1275eHalStatus csrOpen(tpAniSirGlobal pMac);
Mihir Shetee1093ba2014-01-21 20:13:32 +05301276
1277/* ---------------------------------------------------------------------------
1278 \fn csrInitChannels
1279 \brief This function must be called to initialize CSR channel lists
1280 \return eHalStatus
1281 -------------------------------------------------------------------------------*/
1282eHalStatus csrInitChannels(tpAniSirGlobal pMac);
1283
Jeff Johnson295189b2012-06-20 16:38:30 -07001284/* ---------------------------------------------------------------------------
1285 \fn csrClose
1286 \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 -08001287 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001288 -------------------------------------------------------------------------------*/
1289eHalStatus csrClose(tpAniSirGlobal pMac);
1290/* ---------------------------------------------------------------------------
1291 \fn csrStart
1292 \brief To start CSR.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001293 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001294 -------------------------------------------------------------------------------*/
1295eHalStatus csrStart(tpAniSirGlobal pMac);
1296/* ---------------------------------------------------------------------------
1297 \fn csrStop
1298 \brief To stop CSR. CSR still keeps its current setting.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001299 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001300 -------------------------------------------------------------------------------*/
Kiet Lama72a2322013-11-15 11:18:11 +05301301eHalStatus csrStop(tpAniSirGlobal pMac, tHalStopType stopType);
Jeff Johnson295189b2012-06-20 16:38:30 -07001302/* ---------------------------------------------------------------------------
1303 \fn csrReady
1304 \brief To let CSR is ready to operate
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001305 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001306 -------------------------------------------------------------------------------*/
1307eHalStatus csrReady(tpAniSirGlobal pMac);
1308
1309#ifdef FEATURE_WLAN_WAPI
1310eHalStatus csrRoamGetBKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pNum,
1311 tBkidCacheInfo *pBkidCache);
1312
1313
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001314eHalStatus csrScanGetBKIDCandidateList(tpAniSirGlobal pMac, tANI_U32 sessionId,
Jeff Johnson295189b2012-06-20 16:38:30 -07001315 tBkidCandidateInfo *pBkidList, tANI_U32 *pNumItems );
1316tANI_U32 csrRoamGetNumBKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId);
1317eHalStatus csrRoamSetBKIDCache( tpAniSirGlobal pMac, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
1318 tANI_U32 numItems );
1319/* ---------------------------------------------------------------------------
1320 \fn csrRoamGetWapiReqIE
1321 \brief return the WAPI IE CSR passes to PE to JOIN request or START_BSS request
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001322 \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 -07001323 needed or IE length in pBuf.
1324 \param pBuf - Caller allocated memory that contain the IE field, if any, upon return
1325 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
1326 -------------------------------------------------------------------------------*/
1327eHalStatus csrRoamGetWapiReqIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf);
1328
1329/* ---------------------------------------------------------------------------
1330 \fn csrRoamGetWapiRspIE
1331 \brief return the WAPI IE from the beacon or probe rsp if connected
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001332 \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 -07001333 needed or IE length in pBuf.
1334 \param pBuf - Caller allocated memory that contain the IE field, if any, upon return
1335 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
1336 -------------------------------------------------------------------------------*/
1337eHalStatus csrRoamGetWapiRspIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf);
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001338tANI_U8 csrConstructWapiIe( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
Jeff Johnson295189b2012-06-20 16:38:30 -07001339 tSirBssDescription *pSirBssDesc, tDot11fBeaconIEs *pIes, tCsrWapiIe *pWapiIe );
1340#endif /* FEATURE_WLAN_WAPI */
1341
Jeff Johnson295189b2012-06-20 16:38:30 -07001342eHalStatus csrRoamUpdateAPWPSIE( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirAPWPSIEs *pAPWPSIES );
1343eHalStatus csrRoamUpdateWPARSNIEs( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirRSNie * pAPSirRSNie);
Jeff Johnson295189b2012-06-20 16:38:30 -07001344void csrSetCfgPrivacy( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy );
1345tANI_S8 csrGetInfraSessionId( tpAniSirGlobal pMac );
1346tANI_U8 csrGetInfraOperationChannel( tpAniSirGlobal pMac, tANI_U8 sessionId);
1347tANI_U8 csrGetConcurrentOperationChannel( tpAniSirGlobal pMac );
1348
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001349eHalStatus csrRoamCopyConnectProfile(tpAniSirGlobal pMac, tANI_U32 sessionId,
Jeff Johnson295189b2012-06-20 16:38:30 -07001350 tCsrRoamConnectedProfile *pProfile);
1351tANI_BOOLEAN csrIsSetKeyAllowed(tpAniSirGlobal pMac, tANI_U32 sessionId);
1352
1353void csrSetOppositeBandChannelInfo( tpAniSirGlobal pMac );
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001354void csrConstructCurrentValidChannelList( tpAniSirGlobal pMac, tDblLinkList *pChannelSetList,
Jeff Johnson295189b2012-06-20 16:38:30 -07001355 tANI_U8 *pChannelList, tANI_U8 bSize, tANI_U8 *pNumChannels );
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08001356
1357#ifdef FEATURE_WLAN_SCAN_PNO
Srikant Kuppa066904f2013-05-07 13:56:02 -07001358eHalStatus csrScanSavePreferredNetworkFound(tpAniSirGlobal pMac,
1359 tSirPrefNetworkFoundInd *pPrefNetworkFoundInd);
Manjunathappa Prakash4f1d5a52013-11-11 16:22:19 -08001360#endif //FEATURE_WLAN_SCAN_PNO
Jeff Johnson295189b2012-06-20 16:38:30 -07001361#endif
1362
1363#ifdef WLAN_FEATURE_VOWIFI_11R
1364//Returns whether the current association is a 11r assoc or not
1365tANI_BOOLEAN csrRoamIs11rAssoc(tpAniSirGlobal pMac);
1366#endif
1367
1368#ifdef FEATURE_WLAN_CCX
1369//Returns whether the current association is a CCX assoc or not
1370tANI_BOOLEAN csrRoamIsCCXAssoc(tpAniSirGlobal pMac);
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001371tANI_BOOLEAN csrRoamIsCcxIniFeatureEnabled(tpAniSirGlobal pMac);
1372tANI_BOOLEAN csrNeighborRoamIsCCXAssoc(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -07001373#endif
1374
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001375//Remove this code once SLM_Sessionization is supported
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001376//BMPS_WORKAROUND_NOT_NEEDED
Jeff Johnson295189b2012-06-20 16:38:30 -07001377void csrDisconnectAllActiveSessions(tpAniSirGlobal pMac);
Mohit Khanna349bc392012-09-11 17:24:52 -07001378
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001379#ifdef FEATURE_WLAN_LFR
1380//Returns whether "Legacy Fast Roaming" is enabled...or not
Madan Mohan Koyyalamudi03aae5f2012-11-28 01:51:22 +05301381tANI_BOOLEAN csrRoamIsFastRoamEnabled(tpAniSirGlobal pMac, tANI_U32 sessionId);
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001382#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1383tANI_BOOLEAN csrRoamIsRoamOffloadScanEnabled(tpAniSirGlobal pMac);
1384#endif
Madan Mohan Koyyalamudi470d2cf2012-09-28 14:43:44 -07001385tANI_BOOLEAN csrIsChannelPresentInList( tANI_U8 *pChannelList, int numChannels, tANI_U8 channel );
1386VOS_STATUS csrAddToChannelListFront( tANI_U8 *pChannelList, int numChannels, tANI_U8 channel );
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001387#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1388eHalStatus csrScanRequestLfrResult(tpAniSirGlobal pMac, tANI_U32 sessionId,
1389 csrScanCompleteCallback callback, void *pContext);
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07001390eHalStatus csrRoamOffloadScanRspHdlr(tpAniSirGlobal pMac, tANI_U8 reason);
1391eHalStatus csrHandoffRequest(tpAniSirGlobal pMac, tCsrHandoffRequest *pHandoffInfo);
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001392#endif
1393tANI_BOOLEAN csrRoamIsStaMode(tpAniSirGlobal pMac, tANI_U32 sessionId);
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001394#endif
1395