blob: f882c69e91c734426e1461b26c5345881c0652b4 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Gopichand Nakkala9c070ad2013-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 Lokere30b07722013-02-24 22:21:28 -080042/** ------------------------------------------------------------------------- *
43 ------------------------------------------------------------------------- *
Jeff Johnson295189b2012-06-20 16:38:30 -070044 \file csrApi.h
Kiran Kumar Lokere30b07722013-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 Lokere30b07722013-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 Lokere30b07722013-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 */
84 eCSR_NUM_OF_SUPPORT_AUTH_TYPE,
85 eCSR_AUTH_TYPE_FAILED = 0xff,
86 eCSR_AUTH_TYPE_UNKNOWN = eCSR_AUTH_TYPE_FAILED,
87
88}eCsrAuthType;
89
90
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -080091typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -070092{
93 eCSR_ENCRYPT_TYPE_NONE,
94 eCSR_ENCRYPT_TYPE_WEP40_STATICKEY,
95 eCSR_ENCRYPT_TYPE_WEP104_STATICKEY,
96
97 eCSR_ENCRYPT_TYPE_WEP40,
98 eCSR_ENCRYPT_TYPE_WEP104,
99 eCSR_ENCRYPT_TYPE_TKIP,
100 eCSR_ENCRYPT_TYPE_AES,
101#ifdef FEATURE_WLAN_WAPI
102 eCSR_ENCRYPT_TYPE_WPI, //WAPI
103#endif /* FEATURE_WLAN_WAPI */
104#ifdef FEATURE_WLAN_CCX
105 eCSR_ENCRYPT_TYPE_KRK,
106#endif /* FEATURE_WLAN_CCX */
107#ifdef WLAN_FEATURE_11W
108 //11w BIP
109 eCSR_ENCRYPT_TYPE_AES_CMAC,
110#endif
111 eCSR_ENCRYPT_TYPE_ANY,
112 eCSR_NUM_OF_ENCRYPT_TYPE = eCSR_ENCRYPT_TYPE_ANY,
113
114 eCSR_ENCRYPT_TYPE_FAILED = 0xff,
115 eCSR_ENCRYPT_TYPE_UNKNOWN = eCSR_ENCRYPT_TYPE_FAILED,
116
117}eCsrEncryptionType;
118
119/*---------------------------------------------------------------------------
120 Enumeration of the various Security types
121---------------------------------------------------------------------------*/
122typedef enum
123{
124 eCSR_SECURITY_TYPE_WPA,
125 eCSR_SECURITY_TYPE_RSN,
126#ifdef FEATURE_WLAN_WAPI
127 eCSR_SECURITY_TYPE_WAPI,
128#endif /* FEATURE_WLAN_WAPI */
129 eCSR_SECURITY_TYPE_UNKNOWN,
130
131}eCsrSecurityType;
132
133typedef enum
134{
135 eCSR_DOT11_MODE_TAURUS = 0, //This mean everything because it covers all thing we support
136 eCSR_DOT11_MODE_abg = 0x0001, //11a/b/g only, no HT, no proprietary
137 eCSR_DOT11_MODE_11a = 0x0002,
138 eCSR_DOT11_MODE_11b = 0x0004,
139 eCSR_DOT11_MODE_11g = 0x0008,
140 eCSR_DOT11_MODE_11n = 0x0010,
141 eCSR_DOT11_MODE_POLARIS = 0x0020,
142 eCSR_DOT11_MODE_TITAN = 0x0040,
143 eCSR_DOT11_MODE_11g_ONLY = 0x0080,
144 eCSR_DOT11_MODE_11n_ONLY = 0x0100,
145 eCSR_DOT11_MODE_TAURUS_ONLY = 0x0200,
146 eCSR_DOT11_MODE_11b_ONLY = 0x0400,
147 eCSR_DOT11_MODE_11a_ONLY = 0x0800,
Jeff Johnsone7245742012-09-05 17:12:55 -0700148#ifdef WLAN_FEATURE_11AC
149 eCSR_DOT11_MODE_11ac = 0x1000,
150 eCSR_DOT11_MODE_11ac_ONLY = 0x2000,
151#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700152 //This is for WIFI test. It is same as eWNIAPI_MAC_PROTOCOL_ALL except when it starts IBSS in 11B of 2.4GHz
153 //It is for CSR internal use
Jeff Johnsone7245742012-09-05 17:12:55 -0700154 eCSR_DOT11_MODE_AUTO = 0x4000,
Jeff Johnson295189b2012-06-20 16:38:30 -0700155
156 eCSR_NUM_PHY_MODE = 16, //specify the number of maximum bits for phyMode
157}eCsrPhyMode;
158
159
160typedef tANI_U8 tCsrBssid[WNI_CFG_BSSID_LEN];
161
162typedef enum
163{
164 eCSR_BSS_TYPE_INFRASTRUCTURE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700165 eCSR_BSS_TYPE_INFRA_AP, // SoftAP AP
Jeff Johnson295189b2012-06-20 16:38:30 -0700166 eCSR_BSS_TYPE_IBSS, // an IBSS network we will NOT start
167 eCSR_BSS_TYPE_START_IBSS, // an IBSS network we will start if no partners detected.
168 eCSR_BSS_TYPE_WDS_AP, // BT-AMP AP
169 eCSR_BSS_TYPE_WDS_STA, // BT-AMP station
170 eCSR_BSS_TYPE_ANY, // any BSS type (IBSS or Infrastructure).
171}eCsrRoamBssType;
172
173
174
175typedef enum {
176 eCSR_SCAN_REQUEST_11D_SCAN = 1,
177 eCSR_SCAN_REQUEST_FULL_SCAN,
178 eCSR_SCAN_IDLE_MODE_SCAN,
179 eCSR_SCAN_HO_BG_SCAN, // bg scan request in NRT & RT Handoff sub-states
180 eCSR_SCAN_HO_PROBE_SCAN, // directed probe on an entry from the candidate list
181 eCSR_SCAN_HO_NT_BG_SCAN, // bg scan request in NT sub-state
182 eCSR_SCAN_P2P_DISCOVERY,
183
184 eCSR_SCAN_SOFTAP_CHANNEL_RANGE,
185 eCSR_SCAN_P2P_FIND_PEER,
186}eCsrRequestType;
187
188typedef enum {
189 eCSR_SCAN_RESULT_GET = 0,
190 eCSR_SCAN_RESULT_FLUSH = 1, //to delete all cached scan results
191}eCsrScanResultCmd;
192
193typedef enum
194{
195 eCSR_SCAN_SUCCESS,
196 eCSR_SCAN_FAILURE,
197 eCSR_SCAN_ABORT,
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800198 eCSR_SCAN_FOUND_PEER,
Jeff Johnson295189b2012-06-20 16:38:30 -0700199}eCsrScanStatus;
200
201#define CSR_SCAN_TIME_DEFAULT 0
202#define CSR_VALUE_IGNORED 0xFFFFFFFF
203#define CSR_RSN_PMKID_SIZE 16
204#define CSR_MAX_PMKID_ALLOWED 16
205#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 */
219#ifdef FEATURE_WLAN_CCX
220#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
Srinivas Girigowda6fa58662013-02-14 16:31:48 -0800231#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
232typedef struct tagCsrCountryChannelInfo
233{
234 tCsrChannelInfo countryValidChannelList;
235 tANI_U8 revision; /* KR 25, 25 is the country revision index
236 to the list of valid channels */
237}tCsrCountryChannelInfo, *tpCsrCountryChannelInfo;
238#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700239typedef struct tagCsrSSIDInfo
240{
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800241 tSirMacSSid SSID;
Jeff Johnson295189b2012-06-20 16:38:30 -0700242 tANI_BOOLEAN handoffPermitted;
243 tANI_BOOLEAN ssidHidden;
244}tCsrSSIDInfo;
245
246typedef struct tagCsrSSIDs
247{
248 tANI_U32 numOfSSIDs;
249 tCsrSSIDInfo *SSIDList; //To be allocated for array of SSIDs
250}tCsrSSIDs;
251
252typedef struct tagCsrBSSIDs
253{
254 tANI_U32 numOfBSSIDs;
255 tCsrBssid *bssid;
256}tCsrBSSIDs;
257
258
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800259typedef struct tagCsrScanRequest
Jeff Johnson295189b2012-06-20 16:38:30 -0700260{
261 tSirScanType scanType;
262 tCsrBssid bssid;
263 eCsrRoamBssType BSSType;
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800264 tCsrSSIDs SSIDs;
Jeff Johnson295189b2012-06-20 16:38:30 -0700265 tCsrChannelInfo ChannelInfo;
266 tANI_U32 minChnTime; //in units of milliseconds
267 tANI_U32 maxChnTime; //in units of milliseconds
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800268 tANI_U32 minChnTimeBtc; //in units of milliseconds
269 tANI_U32 maxChnTimeBtc; //in units of milliseconds
Jeff Johnson295189b2012-06-20 16:38:30 -0700270 tANI_U32 restTime; //in units of milliseconds //ignored when not connected
271 tANI_U32 uIEFieldLen;
272 tANI_U8 *pIEField;
273 eCsrRequestType requestType; //11d scan or full scan
274#ifdef WLAN_FEATURE_P2P
275 tANI_BOOLEAN p2pSearch;
Jeff Johnsone7245742012-09-05 17:12:55 -0700276 tANI_BOOLEAN skipDfsChnlInP2pSearch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700277#endif
278}tCsrScanRequest;
279
280typedef struct tagCsrBGScanRequest
281{
282 tSirScanType scanType;
283 tSirMacSSid SSID;
284 tCsrChannelInfo ChannelInfo;
285 tANI_U32 scanInterval; //in units of milliseconds
286 tANI_U32 minChnTime; //in units of milliseconds
287 tANI_U32 maxChnTime; //in units of milliseconds
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800288 tANI_U32 minChnTimeBtc; //in units of milliseconds
289 tANI_U32 maxChnTimeBtc; //in units of milliseconds
Jeff Johnson295189b2012-06-20 16:38:30 -0700290 tANI_U32 restTime; //in units of milliseconds //ignored when not connected
291 tANI_U32 throughputImpact; //specify whether BG scan cares about impacting throughput //ignored when not connected
292 tCsrBssid bssid; //how to use it?? Apple
Madan Mohan Koyyalamudi91482b82012-12-27 17:28:14 -0800293}tCsrBGScanRequest, *tpCsrBGScanRequest;
Jeff Johnson295189b2012-06-20 16:38:30 -0700294
295
296typedef struct tagCsrScanResultInfo
297{
298 //Carry the IEs for the current BSSDescription. A pointer to tDot11fBeaconIEs. Maybe NULL for start BSS.
299 void *pvIes;
300 tAniSSID ssId;
301 v_TIME_t timer; // timer is variable which is used for hidden SSID's timer value
302 //This member must be the last in the structure because the end of tSirBssDescription is an
303 // array with nonknown size at this time
304 tSirBssDescription BssDescriptor;
305}tCsrScanResultInfo;
306
307typedef struct tagCsrEncryptionList
308{
309
310 tANI_U32 numEntries;
311 eCsrEncryptionType encryptionType[eCSR_NUM_OF_ENCRYPT_TYPE];
312
313}tCsrEncryptionList, *tpCsrEncryptionList;
314
315typedef struct tagCsrAuthList
316{
317 tANI_U32 numEntries;
318 eCsrAuthType authType[eCSR_NUM_OF_SUPPORT_AUTH_TYPE];
319}tCsrAuthList, *tpCsrAuthList;
320
321#ifdef WLAN_FEATURE_VOWIFI_11R
322typedef struct tagCsrMobilityDomainInfo
323{
324 tANI_U8 mdiePresent;
325 tANI_U16 mobilityDomain;
326} tCsrMobilityDomainInfo;
327#endif
328
329#ifdef FEATURE_WLAN_CCX
330typedef struct tagCsrCcxCckmInfo
331{
332 tANI_U32 reassoc_req_num;
333 tANI_BOOLEAN krk_plumbed;
334 tANI_U8 krk[CSR_KRK_KEY_LEN];
335} tCsrCcxCckmInfo;
336#endif
337
338
339typedef struct tagCsrScanResultFilter
340{
341 tCsrBSSIDs BSSIDs; //each bssid has a length of WNI_CFG_BSSID_LEN (6)
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800342 tCsrSSIDs SSIDs;
Jeff Johnson295189b2012-06-20 16:38:30 -0700343 tCsrChannelInfo ChannelInfo;
344 tCsrAuthList authType;
345 tCsrEncryptionList EncryptionType;
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800346 //eCSR_ENCRYPT_TYPE_ANY cannot be set in multicast encryption type. If caller doesn't case,
Jeff Johnson295189b2012-06-20 16:38:30 -0700347 //put all supported encryption types in here
348 tCsrEncryptionList mcEncryptionType;
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800349 eCsrRoamBssType BSSType;
Jeff Johnson295189b2012-06-20 16:38:30 -0700350 //this is a bit mask of all the needed phy mode defined in eCsrPhyMode
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800351 tANI_U32 phyMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700352 //If countryCode[0] is not 0, countryCode is checked independent of fCheckUnknownCountryCode
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800353 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN];
354 tANI_U8 uapsd_mask;
Jeff Johnson295189b2012-06-20 16:38:30 -0700355 /*For WPS filtering if true => auth and ecryption should be ignored*/
356 tANI_BOOLEAN bWPSAssociation;
357#if defined WLAN_FEATURE_VOWIFI
358 /*For measurement reports --> if set, only SSID, BSSID and channel is considered for filtering.*/
359 tANI_BOOLEAN fMeasurement;
360#endif
361#ifdef WLAN_FEATURE_VOWIFI_11R
362 tCsrMobilityDomainInfo MDID;
363#endif
364 tANI_BOOLEAN p2pResult;
365}tCsrScanResultFilter;
366
367
368typedef struct sCsrChnPower_
369{
370 tANI_U8 firstChannel;
371 tANI_U8 numChannels;
372 tANI_U8 maxtxPower;
373}sCsrChnPower;
374
375
376typedef struct sCsrChannel_
377{
378 tANI_U8 numChannels;
379 tANI_U8 channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
380}sCsrChannel;
381
382
383typedef struct tagCsr11dinfo
384{
385 sCsrChannel Channels;
386 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN+1];
387 //max power channel list
388 sCsrChnPower ChnPower[WNI_CFG_VALID_CHANNEL_LIST_LEN];
389}tCsr11dinfo;
390
391
392typedef enum
393{
394 eCSR_ROAM_CANCELLED = 1,
395 //this mean error happens before association_start or roaming_start is called.
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800396 eCSR_ROAM_FAILED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700397 //a CSR trigger roaming operation starts, callback may get a pointer to tCsrConnectedProfile
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800398 eCSR_ROAM_ROAMING_START,
Jeff Johnson295189b2012-06-20 16:38:30 -0700399 //a CSR trigger roaming operation is completed
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800400 eCSR_ROAM_ROAMING_COMPLETION,
Jeff Johnson295189b2012-06-20 16:38:30 -0700401 //Connection completed status.
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800402 eCSR_ROAM_CONNECT_COMPLETION,
403 //an association or start_IBSS operation starts,
404 //callback may get a pointer to tCsrRoamProfile and a pointer to tSirBssDescription
405 eCSR_ROAM_ASSOCIATION_START,
406 //a roaming operation is finish, see eCsrRoamResult for
Jeff Johnson295189b2012-06-20 16:38:30 -0700407 //possible data passed back
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800408 eCSR_ROAM_ASSOCIATION_COMPLETION,
Jeff Johnson295189b2012-06-20 16:38:30 -0700409 eCSR_ROAM_DISASSOCIATED,
410 eCSR_ROAM_ASSOCIATION_FAILURE,
411 //when callback with this flag. callback gets a pointer to the BSS desc.
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800412 eCSR_ROAM_SHOULD_ROAM,
Jeff Johnson295189b2012-06-20 16:38:30 -0700413 //A new candidate for PMKID is found
414 eCSR_ROAM_SCAN_FOUND_NEW_BSS,
415 //CSR is done lostlink roaming and still cannot reconnect
416 eCSR_ROAM_LOSTLINK,
417 //a link lost is detected. CSR starts roaming.
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800418 eCSR_ROAM_LOSTLINK_DETECTED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700419 //TKIP MIC error detected, callback gets a pointer to tpSirSmeMicFailureInd
420 eCSR_ROAM_MIC_ERROR_IND,
421 eCSR_ROAM_IBSS_IND, //IBSS indications.
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800422 //Update the connection status, useful for IBSS: new peer added, network is active etc.
423 eCSR_ROAM_CONNECT_STATUS_UPDATE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700424 eCSR_ROAM_GEN_INFO,
425 eCSR_ROAM_SET_KEY_COMPLETE,
426 eCSR_ROAM_REMOVE_KEY_COMPLETE,
427 eCSR_ROAM_IBSS_LEAVE, //IBSS indications.
428 //BSS in WDS mode status indication
429 eCSR_ROAM_WDS_IND,
Jeff Johnson295189b2012-06-20 16:38:30 -0700430 //BSS in SoftAP mode status indication
431 eCSR_ROAM_INFRA_IND,
432 eCSR_ROAM_WPS_PBC_PROBE_REQ_IND,
Jeff Johnson295189b2012-06-20 16:38:30 -0700433#ifdef WLAN_FEATURE_VOWIFI_11R
434 eCSR_ROAM_FT_RESPONSE,
435#endif
436 eCSR_ROAM_FT_START,
437 eCSR_ROAM_INDICATE_MGMT_FRAME,
438 eCSR_ROAM_REMAIN_CHAN_READY,
439 eCSR_ROAM_SEND_ACTION_CNF,
440 //this mean error happens before association_start or roaming_start is called.
441 eCSR_ROAM_SESSION_OPENED,
442 eCSR_ROAM_FT_REASSOC_FAILED,
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700443#ifdef FEATURE_WLAN_LFR
444 eCSR_ROAM_PMK_NOTIFY,
445#endif
Mohit Khannac0b992f2012-12-04 15:08:18 -0800446#ifdef FEATURE_WLAN_TDLS
447 eCSR_ROAM_TDLS_STATUS_UPDATE,
Gopichand Nakkalaf8d84812013-02-18 19:15:09 -0800448 eCSR_ROAM_RESULT_MGMT_TX_COMPLETE_IND,
Mohit Khannac0b992f2012-12-04 15:08:18 -0800449#endif
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -0800450 eCSR_ROAM_DISCONNECT_ALL_P2P_CLIENTS, //Disaconnect all the clients
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800451 eCSR_ROAM_SEND_P2P_STOP_BSS, //Stopbss triggered from SME due to different
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -0800452 // beacon interval
453
Jeff Johnson295189b2012-06-20 16:38:30 -0700454}eRoamCmdStatus;
455
456
457//comment inside indicates what roaming callback gets
458typedef enum
459{
460 eCSR_ROAM_RESULT_NONE,
461 //this means no more action in CSR
462 //If roamStatus is eCSR_ROAM_ASSOCIATION_COMPLETION, tCsrRoamInfo's pBssDesc may pass back
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800463 eCSR_ROAM_RESULT_FAILURE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700464 //Pass back pointer to tCsrRoamInfo
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800465 eCSR_ROAM_RESULT_ASSOCIATED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700466 eCSR_ROAM_RESULT_NOT_ASSOCIATED,
467 eCSR_ROAM_RESULT_MIC_FAILURE,
468 eCSR_ROAM_RESULT_FORCED,
469 eCSR_ROAM_RESULT_DISASSOC_IND,
470 eCSR_ROAM_RESULT_DEAUTH_IND,
471 eCSR_ROAM_RESULT_CAP_CHANGED,
472 //This means we starts an IBSS
473 //tCsrRoamInfo's pBssDesc may pass back
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800474 eCSR_ROAM_RESULT_IBSS_STARTED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700475 //START_BSS failed
476 //tCsrRoamInfo's pBssDesc may pass back
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800477 eCSR_ROAM_RESULT_IBSS_START_FAILED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700478 eCSR_ROAM_RESULT_IBSS_JOIN_SUCCESS,
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800479 eCSR_ROAM_RESULT_IBSS_JOIN_FAILED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700480 eCSR_ROAM_RESULT_IBSS_CONNECT,
481 eCSR_ROAM_RESULT_IBSS_INACTIVE,
482 //If roamStatus is eCSR_ROAM_ASSOCIATION_COMPLETION
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800483 //tCsrRoamInfo's pBssDesc may pass back. and the peer's MAC address in peerMacOrBssid
484 //If roamStatus is eCSR_ROAM_IBSS_IND,
Jeff Johnson295189b2012-06-20 16:38:30 -0700485 //the peer's MAC address in peerMacOrBssid and a beacon frame of the IBSS in pbFrames
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800486 eCSR_ROAM_RESULT_IBSS_NEW_PEER,
Jeff Johnson295189b2012-06-20 16:38:30 -0700487 //Peer departed from IBSS, Callback may get a pointer tSmeIbssPeerInd in pIbssPeerInd
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800488 eCSR_ROAM_RESULT_IBSS_PEER_DEPARTED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700489 //Coalescing in the IBSS network (joined an IBSS network)
490 //Callback pass a BSSID in peerMacOrBssid
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800491 eCSR_ROAM_RESULT_IBSS_COALESCED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700492 //If roamStatus is eCSR_ROAM_ROAMING_START, callback may get a pointer to tCsrConnectedProfile used to connect.
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800493 eCSR_ROAM_RESULT_IBSS_STOP,
494 eCSR_ROAM_RESULT_LOSTLINK,
Jeff Johnson295189b2012-06-20 16:38:30 -0700495 eCSR_ROAM_RESULT_MIC_ERROR_UNICAST,
496 eCSR_ROAM_RESULT_MIC_ERROR_GROUP,
497 eCSR_ROAM_RESULT_AUTHENTICATED,
498 eCSR_ROAM_RESULT_NEW_RSN_BSS,
499#ifdef FEATURE_WLAN_WAPI
500 eCSR_ROAM_RESULT_NEW_WAPI_BSS,
501#endif /* FEATURE_WLAN_WAPI */
502 // WDS started successfully
503 eCSR_ROAM_RESULT_WDS_STARTED,
504 // WDS start failed
505 eCSR_ROAM_RESULT_WDS_START_FAILED,
506 // WDS stopped
507 eCSR_ROAM_RESULT_WDS_STOPPED,
508 // WDS joined successfully in STA mode
509 eCSR_ROAM_RESULT_WDS_ASSOCIATED,
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800510 // A station joined WDS AP
Jeff Johnson295189b2012-06-20 16:38:30 -0700511 eCSR_ROAM_RESULT_WDS_ASSOCIATION_IND,
512 // WDS join failed in STA mode
513 eCSR_ROAM_RESULT_WDS_NOT_ASSOCIATED,
514 // WDS disassociated
515 eCSR_ROAM_RESULT_WDS_DISASSOCIATED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700516 // INFRA started successfully
517 eCSR_ROAM_RESULT_INFRA_STARTED,
518 // INFRA start failed
519 eCSR_ROAM_RESULT_INFRA_START_FAILED,
520 // INFRA stopped
521 eCSR_ROAM_RESULT_INFRA_STOPPED,
522 // A station joining INFRA AP
523 eCSR_ROAM_RESULT_INFRA_ASSOCIATION_IND,
524 // A station joined INFRA AP
525 eCSR_ROAM_RESULT_INFRA_ASSOCIATION_CNF,
526 // INFRA disassociated
527 eCSR_ROAM_RESULT_INFRA_DISASSOCIATED,
528 eCSR_ROAM_RESULT_WPS_PBC_PROBE_REQ_IND,
Jeff Johnson295189b2012-06-20 16:38:30 -0700529#ifdef WLAN_FEATURE_P2P
530 eCSR_ROAM_RESULT_SEND_ACTION_FAIL,
531#endif
532 // peer rejected assoc because max assoc limit reached. callback gets pointer to peer
533 eCSR_ROAM_RESULT_MAX_ASSOC_EXCEEDED,
Jeff Johnsone7245742012-09-05 17:12:55 -0700534 //Assoc rejected due to concurrent session running on a different channel
535 eCSR_ROAM_RESULT_ASSOC_FAIL_CON_CHANNEL,
Mohit Khannac0b992f2012-12-04 15:08:18 -0800536#ifdef FEATURE_WLAN_TDLS
537 eCSR_ROAM_RESULT_ADD_TDLS_PEER,
538 eCSR_ROAM_RESULT_DELETE_TDLS_PEER,
Hoonki Leecdd3b852013-02-05 15:01:19 -0800539 eCSR_ROAM_RESULT_TEARDOWN_TDLS_PEER_IND,
Gopichand Nakkala55182be2013-02-10 21:39:16 -0800540 eCSR_ROAM_RESULT_DELETE_ALL_TDLS_PEER_IND,
Mohit Khannac0b992f2012-12-04 15:08:18 -0800541#endif
542
Jeff Johnson295189b2012-06-20 16:38:30 -0700543}eCsrRoamResult;
544
545
546
547/*----------------------------------------------------------------------------
548 List of link quality indications HDD can receive from SME
549-----------------------------------------------------------------------------*/
550typedef enum
551{
552 eCSR_ROAM_LINK_QUAL_MIN_IND = -1,
553
554 eCSR_ROAM_LINK_QUAL_POOR_IND = 0, /* bad link */
555 eCSR_ROAM_LINK_QUAL_GOOD_IND = 1, /* acceptable for voice */
556 eCSR_ROAM_LINK_QUAL_VERY_GOOD_IND = 2, /* suitable for voice */
557 eCSR_ROAM_LINK_QUAL_EXCELLENT_IND = 3, /* suitable for voice */
558
559 eCSR_ROAM_LINK_QUAL_MAX_IND /* invalid value */
560
561} eCsrRoamLinkQualityInd;
562
563typedef enum
564{
565 eCSR_DISCONNECT_REASON_UNSPECIFIED = 0,
566 eCSR_DISCONNECT_REASON_MIC_ERROR,
567 eCSR_DISCONNECT_REASON_DISASSOC,
568 eCSR_DISCONNECT_REASON_DEAUTH,
569 eCSR_DISCONNECT_REASON_HANDOFF,
570 eCSR_DISCONNECT_REASON_IBSS_JOIN_FAILURE,
571 eCSR_DISCONNECT_REASON_IBSS_LEAVE,
572}eCsrRoamDisconnectReason;
573
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800574typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700575{
576 // Not associated in Infra or participating in an IBSS / Ad-hoc network.
577 eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED,
578 // Associated in an Infrastructure network.
579 eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED,
580 // Participating in an IBSS network though disconnected (no partner stations
581 // in the IBSS).
582 eCSR_ASSOC_STATE_TYPE_IBSS_DISCONNECTED,
583 // Participating in an IBSS network with partner stations also present
584 eCSR_ASSOC_STATE_TYPE_IBSS_CONNECTED,
585 // Participating in a WDS network in AP or STA mode but not connected yet
586 eCSR_ASSOC_STATE_TYPE_WDS_DISCONNECTED,
587 // Participating in a WDS network and connected peer to peer
588 eCSR_ASSOC_STATE_TYPE_WDS_CONNECTED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700589 // Participating in a Infra network in AP not yet in connected state
590 eCSR_ASSOC_STATE_TYPE_INFRA_DISCONNECTED,
591 // Participating in a Infra network and connected to a peer
592 eCSR_ASSOC_STATE_TYPE_INFRA_CONNECTED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700593
594}eCsrConnectState;
595
596
597// This parameter is no longer supported in the Profile. Need to set this in the global properties
598// for the adapter.
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800599typedef enum eCSR_MEDIUM_ACCESS
Jeff Johnson295189b2012-06-20 16:38:30 -0700600{
601 eCSR_MEDIUM_ACCESS_AUTO = 0,
602 eCSR_MEDIUM_ACCESS_DCF,
603 eCSR_MEDIUM_ACCESS_eDCF,
604 eCSR_MEDIUM_ACCESS_HCF,
605
606 eCSR_MEDIUM_ACCESS_WMM_eDCF_802dot1p,
607 eCSR_MEDIUM_ACCESS_WMM_eDCF_DSCP,
608 eCSR_MEDIUM_ACCESS_WMM_eDCF_NoClassify,
609 eCSR_MEDIUM_ACCESS_11e_eDCF = eCSR_MEDIUM_ACCESS_eDCF,
610 eCSR_MEDIUM_ACCESS_11e_HCF = eCSR_MEDIUM_ACCESS_HCF,
611}eCsrMediaAccessType;
612
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800613typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700614{
615 eCSR_TX_RATE_AUTO = 0, // use rate adaption to determine Tx rate.
616
617 eCSR_TX_RATE_1Mbps = 0x00000001,
618 eCSR_TX_RATE_2Mbps = 0x00000002,
619 eCSR_TX_RATE_5_5Mbps = 0x00000004,
620 eCSR_TX_RATE_6Mbps = 0x00000008,
621 eCSR_TX_RATE_9Mbps = 0x00000010,
622 eCSR_TX_RATE_11Mbps = 0x00000020,
623 eCSR_TX_RATE_12Mbps = 0x00000040,
624 eCSR_TX_RATE_18Mbps = 0x00000080,
625 eCSR_TX_RATE_24Mbps = 0x00000100,
626 eCSR_TX_RATE_36Mbps = 0x00000200,
627 eCSR_TX_RATE_42Mbps = 0x00000400,
628 eCSR_TX_RATE_48Mbps = 0x00000800,
629 eCSR_TX_RATE_54Mbps = 0x00001000,
630 eCSR_TX_RATE_72Mbps = 0x00002000,
631 eCSR_TX_RATE_84Mbps = 0x00004000,
632 eCSR_TX_RATE_96Mbps = 0x00008000,
633 eCSR_TX_RATE_108Mbps = 0x00010000,
634 eCSR_TX_RATE_126Mbps = 0x00020000,
635 eCSR_TX_RATE_144Mbps = 0x00040000,
636 eCSR_TX_RATE_168Mbps = 0x00080000,
637 eCSR_TX_RATE_192Mbps = 0x00100000,
638 eCSR_TX_RATE_216Mbps = 0x00200000,
639 eCSR_TX_RATE_240Mbps = 0x00400000,
640
641}eCsrExposedTxRate;
642
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800643typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700644{
645 eCSR_OPERATING_CHANNEL_ALL = 0,
646 eCSR_OPERATING_CHANNEL_AUTO = eCSR_OPERATING_CHANNEL_ALL,
647 eCSR_OPERATING_CHANNEL_ANY = eCSR_OPERATING_CHANNEL_ALL,
648}eOperationChannel;
649
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800650typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700651{
652 eCSR_DOT11_FRAG_THRESH_AUTO = -1,
653 eCSR_DOT11_FRAG_THRESH_MIN = 256,
654 eCSR_DOT11_FRAG_THRESH_MAX = 2346,
655 eCSR_DOT11_FRAG_THRESH_DEFAULT = 2000
656}eCsrDot11FragThresh;
657
658
659//for channel bonding for ibss
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800660typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700661{
662 eCSR_CB_OFF = 0,
663 eCSR_CB_AUTO = 1,
664 eCSR_CB_DOWN = 2,
665 eCSR_CB_UP = 3,
666}eCsrCBChoice;
667
668//For channel bonding, the channel number gap is 4, either up or down. For both 11a and 11g mode.
669#define CSR_CB_CHANNEL_GAP 4
670#define CSR_CB_CENTER_CHANNEL_OFFSET 2
671#define CSR_MAX_24GHz_CHANNEL_NUMBER ( SIR_11B_CHANNEL_END )
Jeff Johnsone7245742012-09-05 17:12:55 -0700672#define CSR_MIN_5GHz_CHANNEL_NUMBER ( SIR_11A_CHANNEL_BEGIN )
673#define CSR_MAX_5GHz_CHANNEL_NUMBER ( SIR_11A_CHANNEL_END )
Jeff Johnson295189b2012-06-20 16:38:30 -0700674
675// WEP keysize (in bits)...
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800676typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700677{
678 eCSR_SECURITY_WEP_KEYSIZE_40 = 40, // 40 bit key + 24bit IV = 64bit WEP
679 eCSR_SECURITY_WEP_KEYSIZE_104 = 104, // 104bit key + 24bit IV = 128bit WEP
680
681 eCSR_SECURITY_WEP_KEYSIZE_MIN = eCSR_SECURITY_WEP_KEYSIZE_40,
682 eCSR_SECURITY_WEP_KEYSIZE_MAX = eCSR_SECURITY_WEP_KEYSIZE_104,
683 eCSR_SECURITY_WEP_KEYSIZE_MAX_BYTES = ( eCSR_SECURITY_WEP_KEYSIZE_MAX / 8 ),
684}eCsrWEPKeySize;
685
686
687// Possible values for the WEP static key ID...
688typedef enum
689{
690
691 eCSR_SECURITY_WEP_STATIC_KEY_ID_MIN = 0,
692 eCSR_SECURITY_WEP_STATIC_KEY_ID_MAX = 3,
693 eCSR_SECURITY_WEP_STATIC_KEY_ID_DEFAULT = 0,
694
695 eCSR_SECURITY_WEP_STATIC_KEY_ID_INVALID = -1,
696
697}eCsrWEPStaticKeyID;
698
699#define CSR_MAX_NUM_KEY (eCSR_SECURITY_WEP_STATIC_KEY_ID_MAX + 1)
700
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800701typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700702{
703 eCSR_SECURITY_SET_KEY_ACTION_NO_CHANGE,
704 eCSR_SECURITY_SET_KEY_ACTION_SET_KEY,
705 eCSR_SECURITY_SET_KEY_ACTION_DELETE_KEY,
706}eCsrSetKeyAction;
707
708typedef enum
709{
710 eCSR_BAND_ALL,
711 eCSR_BAND_24,
712 eCSR_BAND_5G,
713 eCSR_BAND_MAX,
714}eCsrBand;
715
716
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800717typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700718{
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800719 // Roaming because HDD requested for reassoc by changing one of the fields in
Jeff Johnson295189b2012-06-20 16:38:30 -0700720 // tCsrRoamModifyProfileFields. OR
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800721 // Roaming because SME requested for reassoc by changing one of the fields in
Jeff Johnson295189b2012-06-20 16:38:30 -0700722 // tCsrRoamModifyProfileFields.
723 eCsrRoamReasonStaCapabilityChanged,
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800724 // Roaming because SME requested for reassoc to a different AP, as part of
Jeff Johnson295189b2012-06-20 16:38:30 -0700725 // inter AP handoff.
726 eCsrRoamReasonBetterAP,
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800727 // Roaming because SME requested it as the link is lost - placeholder, will
Jeff Johnson295189b2012-06-20 16:38:30 -0700728 // clean it up once handoff code gets in
729 eCsrRoamReasonSmeIssuedForLostLink,
730
731}eCsrRoamReasonCodes;
732
733typedef enum
734{
735 eCsrRoamWmmAuto = 0,
736 eCsrRoamWmmQbssOnly = 1,
737 eCsrRoamWmmNoQos = 2,
738
739} eCsrRoamWmmUserModeType;
740
741typedef enum
742{
743 eCSR_REQUESTER_MIN = 0,
744 eCSR_DIAG,
745 eCSR_UMA_GAN,
746 eCSR_HDD
747} eCsrStatsRequesterType;
748
749typedef struct tagPmkidCandidateInfo
750{
751 tCsrBssid BSSID;
752 tANI_BOOLEAN preAuthSupported;
753}tPmkidCandidateInfo;
754
755typedef struct tagPmkidCacheInfo
756{
757 tCsrBssid BSSID;
758 tANI_U8 PMKID[CSR_RSN_PMKID_SIZE];
759}tPmkidCacheInfo;
760
761#ifdef FEATURE_WLAN_WAPI
762typedef struct tagBkidCandidateInfo
763{
764 tCsrBssid BSSID;
765 tANI_BOOLEAN preAuthSupported;
766}tBkidCandidateInfo;
767
768typedef struct tagBkidCacheInfo
769{
770 tCsrBssid BSSID;
771 tANI_U8 BKID[CSR_WAPI_BKID_SIZE];
772}tBkidCacheInfo;
773#endif /* FEATURE_WLAN_WAPI */
774
775typedef struct tagCsrKeys
776{
777 tANI_U8 KeyLength[ CSR_MAX_NUM_KEY ]; //Also use to indicate whether the key index is set
778 tANI_U8 KeyMaterial[ CSR_MAX_NUM_KEY ][ CSR_MAX_KEY_LEN ];
779 tANI_U8 defaultIndex;
780}tCsrKeys;
781
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800782/* Following are fields which are part of tCsrRoamConnectedProfile might need
Jeff Johnson295189b2012-06-20 16:38:30 -0700783 modification dynamically once STA is up & running and this could trigger
784 reassoc */
785typedef struct tagCsrRoamModifyProfileFields
786{
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800787 // during connect this specifies ACs U-APSD is to be setup
Jeff Johnson295189b2012-06-20 16:38:30 -0700788 // for (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored).
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800789 // During assoc response this COULD carry confirmation of what ACs U-APSD
Jeff Johnson295189b2012-06-20 16:38:30 -0700790 // got setup for. Later if an APP looking for APSD, SME-QoS might need to
791 // modify this field
792 tANI_U8 uapsd_mask;
793 // HDD might ask to modify this field
794 tANI_U16 listen_interval;
795}tCsrRoamModifyProfileFields;
796
797typedef struct tagCsrRoamProfile
798{
799 //For eCSR_BSS_TYPE_WDS_AP. There must be one SSID in SSIDs.
800 //For eCSR_BSS_TYPE_WDS_STA. There must be two SSIDs. Index 0 is the SSID of the WDS-AP
801 //that we need to join. Index 1 is the SSID for self BSS.
802 tCsrSSIDs SSIDs;
803 tCsrBSSIDs BSSIDs;
804 tANI_U32 phyMode; //this is a bit mask of all the needed phy mode defined in eCsrPhyMode
805 eCsrRoamBssType BSSType;
806
807 tCsrAuthList AuthType;
808 eCsrAuthType negotiatedAuthType;
809
810 tCsrEncryptionList EncryptionType;
811 //This field is for output only, not for input
812 eCsrEncryptionType negotiatedUCEncryptionType;
813
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800814 //eCSR_ENCRYPT_TYPE_ANY cannot be set in multicast encryption type. If caller doesn't case,
Jeff Johnson295189b2012-06-20 16:38:30 -0700815 //put all supported encryption types in here
816 tCsrEncryptionList mcEncryptionType;
817 //This field is for output only, not for input
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800818 eCsrEncryptionType negotiatedMCEncryptionType;
Jeff Johnson295189b2012-06-20 16:38:30 -0700819
820 tCsrKeys Keys;
821 eCsrCBChoice CBMode; //up, down or auto
822 tCsrChannelInfo ChannelInfo;
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800823 tANI_U8 operationChannel;
Jeff Johnson295189b2012-06-20 16:38:30 -0700824 tANI_U16 beaconInterval; //If this is 0, SME will fill in for caller.
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800825 // during connect this specifies ACs U-APSD is to be setup
Jeff Johnson295189b2012-06-20 16:38:30 -0700826 // for (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored).
827 // During assoc response this COULD carry confirmation of what ACs U-APSD got setup for
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800828 tANI_U8 uapsd_mask;
Jeff Johnson295189b2012-06-20 16:38:30 -0700829 tANI_U32 nWPAReqIELength; //The byte count in the pWPAReqIE
830 tANI_U8 *pWPAReqIE; //If not null, it has the IE byte stream for WPA
831 tANI_U32 nRSNReqIELength; //The byte count in the pRSNReqIE
832 tANI_U8 *pRSNReqIE; //If not null, it has the IE byte stream for RSN
833#ifdef FEATURE_WLAN_WAPI
834 tANI_U32 nWAPIReqIELength; //The byte count in the pWAPIReqIE
835 tANI_U8 *pWAPIReqIE; //If not null, it has the IE byte stream for WAPI
836#endif /* FEATURE_WLAN_WAPI */
837
838 tANI_U32 nAddIEScanLength; //The byte count in the pAddIE for scan (at the time of join)
839 tANI_U8 *pAddIEScan; //If not null, it has the IE byte stream for additional IE, which can be WSC IE and/or P2P IE
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800840 tANI_U32 nAddIEAssocLength; //The byte count in the pAddIE for assoc
Jeff Johnson295189b2012-06-20 16:38:30 -0700841 tANI_U8 *pAddIEAssoc; //If not null, it has the IE byte stream for additional IE, which can be WSC IE and/or P2P IE
842
843 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN]; //it is ignored if [0] is 0.
844 /*WPS Association if true => auth and ecryption should be ignored*/
845 tANI_BOOLEAN bWPSAssociation;
846 tANI_U32 nWSCReqIELength; //The byte count in the pWSCReqIE
847 tANI_U8 *pWSCReqIE; //If not null, it has the IE byte stream for WSC
848
Jeff Johnson295189b2012-06-20 16:38:30 -0700849 tANI_U8 ieee80211d;
850 tANI_U8 privacy;
851 tANI_BOOLEAN fwdWPSPBCProbeReq;
852 tAniAuthType csr80211AuthType;
853 tANI_U32 dtimPeriod;
854 tANI_BOOLEAN ApUapsdEnable;
855 tANI_BOOLEAN protEnabled;
856 tANI_BOOLEAN obssProtEnabled;
857 tANI_U16 cfg_protection;
858 tANI_U8 wps_state;
Jeff Johnson295189b2012-06-20 16:38:30 -0700859
860#ifdef WLAN_FEATURE_VOWIFI_11R
861 tCsrMobilityDomainInfo MDID;
862#endif
863 tVOS_CON_MODE csrPersona;
864
865}tCsrRoamProfile;
866
867
868typedef struct tagCsrRoamConnectedProfile
869{
870 tSirMacSSid SSID;
871 tANI_BOOLEAN handoffPermitted;
872 tANI_BOOLEAN ssidHidden;
873 tCsrBssid bssid;
874 eCsrRoamBssType BSSType;
875 eCsrAuthType AuthType;
876 tCsrAuthList AuthInfo;
877 eCsrEncryptionType EncryptionType;
878 tCsrEncryptionList EncryptionInfo;
879 eCsrEncryptionType mcEncryptionType;
880 tCsrEncryptionList mcEncryptionInfo;
881 eCsrCBChoice CBMode; //up, down or auto
882 tANI_U8 operationChannel;
Jeff Johnsone7245742012-09-05 17:12:55 -0700883 tANI_U16 beaconInterval;
Jeff Johnson295189b2012-06-20 16:38:30 -0700884 tCsrKeys Keys;
885 // meaningless on connect. It's an OUT param from CSR's point of view
886 // During assoc response carries the ACM bit-mask i.e. what
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800887 // ACs have ACM=1 (if any),
Jeff Johnson295189b2012-06-20 16:38:30 -0700888 // (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored)
889 tANI_U8 acm_mask;
890 tCsrRoamModifyProfileFields modifyProfileFields;
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700891 tANI_U32 nAddIEAssocLength; //The byte count in the pAddIE for assoc
892 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 Lokere30b07722013-02-24 22:21:28 -0800893
894 tSirBssDescription *pBssDesc;
Jeff Johnson295189b2012-06-20 16:38:30 -0700895 tANI_BOOLEAN qap; //AP supports QoS
896 tANI_BOOLEAN qosConnection; //A connection is QoS enabled
897#ifdef WLAN_FEATURE_VOWIFI_11R
898 tCsrMobilityDomainInfo MDID;
899#endif
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800900
Jeff Johnson295189b2012-06-20 16:38:30 -0700901#ifdef FEATURE_WLAN_CCX
902 tCsrCcxCckmInfo ccxCckmInfo;
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800903 tANI_BOOLEAN isCCXAssoc;
Jeff Johnson295189b2012-06-20 16:38:30 -0700904#endif
905}tCsrRoamConnectedProfile;
906
907
908#ifdef WLAN_FEATURE_VOWIFI_11R
909typedef struct tagCsr11rConfigParams
910{
911 tANI_BOOLEAN IsFTResourceReqSupported;
912} tCsr11rConfigParams;
913#endif
914
915#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
916typedef struct tagCsrNeighborRoamConfigParams
917{
918
919 tANI_U32 nNeighborScanTimerPeriod;
920 tANI_U8 nNeighborLookupRssiThreshold;
921 tANI_U8 nNeighborReassocRssiThreshold;
922 tANI_U16 nNeighborScanMinChanTime;
923 tANI_U16 nNeighborScanMaxChanTime;
924 sCsrChannel neighborScanChanList;
925 tANI_U8 nMaxNeighborRetries;
926 tANI_U16 nNeighborResultsRefreshPeriod;
Srinivas Girigowda6fa58662013-02-14 16:31:48 -0800927 tANI_U16 nEmptyScanRefreshPeriod;
Jeff Johnson295189b2012-06-20 16:38:30 -0700928}tCsrNeighborRoamConfigParams;
929#endif
930
931typedef struct tagCsrConfigParam
932{
933 tANI_U32 FragmentationThreshold;
Jeff Johnsone7245742012-09-05 17:12:55 -0700934 tANI_U32 channelBondingMode24GHz; // keep this tANI_U32. This gets converted to ePhyChannelBondState
935 tANI_U32 channelBondingMode5GHz; // in csrChangeDefaultConfigParam using convertCBIniValueToPhyCBState
Jeff Johnson295189b2012-06-20 16:38:30 -0700936 eCsrPhyMode phyMode;
937 eCsrBand eBand;
938 tANI_U32 RTSThreshold;
939 tANI_U32 HeartbeatThresh50;
940 tANI_U32 HeartbeatThresh24;
941 eCsrCBChoice cbChoice;
942 eCsrBand bandCapability; //indicate hw capability
943 tANI_U32 bgScanInterval;
944 tANI_U16 TxRate;
945 eCsrRoamWmmUserModeType WMMSupportMode;
946 tANI_BOOLEAN Is11eSupportEnabled;
947 tANI_BOOLEAN Is11dSupportEnabled;
948 tANI_BOOLEAN Is11dSupportEnabledOriginal;
949 tANI_BOOLEAN Is11hSupportEnabled;
950 tANI_BOOLEAN shortSlotTime;
951 tANI_BOOLEAN ProprietaryRatesEnabled;
952 tANI_U8 AdHocChannel24;
953 tANI_U8 AdHocChannel5G;
954 tANI_U32 impsSleepTime; //in units of seconds
955 tANI_U32 nScanResultAgeCount; //this number minus one is the number of times a scan doesn't find it before it is removed
956 tANI_U32 scanAgeTimeNCNPS; //scan result aging time threshold when Not-Connect-No-Power-Save, in seconds
957 tANI_U32 scanAgeTimeNCPS; //scan result aging time threshold when Not-Connect-Power-Save, in seconds
958 tANI_U32 scanAgeTimeCNPS; //scan result aging time threshold when Connect-No-Power-Save, in seconds,
959 tANI_U32 scanAgeTimeCPS; //scan result aging time threshold when Connect-Power-Savein seconds
960 tANI_U32 nRoamingTime; //In seconds, CSR will try this long before gives up. 0 means no roaming
961 tANI_U8 bCatRssiOffset; //to set the RSSI difference for each category
962 tANI_U8 fEnableMCCMode; //to set MCC Enable/Disable mode
Mohit Khanna7ed53f02012-09-11 17:52:10 -0700963 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
964 //at the moment, this flag is provided only to pass Wi-Fi Cert. 5.1.12
Jeff Johnson295189b2012-06-20 16:38:30 -0700965 tCsr11dinfo Csr11dinfo;
966 //Whether to limit the channels to the ones set in Csr11dInfo. If true, the opertaional
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800967 //channels are limited to the default channel list. It is an "AND" operation between the
Jeff Johnson295189b2012-06-20 16:38:30 -0700968 //default channels and the channels in the 802.11d IE.
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800969 tANI_BOOLEAN fEnforce11dChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -0700970 //Country Code Priority
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800971 //0 = 802.11D > Country IOCTL > NV
Jeff Johnson295189b2012-06-20 16:38:30 -0700972 //1 = Country IOCTL > 802.11D > NV
973 tANI_BOOLEAN fSupplicantCountryCodeHasPriority;
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800974 //When true, AP with unknown country code won't be see.
975 //"Unknown country code" means either Ap doesn't have 11d IE or we cannot
976 //find a domain for the country code in its 11d IE.
977 tANI_BOOLEAN fEnforceCountryCodeMatch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700978 //When true, only APs in the default domain can be seen. If the Ap has "unknown country
979 //code", or the domain of the country code doesn't match the default domain, the Ap is
980 //not acceptable.
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800981 tANI_BOOLEAN fEnforceDefaultDomain;
Jeff Johnson295189b2012-06-20 16:38:30 -0700982
983 tANI_U16 vccRssiThreshold;
984 tANI_U32 vccUlMacLossThreshold;
985
986 tANI_U32 nPassiveMinChnTime; //in units of milliseconds
987 tANI_U32 nPassiveMaxChnTime; //in units of milliseconds
988 tANI_U32 nActiveMinChnTime; //in units of milliseconds
989 tANI_U32 nActiveMaxChnTime; //in units of milliseconds
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -0800990
991 tANI_U32 nActiveMinChnTimeBtc; //in units of milliseconds
992 tANI_U32 nActiveMaxChnTimeBtc; //in units of milliseconds
Madan Mohan Koyyalamudi4ff9cd62012-10-30 17:48:57 -0700993#ifdef WLAN_AP_STA_CONCURRENCY
994 tANI_U32 nPassiveMinChnTimeConc; //in units of milliseconds
995 tANI_U32 nPassiveMaxChnTimeConc; //in units of milliseconds
996 tANI_U32 nActiveMinChnTimeConc; //in units of milliseconds
997 tANI_U32 nActiveMaxChnTimeConc; //in units of milliseconds
998 tANI_U32 nRestTimeConc; //in units of milliseconds
Madan Mohan Koyyalamudi8591f092012-12-17 13:04:30 -0800999 tANI_U8 nNumChanCombinedConc; //number of channels combined
1000 //in each split scan operation
Madan Mohan Koyyalamudi4ff9cd62012-10-30 17:48:57 -07001001#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001002
1003 tANI_BOOLEAN IsIdleScanEnabled;
1004 //in dBm, the maximum TX power
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001005 //The actual TX power is the lesser of this value and 11d.
Jeff Johnson295189b2012-06-20 16:38:30 -07001006 //If 11d is disable, the lesser of this and default setting.
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001007 tANI_U8 nTxPowerCap;
Jeff Johnson295189b2012-06-20 16:38:30 -07001008 tANI_U32 statsReqPeriodicity; //stats request frequency from PE while in full power
1009 tANI_U32 statsReqPeriodicityInPS;//stats request frequency from PE while in power save
1010#ifdef WLAN_FEATURE_VOWIFI_11R
1011 tCsr11rConfigParams csr11rConfig;
1012#endif
1013#ifdef FEATURE_WLAN_CCX
1014 tANI_U8 isCcxIniFeatureEnabled;
1015#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001016#ifdef FEATURE_WLAN_LFR
1017 tANI_U8 isFastRoamIniFeatureEnabled;
1018#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001019
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001020#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
Jeff Johnson295189b2012-06-20 16:38:30 -07001021 tANI_U8 isFastTransitionEnabled;
Jeff Johnson43971f52012-07-17 12:26:56 -07001022 tANI_U8 RoamRssiDiff;
Madan Mohan Koyyalamudif4289db2012-12-03 16:45:39 -08001023 tANI_U8 nImmediateRoamRssiDiff;
Jeff Johnson295189b2012-06-20 16:38:30 -07001024#endif
1025
1026#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
1027 tCsrNeighborRoamConfigParams neighborRoamConfig;
1028#endif
1029
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001030 /* Instead of Reassoc, send ADDTS/DELTS even when ACM is off for that AC
Jeff Johnson295189b2012-06-20 16:38:30 -07001031 * This is mandated by WMM-AC certification */
1032 tANI_BOOLEAN addTSWhenACMIsOff;
1033
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001034
1035 /*channelPowerInfoList24 has been seen corrupted. Set this flag to true trying to
Jeff Johnson295189b2012-06-20 16:38:30 -07001036 * detect when it happens. Adding this into code because we can't reproduce it easily.
1037 * We don't know when it happens. */
1038 tANI_BOOLEAN fValidateList;
1039
1040 /*Customer wants to start with an active scan based on the default country code.
1041 * This optimization will minimize the driver load to association time.
1042 * Based on this flag we will bypass the initial passive scan needed for 11d
1043 * to determine the country code & domain */
1044 tANI_BOOLEAN fEnableBypass11d;
1045
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001046 /*Customer wants to optimize the scan time. Avoiding scans(passive) on DFS
1047 * channels while swipping through both bands can save some time
Jeff Johnson295189b2012-06-20 16:38:30 -07001048 * (apprx 1.3 sec) */
1049 tANI_BOOLEAN fEnableDFSChnlScan;
1050
1051 //To enable/disable scanning 2.4Ghz channels twice on a single scan request from HDD
1052 tANI_BOOLEAN fScanTwice;
Jeff Johnsone7245742012-09-05 17:12:55 -07001053#ifdef WLAN_FEATURE_11AC
1054 tANI_U32 nVhtChannelWidth;
Shailender Karmuchi31f9ebe2013-01-17 12:51:24 -08001055 tANI_U8 enableTxBF;
Shailender Karmuchi95934c32013-02-16 18:18:33 -08001056 tANI_U8 txBFCsnValue;
Jeff Johnsone7245742012-09-05 17:12:55 -07001057#endif
1058
1059 /*
1060 * To enable/disable scanning only 2.4Ghz channels on first scan
1061 */
1062 tANI_BOOLEAN fFirstScanOnly2GChnl;
Jeff Johnson295189b2012-06-20 16:38:30 -07001063
Madan Mohan Koyyalamudi3f65e312012-11-06 15:31:12 -08001064 tANI_BOOLEAN fIgnore_chan165;
Madan Mohan Koyyalamudic4c01172012-11-30 14:56:21 -08001065#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
1066 tANI_BOOLEAN nRoamPrefer5GHz;
1067#endif
Gopichand Nakkalab7ed0a62013-01-04 11:41:02 -08001068
Madan Mohan Koyyalamudi7da2fd72012-12-17 14:44:16 -08001069 tANI_U8 scanCfgAgingTime;
Gopichand Nakkalab7ed0a62013-01-04 11:41:02 -08001070
1071 tANI_U8 enableTxLdpc;
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001072}tCsrConfigParam;
Jeff Johnson295189b2012-06-20 16:38:30 -07001073
1074//Tush
1075typedef struct tagCsrUpdateConfigParam
1076{
1077 tCsr11dinfo Csr11dinfo;
1078}tCsrUpdateConfigParam;
1079
1080typedef struct tagCsrRoamInfo
1081{
1082 tCsrRoamProfile *pProfile; //may be NULL
1083 tSirBssDescription *pBssDesc; //May be NULL
1084 tANI_U32 nBeaconLength; //the length, in bytes, of the beacon frame, can be 0
1085 tANI_U32 nAssocReqLength; //the length, in bytes, of the assoc req frame, can be 0
1086 tANI_U32 nAssocRspLength; //The length, in bytes, of the assoc rsp frame, can be 0
1087 tANI_U32 nFrameLength;
1088 tANI_U8 frameType;
1089 tANI_U8 *pbFrames; //Point to a buffer contain the beacon, assoc req, assoc rsp frame, in that order
1090 //user needs to use nBeaconLength, nAssocReqLength, nAssocRspLength to desice where
1091 //each frame starts and ends.
1092 tANI_BOOLEAN fReassocReq; //set to true if for re-association
1093 tANI_BOOLEAN fReassocRsp; //set to true if for re-association
1094 tCsrBssid bssid;
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001095 //Only valid in IBSS
Jeff Johnson295189b2012-06-20 16:38:30 -07001096 //this is the peers MAC address for eCSR_ROAM_RESULT_IBSS_NEW_PEER or PEER_DEPARTED
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001097 tCsrBssid peerMac;
Jeff Johnson295189b2012-06-20 16:38:30 -07001098 tSirResultCodes statusCode;
1099 tANI_U32 reasonCode; //this could be our own defined or sent from the other BSS(per 802.11 spec)
1100 tANI_U8 staId; // Peer stationId when connected
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001101 /*The DPU signatures will be sent eventually to TL to help it determine the
Jeff Johnson295189b2012-06-20 16:38:30 -07001102 association to which a packet belongs to*/
1103 /*Unicast DPU signature*/
1104 tANI_U8 ucastSig;
1105
1106 /*Broadcast DPU signature*/
1107 tANI_U8 bcastSig;
1108
1109 tANI_BOOLEAN fAuthRequired; //FALSE means auth needed from supplicant. TRUE means authenticated(static WEP, open)
1110 tANI_U8 sessionId;
1111 tANI_U8 rsnIELen;
1112 tANI_U8 *prsnIE;
1113
1114 tANI_U8 addIELen;
1115 tANI_U8 *paddIE;
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001116
Jeff Johnson295189b2012-06-20 16:38:30 -07001117 union
1118 {
1119 tSirMicFailureInfo *pMICFailureInfo;
1120 tCsrRoamConnectedProfile *pConnectedProfile;
Jeff Johnson295189b2012-06-20 16:38:30 -07001121 tSirWPSPBCProbeReq *pWPSPBCProbeReq;
Jeff Johnson295189b2012-06-20 16:38:30 -07001122 } u;
1123
Jeff Johnson295189b2012-06-20 16:38:30 -07001124 tANI_BOOLEAN wmmEnabledSta; //set to true if WMM enabled STA
1125 tANI_U32 dtimPeriod;
Jeff Johnson295189b2012-06-20 16:38:30 -07001126
1127#ifdef FEATURE_WLAN_CCX
1128 tANI_BOOLEAN isCCXAssoc;
1129#endif
1130#ifdef WLAN_FEATURE_P2P
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001131 void* pRemainCtx;
Jeff Johnson295189b2012-06-20 16:38:30 -07001132 tANI_U32 rxChan;
1133#endif
1134
Mohit Khannac0b992f2012-12-04 15:08:18 -08001135#ifdef FEATURE_WLAN_TDLS
1136 tANI_U8 staType;
1137#endif
1138
Jeff Johnson295189b2012-06-20 16:38:30 -07001139 // Required for indicating the frames to upper layer
1140 tANI_U32 beaconLength;
1141 tANI_U8* beaconPtr;
1142 tANI_U32 assocReqLength;
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001143 tANI_U8* assocReqPtr;
Chilam NGde0b4112013-01-19 12:27:36 +05301144
1145 tANI_S8 rxRssi;
Jeff Johnson295189b2012-06-20 16:38:30 -07001146}tCsrRoamInfo;
1147
1148
1149
1150
1151
1152typedef struct tagCsrFreqScanInfo
1153{
1154 tANI_U32 nStartFreq; //in unit of MHz
1155 tANI_U32 nEndFreq; //in unit of MHz
1156 tSirScanType scanType;
1157}tCsrFreqScanInfo;
1158
1159
Jeff Johnson295189b2012-06-20 16:38:30 -07001160typedef struct sSirSmeAssocIndToUpperLayerCnf
1161{
1162 tANI_U16 messageType; // eWNI_SME_ASSOC_CNF
1163 tANI_U16 length;
1164 tANI_U8 sessionId;
1165 tSirResultCodes statusCode;
1166 tSirMacAddr bssId; // Self BSSID
1167 tSirMacAddr peerMacAddr;
1168 tANI_U16 aid;
1169 tSirMacAddr alternateBssId;
1170 tANI_U8 alternateChannelId;
1171 tANI_U8 wmmEnabledSta; //set to true if WMM enabled STA
1172 tSirRSNie rsnIE; // RSN IE received from peer
1173 tSirAddie addIE; // Additional IE received from peer, which can be WSC and/or P2P IE
1174 tANI_U8 reassocReq; //set to true if reassoc
1175} tSirSmeAssocIndToUpperLayerCnf, *tpSirSmeAssocIndToUpperLayerCnf;
Jeff Johnson295189b2012-06-20 16:38:30 -07001176
1177typedef struct tagCsrSummaryStatsInfo
1178{
1179 tANI_U32 retry_cnt[4];
1180 tANI_U32 multiple_retry_cnt[4];
1181 tANI_U32 tx_frm_cnt[4];
1182 //tANI_U32 num_rx_frm_crc_err; same as rx_error_cnt
1183 //tANI_U32 num_rx_frm_crc_ok; same as rx_frm_cnt
1184 tANI_U32 rx_frm_cnt;
1185 tANI_U32 frm_dup_cnt;
1186 tANI_U32 fail_cnt[4];
1187 tANI_U32 rts_fail_cnt;
1188 tANI_U32 ack_fail_cnt;
1189 tANI_U32 rts_succ_cnt;
1190 tANI_U32 rx_discard_cnt;
1191 tANI_U32 rx_error_cnt;
1192 tANI_U32 tx_byte_cnt;
1193
1194}tCsrSummaryStatsInfo;
1195
1196typedef struct tagCsrGlobalClassAStatsInfo
1197{
1198 tANI_U32 rx_frag_cnt;
1199 tANI_U32 promiscuous_rx_frag_cnt;
1200 //tANI_U32 rx_fcs_err;
1201 tANI_U32 rx_input_sensitivity;
1202 tANI_U32 max_pwr;
1203 //tANI_U32 default_pwr;
1204 tANI_U32 sync_fail_cnt;
1205 tANI_U32 tx_rate;
1206 //mcs index for HT20 and HT40 rates
1207 tANI_U32 mcs_index;
1208 //to defferentiate between HT20 and HT40 rates;short and long guard interval
1209 tANI_U32 tx_rate_flags;
1210
1211}tCsrGlobalClassAStatsInfo;
1212
1213typedef struct tagCsrGlobalClassBStatsInfo
1214{
1215 tANI_U32 uc_rx_wep_unencrypted_frm_cnt;
1216 tANI_U32 uc_rx_mic_fail_cnt;
1217 tANI_U32 uc_tkip_icv_err;
1218 tANI_U32 uc_aes_ccmp_format_err;
1219 tANI_U32 uc_aes_ccmp_replay_cnt;
1220 tANI_U32 uc_aes_ccmp_decrpt_err;
1221 tANI_U32 uc_wep_undecryptable_cnt;
1222 tANI_U32 uc_wep_icv_err;
1223 tANI_U32 uc_rx_decrypt_succ_cnt;
1224 tANI_U32 uc_rx_decrypt_fail_cnt;
1225 tANI_U32 mcbc_rx_wep_unencrypted_frm_cnt;
1226 tANI_U32 mcbc_rx_mic_fail_cnt;
1227 tANI_U32 mcbc_tkip_icv_err;
1228 tANI_U32 mcbc_aes_ccmp_format_err;
1229 tANI_U32 mcbc_aes_ccmp_replay_cnt;
1230 tANI_U32 mcbc_aes_ccmp_decrpt_err;
1231 tANI_U32 mcbc_wep_undecryptable_cnt;
1232 tANI_U32 mcbc_wep_icv_err;
1233 tANI_U32 mcbc_rx_decrypt_succ_cnt;
1234 tANI_U32 mcbc_rx_decrypt_fail_cnt;
1235
1236}tCsrGlobalClassBStatsInfo;
1237
1238typedef struct tagCsrGlobalClassCStatsInfo
1239{
1240 tANI_U32 rx_amsdu_cnt;
1241 tANI_U32 rx_ampdu_cnt;
1242 tANI_U32 tx_20_frm_cnt;
1243 tANI_U32 rx_20_frm_cnt;
1244 tANI_U32 rx_mpdu_in_ampdu_cnt;
1245 tANI_U32 ampdu_delimiter_crc_err;
1246
1247}tCsrGlobalClassCStatsInfo;
1248
1249typedef struct tagCsrGlobalClassDStatsInfo
1250{
1251 tANI_U32 tx_uc_frm_cnt;
1252 tANI_U32 tx_mc_frm_cnt;
1253 tANI_U32 tx_bc_frm_cnt;
1254 tANI_U32 rx_uc_frm_cnt;
1255 tANI_U32 rx_mc_frm_cnt;
1256 tANI_U32 rx_bc_frm_cnt;
1257 tANI_U32 tx_uc_byte_cnt[4];
1258 tANI_U32 tx_mc_byte_cnt;
1259 tANI_U32 tx_bc_byte_cnt;
1260 tANI_U32 rx_uc_byte_cnt[4];
1261 tANI_U32 rx_mc_byte_cnt;
1262 tANI_U32 rx_bc_byte_cnt;
1263 tANI_U32 rx_byte_cnt;
1264 tANI_U32 num_rx_bytes_crc_ok;
1265 tANI_U32 rx_rate;
1266
1267}tCsrGlobalClassDStatsInfo;
1268
1269typedef struct tagCsrPerStaStatsInfo
1270{
1271 tANI_U32 tx_frag_cnt[4];
1272 tANI_U32 tx_ampdu_cnt;
1273 tANI_U32 tx_mpdu_in_ampdu_cnt;
1274} tCsrPerStaStatsInfo;
1275
1276typedef struct tagCsrRoamSetKey
1277{
1278 eCsrEncryptionType encType;
1279 tAniKeyDirection keyDirection; //Tx, Rx or Tx-and-Rx
1280 tCsrBssid peerMac; //Peers MAC address. ALL 1's for group key
1281 tANI_U8 paeRole; //0 for supplicant
1282 tANI_U8 keyId; // Kye index
1283 tANI_U16 keyLength; //Number of bytes containing the key in pKey
1284 tANI_U8 Key[CSR_MAX_KEY_LEN];
1285 tANI_U8 keyRsc[CSR_MAX_RSC_LEN];
1286} tCsrRoamSetKey;
1287
1288typedef struct tagCsrRoamRemoveKey
1289{
1290 eCsrEncryptionType encType;
1291 tCsrBssid peerMac; //Peers MAC address. ALL 1's for group key
1292 tANI_U8 keyId; //key index
1293} tCsrRoamRemoveKey;
1294
Mohit Khannac0b992f2012-12-04 15:08:18 -08001295#ifdef FEATURE_WLAN_TDLS
1296typedef struct tagCsrTdlsSendMgmt
1297{
1298 tSirMacAddr peerMac;
1299 tANI_U8 frameType;
1300 tANI_U8 dialog;
1301 tANI_U16 statusCode;
Hoonki Leed90d1482013-02-05 22:56:02 -08001302 tANI_U8 responder;
Mohit Khannac0b992f2012-12-04 15:08:18 -08001303 tANI_U8 *buf;
1304 tANI_U8 len;
1305
1306}tCsrTdlsSendMgmt;
1307
1308#ifdef FEATURE_WLAN_TDLS_INTERNAL
1309typedef struct tagCsrTdlsDisRequest
1310{
1311 tSirMacAddr peerMac;
1312 tANI_U8 disType;
1313}tCsrTdlsDisRequest;
1314
1315typedef struct tagCsrTdlsSetupRequest
1316{
1317 tSirMacAddr peerMac;
1318 tANI_U8 linkIndex;
1319}tCsrTdlsSetupRequest;
1320
1321typedef struct tagCsrTdlsTeardownRequest
1322{
1323 tSirMacAddr peerMac;
1324 tANI_U8 linkIndex;
1325}tCsrTdlsTeardownRequest ;
1326#endif
1327#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001328
1329typedef void * tScanResultHandle;
1330
1331#define CSR_INVALID_SCANRESULT_HANDLE (NULL)
1332
1333
1334
1335////////////////////////////////////////////Common SCAN starts
1336
1337//void *p2 -- the second context pass in for the caller
1338//***what if callback is called before requester gets the scanId??
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001339typedef eHalStatus (*csrScanCompleteCallback)(tHalHandle, void *p2, tANI_U32 scanID, eCsrScanStatus status);
Jeff Johnson295189b2012-06-20 16:38:30 -07001340
1341
1342
1343///////////////////////////////////////////Common Roam starts
1344
1345//pContext is the pContext passed in with the roam request
1346//pParam is a pointer to a tCsrRoamInfo, see definition of eRoamCmdStatus and
1347// eRoamCmdResult for detail valid members. It may be NULL
1348//roamId is to identify the callback related roam request. 0 means unsolicit
1349//roamStatus is a flag indicating the status of the callback
1350//roamResult is the result
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001351typedef eHalStatus (*csrRoamCompleteCallback)(void *pContext, tCsrRoamInfo *pParam, tANI_U32 roamId,
Jeff Johnson295189b2012-06-20 16:38:30 -07001352 eRoamCmdStatus roamStatus, eCsrRoamResult roamResult);
1353
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001354typedef eHalStatus (*csrRoamSessionCloseCallback)(void *pContext);
Jeff Johnson295189b2012-06-20 16:38:30 -07001355
1356/* ---------------------------------------------------------------------------
1357 \fn csrRoamGetNumPMKIDCache
1358 \brief return number of PMKID cache entries
1359 \return tANI_U32 - the number of PMKID cache entries
1360 -------------------------------------------------------------------------------*/
1361//tANI_U32 csrRoamGetNumPMKIDCache(tHalHandle hHal);
1362
1363/* ---------------------------------------------------------------------------
1364 \fn csrRoamGetPMKIDCache
1365 \brief return PMKID cache from CSR
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001366 \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 -07001367 needed or actually number in tPmkidCacheInfo.
1368 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if any, upon return
1369 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
1370 -------------------------------------------------------------------------------*/
1371//eHalStatus csrRoamGetPMKIDCache(tHalHandle hHal, tANI_U32 *pNum, tPmkidCacheInfo *pPmkidCache);
1372
1373//pProfile - pointer to tCsrRoamProfile
1374#define CSR_IS_START_IBSS(pProfile) (eCSR_BSS_TYPE_START_IBSS == (pProfile)->BSSType)
1375#define CSR_IS_JOIN_TO_IBSS(pProfile) (eCSR_BSS_TYPE_IBSS == (pProfile)->BSSType)
1376#define CSR_IS_IBSS(pProfile) ( CSR_IS_START_IBSS(pProfile) || CSR_IS_JOIN_TO_IBSS(pProfile) )
1377#define CSR_IS_INFRASTRUCTURE(pProfile) (eCSR_BSS_TYPE_INFRASTRUCTURE == (pProfile)->BSSType)
1378#define CSR_IS_ANY_BSS_TYPE(pProfile) (eCSR_BSS_TYPE_ANY == (pProfile)->BSSType)
1379#define CSR_IS_WDS_AP( pProfile ) ( eCSR_BSS_TYPE_WDS_AP == (pProfile)->BSSType )
1380#define CSR_IS_WDS_STA( pProfile ) ( eCSR_BSS_TYPE_WDS_STA == (pProfile)->BSSType )
1381#define CSR_IS_WDS( pProfile ) ( CSR_IS_WDS_AP( pProfile ) || CSR_IS_WDS_STA( pProfile ) )
Jeff Johnson295189b2012-06-20 16:38:30 -07001382#define CSR_IS_INFRA_AP( pProfile ) ( eCSR_BSS_TYPE_INFRA_AP == (pProfile)->BSSType )
Jeff Johnson295189b2012-06-20 16:38:30 -07001383
1384//pProfile - pointer to tCsrRoamConnectedProfile
Jeff Johnson295189b2012-06-20 16:38:30 -07001385#define CSR_IS_CONN_INFRA_AP( pProfile ) ( eCSR_BSS_TYPE_INFRA_AP == (pProfile)->BSSType )
Jeff Johnson295189b2012-06-20 16:38:30 -07001386#define CSR_IS_CONN_WDS_AP( pProfile ) ( eCSR_BSS_TYPE_WDS_AP == (pProfile)->BSSType )
1387#define CSR_IS_CONN_WDS_STA( pProfile ) ( eCSR_BSS_TYPE_WDS_STA == (pProfile)->BSSType )
1388#define CSR_IS_CONN_WDS( pProfile ) ( CSR_IS_WDS_AP( pProfile ) || CSR_IS_WDS_STA( pProfile ) )
1389
1390
1391
1392///////////////////////////////////////////Common Roam ends
1393
1394
1395
Jeff Johnson295189b2012-06-20 16:38:30 -07001396/* ---------------------------------------------------------------------------
1397 \fn csrSetChannels
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001398 \brief HDD calls this function to change some global settings.
Jeff Johnson295189b2012-06-20 16:38:30 -07001399 caller must set the all fields or call csrGetConfigParam to prefill the fields.
1400 \param pParam - caller allocated memory
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001401 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001402 -------------------------------------------------------------------------------*/
1403
1404eHalStatus csrSetChannels(tHalHandle hHal, tCsrConfigParam *pParam );
1405
1406eHalStatus csrSetRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode);
Jeff Johnson295189b2012-06-20 16:38:30 -07001407
1408
1409//enum to string conversion for debug output
1410const char * get_eRoamCmdStatus_str(eRoamCmdStatus val);
1411const char * get_eCsrRoamResult_str(eCsrRoamResult val);
1412/* ---------------------------------------------------------------------------
1413 \fn csrSetPhyMode
1414 \brief HDD calls this function to set the phyMode.
1415 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1416 CSR.
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001417 \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 -07001418 See eCsrPhyMode for definition
1419 \param eBand - specify the operational band (2.4, 5 or both)
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001420 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
Jeff Johnson295189b2012-06-20 16:38:30 -07001421 a restart is needed to apply the change
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001422 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001423 -------------------------------------------------------------------------------*/
1424eHalStatus csrSetPhyMode(tHalHandle hHal, tANI_U32 phyMode, eCsrBand eBand, tANI_BOOLEAN *pfRestartNeeded);
1425
1426void csrDumpInit(tHalHandle hHal);
1427
1428
1429/*---------------------------------------------------------------------------
1430 This is the type for a link quality callback to be registered with SME
1431 for indications
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001432 Once the link quality has been indicated, subsequently, link indications are
Jeff Johnson295189b2012-06-20 16:38:30 -07001433 posted each time there is a CHANGE in link quality.
1434 *** If there is no change in link, there will be no indication ***
1435
1436 The indications may be based on one or more criteria internal to SME
1437 such as RSSI and PER.
1438
1439 \param ind - Indication being posted
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001440 \param pContext - any user data given at callback registration.
Jeff Johnson295189b2012-06-20 16:38:30 -07001441 \return None
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001442
Jeff Johnson295189b2012-06-20 16:38:30 -07001443---------------------------------------------------------------------------*/
1444typedef void (* csrRoamLinkQualityIndCallback)
1445 (eCsrRoamLinkQualityInd ind, void *pContext);
1446
1447
1448/*---------------------------------------------------------------------------
1449 This is the type for a statistics callback to be registered with SME
1450 for stats reporting
1451
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001452 Since the client requesting for the stats already know which class/type of
1453 stats it asked for, the callback will carry them in the rsp buffer
1454 (void * stats) whose size will be same as the size of requested stats &
Jeff Johnson295189b2012-06-20 16:38:30 -07001455 will be exactly in the same order requested in the stats mask from LSB to MSB
1456
1457 \param stats - stats rsp buffer sent back with the report
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001458 \param pContext - any user data given at callback registration.
Jeff Johnson295189b2012-06-20 16:38:30 -07001459 \return None
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001460
Jeff Johnson295189b2012-06-20 16:38:30 -07001461---------------------------------------------------------------------------*/
1462typedef void ( *tCsrStatsCallback) (void * stats, void *pContext);
1463
1464/*---------------------------------------------------------------------------
1465 This is the type for a rssi callback to be registered with SME
1466 for getting rssi
1467
1468 \param rssi - rssi
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001469 \param pContext - any user data given at callback registration.
Jeff Johnson295189b2012-06-20 16:38:30 -07001470 \return None
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001471
Jeff Johnson295189b2012-06-20 16:38:30 -07001472---------------------------------------------------------------------------*/
1473
1474typedef void ( *tCsrRssiCallback) (v_S7_t rssi, tANI_U32 staId, void *pContext);
1475
1476#ifdef WLAN_FEATURE_VOWIFI_11R
1477eHalStatus csrRoamIssueFTPreauthReq(tHalHandle hHal, tANI_U32 sessionId, tpSirBssDescription pBssDescription);
1478#endif
1479
1480/*---------------------------------------------------------------------------
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001481 This is the function to change the Band configuraiton (ALL/2.4 GHZ/5 GHZ)
Jeff Johnson295189b2012-06-20 16:38:30 -07001482
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001483 \param hHal - handle to Hal context
Jeff Johnson295189b2012-06-20 16:38:30 -07001484 \param eBand - band value
1485 \return eHalStatus
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001486
Jeff Johnson295189b2012-06-20 16:38:30 -07001487---------------------------------------------------------------------------*/
1488eHalStatus csrSetBand(tHalHandle hHal, eCsrBand eBand);
1489
1490/*---------------------------------------------------------------------------
1491 This is the function to get the current operating band value
1492 \param hHal - handl to Hal context
1493 \return eCsrband - band value
Kiran Kumar Lokere30b07722013-02-24 22:21:28 -08001494
Jeff Johnson295189b2012-06-20 16:38:30 -07001495---------------------------------------------------------------------------*/
1496eCsrBand csrGetCurrentBand (tHalHandle hHal);
1497
1498#endif
1499