blob: c1d764fb2741bb5bba3c22216d815687e410414a [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,
Hoonki Leee6bfe942013-02-05 15:01:19 -0800535 eCSR_ROAM_RESULT_TEARDOWN_TDLS_PEER_IND,
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -0800536 eCSR_ROAM_RESULT_DELETE_ALL_TDLS_PEER_IND,
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800537#endif
538
Jeff Johnson295189b2012-06-20 16:38:30 -0700539}eCsrRoamResult;
540
541
542
543/*----------------------------------------------------------------------------
544 List of link quality indications HDD can receive from SME
545-----------------------------------------------------------------------------*/
546typedef enum
547{
548 eCSR_ROAM_LINK_QUAL_MIN_IND = -1,
549
550 eCSR_ROAM_LINK_QUAL_POOR_IND = 0, /* bad link */
551 eCSR_ROAM_LINK_QUAL_GOOD_IND = 1, /* acceptable for voice */
552 eCSR_ROAM_LINK_QUAL_VERY_GOOD_IND = 2, /* suitable for voice */
553 eCSR_ROAM_LINK_QUAL_EXCELLENT_IND = 3, /* suitable for voice */
554
555 eCSR_ROAM_LINK_QUAL_MAX_IND /* invalid value */
556
557} eCsrRoamLinkQualityInd;
558
559typedef enum
560{
561 eCSR_DISCONNECT_REASON_UNSPECIFIED = 0,
562 eCSR_DISCONNECT_REASON_MIC_ERROR,
563 eCSR_DISCONNECT_REASON_DISASSOC,
564 eCSR_DISCONNECT_REASON_DEAUTH,
565 eCSR_DISCONNECT_REASON_HANDOFF,
566 eCSR_DISCONNECT_REASON_IBSS_JOIN_FAILURE,
567 eCSR_DISCONNECT_REASON_IBSS_LEAVE,
568}eCsrRoamDisconnectReason;
569
570typedef enum
571{
572 // Not associated in Infra or participating in an IBSS / Ad-hoc network.
573 eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED,
574 // Associated in an Infrastructure network.
575 eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED,
576 // Participating in an IBSS network though disconnected (no partner stations
577 // in the IBSS).
578 eCSR_ASSOC_STATE_TYPE_IBSS_DISCONNECTED,
579 // Participating in an IBSS network with partner stations also present
580 eCSR_ASSOC_STATE_TYPE_IBSS_CONNECTED,
581 // Participating in a WDS network in AP or STA mode but not connected yet
582 eCSR_ASSOC_STATE_TYPE_WDS_DISCONNECTED,
583 // Participating in a WDS network and connected peer to peer
584 eCSR_ASSOC_STATE_TYPE_WDS_CONNECTED,
585#ifdef WLAN_SOFTAP_FEATURE
586 // Participating in a Infra network in AP not yet in connected state
587 eCSR_ASSOC_STATE_TYPE_INFRA_DISCONNECTED,
588 // Participating in a Infra network and connected to a peer
589 eCSR_ASSOC_STATE_TYPE_INFRA_CONNECTED,
590#endif
591
592}eCsrConnectState;
593
594
595// This parameter is no longer supported in the Profile. Need to set this in the global properties
596// for the adapter.
597typedef enum eCSR_MEDIUM_ACCESS
598{
599 eCSR_MEDIUM_ACCESS_AUTO = 0,
600 eCSR_MEDIUM_ACCESS_DCF,
601 eCSR_MEDIUM_ACCESS_eDCF,
602 eCSR_MEDIUM_ACCESS_HCF,
603
604 eCSR_MEDIUM_ACCESS_WMM_eDCF_802dot1p,
605 eCSR_MEDIUM_ACCESS_WMM_eDCF_DSCP,
606 eCSR_MEDIUM_ACCESS_WMM_eDCF_NoClassify,
607 eCSR_MEDIUM_ACCESS_11e_eDCF = eCSR_MEDIUM_ACCESS_eDCF,
608 eCSR_MEDIUM_ACCESS_11e_HCF = eCSR_MEDIUM_ACCESS_HCF,
609}eCsrMediaAccessType;
610
611typedef enum
612{
613 eCSR_TX_RATE_AUTO = 0, // use rate adaption to determine Tx rate.
614
615 eCSR_TX_RATE_1Mbps = 0x00000001,
616 eCSR_TX_RATE_2Mbps = 0x00000002,
617 eCSR_TX_RATE_5_5Mbps = 0x00000004,
618 eCSR_TX_RATE_6Mbps = 0x00000008,
619 eCSR_TX_RATE_9Mbps = 0x00000010,
620 eCSR_TX_RATE_11Mbps = 0x00000020,
621 eCSR_TX_RATE_12Mbps = 0x00000040,
622 eCSR_TX_RATE_18Mbps = 0x00000080,
623 eCSR_TX_RATE_24Mbps = 0x00000100,
624 eCSR_TX_RATE_36Mbps = 0x00000200,
625 eCSR_TX_RATE_42Mbps = 0x00000400,
626 eCSR_TX_RATE_48Mbps = 0x00000800,
627 eCSR_TX_RATE_54Mbps = 0x00001000,
628 eCSR_TX_RATE_72Mbps = 0x00002000,
629 eCSR_TX_RATE_84Mbps = 0x00004000,
630 eCSR_TX_RATE_96Mbps = 0x00008000,
631 eCSR_TX_RATE_108Mbps = 0x00010000,
632 eCSR_TX_RATE_126Mbps = 0x00020000,
633 eCSR_TX_RATE_144Mbps = 0x00040000,
634 eCSR_TX_RATE_168Mbps = 0x00080000,
635 eCSR_TX_RATE_192Mbps = 0x00100000,
636 eCSR_TX_RATE_216Mbps = 0x00200000,
637 eCSR_TX_RATE_240Mbps = 0x00400000,
638
639}eCsrExposedTxRate;
640
641typedef enum
642{
643 eCSR_OPERATING_CHANNEL_ALL = 0,
644 eCSR_OPERATING_CHANNEL_AUTO = eCSR_OPERATING_CHANNEL_ALL,
645 eCSR_OPERATING_CHANNEL_ANY = eCSR_OPERATING_CHANNEL_ALL,
646}eOperationChannel;
647
648typedef enum
649{
650 eCSR_DOT11_FRAG_THRESH_AUTO = -1,
651 eCSR_DOT11_FRAG_THRESH_MIN = 256,
652 eCSR_DOT11_FRAG_THRESH_MAX = 2346,
653 eCSR_DOT11_FRAG_THRESH_DEFAULT = 2000
654}eCsrDot11FragThresh;
655
656
657//for channel bonding for ibss
658typedef enum
659{
660 eCSR_CB_OFF = 0,
661 eCSR_CB_AUTO = 1,
662 eCSR_CB_DOWN = 2,
663 eCSR_CB_UP = 3,
664}eCsrCBChoice;
665
666//For channel bonding, the channel number gap is 4, either up or down. For both 11a and 11g mode.
667#define CSR_CB_CHANNEL_GAP 4
668#define CSR_CB_CENTER_CHANNEL_OFFSET 2
669#define CSR_MAX_24GHz_CHANNEL_NUMBER ( SIR_11B_CHANNEL_END )
Jeff Johnsone7245742012-09-05 17:12:55 -0700670#define CSR_MIN_5GHz_CHANNEL_NUMBER ( SIR_11A_CHANNEL_BEGIN )
671#define CSR_MAX_5GHz_CHANNEL_NUMBER ( SIR_11A_CHANNEL_END )
Jeff Johnson295189b2012-06-20 16:38:30 -0700672
673// WEP keysize (in bits)...
674typedef enum
675{
676 eCSR_SECURITY_WEP_KEYSIZE_40 = 40, // 40 bit key + 24bit IV = 64bit WEP
677 eCSR_SECURITY_WEP_KEYSIZE_104 = 104, // 104bit key + 24bit IV = 128bit WEP
678
679 eCSR_SECURITY_WEP_KEYSIZE_MIN = eCSR_SECURITY_WEP_KEYSIZE_40,
680 eCSR_SECURITY_WEP_KEYSIZE_MAX = eCSR_SECURITY_WEP_KEYSIZE_104,
681 eCSR_SECURITY_WEP_KEYSIZE_MAX_BYTES = ( eCSR_SECURITY_WEP_KEYSIZE_MAX / 8 ),
682}eCsrWEPKeySize;
683
684
685// Possible values for the WEP static key ID...
686typedef enum
687{
688
689 eCSR_SECURITY_WEP_STATIC_KEY_ID_MIN = 0,
690 eCSR_SECURITY_WEP_STATIC_KEY_ID_MAX = 3,
691 eCSR_SECURITY_WEP_STATIC_KEY_ID_DEFAULT = 0,
692
693 eCSR_SECURITY_WEP_STATIC_KEY_ID_INVALID = -1,
694
695}eCsrWEPStaticKeyID;
696
697#define CSR_MAX_NUM_KEY (eCSR_SECURITY_WEP_STATIC_KEY_ID_MAX + 1)
698
699typedef enum
700{
701 eCSR_SECURITY_SET_KEY_ACTION_NO_CHANGE,
702 eCSR_SECURITY_SET_KEY_ACTION_SET_KEY,
703 eCSR_SECURITY_SET_KEY_ACTION_DELETE_KEY,
704}eCsrSetKeyAction;
705
706typedef enum
707{
708 eCSR_BAND_ALL,
709 eCSR_BAND_24,
710 eCSR_BAND_5G,
711 eCSR_BAND_MAX,
712}eCsrBand;
713
714
715typedef enum
716{
717 // Roaming because HDD requested for reassoc by changing one of the fields in
718 // tCsrRoamModifyProfileFields. OR
719 // Roaming because SME requested for reassoc by changing one of the fields in
720 // tCsrRoamModifyProfileFields.
721 eCsrRoamReasonStaCapabilityChanged,
722 // Roaming because SME requested for reassoc to a different AP, as part of
723 // inter AP handoff.
724 eCsrRoamReasonBetterAP,
725 // Roaming because SME requested it as the link is lost - placeholder, will
726 // clean it up once handoff code gets in
727 eCsrRoamReasonSmeIssuedForLostLink,
728
729}eCsrRoamReasonCodes;
730
731typedef enum
732{
733 eCsrRoamWmmAuto = 0,
734 eCsrRoamWmmQbssOnly = 1,
735 eCsrRoamWmmNoQos = 2,
736
737} eCsrRoamWmmUserModeType;
738
739typedef enum
740{
741 eCSR_REQUESTER_MIN = 0,
742 eCSR_DIAG,
743 eCSR_UMA_GAN,
744 eCSR_HDD
745} eCsrStatsRequesterType;
746
747typedef struct tagPmkidCandidateInfo
748{
749 tCsrBssid BSSID;
750 tANI_BOOLEAN preAuthSupported;
751}tPmkidCandidateInfo;
752
753typedef struct tagPmkidCacheInfo
754{
755 tCsrBssid BSSID;
756 tANI_U8 PMKID[CSR_RSN_PMKID_SIZE];
757}tPmkidCacheInfo;
758
759#ifdef FEATURE_WLAN_WAPI
760typedef struct tagBkidCandidateInfo
761{
762 tCsrBssid BSSID;
763 tANI_BOOLEAN preAuthSupported;
764}tBkidCandidateInfo;
765
766typedef struct tagBkidCacheInfo
767{
768 tCsrBssid BSSID;
769 tANI_U8 BKID[CSR_WAPI_BKID_SIZE];
770}tBkidCacheInfo;
771#endif /* FEATURE_WLAN_WAPI */
772
773typedef struct tagCsrKeys
774{
775 tANI_U8 KeyLength[ CSR_MAX_NUM_KEY ]; //Also use to indicate whether the key index is set
776 tANI_U8 KeyMaterial[ CSR_MAX_NUM_KEY ][ CSR_MAX_KEY_LEN ];
777 tANI_U8 defaultIndex;
778}tCsrKeys;
779
780/* Following are fields which are part of tCsrRoamConnectedProfile might need
781 modification dynamically once STA is up & running and this could trigger
782 reassoc */
783typedef struct tagCsrRoamModifyProfileFields
784{
785 // during connect this specifies ACs U-APSD is to be setup
786 // for (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored).
787 // During assoc response this COULD carry confirmation of what ACs U-APSD
788 // got setup for. Later if an APP looking for APSD, SME-QoS might need to
789 // modify this field
790 tANI_U8 uapsd_mask;
791 // HDD might ask to modify this field
792 tANI_U16 listen_interval;
793}tCsrRoamModifyProfileFields;
794
795typedef struct tagCsrRoamProfile
796{
797 //For eCSR_BSS_TYPE_WDS_AP. There must be one SSID in SSIDs.
798 //For eCSR_BSS_TYPE_WDS_STA. There must be two SSIDs. Index 0 is the SSID of the WDS-AP
799 //that we need to join. Index 1 is the SSID for self BSS.
800 tCsrSSIDs SSIDs;
801 tCsrBSSIDs BSSIDs;
802 tANI_U32 phyMode; //this is a bit mask of all the needed phy mode defined in eCsrPhyMode
803 eCsrRoamBssType BSSType;
804
805 tCsrAuthList AuthType;
806 eCsrAuthType negotiatedAuthType;
807
808 tCsrEncryptionList EncryptionType;
809 //This field is for output only, not for input
810 eCsrEncryptionType negotiatedUCEncryptionType;
811
812 //eCSR_ENCRYPT_TYPE_ANY cannot be set in multicast encryption type. If caller doesn't case,
813 //put all supported encryption types in here
814 tCsrEncryptionList mcEncryptionType;
815 //This field is for output only, not for input
816 eCsrEncryptionType negotiatedMCEncryptionType;
817
818 tCsrKeys Keys;
819 eCsrCBChoice CBMode; //up, down or auto
820 tCsrChannelInfo ChannelInfo;
821 tANI_U8 operationChannel;
822 tANI_U16 beaconInterval; //If this is 0, SME will fill in for caller.
823 // during connect this specifies ACs U-APSD is to be setup
824 // for (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored).
825 // During assoc response this COULD carry confirmation of what ACs U-APSD got setup for
826 tANI_U8 uapsd_mask;
827 tANI_U32 nWPAReqIELength; //The byte count in the pWPAReqIE
828 tANI_U8 *pWPAReqIE; //If not null, it has the IE byte stream for WPA
829 tANI_U32 nRSNReqIELength; //The byte count in the pRSNReqIE
830 tANI_U8 *pRSNReqIE; //If not null, it has the IE byte stream for RSN
831#ifdef FEATURE_WLAN_WAPI
832 tANI_U32 nWAPIReqIELength; //The byte count in the pWAPIReqIE
833 tANI_U8 *pWAPIReqIE; //If not null, it has the IE byte stream for WAPI
834#endif /* FEATURE_WLAN_WAPI */
835
836 tANI_U32 nAddIEScanLength; //The byte count in the pAddIE for scan (at the time of join)
837 tANI_U8 *pAddIEScan; //If not null, it has the IE byte stream for additional IE, which can be WSC IE and/or P2P IE
838 tANI_U32 nAddIEAssocLength; //The byte count in the pAddIE for assoc
839 tANI_U8 *pAddIEAssoc; //If not null, it has the IE byte stream for additional IE, which can be WSC IE and/or P2P IE
840
841 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN]; //it is ignored if [0] is 0.
842 /*WPS Association if true => auth and ecryption should be ignored*/
843 tANI_BOOLEAN bWPSAssociation;
844 tANI_U32 nWSCReqIELength; //The byte count in the pWSCReqIE
845 tANI_U8 *pWSCReqIE; //If not null, it has the IE byte stream for WSC
846
847#ifdef WLAN_SOFTAP_FEATURE
848 tANI_U8 ieee80211d;
849 tANI_U8 privacy;
850 tANI_BOOLEAN fwdWPSPBCProbeReq;
851 tAniAuthType csr80211AuthType;
852 tANI_U32 dtimPeriod;
853 tANI_BOOLEAN ApUapsdEnable;
854 tANI_BOOLEAN protEnabled;
855 tANI_BOOLEAN obssProtEnabled;
856 tANI_U16 cfg_protection;
857 tANI_U8 wps_state;
858#endif
859
860#ifdef WLAN_FEATURE_VOWIFI_11R
861 tCsrMobilityDomainInfo MDID;
862#endif
863 tVOS_CON_MODE csrPersona;
864
865}tCsrRoamProfile;
866
867
868typedef struct tagCsrRoamConnectedProfile
869{
870 tSirMacSSid SSID;
871 tANI_BOOLEAN handoffPermitted;
872 tANI_BOOLEAN ssidHidden;
873 tCsrBssid bssid;
874 eCsrRoamBssType BSSType;
875 eCsrAuthType AuthType;
876 tCsrAuthList AuthInfo;
877 eCsrEncryptionType EncryptionType;
878 tCsrEncryptionList EncryptionInfo;
879 eCsrEncryptionType mcEncryptionType;
880 tCsrEncryptionList mcEncryptionInfo;
881 eCsrCBChoice CBMode; //up, down or auto
882 tANI_U8 operationChannel;
Jeff Johnsone7245742012-09-05 17:12:55 -0700883 tANI_U16 beaconInterval;
Jeff Johnson295189b2012-06-20 16:38:30 -0700884 tCsrKeys Keys;
885 // meaningless on connect. It's an OUT param from CSR's point of view
886 // During assoc response carries the ACM bit-mask i.e. what
887 // ACs have ACM=1 (if any),
888 // (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored)
889 tANI_U8 acm_mask;
890 tCsrRoamModifyProfileFields modifyProfileFields;
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700891 tANI_U32 nAddIEAssocLength; //The byte count in the pAddIE for assoc
892 tANI_U8 *pAddIEAssoc; //If not null, it has the IE byte stream for additional IE, which can be WSC IE and/or P2P IE
893
Jeff Johnson295189b2012-06-20 16:38:30 -0700894 tSirBssDescription *pBssDesc;
895 tANI_BOOLEAN qap; //AP supports QoS
896 tANI_BOOLEAN qosConnection; //A connection is QoS enabled
897#ifdef WLAN_FEATURE_VOWIFI_11R
898 tCsrMobilityDomainInfo MDID;
899#endif
900
901#ifdef FEATURE_WLAN_CCX
902 tCsrCcxCckmInfo ccxCckmInfo;
903 tANI_BOOLEAN isCCXAssoc;
904#endif
905}tCsrRoamConnectedProfile;
906
907
908#ifdef WLAN_FEATURE_VOWIFI_11R
909typedef struct tagCsr11rConfigParams
910{
911 tANI_BOOLEAN IsFTResourceReqSupported;
912} tCsr11rConfigParams;
913#endif
914
915#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
916typedef struct tagCsrNeighborRoamConfigParams
917{
918
919 tANI_U32 nNeighborScanTimerPeriod;
920 tANI_U8 nNeighborLookupRssiThreshold;
921 tANI_U8 nNeighborReassocRssiThreshold;
922 tANI_U16 nNeighborScanMinChanTime;
923 tANI_U16 nNeighborScanMaxChanTime;
924 sCsrChannel neighborScanChanList;
925 tANI_U8 nMaxNeighborRetries;
926 tANI_U16 nNeighborResultsRefreshPeriod;
927}tCsrNeighborRoamConfigParams;
928#endif
929
930typedef struct tagCsrConfigParam
931{
932 tANI_U32 FragmentationThreshold;
Jeff Johnsone7245742012-09-05 17:12:55 -0700933 tANI_U32 channelBondingMode24GHz; // keep this tANI_U32. This gets converted to ePhyChannelBondState
934 tANI_U32 channelBondingMode5GHz; // in csrChangeDefaultConfigParam using convertCBIniValueToPhyCBState
Jeff Johnson295189b2012-06-20 16:38:30 -0700935 eCsrPhyMode phyMode;
936 eCsrBand eBand;
937 tANI_U32 RTSThreshold;
938 tANI_U32 HeartbeatThresh50;
939 tANI_U32 HeartbeatThresh24;
940 eCsrCBChoice cbChoice;
941 eCsrBand bandCapability; //indicate hw capability
942 tANI_U32 bgScanInterval;
943 tANI_U16 TxRate;
944 eCsrRoamWmmUserModeType WMMSupportMode;
945 tANI_BOOLEAN Is11eSupportEnabled;
946 tANI_BOOLEAN Is11dSupportEnabled;
947 tANI_BOOLEAN Is11dSupportEnabledOriginal;
948 tANI_BOOLEAN Is11hSupportEnabled;
949 tANI_BOOLEAN shortSlotTime;
950 tANI_BOOLEAN ProprietaryRatesEnabled;
951 tANI_U8 AdHocChannel24;
952 tANI_U8 AdHocChannel5G;
953 tANI_U32 impsSleepTime; //in units of seconds
954 tANI_U32 nScanResultAgeCount; //this number minus one is the number of times a scan doesn't find it before it is removed
955 tANI_U32 scanAgeTimeNCNPS; //scan result aging time threshold when Not-Connect-No-Power-Save, in seconds
956 tANI_U32 scanAgeTimeNCPS; //scan result aging time threshold when Not-Connect-Power-Save, in seconds
957 tANI_U32 scanAgeTimeCNPS; //scan result aging time threshold when Connect-No-Power-Save, in seconds,
958 tANI_U32 scanAgeTimeCPS; //scan result aging time threshold when Connect-Power-Savein seconds
959 tANI_U32 nRoamingTime; //In seconds, CSR will try this long before gives up. 0 means no roaming
960 tANI_U8 bCatRssiOffset; //to set the RSSI difference for each category
961 tANI_U8 fEnableMCCMode; //to set MCC Enable/Disable mode
Mohit Khanna7ed53f02012-09-11 17:52:10 -0700962 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
963 //at the moment, this flag is provided only to pass Wi-Fi Cert. 5.1.12
Jeff Johnson295189b2012-06-20 16:38:30 -0700964 tCsr11dinfo Csr11dinfo;
965 //Whether to limit the channels to the ones set in Csr11dInfo. If true, the opertaional
966 //channels are limited to the default channel list. It is an "AND" operation between the
967 //default channels and the channels in the 802.11d IE.
968 tANI_BOOLEAN fEnforce11dChannels;
969 //Country Code Priority
970 //0 = 802.11D > Country IOCTL > NV
971 //1 = Country IOCTL > 802.11D > NV
972 tANI_BOOLEAN fSupplicantCountryCodeHasPriority;
973 //When true, AP with unknown country code won't be see.
974 //"Unknown country code" means either Ap doesn't have 11d IE or we cannot
975 //find a domain for the country code in its 11d IE.
976 tANI_BOOLEAN fEnforceCountryCodeMatch;
977 //When true, only APs in the default domain can be seen. If the Ap has "unknown country
978 //code", or the domain of the country code doesn't match the default domain, the Ap is
979 //not acceptable.
980 tANI_BOOLEAN fEnforceDefaultDomain;
981
982 tANI_U16 vccRssiThreshold;
983 tANI_U32 vccUlMacLossThreshold;
984
985 tANI_U32 nPassiveMinChnTime; //in units of milliseconds
986 tANI_U32 nPassiveMaxChnTime; //in units of milliseconds
987 tANI_U32 nActiveMinChnTime; //in units of milliseconds
988 tANI_U32 nActiveMaxChnTime; //in units of milliseconds
Madan Mohan Koyyalamudi4ff9cd62012-10-30 17:48:57 -0700989#ifdef WLAN_AP_STA_CONCURRENCY
990 tANI_U32 nPassiveMinChnTimeConc; //in units of milliseconds
991 tANI_U32 nPassiveMaxChnTimeConc; //in units of milliseconds
992 tANI_U32 nActiveMinChnTimeConc; //in units of milliseconds
993 tANI_U32 nActiveMaxChnTimeConc; //in units of milliseconds
994 tANI_U32 nRestTimeConc; //in units of milliseconds
Vinay Malekal05fdc812012-12-17 13:04:30 -0800995 tANI_U8 nNumChanCombinedConc; //number of channels combined
996 //in each split scan operation
Madan Mohan Koyyalamudi4ff9cd62012-10-30 17:48:57 -0700997#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700998
999 tANI_BOOLEAN IsIdleScanEnabled;
1000 //in dBm, the maximum TX power
1001 //The actual TX power is the lesser of this value and 11d.
1002 //If 11d is disable, the lesser of this and default setting.
1003 tANI_U8 nTxPowerCap;
1004 tANI_U32 statsReqPeriodicity; //stats request frequency from PE while in full power
1005 tANI_U32 statsReqPeriodicityInPS;//stats request frequency from PE while in power save
1006#ifdef WLAN_FEATURE_VOWIFI_11R
1007 tCsr11rConfigParams csr11rConfig;
1008#endif
1009#ifdef FEATURE_WLAN_CCX
1010 tANI_U8 isCcxIniFeatureEnabled;
1011#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001012#ifdef FEATURE_WLAN_LFR
1013 tANI_U8 isFastRoamIniFeatureEnabled;
1014#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001015
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001016#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
Jeff Johnson295189b2012-06-20 16:38:30 -07001017 tANI_U8 isFastTransitionEnabled;
Jeff Johnson43971f52012-07-17 12:26:56 -07001018 tANI_U8 RoamRssiDiff;
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08001019 tANI_U8 nImmediateRoamRssiDiff;
Jeff Johnson295189b2012-06-20 16:38:30 -07001020#endif
1021
1022#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
1023 tCsrNeighborRoamConfigParams neighborRoamConfig;
1024#endif
1025
1026 /* Instead of Reassoc, send ADDTS/DELTS even when ACM is off for that AC
1027 * This is mandated by WMM-AC certification */
1028 tANI_BOOLEAN addTSWhenACMIsOff;
1029
1030
1031 /*channelPowerInfoList24 has been seen corrupted. Set this flag to true trying to
1032 * detect when it happens. Adding this into code because we can't reproduce it easily.
1033 * We don't know when it happens. */
1034 tANI_BOOLEAN fValidateList;
1035
1036 /*Customer wants to start with an active scan based on the default country code.
1037 * This optimization will minimize the driver load to association time.
1038 * Based on this flag we will bypass the initial passive scan needed for 11d
1039 * to determine the country code & domain */
1040 tANI_BOOLEAN fEnableBypass11d;
1041
1042 /*Customer wants to optimize the scan time. Avoiding scans(passive) on DFS
1043 * channels while swipping through both bands can save some time
1044 * (apprx 1.3 sec) */
1045 tANI_BOOLEAN fEnableDFSChnlScan;
1046
1047 //To enable/disable scanning 2.4Ghz channels twice on a single scan request from HDD
1048 tANI_BOOLEAN fScanTwice;
Jeff Johnsone7245742012-09-05 17:12:55 -07001049#ifdef WLAN_FEATURE_11AC
1050 tANI_U32 nVhtChannelWidth;
Shailender Karmuchi08f87c22013-01-17 12:51:24 -08001051 tANI_U8 enableTxBF;
Shailender Karmuchicc3fe442013-02-16 18:18:33 -08001052 tANI_U8 txBFCsnValue;
Jeff Johnsone7245742012-09-05 17:12:55 -07001053#endif
1054
1055 /*
1056 * To enable/disable scanning only 2.4Ghz channels on first scan
1057 */
1058 tANI_BOOLEAN fFirstScanOnly2GChnl;
Jeff Johnson295189b2012-06-20 16:38:30 -07001059
Madan Mohan Koyyalamudi3f65e312012-11-06 15:31:12 -08001060 tANI_BOOLEAN fIgnore_chan165;
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08001061#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
1062 tANI_BOOLEAN nRoamPrefer5GHz;
1063#endif
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -08001064
Sandeep Puligilla2b6dc632012-12-17 14:44:16 -08001065 tANI_U8 scanCfgAgingTime;
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -08001066
1067 tANI_U8 enableTxLdpc;
Jeff Johnson295189b2012-06-20 16:38:30 -07001068}tCsrConfigParam;
1069
1070//Tush
1071typedef struct tagCsrUpdateConfigParam
1072{
1073 tCsr11dinfo Csr11dinfo;
1074}tCsrUpdateConfigParam;
1075
1076typedef struct tagCsrRoamInfo
1077{
1078 tCsrRoamProfile *pProfile; //may be NULL
1079 tSirBssDescription *pBssDesc; //May be NULL
1080 tANI_U32 nBeaconLength; //the length, in bytes, of the beacon frame, can be 0
1081 tANI_U32 nAssocReqLength; //the length, in bytes, of the assoc req frame, can be 0
1082 tANI_U32 nAssocRspLength; //The length, in bytes, of the assoc rsp frame, can be 0
1083 tANI_U32 nFrameLength;
1084 tANI_U8 frameType;
1085 tANI_U8 *pbFrames; //Point to a buffer contain the beacon, assoc req, assoc rsp frame, in that order
1086 //user needs to use nBeaconLength, nAssocReqLength, nAssocRspLength to desice where
1087 //each frame starts and ends.
1088 tANI_BOOLEAN fReassocReq; //set to true if for re-association
1089 tANI_BOOLEAN fReassocRsp; //set to true if for re-association
1090 tCsrBssid bssid;
1091 //Only valid in IBSS
1092 //this is the peers MAC address for eCSR_ROAM_RESULT_IBSS_NEW_PEER or PEER_DEPARTED
1093 tCsrBssid peerMac;
1094 tSirResultCodes statusCode;
1095 tANI_U32 reasonCode; //this could be our own defined or sent from the other BSS(per 802.11 spec)
1096 tANI_U8 staId; // Peer stationId when connected
1097 /*The DPU signatures will be sent eventually to TL to help it determine the
1098 association to which a packet belongs to*/
1099 /*Unicast DPU signature*/
1100 tANI_U8 ucastSig;
1101
1102 /*Broadcast DPU signature*/
1103 tANI_U8 bcastSig;
1104
1105 tANI_BOOLEAN fAuthRequired; //FALSE means auth needed from supplicant. TRUE means authenticated(static WEP, open)
1106 tANI_U8 sessionId;
1107 tANI_U8 rsnIELen;
1108 tANI_U8 *prsnIE;
1109
1110 tANI_U8 addIELen;
1111 tANI_U8 *paddIE;
1112
1113 union
1114 {
1115 tSirMicFailureInfo *pMICFailureInfo;
1116 tCsrRoamConnectedProfile *pConnectedProfile;
1117#ifdef WLAN_SOFTAP_FEATURE
1118 tSirWPSPBCProbeReq *pWPSPBCProbeReq;
1119#endif
1120 } u;
1121
1122#ifdef WLAN_SOFTAP_FEATURE
1123 tANI_BOOLEAN wmmEnabledSta; //set to true if WMM enabled STA
1124 tANI_U32 dtimPeriod;
1125#endif
1126
1127#ifdef FEATURE_WLAN_CCX
1128 tANI_BOOLEAN isCCXAssoc;
1129#endif
1130#ifdef WLAN_FEATURE_P2P
1131 void* pRemainCtx;
1132 tANI_U32 rxChan;
1133#endif
1134
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001135#ifdef FEATURE_WLAN_TDLS
1136 tANI_U8 staType;
1137#endif
1138
Jeff Johnson295189b2012-06-20 16:38:30 -07001139 // Required for indicating the frames to upper layer
1140 tANI_U32 beaconLength;
1141 tANI_U8* beaconPtr;
1142 tANI_U32 assocReqLength;
1143 tANI_U8* assocReqPtr;
Chilam NG571c65a2013-01-19 12:27:36 +05301144
1145 tANI_S8 rxRssi;
Jeff Johnson295189b2012-06-20 16:38:30 -07001146}tCsrRoamInfo;
1147
1148
1149
1150
1151
1152typedef struct tagCsrFreqScanInfo
1153{
1154 tANI_U32 nStartFreq; //in unit of MHz
1155 tANI_U32 nEndFreq; //in unit of MHz
1156 tSirScanType scanType;
1157}tCsrFreqScanInfo;
1158
1159
1160#ifdef WLAN_SOFTAP_FEATURE
1161typedef struct sSirSmeAssocIndToUpperLayerCnf
1162{
1163 tANI_U16 messageType; // eWNI_SME_ASSOC_CNF
1164 tANI_U16 length;
1165 tANI_U8 sessionId;
1166 tSirResultCodes statusCode;
1167 tSirMacAddr bssId; // Self BSSID
1168 tSirMacAddr peerMacAddr;
1169 tANI_U16 aid;
1170 tSirMacAddr alternateBssId;
1171 tANI_U8 alternateChannelId;
1172 tANI_U8 wmmEnabledSta; //set to true if WMM enabled STA
1173 tSirRSNie rsnIE; // RSN IE received from peer
1174 tSirAddie addIE; // Additional IE received from peer, which can be WSC and/or P2P IE
1175 tANI_U8 reassocReq; //set to true if reassoc
1176} tSirSmeAssocIndToUpperLayerCnf, *tpSirSmeAssocIndToUpperLayerCnf;
1177#endif
1178
1179typedef struct tagCsrSummaryStatsInfo
1180{
1181 tANI_U32 retry_cnt[4];
1182 tANI_U32 multiple_retry_cnt[4];
1183 tANI_U32 tx_frm_cnt[4];
1184 //tANI_U32 num_rx_frm_crc_err; same as rx_error_cnt
1185 //tANI_U32 num_rx_frm_crc_ok; same as rx_frm_cnt
1186 tANI_U32 rx_frm_cnt;
1187 tANI_U32 frm_dup_cnt;
1188 tANI_U32 fail_cnt[4];
1189 tANI_U32 rts_fail_cnt;
1190 tANI_U32 ack_fail_cnt;
1191 tANI_U32 rts_succ_cnt;
1192 tANI_U32 rx_discard_cnt;
1193 tANI_U32 rx_error_cnt;
1194 tANI_U32 tx_byte_cnt;
1195
1196}tCsrSummaryStatsInfo;
1197
1198typedef struct tagCsrGlobalClassAStatsInfo
1199{
1200 tANI_U32 rx_frag_cnt;
1201 tANI_U32 promiscuous_rx_frag_cnt;
1202 //tANI_U32 rx_fcs_err;
1203 tANI_U32 rx_input_sensitivity;
1204 tANI_U32 max_pwr;
1205 //tANI_U32 default_pwr;
1206 tANI_U32 sync_fail_cnt;
1207 tANI_U32 tx_rate;
1208 //mcs index for HT20 and HT40 rates
1209 tANI_U32 mcs_index;
1210 //to defferentiate between HT20 and HT40 rates;short and long guard interval
1211 tANI_U32 tx_rate_flags;
1212
1213}tCsrGlobalClassAStatsInfo;
1214
1215typedef struct tagCsrGlobalClassBStatsInfo
1216{
1217 tANI_U32 uc_rx_wep_unencrypted_frm_cnt;
1218 tANI_U32 uc_rx_mic_fail_cnt;
1219 tANI_U32 uc_tkip_icv_err;
1220 tANI_U32 uc_aes_ccmp_format_err;
1221 tANI_U32 uc_aes_ccmp_replay_cnt;
1222 tANI_U32 uc_aes_ccmp_decrpt_err;
1223 tANI_U32 uc_wep_undecryptable_cnt;
1224 tANI_U32 uc_wep_icv_err;
1225 tANI_U32 uc_rx_decrypt_succ_cnt;
1226 tANI_U32 uc_rx_decrypt_fail_cnt;
1227 tANI_U32 mcbc_rx_wep_unencrypted_frm_cnt;
1228 tANI_U32 mcbc_rx_mic_fail_cnt;
1229 tANI_U32 mcbc_tkip_icv_err;
1230 tANI_U32 mcbc_aes_ccmp_format_err;
1231 tANI_U32 mcbc_aes_ccmp_replay_cnt;
1232 tANI_U32 mcbc_aes_ccmp_decrpt_err;
1233 tANI_U32 mcbc_wep_undecryptable_cnt;
1234 tANI_U32 mcbc_wep_icv_err;
1235 tANI_U32 mcbc_rx_decrypt_succ_cnt;
1236 tANI_U32 mcbc_rx_decrypt_fail_cnt;
1237
1238}tCsrGlobalClassBStatsInfo;
1239
1240typedef struct tagCsrGlobalClassCStatsInfo
1241{
1242 tANI_U32 rx_amsdu_cnt;
1243 tANI_U32 rx_ampdu_cnt;
1244 tANI_U32 tx_20_frm_cnt;
1245 tANI_U32 rx_20_frm_cnt;
1246 tANI_U32 rx_mpdu_in_ampdu_cnt;
1247 tANI_U32 ampdu_delimiter_crc_err;
1248
1249}tCsrGlobalClassCStatsInfo;
1250
1251typedef struct tagCsrGlobalClassDStatsInfo
1252{
1253 tANI_U32 tx_uc_frm_cnt;
1254 tANI_U32 tx_mc_frm_cnt;
1255 tANI_U32 tx_bc_frm_cnt;
1256 tANI_U32 rx_uc_frm_cnt;
1257 tANI_U32 rx_mc_frm_cnt;
1258 tANI_U32 rx_bc_frm_cnt;
1259 tANI_U32 tx_uc_byte_cnt[4];
1260 tANI_U32 tx_mc_byte_cnt;
1261 tANI_U32 tx_bc_byte_cnt;
1262 tANI_U32 rx_uc_byte_cnt[4];
1263 tANI_U32 rx_mc_byte_cnt;
1264 tANI_U32 rx_bc_byte_cnt;
1265 tANI_U32 rx_byte_cnt;
1266 tANI_U32 num_rx_bytes_crc_ok;
1267 tANI_U32 rx_rate;
1268
1269}tCsrGlobalClassDStatsInfo;
1270
1271typedef struct tagCsrPerStaStatsInfo
1272{
1273 tANI_U32 tx_frag_cnt[4];
1274 tANI_U32 tx_ampdu_cnt;
1275 tANI_U32 tx_mpdu_in_ampdu_cnt;
1276} tCsrPerStaStatsInfo;
1277
1278typedef struct tagCsrRoamSetKey
1279{
1280 eCsrEncryptionType encType;
1281 tAniKeyDirection keyDirection; //Tx, Rx or Tx-and-Rx
1282 tCsrBssid peerMac; //Peers MAC address. ALL 1's for group key
1283 tANI_U8 paeRole; //0 for supplicant
1284 tANI_U8 keyId; // Kye index
1285 tANI_U16 keyLength; //Number of bytes containing the key in pKey
1286 tANI_U8 Key[CSR_MAX_KEY_LEN];
1287 tANI_U8 keyRsc[CSR_MAX_RSC_LEN];
1288} tCsrRoamSetKey;
1289
1290typedef struct tagCsrRoamRemoveKey
1291{
1292 eCsrEncryptionType encType;
1293 tCsrBssid peerMac; //Peers MAC address. ALL 1's for group key
1294 tANI_U8 keyId; //key index
1295} tCsrRoamRemoveKey;
1296
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001297#ifdef FEATURE_WLAN_TDLS
1298typedef struct tagCsrTdlsSendMgmt
1299{
1300 tSirMacAddr peerMac;
1301 tANI_U8 frameType;
1302 tANI_U8 dialog;
1303 tANI_U16 statusCode;
Hoonki Leea34dd892013-02-05 22:56:02 -08001304 tANI_U8 responder;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001305 tANI_U8 *buf;
1306 tANI_U8 len;
1307
1308}tCsrTdlsSendMgmt;
1309
1310#ifdef FEATURE_WLAN_TDLS_INTERNAL
1311typedef struct tagCsrTdlsDisRequest
1312{
1313 tSirMacAddr peerMac;
1314 tANI_U8 disType;
1315}tCsrTdlsDisRequest;
1316
1317typedef struct tagCsrTdlsSetupRequest
1318{
1319 tSirMacAddr peerMac;
1320 tANI_U8 linkIndex;
1321}tCsrTdlsSetupRequest;
1322
1323typedef struct tagCsrTdlsTeardownRequest
1324{
1325 tSirMacAddr peerMac;
1326 tANI_U8 linkIndex;
1327}tCsrTdlsTeardownRequest ;
1328#endif
1329#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001330
1331typedef void * tScanResultHandle;
1332
1333#define CSR_INVALID_SCANRESULT_HANDLE (NULL)
1334
1335
1336
1337////////////////////////////////////////////Common SCAN starts
1338
1339//void *p2 -- the second context pass in for the caller
1340//***what if callback is called before requester gets the scanId??
1341typedef eHalStatus (*csrScanCompleteCallback)(tHalHandle, void *p2, tANI_U32 scanID, eCsrScanStatus status);
1342
1343
1344
1345///////////////////////////////////////////Common Roam starts
1346
1347//pContext is the pContext passed in with the roam request
1348//pParam is a pointer to a tCsrRoamInfo, see definition of eRoamCmdStatus and
1349// eRoamCmdResult for detail valid members. It may be NULL
1350//roamId is to identify the callback related roam request. 0 means unsolicit
1351//roamStatus is a flag indicating the status of the callback
1352//roamResult is the result
1353typedef eHalStatus (*csrRoamCompleteCallback)(void *pContext, tCsrRoamInfo *pParam, tANI_U32 roamId,
1354 eRoamCmdStatus roamStatus, eCsrRoamResult roamResult);
1355
1356typedef eHalStatus (*csrRoamSessionCloseCallback)(void *pContext);
1357
1358/* ---------------------------------------------------------------------------
1359 \fn csrRoamGetNumPMKIDCache
1360 \brief return number of PMKID cache entries
1361 \return tANI_U32 - the number of PMKID cache entries
1362 -------------------------------------------------------------------------------*/
1363//tANI_U32 csrRoamGetNumPMKIDCache(tHalHandle hHal);
1364
1365/* ---------------------------------------------------------------------------
1366 \fn csrRoamGetPMKIDCache
1367 \brief return PMKID cache from CSR
1368 \param pNum - caller allocated memory that has the space of the number of pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the
1369 needed or actually number in tPmkidCacheInfo.
1370 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if any, upon return
1371 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
1372 -------------------------------------------------------------------------------*/
1373//eHalStatus csrRoamGetPMKIDCache(tHalHandle hHal, tANI_U32 *pNum, tPmkidCacheInfo *pPmkidCache);
1374
1375//pProfile - pointer to tCsrRoamProfile
1376#define CSR_IS_START_IBSS(pProfile) (eCSR_BSS_TYPE_START_IBSS == (pProfile)->BSSType)
1377#define CSR_IS_JOIN_TO_IBSS(pProfile) (eCSR_BSS_TYPE_IBSS == (pProfile)->BSSType)
1378#define CSR_IS_IBSS(pProfile) ( CSR_IS_START_IBSS(pProfile) || CSR_IS_JOIN_TO_IBSS(pProfile) )
1379#define CSR_IS_INFRASTRUCTURE(pProfile) (eCSR_BSS_TYPE_INFRASTRUCTURE == (pProfile)->BSSType)
1380#define CSR_IS_ANY_BSS_TYPE(pProfile) (eCSR_BSS_TYPE_ANY == (pProfile)->BSSType)
1381#define CSR_IS_WDS_AP( pProfile ) ( eCSR_BSS_TYPE_WDS_AP == (pProfile)->BSSType )
1382#define CSR_IS_WDS_STA( pProfile ) ( eCSR_BSS_TYPE_WDS_STA == (pProfile)->BSSType )
1383#define CSR_IS_WDS( pProfile ) ( CSR_IS_WDS_AP( pProfile ) || CSR_IS_WDS_STA( pProfile ) )
1384#ifdef WLAN_SOFTAP_FEATURE
1385#define CSR_IS_INFRA_AP( pProfile ) ( eCSR_BSS_TYPE_INFRA_AP == (pProfile)->BSSType )
1386#endif
1387
1388//pProfile - pointer to tCsrRoamConnectedProfile
1389#ifdef WLAN_SOFTAP_FEATURE
1390#define CSR_IS_CONN_INFRA_AP( pProfile ) ( eCSR_BSS_TYPE_INFRA_AP == (pProfile)->BSSType )
1391#endif
1392#define CSR_IS_CONN_WDS_AP( pProfile ) ( eCSR_BSS_TYPE_WDS_AP == (pProfile)->BSSType )
1393#define CSR_IS_CONN_WDS_STA( pProfile ) ( eCSR_BSS_TYPE_WDS_STA == (pProfile)->BSSType )
1394#define CSR_IS_CONN_WDS( pProfile ) ( CSR_IS_WDS_AP( pProfile ) || CSR_IS_WDS_STA( pProfile ) )
1395
1396
1397
1398///////////////////////////////////////////Common Roam ends
1399
1400
1401
1402#ifdef WLAN_SOFTAP_FEATURE
1403/* ---------------------------------------------------------------------------
1404 \fn csrSetChannels
1405 \brief HDD calls this function to change some global settings.
1406 caller must set the all fields or call csrGetConfigParam to prefill the fields.
1407 \param pParam - caller allocated memory
1408 \return eHalStatus
1409 -------------------------------------------------------------------------------*/
1410
1411eHalStatus csrSetChannels(tHalHandle hHal, tCsrConfigParam *pParam );
1412
1413eHalStatus csrSetRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode);
1414#endif
1415
1416
1417//enum to string conversion for debug output
1418const char * get_eRoamCmdStatus_str(eRoamCmdStatus val);
1419const char * get_eCsrRoamResult_str(eCsrRoamResult val);
1420/* ---------------------------------------------------------------------------
1421 \fn csrSetPhyMode
1422 \brief HDD calls this function to set the phyMode.
1423 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1424 CSR.
1425 \param phyMode - indicate the phyMode needs to set to. The value has to be either 0, or some bits set.
1426 See eCsrPhyMode for definition
1427 \param eBand - specify the operational band (2.4, 5 or both)
1428 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1429 a restart is needed to apply the change
1430 \return eHalStatus
1431 -------------------------------------------------------------------------------*/
1432eHalStatus csrSetPhyMode(tHalHandle hHal, tANI_U32 phyMode, eCsrBand eBand, tANI_BOOLEAN *pfRestartNeeded);
1433
1434void csrDumpInit(tHalHandle hHal);
1435
1436
1437/*---------------------------------------------------------------------------
1438 This is the type for a link quality callback to be registered with SME
1439 for indications
1440 Once the link quality has been indicated, subsequently, link indications are
1441 posted each time there is a CHANGE in link quality.
1442 *** If there is no change in link, there will be no indication ***
1443
1444 The indications may be based on one or more criteria internal to SME
1445 such as RSSI and PER.
1446
1447 \param ind - Indication being posted
1448 \param pContext - any user data given at callback registration.
1449 \return None
1450
1451---------------------------------------------------------------------------*/
1452typedef void (* csrRoamLinkQualityIndCallback)
1453 (eCsrRoamLinkQualityInd ind, void *pContext);
1454
1455
1456/*---------------------------------------------------------------------------
1457 This is the type for a statistics callback to be registered with SME
1458 for stats reporting
1459
1460 Since the client requesting for the stats already know which class/type of
1461 stats it asked for, the callback will carry them in the rsp buffer
1462 (void * stats) whose size will be same as the size of requested stats &
1463 will be exactly in the same order requested in the stats mask from LSB to MSB
1464
1465 \param stats - stats rsp buffer sent back with the report
1466 \param pContext - any user data given at callback registration.
1467 \return None
1468
1469---------------------------------------------------------------------------*/
1470typedef void ( *tCsrStatsCallback) (void * stats, void *pContext);
1471
1472/*---------------------------------------------------------------------------
1473 This is the type for a rssi callback to be registered with SME
1474 for getting rssi
1475
1476 \param rssi - rssi
1477 \param pContext - any user data given at callback registration.
1478 \return None
1479
1480---------------------------------------------------------------------------*/
1481
1482typedef void ( *tCsrRssiCallback) (v_S7_t rssi, tANI_U32 staId, void *pContext);
1483
1484#ifdef WLAN_FEATURE_VOWIFI_11R
1485eHalStatus csrRoamIssueFTPreauthReq(tHalHandle hHal, tANI_U32 sessionId, tpSirBssDescription pBssDescription);
1486#endif
1487
1488/*---------------------------------------------------------------------------
1489 This is the function to change the Band configuraiton (ALL/2.4 GHZ/5 GHZ)
1490
1491 \param hHal - handle to Hal context
1492 \param eBand - band value
1493 \return eHalStatus
1494
1495---------------------------------------------------------------------------*/
1496eHalStatus csrSetBand(tHalHandle hHal, eCsrBand eBand);
1497
1498/*---------------------------------------------------------------------------
1499 This is the function to get the current operating band value
1500 \param hHal - handl to Hal context
1501 \return eCsrband - band value
1502
1503---------------------------------------------------------------------------*/
1504eCsrBand csrGetCurrentBand (tHalHandle hHal);
1505
1506#endif
1507