blob: 8efe3f3f1bec71893f6b542ca82803e76c1dace2 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002 * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
Kiet Lam0fb93dd2014-02-19 00:32:59 -08003 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21
22/*
Kiet Lama7f454d2014-07-24 12:04:06 -070023 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
Gopichand Nakkala92f07d82013-01-08 21:16:34 -080026 */
Kiet Lam0fb93dd2014-02-19 00:32:59 -080027
28
Kiet Lama7f454d2014-07-24 12:04:06 -070029
30
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080031/** ------------------------------------------------------------------------- *
32 ------------------------------------------------------------------------- *
Jeff Johnson295189b2012-06-20 16:38:30 -070033 \file csrApi.h
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080034
Jeff Johnson295189b2012-06-20 16:38:30 -070035 Exports and types for the Common Scan and Roaming Module interfaces.
Jeff Johnson295189b2012-06-20 16:38:30 -070036 ========================================================================== */
37#ifndef CSRAPI_H__
38#define CSRAPI_H__
39
40#include "sirApi.h"
41#include "sirMacProtDef.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070042#include "csrLinkList.h"
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080043typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -070044{
45 eCSR_AUTH_TYPE_NONE, //never used
46 // MAC layer authentication types
47 eCSR_AUTH_TYPE_OPEN_SYSTEM,
48 eCSR_AUTH_TYPE_SHARED_KEY,
49 eCSR_AUTH_TYPE_AUTOSWITCH,
50
51 // Upper layer authentication types
52 eCSR_AUTH_TYPE_WPA,
53 eCSR_AUTH_TYPE_WPA_PSK,
54 eCSR_AUTH_TYPE_WPA_NONE,
55
56 eCSR_AUTH_TYPE_RSN,
57 eCSR_AUTH_TYPE_RSN_PSK,
58#if defined WLAN_FEATURE_VOWIFI_11R
59 eCSR_AUTH_TYPE_FT_RSN,
60 eCSR_AUTH_TYPE_FT_RSN_PSK,
61#endif
62#ifdef FEATURE_WLAN_WAPI
63 eCSR_AUTH_TYPE_WAPI_WAI_CERTIFICATE,
64 eCSR_AUTH_TYPE_WAPI_WAI_PSK,
65#endif /* FEATURE_WLAN_WAPI */
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -080066#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -070067 eCSR_AUTH_TYPE_CCKM_WPA,
68 eCSR_AUTH_TYPE_CCKM_RSN,
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -080069#endif /* FEATURE_WLAN_ESE */
Chet Lanctot186b5732013-03-18 10:26:30 -070070#ifdef WLAN_FEATURE_11W
71 eCSR_AUTH_TYPE_RSN_PSK_SHA256,
Abhishek Singhae408032014-09-25 17:22:04 +053072 eCSR_AUTH_TYPE_RSN_8021X_SHA256,
Chet Lanctot186b5732013-03-18 10:26:30 -070073#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070074 eCSR_NUM_OF_SUPPORT_AUTH_TYPE,
75 eCSR_AUTH_TYPE_FAILED = 0xff,
76 eCSR_AUTH_TYPE_UNKNOWN = eCSR_AUTH_TYPE_FAILED,
77
78}eCsrAuthType;
79
80
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080081typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -070082{
83 eCSR_ENCRYPT_TYPE_NONE,
84 eCSR_ENCRYPT_TYPE_WEP40_STATICKEY,
85 eCSR_ENCRYPT_TYPE_WEP104_STATICKEY,
86
87 eCSR_ENCRYPT_TYPE_WEP40,
88 eCSR_ENCRYPT_TYPE_WEP104,
89 eCSR_ENCRYPT_TYPE_TKIP,
90 eCSR_ENCRYPT_TYPE_AES,
91#ifdef FEATURE_WLAN_WAPI
92 eCSR_ENCRYPT_TYPE_WPI, //WAPI
93#endif /* FEATURE_WLAN_WAPI */
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -080094#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -070095 eCSR_ENCRYPT_TYPE_KRK,
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -080096#endif /* FEATURE_WLAN_ESE */
Jeff Johnson295189b2012-06-20 16:38:30 -070097#ifdef WLAN_FEATURE_11W
98 //11w BIP
99 eCSR_ENCRYPT_TYPE_AES_CMAC,
100#endif
101 eCSR_ENCRYPT_TYPE_ANY,
102 eCSR_NUM_OF_ENCRYPT_TYPE = eCSR_ENCRYPT_TYPE_ANY,
103
104 eCSR_ENCRYPT_TYPE_FAILED = 0xff,
105 eCSR_ENCRYPT_TYPE_UNKNOWN = eCSR_ENCRYPT_TYPE_FAILED,
106
107}eCsrEncryptionType;
108
109/*---------------------------------------------------------------------------
110 Enumeration of the various Security types
111---------------------------------------------------------------------------*/
112typedef enum
113{
114 eCSR_SECURITY_TYPE_WPA,
115 eCSR_SECURITY_TYPE_RSN,
116#ifdef FEATURE_WLAN_WAPI
117 eCSR_SECURITY_TYPE_WAPI,
118#endif /* FEATURE_WLAN_WAPI */
119 eCSR_SECURITY_TYPE_UNKNOWN,
120
121}eCsrSecurityType;
122
123typedef enum
124{
125 eCSR_DOT11_MODE_TAURUS = 0, //This mean everything because it covers all thing we support
126 eCSR_DOT11_MODE_abg = 0x0001, //11a/b/g only, no HT, no proprietary
127 eCSR_DOT11_MODE_11a = 0x0002,
128 eCSR_DOT11_MODE_11b = 0x0004,
129 eCSR_DOT11_MODE_11g = 0x0008,
130 eCSR_DOT11_MODE_11n = 0x0010,
131 eCSR_DOT11_MODE_POLARIS = 0x0020,
132 eCSR_DOT11_MODE_TITAN = 0x0040,
133 eCSR_DOT11_MODE_11g_ONLY = 0x0080,
134 eCSR_DOT11_MODE_11n_ONLY = 0x0100,
135 eCSR_DOT11_MODE_TAURUS_ONLY = 0x0200,
136 eCSR_DOT11_MODE_11b_ONLY = 0x0400,
137 eCSR_DOT11_MODE_11a_ONLY = 0x0800,
Jeff Johnsone7245742012-09-05 17:12:55 -0700138#ifdef WLAN_FEATURE_11AC
139 eCSR_DOT11_MODE_11ac = 0x1000,
140 eCSR_DOT11_MODE_11ac_ONLY = 0x2000,
141#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700142 //This is for WIFI test. It is same as eWNIAPI_MAC_PROTOCOL_ALL except when it starts IBSS in 11B of 2.4GHz
143 //It is for CSR internal use
Jeff Johnsone7245742012-09-05 17:12:55 -0700144 eCSR_DOT11_MODE_AUTO = 0x4000,
Jeff Johnson295189b2012-06-20 16:38:30 -0700145
146 eCSR_NUM_PHY_MODE = 16, //specify the number of maximum bits for phyMode
147}eCsrPhyMode;
148
149
150typedef tANI_U8 tCsrBssid[WNI_CFG_BSSID_LEN];
151
152typedef enum
153{
Varun Reddy Yeturu2cc78922013-04-10 11:50:02 -0700154 eCSR_BSS_TYPE_NONE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700155 eCSR_BSS_TYPE_INFRASTRUCTURE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700156 eCSR_BSS_TYPE_INFRA_AP, // SoftAP AP
Jeff Johnson295189b2012-06-20 16:38:30 -0700157 eCSR_BSS_TYPE_IBSS, // an IBSS network we will NOT start
158 eCSR_BSS_TYPE_START_IBSS, // an IBSS network we will start if no partners detected.
159 eCSR_BSS_TYPE_WDS_AP, // BT-AMP AP
160 eCSR_BSS_TYPE_WDS_STA, // BT-AMP station
161 eCSR_BSS_TYPE_ANY, // any BSS type (IBSS or Infrastructure).
162}eCsrRoamBssType;
163
164
165
166typedef enum {
167 eCSR_SCAN_REQUEST_11D_SCAN = 1,
168 eCSR_SCAN_REQUEST_FULL_SCAN,
169 eCSR_SCAN_IDLE_MODE_SCAN,
170 eCSR_SCAN_HO_BG_SCAN, // bg scan request in NRT & RT Handoff sub-states
171 eCSR_SCAN_HO_PROBE_SCAN, // directed probe on an entry from the candidate list
172 eCSR_SCAN_HO_NT_BG_SCAN, // bg scan request in NT sub-state
173 eCSR_SCAN_P2P_DISCOVERY,
174
175 eCSR_SCAN_SOFTAP_CHANNEL_RANGE,
176 eCSR_SCAN_P2P_FIND_PEER,
177}eCsrRequestType;
Jeff Johnson295189b2012-06-20 16:38:30 -0700178typedef enum {
179 eCSR_SCAN_RESULT_GET = 0,
180 eCSR_SCAN_RESULT_FLUSH = 1, //to delete all cached scan results
181}eCsrScanResultCmd;
182
183typedef enum
184{
185 eCSR_SCAN_SUCCESS,
186 eCSR_SCAN_FAILURE,
187 eCSR_SCAN_ABORT,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800188 eCSR_SCAN_FOUND_PEER,
Jeff Johnson295189b2012-06-20 16:38:30 -0700189}eCsrScanStatus;
190
Srinivas, Dasari138af4f2014-02-07 11:13:45 +0530191/* Reason to abort the scan
192 * The reason can used later to decide whether to update the scan results
193 * to upper layer or not
194 */
195typedef enum
196{
197 eCSR_SCAN_ABORT_DEFAULT,
198 eCSR_SCAN_ABORT_DUE_TO_BAND_CHANGE, //Scan aborted due to band change
199}eCsrAbortReason;
200
Jeff Johnson295189b2012-06-20 16:38:30 -0700201#define CSR_SCAN_TIME_DEFAULT 0
202#define CSR_VALUE_IGNORED 0xFFFFFFFF
203#define CSR_RSN_PMKID_SIZE 16
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530204#define CSR_MAX_PMKID_ALLOWED 32
Jeff Johnson295189b2012-06-20 16:38:30 -0700205#define CSR_WEP40_KEY_LEN 5
206#define CSR_WEP104_KEY_LEN 13
207#define CSR_TKIP_KEY_LEN 32
208#define CSR_AES_KEY_LEN 16
209#define CSR_MAX_TX_POWER ( WNI_CFG_CURRENT_TX_POWER_LEVEL_STAMAX )
210#define CSR_MAX_RSC_LEN 16
211#ifdef FEATURE_WLAN_WAPI
212#define CSR_WAPI_BKID_SIZE 16
213#define CSR_MAX_BKID_ALLOWED 16
214#define CSR_WAPI_KEY_LEN 32
215#define CSR_MAX_KEY_LEN ( CSR_WAPI_KEY_LEN ) //longest one is for WAPI
216#else
217#define CSR_MAX_KEY_LEN ( CSR_TKIP_KEY_LEN ) //longest one is for TKIP
218#endif /* FEATURE_WLAN_WAPI */
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800219#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -0700220#define CSR_KRK_KEY_LEN 16
221#endif
222
223
224
225typedef struct tagCsrChannelInfo
226{
227 tANI_U8 numOfChannels;
228 tANI_U8 *ChannelList; //it will be an array of channels
Madan Mohan Koyyalamudidd3c9662012-11-09 17:39:30 -0800229}tCsrChannelInfo, *tpCsrChannelInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700230
231typedef struct tagCsrSSIDInfo
232{
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800233 tSirMacSSid SSID;
Jeff Johnson295189b2012-06-20 16:38:30 -0700234 tANI_BOOLEAN handoffPermitted;
235 tANI_BOOLEAN ssidHidden;
236}tCsrSSIDInfo;
237
238typedef struct tagCsrSSIDs
239{
240 tANI_U32 numOfSSIDs;
241 tCsrSSIDInfo *SSIDList; //To be allocated for array of SSIDs
242}tCsrSSIDs;
243
244typedef struct tagCsrBSSIDs
245{
246 tANI_U32 numOfBSSIDs;
247 tCsrBssid *bssid;
248}tCsrBSSIDs;
249
Gopichand Nakkala681989c2013-03-06 22:27:48 -0800250typedef struct tagCsrStaParams
251{
252 tANI_U16 capability;
253 tANI_U8 extn_capability[SIR_MAC_MAX_EXTN_CAP];
254 tANI_U8 supported_rates_len;
255 tANI_U8 supported_rates[SIR_MAC_MAX_SUPP_RATES];
Hoonki Lee66b75f32013-04-16 18:30:07 -0700256 tANI_U8 htcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -0800257 tSirHTCap HTCap;
Hoonki Lee66b75f32013-04-16 18:30:07 -0700258 tANI_U8 vhtcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -0800259 tSirVHTCap VHTCap;
260 tANI_U8 uapsd_queues;
261 tANI_U8 max_sp;
Naresh Jayaramdff88f92014-02-12 21:44:29 +0530262 tANI_U8 supported_channels_len;
263 tANI_U8 supported_channels[SIR_MAC_MAX_SUPP_CHANNELS];
264 tANI_U8 supported_oper_classes_len;
265 tANI_U8 supported_oper_classes[SIR_MAC_MAX_SUPP_OPER_CLASSES];
Gopichand Nakkala681989c2013-03-06 22:27:48 -0800266}tCsrStaParams;
Jeff Johnson295189b2012-06-20 16:38:30 -0700267
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800268typedef struct tagCsrScanRequest
Jeff Johnson295189b2012-06-20 16:38:30 -0700269{
270 tSirScanType scanType;
271 tCsrBssid bssid;
272 eCsrRoamBssType BSSType;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800273 tCsrSSIDs SSIDs;
Jeff Johnson295189b2012-06-20 16:38:30 -0700274 tCsrChannelInfo ChannelInfo;
275 tANI_U32 minChnTime; //in units of milliseconds
276 tANI_U32 maxChnTime; //in units of milliseconds
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800277 tANI_U32 minChnTimeBtc; //in units of milliseconds
278 tANI_U32 maxChnTimeBtc; //in units of milliseconds
Jeff Johnson295189b2012-06-20 16:38:30 -0700279 tANI_U32 restTime; //in units of milliseconds //ignored when not connected
280 tANI_U32 uIEFieldLen;
281 tANI_U8 *pIEField;
282 eCsrRequestType requestType; //11d scan or full scan
Jeff Johnson295189b2012-06-20 16:38:30 -0700283 tANI_BOOLEAN p2pSearch;
Jeff Johnsone7245742012-09-05 17:12:55 -0700284 tANI_BOOLEAN skipDfsChnlInP2pSearch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700285}tCsrScanRequest;
286
287typedef struct tagCsrBGScanRequest
288{
289 tSirScanType scanType;
290 tSirMacSSid SSID;
291 tCsrChannelInfo ChannelInfo;
292 tANI_U32 scanInterval; //in units of milliseconds
293 tANI_U32 minChnTime; //in units of milliseconds
294 tANI_U32 maxChnTime; //in units of milliseconds
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800295 tANI_U32 minChnTimeBtc; //in units of milliseconds
296 tANI_U32 maxChnTimeBtc; //in units of milliseconds
Jeff Johnson295189b2012-06-20 16:38:30 -0700297 tANI_U32 restTime; //in units of milliseconds //ignored when not connected
298 tANI_U32 throughputImpact; //specify whether BG scan cares about impacting throughput //ignored when not connected
299 tCsrBssid bssid; //how to use it?? Apple
Srikant Kuppa866893f2012-12-27 17:28:14 -0800300}tCsrBGScanRequest, *tpCsrBGScanRequest;
Jeff Johnson295189b2012-06-20 16:38:30 -0700301
302
303typedef struct tagCsrScanResultInfo
304{
305 //Carry the IEs for the current BSSDescription. A pointer to tDot11fBeaconIEs. Maybe NULL for start BSS.
306 void *pvIes;
307 tAniSSID ssId;
308 v_TIME_t timer; // timer is variable which is used for hidden SSID's timer value
309 //This member must be the last in the structure because the end of tSirBssDescription is an
310 // array with nonknown size at this time
311 tSirBssDescription BssDescriptor;
312}tCsrScanResultInfo;
313
314typedef struct tagCsrEncryptionList
315{
316
317 tANI_U32 numEntries;
318 eCsrEncryptionType encryptionType[eCSR_NUM_OF_ENCRYPT_TYPE];
319
320}tCsrEncryptionList, *tpCsrEncryptionList;
321
322typedef struct tagCsrAuthList
323{
324 tANI_U32 numEntries;
325 eCsrAuthType authType[eCSR_NUM_OF_SUPPORT_AUTH_TYPE];
326}tCsrAuthList, *tpCsrAuthList;
327
328#ifdef WLAN_FEATURE_VOWIFI_11R
329typedef struct tagCsrMobilityDomainInfo
330{
331 tANI_U8 mdiePresent;
332 tANI_U16 mobilityDomain;
333} tCsrMobilityDomainInfo;
334#endif
335
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800336#ifdef FEATURE_WLAN_ESE
337typedef struct tagCsrEseCckmInfo
Jeff Johnson295189b2012-06-20 16:38:30 -0700338{
339 tANI_U32 reassoc_req_num;
340 tANI_BOOLEAN krk_plumbed;
341 tANI_U8 krk[CSR_KRK_KEY_LEN];
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800342} tCsrEseCckmInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700343#endif
344
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800345#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700346#define CSR_DOT11F_IE_RSN_MAX_LEN (114) /*TODO: duplicate one in dot11f.h */
347
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800348typedef struct tagCsrEseCckmIe
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700349{
350 tANI_U8 cckmIe[CSR_DOT11F_IE_RSN_MAX_LEN];
351 tANI_U8 cckmIeLen;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800352} tCsrEseCckmIe;
353#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -0700354
355typedef struct tagCsrScanResultFilter
356{
357 tCsrBSSIDs BSSIDs; //each bssid has a length of WNI_CFG_BSSID_LEN (6)
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800358 tCsrSSIDs SSIDs;
Jeff Johnson295189b2012-06-20 16:38:30 -0700359 tCsrChannelInfo ChannelInfo;
360 tCsrAuthList authType;
361 tCsrEncryptionList EncryptionType;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800362 //eCSR_ENCRYPT_TYPE_ANY cannot be set in multicast encryption type. If caller doesn't case,
Jeff Johnson295189b2012-06-20 16:38:30 -0700363 //put all supported encryption types in here
364 tCsrEncryptionList mcEncryptionType;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800365 eCsrRoamBssType BSSType;
Jeff Johnson295189b2012-06-20 16:38:30 -0700366 //this is a bit mask of all the needed phy mode defined in eCsrPhyMode
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800367 tANI_U32 phyMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700368 //If countryCode[0] is not 0, countryCode is checked independent of fCheckUnknownCountryCode
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800369 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN];
370 tANI_U8 uapsd_mask;
Jeff Johnson295189b2012-06-20 16:38:30 -0700371 /*For WPS filtering if true => auth and ecryption should be ignored*/
372 tANI_BOOLEAN bWPSAssociation;
Leela Venkata Kiran Kumar Reddy Chiralaf257bef2014-04-11 18:48:12 -0700373 tANI_BOOLEAN bOSENAssociation;
Jeff Johnson295189b2012-06-20 16:38:30 -0700374#if defined WLAN_FEATURE_VOWIFI
375 /*For measurement reports --> if set, only SSID, BSSID and channel is considered for filtering.*/
376 tANI_BOOLEAN fMeasurement;
377#endif
378#ifdef WLAN_FEATURE_VOWIFI_11R
379 tCsrMobilityDomainInfo MDID;
380#endif
381 tANI_BOOLEAN p2pResult;
Abhishek Singh3b56d3a2014-06-25 12:37:39 +0530382#ifdef WLAN_FEATURE_11W
383 // Management Frame Protection
384 tANI_BOOLEAN MFPEnabled;
385 tANI_U8 MFPRequired;
386 tANI_U8 MFPCapable;
387#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700388}tCsrScanResultFilter;
389
390
391typedef struct sCsrChnPower_
392{
393 tANI_U8 firstChannel;
394 tANI_U8 numChannels;
395 tANI_U8 maxtxPower;
396}sCsrChnPower;
397
398
399typedef struct sCsrChannel_
400{
401 tANI_U8 numChannels;
402 tANI_U8 channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
403}sCsrChannel;
404
405
406typedef struct tagCsr11dinfo
407{
408 sCsrChannel Channels;
409 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN+1];
410 //max power channel list
411 sCsrChnPower ChnPower[WNI_CFG_VALID_CHANNEL_LIST_LEN];
412}tCsr11dinfo;
413
414
415typedef enum
416{
417 eCSR_ROAM_CANCELLED = 1,
418 //this mean error happens before association_start or roaming_start is called.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800419 eCSR_ROAM_FAILED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700420 //a CSR trigger roaming operation starts, callback may get a pointer to tCsrConnectedProfile
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800421 eCSR_ROAM_ROAMING_START,
Jeff Johnson295189b2012-06-20 16:38:30 -0700422 //a CSR trigger roaming operation is completed
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800423 eCSR_ROAM_ROAMING_COMPLETION,
Jeff Johnson295189b2012-06-20 16:38:30 -0700424 //Connection completed status.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800425 eCSR_ROAM_CONNECT_COMPLETION,
426 //an association or start_IBSS operation starts,
427 //callback may get a pointer to tCsrRoamProfile and a pointer to tSirBssDescription
428 eCSR_ROAM_ASSOCIATION_START,
429 //a roaming operation is finish, see eCsrRoamResult for
Jeff Johnson295189b2012-06-20 16:38:30 -0700430 //possible data passed back
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800431 eCSR_ROAM_ASSOCIATION_COMPLETION,
Jeff Johnson295189b2012-06-20 16:38:30 -0700432 eCSR_ROAM_DISASSOCIATED,
433 eCSR_ROAM_ASSOCIATION_FAILURE,
434 //when callback with this flag. callback gets a pointer to the BSS desc.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800435 eCSR_ROAM_SHOULD_ROAM,
Jeff Johnson295189b2012-06-20 16:38:30 -0700436 //A new candidate for PMKID is found
437 eCSR_ROAM_SCAN_FOUND_NEW_BSS,
438 //CSR is done lostlink roaming and still cannot reconnect
439 eCSR_ROAM_LOSTLINK,
440 //a link lost is detected. CSR starts roaming.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800441 eCSR_ROAM_LOSTLINK_DETECTED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700442 //TKIP MIC error detected, callback gets a pointer to tpSirSmeMicFailureInd
443 eCSR_ROAM_MIC_ERROR_IND,
444 eCSR_ROAM_IBSS_IND, //IBSS indications.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800445 //Update the connection status, useful for IBSS: new peer added, network is active etc.
446 eCSR_ROAM_CONNECT_STATUS_UPDATE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700447 eCSR_ROAM_GEN_INFO,
448 eCSR_ROAM_SET_KEY_COMPLETE,
449 eCSR_ROAM_REMOVE_KEY_COMPLETE,
450 eCSR_ROAM_IBSS_LEAVE, //IBSS indications.
451 //BSS in WDS mode status indication
452 eCSR_ROAM_WDS_IND,
Jeff Johnson295189b2012-06-20 16:38:30 -0700453 //BSS in SoftAP mode status indication
454 eCSR_ROAM_INFRA_IND,
455 eCSR_ROAM_WPS_PBC_PROBE_REQ_IND,
Jeff Johnson295189b2012-06-20 16:38:30 -0700456#ifdef WLAN_FEATURE_VOWIFI_11R
457 eCSR_ROAM_FT_RESPONSE,
458#endif
459 eCSR_ROAM_FT_START,
460 eCSR_ROAM_INDICATE_MGMT_FRAME,
461 eCSR_ROAM_REMAIN_CHAN_READY,
462 eCSR_ROAM_SEND_ACTION_CNF,
463 //this mean error happens before association_start or roaming_start is called.
464 eCSR_ROAM_SESSION_OPENED,
465 eCSR_ROAM_FT_REASSOC_FAILED,
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700466#ifdef FEATURE_WLAN_LFR
467 eCSR_ROAM_PMK_NOTIFY,
468#endif
Yue Maef608272013-04-08 23:09:17 -0700469#ifdef FEATURE_WLAN_LFR_METRICS
470 eCSR_ROAM_PREAUTH_INIT_NOTIFY,
471 eCSR_ROAM_PREAUTH_STATUS_SUCCESS,
472 eCSR_ROAM_PREAUTH_STATUS_FAILURE,
473 eCSR_ROAM_HANDOVER_SUCCESS,
474#endif
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800475#ifdef FEATURE_WLAN_TDLS
476 eCSR_ROAM_TDLS_STATUS_UPDATE,
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800477 eCSR_ROAM_RESULT_MGMT_TX_COMPLETE_IND,
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800478#endif
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -0800479 eCSR_ROAM_DISCONNECT_ALL_P2P_CLIENTS, //Disaconnect all the clients
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800480 eCSR_ROAM_SEND_P2P_STOP_BSS, //Stopbss triggered from SME due to different
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -0800481 // beacon interval
Chet Lanctot186b5732013-03-18 10:26:30 -0700482#ifdef WLAN_FEATURE_11W
483 eCSR_ROAM_UNPROT_MGMT_FRAME_IND,
484#endif
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -0800485
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800486#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700487 eCSR_ROAM_TSM_IE_IND,
488 eCSR_ROAM_CCKM_PREAUTH_NOTIFY,
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800489 eCSR_ROAM_ESE_ADJ_AP_REPORT_IND,
490 eCSR_ROAM_ESE_BCN_REPORT_IND,
491#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -0700492}eRoamCmdStatus;
493
494
495//comment inside indicates what roaming callback gets
496typedef enum
497{
498 eCSR_ROAM_RESULT_NONE,
499 //this means no more action in CSR
500 //If roamStatus is eCSR_ROAM_ASSOCIATION_COMPLETION, tCsrRoamInfo's pBssDesc may pass back
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800501 eCSR_ROAM_RESULT_FAILURE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700502 //Pass back pointer to tCsrRoamInfo
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800503 eCSR_ROAM_RESULT_ASSOCIATED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700504 eCSR_ROAM_RESULT_NOT_ASSOCIATED,
505 eCSR_ROAM_RESULT_MIC_FAILURE,
506 eCSR_ROAM_RESULT_FORCED,
507 eCSR_ROAM_RESULT_DISASSOC_IND,
508 eCSR_ROAM_RESULT_DEAUTH_IND,
509 eCSR_ROAM_RESULT_CAP_CHANGED,
510 //This means we starts an IBSS
511 //tCsrRoamInfo's pBssDesc may pass back
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800512 eCSR_ROAM_RESULT_IBSS_STARTED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700513 //START_BSS failed
514 //tCsrRoamInfo's pBssDesc may pass back
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800515 eCSR_ROAM_RESULT_IBSS_START_FAILED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700516 eCSR_ROAM_RESULT_IBSS_JOIN_SUCCESS,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800517 eCSR_ROAM_RESULT_IBSS_JOIN_FAILED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700518 eCSR_ROAM_RESULT_IBSS_CONNECT,
519 eCSR_ROAM_RESULT_IBSS_INACTIVE,
520 //If roamStatus is eCSR_ROAM_ASSOCIATION_COMPLETION
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800521 //tCsrRoamInfo's pBssDesc may pass back. and the peer's MAC address in peerMacOrBssid
522 //If roamStatus is eCSR_ROAM_IBSS_IND,
Jeff Johnson295189b2012-06-20 16:38:30 -0700523 //the peer's MAC address in peerMacOrBssid and a beacon frame of the IBSS in pbFrames
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800524 eCSR_ROAM_RESULT_IBSS_NEW_PEER,
Jeff Johnson295189b2012-06-20 16:38:30 -0700525 //Peer departed from IBSS, Callback may get a pointer tSmeIbssPeerInd in pIbssPeerInd
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800526 eCSR_ROAM_RESULT_IBSS_PEER_DEPARTED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700527 //Coalescing in the IBSS network (joined an IBSS network)
528 //Callback pass a BSSID in peerMacOrBssid
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800529 eCSR_ROAM_RESULT_IBSS_COALESCED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700530 //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 -0800531 eCSR_ROAM_RESULT_IBSS_STOP,
532 eCSR_ROAM_RESULT_LOSTLINK,
Jeff Johnson295189b2012-06-20 16:38:30 -0700533 eCSR_ROAM_RESULT_MIC_ERROR_UNICAST,
534 eCSR_ROAM_RESULT_MIC_ERROR_GROUP,
535 eCSR_ROAM_RESULT_AUTHENTICATED,
536 eCSR_ROAM_RESULT_NEW_RSN_BSS,
537#ifdef FEATURE_WLAN_WAPI
538 eCSR_ROAM_RESULT_NEW_WAPI_BSS,
539#endif /* FEATURE_WLAN_WAPI */
540 // WDS started successfully
541 eCSR_ROAM_RESULT_WDS_STARTED,
542 // WDS start failed
543 eCSR_ROAM_RESULT_WDS_START_FAILED,
544 // WDS stopped
545 eCSR_ROAM_RESULT_WDS_STOPPED,
546 // WDS joined successfully in STA mode
547 eCSR_ROAM_RESULT_WDS_ASSOCIATED,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800548 // A station joined WDS AP
Jeff Johnson295189b2012-06-20 16:38:30 -0700549 eCSR_ROAM_RESULT_WDS_ASSOCIATION_IND,
550 // WDS join failed in STA mode
551 eCSR_ROAM_RESULT_WDS_NOT_ASSOCIATED,
552 // WDS disassociated
553 eCSR_ROAM_RESULT_WDS_DISASSOCIATED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700554 // INFRA started successfully
555 eCSR_ROAM_RESULT_INFRA_STARTED,
556 // INFRA start failed
557 eCSR_ROAM_RESULT_INFRA_START_FAILED,
558 // INFRA stopped
559 eCSR_ROAM_RESULT_INFRA_STOPPED,
560 // A station joining INFRA AP
561 eCSR_ROAM_RESULT_INFRA_ASSOCIATION_IND,
562 // A station joined INFRA AP
563 eCSR_ROAM_RESULT_INFRA_ASSOCIATION_CNF,
564 // INFRA disassociated
565 eCSR_ROAM_RESULT_INFRA_DISASSOCIATED,
566 eCSR_ROAM_RESULT_WPS_PBC_PROBE_REQ_IND,
Jeff Johnson295189b2012-06-20 16:38:30 -0700567 eCSR_ROAM_RESULT_SEND_ACTION_FAIL,
Jeff Johnson295189b2012-06-20 16:38:30 -0700568 // peer rejected assoc because max assoc limit reached. callback gets pointer to peer
569 eCSR_ROAM_RESULT_MAX_ASSOC_EXCEEDED,
Jeff Johnsone7245742012-09-05 17:12:55 -0700570 //Assoc rejected due to concurrent session running on a different channel
571 eCSR_ROAM_RESULT_ASSOC_FAIL_CON_CHANNEL,
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800572#ifdef FEATURE_WLAN_TDLS
573 eCSR_ROAM_RESULT_ADD_TDLS_PEER,
Gopichand Nakkala681989c2013-03-06 22:27:48 -0800574 eCSR_ROAM_RESULT_UPDATE_TDLS_PEER,
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800575 eCSR_ROAM_RESULT_DELETE_TDLS_PEER,
Hoonki Leee6bfe942013-02-05 15:01:19 -0800576 eCSR_ROAM_RESULT_TEARDOWN_TDLS_PEER_IND,
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -0800577 eCSR_ROAM_RESULT_DELETE_ALL_TDLS_PEER_IND,
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +0530578 eCSR_ROAM_RESULT_LINK_ESTABLISH_REQ_RSP,
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800579#endif
580
Jeff Johnson295189b2012-06-20 16:38:30 -0700581}eCsrRoamResult;
582
583
584
585/*----------------------------------------------------------------------------
586 List of link quality indications HDD can receive from SME
587-----------------------------------------------------------------------------*/
588typedef enum
589{
590 eCSR_ROAM_LINK_QUAL_MIN_IND = -1,
591
592 eCSR_ROAM_LINK_QUAL_POOR_IND = 0, /* bad link */
593 eCSR_ROAM_LINK_QUAL_GOOD_IND = 1, /* acceptable for voice */
594 eCSR_ROAM_LINK_QUAL_VERY_GOOD_IND = 2, /* suitable for voice */
595 eCSR_ROAM_LINK_QUAL_EXCELLENT_IND = 3, /* suitable for voice */
596
597 eCSR_ROAM_LINK_QUAL_MAX_IND /* invalid value */
598
599} eCsrRoamLinkQualityInd;
600
601typedef enum
602{
603 eCSR_DISCONNECT_REASON_UNSPECIFIED = 0,
604 eCSR_DISCONNECT_REASON_MIC_ERROR,
605 eCSR_DISCONNECT_REASON_DISASSOC,
606 eCSR_DISCONNECT_REASON_DEAUTH,
607 eCSR_DISCONNECT_REASON_HANDOFF,
608 eCSR_DISCONNECT_REASON_IBSS_JOIN_FAILURE,
609 eCSR_DISCONNECT_REASON_IBSS_LEAVE,
610}eCsrRoamDisconnectReason;
611
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800612typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700613{
614 // Not associated in Infra or participating in an IBSS / Ad-hoc network.
615 eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED,
616 // Associated in an Infrastructure network.
617 eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED,
618 // Participating in an IBSS network though disconnected (no partner stations
619 // in the IBSS).
620 eCSR_ASSOC_STATE_TYPE_IBSS_DISCONNECTED,
621 // Participating in an IBSS network with partner stations also present
622 eCSR_ASSOC_STATE_TYPE_IBSS_CONNECTED,
623 // Participating in a WDS network in AP or STA mode but not connected yet
624 eCSR_ASSOC_STATE_TYPE_WDS_DISCONNECTED,
625 // Participating in a WDS network and connected peer to peer
626 eCSR_ASSOC_STATE_TYPE_WDS_CONNECTED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700627 // Participating in a Infra network in AP not yet in connected state
628 eCSR_ASSOC_STATE_TYPE_INFRA_DISCONNECTED,
629 // Participating in a Infra network and connected to a peer
630 eCSR_ASSOC_STATE_TYPE_INFRA_CONNECTED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700631
632}eCsrConnectState;
633
634
635// This parameter is no longer supported in the Profile. Need to set this in the global properties
636// for the adapter.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800637typedef enum eCSR_MEDIUM_ACCESS
Jeff Johnson295189b2012-06-20 16:38:30 -0700638{
639 eCSR_MEDIUM_ACCESS_AUTO = 0,
640 eCSR_MEDIUM_ACCESS_DCF,
641 eCSR_MEDIUM_ACCESS_eDCF,
642 eCSR_MEDIUM_ACCESS_HCF,
643
644 eCSR_MEDIUM_ACCESS_WMM_eDCF_802dot1p,
645 eCSR_MEDIUM_ACCESS_WMM_eDCF_DSCP,
646 eCSR_MEDIUM_ACCESS_WMM_eDCF_NoClassify,
647 eCSR_MEDIUM_ACCESS_11e_eDCF = eCSR_MEDIUM_ACCESS_eDCF,
648 eCSR_MEDIUM_ACCESS_11e_HCF = eCSR_MEDIUM_ACCESS_HCF,
649}eCsrMediaAccessType;
650
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800651typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700652{
653 eCSR_TX_RATE_AUTO = 0, // use rate adaption to determine Tx rate.
654
655 eCSR_TX_RATE_1Mbps = 0x00000001,
656 eCSR_TX_RATE_2Mbps = 0x00000002,
657 eCSR_TX_RATE_5_5Mbps = 0x00000004,
658 eCSR_TX_RATE_6Mbps = 0x00000008,
659 eCSR_TX_RATE_9Mbps = 0x00000010,
660 eCSR_TX_RATE_11Mbps = 0x00000020,
661 eCSR_TX_RATE_12Mbps = 0x00000040,
662 eCSR_TX_RATE_18Mbps = 0x00000080,
663 eCSR_TX_RATE_24Mbps = 0x00000100,
664 eCSR_TX_RATE_36Mbps = 0x00000200,
665 eCSR_TX_RATE_42Mbps = 0x00000400,
666 eCSR_TX_RATE_48Mbps = 0x00000800,
667 eCSR_TX_RATE_54Mbps = 0x00001000,
668 eCSR_TX_RATE_72Mbps = 0x00002000,
669 eCSR_TX_RATE_84Mbps = 0x00004000,
670 eCSR_TX_RATE_96Mbps = 0x00008000,
671 eCSR_TX_RATE_108Mbps = 0x00010000,
672 eCSR_TX_RATE_126Mbps = 0x00020000,
673 eCSR_TX_RATE_144Mbps = 0x00040000,
674 eCSR_TX_RATE_168Mbps = 0x00080000,
675 eCSR_TX_RATE_192Mbps = 0x00100000,
676 eCSR_TX_RATE_216Mbps = 0x00200000,
677 eCSR_TX_RATE_240Mbps = 0x00400000,
678
679}eCsrExposedTxRate;
680
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800681typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700682{
683 eCSR_OPERATING_CHANNEL_ALL = 0,
684 eCSR_OPERATING_CHANNEL_AUTO = eCSR_OPERATING_CHANNEL_ALL,
685 eCSR_OPERATING_CHANNEL_ANY = eCSR_OPERATING_CHANNEL_ALL,
686}eOperationChannel;
687
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800688typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700689{
690 eCSR_DOT11_FRAG_THRESH_AUTO = -1,
691 eCSR_DOT11_FRAG_THRESH_MIN = 256,
692 eCSR_DOT11_FRAG_THRESH_MAX = 2346,
693 eCSR_DOT11_FRAG_THRESH_DEFAULT = 2000
694}eCsrDot11FragThresh;
695
696
697//for channel bonding for ibss
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800698typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700699{
700 eCSR_CB_OFF = 0,
701 eCSR_CB_AUTO = 1,
702 eCSR_CB_DOWN = 2,
703 eCSR_CB_UP = 3,
704}eCsrCBChoice;
705
706//For channel bonding, the channel number gap is 4, either up or down. For both 11a and 11g mode.
707#define CSR_CB_CHANNEL_GAP 4
708#define CSR_CB_CENTER_CHANNEL_OFFSET 2
709#define CSR_MAX_24GHz_CHANNEL_NUMBER ( SIR_11B_CHANNEL_END )
Jeff Johnsone7245742012-09-05 17:12:55 -0700710#define CSR_MIN_5GHz_CHANNEL_NUMBER ( SIR_11A_CHANNEL_BEGIN )
711#define CSR_MAX_5GHz_CHANNEL_NUMBER ( SIR_11A_CHANNEL_END )
Jeff Johnson295189b2012-06-20 16:38:30 -0700712
713// WEP keysize (in bits)...
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800714typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700715{
716 eCSR_SECURITY_WEP_KEYSIZE_40 = 40, // 40 bit key + 24bit IV = 64bit WEP
717 eCSR_SECURITY_WEP_KEYSIZE_104 = 104, // 104bit key + 24bit IV = 128bit WEP
718
719 eCSR_SECURITY_WEP_KEYSIZE_MIN = eCSR_SECURITY_WEP_KEYSIZE_40,
720 eCSR_SECURITY_WEP_KEYSIZE_MAX = eCSR_SECURITY_WEP_KEYSIZE_104,
721 eCSR_SECURITY_WEP_KEYSIZE_MAX_BYTES = ( eCSR_SECURITY_WEP_KEYSIZE_MAX / 8 ),
722}eCsrWEPKeySize;
723
724
725// Possible values for the WEP static key ID...
726typedef enum
727{
728
729 eCSR_SECURITY_WEP_STATIC_KEY_ID_MIN = 0,
730 eCSR_SECURITY_WEP_STATIC_KEY_ID_MAX = 3,
731 eCSR_SECURITY_WEP_STATIC_KEY_ID_DEFAULT = 0,
732
733 eCSR_SECURITY_WEP_STATIC_KEY_ID_INVALID = -1,
734
735}eCsrWEPStaticKeyID;
736
Chet Lanctot186b5732013-03-18 10:26:30 -0700737// Two extra key indicies are used for the IGTK (which is used by BIP)
738#define CSR_MAX_NUM_KEY (eCSR_SECURITY_WEP_STATIC_KEY_ID_MAX + 2 + 1)
Jeff Johnson295189b2012-06-20 16:38:30 -0700739
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800740typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700741{
742 eCSR_SECURITY_SET_KEY_ACTION_NO_CHANGE,
743 eCSR_SECURITY_SET_KEY_ACTION_SET_KEY,
744 eCSR_SECURITY_SET_KEY_ACTION_DELETE_KEY,
745}eCsrSetKeyAction;
746
747typedef enum
748{
749 eCSR_BAND_ALL,
750 eCSR_BAND_24,
751 eCSR_BAND_5G,
752 eCSR_BAND_MAX,
753}eCsrBand;
754
755
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800756typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700757{
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800758 // Roaming because HDD requested for reassoc by changing one of the fields in
Jeff Johnson295189b2012-06-20 16:38:30 -0700759 // tCsrRoamModifyProfileFields. OR
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800760 // Roaming because SME requested for reassoc by changing one of the fields in
Jeff Johnson295189b2012-06-20 16:38:30 -0700761 // tCsrRoamModifyProfileFields.
762 eCsrRoamReasonStaCapabilityChanged,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800763 // Roaming because SME requested for reassoc to a different AP, as part of
Jeff Johnson295189b2012-06-20 16:38:30 -0700764 // inter AP handoff.
765 eCsrRoamReasonBetterAP,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800766 // Roaming because SME requested it as the link is lost - placeholder, will
Jeff Johnson295189b2012-06-20 16:38:30 -0700767 // clean it up once handoff code gets in
768 eCsrRoamReasonSmeIssuedForLostLink,
769
770}eCsrRoamReasonCodes;
771
772typedef enum
773{
774 eCsrRoamWmmAuto = 0,
775 eCsrRoamWmmQbssOnly = 1,
776 eCsrRoamWmmNoQos = 2,
777
778} eCsrRoamWmmUserModeType;
779
780typedef enum
781{
782 eCSR_REQUESTER_MIN = 0,
783 eCSR_DIAG,
784 eCSR_UMA_GAN,
785 eCSR_HDD
786} eCsrStatsRequesterType;
787
Agarwal Ashish6db9d532014-09-30 18:19:10 +0530788typedef enum
789{
790 INIT = 0,
791 REINIT,
792} driver_load_type;
793
Jeff Johnson295189b2012-06-20 16:38:30 -0700794typedef struct tagPmkidCandidateInfo
795{
796 tCsrBssid BSSID;
797 tANI_BOOLEAN preAuthSupported;
798}tPmkidCandidateInfo;
799
800typedef struct tagPmkidCacheInfo
801{
802 tCsrBssid BSSID;
803 tANI_U8 PMKID[CSR_RSN_PMKID_SIZE];
804}tPmkidCacheInfo;
805
806#ifdef FEATURE_WLAN_WAPI
807typedef struct tagBkidCandidateInfo
808{
809 tCsrBssid BSSID;
810 tANI_BOOLEAN preAuthSupported;
811}tBkidCandidateInfo;
812
813typedef struct tagBkidCacheInfo
814{
815 tCsrBssid BSSID;
816 tANI_U8 BKID[CSR_WAPI_BKID_SIZE];
817}tBkidCacheInfo;
818#endif /* FEATURE_WLAN_WAPI */
819
820typedef struct tagCsrKeys
821{
822 tANI_U8 KeyLength[ CSR_MAX_NUM_KEY ]; //Also use to indicate whether the key index is set
823 tANI_U8 KeyMaterial[ CSR_MAX_NUM_KEY ][ CSR_MAX_KEY_LEN ];
824 tANI_U8 defaultIndex;
825}tCsrKeys;
826
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800827/* Following are fields which are part of tCsrRoamConnectedProfile might need
Jeff Johnson295189b2012-06-20 16:38:30 -0700828 modification dynamically once STA is up & running and this could trigger
829 reassoc */
830typedef struct tagCsrRoamModifyProfileFields
831{
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800832 // during connect this specifies ACs U-APSD is to be setup
Jeff Johnson295189b2012-06-20 16:38:30 -0700833 // for (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored).
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800834 // During assoc response this COULD carry confirmation of what ACs U-APSD
Jeff Johnson295189b2012-06-20 16:38:30 -0700835 // got setup for. Later if an APP looking for APSD, SME-QoS might need to
836 // modify this field
837 tANI_U8 uapsd_mask;
838 // HDD might ask to modify this field
839 tANI_U16 listen_interval;
840}tCsrRoamModifyProfileFields;
841
842typedef struct tagCsrRoamProfile
843{
844 //For eCSR_BSS_TYPE_WDS_AP. There must be one SSID in SSIDs.
845 //For eCSR_BSS_TYPE_WDS_STA. There must be two SSIDs. Index 0 is the SSID of the WDS-AP
846 //that we need to join. Index 1 is the SSID for self BSS.
847 tCsrSSIDs SSIDs;
848 tCsrBSSIDs BSSIDs;
849 tANI_U32 phyMode; //this is a bit mask of all the needed phy mode defined in eCsrPhyMode
850 eCsrRoamBssType BSSType;
851
852 tCsrAuthList AuthType;
853 eCsrAuthType negotiatedAuthType;
854
855 tCsrEncryptionList EncryptionType;
856 //This field is for output only, not for input
857 eCsrEncryptionType negotiatedUCEncryptionType;
858
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800859 //eCSR_ENCRYPT_TYPE_ANY cannot be set in multicast encryption type. If caller doesn't case,
Jeff Johnson295189b2012-06-20 16:38:30 -0700860 //put all supported encryption types in here
861 tCsrEncryptionList mcEncryptionType;
862 //This field is for output only, not for input
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800863 eCsrEncryptionType negotiatedMCEncryptionType;
Jeff Johnson295189b2012-06-20 16:38:30 -0700864
Chet Lanctot186b5732013-03-18 10:26:30 -0700865#ifdef WLAN_FEATURE_11W
866 // Management Frame Protection
867 tANI_BOOLEAN MFPEnabled;
868 tANI_U8 MFPRequired;
869 tANI_U8 MFPCapable;
870#endif
871
Jeff Johnson295189b2012-06-20 16:38:30 -0700872 tCsrKeys Keys;
873 eCsrCBChoice CBMode; //up, down or auto
874 tCsrChannelInfo ChannelInfo;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800875 tANI_U8 operationChannel;
Jeff Johnson295189b2012-06-20 16:38:30 -0700876 tANI_U16 beaconInterval; //If this is 0, SME will fill in for caller.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800877 // during connect this specifies ACs U-APSD is to be setup
Jeff Johnson295189b2012-06-20 16:38:30 -0700878 // for (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored).
879 // During assoc response this COULD carry confirmation of what ACs U-APSD got setup for
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800880 tANI_U8 uapsd_mask;
Jeff Johnson295189b2012-06-20 16:38:30 -0700881 tANI_U32 nWPAReqIELength; //The byte count in the pWPAReqIE
882 tANI_U8 *pWPAReqIE; //If not null, it has the IE byte stream for WPA
883 tANI_U32 nRSNReqIELength; //The byte count in the pRSNReqIE
884 tANI_U8 *pRSNReqIE; //If not null, it has the IE byte stream for RSN
885#ifdef FEATURE_WLAN_WAPI
886 tANI_U32 nWAPIReqIELength; //The byte count in the pWAPIReqIE
887 tANI_U8 *pWAPIReqIE; //If not null, it has the IE byte stream for WAPI
888#endif /* FEATURE_WLAN_WAPI */
889
Agarwal Ashish4f616132013-12-30 23:32:50 +0530890 //The byte count in the pAddIE for scan (at the time of join)
891 tANI_U32 nAddIEScanLength;
892 /* Additional IE information.
893 * It has the IE byte stream for additional IE,
894 * which can be WSC IE and/or P2P IE
895 */
896 tANI_U8 addIEScan[SIR_MAC_MAX_IE_LENGTH+2]; //Additional IE information.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800897 tANI_U32 nAddIEAssocLength; //The byte count in the pAddIE for assoc
Jeff Johnson295189b2012-06-20 16:38:30 -0700898 tANI_U8 *pAddIEAssoc; //If not null, it has the IE byte stream for additional IE, which can be WSC IE and/or P2P IE
899
900 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN]; //it is ignored if [0] is 0.
901 /*WPS Association if true => auth and ecryption should be ignored*/
902 tANI_BOOLEAN bWPSAssociation;
Leela Venkata Kiran Kumar Reddy Chiralaf257bef2014-04-11 18:48:12 -0700903 tANI_BOOLEAN bOSENAssociation;
Jeff Johnson295189b2012-06-20 16:38:30 -0700904 tANI_U32 nWSCReqIELength; //The byte count in the pWSCReqIE
905 tANI_U8 *pWSCReqIE; //If not null, it has the IE byte stream for WSC
906
Jeff Johnson295189b2012-06-20 16:38:30 -0700907 tANI_U8 ieee80211d;
908 tANI_U8 privacy;
909 tANI_BOOLEAN fwdWPSPBCProbeReq;
910 tAniAuthType csr80211AuthType;
911 tANI_U32 dtimPeriod;
912 tANI_BOOLEAN ApUapsdEnable;
913 tANI_BOOLEAN protEnabled;
914 tANI_BOOLEAN obssProtEnabled;
915 tANI_U16 cfg_protection;
916 tANI_U8 wps_state;
Jeff Johnson295189b2012-06-20 16:38:30 -0700917
918#ifdef WLAN_FEATURE_VOWIFI_11R
919 tCsrMobilityDomainInfo MDID;
920#endif
921 tVOS_CON_MODE csrPersona;
922
923}tCsrRoamProfile;
924
925
926typedef struct tagCsrRoamConnectedProfile
927{
928 tSirMacSSid SSID;
929 tANI_BOOLEAN handoffPermitted;
930 tANI_BOOLEAN ssidHidden;
931 tCsrBssid bssid;
932 eCsrRoamBssType BSSType;
933 eCsrAuthType AuthType;
934 tCsrAuthList AuthInfo;
935 eCsrEncryptionType EncryptionType;
936 tCsrEncryptionList EncryptionInfo;
937 eCsrEncryptionType mcEncryptionType;
938 tCsrEncryptionList mcEncryptionInfo;
939 eCsrCBChoice CBMode; //up, down or auto
940 tANI_U8 operationChannel;
Jeff Johnsone7245742012-09-05 17:12:55 -0700941 tANI_U16 beaconInterval;
Jeff Johnson295189b2012-06-20 16:38:30 -0700942 tCsrKeys Keys;
943 // meaningless on connect. It's an OUT param from CSR's point of view
944 // During assoc response carries the ACM bit-mask i.e. what
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800945 // ACs have ACM=1 (if any),
Jeff Johnson295189b2012-06-20 16:38:30 -0700946 // (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored)
947 tANI_U8 acm_mask;
948 tCsrRoamModifyProfileFields modifyProfileFields;
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700949 tANI_U32 nAddIEAssocLength; //The byte count in the pAddIE for assoc
950 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 -0800951
952 tSirBssDescription *pBssDesc;
Jeff Johnson295189b2012-06-20 16:38:30 -0700953 tANI_BOOLEAN qap; //AP supports QoS
954 tANI_BOOLEAN qosConnection; //A connection is QoS enabled
955#ifdef WLAN_FEATURE_VOWIFI_11R
956 tCsrMobilityDomainInfo MDID;
957#endif
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800958
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800959#ifdef FEATURE_WLAN_ESE
960 tCsrEseCckmInfo eseCckmInfo;
961 tANI_BOOLEAN isESEAssoc;
Jeff Johnson295189b2012-06-20 16:38:30 -0700962#endif
Gopichand Nakkaladacbcb52013-04-18 16:41:54 +0530963 tANI_U32 dot11Mode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700964}tCsrRoamConnectedProfile;
965
966
967#ifdef WLAN_FEATURE_VOWIFI_11R
968typedef struct tagCsr11rConfigParams
969{
970 tANI_BOOLEAN IsFTResourceReqSupported;
971} tCsr11rConfigParams;
972#endif
973
974#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
975typedef struct tagCsrNeighborRoamConfigParams
976{
977
978 tANI_U32 nNeighborScanTimerPeriod;
979 tANI_U8 nNeighborLookupRssiThreshold;
980 tANI_U8 nNeighborReassocRssiThreshold;
981 tANI_U16 nNeighborScanMinChanTime;
982 tANI_U16 nNeighborScanMaxChanTime;
983 sCsrChannel neighborScanChanList;
984 tANI_U8 nMaxNeighborRetries;
985 tANI_U16 nNeighborResultsRefreshPeriod;
Srinivas Girigowdade697412013-02-14 16:31:48 -0800986 tANI_U16 nEmptyScanRefreshPeriod;
Mukul Sharmad49b3d62014-09-02 01:45:32 +0530987 tANI_U8 nNeighborInitialForcedRoamTo5GhEnable;
Jeff Johnson295189b2012-06-20 16:38:30 -0700988}tCsrNeighborRoamConfigParams;
989#endif
990
991typedef struct tagCsrConfigParam
992{
993 tANI_U32 FragmentationThreshold;
Jeff Johnsone7245742012-09-05 17:12:55 -0700994 tANI_U32 channelBondingMode24GHz; // keep this tANI_U32. This gets converted to ePhyChannelBondState
995 tANI_U32 channelBondingMode5GHz; // in csrChangeDefaultConfigParam using convertCBIniValueToPhyCBState
Jeff Johnson295189b2012-06-20 16:38:30 -0700996 eCsrPhyMode phyMode;
997 eCsrBand eBand;
998 tANI_U32 RTSThreshold;
999 tANI_U32 HeartbeatThresh50;
1000 tANI_U32 HeartbeatThresh24;
1001 eCsrCBChoice cbChoice;
1002 eCsrBand bandCapability; //indicate hw capability
1003 tANI_U32 bgScanInterval;
1004 tANI_U16 TxRate;
1005 eCsrRoamWmmUserModeType WMMSupportMode;
1006 tANI_BOOLEAN Is11eSupportEnabled;
1007 tANI_BOOLEAN Is11dSupportEnabled;
1008 tANI_BOOLEAN Is11dSupportEnabledOriginal;
1009 tANI_BOOLEAN Is11hSupportEnabled;
1010 tANI_BOOLEAN shortSlotTime;
1011 tANI_BOOLEAN ProprietaryRatesEnabled;
1012 tANI_U8 AdHocChannel24;
1013 tANI_U8 AdHocChannel5G;
1014 tANI_U32 impsSleepTime; //in units of seconds
1015 tANI_U32 nScanResultAgeCount; //this number minus one is the number of times a scan doesn't find it before it is removed
1016 tANI_U32 scanAgeTimeNCNPS; //scan result aging time threshold when Not-Connect-No-Power-Save, in seconds
1017 tANI_U32 scanAgeTimeNCPS; //scan result aging time threshold when Not-Connect-Power-Save, in seconds
1018 tANI_U32 scanAgeTimeCNPS; //scan result aging time threshold when Connect-No-Power-Save, in seconds,
1019 tANI_U32 scanAgeTimeCPS; //scan result aging time threshold when Connect-Power-Savein seconds
1020 tANI_U32 nRoamingTime; //In seconds, CSR will try this long before gives up. 0 means no roaming
1021 tANI_U8 bCatRssiOffset; //to set the RSSI difference for each category
1022 tANI_U8 fEnableMCCMode; //to set MCC Enable/Disable mode
Mohit Khanna7ed53f02012-09-11 17:52:10 -07001023 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
1024 //at the moment, this flag is provided only to pass Wi-Fi Cert. 5.1.12
Jeff Johnson295189b2012-06-20 16:38:30 -07001025 tCsr11dinfo Csr11dinfo;
1026 //Whether to limit the channels to the ones set in Csr11dInfo. If true, the opertaional
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001027 //channels are limited to the default channel list. It is an "AND" operation between the
Jeff Johnson295189b2012-06-20 16:38:30 -07001028 //default channels and the channels in the 802.11d IE.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001029 tANI_BOOLEAN fEnforce11dChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -07001030 //Country Code Priority
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001031 //0 = 802.11D > Country IOCTL > NV
Jeff Johnson295189b2012-06-20 16:38:30 -07001032 //1 = Country IOCTL > 802.11D > NV
1033 tANI_BOOLEAN fSupplicantCountryCodeHasPriority;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001034 //When true, AP with unknown country code won't be see.
1035 //"Unknown country code" means either Ap doesn't have 11d IE or we cannot
1036 //find a domain for the country code in its 11d IE.
1037 tANI_BOOLEAN fEnforceCountryCodeMatch;
Jeff Johnson295189b2012-06-20 16:38:30 -07001038 //When true, only APs in the default domain can be seen. If the Ap has "unknown country
1039 //code", or the domain of the country code doesn't match the default domain, the Ap is
1040 //not acceptable.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001041 tANI_BOOLEAN fEnforceDefaultDomain;
Jeff Johnson295189b2012-06-20 16:38:30 -07001042
1043 tANI_U16 vccRssiThreshold;
1044 tANI_U32 vccUlMacLossThreshold;
1045
1046 tANI_U32 nPassiveMinChnTime; //in units of milliseconds
1047 tANI_U32 nPassiveMaxChnTime; //in units of milliseconds
1048 tANI_U32 nActiveMinChnTime; //in units of milliseconds
1049 tANI_U32 nActiveMaxChnTime; //in units of milliseconds
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001050
c_hpothu059edb02014-03-12 21:44:28 +05301051 tANI_U32 nInitialDwellTime; //in units of milliseconds
1052
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001053 tANI_U32 nActiveMinChnTimeBtc; //in units of milliseconds
1054 tANI_U32 nActiveMaxChnTimeBtc; //in units of milliseconds
Kiran Kumar Lokere458d7322013-05-29 14:29:43 -07001055 tANI_U32 disableAggWithBtc;
Madan Mohan Koyyalamudi4ff9cd62012-10-30 17:48:57 -07001056#ifdef WLAN_AP_STA_CONCURRENCY
1057 tANI_U32 nPassiveMinChnTimeConc; //in units of milliseconds
1058 tANI_U32 nPassiveMaxChnTimeConc; //in units of milliseconds
1059 tANI_U32 nActiveMinChnTimeConc; //in units of milliseconds
1060 tANI_U32 nActiveMaxChnTimeConc; //in units of milliseconds
1061 tANI_U32 nRestTimeConc; //in units of milliseconds
Sudhir Sattayappa Kohallieb97d502013-05-22 23:16:42 -07001062 tANI_U8 nNumStaChanCombinedConc; //number of channels combined for
1063 //STA in each split scan operation
1064 tANI_U8 nNumP2PChanCombinedConc; //number of channels combined for
1065 //P2P in each split scan operation
Madan Mohan Koyyalamudi4ff9cd62012-10-30 17:48:57 -07001066#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001067
1068 tANI_BOOLEAN IsIdleScanEnabled;
1069 //in dBm, the maximum TX power
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001070 //The actual TX power is the lesser of this value and 11d.
Jeff Johnson295189b2012-06-20 16:38:30 -07001071 //If 11d is disable, the lesser of this and default setting.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001072 tANI_U8 nTxPowerCap;
Jeff Johnson295189b2012-06-20 16:38:30 -07001073 tANI_U32 statsReqPeriodicity; //stats request frequency from PE while in full power
1074 tANI_U32 statsReqPeriodicityInPS;//stats request frequency from PE while in power save
1075#ifdef WLAN_FEATURE_VOWIFI_11R
1076 tCsr11rConfigParams csr11rConfig;
1077#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001078#ifdef FEATURE_WLAN_ESE
1079 tANI_U8 isEseIniFeatureEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -07001080#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001081#ifdef FEATURE_WLAN_LFR
1082 tANI_U8 isFastRoamIniFeatureEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08001083 tANI_U8 MAWCEnabled;
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001084#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001085
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001086#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -07001087 tANI_U8 isFastTransitionEnabled;
1088 tANI_U8 RoamRssiDiff;
1089 tANI_U8 nImmediateRoamRssiDiff;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07001090 tANI_BOOLEAN isWESModeEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -07001091#endif
1092
1093#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
1094 tCsrNeighborRoamConfigParams neighborRoamConfig;
1095#endif
1096
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001097 /* Instead of Reassoc, send ADDTS/DELTS even when ACM is off for that AC
Jeff Johnson295189b2012-06-20 16:38:30 -07001098 * This is mandated by WMM-AC certification */
1099 tANI_BOOLEAN addTSWhenACMIsOff;
1100
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001101
1102 /*channelPowerInfoList24 has been seen corrupted. Set this flag to true trying to
Jeff Johnson295189b2012-06-20 16:38:30 -07001103 * detect when it happens. Adding this into code because we can't reproduce it easily.
1104 * We don't know when it happens. */
1105 tANI_BOOLEAN fValidateList;
1106
1107 /*Customer wants to start with an active scan based on the default country code.
1108 * This optimization will minimize the driver load to association time.
1109 * Based on this flag we will bypass the initial passive scan needed for 11d
1110 * to determine the country code & domain */
1111 tANI_BOOLEAN fEnableBypass11d;
1112
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001113 /*Customer wants to optimize the scan time. Avoiding scans(passive) on DFS
1114 * channels while swipping through both bands can save some time
Jeff Johnson295189b2012-06-20 16:38:30 -07001115 * (apprx 1.3 sec) */
1116 tANI_BOOLEAN fEnableDFSChnlScan;
1117
1118 //To enable/disable scanning 2.4Ghz channels twice on a single scan request from HDD
1119 tANI_BOOLEAN fScanTwice;
Jeff Johnsone7245742012-09-05 17:12:55 -07001120#ifdef WLAN_FEATURE_11AC
Ravi Joshi83bfaa12013-05-28 22:12:08 -07001121 tANI_U32 nVhtChannelWidth;
1122 tANI_U8 enableTxBF;
1123 tANI_U8 txBFCsnValue;
1124 tANI_BOOLEAN enableVhtFor24GHz;
Abhishek Singh6d5d29c2014-07-03 14:25:22 +05301125 tANI_U8 enableMuBformee;
Jeff Johnsone7245742012-09-05 17:12:55 -07001126#endif
1127
1128 /*
1129 * To enable/disable scanning only 2.4Ghz channels on first scan
1130 */
1131 tANI_BOOLEAN fFirstScanOnly2GChnl;
Jeff Johnson295189b2012-06-20 16:38:30 -07001132
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001133#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08001134 tANI_BOOLEAN nRoamPrefer5GHz;
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07001135 tANI_BOOLEAN nRoamIntraBand;
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07001136 tANI_U8 nProbes;
1137 tANI_U16 nRoamScanHomeAwayTime;
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -08001138
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001139#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1140 tANI_BOOLEAN isRoamOffloadScanEnabled;
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07001141 tANI_BOOLEAN bFastRoamInConIniFeatureEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001142#endif
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07001143#endif
1144
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001145
Sandeep Puligilla2b6dc632012-12-17 14:44:16 -08001146 tANI_U8 scanCfgAgingTime;
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -08001147
1148 tANI_U8 enableTxLdpc;
krunal soni4f087d22013-07-29 16:32:26 -07001149
krunal soni5afa96c2013-09-06 22:19:02 -07001150 tANI_U8 isAmsduSupportInAMPDU;
Srinivas Girigowda41c7c5f2013-10-21 19:01:38 -07001151 tANI_U8 nSelect5GHzMargin;
krunal soni5afa96c2013-09-06 22:19:02 -07001152
krunal sonie9002db2013-11-25 14:24:17 -08001153 tANI_U8 isCoalesingInIBSSAllowed;
Sandeep Puligillac80f26e2014-03-11 18:36:10 +05301154 tANI_U8 allowDFSChannelRoam;
c_hpothu0d5a7352014-03-22 12:30:25 +05301155 tANI_BOOLEAN initialScanSkipDFSCh;
Abhishek Singhde51a412014-05-20 19:17:26 +05301156 tANI_BOOLEAN sendDeauthBeforeCon;
Peng Xu2446a892014-09-05 17:21:18 +05301157
1158 eCsrBand scanBandPreference;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001159}tCsrConfigParam;
Jeff Johnson295189b2012-06-20 16:38:30 -07001160
1161//Tush
1162typedef struct tagCsrUpdateConfigParam
1163{
1164 tCsr11dinfo Csr11dinfo;
1165}tCsrUpdateConfigParam;
1166
1167typedef struct tagCsrRoamInfo
1168{
1169 tCsrRoamProfile *pProfile; //may be NULL
1170 tSirBssDescription *pBssDesc; //May be NULL
1171 tANI_U32 nBeaconLength; //the length, in bytes, of the beacon frame, can be 0
1172 tANI_U32 nAssocReqLength; //the length, in bytes, of the assoc req frame, can be 0
1173 tANI_U32 nAssocRspLength; //The length, in bytes, of the assoc rsp frame, can be 0
1174 tANI_U32 nFrameLength;
1175 tANI_U8 frameType;
1176 tANI_U8 *pbFrames; //Point to a buffer contain the beacon, assoc req, assoc rsp frame, in that order
1177 //user needs to use nBeaconLength, nAssocReqLength, nAssocRspLength to desice where
1178 //each frame starts and ends.
1179 tANI_BOOLEAN fReassocReq; //set to true if for re-association
1180 tANI_BOOLEAN fReassocRsp; //set to true if for re-association
1181 tCsrBssid bssid;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001182 //Only valid in IBSS
Jeff Johnson295189b2012-06-20 16:38:30 -07001183 //this is the peers MAC address for eCSR_ROAM_RESULT_IBSS_NEW_PEER or PEER_DEPARTED
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001184 tCsrBssid peerMac;
Jeff Johnson295189b2012-06-20 16:38:30 -07001185 tSirResultCodes statusCode;
1186 tANI_U32 reasonCode; //this could be our own defined or sent from the other BSS(per 802.11 spec)
1187 tANI_U8 staId; // Peer stationId when connected
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001188 /*The DPU signatures will be sent eventually to TL to help it determine the
Jeff Johnson295189b2012-06-20 16:38:30 -07001189 association to which a packet belongs to*/
1190 /*Unicast DPU signature*/
1191 tANI_U8 ucastSig;
1192
1193 /*Broadcast DPU signature*/
1194 tANI_U8 bcastSig;
1195
1196 tANI_BOOLEAN fAuthRequired; //FALSE means auth needed from supplicant. TRUE means authenticated(static WEP, open)
1197 tANI_U8 sessionId;
1198 tANI_U8 rsnIELen;
1199 tANI_U8 *prsnIE;
1200
1201 tANI_U8 addIELen;
1202 tANI_U8 *paddIE;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001203
Jeff Johnson295189b2012-06-20 16:38:30 -07001204 union
1205 {
1206 tSirMicFailureInfo *pMICFailureInfo;
1207 tCsrRoamConnectedProfile *pConnectedProfile;
Jeff Johnson295189b2012-06-20 16:38:30 -07001208 tSirWPSPBCProbeReq *pWPSPBCProbeReq;
Jeff Johnson295189b2012-06-20 16:38:30 -07001209 } u;
1210
Jeff Johnson295189b2012-06-20 16:38:30 -07001211 tANI_BOOLEAN wmmEnabledSta; //set to true if WMM enabled STA
1212 tANI_U32 dtimPeriod;
Jeff Johnson295189b2012-06-20 16:38:30 -07001213
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001214#ifdef FEATURE_WLAN_ESE
1215 tANI_BOOLEAN isESEAssoc;
1216#ifdef FEATURE_WLAN_ESE_UPLOAD
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001217 tSirTsmIE tsmIe;
1218 tANI_U32 timestamp[2];
1219 tANI_U16 tsmRoamDelay;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001220 tSirEseBcnReportRsp *pEseBcnReportRsp;
1221#endif /* FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -07001222#endif
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001223 void* pRemainCtx;
Jeff Johnson295189b2012-06-20 16:38:30 -07001224 tANI_U32 rxChan;
Jeff Johnson295189b2012-06-20 16:38:30 -07001225
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001226#ifdef FEATURE_WLAN_TDLS
1227 tANI_U8 staType;
1228#endif
1229
Jeff Johnson295189b2012-06-20 16:38:30 -07001230 // Required for indicating the frames to upper layer
1231 tANI_U32 beaconLength;
1232 tANI_U8* beaconPtr;
1233 tANI_U32 assocReqLength;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001234 tANI_U8* assocReqPtr;
Chilam NG571c65a2013-01-19 12:27:36 +05301235
1236 tANI_S8 rxRssi;
c_hpothu44ff4e02014-05-08 00:13:57 +05301237 tANI_U32 maxRateFlags;
Jeff Johnson295189b2012-06-20 16:38:30 -07001238}tCsrRoamInfo;
1239
Jeff Johnson295189b2012-06-20 16:38:30 -07001240typedef struct tagCsrFreqScanInfo
1241{
1242 tANI_U32 nStartFreq; //in unit of MHz
1243 tANI_U32 nEndFreq; //in unit of MHz
1244 tSirScanType scanType;
1245}tCsrFreqScanInfo;
1246
1247
Jeff Johnson295189b2012-06-20 16:38:30 -07001248typedef struct sSirSmeAssocIndToUpperLayerCnf
1249{
1250 tANI_U16 messageType; // eWNI_SME_ASSOC_CNF
1251 tANI_U16 length;
1252 tANI_U8 sessionId;
1253 tSirResultCodes statusCode;
1254 tSirMacAddr bssId; // Self BSSID
1255 tSirMacAddr peerMacAddr;
1256 tANI_U16 aid;
1257 tSirMacAddr alternateBssId;
1258 tANI_U8 alternateChannelId;
1259 tANI_U8 wmmEnabledSta; //set to true if WMM enabled STA
1260 tSirRSNie rsnIE; // RSN IE received from peer
1261 tSirAddie addIE; // Additional IE received from peer, which can be WSC and/or P2P IE
1262 tANI_U8 reassocReq; //set to true if reassoc
1263} tSirSmeAssocIndToUpperLayerCnf, *tpSirSmeAssocIndToUpperLayerCnf;
Jeff Johnson295189b2012-06-20 16:38:30 -07001264
1265typedef struct tagCsrSummaryStatsInfo
1266{
1267 tANI_U32 retry_cnt[4];
1268 tANI_U32 multiple_retry_cnt[4];
1269 tANI_U32 tx_frm_cnt[4];
1270 //tANI_U32 num_rx_frm_crc_err; same as rx_error_cnt
1271 //tANI_U32 num_rx_frm_crc_ok; same as rx_frm_cnt
1272 tANI_U32 rx_frm_cnt;
1273 tANI_U32 frm_dup_cnt;
1274 tANI_U32 fail_cnt[4];
1275 tANI_U32 rts_fail_cnt;
1276 tANI_U32 ack_fail_cnt;
1277 tANI_U32 rts_succ_cnt;
1278 tANI_U32 rx_discard_cnt;
1279 tANI_U32 rx_error_cnt;
1280 tANI_U32 tx_byte_cnt;
1281
1282}tCsrSummaryStatsInfo;
1283
1284typedef struct tagCsrGlobalClassAStatsInfo
1285{
1286 tANI_U32 rx_frag_cnt;
1287 tANI_U32 promiscuous_rx_frag_cnt;
1288 //tANI_U32 rx_fcs_err;
1289 tANI_U32 rx_input_sensitivity;
1290 tANI_U32 max_pwr;
1291 //tANI_U32 default_pwr;
1292 tANI_U32 sync_fail_cnt;
1293 tANI_U32 tx_rate;
1294 //mcs index for HT20 and HT40 rates
1295 tANI_U32 mcs_index;
1296 //to defferentiate between HT20 and HT40 rates;short and long guard interval
1297 tANI_U32 tx_rate_flags;
1298
1299}tCsrGlobalClassAStatsInfo;
1300
1301typedef struct tagCsrGlobalClassBStatsInfo
1302{
1303 tANI_U32 uc_rx_wep_unencrypted_frm_cnt;
1304 tANI_U32 uc_rx_mic_fail_cnt;
1305 tANI_U32 uc_tkip_icv_err;
1306 tANI_U32 uc_aes_ccmp_format_err;
1307 tANI_U32 uc_aes_ccmp_replay_cnt;
1308 tANI_U32 uc_aes_ccmp_decrpt_err;
1309 tANI_U32 uc_wep_undecryptable_cnt;
1310 tANI_U32 uc_wep_icv_err;
1311 tANI_U32 uc_rx_decrypt_succ_cnt;
1312 tANI_U32 uc_rx_decrypt_fail_cnt;
1313 tANI_U32 mcbc_rx_wep_unencrypted_frm_cnt;
1314 tANI_U32 mcbc_rx_mic_fail_cnt;
1315 tANI_U32 mcbc_tkip_icv_err;
1316 tANI_U32 mcbc_aes_ccmp_format_err;
1317 tANI_U32 mcbc_aes_ccmp_replay_cnt;
1318 tANI_U32 mcbc_aes_ccmp_decrpt_err;
1319 tANI_U32 mcbc_wep_undecryptable_cnt;
1320 tANI_U32 mcbc_wep_icv_err;
1321 tANI_U32 mcbc_rx_decrypt_succ_cnt;
1322 tANI_U32 mcbc_rx_decrypt_fail_cnt;
1323
1324}tCsrGlobalClassBStatsInfo;
1325
1326typedef struct tagCsrGlobalClassCStatsInfo
1327{
1328 tANI_U32 rx_amsdu_cnt;
1329 tANI_U32 rx_ampdu_cnt;
1330 tANI_U32 tx_20_frm_cnt;
1331 tANI_U32 rx_20_frm_cnt;
1332 tANI_U32 rx_mpdu_in_ampdu_cnt;
1333 tANI_U32 ampdu_delimiter_crc_err;
1334
1335}tCsrGlobalClassCStatsInfo;
1336
1337typedef struct tagCsrGlobalClassDStatsInfo
1338{
1339 tANI_U32 tx_uc_frm_cnt;
1340 tANI_U32 tx_mc_frm_cnt;
1341 tANI_U32 tx_bc_frm_cnt;
1342 tANI_U32 rx_uc_frm_cnt;
1343 tANI_U32 rx_mc_frm_cnt;
1344 tANI_U32 rx_bc_frm_cnt;
1345 tANI_U32 tx_uc_byte_cnt[4];
1346 tANI_U32 tx_mc_byte_cnt;
1347 tANI_U32 tx_bc_byte_cnt;
1348 tANI_U32 rx_uc_byte_cnt[4];
1349 tANI_U32 rx_mc_byte_cnt;
1350 tANI_U32 rx_bc_byte_cnt;
1351 tANI_U32 rx_byte_cnt;
1352 tANI_U32 num_rx_bytes_crc_ok;
1353 tANI_U32 rx_rate;
1354
1355}tCsrGlobalClassDStatsInfo;
1356
1357typedef struct tagCsrPerStaStatsInfo
1358{
1359 tANI_U32 tx_frag_cnt[4];
1360 tANI_U32 tx_ampdu_cnt;
1361 tANI_U32 tx_mpdu_in_ampdu_cnt;
1362} tCsrPerStaStatsInfo;
1363
1364typedef struct tagCsrRoamSetKey
1365{
1366 eCsrEncryptionType encType;
1367 tAniKeyDirection keyDirection; //Tx, Rx or Tx-and-Rx
1368 tCsrBssid peerMac; //Peers MAC address. ALL 1's for group key
1369 tANI_U8 paeRole; //0 for supplicant
1370 tANI_U8 keyId; // Kye index
1371 tANI_U16 keyLength; //Number of bytes containing the key in pKey
1372 tANI_U8 Key[CSR_MAX_KEY_LEN];
1373 tANI_U8 keyRsc[CSR_MAX_RSC_LEN];
1374} tCsrRoamSetKey;
1375
1376typedef struct tagCsrRoamRemoveKey
1377{
1378 eCsrEncryptionType encType;
1379 tCsrBssid peerMac; //Peers MAC address. ALL 1's for group key
1380 tANI_U8 keyId; //key index
1381} tCsrRoamRemoveKey;
1382
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001383#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05301384
1385typedef struct tagCsrLinkEstablishParams
1386{
1387 tSirMacAddr peerMac;
1388 tANI_U8 uapsdQueues;
1389 tANI_U8 maxSp;
1390 tANI_U8 isBufSta;
Naresh Jayaramdff88f92014-02-12 21:44:29 +05301391 tANI_U8 isOffChannelSupported;
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05301392 tANI_U8 isResponder;
Naresh Jayaramdff88f92014-02-12 21:44:29 +05301393 tANI_U8 supportedChannelsLen;
1394 tANI_U8 supportedChannels[SIR_MAC_MAX_SUPP_CHANNELS];
1395 tANI_U8 supportedOperClassesLen;
1396 tANI_U8 supportedOperClasses[SIR_MAC_MAX_SUPP_OPER_CLASSES];
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05301397}tCsrTdlsLinkEstablishParams;
1398
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001399typedef struct tagCsrTdlsSendMgmt
1400{
1401 tSirMacAddr peerMac;
1402 tANI_U8 frameType;
1403 tANI_U8 dialog;
1404 tANI_U16 statusCode;
Hoonki Leea34dd892013-02-05 22:56:02 -08001405 tANI_U8 responder;
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05301406 tANI_U32 peerCapability;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001407 tANI_U8 *buf;
1408 tANI_U8 len;
1409
1410}tCsrTdlsSendMgmt;
1411
1412#ifdef FEATURE_WLAN_TDLS_INTERNAL
1413typedef struct tagCsrTdlsDisRequest
1414{
1415 tSirMacAddr peerMac;
1416 tANI_U8 disType;
1417}tCsrTdlsDisRequest;
1418
1419typedef struct tagCsrTdlsSetupRequest
1420{
1421 tSirMacAddr peerMac;
1422 tANI_U8 linkIndex;
1423}tCsrTdlsSetupRequest;
1424
1425typedef struct tagCsrTdlsTeardownRequest
1426{
1427 tSirMacAddr peerMac;
1428 tANI_U8 linkIndex;
1429}tCsrTdlsTeardownRequest ;
1430#endif
1431#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001432
1433typedef void * tScanResultHandle;
1434
1435#define CSR_INVALID_SCANRESULT_HANDLE (NULL)
1436
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07001437#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1438typedef struct tagCsrHandoffRequest
1439{
1440 tCsrBssid bssid;
1441 tANI_U8 channel;
1442}tCsrHandoffRequest;
1443#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001444
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001445#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
1446typedef struct tagCsrEseBeaconReqParams
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001447{
1448 tANI_U16 measurementToken;
1449 tANI_U8 channel;
1450 tANI_U8 scanMode;
1451 tANI_U16 measurementDuration;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001452} tCsrEseBeaconReqParams, *tpCsrEseBeaconReqParams;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001453
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001454typedef struct tagCsrEseBeaconReq
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001455{
1456 tANI_U8 numBcnReqIe;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001457 tCsrEseBeaconReqParams bcnReq[SIR_ESE_MAX_MEAS_IE_REQS];
1458} tCsrEseBeaconReq, *tpCsrEseBeaconReq;
1459#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -07001460
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +05301461struct tagCsrDelStaParams
1462{
1463 tCsrBssid peerMacAddr;
1464 u16 reason_code;
1465 u8 subtype;
1466};
1467
Jeff Johnson295189b2012-06-20 16:38:30 -07001468////////////////////////////////////////////Common SCAN starts
1469
1470//void *p2 -- the second context pass in for the caller
1471//***what if callback is called before requester gets the scanId??
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001472typedef eHalStatus (*csrScanCompleteCallback)(tHalHandle, void *p2, tANI_U32 scanID, eCsrScanStatus status);
Jeff Johnson295189b2012-06-20 16:38:30 -07001473
1474
1475
1476///////////////////////////////////////////Common Roam starts
1477
1478//pContext is the pContext passed in with the roam request
1479//pParam is a pointer to a tCsrRoamInfo, see definition of eRoamCmdStatus and
1480// eRoamCmdResult for detail valid members. It may be NULL
1481//roamId is to identify the callback related roam request. 0 means unsolicit
1482//roamStatus is a flag indicating the status of the callback
1483//roamResult is the result
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001484typedef eHalStatus (*csrRoamCompleteCallback)(void *pContext, tCsrRoamInfo *pParam, tANI_U32 roamId,
Jeff Johnson295189b2012-06-20 16:38:30 -07001485 eRoamCmdStatus roamStatus, eCsrRoamResult roamResult);
1486
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001487typedef eHalStatus (*csrRoamSessionCloseCallback)(void *pContext);
Jeff Johnson295189b2012-06-20 16:38:30 -07001488
1489/* ---------------------------------------------------------------------------
1490 \fn csrRoamGetNumPMKIDCache
1491 \brief return number of PMKID cache entries
1492 \return tANI_U32 - the number of PMKID cache entries
1493 -------------------------------------------------------------------------------*/
1494//tANI_U32 csrRoamGetNumPMKIDCache(tHalHandle hHal);
1495
1496/* ---------------------------------------------------------------------------
1497 \fn csrRoamGetPMKIDCache
1498 \brief return PMKID cache from CSR
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001499 \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 -07001500 needed or actually number in tPmkidCacheInfo.
1501 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if any, upon return
1502 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
1503 -------------------------------------------------------------------------------*/
1504//eHalStatus csrRoamGetPMKIDCache(tHalHandle hHal, tANI_U32 *pNum, tPmkidCacheInfo *pPmkidCache);
1505
1506//pProfile - pointer to tCsrRoamProfile
1507#define CSR_IS_START_IBSS(pProfile) (eCSR_BSS_TYPE_START_IBSS == (pProfile)->BSSType)
1508#define CSR_IS_JOIN_TO_IBSS(pProfile) (eCSR_BSS_TYPE_IBSS == (pProfile)->BSSType)
1509#define CSR_IS_IBSS(pProfile) ( CSR_IS_START_IBSS(pProfile) || CSR_IS_JOIN_TO_IBSS(pProfile) )
1510#define CSR_IS_INFRASTRUCTURE(pProfile) (eCSR_BSS_TYPE_INFRASTRUCTURE == (pProfile)->BSSType)
1511#define CSR_IS_ANY_BSS_TYPE(pProfile) (eCSR_BSS_TYPE_ANY == (pProfile)->BSSType)
1512#define CSR_IS_WDS_AP( pProfile ) ( eCSR_BSS_TYPE_WDS_AP == (pProfile)->BSSType )
1513#define CSR_IS_WDS_STA( pProfile ) ( eCSR_BSS_TYPE_WDS_STA == (pProfile)->BSSType )
1514#define CSR_IS_WDS( pProfile ) ( CSR_IS_WDS_AP( pProfile ) || CSR_IS_WDS_STA( pProfile ) )
Jeff Johnson295189b2012-06-20 16:38:30 -07001515#define CSR_IS_INFRA_AP( pProfile ) ( eCSR_BSS_TYPE_INFRA_AP == (pProfile)->BSSType )
Jeff Johnson295189b2012-06-20 16:38:30 -07001516
1517//pProfile - pointer to tCsrRoamConnectedProfile
Jeff Johnson295189b2012-06-20 16:38:30 -07001518#define CSR_IS_CONN_INFRA_AP( pProfile ) ( eCSR_BSS_TYPE_INFRA_AP == (pProfile)->BSSType )
Jeff Johnson295189b2012-06-20 16:38:30 -07001519#define CSR_IS_CONN_WDS_AP( pProfile ) ( eCSR_BSS_TYPE_WDS_AP == (pProfile)->BSSType )
1520#define CSR_IS_CONN_WDS_STA( pProfile ) ( eCSR_BSS_TYPE_WDS_STA == (pProfile)->BSSType )
1521#define CSR_IS_CONN_WDS( pProfile ) ( CSR_IS_WDS_AP( pProfile ) || CSR_IS_WDS_STA( pProfile ) )
1522
1523
1524
1525///////////////////////////////////////////Common Roam ends
1526
1527
Jeff Johnson295189b2012-06-20 16:38:30 -07001528/* ---------------------------------------------------------------------------
1529 \fn csrSetChannels
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001530 \brief HDD calls this function to change some global settings.
Jeff Johnson295189b2012-06-20 16:38:30 -07001531 caller must set the all fields or call csrGetConfigParam to prefill the fields.
1532 \param pParam - caller allocated memory
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001533 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001534 -------------------------------------------------------------------------------*/
1535
1536eHalStatus csrSetChannels(tHalHandle hHal, tCsrConfigParam *pParam );
1537
1538eHalStatus csrSetRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode);
Jeff Johnson295189b2012-06-20 16:38:30 -07001539
1540
1541//enum to string conversion for debug output
1542const char * get_eRoamCmdStatus_str(eRoamCmdStatus val);
1543const char * get_eCsrRoamResult_str(eCsrRoamResult val);
1544/* ---------------------------------------------------------------------------
1545 \fn csrSetPhyMode
1546 \brief HDD calls this function to set the phyMode.
1547 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1548 CSR.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001549 \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 -07001550 See eCsrPhyMode for definition
1551 \param eBand - specify the operational band (2.4, 5 or both)
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001552 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
Jeff Johnson295189b2012-06-20 16:38:30 -07001553 a restart is needed to apply the change
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001554 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001555 -------------------------------------------------------------------------------*/
1556eHalStatus csrSetPhyMode(tHalHandle hHal, tANI_U32 phyMode, eCsrBand eBand, tANI_BOOLEAN *pfRestartNeeded);
1557
1558void csrDumpInit(tHalHandle hHal);
1559
1560
1561/*---------------------------------------------------------------------------
1562 This is the type for a link quality callback to be registered with SME
1563 for indications
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001564 Once the link quality has been indicated, subsequently, link indications are
Jeff Johnson295189b2012-06-20 16:38:30 -07001565 posted each time there is a CHANGE in link quality.
1566 *** If there is no change in link, there will be no indication ***
1567
1568 The indications may be based on one or more criteria internal to SME
1569 such as RSSI and PER.
1570
1571 \param ind - Indication being posted
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001572 \param pContext - any user data given at callback registration.
Jeff Johnson295189b2012-06-20 16:38:30 -07001573 \return None
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001574
Jeff Johnson295189b2012-06-20 16:38:30 -07001575---------------------------------------------------------------------------*/
1576typedef void (* csrRoamLinkQualityIndCallback)
1577 (eCsrRoamLinkQualityInd ind, void *pContext);
1578
1579
1580/*---------------------------------------------------------------------------
1581 This is the type for a statistics callback to be registered with SME
1582 for stats reporting
1583
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001584 Since the client requesting for the stats already know which class/type of
1585 stats it asked for, the callback will carry them in the rsp buffer
1586 (void * stats) whose size will be same as the size of requested stats &
Jeff Johnson295189b2012-06-20 16:38:30 -07001587 will be exactly in the same order requested in the stats mask from LSB to MSB
1588
1589 \param stats - stats rsp buffer sent back with the report
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001590 \param pContext - any user data given at callback registration.
Jeff Johnson295189b2012-06-20 16:38:30 -07001591 \return None
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001592
Jeff Johnson295189b2012-06-20 16:38:30 -07001593---------------------------------------------------------------------------*/
1594typedef void ( *tCsrStatsCallback) (void * stats, void *pContext);
1595
1596/*---------------------------------------------------------------------------
1597 This is the type for a rssi callback to be registered with SME
1598 for getting rssi
1599
1600 \param rssi - rssi
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001601 \param pContext - any user data given at callback registration.
Jeff Johnson295189b2012-06-20 16:38:30 -07001602 \return None
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001603
Jeff Johnson295189b2012-06-20 16:38:30 -07001604---------------------------------------------------------------------------*/
1605
1606typedef void ( *tCsrRssiCallback) (v_S7_t rssi, tANI_U32 staId, void *pContext);
1607
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001608
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001609#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001610/*---------------------------------------------------------------------------
1611 This is the type for a tsm stats callback to be registered with SME
1612 for getting tsm stats
1613
1614 \param tsmMetrics - tsmMetrics
1615 \param pContext - any user data given at callback registration.
1616 \return None
1617
1618---------------------------------------------------------------------------*/
1619
1620typedef void ( *tCsrTsmStatsCallback) (tAniTrafStrmMetrics tsmMetrics, tANI_U32 staId, void *pContext);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001621#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001622
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05301623/*---------------------------------------------------------------------------
1624 This is the type for a snr callback to be registered with SME
1625 for getting snr
1626
1627 \param snr
1628 \param pContext - any user data given at callback registration.
1629 \return None
1630
1631---------------------------------------------------------------------------*/
1632typedef void (*tCsrSnrCallback) (v_S7_t snr, tANI_U32 staId, void *pContext);
1633
Jeff Johnson295189b2012-06-20 16:38:30 -07001634#ifdef WLAN_FEATURE_VOWIFI_11R
1635eHalStatus csrRoamIssueFTPreauthReq(tHalHandle hHal, tANI_U32 sessionId, tpSirBssDescription pBssDescription);
1636#endif
1637
1638/*---------------------------------------------------------------------------
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001639 This is the function to change the Band configuraiton (ALL/2.4 GHZ/5 GHZ)
Jeff Johnson295189b2012-06-20 16:38:30 -07001640
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001641 \param hHal - handle to Hal context
Jeff Johnson295189b2012-06-20 16:38:30 -07001642 \param eBand - band value
1643 \return eHalStatus
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001644
Jeff Johnson295189b2012-06-20 16:38:30 -07001645---------------------------------------------------------------------------*/
1646eHalStatus csrSetBand(tHalHandle hHal, eCsrBand eBand);
1647
1648/*---------------------------------------------------------------------------
1649 This is the function to get the current operating band value
1650 \param hHal - handl to Hal context
1651 \return eCsrband - band value
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001652
Jeff Johnson295189b2012-06-20 16:38:30 -07001653---------------------------------------------------------------------------*/
1654eCsrBand csrGetCurrentBand (tHalHandle hHal);
1655
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301656
Jeff Johnson295189b2012-06-20 16:38:30 -07001657#endif
1658