blob: 117240d9a75adcb4d070aa9911974361c837f341 [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
2 * Copyright (c) 2011-2015 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
22/*
23 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
26 */
27
28/**
29 * \file csr_api.h
30 *
31 * Exports and types for the Common Scan and Roaming Module interfaces.
32 */
33
34#ifndef CSRAPI_H__
35#define CSRAPI_H__
36
37#include "sir_api.h"
38#include "sir_mac_prot_def.h"
39#include "csr_link_list.h"
40
41#define CSR_INVALID_SCANRESULT_HANDLE (NULL)
42
43typedef enum {
44 CH_WIDTH_20MHZ = 0,
45 CH_WIDTH_40MHZ = 1,
46 CH_WIDTH_80MHZ = 2,
47 CH_WIDTH_160MHZ = 3,
48 CH_WIDTH_80P80MHZ = 4
49} phy_ch_width;
50
51typedef struct ch_params_s {
52 phy_ch_width ch_width;
53 uint8_t sec_ch_offset;
54 uint8_t center_freq_seg0;
55 uint8_t center_freq_seg1;
56} chan_params_t;
57
58typedef enum {
59 /* never used */
60 eCSR_AUTH_TYPE_NONE,
61 /* MAC layer authentication types */
62 eCSR_AUTH_TYPE_OPEN_SYSTEM,
63 eCSR_AUTH_TYPE_SHARED_KEY,
64 eCSR_AUTH_TYPE_AUTOSWITCH,
65
66 /* Upper layer authentication types */
67 eCSR_AUTH_TYPE_WPA,
68 eCSR_AUTH_TYPE_WPA_PSK,
69 eCSR_AUTH_TYPE_WPA_NONE,
70
71 eCSR_AUTH_TYPE_RSN,
72 eCSR_AUTH_TYPE_RSN_PSK,
73#if defined WLAN_FEATURE_VOWIFI_11R
74 eCSR_AUTH_TYPE_FT_RSN,
75 eCSR_AUTH_TYPE_FT_RSN_PSK,
76#endif
77#ifdef FEATURE_WLAN_WAPI
78 eCSR_AUTH_TYPE_WAPI_WAI_CERTIFICATE,
79 eCSR_AUTH_TYPE_WAPI_WAI_PSK,
80#endif /* FEATURE_WLAN_WAPI */
81#ifdef FEATURE_WLAN_ESE
82 eCSR_AUTH_TYPE_CCKM_WPA,
83 eCSR_AUTH_TYPE_CCKM_RSN,
84#endif /* FEATURE_WLAN_ESE */
85#ifdef WLAN_FEATURE_11W
86 eCSR_AUTH_TYPE_RSN_PSK_SHA256,
87 eCSR_AUTH_TYPE_RSN_8021X_SHA256,
88#endif
89 eCSR_NUM_OF_SUPPORT_AUTH_TYPE,
90 eCSR_AUTH_TYPE_FAILED = 0xff,
91 eCSR_AUTH_TYPE_UNKNOWN = eCSR_AUTH_TYPE_FAILED,
92
93} eCsrAuthType;
94
95typedef enum {
96 eCSR_ENCRYPT_TYPE_NONE,
97 eCSR_ENCRYPT_TYPE_WEP40_STATICKEY,
98 eCSR_ENCRYPT_TYPE_WEP104_STATICKEY,
99 eCSR_ENCRYPT_TYPE_WEP40,
100 eCSR_ENCRYPT_TYPE_WEP104,
101 eCSR_ENCRYPT_TYPE_TKIP,
102 eCSR_ENCRYPT_TYPE_AES,
103#ifdef FEATURE_WLAN_WAPI
104 /* WAPI */
105 eCSR_ENCRYPT_TYPE_WPI,
106#endif /* FEATURE_WLAN_WAPI */
107#ifdef FEATURE_WLAN_ESE
108 eCSR_ENCRYPT_TYPE_KRK,
109#ifdef WLAN_FEATURE_ROAM_OFFLOAD
110 eCSR_ENCRYPT_TYPE_BTK,
111#endif
112#endif /* FEATURE_WLAN_ESE */
113#ifdef WLAN_FEATURE_11W
114 /* 11w BIP */
115 eCSR_ENCRYPT_TYPE_AES_CMAC,
116#endif
117 eCSR_ENCRYPT_TYPE_ANY,
118 eCSR_NUM_OF_ENCRYPT_TYPE = eCSR_ENCRYPT_TYPE_ANY,
119
120 eCSR_ENCRYPT_TYPE_FAILED = 0xff,
121 eCSR_ENCRYPT_TYPE_UNKNOWN = eCSR_ENCRYPT_TYPE_FAILED,
122
123} eCsrEncryptionType;
124
125/*---------------------------------------------------------------------------
126 Enumeration of the various Security types
127 ---------------------------------------------------------------------------*/
128typedef enum {
129 eCSR_SECURITY_TYPE_WPA,
130 eCSR_SECURITY_TYPE_RSN,
131#ifdef FEATURE_WLAN_WAPI
132 eCSR_SECURITY_TYPE_WAPI,
133#endif /* FEATURE_WLAN_WAPI */
134 eCSR_SECURITY_TYPE_UNKNOWN,
135
136} eCsrSecurityType;
137
138typedef enum {
139 /* 11a/b/g only, no HT, no proprietary */
140 eCSR_DOT11_MODE_abg = 0x0001,
141 eCSR_DOT11_MODE_11a = 0x0002,
142 eCSR_DOT11_MODE_11b = 0x0004,
143 eCSR_DOT11_MODE_11g = 0x0008,
144 eCSR_DOT11_MODE_11n = 0x0010,
145 eCSR_DOT11_MODE_11g_ONLY = 0x0020,
146 eCSR_DOT11_MODE_11n_ONLY = 0x0040,
147 eCSR_DOT11_MODE_11b_ONLY = 0x0080,
148#ifdef WLAN_FEATURE_11AC
149 eCSR_DOT11_MODE_11ac = 0x0100,
150 eCSR_DOT11_MODE_11ac_ONLY = 0x0200,
151#endif
152 /*
153 * This is for WIFI test. It is same as eWNIAPI_MAC_PROTOCOL_ALL
154 * except when it starts IBSS in 11B of 2.4GHz
155 * It is for CSR internal use
156 */
157 eCSR_DOT11_MODE_AUTO = 0x0400,
158
159 /* specify the number of maximum bits for phyMode */
160 eCSR_NUM_PHY_MODE = 16,
161} eCsrPhyMode;
162
163typedef enum {
164 eCSR_BSS_TYPE_NONE,
165 eCSR_BSS_TYPE_INFRASTRUCTURE,
166 eCSR_BSS_TYPE_INFRA_AP, /* SoftAP AP */
167 eCSR_BSS_TYPE_IBSS, /* IBSS network we'll NOT start */
168 eCSR_BSS_TYPE_START_IBSS, /* IBSS network we'll start if no partners */
169 eCSR_BSS_TYPE_WDS_AP, /* BT-AMP AP */
170 eCSR_BSS_TYPE_WDS_STA, /* BT-AMP station */
171 eCSR_BSS_TYPE_ANY, /* any BSS type (IBSS or Infrastructure).*/
172} eCsrRoamBssType;
173
174typedef enum {
175 eCSR_SCAN_REQUEST_11D_SCAN = 1,
176 eCSR_SCAN_REQUEST_FULL_SCAN,
177 eCSR_SCAN_IDLE_MODE_SCAN,
178 eCSR_SCAN_HO_PROBE_SCAN, /* direct probe on entry from candidate list */
179 eCSR_SCAN_P2P_DISCOVERY,
180
181 eCSR_SCAN_SOFTAP_CHANNEL_RANGE,
182 eCSR_SCAN_P2P_FIND_PEER,
183} eCsrRequestType;
184
185typedef enum {
186 eCSR_SCAN_RESULT_GET = 0,
187 eCSR_SCAN_RESULT_FLUSH = 1, /* to delete all cached scan results */
188} eCsrScanResultCmd;
189
190typedef enum {
191 eCSR_SCAN_SUCCESS,
192 eCSR_SCAN_FAILURE,
193 eCSR_SCAN_ABORT,
194 eCSR_SCAN_FOUND_PEER,
195} eCsrScanStatus;
196
197/*
198 * Reason to abort the scan
199 * The reason can used later to decide whether to update the scan results
200 * to upper layer or not
201 */
202typedef enum {
203 eCSR_SCAN_ABORT_DEFAULT,
204 eCSR_SCAN_ABORT_DUE_TO_BAND_CHANGE, /* Scan abort due to band change */
205 eCSR_SCAN_ABORT_SSID_ONLY
206} eCsrAbortReason;
207
208typedef enum {
209 eCSR_BW_20MHz_VAL = 20,
210 eCSR_BW_40MHz_VAL = 40,
211 eCSR_BW_80MHz_VAL = 80,
212 eCSR_BW_160MHz_VAL = 160
213} eCSR_BW_Val;
214
215typedef enum {
216 eCSR_INI_SINGLE_CHANNEL_CENTERED = 0,
217 eCSR_INI_DOUBLE_CHANNEL_HIGH_PRIMARY,
218 eCSR_INI_DOUBLE_CHANNEL_LOW_PRIMARY,
219#ifdef WLAN_FEATURE_11AC
220 eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_CENTERED,
221 eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_CENTERED_40MHZ_CENTERED,
222 eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_CENTERED,
223 eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW,
224 eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW,
225 eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH,
226 eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH,
227#endif
228 eCSR_INI_CHANNEL_BONDING_STATE_MAX
229} eIniChanBondState;
230
231#define CSR_RSN_PMKID_SIZE 16
232#define CSR_MAX_PMKID_ALLOWED 32
233#define CSR_WEP40_KEY_LEN 5
234#define CSR_WEP104_KEY_LEN 13
235#define CSR_TKIP_KEY_LEN 32
236#define CSR_AES_KEY_LEN 16
237#define CSR_MAX_TX_POWER (WNI_CFG_CURRENT_TX_POWER_LEVEL_STAMAX)
238#define CSR_MAX_RSC_LEN 16
239#ifdef FEATURE_WLAN_WAPI
240#define CSR_WAPI_BKID_SIZE 16
241#define CSR_MAX_BKID_ALLOWED 16
242#define CSR_WAPI_KEY_LEN 32
243#define CSR_MAX_KEY_LEN (CSR_WAPI_KEY_LEN) /* longest one is for WAPI */
244#else
245#define CSR_MAX_KEY_LEN (CSR_TKIP_KEY_LEN) /* longest one is for TKIP */
246#endif /* FEATURE_WLAN_WAPI */
247#ifdef FEATURE_WLAN_ESE
248#define CSR_KRK_KEY_LEN 16
249#endif
250
251typedef struct tagCsrChannelInfo {
252 uint8_t numOfChannels;
253 uint8_t *ChannelList; /* it will be an array of channels */
254} tCsrChannelInfo, *tpCsrChannelInfo;
255
256typedef struct tagCsrSSIDInfo {
257 tSirMacSSid SSID;
258 bool handoffPermitted;
259 bool ssidHidden;
260} tCsrSSIDInfo;
261
262typedef struct tagCsrSSIDs {
263 uint32_t numOfSSIDs;
264 tCsrSSIDInfo *SSIDList; /* To be allocated for array of SSIDs */
265} tCsrSSIDs;
266
267typedef struct tagCsrBSSIDs {
268 uint32_t numOfBSSIDs;
269 struct cdf_mac_addr *bssid;
270} tCsrBSSIDs;
271
272typedef struct tagCsrStaParams {
273 uint16_t capability;
274 uint8_t extn_capability[SIR_MAC_MAX_EXTN_CAP];
275 uint8_t supported_rates_len;
276 uint8_t supported_rates[SIR_MAC_MAX_SUPP_RATES];
277 uint8_t htcap_present;
278 tSirHTCap HTCap;
279 uint8_t vhtcap_present;
280 tSirVHTCap VHTCap;
281 uint8_t uapsd_queues;
282 uint8_t max_sp;
283 uint8_t supported_channels_len;
284 uint8_t supported_channels[SIR_MAC_MAX_SUPP_CHANNELS];
285 uint8_t supported_oper_classes_len;
286 uint8_t supported_oper_classes[SIR_MAC_MAX_SUPP_OPER_CLASSES];
287} tCsrStaParams;
288
289typedef struct tagCsrScanRequest {
290 tSirScanType scanType;
291 struct cdf_mac_addr bssid;
292 eCsrRoamBssType BSSType;
293 tCsrSSIDs SSIDs;
294 tCsrChannelInfo ChannelInfo;
295 uint32_t minChnTime; /* in units of milliseconds */
296 uint32_t maxChnTime; /* in units of milliseconds */
297 uint32_t restTime; /* in units of milliseconds */
298 uint32_t uIEFieldLen;
299 uint8_t *pIEField;
300 eCsrRequestType requestType; /* 11d scan or full scan */
301 bool p2pSearch;
302 bool skipDfsChnlInP2pSearch;
303 bool bcnRptReqScan; /* is Scan issued by Beacon Report Request */
304 uint32_t scan_id;
305 uint32_t timestamp;
306} tCsrScanRequest;
307
308typedef struct tagCsrScanResultInfo {
309 /*
310 * Carry the IEs for the current BSSDescription.
311 * A pointer to tDot11fBeaconIEs. Maybe NULL for start BSS.
312 */
313 void *pvIes;
314 tAniSSID ssId;
315 v_TIME_t timer; /* timer is variable for hidden SSID timer */
316 /*
317 * This member must be the last in the structure because the
318 * end of tSirBssDescription is an
319 * array with nonknown size at this time */
320 tSirBssDescription BssDescriptor;
321} tCsrScanResultInfo;
322
323typedef struct tagCsrEncryptionList {
324
325 uint32_t numEntries;
326 eCsrEncryptionType encryptionType[eCSR_NUM_OF_ENCRYPT_TYPE];
327
328} tCsrEncryptionList, *tpCsrEncryptionList;
329
330typedef struct tagCsrAuthList {
331 uint32_t numEntries;
332 eCsrAuthType authType[eCSR_NUM_OF_SUPPORT_AUTH_TYPE];
333} tCsrAuthList, *tpCsrAuthList;
334
335#ifdef WLAN_FEATURE_VOWIFI_11R
336typedef struct tagCsrMobilityDomainInfo {
337 uint8_t mdiePresent;
338 uint16_t mobilityDomain;
339} tCsrMobilityDomainInfo;
340#endif
341
342#ifdef FEATURE_WLAN_ESE
343typedef struct tagCsrEseCckmInfo {
344 uint32_t reassoc_req_num;
345 bool krk_plumbed;
346 uint8_t krk[SIR_KRK_KEY_LEN];
347#ifdef WLAN_FEATURE_ROAM_OFFLOAD
348 uint8_t btk[SIR_BTK_KEY_LEN];
349#endif
350} tCsrEseCckmInfo;
351#endif
352
353#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
354#define CSR_DOT11F_IE_RSN_MAX_LEN (114)
355typedef struct tagCsrEseCckmIe {
356 uint8_t cckmIe[CSR_DOT11F_IE_RSN_MAX_LEN];
357 uint8_t cckmIeLen;
358} tCsrEseCckmIe;
359#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
360
361typedef struct sCsrChannel_ {
362 uint8_t numChannels;
363 uint8_t channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
364} sCsrChannel;
365
366typedef struct tagCsrScanResultFilter {
367 tCsrBSSIDs BSSIDs;
368 tCsrSSIDs SSIDs;
369 tCsrChannelInfo ChannelInfo;
370 tCsrAuthList authType;
371 tCsrEncryptionList EncryptionType;
372 /*
373 * eCSR_ENCRYPT_TYPE_ANY cannot be set in multicast encryption type.
374 * If caller doesn't case, put all supported encryption types in here
375 */
376 tCsrEncryptionList mcEncryptionType;
377 eCsrRoamBssType BSSType;
378 /* its a bit mask of all the needed phy mode defined in eCsrPhyMode */
379 eCsrPhyMode phyMode;
380 /*
381 * If countryCode[0] is not 0, countryCode is checked
382 * independent of fCheckUnknownCountryCode
383 */
384 uint8_t countryCode[WNI_CFG_COUNTRY_CODE_LEN];
385 uint8_t uapsd_mask;
386 /* For WPS filtering if true => auth and ecryption should be ignored */
387 bool bWPSAssociation;
388 bool bOSENAssociation;
389#if defined WLAN_FEATURE_VOWIFI
390 /*
391 * For measurement reports --> if set, only SSID,
392 * BSSID and channel is considered for filtering.
393 */
394 bool fMeasurement;
395#endif
396#ifdef WLAN_FEATURE_VOWIFI_11R
397 tCsrMobilityDomainInfo MDID;
398#endif
399 bool p2pResult;
400#ifdef WLAN_FEATURE_11W
401 /* Management Frame Protection */
402 bool MFPEnabled;
403 uint8_t MFPRequired;
404 uint8_t MFPCapable;
405#endif
406 /* The following flag is used to distinguish the
407 * roaming case while building the scan filter and
408 * applying it on to the scan results. This is mainly
409 * used to support whitelist ssid feature.
410 */
411 uint8_t scan_filter_for_roam;
412 struct sCsrChannel_ pcl_channels;
413 tCDF_CON_MODE csrPersona;
414} tCsrScanResultFilter;
415
416typedef struct sCsrChnPower_ {
417 uint8_t firstChannel;
418 uint8_t numChannels;
419 uint8_t maxtxPower;
420} sCsrChnPower;
421
422typedef struct tagCsr11dinfo {
423 sCsrChannel Channels;
424 uint8_t countryCode[WNI_CFG_COUNTRY_CODE_LEN + 1];
425 /* max power channel list */
426 sCsrChnPower ChnPower[WNI_CFG_VALID_CHANNEL_LIST_LEN];
427} tCsr11dinfo;
428
429typedef enum {
430 eCSR_ROAM_CANCELLED = 1,
431 /* it means error happens before assoc_start/roaming_start is called. */
432 eCSR_ROAM_FAILED,
433 /*
434 * a CSR trigger roaming operation starts,
435 * callback may get a pointer to tCsrConnectedProfile
436 */
437 eCSR_ROAM_ROAMING_START,
438 /* a CSR trigger roaming operation is completed */
439 eCSR_ROAM_ROAMING_COMPLETION,
440 /* Connection completed status. */
441 eCSR_ROAM_CONNECT_COMPLETION,
442 /*
443 * an association or start_IBSS operation starts,
444 * callback may get a pointer to tCsrRoamProfile and
445 * a pointer to tSirBssDescription
446 */
447 eCSR_ROAM_ASSOCIATION_START,
448 /*
449 * a roaming operation is finish, see eCsrRoamResult for
450 * possible data passed back
451 */
452 eCSR_ROAM_ASSOCIATION_COMPLETION,
453 eCSR_ROAM_DISASSOCIATED,
454 eCSR_ROAM_ASSOCIATION_FAILURE,
455 /* when callback with this flag. it gets a pointer to the BSS desc. */
456 eCSR_ROAM_SHOULD_ROAM,
457 /* A new candidate for PMKID is found */
458 eCSR_ROAM_SCAN_FOUND_NEW_BSS,
459 /* CSR is done lostlink roaming and still cannot reconnect */
460 eCSR_ROAM_LOSTLINK,
461 /* a link lost is detected. CSR starts roaming. */
462 eCSR_ROAM_LOSTLINK_DETECTED,
463 /*
464 * TKIP MIC error detected, callback gets a pointer
465 * to tpSirSmeMicFailureInd
466 */
467 eCSR_ROAM_MIC_ERROR_IND,
468 /* IBSS indications. */
469 eCSR_ROAM_IBSS_IND,
470 /*
471 * Update the connection status, useful for IBSS: new peer added,
472 * network is active etc.
473 */
474 eCSR_ROAM_CONNECT_STATUS_UPDATE,
475 eCSR_ROAM_GEN_INFO,
476 eCSR_ROAM_SET_KEY_COMPLETE,
477 eCSR_ROAM_IBSS_LEAVE, /* IBSS indications. */
478 /* BSS in WDS mode status indication */
479 eCSR_ROAM_WDS_IND,
480 /* BSS in SoftAP mode status indication */
481 eCSR_ROAM_INFRA_IND,
482 eCSR_ROAM_WPS_PBC_PROBE_REQ_IND,
483#ifdef WLAN_FEATURE_VOWIFI_11R
484 eCSR_ROAM_FT_RESPONSE,
485#endif
486 eCSR_ROAM_FT_START,
487 eCSR_ROAM_INDICATE_MGMT_FRAME,
488 eCSR_ROAM_REMAIN_CHAN_READY,
489 eCSR_ROAM_SEND_ACTION_CNF,
490 /* this mean error happens before assoc_start/roam_start is called. */
491 eCSR_ROAM_SESSION_OPENED,
492 eCSR_ROAM_FT_REASSOC_FAILED,
493#ifdef FEATURE_WLAN_LFR
494 eCSR_ROAM_PMK_NOTIFY,
495#endif
496 /*
497 * Following 4 enums are used by FEATURE_WLAN_LFR_METRICS
498 * but they are needed for compilation even when
499 * FEATURE_WLAN_LFR_METRICS is not defined.
500 */
501 eCSR_ROAM_PREAUTH_INIT_NOTIFY,
502 eCSR_ROAM_PREAUTH_STATUS_SUCCESS,
503 eCSR_ROAM_PREAUTH_STATUS_FAILURE,
504 eCSR_ROAM_HANDOVER_SUCCESS,
505#ifdef FEATURE_WLAN_TDLS
506 eCSR_ROAM_TDLS_STATUS_UPDATE,
507 eCSR_ROAM_RESULT_MGMT_TX_COMPLETE_IND,
508#endif
509 /* Disaconnect all the clients */
510 eCSR_ROAM_DISCONNECT_ALL_P2P_CLIENTS,
511 /* Stopbss triggered from SME due to different */
512 eCSR_ROAM_SEND_P2P_STOP_BSS,
513 /* beacon interval */
514#ifdef WLAN_FEATURE_11W
515 eCSR_ROAM_UNPROT_MGMT_FRAME_IND,
516#endif
517
518#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
519 eCSR_ROAM_TSM_IE_IND,
520 eCSR_ROAM_CCKM_PREAUTH_NOTIFY,
521 eCSR_ROAM_ESE_ADJ_AP_REPORT_IND,
522 eCSR_ROAM_ESE_BCN_REPORT_IND,
523#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
524
525 /* Radar indication from lower layers */
526 eCSR_ROAM_DFS_RADAR_IND,
527 eCSR_ROAM_SET_CHANNEL_RSP,
528
529 /* Channel sw update notification */
530 eCSR_ROAM_DFS_CHAN_SW_NOTIFY,
531} eRoamCmdStatus;
532
533/* comment inside indicates what roaming callback gets */
534typedef enum {
535 eCSR_ROAM_RESULT_NONE,
536 /*
537 * If roamStatus is eCSR_ROAM_ASSOCIATION_COMPLETION,
538 * tCsrRoamInfo's pBssDesc may pass back
539 */
540 eCSR_ROAM_RESULT_FAILURE,
541 /* Pass back pointer to tCsrRoamInfo */
542 eCSR_ROAM_RESULT_ASSOCIATED,
543 eCSR_ROAM_RESULT_NOT_ASSOCIATED,
544 eCSR_ROAM_RESULT_MIC_FAILURE,
545 eCSR_ROAM_RESULT_FORCED,
546 eCSR_ROAM_RESULT_DISASSOC_IND,
547 eCSR_ROAM_RESULT_DEAUTH_IND,
548 eCSR_ROAM_RESULT_CAP_CHANGED,
549 /*
550 * This means we starts an IBSS tCsrRoamInfo's
551 * pBssDesc may pass back
552 */
553 eCSR_ROAM_RESULT_IBSS_STARTED,
554 eCSR_ROAM_RESULT_IBSS_START_FAILED,
555 eCSR_ROAM_RESULT_IBSS_JOIN_SUCCESS,
556 eCSR_ROAM_RESULT_IBSS_JOIN_FAILED,
557 eCSR_ROAM_RESULT_IBSS_CONNECT,
558 eCSR_ROAM_RESULT_IBSS_INACTIVE,
559 /*
560 * If roamStatus is eCSR_ROAM_ASSOCIATION_COMPLETION
561 * tCsrRoamInfo's pBssDesc may pass back and the peer's MAC address
562 * in peerMacOrBssid. If roamStatus is eCSR_ROAM_IBSS_IND,
563 * the peer's MAC address in peerMacOrBssid and a beacon frame
564 * of the IBSS in pbFrames
565 */
566 eCSR_ROAM_RESULT_IBSS_NEW_PEER,
567 /*
568 * Peer departed from IBSS, Callback may get a pointer tSmeIbssPeerInd
569 * in pIbssPeerInd
570 */
571 eCSR_ROAM_RESULT_IBSS_PEER_DEPARTED,
572 /*
573 * Coalescing in the IBSS network (joined an IBSS network)
574 * Callback pass a BSSID in peerMacOrBssid
575 */
576 eCSR_ROAM_RESULT_IBSS_COALESCED,
577 /*
578 * If roamStatus is eCSR_ROAM_ROAMING_START, callback may get a pointer
579 * to tCsrConnectedProfile used to connect.
580 */
581 eCSR_ROAM_RESULT_IBSS_STOP,
582 eCSR_ROAM_RESULT_LOSTLINK,
583 eCSR_ROAM_RESULT_MIC_ERROR_UNICAST,
584 eCSR_ROAM_RESULT_MIC_ERROR_GROUP,
585 eCSR_ROAM_RESULT_AUTHENTICATED,
586 eCSR_ROAM_RESULT_NEW_RSN_BSS,
587#ifdef FEATURE_WLAN_WAPI
588 eCSR_ROAM_RESULT_NEW_WAPI_BSS,
589#endif /* FEATURE_WLAN_WAPI */
590 /* WDS started successfully */
591 eCSR_ROAM_RESULT_WDS_STARTED,
592 /* WDS start failed */
593 eCSR_ROAM_RESULT_WDS_START_FAILED,
594 /* WDS stopped */
595 eCSR_ROAM_RESULT_WDS_STOPPED,
596 /* WDS joined successfully in STA mode */
597 eCSR_ROAM_RESULT_WDS_ASSOCIATED,
598 /* A station joined WDS AP */
599 eCSR_ROAM_RESULT_WDS_ASSOCIATION_IND,
600 /* WDS join failed in STA mode */
601 eCSR_ROAM_RESULT_WDS_NOT_ASSOCIATED,
602 /* WDS disassociated */
603 eCSR_ROAM_RESULT_WDS_DISASSOCIATED,
604 /* INFRA started successfully */
605 eCSR_ROAM_RESULT_INFRA_STARTED,
606 /* INFRA start failed */
607 eCSR_ROAM_RESULT_INFRA_START_FAILED,
608 /* INFRA stopped */
609 eCSR_ROAM_RESULT_INFRA_STOPPED,
610 /* A station joining INFRA AP */
611 eCSR_ROAM_RESULT_INFRA_ASSOCIATION_IND,
612 /* A station joined INFRA AP */
613 eCSR_ROAM_RESULT_INFRA_ASSOCIATION_CNF,
614 /* INFRA disassociated */
615 eCSR_ROAM_RESULT_INFRA_DISASSOCIATED,
616 eCSR_ROAM_RESULT_WPS_PBC_PROBE_REQ_IND,
617 eCSR_ROAM_RESULT_SEND_ACTION_FAIL,
618 /* peer rejected assoc because max assoc limit reached */
619 eCSR_ROAM_RESULT_MAX_ASSOC_EXCEEDED,
620 /* Assoc rejected due to concurrent session running on a diff channel */
621 eCSR_ROAM_RESULT_ASSOC_FAIL_CON_CHANNEL,
622#ifdef FEATURE_WLAN_TDLS
623 eCSR_ROAM_RESULT_ADD_TDLS_PEER,
624 eCSR_ROAM_RESULT_UPDATE_TDLS_PEER,
625 eCSR_ROAM_RESULT_DELETE_TDLS_PEER,
626 eCSR_ROAM_RESULT_TEARDOWN_TDLS_PEER_IND,
627 eCSR_ROAM_RESULT_DELETE_ALL_TDLS_PEER_IND,
628 eCSR_ROAM_RESULT_LINK_ESTABLISH_REQ_RSP,
629 eCSR_ROAM_RESULT_TDLS_SHOULD_DISCOVER,
630 eCSR_ROAM_RESULT_TDLS_SHOULD_TEARDOWN,
631 eCSR_ROAM_RESULT_TDLS_SHOULD_PEER_DISCONNECTED,
632#endif
633
634 eCSR_ROAM_RESULT_DFS_RADAR_FOUND_IND,
635 eCSR_ROAM_RESULT_CHANNEL_CHANGE_SUCCESS,
636 eCSR_ROAM_RESULT_CHANNEL_CHANGE_FAILURE,
637 eCSR_ROAM_RESULT_DFS_CHANSW_UPDATE_SUCCESS,
638 eCSR_ROAM_RESULT_DFS_CHANSW_UPDATE_FAILURE,
639} eCsrRoamResult;
640
641/*----------------------------------------------------------------------------
642 List of link quality indications HDD can receive from SME
643 --------------------------------------------------------------------------*/
644typedef enum {
645 eCSR_ROAM_LINK_QUAL_MIN_IND = -1,
646
647 eCSR_ROAM_LINK_QUAL_POOR_IND = 0, /* bad link */
648 eCSR_ROAM_LINK_QUAL_GOOD_IND = 1, /* acceptable for voice */
649 eCSR_ROAM_LINK_QUAL_VERY_GOOD_IND = 2, /* suitable for voice */
650 eCSR_ROAM_LINK_QUAL_EXCELLENT_IND = 3, /* suitable for voice */
651
652 eCSR_ROAM_LINK_QUAL_MAX_IND /* invalid value */
653} eCsrRoamLinkQualityInd;
654
655typedef enum {
656 eCSR_DISCONNECT_REASON_UNSPECIFIED = 0,
657 eCSR_DISCONNECT_REASON_MIC_ERROR,
658 eCSR_DISCONNECT_REASON_DISASSOC,
659 eCSR_DISCONNECT_REASON_DEAUTH,
660 eCSR_DISCONNECT_REASON_HANDOFF,
661 eCSR_DISCONNECT_REASON_IBSS_JOIN_FAILURE,
662 eCSR_DISCONNECT_REASON_IBSS_LEAVE,
663 eCSR_DISCONNECT_REASON_STA_HAS_LEFT,
664} eCsrRoamDisconnectReason;
665
666typedef enum {
667 /* Not associated in Infra or participating in an IBSS/Ad-hoc */
668 eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED,
669 /* Associated in an Infrastructure network. */
670 eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED,
671 /* Participating in IBSS network though disconnection */
672 eCSR_ASSOC_STATE_TYPE_IBSS_DISCONNECTED,
673 /* Participating in IBSS network with partner stations also present */
674 eCSR_ASSOC_STATE_TYPE_IBSS_CONNECTED,
675 /* Participating in WDS network in AP/STA mode but not connected yet */
676 eCSR_ASSOC_STATE_TYPE_WDS_DISCONNECTED,
677 /* Participating in a WDS network and connected peer to peer */
678 eCSR_ASSOC_STATE_TYPE_WDS_CONNECTED,
679 /* Participating in a Infra network in AP not yet in connected state */
680 eCSR_ASSOC_STATE_TYPE_INFRA_DISCONNECTED,
681 /* Participating in a Infra network and connected to a peer */
682 eCSR_ASSOC_STATE_TYPE_INFRA_CONNECTED,
683
684} eCsrConnectState;
685
686/*
687 * This parameter is no longer supported in the Profile.
688 * Need to set this in the global properties for the adapter.
689 */
690typedef enum eCSR_MEDIUM_ACCESS {
691 eCSR_MEDIUM_ACCESS_AUTO = 0,
692 eCSR_MEDIUM_ACCESS_DCF,
693 eCSR_MEDIUM_ACCESS_eDCF,
694 eCSR_MEDIUM_ACCESS_HCF,
695
696 eCSR_MEDIUM_ACCESS_WMM_eDCF_802dot1p,
697 eCSR_MEDIUM_ACCESS_WMM_eDCF_DSCP,
698 eCSR_MEDIUM_ACCESS_WMM_eDCF_NoClassify,
699 eCSR_MEDIUM_ACCESS_11e_eDCF = eCSR_MEDIUM_ACCESS_eDCF,
700 eCSR_MEDIUM_ACCESS_11e_HCF = eCSR_MEDIUM_ACCESS_HCF,
701} eCsrMediaAccessType;
702
703typedef enum {
704 eCSR_TX_RATE_AUTO = 0, /* use rate adaption to determine Tx rate. */
705 eCSR_TX_RATE_1Mbps = 0x00000001,
706 eCSR_TX_RATE_2Mbps = 0x00000002,
707 eCSR_TX_RATE_5_5Mbps = 0x00000004,
708 eCSR_TX_RATE_6Mbps = 0x00000008,
709 eCSR_TX_RATE_9Mbps = 0x00000010,
710 eCSR_TX_RATE_11Mbps = 0x00000020,
711 eCSR_TX_RATE_12Mbps = 0x00000040,
712 eCSR_TX_RATE_18Mbps = 0x00000080,
713 eCSR_TX_RATE_24Mbps = 0x00000100,
714 eCSR_TX_RATE_36Mbps = 0x00000200,
715 eCSR_TX_RATE_42Mbps = 0x00000400,
716 eCSR_TX_RATE_48Mbps = 0x00000800,
717 eCSR_TX_RATE_54Mbps = 0x00001000,
718 eCSR_TX_RATE_72Mbps = 0x00002000,
719 eCSR_TX_RATE_84Mbps = 0x00004000,
720 eCSR_TX_RATE_96Mbps = 0x00008000,
721 eCSR_TX_RATE_108Mbps = 0x00010000,
722 eCSR_TX_RATE_126Mbps = 0x00020000,
723 eCSR_TX_RATE_144Mbps = 0x00040000,
724 eCSR_TX_RATE_168Mbps = 0x00080000,
725 eCSR_TX_RATE_192Mbps = 0x00100000,
726 eCSR_TX_RATE_216Mbps = 0x00200000,
727 eCSR_TX_RATE_240Mbps = 0x00400000,
728
729} eCsrExposedTxRate;
730
731typedef enum {
732 eCSR_OPERATING_CHANNEL_ALL = 0,
733 eCSR_OPERATING_CHANNEL_AUTO = eCSR_OPERATING_CHANNEL_ALL,
734 eCSR_OPERATING_CHANNEL_ANY = eCSR_OPERATING_CHANNEL_ALL,
735} eOperationChannel;
736
737typedef enum {
738 eCSR_DOT11_FRAG_THRESH_AUTO = -1,
739 eCSR_DOT11_FRAG_THRESH_MIN = 256,
740 eCSR_DOT11_FRAG_THRESH_MAX = 2346,
741 eCSR_DOT11_FRAG_THRESH_DEFAULT = 2000
742} eCsrDot11FragThresh;
743
744/* for channel bonding for ibss */
745typedef enum {
746 eCSR_CB_OFF = 0,
747 eCSR_CB_AUTO = 1,
748 eCSR_CB_DOWN = 2,
749 eCSR_CB_UP = 3,
750} eCsrCBChoice;
751
752/*
753 * For channel bonding, the channel number gap is 4, either up or down.
754 * For both 11a and 11g mode.
755 */
756#define CSR_CB_CHANNEL_GAP 4
757#define CSR_CB_CENTER_CHANNEL_OFFSET 2
758
759/* WEP keysize (in bits) */
760typedef enum {
761 /* 40 bit key + 24bit IV = 64bit WEP */
762 eCSR_SECURITY_WEP_KEYSIZE_40 = 40,
763 /* 104bit key + 24bit IV = 128bit WEP */
764 eCSR_SECURITY_WEP_KEYSIZE_104 = 104,
765 eCSR_SECURITY_WEP_KEYSIZE_MIN = eCSR_SECURITY_WEP_KEYSIZE_40,
766 eCSR_SECURITY_WEP_KEYSIZE_MAX = eCSR_SECURITY_WEP_KEYSIZE_104,
767 eCSR_SECURITY_WEP_KEYSIZE_MAX_BYTES =
768 (eCSR_SECURITY_WEP_KEYSIZE_MAX / 8),
769} eCsrWEPKeySize;
770
771/* Possible values for the WEP static key ID */
772typedef enum {
773
774 eCSR_SECURITY_WEP_STATIC_KEY_ID_MIN = 0,
775 eCSR_SECURITY_WEP_STATIC_KEY_ID_MAX = 3,
776 eCSR_SECURITY_WEP_STATIC_KEY_ID_DEFAULT = 0,
777
778 eCSR_SECURITY_WEP_STATIC_KEY_ID_INVALID = -1,
779
780} eCsrWEPStaticKeyID;
781
782/* Two extra key indicies are used for the IGTK (which is used by BIP) */
783#define CSR_MAX_NUM_KEY (eCSR_SECURITY_WEP_STATIC_KEY_ID_MAX + 2 + 1)
784
785typedef enum {
786 eCSR_SECURITY_SET_KEY_ACTION_NO_CHANGE,
787 eCSR_SECURITY_SET_KEY_ACTION_SET_KEY,
788 eCSR_SECURITY_SET_KEY_ACTION_DELETE_KEY,
789} eCsrSetKeyAction;
790
791typedef enum {
792 eCSR_BAND_ALL,
793 eCSR_BAND_24,
794 eCSR_BAND_5G,
795 eCSR_BAND_MAX,
796} eCsrBand;
797
798typedef enum {
799 /*
800 * Roaming because HDD requested for reassoc by changing one of the
801 * fields in tCsrRoamModifyProfileFields. OR Roaming because SME
802 * requested for reassoc by changing one of the fields in
803 * tCsrRoamModifyProfileFields.
804 */
805 eCsrRoamReasonStaCapabilityChanged,
806 /*
807 * Roaming because SME requested for reassoc to a different AP,
808 * as part of inter AP handoff.
809 */
810 eCsrRoamReasonBetterAP,
811 /*
812 * Roaming because SME requested it as the link is lost - placeholder,
813 * will clean it up once handoff code gets in
814 */
815 eCsrRoamReasonSmeIssuedForLostLink,
816
817} eCsrRoamReasonCodes;
818
819typedef enum {
820 eCsrRoamWmmAuto = 0,
821 eCsrRoamWmmQbssOnly = 1,
822 eCsrRoamWmmNoQos = 2,
823
824} eCsrRoamWmmUserModeType;
825
826typedef enum {
827 eCSR_REQUESTER_MIN = 0,
828 eCSR_DIAG,
829 eCSR_UMA_GAN,
830 eCSR_HDD
831} eCsrStatsRequesterType;
832
833#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
834/**
835 * enum csr_hi_rssi_scan_id - Parameter ids for hi rssi scan feature
836 *
837 * @eCSR_HI_RSSI_SCAN_MAXCOUNT_ID: how many times scan can be performed
838 * @eCSR_HI_RSSI_SCAN_RSSI_DELTA_ID: rssi difference to trigger scan
839 * @eCSR_HI_RSSI_SCAN_DELAY_ID: delay in millseconds between scans
840 * @eCSR_HI_RSSI_SCAN_RSSI_UB_ID: rssi upper bound for scan trigger
841 */
842enum csr_hi_rssi_scan_id {
843 eCSR_HI_RSSI_SCAN_MAXCOUNT_ID,
844 eCSR_HI_RSSI_SCAN_RSSI_DELTA_ID,
845 eCSR_HI_RSSI_SCAN_DELAY_ID,
846 eCSR_HI_RSSI_SCAN_RSSI_UB_ID
847};
848#endif
849
850typedef struct tagPmkidCandidateInfo {
851 struct cdf_mac_addr BSSID;
852 bool preAuthSupported;
853} tPmkidCandidateInfo;
854
855typedef struct tagPmkidCacheInfo {
856 struct cdf_mac_addr BSSID;
857 uint8_t PMKID[CSR_RSN_PMKID_SIZE];
858} tPmkidCacheInfo;
859
860#ifdef FEATURE_WLAN_WAPI
861typedef struct tagBkidCandidateInfo {
862 struct cdf_mac_addr BSSID;
863 bool preAuthSupported;
864} tBkidCandidateInfo;
865
866typedef struct tagBkidCacheInfo {
867 struct cdf_mac_addr BSSID;
868 uint8_t BKID[CSR_WAPI_BKID_SIZE];
869} tBkidCacheInfo;
870#endif /* FEATURE_WLAN_WAPI */
871
872typedef struct tagCsrKeys {
873 /* Also use to indicate whether the key index is set */
874 uint8_t KeyLength[CSR_MAX_NUM_KEY];
875 uint8_t KeyMaterial[CSR_MAX_NUM_KEY][CSR_MAX_KEY_LEN];
876 uint8_t defaultIndex;
877} tCsrKeys;
878
879/*
880 * Following fields which're part of tCsrRoamConnectedProfile might need
881 * modification dynamically once STA is up & running & this'd trigger reassoc
882 */
883typedef struct tagCsrRoamModifyProfileFields {
884 /*
885 * during connect this specifies ACs U-APSD is to be setup
886 * for (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored).
887 * During assoc response this COULD carry confirmation of what
888 * ACs U-APSD got setup for. Later if an APP looking for APSD,
889 * SME-QoS might need to modify this field
890 */
891 uint8_t uapsd_mask;
892 /* HDD might ask to modify this field */
893 uint16_t listen_interval;
894} tCsrRoamModifyProfileFields;
895
896typedef struct tagCsrRoamProfile {
897 /*
898 * For eCSR_BSS_TYPE_WDS_AP. There must be one SSID in SSIDs.
899 * For eCSR_BSS_TYPE_WDS_STA. There must be two SSIDs.
900 * Index 0 is the SSID of the WDS-AP that we need to join.
901 * Index 1 is the SSID for self BSS.
902 */
903 tCsrSSIDs SSIDs;
904 tCsrBSSIDs BSSIDs;
905 /* this is bit mask of all the needed phy mode defined in eCsrPhyMode */
906 uint32_t phyMode;
907 eCsrRoamBssType BSSType;
908 tCsrAuthList AuthType;
909 eCsrAuthType negotiatedAuthType;
910 tCsrEncryptionList EncryptionType;
911 /* This field is for output only, not for input */
912 eCsrEncryptionType negotiatedUCEncryptionType;
913 /*
914 * eCSR_ENCRYPT_TYPE_ANY cannot be set in multicast encryption type.
915 * If caller doesn't case, put all supported encryption types in here
916 */
917 tCsrEncryptionList mcEncryptionType;
918 /* This field is for output only, not for input */
919 eCsrEncryptionType negotiatedMCEncryptionType;
920#ifdef WLAN_FEATURE_11W
921 /* Management Frame Protection */
922 bool MFPEnabled;
923 uint8_t MFPRequired;
924 uint8_t MFPCapable;
925#endif
926 tCsrKeys Keys;
927 eCsrCBChoice CBMode;
928 tCsrChannelInfo ChannelInfo;
929 uint8_t operationChannel;
930 chan_params_t ch_params;
931 /* If this is 0, SME will fill in for caller. */
932 uint16_t beaconInterval;
933 /*
934 * during connect this specifies ACs U-APSD is to be setup
935 * for (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored).
936 * During assoc resp this'd carry cnf of what ACs U-APSD got setup for
937 */
938 uint8_t uapsd_mask;
939 uint32_t nWPAReqIELength; /* The byte count in the pWPAReqIE */
940 uint8_t *pWPAReqIE; /* If not null,it's IE byte stream for WPA */
941 uint32_t nRSNReqIELength; /* The byte count in the pRSNReqIE */
942 uint8_t *pRSNReqIE; /* If not null,it's IE byte stream for RSN */
943#ifdef FEATURE_WLAN_WAPI
944 uint32_t nWAPIReqIELength;/* The byte count in the pWAPIReqIE */
945 uint8_t *pWAPIReqIE; /* If not null,it's IE byte stream for WAPI */
946#endif /* FEATURE_WLAN_WAPI */
947
948 uint32_t nAddIEScanLength;/* pAddIE for scan (at the time of join) */
949 /*
950 * If not null,it's the IE byte stream for additional IE,
951 * which can be WSC IE and/or P2P IE
952 */
953 uint8_t *pAddIEScan;
954 uint32_t nAddIEAssocLength; /* The byte count in the pAddIE for assoc */
955 /*
956 * If not null, it has the IE byte stream for additional IE,
957 * which can be WSC IE and/or P2P IE
958 */
959 uint8_t *pAddIEAssoc;
960 /* it is ignored if [0] is 0. */
961 uint8_t countryCode[WNI_CFG_COUNTRY_CODE_LEN];
962 /* WPS Association if true => auth and ecryption should be ignored */
963 bool bWPSAssociation;
964 bool bOSENAssociation;
965 uint32_t nWSCReqIELength; /* The byte count in the pWSCReqIE */
966 uint8_t *pWSCReqIE; /* If not null,it's IE byte stream for WSC */
967 uint8_t ieee80211d;
968 uint8_t privacy;
969 bool fwdWPSPBCProbeReq;
970 tAniAuthType csr80211AuthType;
971 uint32_t dtimPeriod;
972 bool ApUapsdEnable;
973 bool protEnabled;
974 bool obssProtEnabled;
975 uint16_t cfg_protection;
976 uint8_t wps_state;
977#ifdef WLAN_FEATURE_VOWIFI_11R
978 tCsrMobilityDomainInfo MDID;
979#endif
980 tCDF_CON_MODE csrPersona;
981 uint8_t disableDFSChSwitch;
982 /* addIe params */
983 tSirAddIeParams addIeParams;
984 uint8_t sap_dot11mc;
985} tCsrRoamProfile;
986
987#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
988typedef struct tagCsrRoamHTProfile {
989 uint8_t phymode;
990 uint8_t htCapability;
991 uint8_t htSupportedChannelWidthSet;
992 uint8_t htRecommendedTxWidthSet;
993 ePhyChanBondState htSecondaryChannelOffset;
994#ifdef WLAN_FEATURE_11AC
995 uint8_t vhtCapability;
996 uint8_t vhtTxChannelWidthSet;
997 uint8_t apCenterChan;
998 uint8_t apChanWidth;
999#endif
1000} tCsrRoamHTProfile;
1001#endif
1002typedef struct tagCsrRoamConnectedProfile {
1003 tSirMacSSid SSID;
1004 bool handoffPermitted;
1005 bool ssidHidden;
1006 struct cdf_mac_addr bssid;
1007 eCsrRoamBssType BSSType;
1008 eCsrAuthType AuthType;
1009 tCsrAuthList AuthInfo;
1010 eCsrEncryptionType EncryptionType;
1011 tCsrEncryptionList EncryptionInfo;
1012 eCsrEncryptionType mcEncryptionType;
1013 tCsrEncryptionList mcEncryptionInfo;
1014 eCsrCBChoice CBMode;
1015 uint8_t operationChannel;
1016 uint32_t vht_channel_width;
1017 uint16_t beaconInterval;
1018 tCsrKeys Keys;
1019 /*
1020 * meaningless on connect. It's an OUT param from CSR's point of view
1021 * During assoc response carries the ACM bit-mask i.e. what
1022 * ACs have ACM=1 (if any),(Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE
1023 * all other bits are ignored)
1024 */
1025 uint8_t acm_mask;
1026 tCsrRoamModifyProfileFields modifyProfileFields;
1027 uint32_t nAddIEAssocLength;
1028 /*
1029 * If not null,it's IE byte stream for additional IE,
1030 * which can be WSC IE and/or P2P IE
1031 */
1032 uint8_t *pAddIEAssoc;
1033 tSirBssDescription *pBssDesc;
1034 bool qap; /* AP supports QoS */
1035 bool qosConnection; /* A connection is QoS enabled */
1036#ifdef WLAN_FEATURE_VOWIFI_11R
1037 tCsrMobilityDomainInfo MDID;
1038#endif
1039#ifdef FEATURE_WLAN_ESE
1040 tCsrEseCckmInfo eseCckmInfo;
1041 bool isESEAssoc;
1042#endif
1043 uint32_t dot11Mode;
1044 uint8_t proxyARPService;
1045#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
1046 tCsrRoamHTProfile HTProfile;
1047#endif
1048#ifdef WLAN_FEATURE_11W
1049 /* Management Frame Protection */
1050 bool MFPEnabled;
1051 uint8_t MFPRequired;
1052 uint8_t MFPCapable;
1053#endif
1054} tCsrRoamConnectedProfile;
1055
1056#ifdef WLAN_FEATURE_VOWIFI_11R
1057typedef struct tagCsr11rConfigParams {
1058 bool IsFTResourceReqSupported;
1059} tCsr11rConfigParams;
1060#endif
1061
1062#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
1063typedef struct tagCsrNeighborRoamConfigParams {
1064
1065 uint32_t nNeighborScanTimerPeriod;
1066 uint8_t nNeighborLookupRssiThreshold;
1067 uint16_t nNeighborScanMinChanTime;
1068 uint16_t nNeighborScanMaxChanTime;
1069 sCsrChannel neighborScanChanList;
1070 uint8_t nMaxNeighborRetries;
1071 uint16_t nNeighborResultsRefreshPeriod;
1072 uint16_t nEmptyScanRefreshPeriod;
1073 uint8_t nOpportunisticThresholdDiff;
1074 uint8_t nRoamRescanRssiDiff;
1075 uint8_t nRoamBmissFirstBcnt;
1076 uint8_t nRoamBmissFinalBcnt;
1077 uint8_t nRoamBeaconRssiWeight;
1078 uint8_t delay_before_vdev_stop;
1079 uint32_t nhi_rssi_scan_max_count;
1080 uint32_t nhi_rssi_scan_rssi_delta;
1081 uint32_t nhi_rssi_scan_delay;
1082 int32_t nhi_rssi_scan_rssi_ub;
1083} tCsrNeighborRoamConfigParams;
1084#endif
1085
1086typedef struct tagCsrConfigParam {
1087 uint32_t FragmentationThreshold;
1088 /* keep this uint32_t. This gets converted to ePhyChannelBondState */
1089 uint32_t channelBondingMode24GHz;
1090 uint32_t channelBondingMode5GHz;
1091 eCsrPhyMode phyMode;
1092 eCsrBand eBand;
1093 uint32_t RTSThreshold;
1094 uint32_t HeartbeatThresh50;
1095 uint32_t HeartbeatThresh24;
1096 eCsrCBChoice cbChoice;
1097 eCsrBand bandCapability; /* indicate hw capability */
1098 uint16_t TxRate;
1099 eCsrRoamWmmUserModeType WMMSupportMode;
1100 bool Is11eSupportEnabled;
1101 bool Is11dSupportEnabled;
1102 bool Is11dSupportEnabledOriginal;
1103 bool Is11hSupportEnabled;
1104 bool shortSlotTime;
1105 bool ProprietaryRatesEnabled;
1106 uint8_t AdHocChannel24;
1107 uint8_t AdHocChannel5G;
1108 /*
1109 * this number minus one is the number of times a scan doesn't find it
1110 * before it is removed
1111 */
1112 uint32_t nScanResultAgeCount;
1113 /* scan res aging time threshold when Not-Connect-No-PowerSave,in sec */
1114 uint32_t scanAgeTimeNCNPS;
1115 /* scan res aging time threshold when Not-Connect-Power-Save,in sec */
1116 uint32_t scanAgeTimeNCPS;
1117 /* scan res aging time threshold when Connect-No-Power-Save, in sec */
1118 uint32_t scanAgeTimeCNPS;
1119 /* scan res aging time threshold when Connect-Power-Save, in sec */
1120 uint32_t scanAgeTimeCPS;
1121 /* In sec, CSR'll try this long before gives up. 0 means no roaming */
1122 uint32_t nRoamingTime;
1123 /* to set the RSSI difference for each category */
1124 uint8_t bCatRssiOffset;
1125 /* to set MCC Enable/Disable mode */
1126 uint8_t fEnableMCCMode;
1127 bool mcc_rts_cts_prot_enable;
1128 bool mcc_bcast_prob_resp_enable;
1129 /*
1130 * To allow MCC GO different B.I than STA's.
1131 * NOTE: make sure if RIVA firmware can handle this combination before
1132 * enabling this at the moment, this flag is provided only to pass
1133 * Wi-Fi Cert. 5.1.12
1134 */
1135 uint8_t fAllowMCCGODiffBI;
1136 tCsr11dinfo Csr11dinfo;
1137
1138 /* Country Code Priority */
1139 bool fSupplicantCountryCodeHasPriority;
1140 uint16_t vccRssiThreshold;
1141 uint32_t vccUlMacLossThreshold;
1142 uint32_t nPassiveMinChnTime; /* in units of milliseconds */
1143 uint32_t nPassiveMaxChnTime; /* in units of milliseconds */
1144 uint32_t nActiveMinChnTime; /* in units of milliseconds */
1145 uint32_t nActiveMaxChnTime; /* in units of milliseconds */
1146 uint32_t nInitialDwellTime; /* in units of milliseconds */
1147 bool initial_scan_no_dfs_chnl;
1148#ifdef WLAN_AP_STA_CONCURRENCY
1149 uint32_t nPassiveMinChnTimeConc; /* in units of milliseconds */
1150 uint32_t nPassiveMaxChnTimeConc; /* in units of milliseconds */
1151 uint32_t nActiveMinChnTimeConc; /* in units of milliseconds */
1152 uint32_t nActiveMaxChnTimeConc; /* in units of milliseconds */
1153 uint32_t nRestTimeConc; /* in units of milliseconds */
1154 /* num of channels combined for STA in each split scan operation */
1155 uint8_t nNumStaChanCombinedConc;
1156 /* number of channels combined for P2P in each split scan operation */
1157 uint8_t nNumP2PChanCombinedConc;
1158#endif
1159 /*
1160 * in dBm, the maximum TX power The actual TX power is the lesser of
1161 * this value and 11d. If 11d is disable, the lesser of this and
1162 * default setting.
1163 */
1164 uint8_t nTxPowerCap;
1165 /* stats request frequency from PE while in full power */
1166 uint32_t statsReqPeriodicity;
1167 /* stats request frequency from PE while in power save */
1168 uint32_t statsReqPeriodicityInPS;
1169#ifdef WLAN_FEATURE_VOWIFI_11R
1170 tCsr11rConfigParams csr11rConfig;
1171#endif
1172#ifdef FEATURE_WLAN_ESE
1173 uint8_t isEseIniFeatureEnabled;
1174#endif
1175#ifdef FEATURE_WLAN_LFR
1176 uint8_t isFastRoamIniFeatureEnabled;
1177 uint8_t MAWCEnabled;
1178#endif
1179#if defined(WLAN_FEATURE_VOWIFI_11R) || defined(FEATURE_WLAN_ESE) || \
1180 defined(FEATURE_WLAN_LFR)
1181 uint8_t isFastTransitionEnabled;
1182 uint8_t RoamRssiDiff;
1183 bool isWESModeEnabled;
1184#endif
1185#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
1186 tCsrNeighborRoamConfigParams neighborRoamConfig;
1187#endif
1188 /*
1189 * Instead of Reassoc, send ADDTS/DELTS even when ACM is off for that AC
1190 * This is mandated by WMM-AC certification
1191 */
1192 bool addTSWhenACMIsOff;
1193 /*
1194 * channelPowerInfoList24 has been seen corrupted. Set this flag to true
1195 * trying to detect when it happens. Adding this into code because we
1196 * can't reproduce it easily. We don't know when it happens.
1197 */
1198 bool fValidateList;
1199 /*
1200 * Customer wants to start with an active scan based on the default
1201 * country code. This optimization will minimize the driver load to
1202 * association time. Based on this flag we will bypass the initial
1203 * passive scan needed for 11d to determine the country code & domain
1204 */
1205 bool fEnableBypass11d;
1206 /*
1207 * Customer wants to optimize the scan time. Avoiding scans(passive)
1208 * on DFS channels while swipping through both bands can save some time
1209 * (apprx 1.3 sec)
1210 */
1211 uint8_t fEnableDFSChnlScan;
1212 /*
1213 * To enable/disable scanning 2.4Ghz channels twice on a single scan
1214 * request from HDD
1215 */
1216 bool fScanTwice;
1217#ifdef WLAN_FEATURE_11AC
1218 uint32_t nVhtChannelWidth;
1219 uint8_t enableTxBF;
1220 uint8_t txBFCsnValue;
1221 uint8_t enable2x2;
1222 bool enableVhtFor24GHz;
1223 uint8_t enableMuBformee;
1224 uint8_t enableVhtpAid;
1225 uint8_t enableVhtGid;
1226#endif
1227 uint8_t enableAmpduPs;
1228 uint8_t enableHtSmps;
1229 uint8_t htSmps;
1230 bool ignore_peer_erp_info;
1231 /*
1232 * To enable/disable scanning only 2.4Ghz channels on first scan
1233 */
1234 bool fFirstScanOnly2GChnl;
1235#if defined(WLAN_FEATURE_VOWIFI_11R) || defined(FEATURE_WLAN_ESE) || \
1236 defined(FEATURE_WLAN_LFR)
1237 bool nRoamPrefer5GHz;
1238 bool nRoamIntraBand;
1239 uint8_t nProbes;
1240 uint16_t nRoamScanHomeAwayTime;
1241
1242 bool isRoamOffloadScanEnabled;
1243 bool bFastRoamInConIniFeatureEnabled;
1244#endif
1245 uint8_t scanCfgAgingTime;
1246 uint8_t enableTxLdpc;
1247 uint8_t isAmsduSupportInAMPDU;
1248 uint8_t nSelect5GHzMargin;
1249 uint8_t isCoalesingInIBSSAllowed;
1250#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
1251 uint8_t cc_switch_mode;
1252#endif
1253 uint8_t allowDFSChannelRoam;
1254#ifdef WLAN_FEATURE_ROAM_OFFLOAD
1255 bool isRoamOffloadEnabled;
1256#endif
1257 bool obssEnabled;
1258 uint8_t conc_custom_rule1;
1259 uint8_t conc_custom_rule2;
1260 uint8_t is_sta_connection_in_5gz_enabled;
1261 bool sendDeauthBeforeCon;
1262
1263 /* 802.11p enable */
1264 bool enable_dot11p;
1265 uint8_t max_scan_count;
1266} tCsrConfigParam;
1267
1268/* Tush */
1269typedef struct tagCsrUpdateConfigParam {
1270 tCsr11dinfo Csr11dinfo;
1271} tCsrUpdateConfigParam;
1272#ifdef WLAN_FEATURE_ROAM_OFFLOAD
1273#define csr_roamIsRoamOffloadEnabled(pMac) \
1274 (pMac->roam.configParam.isRoamOffloadEnabled)
1275#define DEFAULT_REASSOC_FAILURE_TIMEOUT 1000
1276#endif
1277
1278#ifdef WLAN_FEATURE_ROAM_OFFLOAD
1279/* connected but not authenticated */
1280#define CSR_ROAM_AUTH_STATUS_CONNECTED 0x1
1281/* connected and authenticated */
1282#define CSR_ROAM_AUTH_STATUS_AUTHENTICATED 0x2
1283#endif
1284
1285typedef struct tagCsrRoamInfo {
1286 tCsrRoamProfile *pProfile;
1287 tSirBssDescription *pBssDesc;
1288 uint32_t nBeaconLength;
1289 uint32_t nAssocReqLength;
1290 uint32_t nAssocRspLength;
1291 uint32_t nFrameLength;
1292 uint8_t frameType;
1293 /*
1294 * Point to a buffer contain the beacon, assoc req, assoc rsp frame,
1295 * in that order user needs to use nBeaconLength, nAssocReqLength,
1296 * nAssocRspLength to desice where each frame starts and ends.
1297 */
1298 uint8_t *pbFrames;
1299 bool fReassocReq; /* set to true if for re-association */
1300 bool fReassocRsp; /* set to true if for re-association */
1301 struct cdf_mac_addr bssid;
1302 /*
1303 * Only valid in IBSS. this is the peers MAC address for
1304 * eCSR_ROAM_RESULT_IBSS_NEW_PEER or PEER_DEPARTED
1305 */
1306 struct cdf_mac_addr peerMac;
1307 tSirResultCodes statusCode;
1308 /* this'd be our own defined or sent from otherBSS(per 802.11spec) */
1309 uint32_t reasonCode;
1310 uint8_t staId; /* Peer stationId when connected */
1311 /*
1312 * The DPU signatures will be sent eventually to TL to help it
1313 * determine the assoc to which a packet belongs to unicast DPU sign
1314 */
1315 uint8_t ucastSig;
1316 uint8_t bcastSig; /* Broadcast DPU signature */
1317 /* false means auth needed from supplicant. true means authenticated */
1318 bool fAuthRequired;
1319 uint8_t sessionId;
1320 uint8_t rsnIELen;
1321 uint8_t *prsnIE;
1322 uint8_t wapiIELen;
1323 uint8_t *pwapiIE;
1324 uint8_t addIELen;
1325 uint8_t *paddIE;
1326 union {
1327 tSirMicFailureInfo *pMICFailureInfo;
1328 tCsrRoamConnectedProfile *pConnectedProfile;
1329 tSirWPSPBCProbeReq *pWPSPBCProbeReq;
1330 } u;
1331 bool wmmEnabledSta; /* set to true if WMM enabled STA */
1332 uint32_t dtimPeriod;
1333#ifdef FEATURE_WLAN_ESE
1334 bool isESEAssoc;
1335#ifdef FEATURE_WLAN_ESE_UPLOAD
1336 tSirTsmIE tsmIe;
1337 uint32_t timestamp[2];
1338 uint16_t tsmRoamDelay;
1339 tSirEseBcnReportRsp *pEseBcnReportRsp;
1340#endif /* FEATURE_WLAN_ESE_UPLOAD */
1341#endif
1342 void *pRemainCtx;
1343 uint32_t roc_scan_id;
1344 uint32_t rxChan;
1345#ifdef FEATURE_WLAN_TDLS
1346 uint8_t staType;
1347 bool tdls_prohibited; /* per ExtCap in Assoc/Reassoc resp */
1348 bool tdls_chan_swit_prohibited; /* per ExtCap in Assoc/Reassoc resp */
1349#endif
1350 /* Required for indicating the frames to upper layer */
1351 uint32_t beaconLength;
1352 uint8_t *beaconPtr;
1353 uint32_t assocReqLength;
1354 uint8_t *assocReqPtr;
1355 int8_t rxRssi;
1356 tSirSmeDfsEventInd dfs_event;
1357 tSirChanChangeResponse *channelChangeRespEvent;
1358 /* Timing and fine Timing measurement capability clubbed together */
1359 uint8_t timingMeasCap;
1360#ifdef WLAN_FEATURE_ROAM_OFFLOAD
1361 uint8_t roamSynchInProgress;
1362 uint8_t synchAuthStatus;
1363 uint8_t kck[SIR_KCK_KEY_LEN];
1364 uint8_t kek[SIR_KEK_KEY_LEN];
1365 uint8_t replay_ctr[SIR_REPLAY_CTR_LEN];
1366#endif
1367 tSirSmeChanInfo chan_info;
1368} tCsrRoamInfo;
1369
1370typedef struct tagCsrFreqScanInfo {
1371 uint32_t nStartFreq; /* in unit of MHz */
1372 uint32_t nEndFreq; /* in unit of MHz */
1373 tSirScanType scanType;
1374} tCsrFreqScanInfo;
1375
1376typedef struct sSirSmeAssocIndToUpperLayerCnf {
1377 uint16_t messageType; /* eWNI_SME_ASSOC_CNF */
1378 uint16_t length;
1379 uint8_t sessionId;
1380 tSirResultCodes statusCode;
1381 tSirMacAddr bssId; /* Self BSSID */
1382 tSirMacAddr peerMacAddr;
1383 uint16_t aid;
1384 tSirMacAddr alternateBssId;
1385 uint8_t alternateChannelId;
1386 uint8_t wmmEnabledSta; /* set to true if WMM enabled STA */
1387 tSirRSNie rsnIE; /* RSN IE received from peer */
1388 tSirWAPIie wapiIE; /* WAPI IE received from peer */
1389 tSirAddie addIE; /* this can be WSC and/or P2P IE */
1390 uint8_t reassocReq; /* set to true if reassoc */
1391 /* Timing and fine Timing measurement capability clubbed together */
1392 uint8_t timingMeasCap;
1393 tSirSmeChanInfo chan_info;
1394} tSirSmeAssocIndToUpperLayerCnf, *tpSirSmeAssocIndToUpperLayerCnf;
1395
1396typedef struct tagCsrSummaryStatsInfo {
1397 uint32_t retry_cnt[4];
1398 uint32_t multiple_retry_cnt[4];
1399 uint32_t tx_frm_cnt[4];
1400 /* uint32_t num_rx_frm_crc_err; same as rx_error_cnt */
1401 /* uint32_t num_rx_frm_crc_ok; same as rx_frm_cnt */
1402 uint32_t rx_frm_cnt;
1403 uint32_t frm_dup_cnt;
1404 uint32_t fail_cnt[4];
1405 uint32_t rts_fail_cnt;
1406 uint32_t ack_fail_cnt;
1407 uint32_t rts_succ_cnt;
1408 uint32_t rx_discard_cnt;
1409 uint32_t rx_error_cnt;
1410 uint32_t tx_byte_cnt;
1411
1412} tCsrSummaryStatsInfo;
1413
1414typedef struct tagCsrGlobalClassAStatsInfo {
1415 uint32_t rx_frag_cnt;
1416 uint32_t promiscuous_rx_frag_cnt;
1417 /* uint32_t rx_fcs_err; */
1418 uint32_t rx_input_sensitivity;
1419 uint32_t max_pwr;
1420 /* uint32_t default_pwr; */
1421 uint32_t sync_fail_cnt;
1422 uint32_t tx_rate;
1423 /* mcs index for HT20 and HT40 rates */
1424 uint32_t mcs_index;
1425 /* to diff between HT20 & HT40 rates;short & long guard interval */
1426 uint32_t tx_rate_flags;
1427
1428} tCsrGlobalClassAStatsInfo;
1429
1430typedef struct tagCsrGlobalClassBStatsInfo {
1431 uint32_t uc_rx_wep_unencrypted_frm_cnt;
1432 uint32_t uc_rx_mic_fail_cnt;
1433 uint32_t uc_tkip_icv_err;
1434 uint32_t uc_aes_ccmp_format_err;
1435 uint32_t uc_aes_ccmp_replay_cnt;
1436 uint32_t uc_aes_ccmp_decrpt_err;
1437 uint32_t uc_wep_undecryptable_cnt;
1438 uint32_t uc_wep_icv_err;
1439 uint32_t uc_rx_decrypt_succ_cnt;
1440 uint32_t uc_rx_decrypt_fail_cnt;
1441 uint32_t mcbc_rx_wep_unencrypted_frm_cnt;
1442 uint32_t mcbc_rx_mic_fail_cnt;
1443 uint32_t mcbc_tkip_icv_err;
1444 uint32_t mcbc_aes_ccmp_format_err;
1445 uint32_t mcbc_aes_ccmp_replay_cnt;
1446 uint32_t mcbc_aes_ccmp_decrpt_err;
1447 uint32_t mcbc_wep_undecryptable_cnt;
1448 uint32_t mcbc_wep_icv_err;
1449 uint32_t mcbc_rx_decrypt_succ_cnt;
1450 uint32_t mcbc_rx_decrypt_fail_cnt;
1451
1452} tCsrGlobalClassBStatsInfo;
1453
1454typedef struct tagCsrGlobalClassCStatsInfo {
1455 uint32_t rx_amsdu_cnt;
1456 uint32_t rx_ampdu_cnt;
1457 uint32_t tx_20_frm_cnt;
1458 uint32_t rx_20_frm_cnt;
1459 uint32_t rx_mpdu_in_ampdu_cnt;
1460 uint32_t ampdu_delimiter_crc_err;
1461
1462} tCsrGlobalClassCStatsInfo;
1463
1464typedef struct tagCsrGlobalClassDStatsInfo {
1465 uint32_t tx_uc_frm_cnt;
1466 uint32_t tx_mc_frm_cnt;
1467 uint32_t tx_bc_frm_cnt;
1468 uint32_t rx_uc_frm_cnt;
1469 uint32_t rx_mc_frm_cnt;
1470 uint32_t rx_bc_frm_cnt;
1471 uint32_t tx_uc_byte_cnt[4];
1472 uint32_t tx_mc_byte_cnt;
1473 uint32_t tx_bc_byte_cnt;
1474 uint32_t rx_uc_byte_cnt[4];
1475 uint32_t rx_mc_byte_cnt;
1476 uint32_t rx_bc_byte_cnt;
1477 uint32_t rx_byte_cnt;
1478 uint32_t num_rx_bytes_crc_ok;
1479 uint32_t rx_rate;
1480
1481} tCsrGlobalClassDStatsInfo;
1482
1483typedef struct tagCsrPerStaStatsInfo {
1484 uint32_t tx_frag_cnt[4];
1485 uint32_t tx_ampdu_cnt;
1486 uint32_t tx_mpdu_in_ampdu_cnt;
1487} tCsrPerStaStatsInfo;
1488
1489typedef struct tagCsrRoamSetKey {
1490 eCsrEncryptionType encType;
1491 tAniKeyDirection keyDirection; /* Tx, Rx or Tx-and-Rx */
1492 struct cdf_mac_addr peerMac; /* Peer MAC. ALL 1's for group key */
1493 uint8_t paeRole; /* 0 for supplicant */
1494 uint8_t keyId; /* Key index */
1495 uint16_t keyLength; /* Number of bytes containing the key in pKey */
1496 uint8_t Key[CSR_MAX_KEY_LEN];
1497 uint8_t keyRsc[CSR_MAX_RSC_LEN];
1498} tCsrRoamSetKey;
1499
1500typedef struct tagCsrRoamRemoveKey {
1501 eCsrEncryptionType encType;
1502 struct cdf_mac_addr peerMac; /* Peer MAC. ALL 1's for group key */
1503 uint8_t keyId; /* key index */
1504} tCsrRoamRemoveKey;
1505
1506#ifdef FEATURE_WLAN_TDLS
1507
1508typedef struct tagCsrLinkEstablishParams {
1509 tSirMacAddr peerMac;
1510 uint8_t uapsdQueues;
1511 uint8_t maxSp;
1512 uint8_t isBufSta;
1513 uint8_t isOffChannelSupported;
1514 uint8_t isResponder;
1515 uint8_t supportedChannelsLen;
1516 uint8_t supportedChannels[SIR_MAC_MAX_SUPP_CHANNELS];
1517 uint8_t supportedOperClassesLen;
1518 uint8_t supportedOperClasses[SIR_MAC_MAX_SUPP_OPER_CLASSES];
1519} tCsrTdlsLinkEstablishParams;
1520
1521typedef struct tagCsrTdlsSendMgmt {
1522 tSirMacAddr peerMac;
1523 uint8_t frameType;
1524 uint8_t dialog;
1525 uint16_t statusCode;
1526 uint8_t responder;
1527 uint32_t peerCapability;
1528 uint8_t *buf;
1529 uint8_t len;
1530
1531} tCsrTdlsSendMgmt;
1532#endif
1533
1534typedef void *tScanResultHandle;
1535
1536typedef enum {
1537 REASSOC = 0,
1538 FASTREASSOC = 1
1539} handoff_src;
1540
1541typedef struct tagCsrHandoffRequest {
1542 struct cdf_mac_addr bssid;
1543 uint8_t channel;
1544 uint8_t src; /* To check if its a REASSOC or a FASTREASSOC IOCTL */
1545} tCsrHandoffRequest;
1546
1547#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
1548typedef struct tagCsrEseBeaconReqParams {
1549 uint16_t measurementToken;
1550 uint8_t channel;
1551 uint8_t scanMode;
1552 uint16_t measurementDuration;
1553} tCsrEseBeaconReqParams, *tpCsrEseBeaconReqParams;
1554
1555typedef struct tagCsrEseBeaconReq {
1556 uint8_t numBcnReqIe;
1557 tCsrEseBeaconReqParams bcnReq[SIR_ESE_MAX_MEAS_IE_REQS];
1558} tCsrEseBeaconReq, *tpCsrEseBeaconReq;
1559#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
1560
1561struct tagCsrDelStaParams {
1562 struct cdf_mac_addr peerMacAddr;
1563 uint16_t reason_code;
1564 uint8_t subtype;
1565};
1566
1567/*
1568 * NOTE: p2 is the second context pass in for the caller
1569 * NOTE: what if callback is called before requester gets the scanId??
1570 */
1571typedef CDF_STATUS (*csr_scan_completeCallback)(tHalHandle, void *p2,
1572 uint8_t sessionId,
1573 uint32_t scanID,
1574 eCsrScanStatus status);
1575typedef CDF_STATUS (*csr_roam_completeCallback)(void *pContext,
1576 tCsrRoamInfo * pParam,
1577 uint32_t roamId,
1578 eRoamCmdStatus roamStatus,
1579 eCsrRoamResult roamResult);
1580typedef CDF_STATUS (*csr_roamSessionCloseCallback)(void *pContext);
1581
1582#define CSR_IS_START_IBSS(pProfile) (eCSR_BSS_TYPE_START_IBSS == \
1583 (pProfile)->BSSType)
1584#define CSR_IS_JOIN_TO_IBSS(pProfile) (eCSR_BSS_TYPE_IBSS == \
1585 (pProfile)->BSSType)
1586#define CSR_IS_IBSS(pProfile) (CSR_IS_START_IBSS(pProfile) || \
1587 CSR_IS_JOIN_TO_IBSS(pProfile))
1588#define CSR_IS_INFRASTRUCTURE(pProfile) (eCSR_BSS_TYPE_INFRASTRUCTURE == \
1589 (pProfile)->BSSType)
1590#define CSR_IS_ANY_BSS_TYPE(pProfile) (eCSR_BSS_TYPE_ANY == \
1591 (pProfile)->BSSType)
1592#define CSR_IS_WDS_AP(pProfile) (eCSR_BSS_TYPE_WDS_AP == (pProfile)->BSSType)
1593#define CSR_IS_WDS_STA(pProfile) (eCSR_BSS_TYPE_WDS_STA == (pProfile)->BSSType)
1594#define CSR_IS_WDS(pProfile) (CSR_IS_WDS_AP(pProfile) || \
1595 CSR_IS_WDS_STA(pProfile))
1596#define CSR_IS_INFRA_AP(pProfile) (eCSR_BSS_TYPE_INFRA_AP == \
1597 (pProfile)->BSSType)
1598#define CSR_IS_CONN_INFRA_AP(pProfile) (eCSR_BSS_TYPE_INFRA_AP == \
1599 (pProfile)->BSSType)
1600#define CSR_IS_CONN_WDS_AP(pProfile) (eCSR_BSS_TYPE_WDS_AP == \
1601 (pProfile)->BSSType)
1602#define CSR_IS_CONN_WDS_STA(pProfile) (eCSR_BSS_TYPE_WDS_STA == \
1603 (pProfile)->BSSType)
1604#define CSR_IS_CONN_WDS(pProfile) (CSR_IS_WDS_AP(pProfile) || \
1605 CSR_IS_WDS_STA(pProfile))
1606#define CSR_IS_CLOSE_SESSION_COMMAND(pCommand) \
1607 ((pCommand)->command == eSmeCommandDelStaSession)
1608
1609CDF_STATUS csr_set_channels(tHalHandle hHal, tCsrConfigParam *pParam);
1610
1611CDF_STATUS csr_set_reg_info(tHalHandle hHal, uint8_t *apCntryCode);
1612
1613/* enum to string conversion for debug output */
1614const char *get_e_roam_cmd_status_str(eRoamCmdStatus val);
1615const char *get_e_csr_roam_result_str(eCsrRoamResult val);
1616CDF_STATUS csr_set_phy_mode(tHalHandle hHal, uint32_t phyMode, eCsrBand eBand,
1617 bool *pfRestartNeeded);
1618typedef void (*csr_roamLinkQualityIndCallback)
1619 (eCsrRoamLinkQualityInd ind, void *pContext);
1620typedef void (*tCsrStatsCallback)(void *stats, void *pContext);
1621typedef void (*tCsrRssiCallback)(int8_t rssi, uint32_t staId, void *pContext);
1622
1623#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
1624typedef void (*tCsrTsmStatsCallback)(tAniTrafStrmMetrics tsmMetrics,
1625 uint32_t staId, void *pContext);
1626#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
1627typedef void (*tCsrSnrCallback)(int8_t snr, uint32_t staId, void *pContext);
1628
1629#ifdef WLAN_FEATURE_VOWIFI_11R
1630CDF_STATUS csr_roam_issue_ft_preauth_req(tHalHandle hHal, uint32_t sessionId,
1631 tpSirBssDescription pBssDescription);
1632#endif
1633CDF_STATUS csr_set_band(tHalHandle hHal, uint8_t sessionId, eCsrBand eBand);
1634eCsrBand csr_get_current_band(tHalHandle hHal);
1635typedef void (*csr_readyToSuspendCallback)(void *pContext, bool suspended);
1636#ifdef WLAN_FEATURE_EXTWOW_SUPPORT
1637typedef void (*csr_readyToExtWoWCallback)(void *pContext, bool status);
1638#endif
1639#ifdef WLAN_FEATURE_ROAM_OFFLOAD
1640CDF_STATUS csr_roam_issue_ft_roam_offload_synch(tHalHandle hHal,
1641 uint32_t sessionId, tSirBssDescription *pBssDescription);
1642#endif
1643typedef void (*tCsrLinkStatusCallback)(uint8_t status, void *pContext);
1644#endif