blob: 01e6faf23d777bfaeca34fe00471140e88ec9c94 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Jeff Johnson32d95a32012-09-10 13:15:23 -07002 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
Jeff Johnson295189b2012-06-20 16:38:30 -07003 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21
22/** ------------------------------------------------------------------------- *
23 ------------------------------------------------------------------------- *
24 \file csrApi.h
25
26 Exports and types for the Common Scan and Roaming Module interfaces.
27
28 Copyright (C) 2006 Airgo Networks, Incorporated
29 ========================================================================== */
30#ifndef CSRAPI_H__
31#define CSRAPI_H__
32
33#include "sirApi.h"
34#include "sirMacProtDef.h"
35#ifdef FEATURE_WLAN_NON_INTEGRATED_SOC
36#include "halRfTypes.h"
37#endif
38#include "csrLinkList.h"
39
40typedef enum
41{
42 eCSR_AUTH_TYPE_NONE, //never used
43 // MAC layer authentication types
44 eCSR_AUTH_TYPE_OPEN_SYSTEM,
45 eCSR_AUTH_TYPE_SHARED_KEY,
46 eCSR_AUTH_TYPE_AUTOSWITCH,
47
48 // Upper layer authentication types
49 eCSR_AUTH_TYPE_WPA,
50 eCSR_AUTH_TYPE_WPA_PSK,
51 eCSR_AUTH_TYPE_WPA_NONE,
52
53 eCSR_AUTH_TYPE_RSN,
54 eCSR_AUTH_TYPE_RSN_PSK,
55#if defined WLAN_FEATURE_VOWIFI_11R
56 eCSR_AUTH_TYPE_FT_RSN,
57 eCSR_AUTH_TYPE_FT_RSN_PSK,
58#endif
59#ifdef FEATURE_WLAN_WAPI
60 eCSR_AUTH_TYPE_WAPI_WAI_CERTIFICATE,
61 eCSR_AUTH_TYPE_WAPI_WAI_PSK,
62#endif /* FEATURE_WLAN_WAPI */
63#ifdef FEATURE_WLAN_CCX
64 eCSR_AUTH_TYPE_CCKM_WPA,
65 eCSR_AUTH_TYPE_CCKM_RSN,
66#endif /* FEATURE_WLAN_CCX */
67 eCSR_NUM_OF_SUPPORT_AUTH_TYPE,
68 eCSR_AUTH_TYPE_FAILED = 0xff,
69 eCSR_AUTH_TYPE_UNKNOWN = eCSR_AUTH_TYPE_FAILED,
70
71}eCsrAuthType;
72
73
74typedef enum
75{
76 eCSR_ENCRYPT_TYPE_NONE,
77 eCSR_ENCRYPT_TYPE_WEP40_STATICKEY,
78 eCSR_ENCRYPT_TYPE_WEP104_STATICKEY,
79
80 eCSR_ENCRYPT_TYPE_WEP40,
81 eCSR_ENCRYPT_TYPE_WEP104,
82 eCSR_ENCRYPT_TYPE_TKIP,
83 eCSR_ENCRYPT_TYPE_AES,
84#ifdef FEATURE_WLAN_WAPI
85 eCSR_ENCRYPT_TYPE_WPI, //WAPI
86#endif /* FEATURE_WLAN_WAPI */
87#ifdef FEATURE_WLAN_CCX
88 eCSR_ENCRYPT_TYPE_KRK,
89#endif /* FEATURE_WLAN_CCX */
90#ifdef WLAN_FEATURE_11W
91 //11w BIP
92 eCSR_ENCRYPT_TYPE_AES_CMAC,
93#endif
94 eCSR_ENCRYPT_TYPE_ANY,
95 eCSR_NUM_OF_ENCRYPT_TYPE = eCSR_ENCRYPT_TYPE_ANY,
96
97 eCSR_ENCRYPT_TYPE_FAILED = 0xff,
98 eCSR_ENCRYPT_TYPE_UNKNOWN = eCSR_ENCRYPT_TYPE_FAILED,
99
100}eCsrEncryptionType;
101
102/*---------------------------------------------------------------------------
103 Enumeration of the various Security types
104---------------------------------------------------------------------------*/
105typedef enum
106{
107 eCSR_SECURITY_TYPE_WPA,
108 eCSR_SECURITY_TYPE_RSN,
109#ifdef FEATURE_WLAN_WAPI
110 eCSR_SECURITY_TYPE_WAPI,
111#endif /* FEATURE_WLAN_WAPI */
112 eCSR_SECURITY_TYPE_UNKNOWN,
113
114}eCsrSecurityType;
115
116typedef enum
117{
118 eCSR_DOT11_MODE_TAURUS = 0, //This mean everything because it covers all thing we support
119 eCSR_DOT11_MODE_abg = 0x0001, //11a/b/g only, no HT, no proprietary
120 eCSR_DOT11_MODE_11a = 0x0002,
121 eCSR_DOT11_MODE_11b = 0x0004,
122 eCSR_DOT11_MODE_11g = 0x0008,
123 eCSR_DOT11_MODE_11n = 0x0010,
124 eCSR_DOT11_MODE_POLARIS = 0x0020,
125 eCSR_DOT11_MODE_TITAN = 0x0040,
126 eCSR_DOT11_MODE_11g_ONLY = 0x0080,
127 eCSR_DOT11_MODE_11n_ONLY = 0x0100,
128 eCSR_DOT11_MODE_TAURUS_ONLY = 0x0200,
129 eCSR_DOT11_MODE_11b_ONLY = 0x0400,
130 eCSR_DOT11_MODE_11a_ONLY = 0x0800,
Jeff Johnsone7245742012-09-05 17:12:55 -0700131#ifdef WLAN_FEATURE_11AC
132 eCSR_DOT11_MODE_11ac = 0x1000,
133 eCSR_DOT11_MODE_11ac_ONLY = 0x2000,
134#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700135 //This is for WIFI test. It is same as eWNIAPI_MAC_PROTOCOL_ALL except when it starts IBSS in 11B of 2.4GHz
136 //It is for CSR internal use
Jeff Johnsone7245742012-09-05 17:12:55 -0700137 eCSR_DOT11_MODE_AUTO = 0x4000,
Jeff Johnson295189b2012-06-20 16:38:30 -0700138
139 eCSR_NUM_PHY_MODE = 16, //specify the number of maximum bits for phyMode
140}eCsrPhyMode;
141
142
143typedef tANI_U8 tCsrBssid[WNI_CFG_BSSID_LEN];
144
145typedef enum
146{
147 eCSR_BSS_TYPE_INFRASTRUCTURE,
148#ifdef WLAN_SOFTAP_FEATURE
149 eCSR_BSS_TYPE_INFRA_AP, // SoftAP AP
150#endif
151 eCSR_BSS_TYPE_IBSS, // an IBSS network we will NOT start
152 eCSR_BSS_TYPE_START_IBSS, // an IBSS network we will start if no partners detected.
153 eCSR_BSS_TYPE_WDS_AP, // BT-AMP AP
154 eCSR_BSS_TYPE_WDS_STA, // BT-AMP station
155 eCSR_BSS_TYPE_ANY, // any BSS type (IBSS or Infrastructure).
156}eCsrRoamBssType;
157
158
159
160typedef enum {
161 eCSR_SCAN_REQUEST_11D_SCAN = 1,
162 eCSR_SCAN_REQUEST_FULL_SCAN,
163 eCSR_SCAN_IDLE_MODE_SCAN,
164 eCSR_SCAN_HO_BG_SCAN, // bg scan request in NRT & RT Handoff sub-states
165 eCSR_SCAN_HO_PROBE_SCAN, // directed probe on an entry from the candidate list
166 eCSR_SCAN_HO_NT_BG_SCAN, // bg scan request in NT sub-state
167 eCSR_SCAN_P2P_DISCOVERY,
168
169 eCSR_SCAN_SOFTAP_CHANNEL_RANGE,
170 eCSR_SCAN_P2P_FIND_PEER,
171}eCsrRequestType;
172
173typedef enum {
174 eCSR_SCAN_RESULT_GET = 0,
175 eCSR_SCAN_RESULT_FLUSH = 1, //to delete all cached scan results
176}eCsrScanResultCmd;
177
178typedef enum
179{
180 eCSR_SCAN_SUCCESS,
181 eCSR_SCAN_FAILURE,
182 eCSR_SCAN_ABORT,
183 eCSR_SCAN_FOUND_PEER,
184}eCsrScanStatus;
185
186#define CSR_SCAN_TIME_DEFAULT 0
187#define CSR_VALUE_IGNORED 0xFFFFFFFF
188#define CSR_RSN_PMKID_SIZE 16
189#define CSR_MAX_PMKID_ALLOWED 16
190#define CSR_WEP40_KEY_LEN 5
191#define CSR_WEP104_KEY_LEN 13
192#define CSR_TKIP_KEY_LEN 32
193#define CSR_AES_KEY_LEN 16
194#define CSR_MAX_TX_POWER ( WNI_CFG_CURRENT_TX_POWER_LEVEL_STAMAX )
195#define CSR_MAX_RSC_LEN 16
196#ifdef FEATURE_WLAN_WAPI
197#define CSR_WAPI_BKID_SIZE 16
198#define CSR_MAX_BKID_ALLOWED 16
199#define CSR_WAPI_KEY_LEN 32
200#define CSR_MAX_KEY_LEN ( CSR_WAPI_KEY_LEN ) //longest one is for WAPI
201#else
202#define CSR_MAX_KEY_LEN ( CSR_TKIP_KEY_LEN ) //longest one is for TKIP
203#endif /* FEATURE_WLAN_WAPI */
204#ifdef FEATURE_WLAN_CCX
205#define CSR_KRK_KEY_LEN 16
206#endif
207
208
209
210typedef struct tagCsrChannelInfo
211{
212 tANI_U8 numOfChannels;
213 tANI_U8 *ChannelList; //it will be an array of channels
214}tCsrChannelInfo;
215
216typedef struct tagCsrSSIDInfo
217{
218 tSirMacSSid SSID;
219 tANI_BOOLEAN handoffPermitted;
220 tANI_BOOLEAN ssidHidden;
221}tCsrSSIDInfo;
222
223typedef struct tagCsrSSIDs
224{
225 tANI_U32 numOfSSIDs;
226 tCsrSSIDInfo *SSIDList; //To be allocated for array of SSIDs
227}tCsrSSIDs;
228
229typedef struct tagCsrBSSIDs
230{
231 tANI_U32 numOfBSSIDs;
232 tCsrBssid *bssid;
233}tCsrBSSIDs;
234
235
236typedef struct tagCsrScanRequest
237{
238 tSirScanType scanType;
239 tCsrBssid bssid;
240 eCsrRoamBssType BSSType;
241 tCsrSSIDs SSIDs;
242 tCsrChannelInfo ChannelInfo;
243 tANI_U32 minChnTime; //in units of milliseconds
244 tANI_U32 maxChnTime; //in units of milliseconds
245 tANI_U32 restTime; //in units of milliseconds //ignored when not connected
246 tANI_U32 uIEFieldLen;
247 tANI_U8 *pIEField;
248 eCsrRequestType requestType; //11d scan or full scan
249#ifdef WLAN_FEATURE_P2P
250 tANI_BOOLEAN p2pSearch;
Jeff Johnsone7245742012-09-05 17:12:55 -0700251 tANI_BOOLEAN skipDfsChnlInP2pSearch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700252#endif
253}tCsrScanRequest;
254
255typedef struct tagCsrBGScanRequest
256{
257 tSirScanType scanType;
258 tSirMacSSid SSID;
259 tCsrChannelInfo ChannelInfo;
260 tANI_U32 scanInterval; //in units of milliseconds
261 tANI_U32 minChnTime; //in units of milliseconds
262 tANI_U32 maxChnTime; //in units of milliseconds
263 tANI_U32 restTime; //in units of milliseconds //ignored when not connected
264 tANI_U32 throughputImpact; //specify whether BG scan cares about impacting throughput //ignored when not connected
265 tCsrBssid bssid; //how to use it?? Apple
266}tCsrBGScanRequest;
267
268
269typedef struct tagCsrScanResultInfo
270{
271 //Carry the IEs for the current BSSDescription. A pointer to tDot11fBeaconIEs. Maybe NULL for start BSS.
272 void *pvIes;
273 tAniSSID ssId;
274 v_TIME_t timer; // timer is variable which is used for hidden SSID's timer value
275 //This member must be the last in the structure because the end of tSirBssDescription is an
276 // array with nonknown size at this time
277 tSirBssDescription BssDescriptor;
278}tCsrScanResultInfo;
279
280typedef struct tagCsrEncryptionList
281{
282
283 tANI_U32 numEntries;
284 eCsrEncryptionType encryptionType[eCSR_NUM_OF_ENCRYPT_TYPE];
285
286}tCsrEncryptionList, *tpCsrEncryptionList;
287
288typedef struct tagCsrAuthList
289{
290 tANI_U32 numEntries;
291 eCsrAuthType authType[eCSR_NUM_OF_SUPPORT_AUTH_TYPE];
292}tCsrAuthList, *tpCsrAuthList;
293
294#ifdef WLAN_FEATURE_VOWIFI_11R
295typedef struct tagCsrMobilityDomainInfo
296{
297 tANI_U8 mdiePresent;
298 tANI_U16 mobilityDomain;
299} tCsrMobilityDomainInfo;
300#endif
301
302#ifdef FEATURE_WLAN_CCX
303typedef struct tagCsrCcxCckmInfo
304{
305 tANI_U32 reassoc_req_num;
306 tANI_BOOLEAN krk_plumbed;
307 tANI_U8 krk[CSR_KRK_KEY_LEN];
308} tCsrCcxCckmInfo;
309#endif
310
311
312typedef struct tagCsrScanResultFilter
313{
314 tCsrBSSIDs BSSIDs; //each bssid has a length of WNI_CFG_BSSID_LEN (6)
315 tCsrSSIDs SSIDs;
316 tCsrChannelInfo ChannelInfo;
317 tCsrAuthList authType;
318 tCsrEncryptionList EncryptionType;
319 //eCSR_ENCRYPT_TYPE_ANY cannot be set in multicast encryption type. If caller doesn't case,
320 //put all supported encryption types in here
321 tCsrEncryptionList mcEncryptionType;
322 eCsrRoamBssType BSSType;
323 //this is a bit mask of all the needed phy mode defined in eCsrPhyMode
324 tANI_U32 phyMode;
325 //If countryCode[0] is not 0, countryCode is checked independent of fCheckUnknownCountryCode
326 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN];
327 tANI_U8 uapsd_mask;
328 /*For WPS filtering if true => auth and ecryption should be ignored*/
329 tANI_BOOLEAN bWPSAssociation;
330#if defined WLAN_FEATURE_VOWIFI
331 /*For measurement reports --> if set, only SSID, BSSID and channel is considered for filtering.*/
332 tANI_BOOLEAN fMeasurement;
333#endif
334#ifdef WLAN_FEATURE_VOWIFI_11R
335 tCsrMobilityDomainInfo MDID;
336#endif
337 tANI_BOOLEAN p2pResult;
338}tCsrScanResultFilter;
339
340
341typedef struct sCsrChnPower_
342{
343 tANI_U8 firstChannel;
344 tANI_U8 numChannels;
345 tANI_U8 maxtxPower;
346}sCsrChnPower;
347
348
349typedef struct sCsrChannel_
350{
351 tANI_U8 numChannels;
352 tANI_U8 channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
353}sCsrChannel;
354
355
356typedef struct tagCsr11dinfo
357{
358 sCsrChannel Channels;
359 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN+1];
360 //max power channel list
361 sCsrChnPower ChnPower[WNI_CFG_VALID_CHANNEL_LIST_LEN];
362}tCsr11dinfo;
363
364
365typedef enum
366{
367 eCSR_ROAM_CANCELLED = 1,
368 //this mean error happens before association_start or roaming_start is called.
369 eCSR_ROAM_FAILED,
370 //a CSR trigger roaming operation starts, callback may get a pointer to tCsrConnectedProfile
371 eCSR_ROAM_ROAMING_START,
372 //a CSR trigger roaming operation is completed
373 eCSR_ROAM_ROAMING_COMPLETION,
374 //Connection completed status.
375 eCSR_ROAM_CONNECT_COMPLETION,
376 //an association or start_IBSS operation starts,
377 //callback may get a pointer to tCsrRoamProfile and a pointer to tSirBssDescription
378 eCSR_ROAM_ASSOCIATION_START,
379 //a roaming operation is finish, see eCsrRoamResult for
380 //possible data passed back
381 eCSR_ROAM_ASSOCIATION_COMPLETION,
382 eCSR_ROAM_DISASSOCIATED,
383 eCSR_ROAM_ASSOCIATION_FAILURE,
384 //when callback with this flag. callback gets a pointer to the BSS desc.
385 eCSR_ROAM_SHOULD_ROAM,
386 //A new candidate for PMKID is found
387 eCSR_ROAM_SCAN_FOUND_NEW_BSS,
388 //CSR is done lostlink roaming and still cannot reconnect
389 eCSR_ROAM_LOSTLINK,
390 //a link lost is detected. CSR starts roaming.
391 eCSR_ROAM_LOSTLINK_DETECTED,
392 //TKIP MIC error detected, callback gets a pointer to tpSirSmeMicFailureInd
393 eCSR_ROAM_MIC_ERROR_IND,
394 eCSR_ROAM_IBSS_IND, //IBSS indications.
395 //Update the connection status, useful for IBSS: new peer added, network is active etc.
396 eCSR_ROAM_CONNECT_STATUS_UPDATE,
397 eCSR_ROAM_GEN_INFO,
398 eCSR_ROAM_SET_KEY_COMPLETE,
399 eCSR_ROAM_REMOVE_KEY_COMPLETE,
400 eCSR_ROAM_IBSS_LEAVE, //IBSS indications.
401 //BSS in WDS mode status indication
402 eCSR_ROAM_WDS_IND,
403#ifdef WLAN_SOFTAP_FEATURE
404 //BSS in SoftAP mode status indication
405 eCSR_ROAM_INFRA_IND,
406 eCSR_ROAM_WPS_PBC_PROBE_REQ_IND,
407#endif
408#ifdef WLAN_FEATURE_VOWIFI_11R
409 eCSR_ROAM_FT_RESPONSE,
410#endif
411 eCSR_ROAM_FT_START,
412 eCSR_ROAM_INDICATE_MGMT_FRAME,
413 eCSR_ROAM_REMAIN_CHAN_READY,
414 eCSR_ROAM_SEND_ACTION_CNF,
415 //this mean error happens before association_start or roaming_start is called.
416 eCSR_ROAM_SESSION_OPENED,
417 eCSR_ROAM_FT_REASSOC_FAILED,
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700418#ifdef FEATURE_WLAN_LFR
419 eCSR_ROAM_PMK_NOTIFY,
420#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700421}eRoamCmdStatus;
422
423
424//comment inside indicates what roaming callback gets
425typedef enum
426{
427 eCSR_ROAM_RESULT_NONE,
428 //this means no more action in CSR
429 //If roamStatus is eCSR_ROAM_ASSOCIATION_COMPLETION, tCsrRoamInfo's pBssDesc may pass back
430 eCSR_ROAM_RESULT_FAILURE,
431 //Pass back pointer to tCsrRoamInfo
432 eCSR_ROAM_RESULT_ASSOCIATED,
433 eCSR_ROAM_RESULT_NOT_ASSOCIATED,
434 eCSR_ROAM_RESULT_MIC_FAILURE,
435 eCSR_ROAM_RESULT_FORCED,
436 eCSR_ROAM_RESULT_DISASSOC_IND,
437 eCSR_ROAM_RESULT_DEAUTH_IND,
438 eCSR_ROAM_RESULT_CAP_CHANGED,
439 //This means we starts an IBSS
440 //tCsrRoamInfo's pBssDesc may pass back
441 eCSR_ROAM_RESULT_IBSS_STARTED,
442 //START_BSS failed
443 //tCsrRoamInfo's pBssDesc may pass back
444 eCSR_ROAM_RESULT_IBSS_START_FAILED,
445 eCSR_ROAM_RESULT_IBSS_JOIN_SUCCESS,
446 eCSR_ROAM_RESULT_IBSS_JOIN_FAILED,
447 eCSR_ROAM_RESULT_IBSS_CONNECT,
448 eCSR_ROAM_RESULT_IBSS_INACTIVE,
449 //If roamStatus is eCSR_ROAM_ASSOCIATION_COMPLETION
450 //tCsrRoamInfo's pBssDesc may pass back. and the peer's MAC address in peerMacOrBssid
451 //If roamStatus is eCSR_ROAM_IBSS_IND,
452 //the peer's MAC address in peerMacOrBssid and a beacon frame of the IBSS in pbFrames
453 eCSR_ROAM_RESULT_IBSS_NEW_PEER,
454 //Peer departed from IBSS, Callback may get a pointer tSmeIbssPeerInd in pIbssPeerInd
455 eCSR_ROAM_RESULT_IBSS_PEER_DEPARTED,
456 //Coalescing in the IBSS network (joined an IBSS network)
457 //Callback pass a BSSID in peerMacOrBssid
458 eCSR_ROAM_RESULT_IBSS_COALESCED,
459 //If roamStatus is eCSR_ROAM_ROAMING_START, callback may get a pointer to tCsrConnectedProfile used to connect.
460 eCSR_ROAM_RESULT_IBSS_STOP,
461 eCSR_ROAM_RESULT_LOSTLINK,
462 eCSR_ROAM_RESULT_MIC_ERROR_UNICAST,
463 eCSR_ROAM_RESULT_MIC_ERROR_GROUP,
464 eCSR_ROAM_RESULT_AUTHENTICATED,
465 eCSR_ROAM_RESULT_NEW_RSN_BSS,
466#ifdef FEATURE_WLAN_WAPI
467 eCSR_ROAM_RESULT_NEW_WAPI_BSS,
468#endif /* FEATURE_WLAN_WAPI */
469 // WDS started successfully
470 eCSR_ROAM_RESULT_WDS_STARTED,
471 // WDS start failed
472 eCSR_ROAM_RESULT_WDS_START_FAILED,
473 // WDS stopped
474 eCSR_ROAM_RESULT_WDS_STOPPED,
475 // WDS joined successfully in STA mode
476 eCSR_ROAM_RESULT_WDS_ASSOCIATED,
477 // A station joined WDS AP
478 eCSR_ROAM_RESULT_WDS_ASSOCIATION_IND,
479 // WDS join failed in STA mode
480 eCSR_ROAM_RESULT_WDS_NOT_ASSOCIATED,
481 // WDS disassociated
482 eCSR_ROAM_RESULT_WDS_DISASSOCIATED,
483#ifdef WLAN_SOFTAP_FEATURE
484 // INFRA started successfully
485 eCSR_ROAM_RESULT_INFRA_STARTED,
486 // INFRA start failed
487 eCSR_ROAM_RESULT_INFRA_START_FAILED,
488 // INFRA stopped
489 eCSR_ROAM_RESULT_INFRA_STOPPED,
490 // A station joining INFRA AP
491 eCSR_ROAM_RESULT_INFRA_ASSOCIATION_IND,
492 // A station joined INFRA AP
493 eCSR_ROAM_RESULT_INFRA_ASSOCIATION_CNF,
494 // INFRA disassociated
495 eCSR_ROAM_RESULT_INFRA_DISASSOCIATED,
496 eCSR_ROAM_RESULT_WPS_PBC_PROBE_REQ_IND,
497#endif
498#ifdef WLAN_FEATURE_P2P
499 eCSR_ROAM_RESULT_SEND_ACTION_FAIL,
500#endif
501 // peer rejected assoc because max assoc limit reached. callback gets pointer to peer
502 eCSR_ROAM_RESULT_MAX_ASSOC_EXCEEDED,
Jeff Johnsone7245742012-09-05 17:12:55 -0700503 //Assoc rejected due to concurrent session running on a different channel
504 eCSR_ROAM_RESULT_ASSOC_FAIL_CON_CHANNEL,
Jeff Johnson295189b2012-06-20 16:38:30 -0700505}eCsrRoamResult;
506
507
508
509/*----------------------------------------------------------------------------
510 List of link quality indications HDD can receive from SME
511-----------------------------------------------------------------------------*/
512typedef enum
513{
514 eCSR_ROAM_LINK_QUAL_MIN_IND = -1,
515
516 eCSR_ROAM_LINK_QUAL_POOR_IND = 0, /* bad link */
517 eCSR_ROAM_LINK_QUAL_GOOD_IND = 1, /* acceptable for voice */
518 eCSR_ROAM_LINK_QUAL_VERY_GOOD_IND = 2, /* suitable for voice */
519 eCSR_ROAM_LINK_QUAL_EXCELLENT_IND = 3, /* suitable for voice */
520
521 eCSR_ROAM_LINK_QUAL_MAX_IND /* invalid value */
522
523} eCsrRoamLinkQualityInd;
524
525typedef enum
526{
527 eCSR_DISCONNECT_REASON_UNSPECIFIED = 0,
528 eCSR_DISCONNECT_REASON_MIC_ERROR,
529 eCSR_DISCONNECT_REASON_DISASSOC,
530 eCSR_DISCONNECT_REASON_DEAUTH,
531 eCSR_DISCONNECT_REASON_HANDOFF,
532 eCSR_DISCONNECT_REASON_IBSS_JOIN_FAILURE,
533 eCSR_DISCONNECT_REASON_IBSS_LEAVE,
534}eCsrRoamDisconnectReason;
535
536typedef enum
537{
538 // Not associated in Infra or participating in an IBSS / Ad-hoc network.
539 eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED,
540 // Associated in an Infrastructure network.
541 eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED,
542 // Participating in an IBSS network though disconnected (no partner stations
543 // in the IBSS).
544 eCSR_ASSOC_STATE_TYPE_IBSS_DISCONNECTED,
545 // Participating in an IBSS network with partner stations also present
546 eCSR_ASSOC_STATE_TYPE_IBSS_CONNECTED,
547 // Participating in a WDS network in AP or STA mode but not connected yet
548 eCSR_ASSOC_STATE_TYPE_WDS_DISCONNECTED,
549 // Participating in a WDS network and connected peer to peer
550 eCSR_ASSOC_STATE_TYPE_WDS_CONNECTED,
551#ifdef WLAN_SOFTAP_FEATURE
552 // Participating in a Infra network in AP not yet in connected state
553 eCSR_ASSOC_STATE_TYPE_INFRA_DISCONNECTED,
554 // Participating in a Infra network and connected to a peer
555 eCSR_ASSOC_STATE_TYPE_INFRA_CONNECTED,
556#endif
557
558}eCsrConnectState;
559
560
561// This parameter is no longer supported in the Profile. Need to set this in the global properties
562// for the adapter.
563typedef enum eCSR_MEDIUM_ACCESS
564{
565 eCSR_MEDIUM_ACCESS_AUTO = 0,
566 eCSR_MEDIUM_ACCESS_DCF,
567 eCSR_MEDIUM_ACCESS_eDCF,
568 eCSR_MEDIUM_ACCESS_HCF,
569
570 eCSR_MEDIUM_ACCESS_WMM_eDCF_802dot1p,
571 eCSR_MEDIUM_ACCESS_WMM_eDCF_DSCP,
572 eCSR_MEDIUM_ACCESS_WMM_eDCF_NoClassify,
573 eCSR_MEDIUM_ACCESS_11e_eDCF = eCSR_MEDIUM_ACCESS_eDCF,
574 eCSR_MEDIUM_ACCESS_11e_HCF = eCSR_MEDIUM_ACCESS_HCF,
575}eCsrMediaAccessType;
576
577typedef enum
578{
579 eCSR_TX_RATE_AUTO = 0, // use rate adaption to determine Tx rate.
580
581 eCSR_TX_RATE_1Mbps = 0x00000001,
582 eCSR_TX_RATE_2Mbps = 0x00000002,
583 eCSR_TX_RATE_5_5Mbps = 0x00000004,
584 eCSR_TX_RATE_6Mbps = 0x00000008,
585 eCSR_TX_RATE_9Mbps = 0x00000010,
586 eCSR_TX_RATE_11Mbps = 0x00000020,
587 eCSR_TX_RATE_12Mbps = 0x00000040,
588 eCSR_TX_RATE_18Mbps = 0x00000080,
589 eCSR_TX_RATE_24Mbps = 0x00000100,
590 eCSR_TX_RATE_36Mbps = 0x00000200,
591 eCSR_TX_RATE_42Mbps = 0x00000400,
592 eCSR_TX_RATE_48Mbps = 0x00000800,
593 eCSR_TX_RATE_54Mbps = 0x00001000,
594 eCSR_TX_RATE_72Mbps = 0x00002000,
595 eCSR_TX_RATE_84Mbps = 0x00004000,
596 eCSR_TX_RATE_96Mbps = 0x00008000,
597 eCSR_TX_RATE_108Mbps = 0x00010000,
598 eCSR_TX_RATE_126Mbps = 0x00020000,
599 eCSR_TX_RATE_144Mbps = 0x00040000,
600 eCSR_TX_RATE_168Mbps = 0x00080000,
601 eCSR_TX_RATE_192Mbps = 0x00100000,
602 eCSR_TX_RATE_216Mbps = 0x00200000,
603 eCSR_TX_RATE_240Mbps = 0x00400000,
604
605}eCsrExposedTxRate;
606
607typedef enum
608{
609 eCSR_OPERATING_CHANNEL_ALL = 0,
610 eCSR_OPERATING_CHANNEL_AUTO = eCSR_OPERATING_CHANNEL_ALL,
611 eCSR_OPERATING_CHANNEL_ANY = eCSR_OPERATING_CHANNEL_ALL,
612}eOperationChannel;
613
614typedef enum
615{
616 eCSR_DOT11_FRAG_THRESH_AUTO = -1,
617 eCSR_DOT11_FRAG_THRESH_MIN = 256,
618 eCSR_DOT11_FRAG_THRESH_MAX = 2346,
619 eCSR_DOT11_FRAG_THRESH_DEFAULT = 2000
620}eCsrDot11FragThresh;
621
622
623//for channel bonding for ibss
624typedef enum
625{
626 eCSR_CB_OFF = 0,
627 eCSR_CB_AUTO = 1,
628 eCSR_CB_DOWN = 2,
629 eCSR_CB_UP = 3,
630}eCsrCBChoice;
631
632//For channel bonding, the channel number gap is 4, either up or down. For both 11a and 11g mode.
633#define CSR_CB_CHANNEL_GAP 4
634#define CSR_CB_CENTER_CHANNEL_OFFSET 2
635#define CSR_MAX_24GHz_CHANNEL_NUMBER ( SIR_11B_CHANNEL_END )
Jeff Johnsone7245742012-09-05 17:12:55 -0700636#define CSR_MIN_5GHz_CHANNEL_NUMBER ( SIR_11A_CHANNEL_BEGIN )
637#define CSR_MAX_5GHz_CHANNEL_NUMBER ( SIR_11A_CHANNEL_END )
Jeff Johnson295189b2012-06-20 16:38:30 -0700638
639// WEP keysize (in bits)...
640typedef enum
641{
642 eCSR_SECURITY_WEP_KEYSIZE_40 = 40, // 40 bit key + 24bit IV = 64bit WEP
643 eCSR_SECURITY_WEP_KEYSIZE_104 = 104, // 104bit key + 24bit IV = 128bit WEP
644
645 eCSR_SECURITY_WEP_KEYSIZE_MIN = eCSR_SECURITY_WEP_KEYSIZE_40,
646 eCSR_SECURITY_WEP_KEYSIZE_MAX = eCSR_SECURITY_WEP_KEYSIZE_104,
647 eCSR_SECURITY_WEP_KEYSIZE_MAX_BYTES = ( eCSR_SECURITY_WEP_KEYSIZE_MAX / 8 ),
648}eCsrWEPKeySize;
649
650
651// Possible values for the WEP static key ID...
652typedef enum
653{
654
655 eCSR_SECURITY_WEP_STATIC_KEY_ID_MIN = 0,
656 eCSR_SECURITY_WEP_STATIC_KEY_ID_MAX = 3,
657 eCSR_SECURITY_WEP_STATIC_KEY_ID_DEFAULT = 0,
658
659 eCSR_SECURITY_WEP_STATIC_KEY_ID_INVALID = -1,
660
661}eCsrWEPStaticKeyID;
662
663#define CSR_MAX_NUM_KEY (eCSR_SECURITY_WEP_STATIC_KEY_ID_MAX + 1)
664
665typedef enum
666{
667 eCSR_SECURITY_SET_KEY_ACTION_NO_CHANGE,
668 eCSR_SECURITY_SET_KEY_ACTION_SET_KEY,
669 eCSR_SECURITY_SET_KEY_ACTION_DELETE_KEY,
670}eCsrSetKeyAction;
671
672typedef enum
673{
674 eCSR_BAND_ALL,
675 eCSR_BAND_24,
676 eCSR_BAND_5G,
677 eCSR_BAND_MAX,
678}eCsrBand;
679
680
681typedef enum
682{
683 // Roaming because HDD requested for reassoc by changing one of the fields in
684 // tCsrRoamModifyProfileFields. OR
685 // Roaming because SME requested for reassoc by changing one of the fields in
686 // tCsrRoamModifyProfileFields.
687 eCsrRoamReasonStaCapabilityChanged,
688 // Roaming because SME requested for reassoc to a different AP, as part of
689 // inter AP handoff.
690 eCsrRoamReasonBetterAP,
691 // Roaming because SME requested it as the link is lost - placeholder, will
692 // clean it up once handoff code gets in
693 eCsrRoamReasonSmeIssuedForLostLink,
694
695}eCsrRoamReasonCodes;
696
697typedef enum
698{
699 eCsrRoamWmmAuto = 0,
700 eCsrRoamWmmQbssOnly = 1,
701 eCsrRoamWmmNoQos = 2,
702
703} eCsrRoamWmmUserModeType;
704
705typedef enum
706{
707 eCSR_REQUESTER_MIN = 0,
708 eCSR_DIAG,
709 eCSR_UMA_GAN,
710 eCSR_HDD
711} eCsrStatsRequesterType;
712
713typedef struct tagPmkidCandidateInfo
714{
715 tCsrBssid BSSID;
716 tANI_BOOLEAN preAuthSupported;
717}tPmkidCandidateInfo;
718
719typedef struct tagPmkidCacheInfo
720{
721 tCsrBssid BSSID;
722 tANI_U8 PMKID[CSR_RSN_PMKID_SIZE];
723}tPmkidCacheInfo;
724
725#ifdef FEATURE_WLAN_WAPI
726typedef struct tagBkidCandidateInfo
727{
728 tCsrBssid BSSID;
729 tANI_BOOLEAN preAuthSupported;
730}tBkidCandidateInfo;
731
732typedef struct tagBkidCacheInfo
733{
734 tCsrBssid BSSID;
735 tANI_U8 BKID[CSR_WAPI_BKID_SIZE];
736}tBkidCacheInfo;
737#endif /* FEATURE_WLAN_WAPI */
738
739typedef struct tagCsrKeys
740{
741 tANI_U8 KeyLength[ CSR_MAX_NUM_KEY ]; //Also use to indicate whether the key index is set
742 tANI_U8 KeyMaterial[ CSR_MAX_NUM_KEY ][ CSR_MAX_KEY_LEN ];
743 tANI_U8 defaultIndex;
744}tCsrKeys;
745
746/* Following are fields which are part of tCsrRoamConnectedProfile might need
747 modification dynamically once STA is up & running and this could trigger
748 reassoc */
749typedef struct tagCsrRoamModifyProfileFields
750{
751 // during connect this specifies ACs U-APSD is to be setup
752 // for (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored).
753 // During assoc response this COULD carry confirmation of what ACs U-APSD
754 // got setup for. Later if an APP looking for APSD, SME-QoS might need to
755 // modify this field
756 tANI_U8 uapsd_mask;
757 // HDD might ask to modify this field
758 tANI_U16 listen_interval;
759}tCsrRoamModifyProfileFields;
760
761typedef struct tagCsrRoamProfile
762{
763 //For eCSR_BSS_TYPE_WDS_AP. There must be one SSID in SSIDs.
764 //For eCSR_BSS_TYPE_WDS_STA. There must be two SSIDs. Index 0 is the SSID of the WDS-AP
765 //that we need to join. Index 1 is the SSID for self BSS.
766 tCsrSSIDs SSIDs;
767 tCsrBSSIDs BSSIDs;
768 tANI_U32 phyMode; //this is a bit mask of all the needed phy mode defined in eCsrPhyMode
769 eCsrRoamBssType BSSType;
770
771 tCsrAuthList AuthType;
772 eCsrAuthType negotiatedAuthType;
773
774 tCsrEncryptionList EncryptionType;
775 //This field is for output only, not for input
776 eCsrEncryptionType negotiatedUCEncryptionType;
777
778 //eCSR_ENCRYPT_TYPE_ANY cannot be set in multicast encryption type. If caller doesn't case,
779 //put all supported encryption types in here
780 tCsrEncryptionList mcEncryptionType;
781 //This field is for output only, not for input
782 eCsrEncryptionType negotiatedMCEncryptionType;
783
784 tCsrKeys Keys;
785 eCsrCBChoice CBMode; //up, down or auto
786 tCsrChannelInfo ChannelInfo;
787 tANI_U8 operationChannel;
788 tANI_U16 beaconInterval; //If this is 0, SME will fill in for caller.
789 // during connect this specifies ACs U-APSD is to be setup
790 // for (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored).
791 // During assoc response this COULD carry confirmation of what ACs U-APSD got setup for
792 tANI_U8 uapsd_mask;
793 tANI_U32 nWPAReqIELength; //The byte count in the pWPAReqIE
794 tANI_U8 *pWPAReqIE; //If not null, it has the IE byte stream for WPA
795 tANI_U32 nRSNReqIELength; //The byte count in the pRSNReqIE
796 tANI_U8 *pRSNReqIE; //If not null, it has the IE byte stream for RSN
797#ifdef FEATURE_WLAN_WAPI
798 tANI_U32 nWAPIReqIELength; //The byte count in the pWAPIReqIE
799 tANI_U8 *pWAPIReqIE; //If not null, it has the IE byte stream for WAPI
800#endif /* FEATURE_WLAN_WAPI */
801
802 tANI_U32 nAddIEScanLength; //The byte count in the pAddIE for scan (at the time of join)
803 tANI_U8 *pAddIEScan; //If not null, it has the IE byte stream for additional IE, which can be WSC IE and/or P2P IE
804 tANI_U32 nAddIEAssocLength; //The byte count in the pAddIE for assoc
805 tANI_U8 *pAddIEAssoc; //If not null, it has the IE byte stream for additional IE, which can be WSC IE and/or P2P IE
806
807 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN]; //it is ignored if [0] is 0.
808 /*WPS Association if true => auth and ecryption should be ignored*/
809 tANI_BOOLEAN bWPSAssociation;
810 tANI_U32 nWSCReqIELength; //The byte count in the pWSCReqIE
811 tANI_U8 *pWSCReqIE; //If not null, it has the IE byte stream for WSC
812
813#ifdef WLAN_SOFTAP_FEATURE
814 tANI_U8 ieee80211d;
815 tANI_U8 privacy;
816 tANI_BOOLEAN fwdWPSPBCProbeReq;
817 tAniAuthType csr80211AuthType;
818 tANI_U32 dtimPeriod;
819 tANI_BOOLEAN ApUapsdEnable;
820 tANI_BOOLEAN protEnabled;
821 tANI_BOOLEAN obssProtEnabled;
822 tANI_U16 cfg_protection;
823 tANI_U8 wps_state;
824#endif
825
826#ifdef WLAN_FEATURE_VOWIFI_11R
827 tCsrMobilityDomainInfo MDID;
828#endif
829 tVOS_CON_MODE csrPersona;
830
831}tCsrRoamProfile;
832
833
834typedef struct tagCsrRoamConnectedProfile
835{
836 tSirMacSSid SSID;
837 tANI_BOOLEAN handoffPermitted;
838 tANI_BOOLEAN ssidHidden;
839 tCsrBssid bssid;
840 eCsrRoamBssType BSSType;
841 eCsrAuthType AuthType;
842 tCsrAuthList AuthInfo;
843 eCsrEncryptionType EncryptionType;
844 tCsrEncryptionList EncryptionInfo;
845 eCsrEncryptionType mcEncryptionType;
846 tCsrEncryptionList mcEncryptionInfo;
847 eCsrCBChoice CBMode; //up, down or auto
848 tANI_U8 operationChannel;
Jeff Johnsone7245742012-09-05 17:12:55 -0700849 tANI_U16 beaconInterval;
Jeff Johnson295189b2012-06-20 16:38:30 -0700850 tCsrKeys Keys;
851 // meaningless on connect. It's an OUT param from CSR's point of view
852 // During assoc response carries the ACM bit-mask i.e. what
853 // ACs have ACM=1 (if any),
854 // (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored)
855 tANI_U8 acm_mask;
856 tCsrRoamModifyProfileFields modifyProfileFields;
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700857 tANI_U32 nAddIEAssocLength; //The byte count in the pAddIE for assoc
858 tANI_U8 *pAddIEAssoc; //If not null, it has the IE byte stream for additional IE, which can be WSC IE and/or P2P IE
859
Jeff Johnson295189b2012-06-20 16:38:30 -0700860 tSirBssDescription *pBssDesc;
861 tANI_BOOLEAN qap; //AP supports QoS
862 tANI_BOOLEAN qosConnection; //A connection is QoS enabled
863#ifdef WLAN_FEATURE_VOWIFI_11R
864 tCsrMobilityDomainInfo MDID;
865#endif
866
867#ifdef FEATURE_WLAN_CCX
868 tCsrCcxCckmInfo ccxCckmInfo;
869 tANI_BOOLEAN isCCXAssoc;
870#endif
871}tCsrRoamConnectedProfile;
872
873
874#ifdef WLAN_FEATURE_VOWIFI_11R
875typedef struct tagCsr11rConfigParams
876{
877 tANI_BOOLEAN IsFTResourceReqSupported;
878} tCsr11rConfigParams;
879#endif
880
881#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
882typedef struct tagCsrNeighborRoamConfigParams
883{
884
885 tANI_U32 nNeighborScanTimerPeriod;
886 tANI_U8 nNeighborLookupRssiThreshold;
887 tANI_U8 nNeighborReassocRssiThreshold;
888 tANI_U16 nNeighborScanMinChanTime;
889 tANI_U16 nNeighborScanMaxChanTime;
890 sCsrChannel neighborScanChanList;
891 tANI_U8 nMaxNeighborRetries;
892 tANI_U16 nNeighborResultsRefreshPeriod;
893}tCsrNeighborRoamConfigParams;
894#endif
895
896typedef struct tagCsrConfigParam
897{
898 tANI_U32 FragmentationThreshold;
Jeff Johnsone7245742012-09-05 17:12:55 -0700899 tANI_U32 channelBondingMode24GHz; // keep this tANI_U32. This gets converted to ePhyChannelBondState
900 tANI_U32 channelBondingMode5GHz; // in csrChangeDefaultConfigParam using convertCBIniValueToPhyCBState
Jeff Johnson295189b2012-06-20 16:38:30 -0700901 eCsrPhyMode phyMode;
902 eCsrBand eBand;
903 tANI_U32 RTSThreshold;
904 tANI_U32 HeartbeatThresh50;
905 tANI_U32 HeartbeatThresh24;
906 eCsrCBChoice cbChoice;
907 eCsrBand bandCapability; //indicate hw capability
908 tANI_U32 bgScanInterval;
909 tANI_U16 TxRate;
910 eCsrRoamWmmUserModeType WMMSupportMode;
911 tANI_BOOLEAN Is11eSupportEnabled;
912 tANI_BOOLEAN Is11dSupportEnabled;
913 tANI_BOOLEAN Is11dSupportEnabledOriginal;
914 tANI_BOOLEAN Is11hSupportEnabled;
915 tANI_BOOLEAN shortSlotTime;
916 tANI_BOOLEAN ProprietaryRatesEnabled;
917 tANI_U8 AdHocChannel24;
918 tANI_U8 AdHocChannel5G;
919 tANI_U32 impsSleepTime; //in units of seconds
920 tANI_U32 nScanResultAgeCount; //this number minus one is the number of times a scan doesn't find it before it is removed
921 tANI_U32 scanAgeTimeNCNPS; //scan result aging time threshold when Not-Connect-No-Power-Save, in seconds
922 tANI_U32 scanAgeTimeNCPS; //scan result aging time threshold when Not-Connect-Power-Save, in seconds
923 tANI_U32 scanAgeTimeCNPS; //scan result aging time threshold when Connect-No-Power-Save, in seconds,
924 tANI_U32 scanAgeTimeCPS; //scan result aging time threshold when Connect-Power-Savein seconds
925 tANI_U32 nRoamingTime; //In seconds, CSR will try this long before gives up. 0 means no roaming
926 tANI_U8 bCatRssiOffset; //to set the RSSI difference for each category
927 tANI_U8 fEnableMCCMode; //to set MCC Enable/Disable mode
Mohit Khanna7ed53f02012-09-11 17:52:10 -0700928 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
929 //at the moment, this flag is provided only to pass Wi-Fi Cert. 5.1.12
Jeff Johnson295189b2012-06-20 16:38:30 -0700930 tCsr11dinfo Csr11dinfo;
931 //Whether to limit the channels to the ones set in Csr11dInfo. If true, the opertaional
932 //channels are limited to the default channel list. It is an "AND" operation between the
933 //default channels and the channels in the 802.11d IE.
934 tANI_BOOLEAN fEnforce11dChannels;
935 //Country Code Priority
936 //0 = 802.11D > Country IOCTL > NV
937 //1 = Country IOCTL > 802.11D > NV
938 tANI_BOOLEAN fSupplicantCountryCodeHasPriority;
939 //When true, AP with unknown country code won't be see.
940 //"Unknown country code" means either Ap doesn't have 11d IE or we cannot
941 //find a domain for the country code in its 11d IE.
942 tANI_BOOLEAN fEnforceCountryCodeMatch;
943 //When true, only APs in the default domain can be seen. If the Ap has "unknown country
944 //code", or the domain of the country code doesn't match the default domain, the Ap is
945 //not acceptable.
946 tANI_BOOLEAN fEnforceDefaultDomain;
947
948 tANI_U16 vccRssiThreshold;
949 tANI_U32 vccUlMacLossThreshold;
950
951 tANI_U32 nPassiveMinChnTime; //in units of milliseconds
952 tANI_U32 nPassiveMaxChnTime; //in units of milliseconds
953 tANI_U32 nActiveMinChnTime; //in units of milliseconds
954 tANI_U32 nActiveMaxChnTime; //in units of milliseconds
955
956 tANI_BOOLEAN IsIdleScanEnabled;
957 //in dBm, the maximum TX power
958 //The actual TX power is the lesser of this value and 11d.
959 //If 11d is disable, the lesser of this and default setting.
960 tANI_U8 nTxPowerCap;
961 tANI_U32 statsReqPeriodicity; //stats request frequency from PE while in full power
962 tANI_U32 statsReqPeriodicityInPS;//stats request frequency from PE while in power save
963#ifdef WLAN_FEATURE_VOWIFI_11R
964 tCsr11rConfigParams csr11rConfig;
965#endif
966#ifdef FEATURE_WLAN_CCX
967 tANI_U8 isCcxIniFeatureEnabled;
968#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700969#ifdef FEATURE_WLAN_LFR
970 tANI_U8 isFastRoamIniFeatureEnabled;
971#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700972
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700973#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
Jeff Johnson295189b2012-06-20 16:38:30 -0700974 tANI_U8 isFastTransitionEnabled;
Jeff Johnson43971f52012-07-17 12:26:56 -0700975 tANI_U8 RoamRssiDiff;
Jeff Johnson295189b2012-06-20 16:38:30 -0700976#endif
977
978#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
979 tCsrNeighborRoamConfigParams neighborRoamConfig;
980#endif
981
982 /* Instead of Reassoc, send ADDTS/DELTS even when ACM is off for that AC
983 * This is mandated by WMM-AC certification */
984 tANI_BOOLEAN addTSWhenACMIsOff;
985
986
987 /*channelPowerInfoList24 has been seen corrupted. Set this flag to true trying to
988 * detect when it happens. Adding this into code because we can't reproduce it easily.
989 * We don't know when it happens. */
990 tANI_BOOLEAN fValidateList;
991
992 /*Customer wants to start with an active scan based on the default country code.
993 * This optimization will minimize the driver load to association time.
994 * Based on this flag we will bypass the initial passive scan needed for 11d
995 * to determine the country code & domain */
996 tANI_BOOLEAN fEnableBypass11d;
997
998 /*Customer wants to optimize the scan time. Avoiding scans(passive) on DFS
999 * channels while swipping through both bands can save some time
1000 * (apprx 1.3 sec) */
1001 tANI_BOOLEAN fEnableDFSChnlScan;
1002
1003 //To enable/disable scanning 2.4Ghz channels twice on a single scan request from HDD
1004 tANI_BOOLEAN fScanTwice;
Jeff Johnsone7245742012-09-05 17:12:55 -07001005#ifdef WLAN_FEATURE_11AC
1006 tANI_U32 nVhtChannelWidth;
1007#endif
1008
1009 /*
1010 * To enable/disable scanning only 2.4Ghz channels on first scan
1011 */
1012 tANI_BOOLEAN fFirstScanOnly2GChnl;
Jeff Johnson295189b2012-06-20 16:38:30 -07001013
1014}tCsrConfigParam;
1015
1016//Tush
1017typedef struct tagCsrUpdateConfigParam
1018{
1019 tCsr11dinfo Csr11dinfo;
1020}tCsrUpdateConfigParam;
1021
1022typedef struct tagCsrRoamInfo
1023{
1024 tCsrRoamProfile *pProfile; //may be NULL
1025 tSirBssDescription *pBssDesc; //May be NULL
1026 tANI_U32 nBeaconLength; //the length, in bytes, of the beacon frame, can be 0
1027 tANI_U32 nAssocReqLength; //the length, in bytes, of the assoc req frame, can be 0
1028 tANI_U32 nAssocRspLength; //The length, in bytes, of the assoc rsp frame, can be 0
1029 tANI_U32 nFrameLength;
1030 tANI_U8 frameType;
1031 tANI_U8 *pbFrames; //Point to a buffer contain the beacon, assoc req, assoc rsp frame, in that order
1032 //user needs to use nBeaconLength, nAssocReqLength, nAssocRspLength to desice where
1033 //each frame starts and ends.
1034 tANI_BOOLEAN fReassocReq; //set to true if for re-association
1035 tANI_BOOLEAN fReassocRsp; //set to true if for re-association
1036 tCsrBssid bssid;
1037 //Only valid in IBSS
1038 //this is the peers MAC address for eCSR_ROAM_RESULT_IBSS_NEW_PEER or PEER_DEPARTED
1039 tCsrBssid peerMac;
1040 tSirResultCodes statusCode;
1041 tANI_U32 reasonCode; //this could be our own defined or sent from the other BSS(per 802.11 spec)
1042 tANI_U8 staId; // Peer stationId when connected
1043 /*The DPU signatures will be sent eventually to TL to help it determine the
1044 association to which a packet belongs to*/
1045 /*Unicast DPU signature*/
1046 tANI_U8 ucastSig;
1047
1048 /*Broadcast DPU signature*/
1049 tANI_U8 bcastSig;
1050
1051 tANI_BOOLEAN fAuthRequired; //FALSE means auth needed from supplicant. TRUE means authenticated(static WEP, open)
1052 tANI_U8 sessionId;
1053 tANI_U8 rsnIELen;
1054 tANI_U8 *prsnIE;
1055
1056 tANI_U8 addIELen;
1057 tANI_U8 *paddIE;
1058
1059 union
1060 {
1061 tSirMicFailureInfo *pMICFailureInfo;
1062 tCsrRoamConnectedProfile *pConnectedProfile;
1063#ifdef WLAN_SOFTAP_FEATURE
1064 tSirWPSPBCProbeReq *pWPSPBCProbeReq;
1065#endif
1066 } u;
1067
1068#ifdef WLAN_SOFTAP_FEATURE
1069 tANI_BOOLEAN wmmEnabledSta; //set to true if WMM enabled STA
1070 tANI_U32 dtimPeriod;
1071#endif
1072
1073#ifdef FEATURE_WLAN_CCX
1074 tANI_BOOLEAN isCCXAssoc;
1075#endif
1076#ifdef WLAN_FEATURE_P2P
1077 void* pRemainCtx;
1078 tANI_U32 rxChan;
1079#endif
1080
1081 // Required for indicating the frames to upper layer
1082 tANI_U32 beaconLength;
1083 tANI_U8* beaconPtr;
1084 tANI_U32 assocReqLength;
1085 tANI_U8* assocReqPtr;
1086}tCsrRoamInfo;
1087
1088
1089
1090
1091
1092typedef struct tagCsrFreqScanInfo
1093{
1094 tANI_U32 nStartFreq; //in unit of MHz
1095 tANI_U32 nEndFreq; //in unit of MHz
1096 tSirScanType scanType;
1097}tCsrFreqScanInfo;
1098
1099
1100#ifdef WLAN_SOFTAP_FEATURE
1101typedef struct sSirSmeAssocIndToUpperLayerCnf
1102{
1103 tANI_U16 messageType; // eWNI_SME_ASSOC_CNF
1104 tANI_U16 length;
1105 tANI_U8 sessionId;
1106 tSirResultCodes statusCode;
1107 tSirMacAddr bssId; // Self BSSID
1108 tSirMacAddr peerMacAddr;
1109 tANI_U16 aid;
1110 tSirMacAddr alternateBssId;
1111 tANI_U8 alternateChannelId;
1112 tANI_U8 wmmEnabledSta; //set to true if WMM enabled STA
1113 tSirRSNie rsnIE; // RSN IE received from peer
1114 tSirAddie addIE; // Additional IE received from peer, which can be WSC and/or P2P IE
1115 tANI_U8 reassocReq; //set to true if reassoc
1116} tSirSmeAssocIndToUpperLayerCnf, *tpSirSmeAssocIndToUpperLayerCnf;
1117#endif
1118
1119typedef struct tagCsrSummaryStatsInfo
1120{
1121 tANI_U32 retry_cnt[4];
1122 tANI_U32 multiple_retry_cnt[4];
1123 tANI_U32 tx_frm_cnt[4];
1124 //tANI_U32 num_rx_frm_crc_err; same as rx_error_cnt
1125 //tANI_U32 num_rx_frm_crc_ok; same as rx_frm_cnt
1126 tANI_U32 rx_frm_cnt;
1127 tANI_U32 frm_dup_cnt;
1128 tANI_U32 fail_cnt[4];
1129 tANI_U32 rts_fail_cnt;
1130 tANI_U32 ack_fail_cnt;
1131 tANI_U32 rts_succ_cnt;
1132 tANI_U32 rx_discard_cnt;
1133 tANI_U32 rx_error_cnt;
1134 tANI_U32 tx_byte_cnt;
1135
1136}tCsrSummaryStatsInfo;
1137
1138typedef struct tagCsrGlobalClassAStatsInfo
1139{
1140 tANI_U32 rx_frag_cnt;
1141 tANI_U32 promiscuous_rx_frag_cnt;
1142 //tANI_U32 rx_fcs_err;
1143 tANI_U32 rx_input_sensitivity;
1144 tANI_U32 max_pwr;
1145 //tANI_U32 default_pwr;
1146 tANI_U32 sync_fail_cnt;
1147 tANI_U32 tx_rate;
1148 //mcs index for HT20 and HT40 rates
1149 tANI_U32 mcs_index;
1150 //to defferentiate between HT20 and HT40 rates;short and long guard interval
1151 tANI_U32 tx_rate_flags;
1152
1153}tCsrGlobalClassAStatsInfo;
1154
1155typedef struct tagCsrGlobalClassBStatsInfo
1156{
1157 tANI_U32 uc_rx_wep_unencrypted_frm_cnt;
1158 tANI_U32 uc_rx_mic_fail_cnt;
1159 tANI_U32 uc_tkip_icv_err;
1160 tANI_U32 uc_aes_ccmp_format_err;
1161 tANI_U32 uc_aes_ccmp_replay_cnt;
1162 tANI_U32 uc_aes_ccmp_decrpt_err;
1163 tANI_U32 uc_wep_undecryptable_cnt;
1164 tANI_U32 uc_wep_icv_err;
1165 tANI_U32 uc_rx_decrypt_succ_cnt;
1166 tANI_U32 uc_rx_decrypt_fail_cnt;
1167 tANI_U32 mcbc_rx_wep_unencrypted_frm_cnt;
1168 tANI_U32 mcbc_rx_mic_fail_cnt;
1169 tANI_U32 mcbc_tkip_icv_err;
1170 tANI_U32 mcbc_aes_ccmp_format_err;
1171 tANI_U32 mcbc_aes_ccmp_replay_cnt;
1172 tANI_U32 mcbc_aes_ccmp_decrpt_err;
1173 tANI_U32 mcbc_wep_undecryptable_cnt;
1174 tANI_U32 mcbc_wep_icv_err;
1175 tANI_U32 mcbc_rx_decrypt_succ_cnt;
1176 tANI_U32 mcbc_rx_decrypt_fail_cnt;
1177
1178}tCsrGlobalClassBStatsInfo;
1179
1180typedef struct tagCsrGlobalClassCStatsInfo
1181{
1182 tANI_U32 rx_amsdu_cnt;
1183 tANI_U32 rx_ampdu_cnt;
1184 tANI_U32 tx_20_frm_cnt;
1185 tANI_U32 rx_20_frm_cnt;
1186 tANI_U32 rx_mpdu_in_ampdu_cnt;
1187 tANI_U32 ampdu_delimiter_crc_err;
1188
1189}tCsrGlobalClassCStatsInfo;
1190
1191typedef struct tagCsrGlobalClassDStatsInfo
1192{
1193 tANI_U32 tx_uc_frm_cnt;
1194 tANI_U32 tx_mc_frm_cnt;
1195 tANI_U32 tx_bc_frm_cnt;
1196 tANI_U32 rx_uc_frm_cnt;
1197 tANI_U32 rx_mc_frm_cnt;
1198 tANI_U32 rx_bc_frm_cnt;
1199 tANI_U32 tx_uc_byte_cnt[4];
1200 tANI_U32 tx_mc_byte_cnt;
1201 tANI_U32 tx_bc_byte_cnt;
1202 tANI_U32 rx_uc_byte_cnt[4];
1203 tANI_U32 rx_mc_byte_cnt;
1204 tANI_U32 rx_bc_byte_cnt;
1205 tANI_U32 rx_byte_cnt;
1206 tANI_U32 num_rx_bytes_crc_ok;
1207 tANI_U32 rx_rate;
1208
1209}tCsrGlobalClassDStatsInfo;
1210
1211typedef struct tagCsrPerStaStatsInfo
1212{
1213 tANI_U32 tx_frag_cnt[4];
1214 tANI_U32 tx_ampdu_cnt;
1215 tANI_U32 tx_mpdu_in_ampdu_cnt;
1216} tCsrPerStaStatsInfo;
1217
1218typedef struct tagCsrRoamSetKey
1219{
1220 eCsrEncryptionType encType;
1221 tAniKeyDirection keyDirection; //Tx, Rx or Tx-and-Rx
1222 tCsrBssid peerMac; //Peers MAC address. ALL 1's for group key
1223 tANI_U8 paeRole; //0 for supplicant
1224 tANI_U8 keyId; // Kye index
1225 tANI_U16 keyLength; //Number of bytes containing the key in pKey
1226 tANI_U8 Key[CSR_MAX_KEY_LEN];
1227 tANI_U8 keyRsc[CSR_MAX_RSC_LEN];
1228} tCsrRoamSetKey;
1229
1230typedef struct tagCsrRoamRemoveKey
1231{
1232 eCsrEncryptionType encType;
1233 tCsrBssid peerMac; //Peers MAC address. ALL 1's for group key
1234 tANI_U8 keyId; //key index
1235} tCsrRoamRemoveKey;
1236
1237
1238typedef void * tScanResultHandle;
1239
1240#define CSR_INVALID_SCANRESULT_HANDLE (NULL)
1241
1242
1243
1244////////////////////////////////////////////Common SCAN starts
1245
1246//void *p2 -- the second context pass in for the caller
1247//***what if callback is called before requester gets the scanId??
1248typedef eHalStatus (*csrScanCompleteCallback)(tHalHandle, void *p2, tANI_U32 scanID, eCsrScanStatus status);
1249
1250
1251
1252///////////////////////////////////////////Common Roam starts
1253
1254//pContext is the pContext passed in with the roam request
1255//pParam is a pointer to a tCsrRoamInfo, see definition of eRoamCmdStatus and
1256// eRoamCmdResult for detail valid members. It may be NULL
1257//roamId is to identify the callback related roam request. 0 means unsolicit
1258//roamStatus is a flag indicating the status of the callback
1259//roamResult is the result
1260typedef eHalStatus (*csrRoamCompleteCallback)(void *pContext, tCsrRoamInfo *pParam, tANI_U32 roamId,
1261 eRoamCmdStatus roamStatus, eCsrRoamResult roamResult);
1262
1263typedef eHalStatus (*csrRoamSessionCloseCallback)(void *pContext);
1264
1265/* ---------------------------------------------------------------------------
1266 \fn csrRoamGetNumPMKIDCache
1267 \brief return number of PMKID cache entries
1268 \return tANI_U32 - the number of PMKID cache entries
1269 -------------------------------------------------------------------------------*/
1270//tANI_U32 csrRoamGetNumPMKIDCache(tHalHandle hHal);
1271
1272/* ---------------------------------------------------------------------------
1273 \fn csrRoamGetPMKIDCache
1274 \brief return PMKID cache from CSR
1275 \param pNum - caller allocated memory that has the space of the number of pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the
1276 needed or actually number in tPmkidCacheInfo.
1277 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if any, upon return
1278 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
1279 -------------------------------------------------------------------------------*/
1280//eHalStatus csrRoamGetPMKIDCache(tHalHandle hHal, tANI_U32 *pNum, tPmkidCacheInfo *pPmkidCache);
1281
1282//pProfile - pointer to tCsrRoamProfile
1283#define CSR_IS_START_IBSS(pProfile) (eCSR_BSS_TYPE_START_IBSS == (pProfile)->BSSType)
1284#define CSR_IS_JOIN_TO_IBSS(pProfile) (eCSR_BSS_TYPE_IBSS == (pProfile)->BSSType)
1285#define CSR_IS_IBSS(pProfile) ( CSR_IS_START_IBSS(pProfile) || CSR_IS_JOIN_TO_IBSS(pProfile) )
1286#define CSR_IS_INFRASTRUCTURE(pProfile) (eCSR_BSS_TYPE_INFRASTRUCTURE == (pProfile)->BSSType)
1287#define CSR_IS_ANY_BSS_TYPE(pProfile) (eCSR_BSS_TYPE_ANY == (pProfile)->BSSType)
1288#define CSR_IS_WDS_AP( pProfile ) ( eCSR_BSS_TYPE_WDS_AP == (pProfile)->BSSType )
1289#define CSR_IS_WDS_STA( pProfile ) ( eCSR_BSS_TYPE_WDS_STA == (pProfile)->BSSType )
1290#define CSR_IS_WDS( pProfile ) ( CSR_IS_WDS_AP( pProfile ) || CSR_IS_WDS_STA( pProfile ) )
1291#ifdef WLAN_SOFTAP_FEATURE
1292#define CSR_IS_INFRA_AP( pProfile ) ( eCSR_BSS_TYPE_INFRA_AP == (pProfile)->BSSType )
1293#endif
1294
1295//pProfile - pointer to tCsrRoamConnectedProfile
1296#ifdef WLAN_SOFTAP_FEATURE
1297#define CSR_IS_CONN_INFRA_AP( pProfile ) ( eCSR_BSS_TYPE_INFRA_AP == (pProfile)->BSSType )
1298#endif
1299#define CSR_IS_CONN_WDS_AP( pProfile ) ( eCSR_BSS_TYPE_WDS_AP == (pProfile)->BSSType )
1300#define CSR_IS_CONN_WDS_STA( pProfile ) ( eCSR_BSS_TYPE_WDS_STA == (pProfile)->BSSType )
1301#define CSR_IS_CONN_WDS( pProfile ) ( CSR_IS_WDS_AP( pProfile ) || CSR_IS_WDS_STA( pProfile ) )
1302
1303
1304
1305///////////////////////////////////////////Common Roam ends
1306
1307
1308
1309#ifdef WLAN_SOFTAP_FEATURE
1310/* ---------------------------------------------------------------------------
1311 \fn csrSetChannels
1312 \brief HDD calls this function to change some global settings.
1313 caller must set the all fields or call csrGetConfigParam to prefill the fields.
1314 \param pParam - caller allocated memory
1315 \return eHalStatus
1316 -------------------------------------------------------------------------------*/
1317
1318eHalStatus csrSetChannels(tHalHandle hHal, tCsrConfigParam *pParam );
1319
1320eHalStatus csrSetRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode);
1321#endif
1322
1323
1324//enum to string conversion for debug output
1325const char * get_eRoamCmdStatus_str(eRoamCmdStatus val);
1326const char * get_eCsrRoamResult_str(eCsrRoamResult val);
1327/* ---------------------------------------------------------------------------
1328 \fn csrSetPhyMode
1329 \brief HDD calls this function to set the phyMode.
1330 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1331 CSR.
1332 \param phyMode - indicate the phyMode needs to set to. The value has to be either 0, or some bits set.
1333 See eCsrPhyMode for definition
1334 \param eBand - specify the operational band (2.4, 5 or both)
1335 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1336 a restart is needed to apply the change
1337 \return eHalStatus
1338 -------------------------------------------------------------------------------*/
1339eHalStatus csrSetPhyMode(tHalHandle hHal, tANI_U32 phyMode, eCsrBand eBand, tANI_BOOLEAN *pfRestartNeeded);
1340
1341void csrDumpInit(tHalHandle hHal);
1342
1343
1344/*---------------------------------------------------------------------------
1345 This is the type for a link quality callback to be registered with SME
1346 for indications
1347 Once the link quality has been indicated, subsequently, link indications are
1348 posted each time there is a CHANGE in link quality.
1349 *** If there is no change in link, there will be no indication ***
1350
1351 The indications may be based on one or more criteria internal to SME
1352 such as RSSI and PER.
1353
1354 \param ind - Indication being posted
1355 \param pContext - any user data given at callback registration.
1356 \return None
1357
1358---------------------------------------------------------------------------*/
1359typedef void (* csrRoamLinkQualityIndCallback)
1360 (eCsrRoamLinkQualityInd ind, void *pContext);
1361
1362
1363/*---------------------------------------------------------------------------
1364 This is the type for a statistics callback to be registered with SME
1365 for stats reporting
1366
1367 Since the client requesting for the stats already know which class/type of
1368 stats it asked for, the callback will carry them in the rsp buffer
1369 (void * stats) whose size will be same as the size of requested stats &
1370 will be exactly in the same order requested in the stats mask from LSB to MSB
1371
1372 \param stats - stats rsp buffer sent back with the report
1373 \param pContext - any user data given at callback registration.
1374 \return None
1375
1376---------------------------------------------------------------------------*/
1377typedef void ( *tCsrStatsCallback) (void * stats, void *pContext);
1378
1379/*---------------------------------------------------------------------------
1380 This is the type for a rssi callback to be registered with SME
1381 for getting rssi
1382
1383 \param rssi - rssi
1384 \param pContext - any user data given at callback registration.
1385 \return None
1386
1387---------------------------------------------------------------------------*/
1388
1389typedef void ( *tCsrRssiCallback) (v_S7_t rssi, tANI_U32 staId, void *pContext);
1390
1391#ifdef WLAN_FEATURE_VOWIFI_11R
1392eHalStatus csrRoamIssueFTPreauthReq(tHalHandle hHal, tANI_U32 sessionId, tpSirBssDescription pBssDescription);
1393#endif
1394
1395/*---------------------------------------------------------------------------
1396 This is the function to change the Band configuraiton (ALL/2.4 GHZ/5 GHZ)
1397
1398 \param hHal - handle to Hal context
1399 \param eBand - band value
1400 \return eHalStatus
1401
1402---------------------------------------------------------------------------*/
1403eHalStatus csrSetBand(tHalHandle hHal, eCsrBand eBand);
1404
1405/*---------------------------------------------------------------------------
1406 This is the function to get the current operating band value
1407 \param hHal - handl to Hal context
1408 \return eCsrband - band value
1409
1410---------------------------------------------------------------------------*/
1411eCsrBand csrGetCurrentBand (tHalHandle hHal);
1412
1413#endif
1414