blob: 05410a1b32756679c99f6e03d599b53fd7ceeee6 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Gopichand Nakkala92f07d82013-01-08 21:16:34 -08002 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
3 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21/*
Jeff Johnson32d95a32012-09-10 13:15:23 -070022 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
Jeff Johnson295189b2012-06-20 16:38:30 -070023 *
24 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
25 *
26 *
27 * Permission to use, copy, modify, and/or distribute this software for
28 * any purpose with or without fee is hereby granted, provided that the
29 * above copyright notice and this permission notice appear in all
30 * copies.
31 *
32 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
33 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
34 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
35 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
36 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
37 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
38 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
39 * PERFORMANCE OF THIS SOFTWARE.
40 */
41
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080042/** ------------------------------------------------------------------------- *
43 ------------------------------------------------------------------------- *
Jeff Johnson295189b2012-06-20 16:38:30 -070044 \file csrApi.h
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080045
Jeff Johnson295189b2012-06-20 16:38:30 -070046 Exports and types for the Common Scan and Roaming Module interfaces.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080047
48 Copyright (C) 2006 Airgo Networks, Incorporated
Jeff Johnson295189b2012-06-20 16:38:30 -070049 ========================================================================== */
50#ifndef CSRAPI_H__
51#define CSRAPI_H__
52
53#include "sirApi.h"
54#include "sirMacProtDef.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070055#include "csrLinkList.h"
56
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080057typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -070058{
59 eCSR_AUTH_TYPE_NONE, //never used
60 // MAC layer authentication types
61 eCSR_AUTH_TYPE_OPEN_SYSTEM,
62 eCSR_AUTH_TYPE_SHARED_KEY,
63 eCSR_AUTH_TYPE_AUTOSWITCH,
64
65 // Upper layer authentication types
66 eCSR_AUTH_TYPE_WPA,
67 eCSR_AUTH_TYPE_WPA_PSK,
68 eCSR_AUTH_TYPE_WPA_NONE,
69
70 eCSR_AUTH_TYPE_RSN,
71 eCSR_AUTH_TYPE_RSN_PSK,
72#if defined WLAN_FEATURE_VOWIFI_11R
73 eCSR_AUTH_TYPE_FT_RSN,
74 eCSR_AUTH_TYPE_FT_RSN_PSK,
75#endif
76#ifdef FEATURE_WLAN_WAPI
77 eCSR_AUTH_TYPE_WAPI_WAI_CERTIFICATE,
78 eCSR_AUTH_TYPE_WAPI_WAI_PSK,
79#endif /* FEATURE_WLAN_WAPI */
80#ifdef FEATURE_WLAN_CCX
81 eCSR_AUTH_TYPE_CCKM_WPA,
82 eCSR_AUTH_TYPE_CCKM_RSN,
83#endif /* FEATURE_WLAN_CCX */
Chet Lanctot186b5732013-03-18 10:26:30 -070084#ifdef WLAN_FEATURE_11W
85 eCSR_AUTH_TYPE_RSN_PSK_SHA256,
86#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070087 eCSR_NUM_OF_SUPPORT_AUTH_TYPE,
88 eCSR_AUTH_TYPE_FAILED = 0xff,
89 eCSR_AUTH_TYPE_UNKNOWN = eCSR_AUTH_TYPE_FAILED,
90
91}eCsrAuthType;
92
93
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080094typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -070095{
96 eCSR_ENCRYPT_TYPE_NONE,
97 eCSR_ENCRYPT_TYPE_WEP40_STATICKEY,
98 eCSR_ENCRYPT_TYPE_WEP104_STATICKEY,
99
100 eCSR_ENCRYPT_TYPE_WEP40,
101 eCSR_ENCRYPT_TYPE_WEP104,
102 eCSR_ENCRYPT_TYPE_TKIP,
103 eCSR_ENCRYPT_TYPE_AES,
104#ifdef FEATURE_WLAN_WAPI
105 eCSR_ENCRYPT_TYPE_WPI, //WAPI
106#endif /* FEATURE_WLAN_WAPI */
107#ifdef FEATURE_WLAN_CCX
108 eCSR_ENCRYPT_TYPE_KRK,
109#endif /* FEATURE_WLAN_CCX */
110#ifdef WLAN_FEATURE_11W
111 //11w BIP
112 eCSR_ENCRYPT_TYPE_AES_CMAC,
113#endif
114 eCSR_ENCRYPT_TYPE_ANY,
115 eCSR_NUM_OF_ENCRYPT_TYPE = eCSR_ENCRYPT_TYPE_ANY,
116
117 eCSR_ENCRYPT_TYPE_FAILED = 0xff,
118 eCSR_ENCRYPT_TYPE_UNKNOWN = eCSR_ENCRYPT_TYPE_FAILED,
119
120}eCsrEncryptionType;
121
122/*---------------------------------------------------------------------------
123 Enumeration of the various Security types
124---------------------------------------------------------------------------*/
125typedef enum
126{
127 eCSR_SECURITY_TYPE_WPA,
128 eCSR_SECURITY_TYPE_RSN,
129#ifdef FEATURE_WLAN_WAPI
130 eCSR_SECURITY_TYPE_WAPI,
131#endif /* FEATURE_WLAN_WAPI */
132 eCSR_SECURITY_TYPE_UNKNOWN,
133
134}eCsrSecurityType;
135
136typedef enum
137{
138 eCSR_DOT11_MODE_TAURUS = 0, //This mean everything because it covers all thing we support
139 eCSR_DOT11_MODE_abg = 0x0001, //11a/b/g only, no HT, no proprietary
140 eCSR_DOT11_MODE_11a = 0x0002,
141 eCSR_DOT11_MODE_11b = 0x0004,
142 eCSR_DOT11_MODE_11g = 0x0008,
143 eCSR_DOT11_MODE_11n = 0x0010,
144 eCSR_DOT11_MODE_POLARIS = 0x0020,
145 eCSR_DOT11_MODE_TITAN = 0x0040,
146 eCSR_DOT11_MODE_11g_ONLY = 0x0080,
147 eCSR_DOT11_MODE_11n_ONLY = 0x0100,
148 eCSR_DOT11_MODE_TAURUS_ONLY = 0x0200,
149 eCSR_DOT11_MODE_11b_ONLY = 0x0400,
150 eCSR_DOT11_MODE_11a_ONLY = 0x0800,
Jeff Johnsone7245742012-09-05 17:12:55 -0700151#ifdef WLAN_FEATURE_11AC
152 eCSR_DOT11_MODE_11ac = 0x1000,
153 eCSR_DOT11_MODE_11ac_ONLY = 0x2000,
154#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700155 //This is for WIFI test. It is same as eWNIAPI_MAC_PROTOCOL_ALL except when it starts IBSS in 11B of 2.4GHz
156 //It is for CSR internal use
Jeff Johnsone7245742012-09-05 17:12:55 -0700157 eCSR_DOT11_MODE_AUTO = 0x4000,
Jeff Johnson295189b2012-06-20 16:38:30 -0700158
159 eCSR_NUM_PHY_MODE = 16, //specify the number of maximum bits for phyMode
160}eCsrPhyMode;
161
162
163typedef tANI_U8 tCsrBssid[WNI_CFG_BSSID_LEN];
164
165typedef enum
166{
Varun Reddy Yeturu2cc78922013-04-10 11:50:02 -0700167 eCSR_BSS_TYPE_NONE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700168 eCSR_BSS_TYPE_INFRASTRUCTURE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700169 eCSR_BSS_TYPE_INFRA_AP, // SoftAP AP
Jeff Johnson295189b2012-06-20 16:38:30 -0700170 eCSR_BSS_TYPE_IBSS, // an IBSS network we will NOT start
171 eCSR_BSS_TYPE_START_IBSS, // an IBSS network we will start if no partners detected.
172 eCSR_BSS_TYPE_WDS_AP, // BT-AMP AP
173 eCSR_BSS_TYPE_WDS_STA, // BT-AMP station
174 eCSR_BSS_TYPE_ANY, // any BSS type (IBSS or Infrastructure).
175}eCsrRoamBssType;
176
177
178
179typedef enum {
180 eCSR_SCAN_REQUEST_11D_SCAN = 1,
181 eCSR_SCAN_REQUEST_FULL_SCAN,
182 eCSR_SCAN_IDLE_MODE_SCAN,
183 eCSR_SCAN_HO_BG_SCAN, // bg scan request in NRT & RT Handoff sub-states
184 eCSR_SCAN_HO_PROBE_SCAN, // directed probe on an entry from the candidate list
185 eCSR_SCAN_HO_NT_BG_SCAN, // bg scan request in NT sub-state
186 eCSR_SCAN_P2P_DISCOVERY,
187
188 eCSR_SCAN_SOFTAP_CHANNEL_RANGE,
189 eCSR_SCAN_P2P_FIND_PEER,
190}eCsrRequestType;
191
192typedef enum {
193 eCSR_SCAN_RESULT_GET = 0,
194 eCSR_SCAN_RESULT_FLUSH = 1, //to delete all cached scan results
195}eCsrScanResultCmd;
196
197typedef enum
198{
199 eCSR_SCAN_SUCCESS,
200 eCSR_SCAN_FAILURE,
201 eCSR_SCAN_ABORT,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800202 eCSR_SCAN_FOUND_PEER,
Jeff Johnson295189b2012-06-20 16:38:30 -0700203}eCsrScanStatus;
204
Srinivas, Dasari138af4f2014-02-07 11:13:45 +0530205/* Reason to abort the scan
206 * The reason can used later to decide whether to update the scan results
207 * to upper layer or not
208 */
209typedef enum
210{
211 eCSR_SCAN_ABORT_DEFAULT,
212 eCSR_SCAN_ABORT_DUE_TO_BAND_CHANGE, //Scan aborted due to band change
213}eCsrAbortReason;
214
Jeff Johnson295189b2012-06-20 16:38:30 -0700215#define CSR_SCAN_TIME_DEFAULT 0
216#define CSR_VALUE_IGNORED 0xFFFFFFFF
217#define CSR_RSN_PMKID_SIZE 16
218#define CSR_MAX_PMKID_ALLOWED 16
219#define CSR_WEP40_KEY_LEN 5
220#define CSR_WEP104_KEY_LEN 13
221#define CSR_TKIP_KEY_LEN 32
222#define CSR_AES_KEY_LEN 16
223#define CSR_MAX_TX_POWER ( WNI_CFG_CURRENT_TX_POWER_LEVEL_STAMAX )
224#define CSR_MAX_RSC_LEN 16
225#ifdef FEATURE_WLAN_WAPI
226#define CSR_WAPI_BKID_SIZE 16
227#define CSR_MAX_BKID_ALLOWED 16
228#define CSR_WAPI_KEY_LEN 32
229#define CSR_MAX_KEY_LEN ( CSR_WAPI_KEY_LEN ) //longest one is for WAPI
230#else
231#define CSR_MAX_KEY_LEN ( CSR_TKIP_KEY_LEN ) //longest one is for TKIP
232#endif /* FEATURE_WLAN_WAPI */
233#ifdef FEATURE_WLAN_CCX
234#define CSR_KRK_KEY_LEN 16
235#endif
236
237
238
239typedef struct tagCsrChannelInfo
240{
241 tANI_U8 numOfChannels;
242 tANI_U8 *ChannelList; //it will be an array of channels
Madan Mohan Koyyalamudidd3c9662012-11-09 17:39:30 -0800243}tCsrChannelInfo, *tpCsrChannelInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700244
245typedef struct tagCsrSSIDInfo
246{
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800247 tSirMacSSid SSID;
Jeff Johnson295189b2012-06-20 16:38:30 -0700248 tANI_BOOLEAN handoffPermitted;
249 tANI_BOOLEAN ssidHidden;
250}tCsrSSIDInfo;
251
252typedef struct tagCsrSSIDs
253{
254 tANI_U32 numOfSSIDs;
255 tCsrSSIDInfo *SSIDList; //To be allocated for array of SSIDs
256}tCsrSSIDs;
257
258typedef struct tagCsrBSSIDs
259{
260 tANI_U32 numOfBSSIDs;
261 tCsrBssid *bssid;
262}tCsrBSSIDs;
263
Gopichand Nakkala681989c2013-03-06 22:27:48 -0800264typedef struct tagCsrStaParams
265{
266 tANI_U16 capability;
267 tANI_U8 extn_capability[SIR_MAC_MAX_EXTN_CAP];
268 tANI_U8 supported_rates_len;
269 tANI_U8 supported_rates[SIR_MAC_MAX_SUPP_RATES];
Hoonki Lee66b75f32013-04-16 18:30:07 -0700270 tANI_U8 htcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -0800271 tSirHTCap HTCap;
Hoonki Lee66b75f32013-04-16 18:30:07 -0700272 tANI_U8 vhtcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -0800273 tSirVHTCap VHTCap;
274 tANI_U8 uapsd_queues;
275 tANI_U8 max_sp;
276}tCsrStaParams;
Jeff Johnson295189b2012-06-20 16:38:30 -0700277
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800278typedef struct tagCsrScanRequest
Jeff Johnson295189b2012-06-20 16:38:30 -0700279{
280 tSirScanType scanType;
281 tCsrBssid bssid;
282 eCsrRoamBssType BSSType;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800283 tCsrSSIDs SSIDs;
Jeff Johnson295189b2012-06-20 16:38:30 -0700284 tCsrChannelInfo ChannelInfo;
285 tANI_U32 minChnTime; //in units of milliseconds
286 tANI_U32 maxChnTime; //in units of milliseconds
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800287 tANI_U32 minChnTimeBtc; //in units of milliseconds
288 tANI_U32 maxChnTimeBtc; //in units of milliseconds
Jeff Johnson295189b2012-06-20 16:38:30 -0700289 tANI_U32 restTime; //in units of milliseconds //ignored when not connected
290 tANI_U32 uIEFieldLen;
291 tANI_U8 *pIEField;
292 eCsrRequestType requestType; //11d scan or full scan
Jeff Johnson295189b2012-06-20 16:38:30 -0700293 tANI_BOOLEAN p2pSearch;
Jeff Johnsone7245742012-09-05 17:12:55 -0700294 tANI_BOOLEAN skipDfsChnlInP2pSearch;
Madan Mohan Koyyalamudi04a65f02013-07-26 13:58:38 +0530295 tANI_BOOLEAN bcnRptReqScan; //is Scan issued by Beacon Report Request
Jeff Johnson295189b2012-06-20 16:38:30 -0700296}tCsrScanRequest;
297
298typedef struct tagCsrBGScanRequest
299{
300 tSirScanType scanType;
301 tSirMacSSid SSID;
302 tCsrChannelInfo ChannelInfo;
303 tANI_U32 scanInterval; //in units of milliseconds
304 tANI_U32 minChnTime; //in units of milliseconds
305 tANI_U32 maxChnTime; //in units of milliseconds
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800306 tANI_U32 minChnTimeBtc; //in units of milliseconds
307 tANI_U32 maxChnTimeBtc; //in units of milliseconds
Jeff Johnson295189b2012-06-20 16:38:30 -0700308 tANI_U32 restTime; //in units of milliseconds //ignored when not connected
309 tANI_U32 throughputImpact; //specify whether BG scan cares about impacting throughput //ignored when not connected
310 tCsrBssid bssid; //how to use it?? Apple
Srikant Kuppa866893f2012-12-27 17:28:14 -0800311}tCsrBGScanRequest, *tpCsrBGScanRequest;
Jeff Johnson295189b2012-06-20 16:38:30 -0700312
313
314typedef struct tagCsrScanResultInfo
315{
316 //Carry the IEs for the current BSSDescription. A pointer to tDot11fBeaconIEs. Maybe NULL for start BSS.
317 void *pvIes;
318 tAniSSID ssId;
319 v_TIME_t timer; // timer is variable which is used for hidden SSID's timer value
320 //This member must be the last in the structure because the end of tSirBssDescription is an
321 // array with nonknown size at this time
322 tSirBssDescription BssDescriptor;
323}tCsrScanResultInfo;
324
325typedef struct tagCsrEncryptionList
326{
327
328 tANI_U32 numEntries;
329 eCsrEncryptionType encryptionType[eCSR_NUM_OF_ENCRYPT_TYPE];
330
331}tCsrEncryptionList, *tpCsrEncryptionList;
332
333typedef struct tagCsrAuthList
334{
335 tANI_U32 numEntries;
336 eCsrAuthType authType[eCSR_NUM_OF_SUPPORT_AUTH_TYPE];
337}tCsrAuthList, *tpCsrAuthList;
338
339#ifdef WLAN_FEATURE_VOWIFI_11R
340typedef struct tagCsrMobilityDomainInfo
341{
342 tANI_U8 mdiePresent;
343 tANI_U16 mobilityDomain;
344} tCsrMobilityDomainInfo;
345#endif
346
347#ifdef FEATURE_WLAN_CCX
348typedef struct tagCsrCcxCckmInfo
349{
350 tANI_U32 reassoc_req_num;
351 tANI_BOOLEAN krk_plumbed;
352 tANI_U8 krk[CSR_KRK_KEY_LEN];
353} tCsrCcxCckmInfo;
354#endif
355
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700356#if defined(FEATURE_WLAN_CCX) && defined(FEATURE_WLAN_CCX_UPLOAD)
357#define CSR_DOT11F_IE_RSN_MAX_LEN (114) /*TODO: duplicate one in dot11f.h */
358
359typedef struct tagCsrCcxCckmIe
360{
361 tANI_U8 cckmIe[CSR_DOT11F_IE_RSN_MAX_LEN];
362 tANI_U8 cckmIeLen;
363} tCsrCcxCckmIe;
364#endif /* FEATURE_WLAN_CCX && FEATURE_WLAN_CCX_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -0700365
366typedef struct tagCsrScanResultFilter
367{
368 tCsrBSSIDs BSSIDs; //each bssid has a length of WNI_CFG_BSSID_LEN (6)
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800369 tCsrSSIDs SSIDs;
Jeff Johnson295189b2012-06-20 16:38:30 -0700370 tCsrChannelInfo ChannelInfo;
371 tCsrAuthList authType;
372 tCsrEncryptionList EncryptionType;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800373 //eCSR_ENCRYPT_TYPE_ANY cannot be set in multicast encryption type. If caller doesn't case,
Jeff Johnson295189b2012-06-20 16:38:30 -0700374 //put all supported encryption types in here
375 tCsrEncryptionList mcEncryptionType;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800376 eCsrRoamBssType BSSType;
Jeff Johnson295189b2012-06-20 16:38:30 -0700377 //this is a bit mask of all the needed phy mode defined in eCsrPhyMode
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800378 tANI_U32 phyMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700379 //If countryCode[0] is not 0, countryCode is checked independent of fCheckUnknownCountryCode
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800380 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN];
381 tANI_U8 uapsd_mask;
Jeff Johnson295189b2012-06-20 16:38:30 -0700382 /*For WPS filtering if true => auth and ecryption should be ignored*/
383 tANI_BOOLEAN bWPSAssociation;
384#if defined WLAN_FEATURE_VOWIFI
385 /*For measurement reports --> if set, only SSID, BSSID and channel is considered for filtering.*/
386 tANI_BOOLEAN fMeasurement;
387#endif
388#ifdef WLAN_FEATURE_VOWIFI_11R
389 tCsrMobilityDomainInfo MDID;
390#endif
391 tANI_BOOLEAN p2pResult;
392}tCsrScanResultFilter;
393
394
395typedef struct sCsrChnPower_
396{
397 tANI_U8 firstChannel;
398 tANI_U8 numChannels;
399 tANI_U8 maxtxPower;
400}sCsrChnPower;
401
402
403typedef struct sCsrChannel_
404{
405 tANI_U8 numChannels;
406 tANI_U8 channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
407}sCsrChannel;
408
409
410typedef struct tagCsr11dinfo
411{
412 sCsrChannel Channels;
413 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN+1];
414 //max power channel list
415 sCsrChnPower ChnPower[WNI_CFG_VALID_CHANNEL_LIST_LEN];
416}tCsr11dinfo;
417
418
419typedef enum
420{
421 eCSR_ROAM_CANCELLED = 1,
422 //this mean error happens before association_start or roaming_start is called.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800423 eCSR_ROAM_FAILED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700424 //a CSR trigger roaming operation starts, callback may get a pointer to tCsrConnectedProfile
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800425 eCSR_ROAM_ROAMING_START,
Jeff Johnson295189b2012-06-20 16:38:30 -0700426 //a CSR trigger roaming operation is completed
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800427 eCSR_ROAM_ROAMING_COMPLETION,
Jeff Johnson295189b2012-06-20 16:38:30 -0700428 //Connection completed status.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800429 eCSR_ROAM_CONNECT_COMPLETION,
430 //an association or start_IBSS operation starts,
431 //callback may get a pointer to tCsrRoamProfile and a pointer to tSirBssDescription
432 eCSR_ROAM_ASSOCIATION_START,
433 //a roaming operation is finish, see eCsrRoamResult for
Jeff Johnson295189b2012-06-20 16:38:30 -0700434 //possible data passed back
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800435 eCSR_ROAM_ASSOCIATION_COMPLETION,
Jeff Johnson295189b2012-06-20 16:38:30 -0700436 eCSR_ROAM_DISASSOCIATED,
437 eCSR_ROAM_ASSOCIATION_FAILURE,
438 //when callback with this flag. callback gets a pointer to the BSS desc.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800439 eCSR_ROAM_SHOULD_ROAM,
Jeff Johnson295189b2012-06-20 16:38:30 -0700440 //A new candidate for PMKID is found
441 eCSR_ROAM_SCAN_FOUND_NEW_BSS,
442 //CSR is done lostlink roaming and still cannot reconnect
443 eCSR_ROAM_LOSTLINK,
444 //a link lost is detected. CSR starts roaming.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800445 eCSR_ROAM_LOSTLINK_DETECTED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700446 //TKIP MIC error detected, callback gets a pointer to tpSirSmeMicFailureInd
447 eCSR_ROAM_MIC_ERROR_IND,
448 eCSR_ROAM_IBSS_IND, //IBSS indications.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800449 //Update the connection status, useful for IBSS: new peer added, network is active etc.
450 eCSR_ROAM_CONNECT_STATUS_UPDATE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700451 eCSR_ROAM_GEN_INFO,
452 eCSR_ROAM_SET_KEY_COMPLETE,
453 eCSR_ROAM_REMOVE_KEY_COMPLETE,
454 eCSR_ROAM_IBSS_LEAVE, //IBSS indications.
455 //BSS in WDS mode status indication
456 eCSR_ROAM_WDS_IND,
Jeff Johnson295189b2012-06-20 16:38:30 -0700457 //BSS in SoftAP mode status indication
458 eCSR_ROAM_INFRA_IND,
459 eCSR_ROAM_WPS_PBC_PROBE_REQ_IND,
Jeff Johnson295189b2012-06-20 16:38:30 -0700460#ifdef WLAN_FEATURE_VOWIFI_11R
461 eCSR_ROAM_FT_RESPONSE,
462#endif
463 eCSR_ROAM_FT_START,
464 eCSR_ROAM_INDICATE_MGMT_FRAME,
465 eCSR_ROAM_REMAIN_CHAN_READY,
466 eCSR_ROAM_SEND_ACTION_CNF,
467 //this mean error happens before association_start or roaming_start is called.
468 eCSR_ROAM_SESSION_OPENED,
469 eCSR_ROAM_FT_REASSOC_FAILED,
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700470#ifdef FEATURE_WLAN_LFR
471 eCSR_ROAM_PMK_NOTIFY,
472#endif
Yue Maef608272013-04-08 23:09:17 -0700473#ifdef FEATURE_WLAN_LFR_METRICS
474 eCSR_ROAM_PREAUTH_INIT_NOTIFY,
475 eCSR_ROAM_PREAUTH_STATUS_SUCCESS,
476 eCSR_ROAM_PREAUTH_STATUS_FAILURE,
477 eCSR_ROAM_HANDOVER_SUCCESS,
478#endif
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800479#ifdef FEATURE_WLAN_TDLS
480 eCSR_ROAM_TDLS_STATUS_UPDATE,
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800481 eCSR_ROAM_RESULT_MGMT_TX_COMPLETE_IND,
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800482#endif
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -0800483 eCSR_ROAM_DISCONNECT_ALL_P2P_CLIENTS, //Disaconnect all the clients
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800484 eCSR_ROAM_SEND_P2P_STOP_BSS, //Stopbss triggered from SME due to different
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -0800485 // beacon interval
Chet Lanctot186b5732013-03-18 10:26:30 -0700486#ifdef WLAN_FEATURE_11W
487 eCSR_ROAM_UNPROT_MGMT_FRAME_IND,
488#endif
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -0800489
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700490#if defined(FEATURE_WLAN_CCX) && defined(FEATURE_WLAN_CCX_UPLOAD)
491 eCSR_ROAM_TSM_IE_IND,
492 eCSR_ROAM_CCKM_PREAUTH_NOTIFY,
493 eCSR_ROAM_CCX_ADJ_AP_REPORT_IND,
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -0800494 eCSR_ROAM_CCX_BCN_REPORT_IND,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700495#endif /* FEATURE_WLAN_CCX && FEATURE_WLAN_CCX_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -0700496}eRoamCmdStatus;
497
498
499//comment inside indicates what roaming callback gets
500typedef enum
501{
502 eCSR_ROAM_RESULT_NONE,
503 //this means no more action in CSR
504 //If roamStatus is eCSR_ROAM_ASSOCIATION_COMPLETION, tCsrRoamInfo's pBssDesc may pass back
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800505 eCSR_ROAM_RESULT_FAILURE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700506 //Pass back pointer to tCsrRoamInfo
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800507 eCSR_ROAM_RESULT_ASSOCIATED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700508 eCSR_ROAM_RESULT_NOT_ASSOCIATED,
509 eCSR_ROAM_RESULT_MIC_FAILURE,
510 eCSR_ROAM_RESULT_FORCED,
511 eCSR_ROAM_RESULT_DISASSOC_IND,
512 eCSR_ROAM_RESULT_DEAUTH_IND,
513 eCSR_ROAM_RESULT_CAP_CHANGED,
514 //This means we starts an IBSS
515 //tCsrRoamInfo's pBssDesc may pass back
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800516 eCSR_ROAM_RESULT_IBSS_STARTED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700517 //START_BSS failed
518 //tCsrRoamInfo's pBssDesc may pass back
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800519 eCSR_ROAM_RESULT_IBSS_START_FAILED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700520 eCSR_ROAM_RESULT_IBSS_JOIN_SUCCESS,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800521 eCSR_ROAM_RESULT_IBSS_JOIN_FAILED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700522 eCSR_ROAM_RESULT_IBSS_CONNECT,
523 eCSR_ROAM_RESULT_IBSS_INACTIVE,
524 //If roamStatus is eCSR_ROAM_ASSOCIATION_COMPLETION
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800525 //tCsrRoamInfo's pBssDesc may pass back. and the peer's MAC address in peerMacOrBssid
526 //If roamStatus is eCSR_ROAM_IBSS_IND,
Jeff Johnson295189b2012-06-20 16:38:30 -0700527 //the peer's MAC address in peerMacOrBssid and a beacon frame of the IBSS in pbFrames
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800528 eCSR_ROAM_RESULT_IBSS_NEW_PEER,
Jeff Johnson295189b2012-06-20 16:38:30 -0700529 //Peer departed from IBSS, Callback may get a pointer tSmeIbssPeerInd in pIbssPeerInd
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800530 eCSR_ROAM_RESULT_IBSS_PEER_DEPARTED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700531 //Coalescing in the IBSS network (joined an IBSS network)
532 //Callback pass a BSSID in peerMacOrBssid
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800533 eCSR_ROAM_RESULT_IBSS_COALESCED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700534 //If roamStatus is eCSR_ROAM_ROAMING_START, callback may get a pointer to tCsrConnectedProfile used to connect.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800535 eCSR_ROAM_RESULT_IBSS_STOP,
536 eCSR_ROAM_RESULT_LOSTLINK,
Jeff Johnson295189b2012-06-20 16:38:30 -0700537 eCSR_ROAM_RESULT_MIC_ERROR_UNICAST,
538 eCSR_ROAM_RESULT_MIC_ERROR_GROUP,
539 eCSR_ROAM_RESULT_AUTHENTICATED,
540 eCSR_ROAM_RESULT_NEW_RSN_BSS,
541#ifdef FEATURE_WLAN_WAPI
542 eCSR_ROAM_RESULT_NEW_WAPI_BSS,
543#endif /* FEATURE_WLAN_WAPI */
544 // WDS started successfully
545 eCSR_ROAM_RESULT_WDS_STARTED,
546 // WDS start failed
547 eCSR_ROAM_RESULT_WDS_START_FAILED,
548 // WDS stopped
549 eCSR_ROAM_RESULT_WDS_STOPPED,
550 // WDS joined successfully in STA mode
551 eCSR_ROAM_RESULT_WDS_ASSOCIATED,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800552 // A station joined WDS AP
Jeff Johnson295189b2012-06-20 16:38:30 -0700553 eCSR_ROAM_RESULT_WDS_ASSOCIATION_IND,
554 // WDS join failed in STA mode
555 eCSR_ROAM_RESULT_WDS_NOT_ASSOCIATED,
556 // WDS disassociated
557 eCSR_ROAM_RESULT_WDS_DISASSOCIATED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700558 // INFRA started successfully
559 eCSR_ROAM_RESULT_INFRA_STARTED,
560 // INFRA start failed
561 eCSR_ROAM_RESULT_INFRA_START_FAILED,
562 // INFRA stopped
563 eCSR_ROAM_RESULT_INFRA_STOPPED,
564 // A station joining INFRA AP
565 eCSR_ROAM_RESULT_INFRA_ASSOCIATION_IND,
566 // A station joined INFRA AP
567 eCSR_ROAM_RESULT_INFRA_ASSOCIATION_CNF,
568 // INFRA disassociated
569 eCSR_ROAM_RESULT_INFRA_DISASSOCIATED,
570 eCSR_ROAM_RESULT_WPS_PBC_PROBE_REQ_IND,
Jeff Johnson295189b2012-06-20 16:38:30 -0700571 eCSR_ROAM_RESULT_SEND_ACTION_FAIL,
Jeff Johnson295189b2012-06-20 16:38:30 -0700572 // peer rejected assoc because max assoc limit reached. callback gets pointer to peer
573 eCSR_ROAM_RESULT_MAX_ASSOC_EXCEEDED,
Jeff Johnsone7245742012-09-05 17:12:55 -0700574 //Assoc rejected due to concurrent session running on a different channel
575 eCSR_ROAM_RESULT_ASSOC_FAIL_CON_CHANNEL,
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800576#ifdef FEATURE_WLAN_TDLS
577 eCSR_ROAM_RESULT_ADD_TDLS_PEER,
Gopichand Nakkala681989c2013-03-06 22:27:48 -0800578 eCSR_ROAM_RESULT_UPDATE_TDLS_PEER,
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800579 eCSR_ROAM_RESULT_DELETE_TDLS_PEER,
Hoonki Leee6bfe942013-02-05 15:01:19 -0800580 eCSR_ROAM_RESULT_TEARDOWN_TDLS_PEER_IND,
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -0800581 eCSR_ROAM_RESULT_DELETE_ALL_TDLS_PEER_IND,
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +0530582 eCSR_ROAM_RESULT_LINK_ESTABLISH_REQ_RSP,
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800583#endif
584
Jeff Johnson295189b2012-06-20 16:38:30 -0700585}eCsrRoamResult;
586
587
588
589/*----------------------------------------------------------------------------
590 List of link quality indications HDD can receive from SME
591-----------------------------------------------------------------------------*/
592typedef enum
593{
594 eCSR_ROAM_LINK_QUAL_MIN_IND = -1,
595
596 eCSR_ROAM_LINK_QUAL_POOR_IND = 0, /* bad link */
597 eCSR_ROAM_LINK_QUAL_GOOD_IND = 1, /* acceptable for voice */
598 eCSR_ROAM_LINK_QUAL_VERY_GOOD_IND = 2, /* suitable for voice */
599 eCSR_ROAM_LINK_QUAL_EXCELLENT_IND = 3, /* suitable for voice */
600
601 eCSR_ROAM_LINK_QUAL_MAX_IND /* invalid value */
602
603} eCsrRoamLinkQualityInd;
604
605typedef enum
606{
607 eCSR_DISCONNECT_REASON_UNSPECIFIED = 0,
608 eCSR_DISCONNECT_REASON_MIC_ERROR,
609 eCSR_DISCONNECT_REASON_DISASSOC,
610 eCSR_DISCONNECT_REASON_DEAUTH,
611 eCSR_DISCONNECT_REASON_HANDOFF,
612 eCSR_DISCONNECT_REASON_IBSS_JOIN_FAILURE,
613 eCSR_DISCONNECT_REASON_IBSS_LEAVE,
614}eCsrRoamDisconnectReason;
615
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800616typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700617{
618 // Not associated in Infra or participating in an IBSS / Ad-hoc network.
619 eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED,
620 // Associated in an Infrastructure network.
621 eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED,
622 // Participating in an IBSS network though disconnected (no partner stations
623 // in the IBSS).
624 eCSR_ASSOC_STATE_TYPE_IBSS_DISCONNECTED,
625 // Participating in an IBSS network with partner stations also present
626 eCSR_ASSOC_STATE_TYPE_IBSS_CONNECTED,
627 // Participating in a WDS network in AP or STA mode but not connected yet
628 eCSR_ASSOC_STATE_TYPE_WDS_DISCONNECTED,
629 // Participating in a WDS network and connected peer to peer
630 eCSR_ASSOC_STATE_TYPE_WDS_CONNECTED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700631 // Participating in a Infra network in AP not yet in connected state
632 eCSR_ASSOC_STATE_TYPE_INFRA_DISCONNECTED,
633 // Participating in a Infra network and connected to a peer
634 eCSR_ASSOC_STATE_TYPE_INFRA_CONNECTED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700635
636}eCsrConnectState;
637
638
639// This parameter is no longer supported in the Profile. Need to set this in the global properties
640// for the adapter.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800641typedef enum eCSR_MEDIUM_ACCESS
Jeff Johnson295189b2012-06-20 16:38:30 -0700642{
643 eCSR_MEDIUM_ACCESS_AUTO = 0,
644 eCSR_MEDIUM_ACCESS_DCF,
645 eCSR_MEDIUM_ACCESS_eDCF,
646 eCSR_MEDIUM_ACCESS_HCF,
647
648 eCSR_MEDIUM_ACCESS_WMM_eDCF_802dot1p,
649 eCSR_MEDIUM_ACCESS_WMM_eDCF_DSCP,
650 eCSR_MEDIUM_ACCESS_WMM_eDCF_NoClassify,
651 eCSR_MEDIUM_ACCESS_11e_eDCF = eCSR_MEDIUM_ACCESS_eDCF,
652 eCSR_MEDIUM_ACCESS_11e_HCF = eCSR_MEDIUM_ACCESS_HCF,
653}eCsrMediaAccessType;
654
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800655typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700656{
657 eCSR_TX_RATE_AUTO = 0, // use rate adaption to determine Tx rate.
658
659 eCSR_TX_RATE_1Mbps = 0x00000001,
660 eCSR_TX_RATE_2Mbps = 0x00000002,
661 eCSR_TX_RATE_5_5Mbps = 0x00000004,
662 eCSR_TX_RATE_6Mbps = 0x00000008,
663 eCSR_TX_RATE_9Mbps = 0x00000010,
664 eCSR_TX_RATE_11Mbps = 0x00000020,
665 eCSR_TX_RATE_12Mbps = 0x00000040,
666 eCSR_TX_RATE_18Mbps = 0x00000080,
667 eCSR_TX_RATE_24Mbps = 0x00000100,
668 eCSR_TX_RATE_36Mbps = 0x00000200,
669 eCSR_TX_RATE_42Mbps = 0x00000400,
670 eCSR_TX_RATE_48Mbps = 0x00000800,
671 eCSR_TX_RATE_54Mbps = 0x00001000,
672 eCSR_TX_RATE_72Mbps = 0x00002000,
673 eCSR_TX_RATE_84Mbps = 0x00004000,
674 eCSR_TX_RATE_96Mbps = 0x00008000,
675 eCSR_TX_RATE_108Mbps = 0x00010000,
676 eCSR_TX_RATE_126Mbps = 0x00020000,
677 eCSR_TX_RATE_144Mbps = 0x00040000,
678 eCSR_TX_RATE_168Mbps = 0x00080000,
679 eCSR_TX_RATE_192Mbps = 0x00100000,
680 eCSR_TX_RATE_216Mbps = 0x00200000,
681 eCSR_TX_RATE_240Mbps = 0x00400000,
682
683}eCsrExposedTxRate;
684
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800685typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700686{
687 eCSR_OPERATING_CHANNEL_ALL = 0,
688 eCSR_OPERATING_CHANNEL_AUTO = eCSR_OPERATING_CHANNEL_ALL,
689 eCSR_OPERATING_CHANNEL_ANY = eCSR_OPERATING_CHANNEL_ALL,
690}eOperationChannel;
691
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800692typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700693{
694 eCSR_DOT11_FRAG_THRESH_AUTO = -1,
695 eCSR_DOT11_FRAG_THRESH_MIN = 256,
696 eCSR_DOT11_FRAG_THRESH_MAX = 2346,
697 eCSR_DOT11_FRAG_THRESH_DEFAULT = 2000
698}eCsrDot11FragThresh;
699
700
701//for channel bonding for ibss
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800702typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700703{
704 eCSR_CB_OFF = 0,
705 eCSR_CB_AUTO = 1,
706 eCSR_CB_DOWN = 2,
707 eCSR_CB_UP = 3,
708}eCsrCBChoice;
709
710//For channel bonding, the channel number gap is 4, either up or down. For both 11a and 11g mode.
711#define CSR_CB_CHANNEL_GAP 4
712#define CSR_CB_CENTER_CHANNEL_OFFSET 2
713#define CSR_MAX_24GHz_CHANNEL_NUMBER ( SIR_11B_CHANNEL_END )
Jeff Johnsone7245742012-09-05 17:12:55 -0700714#define CSR_MIN_5GHz_CHANNEL_NUMBER ( SIR_11A_CHANNEL_BEGIN )
715#define CSR_MAX_5GHz_CHANNEL_NUMBER ( SIR_11A_CHANNEL_END )
Jeff Johnson295189b2012-06-20 16:38:30 -0700716
717// WEP keysize (in bits)...
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800718typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700719{
720 eCSR_SECURITY_WEP_KEYSIZE_40 = 40, // 40 bit key + 24bit IV = 64bit WEP
721 eCSR_SECURITY_WEP_KEYSIZE_104 = 104, // 104bit key + 24bit IV = 128bit WEP
722
723 eCSR_SECURITY_WEP_KEYSIZE_MIN = eCSR_SECURITY_WEP_KEYSIZE_40,
724 eCSR_SECURITY_WEP_KEYSIZE_MAX = eCSR_SECURITY_WEP_KEYSIZE_104,
725 eCSR_SECURITY_WEP_KEYSIZE_MAX_BYTES = ( eCSR_SECURITY_WEP_KEYSIZE_MAX / 8 ),
726}eCsrWEPKeySize;
727
728
729// Possible values for the WEP static key ID...
730typedef enum
731{
732
733 eCSR_SECURITY_WEP_STATIC_KEY_ID_MIN = 0,
734 eCSR_SECURITY_WEP_STATIC_KEY_ID_MAX = 3,
735 eCSR_SECURITY_WEP_STATIC_KEY_ID_DEFAULT = 0,
736
737 eCSR_SECURITY_WEP_STATIC_KEY_ID_INVALID = -1,
738
739}eCsrWEPStaticKeyID;
740
Chet Lanctot186b5732013-03-18 10:26:30 -0700741// Two extra key indicies are used for the IGTK (which is used by BIP)
742#define CSR_MAX_NUM_KEY (eCSR_SECURITY_WEP_STATIC_KEY_ID_MAX + 2 + 1)
Jeff Johnson295189b2012-06-20 16:38:30 -0700743
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800744typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700745{
746 eCSR_SECURITY_SET_KEY_ACTION_NO_CHANGE,
747 eCSR_SECURITY_SET_KEY_ACTION_SET_KEY,
748 eCSR_SECURITY_SET_KEY_ACTION_DELETE_KEY,
749}eCsrSetKeyAction;
750
751typedef enum
752{
753 eCSR_BAND_ALL,
754 eCSR_BAND_24,
755 eCSR_BAND_5G,
756 eCSR_BAND_MAX,
757}eCsrBand;
758
759
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800760typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700761{
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800762 // Roaming because HDD requested for reassoc by changing one of the fields in
Jeff Johnson295189b2012-06-20 16:38:30 -0700763 // tCsrRoamModifyProfileFields. OR
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800764 // Roaming because SME requested for reassoc by changing one of the fields in
Jeff Johnson295189b2012-06-20 16:38:30 -0700765 // tCsrRoamModifyProfileFields.
766 eCsrRoamReasonStaCapabilityChanged,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800767 // Roaming because SME requested for reassoc to a different AP, as part of
Jeff Johnson295189b2012-06-20 16:38:30 -0700768 // inter AP handoff.
769 eCsrRoamReasonBetterAP,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800770 // Roaming because SME requested it as the link is lost - placeholder, will
Jeff Johnson295189b2012-06-20 16:38:30 -0700771 // clean it up once handoff code gets in
772 eCsrRoamReasonSmeIssuedForLostLink,
773
774}eCsrRoamReasonCodes;
775
776typedef enum
777{
778 eCsrRoamWmmAuto = 0,
779 eCsrRoamWmmQbssOnly = 1,
780 eCsrRoamWmmNoQos = 2,
781
782} eCsrRoamWmmUserModeType;
783
784typedef enum
785{
786 eCSR_REQUESTER_MIN = 0,
787 eCSR_DIAG,
788 eCSR_UMA_GAN,
789 eCSR_HDD
790} eCsrStatsRequesterType;
791
792typedef struct tagPmkidCandidateInfo
793{
794 tCsrBssid BSSID;
795 tANI_BOOLEAN preAuthSupported;
796}tPmkidCandidateInfo;
797
798typedef struct tagPmkidCacheInfo
799{
800 tCsrBssid BSSID;
801 tANI_U8 PMKID[CSR_RSN_PMKID_SIZE];
802}tPmkidCacheInfo;
803
804#ifdef FEATURE_WLAN_WAPI
805typedef struct tagBkidCandidateInfo
806{
807 tCsrBssid BSSID;
808 tANI_BOOLEAN preAuthSupported;
809}tBkidCandidateInfo;
810
811typedef struct tagBkidCacheInfo
812{
813 tCsrBssid BSSID;
814 tANI_U8 BKID[CSR_WAPI_BKID_SIZE];
815}tBkidCacheInfo;
816#endif /* FEATURE_WLAN_WAPI */
817
818typedef struct tagCsrKeys
819{
820 tANI_U8 KeyLength[ CSR_MAX_NUM_KEY ]; //Also use to indicate whether the key index is set
821 tANI_U8 KeyMaterial[ CSR_MAX_NUM_KEY ][ CSR_MAX_KEY_LEN ];
822 tANI_U8 defaultIndex;
823}tCsrKeys;
824
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800825/* Following are fields which are part of tCsrRoamConnectedProfile might need
Jeff Johnson295189b2012-06-20 16:38:30 -0700826 modification dynamically once STA is up & running and this could trigger
827 reassoc */
828typedef struct tagCsrRoamModifyProfileFields
829{
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800830 // during connect this specifies ACs U-APSD is to be setup
Jeff Johnson295189b2012-06-20 16:38:30 -0700831 // for (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored).
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800832 // During assoc response this COULD carry confirmation of what ACs U-APSD
Jeff Johnson295189b2012-06-20 16:38:30 -0700833 // got setup for. Later if an APP looking for APSD, SME-QoS might need to
834 // modify this field
835 tANI_U8 uapsd_mask;
836 // HDD might ask to modify this field
837 tANI_U16 listen_interval;
838}tCsrRoamModifyProfileFields;
839
840typedef struct tagCsrRoamProfile
841{
842 //For eCSR_BSS_TYPE_WDS_AP. There must be one SSID in SSIDs.
843 //For eCSR_BSS_TYPE_WDS_STA. There must be two SSIDs. Index 0 is the SSID of the WDS-AP
844 //that we need to join. Index 1 is the SSID for self BSS.
845 tCsrSSIDs SSIDs;
846 tCsrBSSIDs BSSIDs;
847 tANI_U32 phyMode; //this is a bit mask of all the needed phy mode defined in eCsrPhyMode
848 eCsrRoamBssType BSSType;
849
850 tCsrAuthList AuthType;
851 eCsrAuthType negotiatedAuthType;
852
853 tCsrEncryptionList EncryptionType;
854 //This field is for output only, not for input
855 eCsrEncryptionType negotiatedUCEncryptionType;
856
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800857 //eCSR_ENCRYPT_TYPE_ANY cannot be set in multicast encryption type. If caller doesn't case,
Jeff Johnson295189b2012-06-20 16:38:30 -0700858 //put all supported encryption types in here
859 tCsrEncryptionList mcEncryptionType;
860 //This field is for output only, not for input
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800861 eCsrEncryptionType negotiatedMCEncryptionType;
Jeff Johnson295189b2012-06-20 16:38:30 -0700862
Chet Lanctot186b5732013-03-18 10:26:30 -0700863#ifdef WLAN_FEATURE_11W
864 // Management Frame Protection
865 tANI_BOOLEAN MFPEnabled;
866 tANI_U8 MFPRequired;
867 tANI_U8 MFPCapable;
868#endif
869
Jeff Johnson295189b2012-06-20 16:38:30 -0700870 tCsrKeys Keys;
871 eCsrCBChoice CBMode; //up, down or auto
872 tCsrChannelInfo ChannelInfo;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800873 tANI_U8 operationChannel;
Jeff Johnson295189b2012-06-20 16:38:30 -0700874 tANI_U16 beaconInterval; //If this is 0, SME will fill in for caller.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800875 // during connect this specifies ACs U-APSD is to be setup
Jeff Johnson295189b2012-06-20 16:38:30 -0700876 // for (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored).
877 // During assoc response this COULD carry confirmation of what ACs U-APSD got setup for
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800878 tANI_U8 uapsd_mask;
Jeff Johnson295189b2012-06-20 16:38:30 -0700879 tANI_U32 nWPAReqIELength; //The byte count in the pWPAReqIE
880 tANI_U8 *pWPAReqIE; //If not null, it has the IE byte stream for WPA
881 tANI_U32 nRSNReqIELength; //The byte count in the pRSNReqIE
882 tANI_U8 *pRSNReqIE; //If not null, it has the IE byte stream for RSN
883#ifdef FEATURE_WLAN_WAPI
884 tANI_U32 nWAPIReqIELength; //The byte count in the pWAPIReqIE
885 tANI_U8 *pWAPIReqIE; //If not null, it has the IE byte stream for WAPI
886#endif /* FEATURE_WLAN_WAPI */
887
Agarwal Ashish4f616132013-12-30 23:32:50 +0530888 //The byte count in the pAddIE for scan (at the time of join)
889 tANI_U32 nAddIEScanLength;
890 /* Additional IE information.
891 * It has the IE byte stream for additional IE,
892 * which can be WSC IE and/or P2P IE
893 */
894 tANI_U8 addIEScan[SIR_MAC_MAX_IE_LENGTH+2]; //Additional IE information.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800895 tANI_U32 nAddIEAssocLength; //The byte count in the pAddIE for assoc
Jeff Johnson295189b2012-06-20 16:38:30 -0700896 tANI_U8 *pAddIEAssoc; //If not null, it has the IE byte stream for additional IE, which can be WSC IE and/or P2P IE
897
898 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN]; //it is ignored if [0] is 0.
899 /*WPS Association if true => auth and ecryption should be ignored*/
900 tANI_BOOLEAN bWPSAssociation;
901 tANI_U32 nWSCReqIELength; //The byte count in the pWSCReqIE
902 tANI_U8 *pWSCReqIE; //If not null, it has the IE byte stream for WSC
903
Jeff Johnson295189b2012-06-20 16:38:30 -0700904 tANI_U8 ieee80211d;
905 tANI_U8 privacy;
906 tANI_BOOLEAN fwdWPSPBCProbeReq;
907 tAniAuthType csr80211AuthType;
908 tANI_U32 dtimPeriod;
909 tANI_BOOLEAN ApUapsdEnable;
910 tANI_BOOLEAN protEnabled;
911 tANI_BOOLEAN obssProtEnabled;
912 tANI_U16 cfg_protection;
913 tANI_U8 wps_state;
Jeff Johnson295189b2012-06-20 16:38:30 -0700914
915#ifdef WLAN_FEATURE_VOWIFI_11R
916 tCsrMobilityDomainInfo MDID;
917#endif
918 tVOS_CON_MODE csrPersona;
919
920}tCsrRoamProfile;
921
922
923typedef struct tagCsrRoamConnectedProfile
924{
925 tSirMacSSid SSID;
926 tANI_BOOLEAN handoffPermitted;
927 tANI_BOOLEAN ssidHidden;
928 tCsrBssid bssid;
929 eCsrRoamBssType BSSType;
930 eCsrAuthType AuthType;
931 tCsrAuthList AuthInfo;
932 eCsrEncryptionType EncryptionType;
933 tCsrEncryptionList EncryptionInfo;
934 eCsrEncryptionType mcEncryptionType;
935 tCsrEncryptionList mcEncryptionInfo;
936 eCsrCBChoice CBMode; //up, down or auto
937 tANI_U8 operationChannel;
Jeff Johnsone7245742012-09-05 17:12:55 -0700938 tANI_U16 beaconInterval;
Jeff Johnson295189b2012-06-20 16:38:30 -0700939 tCsrKeys Keys;
940 // meaningless on connect. It's an OUT param from CSR's point of view
941 // During assoc response carries the ACM bit-mask i.e. what
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800942 // ACs have ACM=1 (if any),
Jeff Johnson295189b2012-06-20 16:38:30 -0700943 // (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored)
944 tANI_U8 acm_mask;
945 tCsrRoamModifyProfileFields modifyProfileFields;
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700946 tANI_U32 nAddIEAssocLength; //The byte count in the pAddIE for assoc
947 tANI_U8 *pAddIEAssoc; //If not null, it has the IE byte stream for additional IE, which can be WSC IE and/or P2P IE
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800948
949 tSirBssDescription *pBssDesc;
Jeff Johnson295189b2012-06-20 16:38:30 -0700950 tANI_BOOLEAN qap; //AP supports QoS
951 tANI_BOOLEAN qosConnection; //A connection is QoS enabled
952#ifdef WLAN_FEATURE_VOWIFI_11R
953 tCsrMobilityDomainInfo MDID;
954#endif
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800955
Jeff Johnson295189b2012-06-20 16:38:30 -0700956#ifdef FEATURE_WLAN_CCX
957 tCsrCcxCckmInfo ccxCckmInfo;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800958 tANI_BOOLEAN isCCXAssoc;
Jeff Johnson295189b2012-06-20 16:38:30 -0700959#endif
Gopichand Nakkaladacbcb52013-04-18 16:41:54 +0530960 tANI_U32 dot11Mode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700961}tCsrRoamConnectedProfile;
962
963
964#ifdef WLAN_FEATURE_VOWIFI_11R
965typedef struct tagCsr11rConfigParams
966{
967 tANI_BOOLEAN IsFTResourceReqSupported;
968} tCsr11rConfigParams;
969#endif
970
971#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
972typedef struct tagCsrNeighborRoamConfigParams
973{
974
975 tANI_U32 nNeighborScanTimerPeriod;
976 tANI_U8 nNeighborLookupRssiThreshold;
977 tANI_U8 nNeighborReassocRssiThreshold;
978 tANI_U16 nNeighborScanMinChanTime;
979 tANI_U16 nNeighborScanMaxChanTime;
980 sCsrChannel neighborScanChanList;
981 tANI_U8 nMaxNeighborRetries;
982 tANI_U16 nNeighborResultsRefreshPeriod;
Srinivas Girigowdade697412013-02-14 16:31:48 -0800983 tANI_U16 nEmptyScanRefreshPeriod;
Jeff Johnson295189b2012-06-20 16:38:30 -0700984}tCsrNeighborRoamConfigParams;
985#endif
986
987typedef struct tagCsrConfigParam
988{
989 tANI_U32 FragmentationThreshold;
Jeff Johnsone7245742012-09-05 17:12:55 -0700990 tANI_U32 channelBondingMode24GHz; // keep this tANI_U32. This gets converted to ePhyChannelBondState
991 tANI_U32 channelBondingMode5GHz; // in csrChangeDefaultConfigParam using convertCBIniValueToPhyCBState
Jeff Johnson295189b2012-06-20 16:38:30 -0700992 eCsrPhyMode phyMode;
993 eCsrBand eBand;
994 tANI_U32 RTSThreshold;
995 tANI_U32 HeartbeatThresh50;
996 tANI_U32 HeartbeatThresh24;
997 eCsrCBChoice cbChoice;
998 eCsrBand bandCapability; //indicate hw capability
999 tANI_U32 bgScanInterval;
1000 tANI_U16 TxRate;
1001 eCsrRoamWmmUserModeType WMMSupportMode;
1002 tANI_BOOLEAN Is11eSupportEnabled;
1003 tANI_BOOLEAN Is11dSupportEnabled;
1004 tANI_BOOLEAN Is11dSupportEnabledOriginal;
1005 tANI_BOOLEAN Is11hSupportEnabled;
1006 tANI_BOOLEAN shortSlotTime;
1007 tANI_BOOLEAN ProprietaryRatesEnabled;
1008 tANI_U8 AdHocChannel24;
1009 tANI_U8 AdHocChannel5G;
1010 tANI_U32 impsSleepTime; //in units of seconds
1011 tANI_U32 nScanResultAgeCount; //this number minus one is the number of times a scan doesn't find it before it is removed
1012 tANI_U32 scanAgeTimeNCNPS; //scan result aging time threshold when Not-Connect-No-Power-Save, in seconds
1013 tANI_U32 scanAgeTimeNCPS; //scan result aging time threshold when Not-Connect-Power-Save, in seconds
1014 tANI_U32 scanAgeTimeCNPS; //scan result aging time threshold when Connect-No-Power-Save, in seconds,
1015 tANI_U32 scanAgeTimeCPS; //scan result aging time threshold when Connect-Power-Savein seconds
1016 tANI_U32 nRoamingTime; //In seconds, CSR will try this long before gives up. 0 means no roaming
1017 tANI_U8 bCatRssiOffset; //to set the RSSI difference for each category
1018 tANI_U8 fEnableMCCMode; //to set MCC Enable/Disable mode
Mohit Khanna7ed53f02012-09-11 17:52:10 -07001019 tANI_U8 fAllowMCCGODiffBI; //to allow MCC GO different B.I than STA's. NOTE: make sure if RIVA firmware can handle this combination before enabling this
1020 //at the moment, this flag is provided only to pass Wi-Fi Cert. 5.1.12
Jeff Johnson295189b2012-06-20 16:38:30 -07001021 tCsr11dinfo Csr11dinfo;
1022 //Whether to limit the channels to the ones set in Csr11dInfo. If true, the opertaional
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001023 //channels are limited to the default channel list. It is an "AND" operation between the
Jeff Johnson295189b2012-06-20 16:38:30 -07001024 //default channels and the channels in the 802.11d IE.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001025 tANI_BOOLEAN fEnforce11dChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -07001026 //Country Code Priority
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001027 //0 = 802.11D > Country IOCTL > NV
Jeff Johnson295189b2012-06-20 16:38:30 -07001028 //1 = Country IOCTL > 802.11D > NV
1029 tANI_BOOLEAN fSupplicantCountryCodeHasPriority;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001030 //When true, AP with unknown country code won't be see.
1031 //"Unknown country code" means either Ap doesn't have 11d IE or we cannot
1032 //find a domain for the country code in its 11d IE.
1033 tANI_BOOLEAN fEnforceCountryCodeMatch;
Jeff Johnson295189b2012-06-20 16:38:30 -07001034 //When true, only APs in the default domain can be seen. If the Ap has "unknown country
1035 //code", or the domain of the country code doesn't match the default domain, the Ap is
1036 //not acceptable.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001037 tANI_BOOLEAN fEnforceDefaultDomain;
Jeff Johnson295189b2012-06-20 16:38:30 -07001038
1039 tANI_U16 vccRssiThreshold;
1040 tANI_U32 vccUlMacLossThreshold;
1041
1042 tANI_U32 nPassiveMinChnTime; //in units of milliseconds
1043 tANI_U32 nPassiveMaxChnTime; //in units of milliseconds
1044 tANI_U32 nActiveMinChnTime; //in units of milliseconds
1045 tANI_U32 nActiveMaxChnTime; //in units of milliseconds
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001046
1047 tANI_U32 nActiveMinChnTimeBtc; //in units of milliseconds
1048 tANI_U32 nActiveMaxChnTimeBtc; //in units of milliseconds
Kiran Kumar Lokere458d7322013-05-29 14:29:43 -07001049 tANI_U32 disableAggWithBtc;
Madan Mohan Koyyalamudi4ff9cd62012-10-30 17:48:57 -07001050#ifdef WLAN_AP_STA_CONCURRENCY
1051 tANI_U32 nPassiveMinChnTimeConc; //in units of milliseconds
1052 tANI_U32 nPassiveMaxChnTimeConc; //in units of milliseconds
1053 tANI_U32 nActiveMinChnTimeConc; //in units of milliseconds
1054 tANI_U32 nActiveMaxChnTimeConc; //in units of milliseconds
1055 tANI_U32 nRestTimeConc; //in units of milliseconds
Sudhir Sattayappa Kohallieb97d502013-05-22 23:16:42 -07001056 tANI_U8 nNumStaChanCombinedConc; //number of channels combined for
1057 //STA in each split scan operation
1058 tANI_U8 nNumP2PChanCombinedConc; //number of channels combined for
1059 //P2P in each split scan operation
Madan Mohan Koyyalamudi4ff9cd62012-10-30 17:48:57 -07001060#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001061
1062 tANI_BOOLEAN IsIdleScanEnabled;
1063 //in dBm, the maximum TX power
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001064 //The actual TX power is the lesser of this value and 11d.
Jeff Johnson295189b2012-06-20 16:38:30 -07001065 //If 11d is disable, the lesser of this and default setting.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001066 tANI_U8 nTxPowerCap;
Jeff Johnson295189b2012-06-20 16:38:30 -07001067 tANI_U32 statsReqPeriodicity; //stats request frequency from PE while in full power
1068 tANI_U32 statsReqPeriodicityInPS;//stats request frequency from PE while in power save
1069#ifdef WLAN_FEATURE_VOWIFI_11R
1070 tCsr11rConfigParams csr11rConfig;
1071#endif
1072#ifdef FEATURE_WLAN_CCX
1073 tANI_U8 isCcxIniFeatureEnabled;
1074#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001075#ifdef FEATURE_WLAN_LFR
1076 tANI_U8 isFastRoamIniFeatureEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08001077 tANI_U8 MAWCEnabled;
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001078#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001079
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001080#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -07001081 tANI_U8 isFastTransitionEnabled;
1082 tANI_U8 RoamRssiDiff;
1083 tANI_U8 nImmediateRoamRssiDiff;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07001084 tANI_BOOLEAN isWESModeEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -07001085#endif
1086
1087#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
1088 tCsrNeighborRoamConfigParams neighborRoamConfig;
1089#endif
1090
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001091 /* Instead of Reassoc, send ADDTS/DELTS even when ACM is off for that AC
Jeff Johnson295189b2012-06-20 16:38:30 -07001092 * This is mandated by WMM-AC certification */
1093 tANI_BOOLEAN addTSWhenACMIsOff;
1094
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001095
1096 /*channelPowerInfoList24 has been seen corrupted. Set this flag to true trying to
Jeff Johnson295189b2012-06-20 16:38:30 -07001097 * detect when it happens. Adding this into code because we can't reproduce it easily.
1098 * We don't know when it happens. */
1099 tANI_BOOLEAN fValidateList;
1100
1101 /*Customer wants to start with an active scan based on the default country code.
1102 * This optimization will minimize the driver load to association time.
1103 * Based on this flag we will bypass the initial passive scan needed for 11d
1104 * to determine the country code & domain */
1105 tANI_BOOLEAN fEnableBypass11d;
1106
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001107 /*Customer wants to optimize the scan time. Avoiding scans(passive) on DFS
1108 * channels while swipping through both bands can save some time
Jeff Johnson295189b2012-06-20 16:38:30 -07001109 * (apprx 1.3 sec) */
1110 tANI_BOOLEAN fEnableDFSChnlScan;
1111
1112 //To enable/disable scanning 2.4Ghz channels twice on a single scan request from HDD
1113 tANI_BOOLEAN fScanTwice;
Jeff Johnsone7245742012-09-05 17:12:55 -07001114#ifdef WLAN_FEATURE_11AC
Ravi Joshi83bfaa12013-05-28 22:12:08 -07001115 tANI_U32 nVhtChannelWidth;
1116 tANI_U8 enableTxBF;
1117 tANI_U8 txBFCsnValue;
1118 tANI_BOOLEAN enableVhtFor24GHz;
Jeff Johnsone7245742012-09-05 17:12:55 -07001119#endif
1120
1121 /*
1122 * To enable/disable scanning only 2.4Ghz channels on first scan
1123 */
1124 tANI_BOOLEAN fFirstScanOnly2GChnl;
Jeff Johnson295189b2012-06-20 16:38:30 -07001125
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08001126#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
1127 tANI_BOOLEAN nRoamPrefer5GHz;
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07001128 tANI_BOOLEAN nRoamIntraBand;
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07001129 tANI_U8 nProbes;
1130 tANI_U16 nRoamScanHomeAwayTime;
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -08001131
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001132#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1133 tANI_BOOLEAN isRoamOffloadScanEnabled;
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07001134 tANI_BOOLEAN bFastRoamInConIniFeatureEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001135#endif
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07001136#endif
1137
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001138
Sandeep Puligilla2b6dc632012-12-17 14:44:16 -08001139 tANI_U8 scanCfgAgingTime;
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -08001140
1141 tANI_U8 enableTxLdpc;
krunal soni4f087d22013-07-29 16:32:26 -07001142
krunal soni5afa96c2013-09-06 22:19:02 -07001143 tANI_U8 isAmsduSupportInAMPDU;
Srinivas Girigowda41c7c5f2013-10-21 19:01:38 -07001144 tANI_U8 nSelect5GHzMargin;
krunal soni5afa96c2013-09-06 22:19:02 -07001145
krunal sonie9002db2013-11-25 14:24:17 -08001146 tANI_U8 isCoalesingInIBSSAllowed;
1147
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001148}tCsrConfigParam;
Jeff Johnson295189b2012-06-20 16:38:30 -07001149
1150//Tush
1151typedef struct tagCsrUpdateConfigParam
1152{
1153 tCsr11dinfo Csr11dinfo;
1154}tCsrUpdateConfigParam;
1155
1156typedef struct tagCsrRoamInfo
1157{
1158 tCsrRoamProfile *pProfile; //may be NULL
1159 tSirBssDescription *pBssDesc; //May be NULL
1160 tANI_U32 nBeaconLength; //the length, in bytes, of the beacon frame, can be 0
1161 tANI_U32 nAssocReqLength; //the length, in bytes, of the assoc req frame, can be 0
1162 tANI_U32 nAssocRspLength; //The length, in bytes, of the assoc rsp frame, can be 0
1163 tANI_U32 nFrameLength;
1164 tANI_U8 frameType;
1165 tANI_U8 *pbFrames; //Point to a buffer contain the beacon, assoc req, assoc rsp frame, in that order
1166 //user needs to use nBeaconLength, nAssocReqLength, nAssocRspLength to desice where
1167 //each frame starts and ends.
1168 tANI_BOOLEAN fReassocReq; //set to true if for re-association
1169 tANI_BOOLEAN fReassocRsp; //set to true if for re-association
1170 tCsrBssid bssid;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001171 //Only valid in IBSS
Jeff Johnson295189b2012-06-20 16:38:30 -07001172 //this is the peers MAC address for eCSR_ROAM_RESULT_IBSS_NEW_PEER or PEER_DEPARTED
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001173 tCsrBssid peerMac;
Jeff Johnson295189b2012-06-20 16:38:30 -07001174 tSirResultCodes statusCode;
1175 tANI_U32 reasonCode; //this could be our own defined or sent from the other BSS(per 802.11 spec)
1176 tANI_U8 staId; // Peer stationId when connected
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001177 /*The DPU signatures will be sent eventually to TL to help it determine the
Jeff Johnson295189b2012-06-20 16:38:30 -07001178 association to which a packet belongs to*/
1179 /*Unicast DPU signature*/
1180 tANI_U8 ucastSig;
1181
1182 /*Broadcast DPU signature*/
1183 tANI_U8 bcastSig;
1184
1185 tANI_BOOLEAN fAuthRequired; //FALSE means auth needed from supplicant. TRUE means authenticated(static WEP, open)
1186 tANI_U8 sessionId;
1187 tANI_U8 rsnIELen;
1188 tANI_U8 *prsnIE;
1189
1190 tANI_U8 addIELen;
1191 tANI_U8 *paddIE;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001192
Jeff Johnson295189b2012-06-20 16:38:30 -07001193 union
1194 {
1195 tSirMicFailureInfo *pMICFailureInfo;
1196 tCsrRoamConnectedProfile *pConnectedProfile;
Jeff Johnson295189b2012-06-20 16:38:30 -07001197 tSirWPSPBCProbeReq *pWPSPBCProbeReq;
Jeff Johnson295189b2012-06-20 16:38:30 -07001198 } u;
1199
Jeff Johnson295189b2012-06-20 16:38:30 -07001200 tANI_BOOLEAN wmmEnabledSta; //set to true if WMM enabled STA
1201 tANI_U32 dtimPeriod;
Jeff Johnson295189b2012-06-20 16:38:30 -07001202
1203#ifdef FEATURE_WLAN_CCX
1204 tANI_BOOLEAN isCCXAssoc;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001205#ifdef FEATURE_WLAN_CCX_UPLOAD
1206 tSirTsmIE tsmIe;
1207 tANI_U32 timestamp[2];
1208 tANI_U16 tsmRoamDelay;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001209 tSirCcxBcnReportRsp *pCcxBcnReportRsp;
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001210#endif /* FEATURE_WLAN_CCX_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -07001211#endif
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001212 void* pRemainCtx;
Jeff Johnson295189b2012-06-20 16:38:30 -07001213 tANI_U32 rxChan;
Jeff Johnson295189b2012-06-20 16:38:30 -07001214
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001215#ifdef FEATURE_WLAN_TDLS
1216 tANI_U8 staType;
1217#endif
1218
Jeff Johnson295189b2012-06-20 16:38:30 -07001219 // Required for indicating the frames to upper layer
1220 tANI_U32 beaconLength;
1221 tANI_U8* beaconPtr;
1222 tANI_U32 assocReqLength;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001223 tANI_U8* assocReqPtr;
Chilam NG571c65a2013-01-19 12:27:36 +05301224
1225 tANI_S8 rxRssi;
Jeff Johnson295189b2012-06-20 16:38:30 -07001226}tCsrRoamInfo;
1227
1228
1229
1230
1231
1232typedef struct tagCsrFreqScanInfo
1233{
1234 tANI_U32 nStartFreq; //in unit of MHz
1235 tANI_U32 nEndFreq; //in unit of MHz
1236 tSirScanType scanType;
1237}tCsrFreqScanInfo;
1238
1239
Jeff Johnson295189b2012-06-20 16:38:30 -07001240typedef struct sSirSmeAssocIndToUpperLayerCnf
1241{
1242 tANI_U16 messageType; // eWNI_SME_ASSOC_CNF
1243 tANI_U16 length;
1244 tANI_U8 sessionId;
1245 tSirResultCodes statusCode;
1246 tSirMacAddr bssId; // Self BSSID
1247 tSirMacAddr peerMacAddr;
1248 tANI_U16 aid;
1249 tSirMacAddr alternateBssId;
1250 tANI_U8 alternateChannelId;
1251 tANI_U8 wmmEnabledSta; //set to true if WMM enabled STA
1252 tSirRSNie rsnIE; // RSN IE received from peer
1253 tSirAddie addIE; // Additional IE received from peer, which can be WSC and/or P2P IE
1254 tANI_U8 reassocReq; //set to true if reassoc
1255} tSirSmeAssocIndToUpperLayerCnf, *tpSirSmeAssocIndToUpperLayerCnf;
Jeff Johnson295189b2012-06-20 16:38:30 -07001256
1257typedef struct tagCsrSummaryStatsInfo
1258{
1259 tANI_U32 retry_cnt[4];
1260 tANI_U32 multiple_retry_cnt[4];
1261 tANI_U32 tx_frm_cnt[4];
1262 //tANI_U32 num_rx_frm_crc_err; same as rx_error_cnt
1263 //tANI_U32 num_rx_frm_crc_ok; same as rx_frm_cnt
1264 tANI_U32 rx_frm_cnt;
1265 tANI_U32 frm_dup_cnt;
1266 tANI_U32 fail_cnt[4];
1267 tANI_U32 rts_fail_cnt;
1268 tANI_U32 ack_fail_cnt;
1269 tANI_U32 rts_succ_cnt;
1270 tANI_U32 rx_discard_cnt;
1271 tANI_U32 rx_error_cnt;
1272 tANI_U32 tx_byte_cnt;
1273
1274}tCsrSummaryStatsInfo;
1275
1276typedef struct tagCsrGlobalClassAStatsInfo
1277{
1278 tANI_U32 rx_frag_cnt;
1279 tANI_U32 promiscuous_rx_frag_cnt;
1280 //tANI_U32 rx_fcs_err;
1281 tANI_U32 rx_input_sensitivity;
1282 tANI_U32 max_pwr;
1283 //tANI_U32 default_pwr;
1284 tANI_U32 sync_fail_cnt;
1285 tANI_U32 tx_rate;
1286 //mcs index for HT20 and HT40 rates
1287 tANI_U32 mcs_index;
1288 //to defferentiate between HT20 and HT40 rates;short and long guard interval
1289 tANI_U32 tx_rate_flags;
1290
1291}tCsrGlobalClassAStatsInfo;
1292
1293typedef struct tagCsrGlobalClassBStatsInfo
1294{
1295 tANI_U32 uc_rx_wep_unencrypted_frm_cnt;
1296 tANI_U32 uc_rx_mic_fail_cnt;
1297 tANI_U32 uc_tkip_icv_err;
1298 tANI_U32 uc_aes_ccmp_format_err;
1299 tANI_U32 uc_aes_ccmp_replay_cnt;
1300 tANI_U32 uc_aes_ccmp_decrpt_err;
1301 tANI_U32 uc_wep_undecryptable_cnt;
1302 tANI_U32 uc_wep_icv_err;
1303 tANI_U32 uc_rx_decrypt_succ_cnt;
1304 tANI_U32 uc_rx_decrypt_fail_cnt;
1305 tANI_U32 mcbc_rx_wep_unencrypted_frm_cnt;
1306 tANI_U32 mcbc_rx_mic_fail_cnt;
1307 tANI_U32 mcbc_tkip_icv_err;
1308 tANI_U32 mcbc_aes_ccmp_format_err;
1309 tANI_U32 mcbc_aes_ccmp_replay_cnt;
1310 tANI_U32 mcbc_aes_ccmp_decrpt_err;
1311 tANI_U32 mcbc_wep_undecryptable_cnt;
1312 tANI_U32 mcbc_wep_icv_err;
1313 tANI_U32 mcbc_rx_decrypt_succ_cnt;
1314 tANI_U32 mcbc_rx_decrypt_fail_cnt;
1315
1316}tCsrGlobalClassBStatsInfo;
1317
1318typedef struct tagCsrGlobalClassCStatsInfo
1319{
1320 tANI_U32 rx_amsdu_cnt;
1321 tANI_U32 rx_ampdu_cnt;
1322 tANI_U32 tx_20_frm_cnt;
1323 tANI_U32 rx_20_frm_cnt;
1324 tANI_U32 rx_mpdu_in_ampdu_cnt;
1325 tANI_U32 ampdu_delimiter_crc_err;
1326
1327}tCsrGlobalClassCStatsInfo;
1328
1329typedef struct tagCsrGlobalClassDStatsInfo
1330{
1331 tANI_U32 tx_uc_frm_cnt;
1332 tANI_U32 tx_mc_frm_cnt;
1333 tANI_U32 tx_bc_frm_cnt;
1334 tANI_U32 rx_uc_frm_cnt;
1335 tANI_U32 rx_mc_frm_cnt;
1336 tANI_U32 rx_bc_frm_cnt;
1337 tANI_U32 tx_uc_byte_cnt[4];
1338 tANI_U32 tx_mc_byte_cnt;
1339 tANI_U32 tx_bc_byte_cnt;
1340 tANI_U32 rx_uc_byte_cnt[4];
1341 tANI_U32 rx_mc_byte_cnt;
1342 tANI_U32 rx_bc_byte_cnt;
1343 tANI_U32 rx_byte_cnt;
1344 tANI_U32 num_rx_bytes_crc_ok;
1345 tANI_U32 rx_rate;
1346
1347}tCsrGlobalClassDStatsInfo;
1348
1349typedef struct tagCsrPerStaStatsInfo
1350{
1351 tANI_U32 tx_frag_cnt[4];
1352 tANI_U32 tx_ampdu_cnt;
1353 tANI_U32 tx_mpdu_in_ampdu_cnt;
1354} tCsrPerStaStatsInfo;
1355
1356typedef struct tagCsrRoamSetKey
1357{
1358 eCsrEncryptionType encType;
1359 tAniKeyDirection keyDirection; //Tx, Rx or Tx-and-Rx
1360 tCsrBssid peerMac; //Peers MAC address. ALL 1's for group key
1361 tANI_U8 paeRole; //0 for supplicant
1362 tANI_U8 keyId; // Kye index
1363 tANI_U16 keyLength; //Number of bytes containing the key in pKey
1364 tANI_U8 Key[CSR_MAX_KEY_LEN];
1365 tANI_U8 keyRsc[CSR_MAX_RSC_LEN];
1366} tCsrRoamSetKey;
1367
1368typedef struct tagCsrRoamRemoveKey
1369{
1370 eCsrEncryptionType encType;
1371 tCsrBssid peerMac; //Peers MAC address. ALL 1's for group key
1372 tANI_U8 keyId; //key index
1373} tCsrRoamRemoveKey;
1374
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001375#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05301376
1377typedef struct tagCsrLinkEstablishParams
1378{
1379 tSirMacAddr peerMac;
1380 tANI_U8 uapsdQueues;
1381 tANI_U8 maxSp;
1382 tANI_U8 isBufSta;
1383 tANI_U8 isResponder;
1384}tCsrTdlsLinkEstablishParams;
1385
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001386typedef struct tagCsrTdlsSendMgmt
1387{
1388 tSirMacAddr peerMac;
1389 tANI_U8 frameType;
1390 tANI_U8 dialog;
1391 tANI_U16 statusCode;
Hoonki Leea34dd892013-02-05 22:56:02 -08001392 tANI_U8 responder;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001393 tANI_U8 *buf;
1394 tANI_U8 len;
1395
1396}tCsrTdlsSendMgmt;
1397
1398#ifdef FEATURE_WLAN_TDLS_INTERNAL
1399typedef struct tagCsrTdlsDisRequest
1400{
1401 tSirMacAddr peerMac;
1402 tANI_U8 disType;
1403}tCsrTdlsDisRequest;
1404
1405typedef struct tagCsrTdlsSetupRequest
1406{
1407 tSirMacAddr peerMac;
1408 tANI_U8 linkIndex;
1409}tCsrTdlsSetupRequest;
1410
1411typedef struct tagCsrTdlsTeardownRequest
1412{
1413 tSirMacAddr peerMac;
1414 tANI_U8 linkIndex;
1415}tCsrTdlsTeardownRequest ;
1416#endif
1417#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001418
1419typedef void * tScanResultHandle;
1420
1421#define CSR_INVALID_SCANRESULT_HANDLE (NULL)
1422
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07001423#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1424typedef struct tagCsrHandoffRequest
1425{
1426 tCsrBssid bssid;
1427 tANI_U8 channel;
1428}tCsrHandoffRequest;
1429#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001430
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001431#if defined(FEATURE_WLAN_CCX) && defined(FEATURE_WLAN_CCX_UPLOAD)
1432typedef struct tagCsrCcxBeaconReqParams
1433{
1434 tANI_U16 measurementToken;
1435 tANI_U8 channel;
1436 tANI_U8 scanMode;
1437 tANI_U16 measurementDuration;
1438} tCsrCcxBeaconReqParams, *tpCsrCcxBeaconReqParams;
1439
1440typedef struct tagCsrCcxBeaconReq
1441{
1442 tANI_U8 numBcnReqIe;
1443 tCsrCcxBeaconReqParams bcnReq[SIR_CCX_MAX_MEAS_IE_REQS];
1444} tCsrCcxBeaconReq, *tpCsrCcxBeaconReq;
1445#endif /* FEATURE_WLAN_CCX && FEATURE_WLAN_CCX_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -07001446
1447////////////////////////////////////////////Common SCAN starts
1448
1449//void *p2 -- the second context pass in for the caller
1450//***what if callback is called before requester gets the scanId??
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001451typedef eHalStatus (*csrScanCompleteCallback)(tHalHandle, void *p2, tANI_U32 scanID, eCsrScanStatus status);
Jeff Johnson295189b2012-06-20 16:38:30 -07001452
1453
1454
1455///////////////////////////////////////////Common Roam starts
1456
1457//pContext is the pContext passed in with the roam request
1458//pParam is a pointer to a tCsrRoamInfo, see definition of eRoamCmdStatus and
1459// eRoamCmdResult for detail valid members. It may be NULL
1460//roamId is to identify the callback related roam request. 0 means unsolicit
1461//roamStatus is a flag indicating the status of the callback
1462//roamResult is the result
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001463typedef eHalStatus (*csrRoamCompleteCallback)(void *pContext, tCsrRoamInfo *pParam, tANI_U32 roamId,
Jeff Johnson295189b2012-06-20 16:38:30 -07001464 eRoamCmdStatus roamStatus, eCsrRoamResult roamResult);
1465
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001466typedef eHalStatus (*csrRoamSessionCloseCallback)(void *pContext);
Jeff Johnson295189b2012-06-20 16:38:30 -07001467
1468/* ---------------------------------------------------------------------------
1469 \fn csrRoamGetNumPMKIDCache
1470 \brief return number of PMKID cache entries
1471 \return tANI_U32 - the number of PMKID cache entries
1472 -------------------------------------------------------------------------------*/
1473//tANI_U32 csrRoamGetNumPMKIDCache(tHalHandle hHal);
1474
1475/* ---------------------------------------------------------------------------
1476 \fn csrRoamGetPMKIDCache
1477 \brief return PMKID cache from CSR
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001478 \param pNum - caller allocated memory that has the space of the number of pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the
Jeff Johnson295189b2012-06-20 16:38:30 -07001479 needed or actually number in tPmkidCacheInfo.
1480 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if any, upon return
1481 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
1482 -------------------------------------------------------------------------------*/
1483//eHalStatus csrRoamGetPMKIDCache(tHalHandle hHal, tANI_U32 *pNum, tPmkidCacheInfo *pPmkidCache);
1484
1485//pProfile - pointer to tCsrRoamProfile
1486#define CSR_IS_START_IBSS(pProfile) (eCSR_BSS_TYPE_START_IBSS == (pProfile)->BSSType)
1487#define CSR_IS_JOIN_TO_IBSS(pProfile) (eCSR_BSS_TYPE_IBSS == (pProfile)->BSSType)
1488#define CSR_IS_IBSS(pProfile) ( CSR_IS_START_IBSS(pProfile) || CSR_IS_JOIN_TO_IBSS(pProfile) )
1489#define CSR_IS_INFRASTRUCTURE(pProfile) (eCSR_BSS_TYPE_INFRASTRUCTURE == (pProfile)->BSSType)
1490#define CSR_IS_ANY_BSS_TYPE(pProfile) (eCSR_BSS_TYPE_ANY == (pProfile)->BSSType)
1491#define CSR_IS_WDS_AP( pProfile ) ( eCSR_BSS_TYPE_WDS_AP == (pProfile)->BSSType )
1492#define CSR_IS_WDS_STA( pProfile ) ( eCSR_BSS_TYPE_WDS_STA == (pProfile)->BSSType )
1493#define CSR_IS_WDS( pProfile ) ( CSR_IS_WDS_AP( pProfile ) || CSR_IS_WDS_STA( pProfile ) )
Jeff Johnson295189b2012-06-20 16:38:30 -07001494#define CSR_IS_INFRA_AP( pProfile ) ( eCSR_BSS_TYPE_INFRA_AP == (pProfile)->BSSType )
Jeff Johnson295189b2012-06-20 16:38:30 -07001495
1496//pProfile - pointer to tCsrRoamConnectedProfile
Jeff Johnson295189b2012-06-20 16:38:30 -07001497#define CSR_IS_CONN_INFRA_AP( pProfile ) ( eCSR_BSS_TYPE_INFRA_AP == (pProfile)->BSSType )
Jeff Johnson295189b2012-06-20 16:38:30 -07001498#define CSR_IS_CONN_WDS_AP( pProfile ) ( eCSR_BSS_TYPE_WDS_AP == (pProfile)->BSSType )
1499#define CSR_IS_CONN_WDS_STA( pProfile ) ( eCSR_BSS_TYPE_WDS_STA == (pProfile)->BSSType )
1500#define CSR_IS_CONN_WDS( pProfile ) ( CSR_IS_WDS_AP( pProfile ) || CSR_IS_WDS_STA( pProfile ) )
1501
1502
1503
1504///////////////////////////////////////////Common Roam ends
1505
1506
1507
Jeff Johnson295189b2012-06-20 16:38:30 -07001508/* ---------------------------------------------------------------------------
1509 \fn csrSetChannels
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001510 \brief HDD calls this function to change some global settings.
Jeff Johnson295189b2012-06-20 16:38:30 -07001511 caller must set the all fields or call csrGetConfigParam to prefill the fields.
1512 \param pParam - caller allocated memory
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001513 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001514 -------------------------------------------------------------------------------*/
1515
1516eHalStatus csrSetChannels(tHalHandle hHal, tCsrConfigParam *pParam );
1517
1518eHalStatus csrSetRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode);
Jeff Johnson295189b2012-06-20 16:38:30 -07001519
1520
1521//enum to string conversion for debug output
1522const char * get_eRoamCmdStatus_str(eRoamCmdStatus val);
1523const char * get_eCsrRoamResult_str(eCsrRoamResult val);
1524/* ---------------------------------------------------------------------------
1525 \fn csrSetPhyMode
1526 \brief HDD calls this function to set the phyMode.
1527 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1528 CSR.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001529 \param phyMode - indicate the phyMode needs to set to. The value has to be either 0, or some bits set.
Jeff Johnson295189b2012-06-20 16:38:30 -07001530 See eCsrPhyMode for definition
1531 \param eBand - specify the operational band (2.4, 5 or both)
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001532 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
Jeff Johnson295189b2012-06-20 16:38:30 -07001533 a restart is needed to apply the change
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001534 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001535 -------------------------------------------------------------------------------*/
1536eHalStatus csrSetPhyMode(tHalHandle hHal, tANI_U32 phyMode, eCsrBand eBand, tANI_BOOLEAN *pfRestartNeeded);
1537
1538void csrDumpInit(tHalHandle hHal);
1539
1540
1541/*---------------------------------------------------------------------------
1542 This is the type for a link quality callback to be registered with SME
1543 for indications
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001544 Once the link quality has been indicated, subsequently, link indications are
Jeff Johnson295189b2012-06-20 16:38:30 -07001545 posted each time there is a CHANGE in link quality.
1546 *** If there is no change in link, there will be no indication ***
1547
1548 The indications may be based on one or more criteria internal to SME
1549 such as RSSI and PER.
1550
1551 \param ind - Indication being posted
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001552 \param pContext - any user data given at callback registration.
Jeff Johnson295189b2012-06-20 16:38:30 -07001553 \return None
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001554
Jeff Johnson295189b2012-06-20 16:38:30 -07001555---------------------------------------------------------------------------*/
1556typedef void (* csrRoamLinkQualityIndCallback)
1557 (eCsrRoamLinkQualityInd ind, void *pContext);
1558
1559
1560/*---------------------------------------------------------------------------
1561 This is the type for a statistics callback to be registered with SME
1562 for stats reporting
1563
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001564 Since the client requesting for the stats already know which class/type of
1565 stats it asked for, the callback will carry them in the rsp buffer
1566 (void * stats) whose size will be same as the size of requested stats &
Jeff Johnson295189b2012-06-20 16:38:30 -07001567 will be exactly in the same order requested in the stats mask from LSB to MSB
1568
1569 \param stats - stats rsp buffer sent back with the report
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001570 \param pContext - any user data given at callback registration.
Jeff Johnson295189b2012-06-20 16:38:30 -07001571 \return None
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001572
Jeff Johnson295189b2012-06-20 16:38:30 -07001573---------------------------------------------------------------------------*/
1574typedef void ( *tCsrStatsCallback) (void * stats, void *pContext);
1575
1576/*---------------------------------------------------------------------------
1577 This is the type for a rssi callback to be registered with SME
1578 for getting rssi
1579
1580 \param rssi - rssi
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001581 \param pContext - any user data given at callback registration.
Jeff Johnson295189b2012-06-20 16:38:30 -07001582 \return None
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001583
Jeff Johnson295189b2012-06-20 16:38:30 -07001584---------------------------------------------------------------------------*/
1585
1586typedef void ( *tCsrRssiCallback) (v_S7_t rssi, tANI_U32 staId, void *pContext);
1587
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001588
1589#if defined(FEATURE_WLAN_CCX) && defined(FEATURE_WLAN_CCX_UPLOAD)
1590/*---------------------------------------------------------------------------
1591 This is the type for a tsm stats callback to be registered with SME
1592 for getting tsm stats
1593
1594 \param tsmMetrics - tsmMetrics
1595 \param pContext - any user data given at callback registration.
1596 \return None
1597
1598---------------------------------------------------------------------------*/
1599
1600typedef void ( *tCsrTsmStatsCallback) (tAniTrafStrmMetrics tsmMetrics, tANI_U32 staId, void *pContext);
1601#endif /* FEATURE_WLAN_CCX && FEATURE_WLAN_CCX_UPLOAD */
1602
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05301603/*---------------------------------------------------------------------------
1604 This is the type for a snr callback to be registered with SME
1605 for getting snr
1606
1607 \param snr
1608 \param pContext - any user data given at callback registration.
1609 \return None
1610
1611---------------------------------------------------------------------------*/
1612typedef void (*tCsrSnrCallback) (v_S7_t snr, tANI_U32 staId, void *pContext);
1613
Jeff Johnson295189b2012-06-20 16:38:30 -07001614#ifdef WLAN_FEATURE_VOWIFI_11R
1615eHalStatus csrRoamIssueFTPreauthReq(tHalHandle hHal, tANI_U32 sessionId, tpSirBssDescription pBssDescription);
1616#endif
1617
1618/*---------------------------------------------------------------------------
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001619 This is the function to change the Band configuraiton (ALL/2.4 GHZ/5 GHZ)
Jeff Johnson295189b2012-06-20 16:38:30 -07001620
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001621 \param hHal - handle to Hal context
Jeff Johnson295189b2012-06-20 16:38:30 -07001622 \param eBand - band value
1623 \return eHalStatus
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001624
Jeff Johnson295189b2012-06-20 16:38:30 -07001625---------------------------------------------------------------------------*/
1626eHalStatus csrSetBand(tHalHandle hHal, eCsrBand eBand);
1627
1628/*---------------------------------------------------------------------------
1629 This is the function to get the current operating band value
1630 \param hHal - handl to Hal context
1631 \return eCsrband - band value
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001632
Jeff Johnson295189b2012-06-20 16:38:30 -07001633---------------------------------------------------------------------------*/
1634eCsrBand csrGetCurrentBand (tHalHandle hHal);
1635
1636#endif
1637