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