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