blob: 4be197e1b629160566b9785a205c01e10bc95b6b [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
2 * Copyright (c) 2012-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 * This file sir_api.h contains definitions exported by
30 * Sirius software.
31 * Author: Chandra Modumudi
32 * Date: 04/16/2002
33 * History:-
34 * Date Modified by Modification Information
35 * --------------------------------------------------------------------
36 */
37
38#ifndef __SIR_API_H
39#define __SIR_API_H
40
41#include "sir_types.h"
42#include "sir_mac_prot_def.h"
43#include "ani_system_defs.h"
44#include "sir_params.h"
45
46#define OFFSET_OF(structType, fldName) (&((structType *)0)->fldName)
47
48/* / Max supported channel list */
49#define SIR_MAX_SUPPORTED_CHANNEL_LIST 96
50
51#define SIR_MDIE_ELEMENT_ID 54
52#define SIR_MDIE_SIZE 3
53
54/* Increase dwell time for P2P search in ms */
55#define P2P_SEARCH_DWELL_TIME_INCREASE 20
56#define P2P_SOCIAL_CHANNELS 3
57
58/* Max number of channels are 165, but to access 165th element of array,
59 *array of 166 is required.
60 */
61#define SIR_MAX_24G_5G_CHANNEL_RANGE 166
62#define SIR_BCN_REPORT_MAX_BSS_DESC 4
63
64#define SIR_NUM_11B_RATES 4 /* 1,2,5.5,11 */
65#define SIR_NUM_11A_RATES 8 /* 6,9,12,18,24,36,48,54 */
66
67#define SIR_PM_SLEEP_MODE 0
68#define SIR_PM_ACTIVE_MODE 1
69
70/* hidden SSID options */
71#define SIR_SCAN_NO_HIDDEN_SSID 0
72#define SIR_SCAN_HIDDEN_SSID_PE_DECISION 1
73
74#define SIR_MAC_ADDR_LEN 6
75#define SIR_IPV4_ADDR_LEN 4
76
77typedef uint8_t tSirIpv4Addr[SIR_IPV4_ADDR_LEN];
78
79#define SIR_VERSION_STRING_LEN 64
80typedef uint8_t tSirVersionString[SIR_VERSION_STRING_LEN];
81
82/* Periodic Tx pattern offload feature */
83#define PERIODIC_TX_PTRN_MAX_SIZE 1536
84#define MAXNUM_PERIODIC_TX_PTRNS 6
85#define WIFI_SCANNING_MAC_OUI_LENGTH 3
86
87#ifdef FEATURE_WLAN_EXTSCAN
88
89#define WLAN_EXTSCAN_MAX_CHANNELS 36
90#define WLAN_EXTSCAN_MAX_BUCKETS 16
91#define WLAN_EXTSCAN_MAX_HOTLIST_APS 128
92#define WLAN_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS 64
93#define WLAN_EXTSCAN_MAX_HOTLIST_SSIDS 8
94
95/* This should not be greater than MAX_NUMBER_OF_CONC_CONNECTIONS */
96#define MAX_VDEV_SUPPORTED 4
97
98typedef enum {
99 eSIR_EXTSCAN_INVALID,
100 eSIR_EXTSCAN_START_RSP,
101 eSIR_EXTSCAN_STOP_RSP,
102 eSIR_EXTSCAN_CACHED_RESULTS_RSP,
103 eSIR_EXTSCAN_SET_BSSID_HOTLIST_RSP,
104 eSIR_EXTSCAN_RESET_BSSID_HOTLIST_RSP,
105 eSIR_EXTSCAN_SET_SIGNIFICANT_WIFI_CHANGE_RSP,
106 eSIR_EXTSCAN_RESET_SIGNIFICANT_WIFI_CHANGE_RSP,
107
108 eSIR_EXTSCAN_GET_CAPABILITIES_IND,
109 eSIR_EXTSCAN_HOTLIST_MATCH_IND,
110 eSIR_EXTSCAN_SIGNIFICANT_WIFI_CHANGE_RESULTS_IND,
111 eSIR_EXTSCAN_CACHED_RESULTS_IND,
112 eSIR_EXTSCAN_SCAN_RES_AVAILABLE_IND,
113 eSIR_EXTSCAN_SCAN_PROGRESS_EVENT_IND,
114 eSIR_EXTSCAN_FULL_SCAN_RESULT_IND,
115 eSIR_EPNO_NETWORK_FOUND_IND,
116 eSIR_PASSPOINT_NETWORK_FOUND_IND,
117 eSIR_EXTSCAN_SET_SSID_HOTLIST_RSP,
118 eSIR_EXTSCAN_RESET_SSID_HOTLIST_RSP,
119 eSIR_EXTSCAN_HOTLIST_SSID_MATCH_IND,
120
121 /* Keep this last */
122 eSIR_EXTSCAN_CALLBACK_TYPE_MAX,
123} tSirExtScanCallbackType;
124
125#endif /* FEATURE_WLAN_EXTSCAN */
126
127#define SIR_KRK_KEY_LEN 16
128#ifdef WLAN_FEATURE_ROAM_OFFLOAD
129#define SIR_BTK_KEY_LEN 32
130#define SIR_KCK_KEY_LEN 16
131#define SIR_KEK_KEY_LEN 16
132#define SIR_REPLAY_CTR_LEN 8
133
134#define SIR_UAPSD_BITOFFSET_ACVO 0
135#define SIR_UAPSD_BITOFFSET_ACVI 1
136#define SIR_UAPSD_BITOFFSET_ACBK 2
137#define SIR_UAPSD_BITOFFSET_ACBE 3
138
139#define SIR_UAPSD_FLAG_ACVO (1 << SIR_UAPSD_BITOFFSET_ACVO)
140#define SIR_UAPSD_FLAG_ACVI (1 << SIR_UAPSD_BITOFFSET_ACVI)
141#define SIR_UAPSD_FLAG_ACBK (1 << SIR_UAPSD_BITOFFSET_ACBK)
142#define SIR_UAPSD_FLAG_ACBE (1 << SIR_UAPSD_BITOFFSET_ACBE)
143#define SIR_UAPSD_GET(ac, mask) (((mask) & (SIR_UAPSD_FLAG_ ## ac)) >> SIR_UAPSD_BITOFFSET_ ## ac)
144#endif
145
146/**
147 * Module ID definitions.
148 */
149enum {
150 SIR_BOOT_MODULE_ID = 1,
151 SIR_HAL_MODULE_ID = 0x10,
152 SIR_CFG_MODULE_ID = 0x12,
153 SIR_LIM_MODULE_ID,
154 SIR_ARQ_MODULE_ID,
155 SIR_SCH_MODULE_ID,
156 SIR_PMM_MODULE_ID,
157 SIR_MNT_MODULE_ID,
158 SIR_DBG_MODULE_ID,
159 SIR_DPH_MODULE_ID,
160 SIR_SYS_MODULE_ID,
161 SIR_SMS_MODULE_ID,
162};
163
164#define SIR_WMA_MODULE_ID SIR_HAL_MODULE_ID
165
166/**
167 * First and last module definition for logging utility
168 *
169 * NOTE: The following definitions need to be updated if
170 * the above list is changed.
171 */
172#define SIR_FIRST_MODULE_ID SIR_HAL_MODULE_ID
173#define SIR_LAST_MODULE_ID SIR_SMS_MODULE_ID
174
175/* Type declarations used by Firmware and Host software */
176
177/* Scan type enum used in scan request */
178typedef enum eSirScanType {
179 eSIR_PASSIVE_SCAN,
180 eSIR_ACTIVE_SCAN,
181 eSIR_BEACON_TABLE,
182} tSirScanType;
183
184/* / Result codes Firmware return to Host SW */
185typedef enum eSirResultCodes {
186 eSIR_SME_SUCCESS,
187 eSIR_LOGP_EXCEPTION,
188 eSIR_SME_INVALID_PARAMETERS = 500,
189 eSIR_SME_UNEXPECTED_REQ_RESULT_CODE,
190 eSIR_SME_RESOURCES_UNAVAILABLE,
191 /* Unable to find a BssDescription */
192 eSIR_SME_SCAN_FAILED,
193 /* matching requested scan criteria */
194 eSIR_SME_BSS_ALREADY_STARTED_OR_JOINED,
195 eSIR_SME_LOST_LINK_WITH_PEER_RESULT_CODE,
196 eSIR_SME_REFUSED,
197 eSIR_SME_JOIN_DEAUTH_FROM_AP_DURING_ADD_STA,
198 eSIR_SME_JOIN_TIMEOUT_RESULT_CODE,
199 eSIR_SME_AUTH_TIMEOUT_RESULT_CODE,
200 eSIR_SME_ASSOC_TIMEOUT_RESULT_CODE,
201 eSIR_SME_REASSOC_TIMEOUT_RESULT_CODE,
202 eSIR_SME_MAX_NUM_OF_PRE_AUTH_REACHED,
203 eSIR_SME_AUTH_REFUSED,
204 eSIR_SME_INVALID_WEP_DEFAULT_KEY,
205 eSIR_SME_NO_KEY_MAPPING_KEY_FOR_PEER,
206 eSIR_SME_ASSOC_REFUSED,
207 eSIR_SME_REASSOC_REFUSED,
208 /* Recvd Deauth while join/pre-auth */
209 eSIR_SME_DEAUTH_WHILE_JOIN,
210 eSIR_SME_STA_NOT_AUTHENTICATED,
211 eSIR_SME_STA_NOT_ASSOCIATED,
212 eSIR_SME_ALREADY_JOINED_A_BSS,
213 /* Given in SME_SCAN_RSP msg */
214 eSIR_SME_MORE_SCAN_RESULTS_FOLLOW,
215 /* that more SME_SCAN_RSP */
216 /* messages are following. */
217 /* SME_SCAN_RSP message with */
218 /* eSIR_SME_SUCCESS status */
219 /* code is the last one. */
220 /* Sent in SME_JOIN/REASSOC_RSP */
221 eSIR_SME_INVALID_ASSOC_RSP_RXED,
222 /* messages upon receiving */
223 /* invalid Re/Assoc Rsp frame. */
224 /* STOP BSS triggered by MIC failures: MAC software to
225 * disassoc all stations
226 */
227 eSIR_SME_MIC_COUNTER_MEASURES,
228 /* with MIC_FAILURE reason code and perform the stop bss operation */
229 /* didn't get rsp from peer within timeout interval */
230 eSIR_SME_ADDTS_RSP_TIMEOUT,
231 /* didn't get success rsp from HAL */
232 eSIR_SME_ADDTS_RSP_FAILED,
233 /* failed to send ch switch act frm */
234 eSIR_SME_CHANNEL_SWITCH_FAIL,
235 eSIR_SME_INVALID_STATE,
236 /* SIR_HAL_SIR_HAL_INIT_SCAN_RSP returned failed status */
237 eSIR_SME_HAL_SCAN_INIT_FAILED,
238 /* SIR_HAL_END_SCAN_RSP returned failed status */
239 eSIR_SME_HAL_SCAN_END_FAILED,
240 /* SIR_HAL_FINISH_SCAN_RSP returned failed status */
241 eSIR_SME_HAL_SCAN_FINISH_FAILED,
242 /* Failed to send a message to HAL */
243 eSIR_SME_HAL_SEND_MESSAGE_FAIL,
244 /* Failed to stop the bss */
245 eSIR_SME_STOP_BSS_FAILURE,
246 eSIR_SME_WOWL_ENTER_REQ_FAILED,
247 eSIR_SME_WOWL_EXIT_REQ_FAILED,
248#if defined(WLAN_FEATURE_VOWIFI_11R) || defined(FEATURE_WLAN_ESE) || \
249 defined(FEATURE_WLAN_LFR)
250 eSIR_SME_FT_REASSOC_TIMEOUT_FAILURE,
251 eSIR_SME_FT_REASSOC_FAILURE,
252#endif
253 eSIR_SME_SEND_ACTION_FAIL,
254 eSIR_SME_DEAUTH_STATUS,
255 eSIR_PNO_SCAN_SUCCESS,
256 eSIR_DONOT_USE_RESULT_CODE = SIR_MAX_ENUM_SIZE
257} tSirResultCodes;
258
259/* each station added has a rate mode which specifies the sta attributes */
260typedef enum eStaRateMode {
261 eSTA_TAURUS = 0,
262 eSTA_TITAN,
263 eSTA_POLARIS,
264 eSTA_11b,
265 eSTA_11bg,
266 eSTA_11a,
267 eSTA_11n,
268#ifdef WLAN_FEATURE_11AC
269 eSTA_11ac,
270#endif
271 eSTA_INVALID_RATE_MODE
272} tStaRateMode, *tpStaRateMode;
273
274/*
275 * although in tSirSupportedRates each IE is 16bit but PE only passes IEs in 8
276 * bits with MSB=1 for basic rates. change the mask for bit0-7 only so HAL gets
277 * correct basic rates for setting response rates.
278 */
279#define IERATE_BASICRATE_MASK 0x80
280#define IERATE_RATE_MASK 0x7f
281#define IERATE_IS_BASICRATE(x) ((x) & IERATE_BASICRATE_MASK)
282
283typedef struct sSirSupportedRates {
284 /*
285 * For Self STA Entry: this represents Self Mode.
286 * For Peer Stations, this represents the mode of the peer.
287 * On Station:
288 * --this mode is updated when PE adds the Self Entry.
289 * -- OR when PE sends 'ADD_BSS' message and station context in BSS is
290 * used to indicate the mode of the AP.
291 * ON AP:
292 * -- this mode is updated when PE sends 'ADD_BSS' and Sta entry for
293 * that BSS is used to indicate the self mode of the AP.
294 * -- OR when a station is associated, PE sends 'ADD_STA' message with
295 * this mode updated.
296 */
297
298 tStaRateMode opRateMode;
299 /*
300 * 11b, 11a and aniLegacyRates are IE rates which gives rate in unit
301 * of 500Kbps
302 */
303 uint16_t llbRates[SIR_NUM_11B_RATES];
304 uint16_t llaRates[SIR_NUM_11A_RATES];
305 /*
306 * 0-76 bits used, remaining reserved
307 * bits 0-15 and 32 should be set.
308 */
309 uint8_t supportedMCSSet[SIR_MAC_MAX_SUPPORTED_MCS_SET];
310
311 /*
312 * RX Highest Supported Data Rate defines the highest data
313 * rate that the STA is able to receive, in unites of 1Mbps.
314 * This value is derived from "Supported MCS Set field" inside
315 * the HT capability element.
316 */
317 uint16_t rxHighestDataRate;
318
319#ifdef WLAN_FEATURE_11AC
320 /*Indicates the Maximum MCS that can be received for each number
321 of spacial streams */
322 uint16_t vhtRxMCSMap;
323 /*Indicate the highest VHT data rate that the STA is able to receive */
324 uint16_t vhtRxHighestDataRate;
325 /*Indicates the Maximum MCS that can be transmitted for each number
326 of spacial streams */
327 uint16_t vhtTxMCSMap;
328 /*Indicate the highest VHT data rate that the STA is able to transmit */
329 uint16_t vhtTxHighestDataRate;
330#endif
331} tSirSupportedRates, *tpSirSupportedRates;
332
333typedef enum eSirRFBand {
334 SIR_BAND_UNKNOWN,
335 SIR_BAND_2_4_GHZ,
336 SIR_BAND_5_GHZ,
337} tSirRFBand;
338
339typedef struct sSirRemainOnChnReq {
340 uint16_t messageType;
341 uint16_t length;
342 uint8_t sessionId;
343 tSirMacAddr selfMacAddr;
344 uint8_t chnNum;
345 uint8_t phyMode;
346 uint32_t duration;
347 uint8_t isProbeRequestAllowed;
348 uint32_t scan_id;
349 uint8_t probeRspIe[1];
350} tSirRemainOnChnReq, *tpSirRemainOnChnReq;
351
352/**
353 * struct sir_roc_rsp - Structure to store the remain on channel response
354 * @message_type: Message Type
355 * @length: Message Length
356 * @session_id: SME session Id
357 * @scan_id : scan identifier
358 * @status: result status
359 */
360struct sir_roc_rsp {
361 uint16_t message_type;
362 uint16_t length;
363 uint8_t session_id;
364 uint32_t scan_id;
365 tSirResultCodes status;
366};
367
368typedef struct sSirRegisterMgmtFrame {
369 uint16_t messageType;
370 uint16_t length;
371 uint8_t sessionId;
372 bool registerFrame;
373 uint16_t frameType;
374 uint16_t matchLen;
375 uint8_t matchData[1];
376} tSirRegisterMgmtFrame, *tpSirRegisterMgmtFrame;
377
378/* / Generic type for sending a response message */
379/* / with result code to host software */
380typedef struct sSirSmeRsp {
381 uint16_t messageType; /* eWNI_SME_*_RSP */
382 uint16_t length;
383 uint8_t sessionId; /* To support BT-AMP */
384 uint16_t transactionId; /* To support BT-AMP */
385 tSirResultCodes statusCode;
386} tSirSmeRsp, *tpSirSmeRsp;
387
388/* / Definition for indicating all modules ready on STA */
389typedef struct sSirSmeReadyReq {
390 uint16_t messageType; /* eWNI_SME_SYS_READY_IND */
391 uint16_t length;
392 uint16_t transactionId;
393 void *add_bssdescr_cb;
394} tSirSmeReadyReq, *tpSirSmeReadyReq;
395
396/**
397 * struct sir_hw_mode - Format of set HW mode
398 * @hw_mode_index: Index of HW mode to be set
399 * @set_hw_mode_cb: HDD set HW mode callback
400 */
401struct sir_hw_mode {
402 uint32_t hw_mode_index;
403 void *set_hw_mode_cb;
404};
405
406/**
407 * struct s_sir_set_hw_mode - Set HW mode request
408 * @messageType: Message type
409 * @length: Length of the message
410 * @set_hw: Params containing the HW mode index and callback
411 */
412struct s_sir_set_hw_mode {
413 uint16_t messageType;
414 uint16_t length;
415 struct sir_hw_mode set_hw;
416};
417
418/**
419 * struct sir_dual_mac_config - Dual MAC configuration
420 * @scan_config: Scan configuration
421 * @fw_mode_config: FW mode configuration
422 * @set_dual_mac_cb: Callback function to be executed on response to the command
423 */
424struct sir_dual_mac_config {
425 uint32_t scan_config;
426 uint32_t fw_mode_config;
427 void *set_dual_mac_cb;
428};
429
430/**
431 * struct sir_set_dual_mac_cfg - Set Dual mac config request
432 * @message_type: Message type
433 * @length: Length of the message
434 * @set_dual_mac: Params containing the dual mac config and callback
435 */
436struct sir_set_dual_mac_cfg {
437 uint16_t message_type;
438 uint16_t length;
439 struct sir_dual_mac_config set_dual_mac;
440};
441
442/* / BSS type enum used in while scanning/joining etc */
443typedef enum eSirBssType {
444 eSIR_INFRASTRUCTURE_MODE,
445 eSIR_INFRA_AP_MODE, /* Added for softAP support */
446 eSIR_IBSS_MODE,
447 eSIR_BTAMP_STA_MODE, /* Added for BT-AMP support */
448 eSIR_BTAMP_AP_MODE, /* Added for BT-AMP support */
449 eSIR_AUTO_MODE,
450 eSIR_DONOT_USE_BSS_TYPE = SIR_MAX_ENUM_SIZE
451} tSirBssType;
452
453/* / Power Capability info used in 11H */
454typedef struct sSirMacPowerCapInfo {
455 uint8_t minTxPower;
456 uint8_t maxTxPower;
457} tSirMacPowerCapInfo, *tpSirMacPowerCapInfo;
458
459/* / Supported Channel info used in 11H */
460typedef struct sSirSupChnl {
461 uint8_t numChnl;
462 uint8_t channelList[SIR_MAX_SUPPORTED_CHANNEL_LIST];
463} tSirSupChnl, *tpSirSupChnl;
464
465typedef enum eSirNwType {
466 eSIR_11A_NW_TYPE,
467 eSIR_11B_NW_TYPE,
468 eSIR_11G_NW_TYPE,
469 eSIR_11N_NW_TYPE,
470#ifdef WLAN_FEATURE_11AC
471 eSIR_11AC_NW_TYPE,
472#endif
473 eSIR_DONOT_USE_NW_TYPE = SIR_MAX_ENUM_SIZE
474} tSirNwType;
475
476/* / Definition for new iBss peer info */
477typedef struct sSirNewIbssPeerInfo {
478 tSirMacAddr peerAddr;
479 uint16_t aid;
480} tSirNewIbssPeerInfo, *tpSirNewIbssPeerInfo;
481
482/* HT configuration values */
483typedef struct sSirHtConfig {
484 /* Enable/Disable receiving LDPC coded packets */
485 uint32_t ht_rx_ldpc:1;
486 /* Enable/Disable TX STBC */
487 uint32_t ht_tx_stbc:1;
488 /* Enable/Disable RX STBC */
489 uint32_t ht_rx_stbc:2;
490 /* Enable/Disable SGI */
491 uint32_t ht_sgi:1;
492 uint32_t unused:27;
493} cdf_packed tSirHTConfig, *tpSirHTConfig;
494
495typedef struct sSirAddIeParams {
496 uint16_t probeRespDataLen;
497 uint8_t *probeRespData_buff;
498 uint16_t assocRespDataLen;
499 uint8_t *assocRespData_buff;
500 uint16_t probeRespBCNDataLen;
501 uint8_t *probeRespBCNData_buff;
502} tSirAddIeParams, *tpSirAddIeParams;
503
504/* / Definition for kick starting BSS */
505/* / ---> MAC */
506/**
507 * Usage of ssId, numSSID & ssIdList:
508 * ---------------------------------
509 * 1. ssId.length of zero indicates that Broadcast/Suppress SSID
510 * feature is enabled.
511 * 2. If ssId.length is zero, MAC SW will advertise NULL SSID
512 * and interpret the SSID list from numSSID & ssIdList.
513 * 3. If ssId.length is non-zero, MAC SW will advertise the SSID
514 * specified in the ssId field and it is expected that
515 * application will set numSSID to one (only one SSID present
516 * in the list) and SSID in the list is same as ssId field.
517 * 4. Application will always set numSSID >= 1.
518 */
519/* ***** NOTE: Please make sure all codes are updated if inserting field into
520 * this structure..********** */
521typedef struct sSirSmeStartBssReq {
522 uint16_t messageType; /* eWNI_SME_START_BSS_REQ */
523 uint16_t length;
524 uint8_t sessionId; /* Added for BT-AMP Support */
525 uint16_t transactionId; /* Added for BT-AMP Support */
526 tSirMacAddr bssId; /* Added for BT-AMP Support */
527 tSirMacAddr selfMacAddr; /* Added for BT-AMP Support */
528 uint16_t beaconInterval; /* Added for BT-AMP Support */
529 uint8_t dot11mode;
530#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
531 uint8_t cc_switch_mode;
532#endif
533 tSirBssType bssType;
534 tSirMacSSid ssId;
535 uint8_t channelId;
536 ePhyChanBondState cbMode;
537 uint8_t vht_channel_width;
538 uint8_t center_freq_seg0;
539 uint8_t center_freq_seg1;
540 uint8_t sec_ch_offset;
541
542 uint8_t privacy;
543 uint8_t apUapsdEnable;
544 uint8_t ssidHidden;
545 bool fwdWPSPBCProbeReq;
546 bool protEnabled;
547 bool obssProtEnabled;
548 uint16_t ht_capab;
549 tAniAuthType authType;
550 uint32_t dtimPeriod;
551 uint8_t wps_state;
552 uint8_t isCoalesingInIBSSAllowed; /* Coalesing on/off knob */
553 tCDF_CON_MODE bssPersona;
554
555 uint8_t txLdpcIniFeatureEnabled;
556
557 tSirRSNie rsnIE; /* RSN IE to be sent in */
558 /* Beacon and Probe */
559 /* Response frames */
560 tSirNwType nwType; /* Indicates 11a/b/g */
561 tSirMacRateSet operationalRateSet; /* Has 11a or 11b rates */
562 tSirMacRateSet extendedRateSet; /* Has 11g rates */
563 tSirHTConfig htConfig;
564
565#ifdef WLAN_FEATURE_11W
566 bool pmfCapable;
567 bool pmfRequired;
568#endif
569
570 tSirAddIeParams addIeParams;
571
572 bool obssEnabled;
573 uint8_t sap_dot11mc;
574
575} tSirSmeStartBssReq, *tpSirSmeStartBssReq;
576
577#define GET_IE_LEN_IN_BSS(lenInBss) (lenInBss + sizeof(lenInBss) - \
578 ((uintptr_t)OFFSET_OF(tSirBssDescription,\
579 ieFields)))
580
581#define WSCIE_PROBE_RSP_LEN (317 + 2)
582
583typedef struct sSirBssDescription {
584 /* offset of the ieFields from bssId. */
585 uint16_t length;
586 tSirMacAddr bssId;
587 v_TIME_t scanSysTimeMsec;
588 uint32_t timeStamp[2];
589 uint16_t beaconInterval;
590 uint16_t capabilityInfo;
591 tSirNwType nwType; /* Indicates 11a/b/g */
592 uint8_t reserved_padding0;
593 int8_t rssi;
594 int8_t sinr;
595 /* channelId what peer sent in beacon/probersp. */
596 uint8_t channelId;
597 /* channelId on which we are parked at. */
598 /* used only in scan case. */
599 uint8_t channelIdSelf;
600 uint8_t sSirBssDescriptionRsvd[3];
601 /* base on a tick count. It is a time stamp, not a relative time. */
602 uint32_t nReceivedTime;
603#if defined WLAN_FEATURE_VOWIFI
604 uint32_t parentTSF;
605 uint32_t startTSF[2];
606#endif
607#ifdef WLAN_FEATURE_VOWIFI_11R
608 uint8_t mdiePresent;
609 /* MDIE for 11r, picked from the beacons */
610 uint8_t mdie[SIR_MDIE_SIZE];
611#endif
612#ifdef FEATURE_WLAN_ESE
613 uint16_t QBSSLoad_present;
614 uint16_t QBSSLoad_avail;
615 /* To achieve 8-byte alignment with ESE enabled */
616 uint32_t reservedPadding5;
617#endif
618 /* Please keep the structure 4 bytes aligned above the ieFields */
619
620 /* whether it is from a probe rsp */
621 uint8_t fProbeRsp;
622 uint8_t reservedPadding1;
623 uint8_t reservedPadding2;
624 uint8_t reservedPadding3;
625 uint32_t WscIeLen;
626 uint8_t WscIeProbeRsp[WSCIE_PROBE_RSP_LEN];
627 uint8_t reservedPadding4;
628 uint32_t tsf_delta;
629
630 uint32_t ieFields[1];
631} tSirBssDescription, *tpSirBssDescription;
632
633#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
634typedef struct sSirSmeHTProfile {
635 uint8_t dot11mode;
636 uint8_t htCapability;
637 uint8_t htSupportedChannelWidthSet;
638 uint8_t htRecommendedTxWidthSet;
639 ePhyChanBondState htSecondaryChannelOffset;
640#ifdef WLAN_FEATURE_11AC
641 uint8_t vhtCapability;
642 uint8_t vhtTxChannelWidthSet;
643 uint8_t apCenterChan;
644 uint8_t apChanWidth;
645#endif
646} tSirSmeHTProfile;
647#endif
648/* / Definition for response message to previously */
649/* / issued start BSS request */
650/* / MAC ---> */
651typedef struct sSirSmeStartBssRsp {
652 uint16_t messageType; /* eWNI_SME_START_BSS_RSP */
653 uint16_t length;
654 uint8_t sessionId;
655 uint16_t transactionId; /* transaction ID for cmd */
656 tSirResultCodes statusCode;
657 tSirBssType bssType; /* Add new type for WDS mode */
658 uint16_t beaconInterval; /* Beacon Interval for both type */
659 uint32_t staId; /* Staion ID for Self */
660#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
661 tSirSmeHTProfile HTProfile;
662#endif
663 tSirBssDescription bssDescription; /* Peer BSS description */
664} tSirSmeStartBssRsp, *tpSirSmeStartBssRsp;
665
666typedef struct sSirChannelList {
667 uint8_t numChannels;
668 uint8_t channelNumber[SIR_ESE_MAX_MEAS_IE_REQS];
669} tSirChannelList, *tpSirChannelList;
670
671typedef struct sSirDFSChannelList {
672 uint32_t timeStamp[SIR_MAX_24G_5G_CHANNEL_RANGE];
673
674} tSirDFSChannelList, *tpSirDFSChannelList;
675
676#ifdef FEATURE_WLAN_ESE
677typedef struct sTspecInfo {
678 uint8_t valid;
679 tSirMacTspecIE tspec;
680} tTspecInfo;
681
682#define SIR_ESE_MAX_TSPEC_IES 4
683typedef struct sESETspecTspecInfo {
684 uint8_t numTspecs;
685 tTspecInfo tspec[SIR_ESE_MAX_TSPEC_IES];
686} tESETspecInfo;
687#endif
688
689/* / Two Background Scan mode */
690typedef enum eSirBackgroundScanMode {
691 eSIR_ROAMING_SCAN = 2,
692} tSirBackgroundScanMode;
693
694/* / Two types of traffic check */
695typedef enum eSirLinkTrafficCheck {
696 eSIR_DONT_CHECK_LINK_TRAFFIC_BEFORE_SCAN = 0,
697 eSIR_CHECK_LINK_TRAFFIC_BEFORE_SCAN = 1,
698 eSIR_CHECK_ROAMING_SCAN = 2,
699} tSirLinkTrafficCheck;
700
701#define SIR_BG_SCAN_RETURN_CACHED_RESULTS 0x0
702#define SIR_BG_SCAN_PURGE_RESUTLS 0x80
703#define SIR_BG_SCAN_RETURN_FRESH_RESULTS 0x01
704#define SIR_SCAN_MAX_NUM_SSID 0x0A
705#define SIR_BG_SCAN_RETURN_LFR_CACHED_RESULTS 0x02
706#define SIR_BG_SCAN_PURGE_LFR_RESULTS 0x40
707
708/* / Definition for scan request */
709typedef struct sSirSmeScanReq {
710 uint16_t messageType; /* eWNI_SME_SCAN_REQ */
711 uint16_t length;
712 uint8_t sessionId; /* Session ID */
713 uint16_t transactionId; /* Transaction ID for cmd */
714 tSirMacAddr bssId;
715 tSirMacSSid ssId[SIR_SCAN_MAX_NUM_SSID];
716 tSirMacAddr selfMacAddr; /* Added For BT-AMP Support */
717 tSirBssType bssType;
718 uint8_t dot11mode;
719 tSirScanType scanType;
720 uint32_t scan_id;
721 /**
722 * minChannelTime. Not used if scanType is passive.
723 * 0x0 - Dont Use min channel timer. Only max channel timeout will used.
724 * 11k measurements set this to 0 to user only single duration for scan.
725 * <valid timeout> - Timeout value used for min channel timeout.
726 */
727 uint32_t minChannelTime;
728 /**
729 * maxChannelTime.
730 * 0x0 - Invalid. In case of active scan.
731 * In case of passive scan, MAX( maxChannelTime,
732 * WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME) is used.
733 */
734 uint32_t maxChannelTime;
735 /**
736 * returnAfterFirstMatch can take following values:
737 * 0x00 - Return SCAN_RSP message after complete channel scan
738 * 0x01 - Return SCAN_RSP message after collecting BSS description
739 * that matches scan criteria.
740 * 0xC0 - Return after collecting first 11d IE from 2.4 GHz &
741 * 5 GHz band channels
742 * 0x80 - Return after collecting first 11d IE from 5 GHz band
743 * channels
744 * 0x40 - Return after collecting first 11d IE from 2.4 GHz
745 * band channels
746 *
747 * Values of 0xC0, 0x80 & 0x40 are to be used by
748 * Roaming/application when 11d is enabled.
749 */
750 /* in units of milliseconds, ignored when not connected */
751 uint32_t restTime;
752 uint8_t returnAfterFirstMatch;
753
754 /**
755 * returnUniqueResults can take following values:
756 * 0 - Collect & report all received BSS descriptions from same BSS.
757 * 1 - Collect & report unique BSS description from same BSS.
758 */
759 uint8_t returnUniqueResults;
760
761 /**
762 * returnFreshResults can take following values:
763 * 0x00 - Return background scan results.
764 * 0x80 - Return & purge background scan results
765 * 0x01 - Trigger fresh scan instead of returning background scan
766 * results.
767 * 0x81 - Trigger fresh scan instead of returning background scan
768 * results and purge background scan results.
769 */
770 uint8_t returnFreshResults;
771
772 /* backgroundScanMode can take following values:
773 * 0x0 - agressive scan
774 * 0x1 - normal scan where HAL will check for link traffic
775 * prior to proceeding with the scan
776 */
777 tSirBackgroundScanMode backgroundScanMode;
778
779 uint8_t hiddenSsid;
780
781 /* Number of SSIDs to scan */
782 uint8_t numSsid;
783
784 /* channelList has to be the last member of this structure. Check
785 * tSirChannelList for the reason. This MUST be the last field of the
786 * structure
787 */
788
789 bool p2pSearch;
790 uint16_t uIEFieldLen;
791 uint16_t uIEFieldOffset;
792
793 /* channelList MUST be the last field of this structure */
794 tSirChannelList channelList;
795 /*-----------------------------
796 tSirSmeScanReq....
797 -----------------------------
798 uIEFiledLen
799 -----------------------------
800 uIEFiledOffset ----+
801 ----------------------------- |
802 channelList.numChannels |
803 ----------------------------- |
804 ... variable size up to |
805 channelNumber[numChannels-1] |
806 This can be zero, if |
807 numChannel is zero. |
808 ----------------------------- <--+
809 ... variable size uIEFiled
810 up to uIEFieldLen (can be 0)
811 -----------------------------*/
812} tSirSmeScanReq, *tpSirSmeScanReq;
813
814typedef struct sSirSmeScanAbortReq {
815 uint16_t type;
816 uint16_t msgLen;
817 uint8_t sessionId;
818 uint32_t scan_id;
819} tSirSmeScanAbortReq, *tpSirSmeScanAbortReq;
820
821typedef struct sSirSmeScanChanReq {
822 uint16_t type;
823 uint16_t msgLen;
824 uint8_t sessionId;
825 uint16_t transcationId;
826} tSirSmeGetScanChanReq, *tpSirSmeGetScanChanReq;
827
828#ifdef FEATURE_OEM_DATA_SUPPORT
829
830#ifndef OEM_DATA_REQ_SIZE
831#define OEM_DATA_REQ_SIZE 280
832#endif
833#ifndef OEM_DATA_RSP_SIZE
834#define OEM_DATA_RSP_SIZE 1724
835#endif
836
837typedef struct sSirOemDataReq {
838 uint16_t messageType; /* eWNI_SME_OEM_DATA_REQ */
839 uint16_t messageLen;
840 tSirMacAddr selfMacAddr;
841 uint8_t oemDataReq[OEM_DATA_REQ_SIZE];
842} tSirOemDataReq, *tpSirOemDataReq;
843
844typedef struct sSirOemDataRsp {
845 uint16_t messageType;
846 uint16_t length;
847 uint8_t oemDataRsp[OEM_DATA_RSP_SIZE];
848} tSirOemDataRsp, *tpSirOemDataRsp;
849
850#endif /* FEATURE_OEM_DATA_SUPPORT */
851
852/* / Definition for response message to previously issued scan request */
853typedef struct sSirSmeScanRsp {
854 uint16_t messageType; /* eWNI_SME_SCAN_RSP */
855 uint16_t length;
856 uint8_t sessionId;
857 tSirResultCodes statusCode;
858 uint16_t transcationId;
859 uint32_t scan_id;
860} tSirSmeScanRsp, *tpSirSmeScanRsp;
861
862/* / Definition for join request */
863/* / ---> MAC */
864/* / WARNING! If you add a field in JOIN REQ. */
865/* / Make sure to add it in REASSOC REQ */
866/* / The Serdes function is the same and its */
867/* / shared with REASSOC. So if we add a field */
868/* here and dont add it in REASSOC REQ. It will BREAK!!! REASSOC. */
869typedef struct sSirSmeJoinReq {
870 uint16_t messageType; /* eWNI_SME_JOIN_REQ */
871 uint16_t length;
872 uint8_t sessionId;
873 uint16_t transactionId;
874 tSirMacSSid ssId;
875 tSirMacAddr selfMacAddr; /* self Mac address */
876 tSirBssType bsstype; /* add new type for BT-AMP STA and AP Modules */
877 uint8_t dot11mode; /* to support BT-AMP */
878#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
879 uint8_t cc_switch_mode;
880#endif
881 tCDF_CON_MODE staPersona; /* Persona */
882 ePhyChanBondState cbMode; /* Pass CB mode value in Join. */
883
884 /*This contains the UAPSD Flag for all 4 AC
885 * B0: AC_VO UAPSD FLAG
886 * B1: AC_VI UAPSD FLAG
887 * B2: AC_BK UAPSD FLAG
888 * B3: AC_BE UASPD FLAG
889 */
890 uint8_t uapsdPerAcBitmask;
891
892 tSirMacRateSet operationalRateSet; /* Has 11a or 11b rates */
893 tSirMacRateSet extendedRateSet; /* Has 11g rates */
894 tSirRSNie rsnIE; /* RSN IE to be sent in */
895 /* (Re) Association Request */
896#ifdef FEATURE_WLAN_ESE
897 /* CCMK IE to be included as handler for join and reassoc is */
898 tSirCCKMie cckmIE;
899 /* the same. The join will never carry cckm, but will be set to */
900 /* 0. */
901#endif
902
903 tSirAddie addIEScan; /* Additional IE to be sent in */
904 /* (unicast) Probe Request at the time of join */
905
906 tSirAddie addIEAssoc; /* Additional IE to be sent in */
907 /* (Re) Association Request */
908
909 tAniEdType UCEncryptionType;
910
911 tAniEdType MCEncryptionType;
912
913#ifdef WLAN_FEATURE_11W
914 tAniEdType MgmtEncryptionType;
915#endif
916
917#ifdef WLAN_FEATURE_VOWIFI_11R
918 tAniBool is11Rconnection;
919#endif
920#ifdef FEATURE_WLAN_ESE
921 tAniBool isESEFeatureIniEnabled;
922 tAniBool isESEconnection;
923 tESETspecInfo eseTspecInfo;
924#endif
925
926#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
927 tAniBool isFastTransitionEnabled;
928#endif
929#ifdef FEATURE_WLAN_LFR
930 tAniBool isFastRoamIniFeatureEnabled;
931#endif
932
933 uint8_t txLdpcIniFeatureEnabled;
934 tSirHTConfig htConfig;
935#ifdef WLAN_FEATURE_11AC
936 uint8_t txBFIniFeatureEnabled;
937 uint8_t txBFCsnValue;
938 uint8_t txMuBformee;
939 uint8_t enableVhtpAid;
940 uint8_t enableVhtGid;
941#endif
942 uint8_t enableAmpduPs;
943 uint8_t enableHtSmps;
944 uint8_t htSmps;
945
946 uint8_t isAmsduSupportInAMPDU;
947 tAniBool isWMEenabled;
948 tAniBool isQosEnabled;
949 tAniBool isOSENConnection;
950 tAniBool spectrumMgtIndicator;
951 tSirMacPowerCapInfo powerCap;
952 tSirSupChnl supportedChannels;
953 tSirBssDescription bssDescription;
954
955} tSirSmeJoinReq, *tpSirSmeJoinReq;
956
957/* / Definition for reponse message to previously issued join request */
958/* / MAC ---> */
959typedef struct sSirSmeJoinRsp {
960 uint16_t messageType; /* eWNI_SME_JOIN_RSP */
961 uint16_t length;
962 uint8_t sessionId; /* Session ID */
963 uint16_t transactionId; /* Transaction ID for cmd */
964 tSirResultCodes statusCode;
965 tAniAuthType authType;
966 uint32_t vht_channel_width;
967 /* It holds reasonCode when join fails due to deauth/disassoc frame.
968 * Otherwise it holds status code.
969 */
970 uint16_t protStatusCode;
971 uint16_t aid;
972 uint32_t beaconLength;
973 uint32_t assocReqLength;
974 uint32_t assocRspLength;
975#ifdef WLAN_FEATURE_VOWIFI_11R
976 uint32_t parsedRicRspLen;
977#endif
978#ifdef FEATURE_WLAN_ESE
979 uint32_t tspecIeLen;
980#endif
981 uint32_t staId; /* Station ID for peer */
982
983 /* The DPU signatures will be sent eventually to TL to help it determine
984 * the association to which a packet belongs to
985 * Unicast DPU signature
986 */
987 uint8_t ucastSig;
988
989 /*Broadcast DPU signature */
990 uint8_t bcastSig;
991
992 /*Timing measurement capability */
993 uint8_t timingMeasCap;
994
995#ifdef FEATURE_WLAN_TDLS
996 /* TDLS prohibited and TDLS channel switch prohibited are set as
997 * per ExtCap IE in received assoc/re-assoc response from AP
998 */
999 bool tdls_prohibited;
1000 bool tdls_chan_swit_prohibited;
1001#endif
1002#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
1003 tSirSmeHTProfile HTProfile;
1004#endif
1005 uint8_t frames[1];
1006} tSirSmeJoinRsp, *tpSirSmeJoinRsp;
1007
1008/* / probereq from peer, when wsc is enabled */
1009typedef struct sSirSmeProbereq {
1010 uint16_t messageType;
1011 uint16_t length;
1012 uint8_t sessionId;
1013 tSirMacAddr peerMacAddr;
1014 uint16_t devicePasswdId;
1015} tSirSmeProbeReq, *tpSirSmeProbeReq;
1016
1017typedef struct sSirSmeChanInfo {
1018 uint8_t chan_id;
1019 uint32_t mhz;
1020 uint32_t band_center_freq1;
1021 uint32_t band_center_freq2;
1022 uint32_t info;
1023 uint32_t reg_info_1;
1024 uint32_t reg_info_2;
1025} tSirSmeChanInfo, *tpSirSmeChanInfo;
1026/* / Definition for Association indication from peer */
1027/* / MAC ---> */
1028typedef struct sSirSmeAssocInd {
1029 uint16_t messageType; /* eWNI_SME_ASSOC_IND */
1030 uint16_t length;
1031 uint8_t sessionId;
1032 tSirMacAddr peerMacAddr;
1033 uint16_t aid;
1034 tSirMacAddr bssId; /* Self BSSID */
1035 uint16_t staId; /* Station ID for peer */
1036 uint8_t uniSig; /* DPU signature for unicast packets */
1037 uint8_t bcastSig; /* DPU signature for broadcast packets */
1038 tAniAuthType authType;
1039 tAniSSID ssId; /* SSID used by STA to associate */
1040 tSirWAPIie wapiIE; /* WAPI IE received from peer */
1041 tSirRSNie rsnIE; /* RSN IE received from peer */
1042 /* Additional IE received from peer, which possibly include
1043 * WSC IE and/or P2P IE
1044 */
1045 tSirAddie addIE;
1046
1047 /* powerCap & supportedChannels are present only when */
1048 /* spectrumMgtIndicator flag is set */
1049 tAniBool spectrumMgtIndicator;
1050 tSirMacPowerCapInfo powerCap;
1051 tSirSupChnl supportedChannels;
1052 tAniBool wmmEnabledSta; /* if present - STA is WMM enabled */
1053 tAniBool reassocReq;
1054 /* Required for indicating the frames to upper layer */
1055 uint32_t beaconLength;
1056 uint8_t *beaconPtr;
1057 uint32_t assocReqLength;
1058 uint8_t *assocReqPtr;
1059
1060 /* Timing measurement capability */
1061 uint8_t timingMeasCap;
1062 tSirSmeChanInfo chan_info;
1063} tSirSmeAssocInd, *tpSirSmeAssocInd;
1064
1065/* / Definition for Association confirm */
1066/* / ---> MAC */
1067typedef struct sSirSmeAssocCnf {
1068 uint16_t messageType; /* eWNI_SME_ASSOC_CNF */
1069 uint16_t length;
1070 tSirResultCodes statusCode;
1071 tSirMacAddr bssId; /* Self BSSID */
1072 tSirMacAddr peerMacAddr;
1073 uint16_t aid;
1074 tSirMacAddr alternateBssId;
1075 uint8_t alternateChannelId;
1076} tSirSmeAssocCnf, *tpSirSmeAssocCnf;
1077
1078/* / Enum definition for Wireless medium status change codes */
1079typedef enum eSirSmeStatusChangeCode {
1080 eSIR_SME_DEAUTH_FROM_PEER,
1081 eSIR_SME_DISASSOC_FROM_PEER,
1082 eSIR_SME_LOST_LINK_WITH_PEER,
1083 eSIR_SME_CHANNEL_SWITCH,
1084 eSIR_SME_JOINED_NEW_BSS,
1085 eSIR_SME_LEAVING_BSS,
1086 eSIR_SME_IBSS_ACTIVE,
1087 eSIR_SME_IBSS_INACTIVE,
1088 eSIR_SME_IBSS_PEER_DEPARTED,
1089 eSIR_SME_RADAR_DETECTED,
1090 eSIR_SME_IBSS_NEW_PEER,
1091 eSIR_SME_AP_CAPS_CHANGED,
1092} tSirSmeStatusChangeCode;
1093
1094typedef struct sSirSmeNewBssInfo {
1095 tSirMacAddr bssId;
1096 uint8_t channelNumber;
1097 uint8_t reserved;
1098 tSirMacSSid ssId;
1099} tSirSmeNewBssInfo, *tpSirSmeNewBssInfo;
1100
1101typedef struct sSirSmeApNewCaps {
1102 uint16_t capabilityInfo;
1103 tSirMacAddr bssId;
1104 uint8_t channelId;
1105 uint8_t reserved[3];
1106 tSirMacSSid ssId;
1107} tSirSmeApNewCaps, *tpSirSmeApNewCaps;
1108
1109/**
1110 * Table below indicates what information is passed for each of
1111 * the Wireless Media status change notifications:
1112 *
1113 * Status Change code Status change info
1114 * ----------------------------------------------------------------------
1115 * eSIR_SME_DEAUTH_FROM_PEER Reason code received in DEAUTH frame
1116 * eSIR_SME_DISASSOC_FROM_PEER Reason code received in DISASSOC frame
1117 * eSIR_SME_LOST_LINK_WITH_PEER None
1118 * eSIR_SME_CHANNEL_SWITCH New channel number
1119 * eSIR_SME_JOINED_NEW_BSS BSSID, SSID and channel number
1120 * eSIR_SME_LEAVING_BSS None
1121 * eSIR_SME_IBSS_ACTIVE Indicates that another STA joined
1122 * IBSS apart from this STA that
1123 * started IBSS
1124 * eSIR_SME_IBSS_INACTIVE Indicates that only this STA is left
1125 * in IBSS
1126 * eSIR_SME_RADAR_DETECTED Indicates that radar is detected
1127 * eSIR_SME_IBSS_NEW_PEER Indicates that a new peer is detected
1128 * eSIR_SME_AP_CAPS_CHANGED Indicates that capabilities of the AP
1129 * that STA is currently associated with
1130 * have changed.
1131 */
1132
1133/* / Definition for Wireless medium status change notification */
1134typedef struct sSirSmeWmStatusChangeNtf {
1135 uint16_t messageType; /* eWNI_SME_WM_STATUS_CHANGE_NTF */
1136 uint16_t length;
1137 uint8_t sessionId; /* Session ID */
1138 tSirSmeStatusChangeCode statusChangeCode;
1139 tSirMacAddr bssId; /* Self BSSID */
1140 union {
1141 uint16_t deAuthReasonCode; /* eSIR_SME_DEAUTH_FROM_PEER */
1142 /* eSIR_SME_DISASSOC_FROM_PEER */
1143 uint16_t disassocReasonCode;
1144 /* none for eSIR_SME_LOST_LINK_WITH_PEER */
1145 uint8_t newChannelId; /* eSIR_SME_CHANNEL_SWITCH */
1146 tSirSmeNewBssInfo newBssInfo; /* eSIR_SME_JOINED_NEW_BSS */
1147 /* none for eSIR_SME_LEAVING_BSS */
1148 /* none for eSIR_SME_IBSS_ACTIVE */
1149 /* none for eSIR_SME_IBSS_INACTIVE */
1150 /* eSIR_SME_IBSS_NEW_PEER */
1151 tSirNewIbssPeerInfo newIbssPeerInfo;
1152 tSirSmeApNewCaps apNewCaps; /* eSIR_SME_AP_CAPS_CHANGED */
1153 } statusChangeInfo;
1154} tSirSmeWmStatusChangeNtf, *tpSirSmeWmStatusChangeNtf;
1155
1156/* Definition for Disassociation request */
1157typedef struct sSirSmeDisassocReq {
1158 uint16_t messageType; /* eWNI_SME_DISASSOC_REQ */
1159 uint16_t length;
1160 uint8_t sessionId; /* Session ID */
1161 uint16_t transactionId; /* Transaction ID for cmd */
1162 tSirMacAddr bssId; /* Peer BSSID */
1163 tSirMacAddr peerMacAddr;
1164 uint16_t reasonCode;
1165 /* This flag tells LIM whether to send the disassoc OTA or not */
1166 /* This will be set in while handing off from one AP to other */
1167 uint8_t doNotSendOverTheAir;
1168} cdf_packed tSirSmeDisassocReq, *tpSirSmeDisassocReq;
1169
1170/* / Definition for Tkip countermeasures request */
1171typedef struct sSirSmeTkipCntrMeasReq {
1172 uint16_t messageType; /* eWNI_SME_DISASSOC_REQ */
1173 uint16_t length;
1174 uint8_t sessionId; /* Session ID */
1175 uint16_t transactionId; /* Transaction ID for cmd */
1176 tSirMacAddr bssId; /* Peer BSSID */
1177 bool bEnable; /* Start/stop countermeasures */
1178} cdf_packed tSirSmeTkipCntrMeasReq, *tpSirSmeTkipCntrMeasReq;
1179
1180typedef struct sAni64BitCounters {
1181 uint32_t Hi;
1182 uint32_t Lo;
1183} tAni64BitCounters, *tpAni64BitCounters;
1184
1185typedef struct sAniSecurityStat {
1186 tAni64BitCounters txBlks;
1187 tAni64BitCounters rxBlks;
1188 tAni64BitCounters formatErrorCnt;
1189 tAni64BitCounters decryptErr;
1190 tAni64BitCounters protExclCnt;
1191 tAni64BitCounters unDecryptableCnt;
1192 tAni64BitCounters decryptOkCnt;
1193
1194} tAniSecurityStat, *tpAniSecurityStat;
1195
1196typedef struct sAniTxRxStats {
1197 tAni64BitCounters txFrames;
1198 tAni64BitCounters rxFrames;
1199 tAni64BitCounters nRcvBytes;
1200 tAni64BitCounters nXmitBytes;
1201
1202} tAniTxRxStats, *tpAniTxRxStats;
1203
1204typedef struct sAniSecStats {
1205 tAniSecurityStat aes;
1206 tAni64BitCounters aesReplays;
1207 tAniSecurityStat tkip;
1208 tAni64BitCounters tkipReplays;
1209 tAni64BitCounters tkipMicError;
1210
1211 tAniSecurityStat wep;
1212#if defined(FEATURE_WLAN_WAPI) && !defined(LIBRA_WAPI_SUPPORT)
1213 tAniSecurityStat wpi;
1214 tAni64BitCounters wpiReplays;
1215 tAni64BitCounters wpiMicError;
1216#endif
1217} tAniSecStats, *tpAniSecStats;
1218
1219#define SIR_MAX_RX_CHAINS 3
1220
1221typedef struct sAniStaStatStruct {
1222 /* following statistic elements till expandPktRxCntLo are not filled
1223 * with valid data. These are kept as it is, since WSM is using this
1224 * structure. These elements can be removed whenever WSM is updated.
1225 * Phystats is used to hold phystats from BD.
1226 */
1227 uint32_t sentAesBlksUcastHi;
1228 uint32_t sentAesBlksUcastLo;
1229 uint32_t recvAesBlksUcastHi;
1230 uint32_t recvAesBlksUcastLo;
1231 uint32_t aesFormatErrorUcastCnts;
1232 uint32_t aesReplaysUcast;
1233 uint32_t aesDecryptErrUcast;
1234 uint32_t singleRetryPkts;
1235 uint32_t failedTxPkts;
1236 uint32_t ackTimeouts;
1237 uint32_t multiRetryPkts;
1238 uint32_t fragTxCntsHi;
1239 uint32_t fragTxCntsLo;
1240 uint32_t transmittedPktsHi;
1241 uint32_t transmittedPktsLo;
1242 uint32_t phyStatHi; /* These are used to fill in the phystats. */
1243 uint32_t phyStatLo; /* This is only for private use. */
1244
1245 uint32_t uplinkRssi;
1246 uint32_t uplinkSinr;
1247 uint32_t uplinkRate;
1248 uint32_t downlinkRssi;
1249 uint32_t downlinkSinr;
1250 uint32_t downlinkRate;
1251 uint32_t nRcvBytes;
1252 uint32_t nXmitBytes;
1253
1254 /*
1255 * Following elements are valid and filled in correctly. They have
1256 * valid values.
1257 */
1258
1259 /* Unicast frames and bytes. */
1260 tAniTxRxStats ucStats;
1261
1262 /* Broadcast frames and bytes. */
1263 tAniTxRxStats bcStats;
1264
1265 /* Multicast frames and bytes. */
1266 tAniTxRxStats mcStats;
1267
1268 uint32_t currentTxRate;
1269 uint32_t currentRxRate; /* Rate in 100Kbps */
1270
1271 uint32_t maxTxRate;
1272 uint32_t maxRxRate;
1273
1274 int8_t rssi[SIR_MAX_RX_CHAINS];
1275
1276 tAniSecStats securityStats;
1277
1278 uint8_t currentRxRateIdx; /* This the softmac rate Index. */
1279 uint8_t currentTxRateIdx;
1280
1281} tAniStaStatStruct, *tpAniStaStatStruct;
1282
1283typedef enum sPacketType {
1284 ePACKET_TYPE_UNKNOWN,
1285 ePACKET_TYPE_11A,
1286 ePACKET_TYPE_11G,
1287 ePACKET_TYPE_11B,
1288 ePACKET_TYPE_11N
1289} tPacketType, *tpPacketType;
1290
1291/* / Definition for Disassociation response */
1292typedef struct sSirSmeDisassocRsp {
1293 uint16_t messageType; /* eWNI_SME_DISASSOC_RSP */
1294 uint16_t length;
1295 uint8_t sessionId; /* Session ID */
1296 uint16_t transactionId; /* Transaction ID for cmd */
1297 tSirResultCodes statusCode;
1298 tSirMacAddr peerMacAddr;
1299 tAniStaStatStruct perStaStats; /* STA stats */
1300 uint16_t staId;
1301} cdf_packed tSirSmeDisassocRsp, *tpSirSmeDisassocRsp;
1302
1303/* / Definition for Disassociation indication from peer */
1304typedef struct sSirSmeDisassocInd {
1305 uint16_t messageType; /* eWNI_SME_DISASSOC_IND */
1306 uint16_t length;
1307 uint8_t sessionId; /* Session Identifier */
1308 uint16_t transactionId; /* Transaction Identifier with PE */
1309 tSirResultCodes statusCode;
1310 tSirMacAddr bssId;
1311 tSirMacAddr peerMacAddr;
1312 tAniStaStatStruct perStaStats; /* STA stats */
1313 uint16_t staId;
1314 uint32_t reasonCode;
1315} tSirSmeDisassocInd, *tpSirSmeDisassocInd;
1316
1317/* / Definition for Disassociation confirm */
1318/* / MAC ---> */
1319typedef struct sSirSmeDisassocCnf {
1320 uint16_t messageType; /* eWNI_SME_DISASSOC_CNF */
1321 uint16_t length;
1322 tSirResultCodes statusCode;
1323 tSirMacAddr bssId;
1324 tSirMacAddr peerMacAddr;
1325} tSirSmeDisassocCnf, *tpSirSmeDisassocCnf,
1326 tSirSmeDeauthCnf, *tpSirSmeDeauthCnf;
1327
1328/* / Definition for Deauthetication request */
1329typedef struct sSirSmeDeauthReq {
1330 uint16_t messageType; /* eWNI_SME_DEAUTH_REQ */
1331 uint16_t length;
1332 uint8_t sessionId; /* Session ID */
1333 uint16_t transactionId; /* Transaction ID for cmd */
1334 tSirMacAddr bssId; /* AP BSSID */
1335 tSirMacAddr peerMacAddr;
1336 uint16_t reasonCode;
1337} tSirSmeDeauthReq, *tpSirSmeDeauthReq;
1338
1339/* / Definition for Deauthetication response */
1340typedef struct sSirSmeDeauthRsp {
1341 uint16_t messageType; /* eWNI_SME_DEAUTH_RSP */
1342 uint16_t length;
1343 uint8_t sessionId; /* Session ID */
1344 uint16_t transactionId; /* Transaction ID for cmd */
1345 tSirResultCodes statusCode;
1346 tSirMacAddr peerMacAddr;
1347} tSirSmeDeauthRsp, *tpSirSmeDeauthRsp;
1348
1349/* / Definition for Deauthetication indication from peer */
1350typedef struct sSirSmeDeauthInd {
1351 uint16_t messageType; /* eWNI_SME_DEAUTH_IND */
1352 uint16_t length;
1353 uint8_t sessionId; /* Added for BT-AMP */
1354 uint16_t transactionId; /* Added for BT-AMP */
1355 tSirResultCodes statusCode;
1356 tSirMacAddr bssId; /* AP BSSID */
1357 tSirMacAddr peerMacAddr;
1358
1359 uint16_t staId;
1360 uint32_t reasonCode;
1361} tSirSmeDeauthInd, *tpSirSmeDeauthInd;
1362
1363/* / Definition for stop BSS request message */
1364typedef struct sSirSmeStopBssReq {
1365 uint16_t messageType; /* eWNI_SME_STOP_BSS_REQ */
1366 uint16_t length;
1367 uint8_t sessionId; /* Session ID */
1368 uint16_t transactionId; /* tranSaction ID for cmd */
1369 tSirResultCodes reasonCode;
1370 tSirMacAddr bssId; /* Self BSSID */
1371} tSirSmeStopBssReq, *tpSirSmeStopBssReq;
1372
1373/* / Definition for stop BSS response message */
1374typedef struct sSirSmeStopBssRsp {
1375 uint16_t messageType; /* eWNI_SME_STOP_BSS_RSP */
1376 uint16_t length;
1377 tSirResultCodes statusCode;
1378 uint8_t sessionId; /* Session ID */
1379 uint16_t transactionId; /* Transaction ID for cmd */
1380} tSirSmeStopBssRsp, *tpSirSmeStopBssRsp;
1381
1382/* / Definition for Channel Switch indication for station */
1383/* / MAC ---> */
1384typedef struct sSirSmeSwitchChannelInd {
1385 uint16_t messageType; /* eWNI_SME_SWITCH_CHL_IND */
1386 uint16_t length;
1387 uint8_t sessionId;
1388 uint16_t newChannelId;
1389 tSirMacAddr bssId; /* BSSID */
1390} tSirSmeSwitchChannelInd, *tpSirSmeSwitchChannelInd;
1391
1392/* / Definition for Neighbor BSS indication */
1393/* / MAC ---> */
1394/* / MAC reports this each time a new I/BSS is detected */
1395typedef struct sSirSmeNeighborBssInd {
1396 uint16_t messageType; /* eWNI_SME_NEIGHBOR_BSS_IND */
1397 uint16_t length;
1398 uint8_t sessionId;
1399 tSirBssDescription bssDescription[1];
1400} tSirSmeNeighborBssInd, *tpSirSmeNeighborBssInd;
1401
1402/* / Definition for MIC failure indication */
1403/* / MAC ---> */
1404/* / MAC reports this each time a MIC failure occures on Rx TKIP packet */
1405typedef struct sSirSmeMicFailureInd {
1406 uint16_t messageType; /* eWNI_SME_MIC_FAILURE_IND */
1407 uint16_t length;
1408 uint8_t sessionId;
1409 tSirMacAddr bssId; /* BSSID */
1410 tSirMicFailureInfo info;
1411} tSirSmeMicFailureInd, *tpSirSmeMicFailureInd;
1412
1413typedef struct sSirSmeMissedBeaconInd {
1414 uint16_t messageType; /* eWNI_SME_MISSED_BEACON_IND */
1415 uint16_t length;
1416 uint8_t bssIdx;
1417} tSirSmeMissedBeaconInd, *tpSirSmeMissedBeaconInd;
1418
1419/* / Definition for Set Context request */
1420/* / ---> MAC */
1421typedef struct sSirSmeSetContextReq {
1422 uint16_t messageType; /* eWNI_SME_SET_CONTEXT_REQ */
1423 uint16_t length;
1424 uint8_t sessionId; /* Session ID */
1425 uint16_t transactionId; /* Transaction ID for cmd */
1426 tSirMacAddr peerMacAddr;
1427 tSirMacAddr bssId; /* BSSID */
1428 tSirKeyMaterial keyMaterial;
1429} tSirSmeSetContextReq, *tpSirSmeSetContextReq;
1430
1431/* / Definition for Set Context response */
1432/* / MAC ---> */
1433typedef struct sSirSmeSetContextRsp {
1434 uint16_t messageType; /* eWNI_SME_SET_CONTEXT_RSP */
1435 uint16_t length;
1436 uint8_t sessionId; /* Session ID */
1437 uint16_t transactionId; /* Transaction ID for cmd */
1438 tSirResultCodes statusCode;
1439 tSirMacAddr peerMacAddr;
1440} tSirSmeSetContextRsp, *tpSirSmeSetContextRsp;
1441
1442/* / Statistic definitions */
1443/* ============================================================= */
1444/* Per STA statistic structure; This same struct will be used for Aggregate */
1445/* STA stats as well. */
1446
1447/* Clear radio stats and clear per sta stats */
1448typedef enum {
1449 eANI_CLEAR_ALL_STATS, /* Clears all stats */
1450 eANI_CLEAR_RX_STATS, /* Clears RX stats of the radio interface */
1451 eANI_CLEAR_TX_STATS, /* Clears TX stats of the radio interface */
1452 eANI_CLEAR_RADIO_STATS, /* Clears all the radio stats */
1453 eANI_CLEAR_PER_STA_STATS, /* Clears Per STA stats */
1454 eANI_CLEAR_AGGR_PER_STA_STATS, /* Clears aggregate stats */
1455
1456 /* Used to distinguish between per sta to security stats. */
1457 /* Used only by AP, FW just returns the same param as it received. */
1458 eANI_LINK_STATS, /* Get Per STA stats */
1459 eANI_SECURITY_STATS, /* Get Per STA security stats */
1460
1461 eANI_CLEAR_STAT_TYPES_END
1462} tAniStatSubTypes;
1463
1464typedef struct sAniTxCtrs {
1465 /* add the rate counters here */
1466 uint32_t tx1Mbps;
1467 uint32_t tx2Mbps;
1468 uint32_t tx5_5Mbps;
1469 uint32_t tx6Mbps;
1470 uint32_t tx9Mbps;
1471 uint32_t tx11Mbps;
1472 uint32_t tx12Mbps;
1473 uint32_t tx18Mbps;
1474 uint32_t tx24Mbps;
1475 uint32_t tx36Mbps;
1476 uint32_t tx48Mbps;
1477 uint32_t tx54Mbps;
1478 uint32_t tx72Mbps;
1479 uint32_t tx96Mbps;
1480 uint32_t tx108Mbps;
1481
1482 /* tx path radio counts */
1483 uint32_t txFragHi;
1484 uint32_t txFragLo;
1485 uint32_t txFrameHi;
1486 uint32_t txFrameLo;
1487 uint32_t txMulticastFrameHi;
1488 uint32_t txMulticastFrameLo;
1489 uint32_t txFailedHi;
1490 uint32_t txFailedLo;
1491 uint32_t multipleRetryHi;
1492 uint32_t multipleRetryLo;
1493 uint32_t singleRetryHi;
1494 uint32_t singleRetryLo;
1495 uint32_t ackFailureHi;
1496 uint32_t ackFailureLo;
1497 uint32_t xmitBeacons;
1498} tAniTxCtrs, *tpAniTxCtrs;
1499
1500typedef struct sAniRxCtrs {
1501 /* receive frame rate counters */
1502 uint32_t rx1Mbps;
1503 uint32_t rx2Mbps;
1504 uint32_t rx5_5Mbps;
1505 uint32_t rx6Mbps;
1506 uint32_t rx9Mbps;
1507 uint32_t rx11Mbps;
1508 uint32_t rx12Mbps;
1509 uint32_t rx18Mbps;
1510 uint32_t rx24Mbps;
1511 uint32_t rx36Mbps;
1512 uint32_t rx48Mbps;
1513 uint32_t rx54Mbps;
1514 uint32_t rx72Mbps;
1515 uint32_t rx96Mbps;
1516 uint32_t rx108Mbps;
1517
1518 /* receive size counters; 'Lte' = Less than or equal to */
1519 uint32_t rxLte64;
1520 uint32_t rxLte128Gt64;
1521 uint32_t rxLte256Gt128;
1522 uint32_t rxLte512Gt256;
1523 uint32_t rxLte1kGt512;
1524 uint32_t rxLte1518Gt1k;
1525 uint32_t rxLte2kGt1518;
1526 uint32_t rxLte4kGt2k;
1527
1528 /* rx radio stats */
1529 uint32_t rxFrag;
1530 uint32_t rxFrame;
1531 uint32_t fcsError;
1532 uint32_t rxMulticast;
1533 uint32_t duplicate;
1534 uint32_t rtsSuccess;
1535 uint32_t rtsFailed;
1536 uint32_t wepUndecryptables;
1537 uint32_t drops;
1538 uint32_t aesFormatErrorUcastCnts;
1539 uint32_t aesReplaysUcast;
1540 uint32_t aesDecryptErrUcast;
1541} tAniRxCtrs, *tpAniRxCtrs;
1542
1543/* Get Radio Stats request structure */
1544/* This structure shall be used for both Radio stats and Aggregate stats */
1545/* A valid request must contain entire structure with/without valid fields. */
1546/* Based on the request type, the valid fields will be checked. */
1547typedef struct sAniGetStatsReq {
1548 /* Common for all types are requests */
1549 uint16_t msgType; /* message type is same as the request type */
1550 uint16_t msgLen; /* length of the entire request */
1551 uint8_t sessionId; /* Session ID */
1552 uint16_t transactionId;
1553 tSirMacAddr bssId; /* BSSID */
1554 /* only used for clear stats and per sta stats clear */
1555 tAniStatSubTypes stat; /* Clears the stats of the described types. */
1556 uint32_t staId; /* Per STA stats request must contain valid */
1557 /* values */
1558 tSirMacAddr macAddr;
1559} tAniGetStatsReq, *tpAniGetStatsReq;
1560
1561/* *************************************************************** */
1562
1563/*******************PE Statistics*************************/
1564
1565/*
1566 * tpAniGetPEStatsReq is tied to
1567 * for SME ==> PE eWNI_SME_GET_STATISTICS_REQ msgId and
1568 * for PE ==> HAL SIR_HAL_GET_STATISTICS_REQ msgId
1569 */
1570typedef struct sAniGetPEStatsReq {
1571 /* Common for all types are requests */
1572 uint16_t msgType; /* message type is same as the request type */
1573 uint16_t msgLen; /* length of the entire request */
1574 uint32_t staId; /* Per STA stats request must contain valid */
1575 /* categories of stats requested. look at ePEStatsMask */
1576 uint32_t statsMask;
1577 uint8_t sessionId;
1578} tAniGetPEStatsReq, *tpAniGetPEStatsReq;
1579
1580/*
1581 * tpAniGetPEStatsRsp is tied to
1582 * for PE ==> SME eWNI_SME_GET_STATISTICS_RSP msgId and
1583 * for HAL ==> PE SIR_HAL_GET_STATISTICS_RSP msgId
1584 */
1585typedef struct sAniGetPEStatsRsp {
1586 /* Common for all types are responses */
1587 uint16_t msgType; /* message type is same as the request type */
1588 /* length of the entire request, includes the pStatsBuf length too */
1589 uint16_t msgLen;
1590 uint8_t sessionId;
1591 uint32_t rc; /* success/failure */
1592 uint32_t staId; /* Per STA stats request must contain valid */
1593 /* categories of stats requested. look at ePEStatsMask */
1594 uint32_t statsMask;
1595 /* void *pStatsBuf; */
1596 /*
1597 * The Stats buffer starts here and can be an aggregate of more than one
1598 * statistics structure depending on statsMask. The void pointer
1599 * "pStatsBuf" is commented out intentionally and the src code that uses
1600 * this structure should take that into account.
1601 */
1602} tAniGetPEStatsRsp, *tpAniGetPEStatsRsp;
1603
1604typedef struct sAniGetRssiReq {
1605 /* Common for all types are requests */
1606 uint16_t msgType; /* message type is same as the request type */
1607 uint16_t msgLen; /* length of the entire request */
1608 uint8_t sessionId;
1609 uint8_t staId;
1610 int8_t lastRSSI; /* in case of error, return last RSSI */
1611 void *rssiCallback;
1612 void *pDevContext; /* device context */
1613 void *p_cds_context; /* cds context */
1614
1615} tAniGetRssiReq, *tpAniGetRssiReq;
1616
1617typedef struct sAniGetSnrReq {
1618 /* Common for all types are requests */
1619 uint16_t msgType; /* message type is same as the request type */
1620 uint16_t msgLen; /* length of the entire request */
1621 uint8_t sessionId;
1622 uint8_t staId;
1623 void *snrCallback;
1624 void *pDevContext; /* device context */
1625 int8_t snr;
1626} tAniGetSnrReq, *tpAniGetSnrReq;
1627
1628#if defined(FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_ESE_UPLOAD)
1629typedef struct sSirTsmIE {
1630 uint8_t tsid;
1631 uint8_t state;
1632 uint16_t msmt_interval;
1633} tSirTsmIE, *tpSirTsmIE;
1634typedef struct sSirSmeTsmIEInd {
1635 tSirTsmIE tsmIe;
1636 uint8_t sessionId;
1637} tSirSmeTsmIEInd, *tpSirSmeTsmIEInd;
1638typedef struct sAniTrafStrmMetrics {
1639 uint16_t UplinkPktQueueDly;
1640 uint16_t UplinkPktQueueDlyHist[4];
1641 uint32_t UplinkPktTxDly;
1642 uint16_t UplinkPktLoss;
1643 uint16_t UplinkPktCount;
1644 uint8_t RoamingCount;
1645 uint16_t RoamingDly;
1646} tAniTrafStrmMetrics, *tpAniTrafStrmMetrics;
1647typedef struct sAniGetTsmStatsReq {
1648 /* Common for all types are requests */
1649 uint16_t msgType; /* message type is same as the request type */
1650 uint16_t msgLen; /* length of the entire request */
1651 uint8_t staId;
1652 uint8_t tid; /* traffic id */
1653 tSirMacAddr bssId;
1654 void *tsmStatsCallback;
1655 void *pDevContext; /* device context */
1656 void *p_cds_context; /* cds context */
1657} tAniGetTsmStatsReq, *tpAniGetTsmStatsReq;
1658typedef struct sAniGetTsmStatsRsp {
1659 /* Common for all types are responses */
1660 uint16_t msgType; /*
1661 * message type is same as
1662 * the request type
1663 */
1664 uint16_t msgLen; /*
1665 * length of the entire request,
1666 * includes the pStatsBuf length too
1667 */
1668 uint8_t sessionId;
1669 uint32_t rc; /* success/failure */
1670 uint32_t staId; /*
1671 * Per STA stats request must
1672 * contain valid
1673 */
1674 tAniTrafStrmMetrics tsmMetrics;
1675 void *tsmStatsReq; /* tsm stats request backup */
1676} tAniGetTsmStatsRsp, *tpAniGetTsmStatsRsp;
1677
1678typedef struct sSirEseBcnReportBssInfo {
1679 tBcnReportFields bcnReportFields;
1680 uint8_t ieLen;
1681 uint8_t *pBuf;
1682} tSirEseBcnReportBssInfo, *tpSirEseBcnReportBssInfo;
1683
1684typedef struct sSirEseBcnReportRsp {
1685 uint16_t measurementToken;
1686 uint8_t flag; /* Flag to report measurement done and more data */
1687 uint8_t numBss;
1688 tSirEseBcnReportBssInfo bcnRepBssInfo[SIR_BCN_REPORT_MAX_BSS_DESC];
1689} tSirEseBcnReportRsp, *tpSirEseBcnReportRsp;
1690
1691#endif /* FEATURE_WLAN_ESE || FEATURE_WLAN_ESE_UPLOAD */
1692
1693/* Change country code request MSG structure */
1694typedef struct sAniChangeCountryCodeReq {
1695 /* Common for all types are requests */
1696 uint16_t msgType; /* message type is same as the request type */
1697 uint16_t msgLen; /* length of the entire request */
1698 uint8_t countryCode[WNI_CFG_COUNTRY_CODE_LEN]; /* 3 char country code */
1699 tAniBool countryFromUserSpace;
1700 tAniBool sendRegHint; /* true if we want to send hint to NL80211 */
1701 void *changeCCCallback;
1702 void *pDevContext; /* device context */
1703 void *p_cds_context; /* cds context */
1704
1705} tAniChangeCountryCodeReq, *tpAniChangeCountryCodeReq;
1706
1707/**
1708 * struct ani_scan_req - Scan request
1709 * @msg_type: Message type
1710 * @msg_len: Message Length
1711 * @session_id: SME session Id
1712 * @scan_param: scan request parameter
1713 * @callback: call back function for scan result
1714 * @ctx: Global context
1715 *
1716 * Scan request message structure
1717 */
1718struct ani_scan_req {
1719 /* message type is same as the request type */
1720 uint16_t msg_type;
1721 /* length of the entire request */
1722 uint16_t msg_len;
1723 uint16_t session_id;
1724 void *scan_param;
1725 void *callback;
1726 void *ctx;
1727};
1728
1729/**
1730 * struct ani_roc_req - Remain on channel request
1731 * @msg_type: Message type
1732 * @msg_len: Message Length
1733 * @session_id: SME session Id
1734 * @channel: channel number
1735 * @callback: call back function for scan result
1736 * @duration: Roc duration
1737 * @is_p2pprobe_allowed : flag for p2p probe request
1738 * @ctx: Global context
1739 * @scan_id: Scan Identifier
1740 *
1741 * Remain on channel request message structure
1742 */
1743struct ani_roc_req {
1744 /* message type is same as the request type */
1745 uint16_t msg_type;
1746 /* length of the entire request */
1747 uint16_t msg_len;
1748 uint16_t session_id;
1749 uint8_t channel;
1750 uint32_t duration;
1751 uint8_t is_p2pprobe_allowed;
1752 void *callback;
1753 void *ctx;
1754 uint32_t scan_id;
1755};
1756
1757/* generic country code change request MSG structure */
1758typedef struct sAniGenericChangeCountryCodeReq {
1759 /* Common for all types are requests */
1760 uint16_t msgType; /* message type is same as the request type */
1761 uint16_t msgLen; /* length of the entire request */
1762 uint8_t countryCode[WNI_CFG_COUNTRY_CODE_LEN]; /* 3 char country code */
1763 uint16_t domain_index;
1764} tAniGenericChangeCountryCodeReq, *tpAniGenericChangeCountryCodeReq;
1765
1766typedef struct sAniDHCPStopInd {
1767 uint16_t msgType; /* message type is same as the request type */
1768 uint16_t msgLen; /* length of the entire request */
1769 uint8_t device_mode; /* Mode of the device(ex:STA, AP) */
1770 tSirMacAddr adapterMacAddr; /* MAC address of the adapter */
1771 tSirMacAddr peerMacAddr; /* MAC address of the connected peer */
1772
1773} tAniDHCPInd, *tpAniDHCPInd;
1774
1775typedef enum eTxRateInfo {
1776 eHAL_TX_RATE_LEGACY = 0x1, /* Legacy rates */
1777 eHAL_TX_RATE_HT20 = 0x2, /* HT20 rates */
1778 eHAL_TX_RATE_HT40 = 0x4, /* HT40 rates */
1779 eHAL_TX_RATE_SGI = 0x8, /* Rate with Short guard interval */
1780 eHAL_TX_RATE_LGI = 0x10, /* Rate with Long guard interval */
1781 eHAL_TX_RATE_VHT20 = 0x20, /* VHT 20 rates */
1782 eHAL_TX_RATE_VHT40 = 0x40, /* VHT 40 rates */
1783 eHAL_TX_RATE_VHT80 = 0x80 /* VHT 80 rates */
1784} tTxrateinfoflags;
1785
1786/**********************PE Statistics end*************************/
1787
1788typedef struct sSirP2PNoaStart {
1789 uint32_t status;
1790 uint32_t bssIdx;
1791} tSirP2PNoaStart, *tpSirP2PNoaStart;
1792
1793typedef struct sSirTdlsInd {
1794 uint16_t status;
1795 uint16_t assocId;
1796 uint16_t staIdx;
1797 uint16_t reasonCode;
1798} tSirTdlsInd, *tpSirTdlsInd;
1799
1800typedef struct sSirP2PNoaAttr {
1801#ifdef ANI_BIG_BYTE_ENDIAN
1802 uint32_t index:8;
1803 uint32_t oppPsFlag:1;
1804 uint32_t ctWin:7;
1805 uint32_t rsvd1:16;
1806#else
1807 uint32_t rsvd1:16;
1808 uint32_t ctWin:7;
1809 uint32_t oppPsFlag:1;
1810 uint32_t index:8;
1811#endif
1812
1813#ifdef ANI_BIG_BYTE_ENDIAN
1814 uint32_t uNoa1IntervalCnt:8;
1815 uint32_t rsvd2:24;
1816#else
1817 uint32_t rsvd2:24;
1818 uint32_t uNoa1IntervalCnt:8;
1819#endif
1820 uint32_t uNoa1Duration;
1821 uint32_t uNoa1Interval;
1822 uint32_t uNoa1StartTime;
1823
1824#ifdef ANI_BIG_BYTE_ENDIAN
1825 uint32_t uNoa2IntervalCnt:8;
1826 uint32_t rsvd3:24;
1827#else
1828 uint32_t rsvd3:24;
1829 uint32_t uNoa2IntervalCnt:8;
1830#endif
1831 uint32_t uNoa2Duration;
1832 uint32_t uNoa2Interval;
1833 uint32_t uNoa2StartTime;
1834} tSirP2PNoaAttr, *tpSirP2PNoaAttr;
1835
1836typedef struct sSirTclasInfo {
1837 tSirMacTclasIE tclas;
1838 uint8_t version; /* applies only for classifier type ip */
1839 union {
1840 tSirMacTclasParamEthernet eth;
1841 tSirMacTclasParamIPv4 ipv4;
1842 tSirMacTclasParamIPv6 ipv6;
1843 tSirMacTclasParam8021dq t8021dq;
1844 } cdf_packed tclasParams;
1845} cdf_packed tSirTclasInfo;
1846
1847#if defined(FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_ESE_UPLOAD)
1848#define TSRS_11AG_RATE_6MBPS 0xC
1849#define TSRS_11B_RATE_5_5MBPS 0xB
1850typedef struct sSirMacESETSRSIE {
1851 uint8_t tsid;
1852 uint8_t rates[8];
1853} tSirMacESETSRSIE;
1854typedef struct sSirMacESETSMIE {
1855 uint8_t tsid;
1856 uint8_t state;
1857 uint16_t msmt_interval;
1858} tSirMacESETSMIE;
1859typedef struct sTSMStats {
1860 uint8_t tid;
1861 tSirMacAddr bssId;
1862 tTrafStrmMetrics tsmMetrics;
1863} tTSMStats, *tpTSMStats;
1864typedef struct sEseTSMContext {
1865 uint8_t tid;
1866 tSirMacESETSMIE tsmInfo;
1867 tTrafStrmMetrics tsmMetrics;
1868} tEseTSMContext, *tpEseTSMContext;
1869typedef struct sEsePEContext {
1870 tEseTSMContext tsm;
1871} tEsePEContext, *tpEsePEContext;
1872#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
1873
1874typedef struct sSirAddtsReqInfo {
1875 uint8_t dialogToken;
1876 tSirMacTspecIE tspec;
1877
1878 uint8_t numTclas; /* number of Tclas elements */
1879 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
1880 uint8_t tclasProc;
1881#if defined(FEATURE_WLAN_ESE)
1882 tSirMacESETSRSIE tsrsIE;
1883 uint8_t tsrsPresent:1;
1884#endif
1885 uint8_t wmeTspecPresent:1;
1886 uint8_t wsmTspecPresent:1;
1887 uint8_t lleTspecPresent:1;
1888 uint8_t tclasProcPresent:1;
1889} tSirAddtsReqInfo, *tpSirAddtsReqInfo;
1890
1891typedef struct sSirAddtsRspInfo {
1892 uint8_t dialogToken;
1893 tSirMacStatusCodes status;
1894 tSirMacTsDelayIE delay;
1895
1896 tSirMacTspecIE tspec;
1897 uint8_t numTclas; /* number of Tclas elements */
1898 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
1899 uint8_t tclasProc;
1900 tSirMacScheduleIE schedule;
1901#if defined(FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_ESE_UPLOAD)
1902 tSirMacESETSMIE tsmIE;
1903 uint8_t tsmPresent:1;
1904#endif
1905 uint8_t wmeTspecPresent:1;
1906 uint8_t wsmTspecPresent:1;
1907 uint8_t lleTspecPresent:1;
1908 uint8_t tclasProcPresent:1;
1909 uint8_t schedulePresent:1;
1910} tSirAddtsRspInfo, *tpSirAddtsRspInfo;
1911
1912typedef struct sSirDeltsReqInfo {
1913 tSirMacTSInfo tsinfo;
1914 tSirMacTspecIE tspec;
1915 uint8_t wmeTspecPresent:1;
1916 uint8_t wsmTspecPresent:1;
1917 uint8_t lleTspecPresent:1;
1918} tSirDeltsReqInfo, *tpSirDeltsReqInfo;
1919
1920/* / Add a tspec as defined */
1921typedef struct sSirAddtsReq {
1922 uint16_t messageType; /* eWNI_SME_ADDTS_REQ */
1923 uint16_t length;
1924 uint8_t sessionId; /* Session ID */
1925 uint16_t transactionId;
1926 tSirMacAddr bssId; /* BSSID */
1927 uint32_t timeout; /* in ms */
1928 uint8_t rspReqd;
1929 tSirAddtsReqInfo req;
1930} tSirAddtsReq, *tpSirAddtsReq;
1931
1932typedef struct sSirAddtsRsp {
1933 uint16_t messageType; /* eWNI_SME_ADDTS_RSP */
1934 uint16_t length;
1935 uint8_t sessionId; /* sme sessionId Added for BT-AMP support */
1936 uint16_t transactionId; /* sme transaction Id - for BT-AMP Support */
1937 uint32_t rc; /* return code */
1938 tSirAddtsRspInfo rsp;
1939} tSirAddtsRsp, *tpSirAddtsRsp;
1940
1941typedef struct sSirDeltsReq {
1942 uint16_t messageType; /* eWNI_SME_DELTS_REQ */
1943 uint16_t length;
1944 uint8_t sessionId; /* Session ID */
1945 uint16_t transactionId;
1946 tSirMacAddr bssId; /* BSSID */
1947 uint16_t aid; /* use 0 if macAddr is being specified */
1948 tSirMacAddr macAddr; /* only on AP to specify the STA */
1949 uint8_t rspReqd;
1950 tSirDeltsReqInfo req;
1951} tSirDeltsReq, *tpSirDeltsReq;
1952
1953typedef struct sSirDeltsRsp {
1954 uint16_t messageType; /* eWNI_SME_DELTS_RSP */
1955 uint16_t length;
1956 uint8_t sessionId; /* sme sessionId Added for BT-AMP support */
1957 uint16_t transactionId; /* sme transaction Id - for BT-AMP Support */
1958 uint32_t rc;
1959 uint16_t aid; /* use 0 if macAddr is being specified */
1960 tSirMacAddr macAddr; /* only on AP to specify the STA */
1961 tSirDeltsReqInfo rsp;
1962} tSirDeltsRsp, *tpSirDeltsRsp;
1963
1964#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
1965typedef struct sSirPlmReq {
1966 uint16_t diag_token; /* Dialog token */
1967 uint16_t meas_token; /* measurement token */
1968 uint16_t numBursts; /* total number of bursts */
1969 uint16_t burstInt; /* burst interval in seconds */
1970 uint16_t measDuration; /* in TU's,STA goes off-ch */
1971 /* no of times the STA should cycle through PLM ch list */
1972 uint8_t burstLen;
1973 tPowerdBm desiredTxPwr; /* desired tx power */
1974 tSirMacAddr macAddr; /* MC dest addr */
1975 /* no of channels */
1976 uint8_t plmNumCh;
1977 /* channel numbers */
1978 uint8_t plmChList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
1979 uint8_t sessionId;
1980 bool enable;
1981} tSirPlmReq, *tpSirPlmReq;
1982#endif
1983
1984#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
1985
1986#define SIR_QOS_NUM_AC_MAX 4
1987
1988typedef struct sSirAggrQosReqInfo {
1989 uint16_t tspecIdx;
1990 tSirAddtsReqInfo aggrAddTsInfo[SIR_QOS_NUM_AC_MAX];
1991} tSirAggrQosReqInfo, *tpSirAggrQosReqInfo;
1992
1993typedef struct sSirAggrQosReq {
1994 uint16_t messageType; /* eWNI_SME_ADDTS_REQ */
1995 uint16_t length;
1996 uint8_t sessionId; /* Session ID */
1997 uint16_t transactionId;
1998 tSirMacAddr bssId; /* BSSID */
1999 uint32_t timeout; /* in ms */
2000 uint8_t rspReqd;
2001 tSirAggrQosReqInfo aggrInfo;
2002} tSirAggrQosReq, *tpSirAggrQosReq;
2003
2004typedef struct sSirAggrQosRspInfo {
2005 uint16_t tspecIdx;
2006 tSirAddtsRspInfo aggrRsp[SIR_QOS_NUM_AC_MAX];
2007} tSirAggrQosRspInfo, *tpSirAggrQosRspInfo;
2008
2009typedef struct sSirAggrQosRsp {
2010 uint16_t messageType;
2011 uint16_t length;
2012 uint8_t sessionId;
2013 tSirAggrQosRspInfo aggrInfo;
2014} tSirAggrQosRsp, *tpSirAggrQosRsp;
2015
2016#endif /*WLAN_FEATURE_VOWIFI_11R || FEATURE_WLAN_ESE */
2017
2018typedef struct sSirQosMapSet {
2019 uint8_t present;
2020 uint8_t num_dscp_exceptions;
2021 uint8_t dscp_exceptions[21][2];
2022 uint8_t dscp_range[8][2];
2023} tSirQosMapSet, *tpSirQosMapSet;
2024
2025typedef struct sSmeIbssPeerInd {
2026 uint16_t mesgType;
2027 uint16_t mesgLen;
2028 uint8_t sessionId;
2029
2030 tSirMacAddr peerAddr;
2031 uint16_t staId;
2032
2033 /*
2034 * The DPU signatures will be sent eventually to TL to help it determine
2035 * the association to which a packet belongs to
2036 */
2037 /* Unicast DPU signature */
2038 uint8_t ucastSig;
2039
2040 /*Broadcast DPU signature */
2041 uint8_t bcastSig;
2042
2043 /* Beacon will be appended for new Peer indication. */
2044} tSmeIbssPeerInd, *tpSmeIbssPeerInd;
2045
2046typedef struct sSirIbssPeerInactivityInd {
2047 uint8_t bssIdx;
2048 uint8_t staIdx;
2049 tSirMacAddr peerAddr;
2050} tSirIbssPeerInactivityInd, *tpSirIbssPeerInactivityInd;
2051
2052typedef struct sLimScanChn {
2053 uint16_t numTimeScan; /* how many time this channel is scan */
2054 uint8_t channelId;
2055} tLimScanChn;
2056
2057typedef struct sSmeGetScanChnRsp {
2058 /* Message Type */
2059 uint16_t mesgType;
2060 /* Message Length */
2061 uint16_t mesgLen;
2062 uint8_t sessionId;
2063 uint8_t numChn;
2064 tLimScanChn scanChn[1];
2065} tSmeGetScanChnRsp, *tpSmeGetScanChnRsp;
2066
2067typedef struct sLimScanChnInfo {
2068 uint8_t numChnInfo; /* number of channels in scanChn */
2069 tLimScanChn scanChn[SIR_MAX_SUPPORTED_CHANNEL_LIST];
2070} tLimScanChnInfo;
2071
2072typedef struct sSirSmeGetAssocSTAsReq {
2073 uint16_t messageType; /* eWNI_SME_GET_ASSOC_STAS_REQ */
2074 uint16_t length;
2075 tSirMacAddr bssId; /* BSSID */
2076 uint16_t modId;
2077 void *pUsrContext;
2078 void *pSapEventCallback;
2079 /* Pointer to allocated mem passed in wlansap_get_assoc_stations API */
2080 void *pAssocStasArray;
2081} tSirSmeGetAssocSTAsReq, *tpSirSmeGetAssocSTAsReq;
2082
2083typedef struct sSmeMaxAssocInd {
2084 uint16_t mesgType; /* eWNI_SME_MAX_ASSOC_EXCEEDED */
2085 uint16_t mesgLen;
2086 uint8_t sessionId;
2087 /* the new peer that got rejected max assoc limit reached */
2088 tSirMacAddr peerMac;
2089} tSmeMaxAssocInd, *tpSmeMaxAssocInd;
2090
2091typedef struct sSmeCsaOffloadInd {
2092 uint16_t mesgType; /* eWNI_SME_CSA_OFFLOAD_EVENT */
2093 uint16_t mesgLen;
2094 tSirMacAddr bssId; /* BSSID */
2095} tSmeCsaOffloadInd, *tpSmeCsaOffloadInd;
2096
2097/* WOW related structures */
2098#define SIR_WOWL_BCAST_PATTERN_MAX_SIZE 146
2099
2100/**
2101 * struct wow_add_pattern - wow pattern add structure
2102 * @pattern_id: pattern id
2103 * @pattern_byte_offset: pattern byte offset from beginning of the 802.11
2104 * packet to start of the wake-up pattern
2105 * @pattern_size: pattern size
2106 * @pattern: pattern byte stream
2107 * @pattern_mask_size: pattern mask size
2108 * @pattern_mask: pattern mask
2109 * @session_id: session id
2110 */
2111struct wow_add_pattern {
2112 uint8_t pattern_id;
2113 uint8_t pattern_byte_offset;
2114 uint8_t pattern_size;
2115 uint8_t pattern[SIR_WOWL_BCAST_PATTERN_MAX_SIZE];
2116 uint8_t pattern_mask_size;
2117 uint8_t pattern_mask[SIR_WOWL_BCAST_PATTERN_MAX_SIZE];
2118 uint8_t session_id;
2119};
2120
2121/**
2122 * struct wow_delete_patern - wow pattern delete structure
2123 * @pattern_id: pattern id of wake up pattern to be deleted
2124 * @session_id: session id
2125 */
2126struct wow_delete_pattern {
2127 uint8_t pattern_id;
2128 uint8_t session_id;
2129};
2130
2131/* SME->PE: Enter WOWLAN parameters */
2132typedef struct sSirSmeWowlEnterParams {
2133 uint8_t sessionId;
2134
2135 /* Enables/disables magic packet filtering */
2136 uint8_t ucMagicPktEnable;
2137
2138 /* Magic pattern */
2139 tSirMacAddr magicPtrn;
2140
2141 /* Enables/disables packet pattern filtering */
2142 uint8_t ucPatternFilteringEnable;
2143
2144#ifdef WLAN_WAKEUP_EVENTS
2145 /*
2146 * This configuration directs the WoW packet filtering to look at EAP-ID
2147 * requests embedded in EAPOL frames and use this as a wake source.
2148 */
2149 uint8_t ucWoWEAPIDRequestEnable;
2150
2151 /*
2152 * This configuration directs the WoW packet filtering to look for
2153 * EAPOL-4WAY requests and use this as a wake source.
2154 */
2155 uint8_t ucWoWEAPOL4WayEnable;
2156
2157 /*
2158 * This configuration allows a host wakeup on an network scan
2159 * offload match.
2160 */
2161 uint8_t ucWowNetScanOffloadMatch;
2162
2163 /* This configuration allows a host wakeup on any GTK rekeying error.
2164 */
2165 uint8_t ucWowGTKRekeyError;
2166
2167 /* This configuration allows a host wakeup on BSS connection loss.
2168 */
2169 uint8_t ucWoWBSSConnLoss;
2170#endif /* WLAN_WAKEUP_EVENTS */
2171
2172 tSirMacAddr bssId;
2173} tSirSmeWowlEnterParams, *tpSirSmeWowlEnterParams;
2174
2175/* PE<->HAL: Enter WOWLAN parameters */
2176typedef struct sSirHalWowlEnterParams {
2177 uint8_t sessionId;
2178
2179 /* Enables/disables magic packet filtering */
2180 uint8_t ucMagicPktEnable;
2181
2182 /* Magic pattern */
2183 tSirMacAddr magicPtrn;
2184
2185 /* Enables/disables packet pattern filtering in firmware.
2186 Enabling this flag enables broadcast pattern matching
2187 in Firmware. If unicast pattern matching is also desired,
2188 ucUcastPatternFilteringEnable flag must be set tot true
2189 as well
2190 */
2191 uint8_t ucPatternFilteringEnable;
2192
2193 /* Enables/disables unicast packet pattern filtering.
2194 This flag specifies whether we want to do pattern match
2195 on unicast packets as well and not just broadcast packets.
2196 This flag has no effect if the ucPatternFilteringEnable
2197 (main controlling flag) is set to false
2198 */
2199 uint8_t ucUcastPatternFilteringEnable;
2200
2201 /* This configuration is valid only when magicPktEnable=1.
2202 * It requests hardware to wake up when it receives the
2203 * Channel Switch Action Frame.
2204 */
2205 uint8_t ucWowChnlSwitchRcv;
2206
2207 /* This configuration is valid only when magicPktEnable=1.
2208 * It requests hardware to wake up when it receives the
2209 * Deauthentication Frame.
2210 */
2211 uint8_t ucWowDeauthRcv;
2212
2213 /* This configuration is valid only when magicPktEnable=1.
2214 * It requests hardware to wake up when it receives the
2215 * Disassociation Frame.
2216 */
2217 uint8_t ucWowDisassocRcv;
2218
2219 /* This configuration is valid only when magicPktEnable=1.
2220 * It requests hardware to wake up when it has missed
2221 * consecutive beacons. This is a hardware register
2222 * configuration (NOT a firmware configuration).
2223 */
2224 uint8_t ucWowMaxMissedBeacons;
2225
2226 /* This configuration is valid only when magicPktEnable=1.
2227 * This is a timeout value in units of microsec. It requests
2228 * hardware to unconditionally wake up after it has stayed
2229 * in WoWLAN mode for some time. Set 0 to disable this feature.
2230 */
2231 uint8_t ucWowMaxSleepUsec;
2232
2233#ifdef WLAN_WAKEUP_EVENTS
2234 /* This config directs the WoW pkt filtering to look for EAP-ID
2235 * requests embedded in EAPOL frames and use this as a wake source.
2236 */
2237 uint8_t ucWoWEAPIDRequestEnable;
2238
2239 /* This config directs the WoW pkt filtering to look for EAPOL-4WAY
2240 * requests and use this as a wake source.
2241 */
2242 uint8_t ucWoWEAPOL4WayEnable;
2243
2244 /* This config allows a host wakeup on an network scan offload match.
2245 */
2246 uint8_t ucWowNetScanOffloadMatch;
2247
2248 /* This configuration allows a host wakeup on any GTK rekeying error.
2249 */
2250 uint8_t ucWowGTKRekeyError;
2251
2252 /* This configuration allows a host wakeup on BSS connection loss.
2253 */
2254 uint8_t ucWoWBSSConnLoss;
2255#endif /* WLAN_WAKEUP_EVENTS */
2256
2257 /* Status code to be filled by HAL when it sends
2258 * SIR_HAL_WOWL_ENTER_RSP to PE.
2259 */
2260 CDF_STATUS status;
2261
2262 /*BSSID to find the current session
2263 */
2264 uint8_t bssIdx;
2265} tSirHalWowlEnterParams, *tpSirHalWowlEnterParams;
2266
2267/* SME->PE: Exit WOWLAN parameters */
2268typedef struct sSirSmeWowlExitParams {
2269 uint8_t sessionId;
2270
2271} tSirSmeWowlExitParams, *tpSirSmeWowlExitParams;
2272
2273/* PE<->HAL: Exit WOWLAN parameters */
2274typedef struct sSirHalWowlExitParams {
2275 uint8_t sessionId;
2276
2277 /* Status code to be filled by HAL when it sends
2278 * SIR_HAL_WOWL_EXIT_RSP to PE.
2279 */
2280 CDF_STATUS status;
2281
2282 /*BSSIDX to find the current session
2283 */
2284 uint8_t bssIdx;
2285} tSirHalWowlExitParams, *tpSirHalWowlExitParams;
2286
2287#define SIR_MAX_NAME_SIZE 64
2288#define SIR_MAX_TEXT_SIZE 32
2289
2290typedef struct sSirName {
2291 uint8_t num_name;
2292 uint8_t name[SIR_MAX_NAME_SIZE];
2293} tSirName;
2294
2295typedef struct sSirText {
2296 uint8_t num_text;
2297 uint8_t text[SIR_MAX_TEXT_SIZE];
2298} tSirText;
2299
2300#define SIR_WPS_PROBRSP_VER_PRESENT 0x00000001
2301#define SIR_WPS_PROBRSP_STATE_PRESENT 0x00000002
2302#define SIR_WPS_PROBRSP_APSETUPLOCK_PRESENT 0x00000004
2303#define SIR_WPS_PROBRSP_SELECTEDREGISTRA_PRESENT 0x00000008
2304#define SIR_WPS_PROBRSP_DEVICEPASSWORDID_PRESENT 0x00000010
2305#define SIR_WPS_PROBRSP_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020
2306#define SIR_WPS_PROBRSP_RESPONSETYPE_PRESENT 0x00000040
2307#define SIR_WPS_PROBRSP_UUIDE_PRESENT 0x00000080
2308#define SIR_WPS_PROBRSP_MANUFACTURE_PRESENT 0x00000100
2309#define SIR_WPS_PROBRSP_MODELNAME_PRESENT 0x00000200
2310#define SIR_WPS_PROBRSP_MODELNUMBER_PRESENT 0x00000400
2311#define SIR_WPS_PROBRSP_SERIALNUMBER_PRESENT 0x00000800
2312#define SIR_WPS_PROBRSP_PRIMARYDEVICETYPE_PRESENT 0x00001000
2313#define SIR_WPS_PROBRSP_DEVICENAME_PRESENT 0x00002000
2314#define SIR_WPS_PROBRSP_CONFIGMETHODS_PRESENT 0x00004000
2315#define SIR_WPS_PROBRSP_RF_BANDS_PRESENT 0x00008000
2316
2317typedef struct sSirWPSProbeRspIE {
2318 uint32_t FieldPresent;
2319 uint32_t Version; /* Version. 0x10 = version 1.0, 0x11 = etc. */
2320 uint32_t wpsState; /* 1 = unconfigured, 2 = configured. */
2321 bool APSetupLocked; /* Must be included if value is true */
2322 /*
2323 * BOOL: indicates if the user has recently activated a Registrar to
2324 * add an Enrollee.
2325 */
2326 bool SelectedRegistra;
2327 uint16_t DevicePasswordID; /* Device Password ID */
2328 /* Selected Registrar config method */
2329 uint16_t SelectedRegistraCfgMethod;
2330 uint8_t ResponseType; /* Response type */
2331 uint8_t UUID_E[16]; /* Unique identifier of the AP. */
2332 tSirName Manufacture;
2333 tSirText ModelName;
2334 tSirText ModelNumber;
2335 tSirText SerialNumber;
2336 /* Device Category ID: 1Computer, 2Input Device, ... */
2337 uint32_t PrimaryDeviceCategory;
2338 /* Vendor specific OUI for Device Sub Category */
2339 uint8_t PrimaryDeviceOUI[4];
2340 /*
2341 Device Sub Category ID: 1-PC, 2-Server if Device Category ID
2342 * is computer
2343 */
2344 uint32_t DeviceSubCategory;
2345 tSirText DeviceName;
2346 uint16_t ConfigMethod; /* Configuaration method */
2347 uint8_t RFBand; /* RF bands available on the AP */
2348} tSirWPSProbeRspIE;
2349
2350#define SIR_WPS_BEACON_VER_PRESENT 0x00000001
2351#define SIR_WPS_BEACON_STATE_PRESENT 0x00000002
2352#define SIR_WPS_BEACON_APSETUPLOCK_PRESENT 0x00000004
2353#define SIR_WPS_BEACON_SELECTEDREGISTRA_PRESENT 0x00000008
2354#define SIR_WPS_BEACON_DEVICEPASSWORDID_PRESENT 0x00000010
2355#define SIR_WPS_BEACON_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020
2356#define SIR_WPS_BEACON_UUIDE_PRESENT 0x00000080
2357#define SIR_WPS_BEACON_RF_BANDS_PRESENT 0x00000100
2358#define SIR_WPS_UUID_LEN 16
2359
2360typedef struct sSirWPSBeaconIE {
2361 uint32_t FieldPresent;
2362 uint32_t Version; /* Version. 0x10 = version 1.0, 0x11 = etc. */
2363 uint32_t wpsState; /* 1 = unconfigured, 2 = configured. */
2364 bool APSetupLocked; /* Must be included if value is true */
2365 /*
2366 * BOOL: indicates if the user has recently activated a Registrar to
2367 * add an Enrollee.
2368 */
2369 bool SelectedRegistra;
2370 uint16_t DevicePasswordID; /* Device Password ID */
2371 /* Selected Registrar config method */
2372 uint16_t SelectedRegistraCfgMethod;
2373 uint8_t UUID_E[SIR_WPS_UUID_LEN]; /* Unique identifier of the AP. */
2374 uint8_t RFBand; /* RF bands available on the AP */
2375} tSirWPSBeaconIE;
2376
2377#define SIR_WPS_ASSOCRSP_VER_PRESENT 0x00000001
2378#define SIR_WPS_ASSOCRSP_RESPONSETYPE_PRESENT 0x00000002
2379
2380typedef struct sSirWPSAssocRspIE {
2381 uint32_t FieldPresent;
2382 uint32_t Version;
2383 uint8_t ResposeType;
2384} tSirWPSAssocRspIE;
2385
2386typedef struct sSirAPWPSIEs {
2387 tSirWPSProbeRspIE SirWPSProbeRspIE; /*WPS Set Probe Respose IE */
2388 tSirWPSBeaconIE SirWPSBeaconIE; /*WPS Set Beacon IE */
2389 tSirWPSAssocRspIE SirWPSAssocRspIE; /*WPS Set Assoc Response IE */
2390} tSirAPWPSIEs, *tpSiriAPWPSIEs;
2391
2392typedef struct sSirUpdateAPWPSIEsReq {
2393 uint16_t messageType; /* eWNI_SME_UPDATE_APWPSIE_REQ */
2394 uint16_t length;
2395 uint16_t transactionId; /* Transaction ID for cmd */
2396 tSirMacAddr bssId; /* BSSID */
2397 uint8_t sessionId; /* Session ID */
2398 tSirAPWPSIEs APWPSIEs;
2399} tSirUpdateAPWPSIEsReq, *tpSirUpdateAPWPSIEsReq;
2400
2401typedef struct sSirUpdateParams {
2402 uint16_t messageType;
2403 uint16_t length;
2404 uint8_t sessionId; /* Session ID */
2405 uint8_t ssidHidden; /* Hide SSID */
2406} tSirUpdateParams, *tpSirUpdateParams;
2407
2408/* Beacon Interval */
2409typedef struct sSirChangeBIParams {
2410 uint16_t messageType;
2411 uint16_t length;
2412 uint16_t beaconInterval; /* Beacon Interval */
2413 tSirMacAddr bssId;
2414 uint8_t sessionId; /* Session ID */
2415} tSirChangeBIParams, *tpSirChangeBIParams;
2416
2417#ifdef QCA_HT_2040_COEX
2418typedef struct sSirSetHT2040Mode {
2419 uint16_t messageType;
2420 uint16_t length;
2421 uint8_t cbMode;
2422 bool obssEnabled;
2423 tSirMacAddr bssId;
2424 uint8_t sessionId; /* Session ID */
2425} tSirSetHT2040Mode, *tpSirSetHT2040Mode;
2426#endif
2427
2428#define SIR_WPS_PBC_WALK_TIME 120 /* 120 Second */
2429
2430typedef struct sSirWPSPBCSession {
2431 struct sSirWPSPBCSession *next;
2432 tSirMacAddr addr;
2433 uint8_t uuid_e[SIR_WPS_UUID_LEN];
2434 uint32_t timestamp;
2435} tSirWPSPBCSession;
2436
2437typedef struct sSirSmeGetWPSPBCSessionsReq {
2438 uint16_t messageType; /* eWNI_SME_GET_WPSPBC_SESSION_REQ */
2439 uint16_t length;
2440 void *pUsrContext;
2441 void *pSapEventCallback;
2442 tSirMacAddr bssId; /* BSSID */
2443 /* MAC Address of STA in WPS Session to be removed */
2444 tSirMacAddr pRemoveMac;
2445} tSirSmeGetWPSPBCSessionsReq, *tpSirSmeGetWPSPBCSessionsReq;
2446
2447typedef struct sSirWPSPBCProbeReq {
2448 tSirMacAddr peerMacAddr;
2449 uint16_t probeReqIELen;
2450 uint8_t probeReqIE[512];
2451} tSirWPSPBCProbeReq, *tpSirWPSPBCProbeReq;
2452
2453/* probereq from peer, when wsc is enabled */
2454typedef struct sSirSmeProbeReqInd {
2455 uint16_t messageType; /* eWNI_SME_WPS_PBC_PROBE_REQ_IND */
2456 uint16_t length;
2457 uint8_t sessionId;
2458 tSirMacAddr bssId;
2459 tSirWPSPBCProbeReq WPSPBCProbeReq;
2460} tSirSmeProbeReqInd, *tpSirSmeProbeReqInd;
2461
2462typedef struct sSirUpdateAPWPARSNIEsReq {
2463 uint16_t messageType; /* eWNI_SME_SET_APWPARSNIEs_REQ */
2464 uint16_t length;
2465 uint16_t transactionId; /* Transaction ID for cmd */
2466 tSirMacAddr bssId; /* BSSID */
2467 uint8_t sessionId; /* Session ID */
2468 tSirRSNie APWPARSNIEs;
2469} tSirUpdateAPWPARSNIEsReq, *tpSirUpdateAPWPARSNIEsReq;
2470
2471#define SIR_ROAM_MAX_CHANNELS 80
2472#define SIR_ROAM_SCAN_MAX_PB_REQ_SIZE 450
2473/* Occupied channel list remains static */
2474#define CHANNEL_LIST_STATIC 1
2475/* Occupied channel list can be learnt after init */
2476#define CHANNEL_LIST_DYNAMIC_INIT 2
2477/* Occupied channel list can be learnt after flush */
2478#define CHANNEL_LIST_DYNAMIC_FLUSH 3
2479/* Occupied channel list can be learnt after update */
2480#define CHANNEL_LIST_DYNAMIC_UPDATE 4
2481#define SIR_ROAM_SCAN_24G_DEFAULT_CH 1
2482#define SIR_ROAM_SCAN_5G_DEFAULT_CH 36
2483#define SIR_ROAM_SCAN_RESERVED_BYTES 61
2484
2485#ifdef WLAN_FEATURE_ROAM_OFFLOAD
2486#define SIR_ROAM_SCAN_PSK_SIZE 32
2487#define SIR_ROAM_R0KH_ID_MAX_LEN 48
2488#endif
2489/* SME -> HAL - This is the host offload request. */
2490#define SIR_IPV4_ARP_REPLY_OFFLOAD 0
2491#define SIR_IPV6_NEIGHBOR_DISCOVERY_OFFLOAD 1
2492#define SIR_IPV6_NS_OFFLOAD 2
2493#define SIR_OFFLOAD_DISABLE 0
2494#define SIR_OFFLOAD_ENABLE 1
2495#define SIR_OFFLOAD_BCAST_FILTER_ENABLE 0x2
2496#define SIR_OFFLOAD_MCAST_FILTER_ENABLE 0x4
2497#define SIR_OFFLOAD_ARP_AND_BCAST_FILTER_ENABLE (SIR_OFFLOAD_ENABLE|SIR_OFFLOAD_BCAST_FILTER_ENABLE)
2498#define SIR_OFFLOAD_NS_AND_MCAST_FILTER_ENABLE (SIR_OFFLOAD_ENABLE|SIR_OFFLOAD_MCAST_FILTER_ENABLE)
2499
2500#ifdef WLAN_NS_OFFLOAD
2501typedef struct sSirNsOffloadReq {
2502 uint8_t srcIPv6Addr[16];
2503 uint8_t selfIPv6Addr[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA][SIR_MAC_IPV6_ADDR_LEN];
2504 uint8_t targetIPv6Addr[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA][SIR_MAC_IPV6_ADDR_LEN];
2505 tSirMacAddr selfMacAddr;
2506 uint8_t srcIPv6AddrValid;
2507 uint8_t targetIPv6AddrValid[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA];
2508 uint8_t slotIdx;
2509} tSirNsOffloadReq, *tpSirNsOffloadReq;
2510#endif /* WLAN_NS_OFFLOAD */
2511
2512typedef struct sSirHostOffloadReq {
2513 uint8_t offloadType;
2514 uint8_t enableOrDisable;
2515 uint32_t num_ns_offload_count;
2516 union {
2517 uint8_t hostIpv4Addr[4];
2518 uint8_t hostIpv6Addr[16];
2519 } params;
2520#ifdef WLAN_NS_OFFLOAD
2521 tSirNsOffloadReq nsOffloadInfo;
2522#endif /* WLAN_NS_OFFLOAD */
2523 tSirMacAddr bssId;
2524} tSirHostOffloadReq, *tpSirHostOffloadReq;
2525
2526/* Packet Types. */
2527#define SIR_KEEP_ALIVE_NULL_PKT 1
2528#define SIR_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2
2529
2530/* Keep Alive request. */
2531typedef struct sSirKeepAliveReq {
2532 uint8_t packetType;
2533 uint32_t timePeriod;
2534 tSirIpv4Addr hostIpv4Addr;
2535 tSirIpv4Addr destIpv4Addr;
2536 tSirMacAddr destMacAddr;
2537 tSirMacAddr bssId;
2538 uint8_t sessionId;
2539} tSirKeepAliveReq, *tpSirKeepAliveReq;
2540
2541typedef struct sSirSmeMgmtFrameInd {
2542 uint16_t mesgType;
2543 uint16_t mesgLen;
2544 uint32_t rxChan;
2545 uint8_t sessionId;
2546 uint8_t frameType;
2547 int8_t rxRssi;
2548 uint8_t frameBuf[1]; /* variable */
2549} tSirSmeMgmtFrameInd, *tpSirSmeMgmtFrameInd;
2550
2551#ifdef WLAN_FEATURE_11W
2552typedef struct sSirSmeUnprotMgmtFrameInd {
2553 uint8_t sessionId;
2554 uint8_t frameType;
2555 uint8_t frameLen;
2556 uint8_t frameBuf[1]; /* variable */
2557} tSirSmeUnprotMgmtFrameInd, *tpSirSmeUnprotMgmtFrameInd;
2558#endif
2559
2560#define SIR_IS_FULL_POWER_REASON_DISCONNECTED(eReason) \
2561 ((eSME_LINK_DISCONNECTED_BY_HDD == (eReason)) || \
2562 (eSME_LINK_DISCONNECTED_BY_OTHER == (eReason)))
2563#define SIR_IS_FULL_POWER_NEEDED_BY_HDD(eReason) \
2564 ((eSME_LINK_DISCONNECTED_BY_HDD == (eReason)) || \
2565 (eSME_FULL_PWR_NEEDED_BY_HDD == (eReason)))
2566
2567/* P2P Power Save Related */
2568typedef struct sSirNoAParam {
2569 uint8_t ctWindow:7;
2570 uint8_t OppPS:1;
2571 uint8_t count;
2572 uint32_t duration;
2573 uint32_t interval;
2574 uint32_t singleNoADuration;
2575 uint8_t psSelection;
2576} tSirNoAParam, *tpSirNoAParam;
2577
2578typedef struct sSirWlanSuspendParam {
2579 uint8_t configuredMcstBcstFilterSetting;
2580 uint8_t sessionId;
2581 uint8_t connectedState;
2582} tSirWlanSuspendParam, *tpSirWlanSuspendParam;
2583
2584typedef struct sSirWlanResumeParam {
2585 uint8_t configuredMcstBcstFilterSetting;
2586} tSirWlanResumeParam, *tpSirWlanResumeParam;
2587
2588#ifdef WLAN_FEATURE_EXTWOW_SUPPORT
2589
2590typedef enum ext_wow_type {
2591 EXT_WOW_TYPE_APP_TYPE1, /* wow type: only enable wakeup for app type1 */
2592 EXT_WOW_TYPE_APP_TYPE2, /* wow type: only enable wakeup for app type2 */
2593 EXT_WOW_TYPE_APP_TYPE1_2, /* wow type: enable wakeup for app type1&2 */
2594} EXT_WOW_TYPE;
2595
2596typedef struct {
2597 uint8_t vdev_id;
2598 EXT_WOW_TYPE type;
2599 uint32_t wakeup_pin_num;
2600} tSirExtWoWParams, *tpSirExtWoWParams;
2601
2602typedef struct {
2603 uint8_t vdev_id;
2604 tSirMacAddr wakee_mac_addr;
2605 uint8_t identification_id[8];
2606 uint8_t password[16];
2607 uint32_t id_length;
2608 uint32_t pass_length;
2609} tSirAppType1Params, *tpSirAppType1Params;
2610
2611typedef struct {
2612 uint8_t vdev_id;
2613
2614 uint8_t rc4_key[16];
2615 uint32_t rc4_key_len;
2616
2617 /** ip header parameter */
2618 uint32_t ip_id; /* NC id */
2619 uint32_t ip_device_ip; /* NC IP address */
2620 uint32_t ip_server_ip; /* Push server IP address */
2621
2622 /** tcp header parameter */
2623 uint16_t tcp_src_port; /* NC TCP port */
2624 uint16_t tcp_dst_port; /* Push server TCP port */
2625 uint32_t tcp_seq;
2626 uint32_t tcp_ack_seq;
2627
2628 uint32_t keepalive_init; /* Initial ping interval */
2629 uint32_t keepalive_min; /* Minimum ping interval */
2630 uint32_t keepalive_max; /* Maximum ping interval */
2631 uint32_t keepalive_inc; /* Increment of ping interval */
2632
2633 tSirMacAddr gateway_mac;
2634 uint32_t tcp_tx_timeout_val;
2635 uint32_t tcp_rx_timeout_val;
2636} tSirAppType2Params, *tpSirAppType2Params;
2637#endif
2638
2639typedef struct sSirWlanSetRxpFilters {
2640 uint8_t configuredMcstBcstFilterSetting;
2641 uint8_t setMcstBcstFilter;
2642} tSirWlanSetRxpFilters, *tpSirWlanSetRxpFilters;
2643
2644
2645#define ANI_MAX_IBSS_ROUTE_TABLE_ENTRY 100
2646
2647typedef struct sAniDestIpNextHopMacPair {
2648 uint8_t destIpv4Addr[CDF_IPV4_ADDR_SIZE];
2649 uint8_t nextHopMacAddr[CDF_MAC_ADDR_SIZE];
2650} tAniDestIpNextHopMacPair;
2651
2652typedef struct sAniIbssRouteTable {
2653 uint8_t sessionId;
2654 uint16_t numEntries;
2655 tAniDestIpNextHopMacPair destIpNextHopPair[1];
2656} tAniIbssRouteTable;
2657
2658#ifdef FEATURE_WLAN_SCAN_PNO
2659/* */
2660/* PNO Messages */
2661/* */
2662
2663
2664/* Set PNO */
2665#define SIR_PNO_MAX_NETW_CHANNELS 26
2666#define SIR_PNO_MAX_NETW_CHANNELS_EX 60
2667#define SIR_PNO_MAX_SUPP_NETWORKS 16
2668#define SIR_PNO_MAX_SCAN_TIMERS 10
2669
2670/*
2671 * size based of dot11 declaration without extra IEs as we will not carry those
2672 * for PNO
2673 */
2674#define SIR_PNO_MAX_PB_REQ_SIZE 450
2675
2676#define SIR_PNO_24G_DEFAULT_CH 1
2677#define SIR_PNO_5G_DEFAULT_CH 36
2678
2679typedef enum {
2680 SIR_PNO_MODE_IMMEDIATE,
2681 SIR_PNO_MODE_ON_SUSPEND,
2682 SIR_PNO_MODE_ON_RESUME,
2683 SIR_PNO_MODE_MAX
2684} eSirPNOMode;
2685
2686typedef struct {
2687 tSirMacSSid ssId;
2688 uint32_t authentication;
2689 uint32_t encryption;
2690 uint32_t bcastNetwType;
2691 uint8_t ucChannelCount;
2692 uint8_t aChannels[SIR_PNO_MAX_NETW_CHANNELS_EX];
2693 int32_t rssiThreshold;
2694} tSirNetworkType;
2695
2696typedef struct {
2697 uint32_t uTimerValue;
2698 uint32_t uTimerRepeat;
2699} tSirScanTimer;
2700
2701typedef struct {
2702 uint8_t ucScanTimersCount;
2703 tSirScanTimer aTimerValues[SIR_PNO_MAX_SCAN_TIMERS];
2704} tSirScanTimersType;
2705
2706typedef struct sSirPNOScanReq {
2707 uint8_t enable;
2708 eSirPNOMode modePNO;
2709 uint8_t ucNetworksCount;
2710 tSirNetworkType aNetworks[SIR_PNO_MAX_SUPP_NETWORKS];
2711 tSirScanTimersType scanTimers;
2712 uint8_t sessionId;
2713
2714 uint16_t us24GProbeTemplateLen;
2715 uint8_t p24GProbeTemplate[SIR_PNO_MAX_PB_REQ_SIZE];
2716 uint16_t us5GProbeTemplateLen;
2717 uint8_t p5GProbeTemplate[SIR_PNO_MAX_PB_REQ_SIZE];
2718} tSirPNOScanReq, *tpSirPNOScanReq;
2719
2720/* Preferred Network Found Indication */
2721typedef struct {
2722 uint16_t mesgType;
2723 uint16_t mesgLen;
2724 /* Network that was found with the highest RSSI */
2725 tSirMacSSid ssId;
2726 /* Indicates the RSSI */
2727 uint8_t rssi;
2728 /* Length of the beacon or probe response
2729 * corresponding to the candidate found by PNO */
2730 uint32_t frameLength;
2731 uint8_t sessionId;
2732 /* Index to memory location where the contents of
2733 * beacon or probe response frame will be copied */
2734 uint8_t data[1];
2735} tSirPrefNetworkFoundInd, *tpSirPrefNetworkFoundInd;
2736#endif /* FEATURE_WLAN_SCAN_PNO */
2737
2738#ifdef WLAN_FEATURE_ROAM_OFFLOAD
2739typedef struct {
2740 uint8_t acvo_uapsd:1;
2741 uint8_t acvi_uapsd:1;
2742 uint8_t acbk_uapsd:1;
2743 uint8_t acbe_uapsd:1;
2744 uint8_t reserved:4;
2745} tSirAcUapsd, *tpSirAcUapsd;
2746#endif
2747
2748typedef struct {
2749 tSirMacSSid ssId;
2750 uint8_t currAPbssid[CDF_MAC_ADDR_SIZE];
2751 uint32_t authentication;
2752 uint8_t encryption;
2753 uint8_t mcencryption;
2754 uint8_t ChannelCount;
2755 uint8_t ChannelCache[SIR_ROAM_MAX_CHANNELS];
2756#ifdef WLAN_FEATURE_11W
2757 bool mfp_enabled;
2758#endif
2759
2760} tSirRoamNetworkType;
2761
2762typedef struct SirMobilityDomainInfo {
2763 uint8_t mdiePresent;
2764 uint16_t mobilityDomain;
2765} tSirMobilityDomainInfo;
2766
2767typedef enum {
2768 SIR_ROAMING_DFS_CHANNEL_DISABLED = 0,
2769 SIR_ROAMING_DFS_CHANNEL_ENABLED_NORMAL = 1,
2770 SIR_ROAMING_DFS_CHANNEL_ENABLED_ACTIVE = 2
2771} eSirDFSRoamScanMode;
2772#define MAX_SSID_ALLOWED_LIST 4
2773#define MAX_BSSID_AVOID_LIST 16
2774#define MAX_BSSID_FAVORED 16
2775/**
2776 * struct roam_ext_params - Structure holding roaming parameters
2777 * @num_bssid_avoid_list: The number of BSSID's that we should
2778 * avoid connecting to. It is like a
2779 * blacklist of BSSID's.
2780 * @num_ssid_allowed_list: The number of SSID profiles that are
2781 * in the Whitelist. When roaming, we
2782 * consider the BSSID's with this SSID
2783 * also for roaming apart from the connected one's
2784 * @num_bssid_favored: Number of BSSID's which have a preference over
2785 * others
2786 * @ssid_allowed_list: Whitelist SSID's
2787 * @bssid_avoid_list: Blacklist SSID's
2788 * @bssid_favored: Favorable BSSID's
2789 * @bssid_favored_factor: RSSI to be added to this BSSID to prefer it
2790 * @raise_rssi_thresh_5g: The RSSI threshold below which the
2791 * raise_factor_5g (boost factor) should be
2792 * applied.
2793 * @drop_rssi_thresh_5g: The RSSI threshold beyond which the
2794 * drop_factor_5g (penalty factor) should be
2795 * applied
2796 * @raise_rssi_type_5g: Algorithm to apply the boost factor
2797 * @raise_factor_5g: Boost factor
2798 * @drop_rssi_type_5g: Algorithm to apply the penalty factor
2799 * @drop_factor_5g: Penalty factor
2800 * @max_raise_rssi_5g: Maximum amount of Boost that can added
2801 * @max_drop_rssi_5g: Maximum amount of penalty that can be subtracted
2802 * @good_rssi_threshold: The Lookup UP threshold beyond which roaming
2803 * scan should be performed.
2804 * @rssi_diff: RSSI difference for the AP to be better over the
2805 * current AP to avoid ping pong effects
2806 * @good_rssi_roam: Lazy Roam
2807 * @is_5g_pref_enabled: 5GHz BSSID preference feature enable/disable.
2808 *
2809 * This structure holds all the key parameters related to
2810 * initial connection and also roaming connections.
2811 * */
2812struct roam_ext_params {
2813 uint8_t num_bssid_avoid_list;
2814 uint8_t num_ssid_allowed_list;
2815 uint8_t num_bssid_favored;
2816 tSirMacSSid ssid_allowed_list[MAX_SSID_ALLOWED_LIST];
2817 tSirMacAddr bssid_avoid_list[MAX_BSSID_AVOID_LIST];
2818 tSirMacAddr bssid_favored[MAX_BSSID_FAVORED];
2819 uint8_t bssid_favored_factor[MAX_BSSID_FAVORED];
2820 int raise_rssi_thresh_5g;
2821 int drop_rssi_thresh_5g;
2822 uint8_t raise_rssi_type_5g;
2823 uint8_t raise_factor_5g;
2824 uint8_t drop_rssi_type_5g;
2825 uint8_t drop_factor_5g;
2826 int max_raise_rssi_5g;
2827 int max_drop_rssi_5g;
2828 int alert_rssi_threshold;
2829 int rssi_diff;
2830 int good_rssi_roam;
2831 bool is_5g_pref_enabled;
2832};
2833
2834typedef struct sSirRoamOffloadScanReq {
2835 bool RoamScanOffloadEnabled;
2836 bool MAWCEnabled;
2837 int8_t LookupThreshold;
2838 uint8_t delay_before_vdev_stop;
2839 uint8_t OpportunisticScanThresholdDiff;
2840 uint8_t RoamRescanRssiDiff;
2841 uint8_t RoamRssiDiff;
2842 uint8_t ChannelCacheType;
2843 uint8_t Command;
2844 uint8_t reason;
2845 uint16_t NeighborScanTimerPeriod;
2846 uint16_t NeighborRoamScanRefreshPeriod;
2847 uint16_t NeighborScanChannelMinTime;
2848 uint16_t NeighborScanChannelMaxTime;
2849 uint16_t EmptyRefreshScanPeriod;
2850 uint8_t ValidChannelCount;
2851 uint8_t ValidChannelList[SIR_ROAM_MAX_CHANNELS];
2852 bool IsESEAssoc;
2853 uint16_t us24GProbeTemplateLen;
2854 uint8_t p24GProbeTemplate[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
2855 uint16_t us5GProbeTemplateLen;
2856 uint8_t p5GProbeTemplate[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];
2857 uint8_t ReservedBytes[SIR_ROAM_SCAN_RESERVED_BYTES];
2858 /*ReservedBytes is to add any further params in future
2859 without changing the interface params on Host
2860 and firmware.The firmware right now checks
2861 if the size of this structure matches and then
2862 proceeds with the processing of the command.
2863 So, in future, if there is any need to add
2864 more params, pick the memory from reserved
2865 bytes and keep deducting the reserved bytes
2866 by the amount of bytes picked. */
2867 uint8_t nProbes;
2868 uint16_t HomeAwayTime;
2869 tSirRoamNetworkType ConnectedNetwork;
2870 tSirMobilityDomainInfo MDID;
2871 uint8_t sessionId;
2872 uint8_t RoamBmissFirstBcnt;
2873 uint8_t RoamBmissFinalBcnt;
2874 uint8_t RoamBeaconRssiWeight;
2875 eSirDFSRoamScanMode allowDFSChannelRoam;
2876#ifdef WLAN_FEATURE_ROAM_OFFLOAD
2877 uint8_t RoamOffloadEnabled;
2878 uint8_t PSK_PMK[SIR_ROAM_SCAN_PSK_SIZE];
2879 uint32_t pmk_len;
2880 uint8_t Prefer5GHz;
2881 uint8_t RoamRssiCatGap;
2882 uint8_t Select5GHzMargin;
2883 uint8_t KRK[SIR_KRK_KEY_LEN];
2884 uint8_t BTK[SIR_BTK_KEY_LEN];
2885 uint32_t ReassocFailureTimeout;
2886 tSirAcUapsd AcUapsd;
2887 uint8_t R0KH_ID[SIR_ROAM_R0KH_ID_MAX_LEN];
2888 uint32_t R0KH_ID_Length;
2889 uint8_t RoamKeyMgmtOffloadEnabled;
2890#endif
2891 struct roam_ext_params roam_params;
2892 uint8_t middle_of_roaming;
2893 uint32_t hi_rssi_scan_max_count;
2894 uint32_t hi_rssi_scan_rssi_delta;
2895 uint32_t hi_rssi_scan_delay;
2896 int32_t hi_rssi_scan_rssi_ub;
2897} tSirRoamOffloadScanReq, *tpSirRoamOffloadScanReq;
2898
2899typedef struct sSirRoamOffloadScanRsp {
2900 uint8_t sessionId;
2901 uint32_t reason;
2902} tSirRoamOffloadScanRsp, *tpSirRoamOffloadScanRsp;
2903
2904
2905#ifdef WLAN_FEATURE_PACKET_FILTERING
2906/*---------------------------------------------------------------------------
2907 Packet Filtering Parameters
2908 ---------------------------------------------------------------------------*/
2909#define SIR_IPV4_ADDR_LEN 4
2910#define SIR_MAC_ADDR_LEN 6
2911#define SIR_MAX_FILTER_TEST_DATA_LEN 8
2912#define SIR_MAX_NUM_MULTICAST_ADDRESS 240
2913#define SIR_MAX_NUM_FILTERS 20
2914#define SIR_MAX_NUM_TESTS_PER_FILTER 10
2915
2916/* */
2917/* Receive Filter Parameters */
2918/* */
2919typedef enum {
2920 SIR_RCV_FILTER_TYPE_INVALID,
2921 SIR_RCV_FILTER_TYPE_FILTER_PKT,
2922 SIR_RCV_FILTER_TYPE_BUFFER_PKT,
2923 SIR_RCV_FILTER_TYPE_MAX_ENUM_SIZE
2924} eSirReceivePacketFilterType;
2925
2926typedef enum {
2927 SIR_FILTER_HDR_TYPE_INVALID,
2928 SIR_FILTER_HDR_TYPE_MAC,
2929 SIR_FILTER_HDR_TYPE_ARP,
2930 SIR_FILTER_HDR_TYPE_IPV4,
2931 SIR_FILTER_HDR_TYPE_IPV6,
2932 SIR_FILTER_HDR_TYPE_UDP,
2933 SIR_FILTER_HDR_TYPE_MAX
2934} eSirRcvPktFltProtocolType;
2935
2936typedef enum {
2937 SIR_FILTER_CMP_TYPE_INVALID,
2938 SIR_FILTER_CMP_TYPE_EQUAL,
2939 SIR_FILTER_CMP_TYPE_MASK_EQUAL,
2940 SIR_FILTER_CMP_TYPE_NOT_EQUAL,
2941 SIR_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
2942 SIR_FILTER_CMP_TYPE_MAX
2943} eSirRcvPktFltCmpFlagType;
2944
2945typedef struct sSirRcvPktFilterFieldParams {
2946 eSirRcvPktFltProtocolType protocolLayer;
2947 eSirRcvPktFltCmpFlagType cmpFlag;
2948 /* Length of the data to compare */
2949 uint16_t dataLength;
2950 /* from start of the respective frame header */
2951 uint8_t dataOffset;
2952 /* Reserved field */
2953 uint8_t reserved;
2954 /* Data to compare */
2955 uint8_t compareData[SIR_MAX_FILTER_TEST_DATA_LEN];
2956 /* Mask to be applied on the received packet data before compare */
2957 uint8_t dataMask[SIR_MAX_FILTER_TEST_DATA_LEN];
2958} tSirRcvPktFilterFieldParams, *tpSirRcvPktFilterFieldParams;
2959
2960typedef struct sSirRcvPktFilterCfg {
2961 uint8_t filterId;
2962 eSirReceivePacketFilterType filterType;
2963 uint32_t numFieldParams;
2964 uint32_t coalesceTime;
2965 tSirMacAddr selfMacAddr;
2966 tSirMacAddr bssId; /* Bssid of the connected AP */
2967 tSirRcvPktFilterFieldParams paramsData[SIR_MAX_NUM_TESTS_PER_FILTER];
2968} tSirRcvPktFilterCfgType, *tpSirRcvPktFilterCfgType;
2969
2970/* */
2971/* Filter Packet Match Count Parameters */
2972/* */
2973typedef struct sSirRcvFltPktMatchCnt {
2974 uint8_t filterId;
2975 uint32_t matchCnt;
2976} tSirRcvFltPktMatchCnt, tpSirRcvFltPktMatchCnt;
2977
2978typedef struct sSirRcvFltPktMatchRsp {
2979 uint16_t mesgType;
2980 uint16_t mesgLen;
2981
2982 /* Success or Failure */
2983 uint32_t status;
2984 tSirRcvFltPktMatchCnt filterMatchCnt[SIR_MAX_NUM_FILTERS];
2985 tSirMacAddr bssId;
2986} tSirRcvFltPktMatchRsp, *tpSirRcvFltPktMatchRsp;
2987
2988/* */
2989/* Receive Filter Clear Parameters */
2990/* */
2991typedef struct sSirRcvFltPktClearParam {
2992 uint32_t status; /* only valid for response message */
2993 uint8_t filterId;
2994 tSirMacAddr selfMacAddr;
2995 tSirMacAddr bssId;
2996} tSirRcvFltPktClearParam, *tpSirRcvFltPktClearParam;
2997
2998/* */
2999/* Multicast Address List Parameters */
3000/* */
3001typedef struct sSirRcvFltMcAddrList {
3002 uint32_t ulMulticastAddrCnt;
3003 tSirMacAddr multicastAddr[SIR_MAX_NUM_MULTICAST_ADDRESS];
3004 tSirMacAddr selfMacAddr;
3005 tSirMacAddr bssId;
3006 uint8_t action;
3007} tSirRcvFltMcAddrList, *tpSirRcvFltMcAddrList;
3008#endif /* WLAN_FEATURE_PACKET_FILTERING */
3009
3010/* */
3011/* Generic version information */
3012/* */
3013typedef struct {
3014 uint8_t revision;
3015 uint8_t version;
3016 uint8_t minor;
3017 uint8_t major;
3018} tSirVersionType;
3019
3020#ifdef WLAN_FEATURE_GTK_OFFLOAD
3021/*---------------------------------------------------------------------------
3022* WMA_GTK_OFFLOAD_REQ
3023*--------------------------------------------------------------------------*/
3024typedef struct {
3025 uint32_t ulFlags; /* optional flags */
3026 uint8_t aKCK[16]; /* Key confirmation key */
3027 uint8_t aKEK[16]; /* key encryption key */
3028 uint64_t ullKeyReplayCounter; /* replay counter */
3029 tSirMacAddr bssId;
3030} tSirGtkOffloadParams, *tpSirGtkOffloadParams;
3031
3032/**
3033 * struct sir_wifi_start_log - Structure to store the params sent to start/
3034 * stop logging
3035 * @name: Attribute which indicates the type of logging like per packet
3036 * statistics, connectivity etc.
3037 * @verbose_level: Verbose level which can be 0,1,2,3
3038 * @flag: Flag field for future use
3039 */
3040struct sir_wifi_start_log {
3041 uint32_t ring_id;
3042 uint32_t verbose_level;
3043 uint32_t flag;
3044};
3045
3046/**
3047 * enum hw_mode_ss_config - Possible spatial stream configuration
3048 * @SS_0x0: Unused Tx and Rx of MAC
3049 * @SS_1x1: 1 Tx SS and 1 Rx SS
3050 * @SS_2x2: 2 Tx SS and 2 Rx SS
3051 * @SS_3x3: 3 Tx SS and 3 Rx SS
3052 * @SS_4x4: 4 Tx SS and 4 Rx SS
3053 *
3054 * Note: Right now only 1x1 and 2x2 are being supported. Other modes should
3055 * be added when supported. Asymmetric configuration like 1x2, 2x1 are also
3056 * not supported now. But, they are still valid. Right now, Tx/Rx SS support is
3057 * 4 bits long. So, we can go upto 15x15
3058 */
3059enum hw_mode_ss_config {
3060 HW_MODE_SS_0x0,
3061 HW_MODE_SS_1x1,
3062 HW_MODE_SS_2x2,
3063 HW_MODE_SS_3x3,
3064 HW_MODE_SS_4x4,
3065};
3066
3067/**
3068 * enum hw_mode_bandwidth - bandwidth of wifi channel.
3069 *
3070 * @HW_MODE_5_MHZ: 5 Mhz bandwidth
3071 * @HW_MODE_10_MHZ: 10 Mhz bandwidth
3072 * @HW_MODE_20_MHZ: 20 Mhz bandwidth
3073 * @HW_MODE_40_MHZ: 40 Mhz bandwidth
3074 * @HW_MODE_80_MHZ: 80 Mhz bandwidth
3075 * @HW_MODE_80_PLUS_80_MHZ: 80 Mhz plus 80 Mhz bandwidth
3076 * @HW_MODE_160_MHZ: 160 Mhz bandwidth
3077 * @HW_MODE_MAX_BANDWIDTH: Max place holder
3078 *
3079 * These are generic IDs that identify the various roles
3080 * in the software system
3081 */
3082enum hw_mode_bandwidth {
3083 HW_MODE_BW_NONE,
3084 HW_MODE_5_MHZ,
3085 HW_MODE_10_MHZ,
3086 HW_MODE_20_MHZ,
3087 HW_MODE_40_MHZ,
3088 HW_MODE_80_MHZ,
3089 HW_MODE_80_PLUS_80_MHZ,
3090 HW_MODE_160_MHZ,
3091 HW_MODE_MAX_BANDWIDTH
3092};
3093
3094/**
3095 * enum hw_mode_dbs_capab - DBS HW mode capability
3096 * @HW_MODE_DBS_NONE: Non DBS capable
3097 * @HW_MODE_DBS: DFS capable
3098 */
3099enum hw_mode_dbs_capab {
3100 HW_MODE_DBS_NONE,
3101 HW_MODE_DBS,
3102};
3103
3104/**
3105 * enum hw_mode_agile_dfs_capab - Agile DFS HW mode capability
3106 * @HW_MODE_AGILE_DFS_NONE: Non Agile DFS capable
3107 * @HW_MODE_AGILE_DFS: Agile DFS capable
3108 */
3109enum hw_mode_agile_dfs_capab {
3110 HW_MODE_AGILE_DFS_NONE,
3111 HW_MODE_AGILE_DFS,
3112};
3113
3114/**
3115 * enum set_hw_mode_status - Status of set HW mode command
3116 * @SET_HW_MODE_STATUS_OK: command successful
3117 * @SET_HW_MODE_STATUS_EINVAL: Requested invalid hw_mode
3118 * @SET_HW_MODE_STATUS_ECANCELED: HW mode change cancelled
3119 * @SET_HW_MODE_STATUS_ENOTSUP: HW mode not supported
3120 * @SET_HW_MODE_STATUS_EHARDWARE: HW mode change prevented by hardware
3121 * @SET_HW_MODE_STATUS_EPENDING: HW mode change is pending
3122 * @SET_HW_MODE_STATUS_ECOEX: HW mode change conflict with Coex
3123 */
3124enum set_hw_mode_status {
3125 SET_HW_MODE_STATUS_OK,
3126 SET_HW_MODE_STATUS_EINVAL,
3127 SET_HW_MODE_STATUS_ECANCELED,
3128 SET_HW_MODE_STATUS_ENOTSUP,
3129 SET_HW_MODE_STATUS_EHARDWARE,
3130 SET_HW_MODE_STATUS_EPENDING,
3131 SET_HW_MODE_STATUS_ECOEX,
3132};
3133
3134/**
3135 * struct sir_pcl_list - Format of PCL
3136 * @pcl_list: List of preferred channels
3137 * @pcl_len: Number of channels in the PCL
3138 */
3139struct sir_pcl_list {
3140 uint8_t pcl_list[128];
3141 uint32_t pcl_len;
3142};
3143
3144/**
3145 * struct sir_hw_mode_params - HW mode params
3146 * @mac0_tx_ss: MAC0 Tx spatial stream
3147 * @mac0_rx_ss: MAC0 Rx spatial stream
3148 * @mac1_tx_ss: MAC1 Tx spatial stream
3149 * @mac1_rx_ss: MAC1 Rx spatial stream
3150 * @mac0_bw: MAC0 bandwidth
3151 * @mac1_bw: MAC1 bandwidth
3152 * @dbs_cap: DBS capabality
3153 * @agile_dfs_cap: Agile DFS capabality
3154 */
3155struct sir_hw_mode_params {
3156 uint8_t mac0_tx_ss;
3157 uint8_t mac0_rx_ss;
3158 uint8_t mac1_tx_ss;
3159 uint8_t mac1_rx_ss;
3160 uint8_t mac0_bw;
3161 uint8_t mac1_bw;
3162 uint8_t dbs_cap;
3163 uint8_t agile_dfs_cap;
3164};
3165
3166/**
3167 * struct sir_vdev_mac_map - vdev id-mac id map
3168 * @vdev_id: VDEV id
3169 * @mac_id: MAC id
3170 */
3171struct sir_vdev_mac_map {
3172 uint32_t vdev_id;
3173 uint32_t mac_id;
3174};
3175
3176/**
3177 * struct sir_set_hw_mode_resp - HW mode response
3178 * @status: Status
3179 * @cfgd_hw_mode_index: Configured HW mode index
3180 * @num_vdev_mac_entries: Number of vdev-mac id entries
3181 * @vdev_mac_map: vdev id-mac id map
3182 */
3183struct sir_set_hw_mode_resp {
3184 uint32_t status;
3185 uint32_t cfgd_hw_mode_index;
3186 uint32_t num_vdev_mac_entries;
3187 struct sir_vdev_mac_map vdev_mac_map[MAX_VDEV_SUPPORTED];
3188};
3189
3190/**
3191 * struct sir_hw_mode_trans_ind - HW mode transition indication
3192 * @old_hw_mode_index: Index of old HW mode
3193 * @new_hw_mode_index: Index of new HW mode
3194 * @num_vdev_mac_entries: Number of vdev-mac id entries
3195 * @vdev_mac_map: vdev id-mac id map
3196 */
3197struct sir_hw_mode_trans_ind {
3198 uint32_t old_hw_mode_index;
3199 uint32_t new_hw_mode_index;
3200 uint32_t num_vdev_mac_entries;
3201 struct sir_vdev_mac_map vdev_mac_map[MAX_VDEV_SUPPORTED];
3202};
3203
3204/**
3205 * struct sir_dual_mac_config_resp - Dual MAC config response
3206 * @status: Status of setting the dual mac configuration
3207 */
3208struct sir_dual_mac_config_resp {
3209 uint32_t status;
3210};
3211
3212/*---------------------------------------------------------------------------
3213* WMA_GTK_OFFLOAD_GETINFO_REQ
3214*--------------------------------------------------------------------------*/
3215typedef struct {
3216 uint16_t mesgType;
3217 uint16_t mesgLen;
3218
3219 uint32_t ulStatus; /* success or failure */
3220 uint64_t ullKeyReplayCounter; /* current replay counter value */
3221 uint32_t ulTotalRekeyCount; /* total rekey attempts */
3222 uint32_t ulGTKRekeyCount; /* successful GTK rekeys */
3223 uint32_t ulIGTKRekeyCount; /* successful iGTK rekeys */
3224 tSirMacAddr bssId;
3225} tSirGtkOffloadGetInfoRspParams, *tpSirGtkOffloadGetInfoRspParams;
3226#endif /* WLAN_FEATURE_GTK_OFFLOAD */
3227
3228#ifdef WLAN_WAKEUP_EVENTS
3229/*---------------------------------------------------------------------------
3230 tSirWakeReasonInd
3231 ---------------------------------------------------------------------------*/
3232typedef struct {
3233 uint16_t mesgType;
3234 uint16_t mesgLen;
3235 uint32_t ulReason; /* see tWakeReasonType */
3236 uint32_t ulReasonArg; /* argument specific to the reason type */
3237 /* length of optional data stored in this message, in case
3238 * HAL truncates the data (i.e. data packets) this length
3239 * will be less than the actual length
3240 */
3241 uint32_t ulStoredDataLen;
3242 uint32_t ulActualDataLen; /* actual length of data */
3243 /* variable length start of data (length == storedDataLen)
3244 * see specific wake type
3245 */
3246 uint8_t aDataStart[1];
3247} tSirWakeReasonInd, *tpSirWakeReasonInd;
3248#endif /* WLAN_WAKEUP_EVENTS */
3249
3250/*---------------------------------------------------------------------------
3251 sAniSetTmLevelReq
3252 ---------------------------------------------------------------------------*/
3253typedef struct sAniSetTmLevelReq {
3254 uint16_t tmMode;
3255 uint16_t newTmLevel;
3256} tAniSetTmLevelReq, *tpAniSetTmLevelReq;
3257
3258#ifdef FEATURE_WLAN_TDLS
3259/* TDLS Request struct SME-->PE */
3260typedef struct sSirTdlsSendMgmtReq {
3261 uint16_t messageType; /* eWNI_SME_TDLS_DISCOVERY_START_REQ */
3262 uint16_t length;
3263 uint8_t sessionId; /* Session ID */
3264 uint16_t transactionId; /* Transaction ID for cmd */
3265 uint8_t reqType;
3266 uint8_t dialog;
3267 uint16_t statusCode;
3268 uint8_t responder;
3269 uint32_t peerCapability;
3270 /* For multi-session, for PE to locate peSession ID */
3271 tSirMacAddr bssid;
3272 tSirMacAddr peerMac;
3273 /* Variable lenght. Dont add any field after this. */
3274 uint8_t addIe[1];
3275} tSirTdlsSendMgmtReq, *tpSirSmeTdlsSendMgmtReq;
3276
3277typedef enum TdlsAddOper {
3278 TDLS_OPER_NONE,
3279 TDLS_OPER_ADD,
3280 TDLS_OPER_UPDATE
3281} eTdlsAddOper;
3282
3283/* TDLS Request struct SME-->PE */
3284typedef struct sSirTdlsAddStaReq {
3285 uint16_t messageType; /* eWNI_SME_TDLS_DISCOVERY_START_REQ */
3286 uint16_t length;
3287 uint8_t sessionId; /* Session ID */
3288 uint16_t transactionId; /* Transaction ID for cmd */
3289 /* For multi-session, for PE to locate peSession ID */
3290 tSirMacAddr bssid;
3291 eTdlsAddOper tdlsAddOper;
3292 tSirMacAddr peerMac;
3293 uint16_t capability;
3294 uint8_t extn_capability[SIR_MAC_MAX_EXTN_CAP];
3295 uint8_t supported_rates_length;
3296 uint8_t supported_rates[SIR_MAC_MAX_SUPP_RATES];
3297 uint8_t htcap_present;
3298 tSirHTCap htCap;
3299 uint8_t vhtcap_present;
3300 tSirVHTCap vhtCap;
3301 uint8_t uapsd_queues;
3302 uint8_t max_sp;
3303} tSirTdlsAddStaReq, *tpSirSmeTdlsAddStaReq;
3304
3305/* TDLS Response struct PE-->SME */
3306typedef struct sSirTdlsAddStaRsp {
3307 uint16_t messageType;
3308 uint16_t length;
3309 tSirResultCodes statusCode;
3310 tSirMacAddr peerMac;
3311 uint8_t sessionId; /* Session ID */
3312 uint16_t staId;
3313 uint16_t staType;
3314 uint8_t ucastSig;
3315 uint8_t bcastSig;
3316 eTdlsAddOper tdlsAddOper;
3317} tSirTdlsAddStaRsp;
3318
3319/* TDLS Request struct SME-->PE */
3320typedef struct {
3321 uint16_t messageType; /* eWNI_SME_TDLS_LINK_ESTABLISH_REQ */
3322 uint16_t length;
3323 uint8_t sessionId; /* Session ID */
3324 uint16_t transactionId; /* Transaction ID for cmd */
3325 uint8_t uapsdQueues; /* Peer's uapsd Queues Information */
3326 uint8_t maxSp; /* Peer's Supported Maximum Service Period */
3327 uint8_t isBufSta; /* Does Peer Support as Buffer Station. */
3328 /* Does Peer Support as TDLS Off Channel. */
3329 uint8_t isOffChannelSupported;
3330 uint8_t isResponder; /* Is Peer a responder. */
3331 /* For multi-session, for PE to locate peSession ID */
3332 tSirMacAddr bssid;
3333 tSirMacAddr peerMac;
3334 uint8_t supportedChannelsLen;
3335 uint8_t supportedChannels[SIR_MAC_MAX_SUPP_CHANNELS];
3336 uint8_t supportedOperClassesLen;
3337 uint8_t supportedOperClasses[SIR_MAC_MAX_SUPP_OPER_CLASSES];
3338} tSirTdlsLinkEstablishReq, *tpSirTdlsLinkEstablishReq;
3339
3340/* TDLS Request struct SME-->PE */
3341typedef struct {
3342 uint16_t messageType; /* eWNI_SME_TDLS_LINK_ESTABLISH_RSP */
3343 uint16_t length;
3344 uint8_t sessionId; /* Session ID */
3345 uint16_t transactionId; /* Transaction ID for cmd */
3346 tSirResultCodes statusCode;
3347 tSirMacAddr peerMac;
3348} tSirTdlsLinkEstablishReqRsp, *tpSirTdlsLinkEstablishReqRsp;
3349
3350/* TDLS Request struct SME-->PE */
3351typedef struct sSirTdlsDelStaReq {
3352 uint16_t messageType; /* eWNI_SME_TDLS_DISCOVERY_START_REQ */
3353 uint16_t length;
3354 uint8_t sessionId; /* Session ID */
3355 uint16_t transactionId; /* Transaction ID for cmd */
3356 /* For multi-session, for PE to locate peSession ID */
3357 tSirMacAddr bssid;
3358 tSirMacAddr peerMac;
3359} tSirTdlsDelStaReq, *tpSirSmeTdlsDelStaReq;
3360/* TDLS Response struct PE-->SME */
3361typedef struct sSirTdlsDelStaRsp {
3362 uint16_t messageType;
3363 uint16_t length;
3364 uint8_t sessionId; /* Session ID */
3365 tSirResultCodes statusCode;
3366 tSirMacAddr peerMac;
3367 uint16_t staId;
3368} tSirTdlsDelStaRsp, *tpSirTdlsDelStaRsp;
3369/* TDLS Delete Indication struct PE-->SME */
3370typedef struct sSirTdlsDelStaInd {
3371 uint16_t messageType;
3372 uint16_t length;
3373 uint8_t sessionId; /* Session ID */
3374 tSirMacAddr peerMac;
3375 uint16_t staId;
3376 uint16_t reasonCode;
3377} tSirTdlsDelStaInd, *tpSirTdlsDelStaInd;
3378typedef struct sSirTdlsDelAllPeerInd {
3379 uint16_t messageType;
3380 uint16_t length;
3381 uint8_t sessionId; /* Session ID */
3382} tSirTdlsDelAllPeerInd, *tpSirTdlsDelAllPeerInd;
3383#ifdef FEATURE_WLAN_TDLS_DISAPPEAR_AP
3384typedef struct sSirTdlsDisappearAPInd {
3385 uint16_t messageType;
3386 uint16_t length;
3387 uint8_t sessionId; /* Session ID */
3388 uint16_t staId;
3389 tSirMacAddr staAddr;
3390} tSirTdlsDisappearAPInd, *tpSirTdlsDisappearAPInd;
3391#endif
3392typedef struct sSirMgmtTxCompletionInd {
3393 uint16_t messageType;
3394 uint16_t length;
3395 uint8_t sessionId; /* Session ID */
3396 uint32_t txCompleteStatus;
3397} tSirMgmtTxCompletionInd, *tpSirMgmtTxCompletionInd;
3398
3399typedef struct sSirTdlsEventnotify {
3400 uint8_t sessionId;
3401 tSirMacAddr peerMac;
3402 uint16_t messageType;
3403 uint32_t peer_reason;
3404} tSirTdlsEventnotify;
3405#endif /* FEATURE_WLAN_TDLS */
3406
3407typedef struct sSirActiveModeSetBcnFilterReq {
3408 uint16_t messageType;
3409 uint16_t length;
3410 uint8_t seesionId;
3411} tSirSetActiveModeSetBncFilterReq, *tpSirSetActiveModeSetBncFilterReq;
3412
3413/* Reset AP Caps Changed */
3414typedef struct sSirResetAPCapsChange {
3415 uint16_t messageType;
3416 uint16_t length;
3417 tSirMacAddr bssId;
3418} tSirResetAPCapsChange, *tpSirResetAPCapsChange;
3419
3420/* / Definition for Candidate found indication from FW */
3421typedef struct sSirSmeCandidateFoundInd {
3422 uint16_t messageType; /* eWNI_SME_CANDIDATE_FOUND_IND */
3423 uint16_t length;
3424 uint8_t sessionId; /* Session Identifier */
3425} tSirSmeCandidateFoundInd, *tpSirSmeCandidateFoundInd;
3426
3427#ifdef WLAN_FEATURE_11W
3428typedef struct sSirWlanExcludeUnencryptParam {
3429 bool excludeUnencrypt;
3430 tSirMacAddr bssId;
3431} tSirWlanExcludeUnencryptParam, *tpSirWlanExcludeUnencryptParam;
3432#endif
3433
3434typedef enum {
3435 P2P_SCAN_TYPE_SEARCH = 1, /* P2P Search */
3436 P2P_SCAN_TYPE_LISTEN /* P2P Listen */
3437} tSirP2pScanType;
3438
3439typedef struct sAniHandoffReq {
3440 /* Common for all types are requests */
3441 uint16_t msgType; /* message type is same as the request type */
3442 uint16_t msgLen; /* length of the entire request */
3443 uint8_t sessionId;
3444 uint8_t bssid[CDF_MAC_ADDR_SIZE];
3445 uint8_t channel;
3446 uint8_t handoff_src;
3447} tAniHandoffReq, *tpAniHandoffReq;
3448
3449typedef struct sSirScanOffloadReq {
3450 uint8_t sessionId;
3451 tSirMacAddr bssId;
3452 uint8_t numSsid;
3453 tSirMacSSid ssId[SIR_SCAN_MAX_NUM_SSID];
3454 uint8_t hiddenSsid;
3455 tSirMacAddr selfMacAddr;
3456 tSirBssType bssType;
3457 uint8_t dot11mode;
3458 tSirScanType scanType;
3459 uint32_t minChannelTime;
3460 uint32_t maxChannelTime;
3461 uint32_t scan_id;
3462 /* in units of milliseconds, ignored when not connected */
3463 uint32_t restTime;
3464 tSirP2pScanType p2pScanType;
3465 uint16_t uIEFieldLen;
3466 uint16_t uIEFieldOffset;
3467 tSirChannelList channelList;
3468 /*-----------------------------
3469 sSirScanOffloadReq....
3470 -----------------------------
3471 uIEFieldLen
3472 -----------------------------
3473 uIEFieldOffset ----+
3474 ----------------------------- |
3475 channelList.numChannels |
3476 ----------------------------- |
3477 ... variable size up to |
3478 channelNumber[numChannels-1] |
3479 This can be zero, if |
3480 numChannel is zero. |
3481 ----------------------------- <--+
3482 ... variable size uIEField
3483 up to uIEFieldLen (can be 0)
3484 -----------------------------*/
3485} tSirScanOffloadReq, *tpSirScanOffloadReq;
3486
3487typedef enum sSirScanEventType {
3488 SCAN_EVENT_STARTED = 0x1, /* Scan command accepted by FW */
3489 SCAN_EVENT_COMPLETED = 0x2, /* Scan has been completed by FW */
3490 SCAN_EVENT_BSS_CHANNEL = 0x4, /* FW is going to move to HOME ch */
3491 SCAN_EVENT_FOREIGN_CHANNEL = 0x8, /* FW going to move to FORIEGN ch */
3492 SCAN_EVENT_DEQUEUED = 0x10, /* scan request got dequeued */
3493 SCAN_EVENT_PREEMPTED = 0x20, /* preempted by high priority scan */
3494 SCAN_EVENT_START_FAILED = 0x40, /* scan start failed */
3495 SCAN_EVENT_RESTARTED = 0x80, /*scan restarted */
3496 SCAN_EVENT_MAX = 0x8000
3497} tSirScanEventType;
3498
3499typedef struct sSirScanOffloadEvent {
3500 tSirScanEventType event;
3501 tSirResultCodes reasonCode;
3502 uint32_t chanFreq;
3503 uint32_t requestor;
3504 uint32_t scanId;
3505 tSirP2pScanType p2pScanType;
3506 uint8_t sessionId;
3507} tSirScanOffloadEvent, *tpSirScanOffloadEvent;
3508
3509/**
3510 * struct sSirUpdateChanParam - channel parameters
3511 * @chanId: ID of the channel
3512 * @pwr: power level
3513 * @dfsSet: is dfs supported or not
3514 * @half_rate: is the channel operating at 10MHz
3515 * @quarter_rate: is the channel operating at 5MHz
3516 */
3517typedef struct sSirUpdateChanParam {
3518 uint8_t chanId;
3519 uint8_t pwr;
3520 bool dfsSet;
3521 bool half_rate;
3522 bool quarter_rate;
3523} tSirUpdateChanParam, *tpSirUpdateChanParam;
3524
3525typedef struct sSirUpdateChan {
3526 uint8_t numChan;
3527 tSirUpdateChanParam chanParam[1];
3528} tSirUpdateChanList, *tpSirUpdateChanList;
3529
3530typedef enum eSirAddonPsReq {
3531 eSIR_ADDON_NOTHING,
3532 eSIR_ADDON_ENABLE_UAPSD,
3533 eSIR_ADDON_DISABLE_UAPSD
3534} tSirAddonPsReq;
3535
3536/* Powersave Offload data */
3537typedef struct sSirPsReqData {
3538 /* BSSID */
3539 tSirMacAddr bssId;
3540
3541 /* Additional Info */
3542 tSirAddonPsReq addOnReq;
3543} tSirPsReqData, *tpSirPsReqData;
3544
3545#ifdef FEATURE_WLAN_LPHB
3546#define SIR_LPHB_FILTER_LEN 64
3547
3548typedef enum {
3549 LPHB_SET_EN_PARAMS_INDID,
3550 LPHB_SET_TCP_PARAMS_INDID,
3551 LPHB_SET_TCP_PKT_FILTER_INDID,
3552 LPHB_SET_UDP_PARAMS_INDID,
3553 LPHB_SET_UDP_PKT_FILTER_INDID,
3554 LPHB_SET_NETWORK_INFO_INDID,
3555} LPHBIndType;
3556
3557typedef struct sSirLPHBEnableStruct {
3558 uint8_t enable;
3559 uint8_t item;
3560 uint8_t session;
3561} tSirLPHBEnableStruct;
3562
3563typedef struct sSirLPHBTcpParamStruct {
3564 uint32_t srv_ip;
3565 uint32_t dev_ip;
3566 uint16_t src_port;
3567 uint16_t dst_port;
3568 uint16_t timeout;
3569 uint8_t session;
3570 tSirMacAddr gateway_mac;
3571 uint16_t timePeriodSec; /* in seconds */
3572 uint32_t tcpSn;
3573} tSirLPHBTcpParamStruct;
3574
3575typedef struct sSirLPHBTcpFilterStruct {
3576 uint16_t length;
3577 uint8_t offset;
3578 uint8_t session;
3579 uint8_t filter[SIR_LPHB_FILTER_LEN];
3580} tSirLPHBTcpFilterStruct;
3581
3582typedef struct sSirLPHBUdpParamStruct {
3583 uint32_t srv_ip;
3584 uint32_t dev_ip;
3585 uint16_t src_port;
3586 uint16_t dst_port;
3587 uint16_t interval;
3588 uint16_t timeout;
3589 uint8_t session;
3590 tSirMacAddr gateway_mac;
3591} tSirLPHBUdpParamStruct;
3592
3593typedef struct sSirLPHBUdpFilterStruct {
3594 uint16_t length;
3595 uint8_t offset;
3596 uint8_t session;
3597 uint8_t filter[SIR_LPHB_FILTER_LEN];
3598} tSirLPHBUdpFilterStruct;
3599
3600typedef struct sSirLPHBReq {
3601 uint16_t cmd;
3602 uint16_t dummy;
3603 union {
3604 tSirLPHBEnableStruct lphbEnableReq;
3605 tSirLPHBTcpParamStruct lphbTcpParamReq;
3606 tSirLPHBTcpFilterStruct lphbTcpFilterReq;
3607 tSirLPHBUdpParamStruct lphbUdpParamReq;
3608 tSirLPHBUdpFilterStruct lphbUdpFilterReq;
3609 } params;
3610} tSirLPHBReq;
3611
3612typedef struct sSirLPHBInd {
3613 uint8_t sessionIdx;
3614 uint8_t protocolType; /*TCP or UDP */
3615 uint8_t eventReason;
3616} tSirLPHBInd;
3617#endif /* FEATURE_WLAN_LPHB */
3618
3619#ifdef FEATURE_WLAN_CH_AVOID
3620typedef struct sSirChAvoidUpdateReq {
3621 uint32_t reserved_param;
3622} tSirChAvoidUpdateReq;
3623#endif /* FEATURE_WLAN_CH_AVOID */
3624
3625typedef struct sSirLinkSpeedInfo {
3626 /* MAC Address for the peer */
3627 tSirMacAddr peer_macaddr;
3628 uint32_t estLinkSpeed; /* Linkspeed from firmware */
3629} tSirLinkSpeedInfo, *tpSirLinkSpeedInfo;
3630
3631typedef struct sSirAddPeriodicTxPtrn {
3632 /* MAC Address for the adapter */
3633 tSirMacAddr macAddress;
3634 uint8_t ucPtrnId; /* Pattern ID */
3635 uint16_t ucPtrnSize; /* Pattern size */
3636 uint32_t usPtrnIntervalMs; /* In msec */
3637 uint8_t ucPattern[PERIODIC_TX_PTRN_MAX_SIZE]; /* Pattern buffer */
3638} tSirAddPeriodicTxPtrn, *tpSirAddPeriodicTxPtrn;
3639
3640typedef struct sSirDelPeriodicTxPtrn {
3641 /* MAC Address for the adapter */
3642 tSirMacAddr macAddress;
3643 /* Bitmap of pattern IDs that need to be deleted */
3644 uint32_t ucPatternIdBitmap;
3645 uint8_t ucPtrnId; /* Pattern ID */
3646} tSirDelPeriodicTxPtrn, *tpSirDelPeriodicTxPtrn;
3647
3648typedef struct {
3649 uint16_t mesgType;
3650 uint16_t mesgLen;
3651 bool suspended;
3652} tSirReadyToSuspendInd, *tpSirReadyToSuspendInd;
3653#ifdef WLAN_FEATURE_EXTWOW_SUPPORT
3654typedef struct {
3655 uint16_t mesgType;
3656 uint16_t mesgLen;
3657 bool status;
3658} tSirReadyToExtWoWInd, *tpSirReadyToExtWoWInd;
3659#endif
3660typedef struct sSirRateUpdateInd {
3661 uint8_t nss; /* 0: 1x1, 1: 2x2 */
3662 tSirMacAddr bssid;
3663 tCDF_CON_MODE dev_mode;
3664 int32_t bcastDataRate; /* bcast rate unit Mbpsx10, -1:not used */
3665 /*
3666 * 0 implies RA, positive value implies fixed rate, -1 implies ignore
3667 * this param.
3668 */
3669 int32_t ucastDataRate;
3670
3671 /* TX flag to differentiate between HT20, HT40 etc */
3672 tTxrateinfoflags ucastDataRateTxFlag;
3673
3674 /*
3675 * 0 implies MCAST RA, positive value implies fixed rate,
3676 * -1 implies ignore this param
3677 */
3678 int32_t reliableMcastDataRate; /* unit Mbpsx10 */
3679
3680 /* TX flag to differentiate between HT20, HT40 etc */
3681 tTxrateinfoflags reliableMcastDataRateTxFlag;
3682
3683 /*
3684 * MCAST(or BCAST) fixed data rate in 2.4 GHz, unit Mbpsx10,
3685 * 0 implies ignore
3686 */
3687 uint32_t mcastDataRate24GHz;
3688
3689 /* TX flag to differentiate between HT20, HT40 etc */
3690 tTxrateinfoflags mcastDataRate24GHzTxFlag;
3691
3692 /*
3693 * MCAST(or BCAST) fixed data rate in 5 GHz,
3694 * unit Mbpsx10, 0 implies ignore
3695 */
3696 uint32_t mcastDataRate5GHz;
3697
3698 /* TX flag to differentiate between HT20, HT40 etc */
3699 tTxrateinfoflags mcastDataRate5GHzTxFlag;
3700
3701} tSirRateUpdateInd, *tpSirRateUpdateInd;
3702
3703#if defined(FEATURE_WLAN_CH_AVOID) || defined(FEATURE_WLAN_FORCE_SAP_SCC)
3704#define SIR_CH_AVOID_MAX_RANGE 4
3705
3706typedef struct sSirChAvoidFreqType {
3707 uint32_t start_freq;
3708 uint32_t end_freq;
3709} tSirChAvoidFreqType;
3710
3711typedef struct sSirChAvoidIndType {
3712 uint32_t avoid_range_count;
3713 tSirChAvoidFreqType avoid_freq_range[SIR_CH_AVOID_MAX_RANGE];
3714} tSirChAvoidIndType;
3715#endif /* FEATURE_WLAN_CH_AVOID || FEATURE_WLAN_FORCE_SAP_SCC */
3716
3717#define SIR_DFS_MAX_20M_SUB_CH 8
3718
3719typedef struct sSirSmeDfsChannelList {
3720 uint32_t nchannels;
3721 /* Ch num including bonded channels on which the RADAR is present */
3722 uint8_t channels[SIR_DFS_MAX_20M_SUB_CH];
3723} tSirSmeDfsChannelList, *tpSirSmeDfsChannelList;
3724
3725typedef struct sSirSmeDfsEventInd {
3726 uint32_t sessionId;
3727 tSirSmeDfsChannelList chan_list;
3728 uint32_t dfs_radar_status;
3729 int use_nol;
3730} tSirSmeDfsEventInd, *tpSirSmeDfsEventInd;
3731
3732typedef struct sSirChanChangeRequest {
3733 uint16_t messageType;
3734 uint16_t messageLen;
3735 uint8_t targetChannel;
3736 uint8_t cbMode;
3737 uint8_t channel_width;
3738 uint8_t center_freq_seg_0;
3739 uint8_t center_freq_seg_1;
3740 uint8_t bssid[CDF_MAC_ADDR_SIZE];
3741 uint32_t dot11mode;
3742 tSirMacRateSet operational_rateset;
3743 tSirMacRateSet extended_rateset;
3744} tSirChanChangeRequest, *tpSirChanChangeRequest;
3745
3746typedef struct sSirChanChangeResponse {
3747 uint8_t sessionId;
3748 uint8_t newChannelNumber;
3749 uint8_t channelChangeStatus;
3750 ePhyChanBondState secondaryChannelOffset;
3751} tSirChanChangeResponse, *tpSirChanChangeResponse;
3752
3753typedef struct sSirStartBeaconIndication {
3754 uint16_t messageType;
3755 uint16_t messageLen;
3756 uint8_t beaconStartStatus;
3757 uint8_t bssid[CDF_MAC_ADDR_SIZE];
3758} tSirStartBeaconIndication, *tpSirStartBeaconIndication;
3759
3760/* additional IE type */
3761typedef enum tUpdateIEsType {
3762 eUPDATE_IE_NONE,
3763 eUPDATE_IE_PROBE_BCN,
3764 eUPDATE_IE_PROBE_RESP,
3765 eUPDATE_IE_ASSOC_RESP,
3766
3767 /* Add type above this line */
3768 /* this is used to reset all buffer */
3769 eUPDATE_IE_ALL,
3770 eUPDATE_IE_MAX
3771} eUpdateIEsType;
3772
3773/* Modify particular IE in addition IE for prob resp Bcn */
3774typedef struct sSirModifyIE {
3775 tSirMacAddr bssid;
3776 uint16_t smeSessionId;
3777 bool notify;
3778 uint8_t ieID;
3779 uint8_t ieIDLen; /*ie length as per spec */
3780 uint16_t ieBufferlength;
3781 uint8_t *pIEBuffer;
3782
3783} tSirModifyIE, *tpSirModifyIE;
3784
3785/* Message format for Update IE message sent to PE */
3786typedef struct sSirModifyIEsInd {
3787 uint16_t msgType;
3788 uint16_t msgLen;
3789 tSirModifyIE modifyIE;
3790 eUpdateIEsType updateType;
3791} tSirModifyIEsInd, *tpSirModifyIEsInd;
3792
3793/* Message format for Update IE message sent to PE */
3794typedef struct sSirUpdateIE {
3795 tSirMacAddr bssid;
3796 uint16_t smeSessionId;
3797 bool append;
3798 bool notify;
3799 uint16_t ieBufferlength;
3800 uint8_t *pAdditionIEBuffer;
3801} tSirUpdateIE, *tpSirUpdateIE;
3802
3803/* Message format for Update IE message sent to PE */
3804typedef struct sSirUpdateIEsInd {
3805 uint16_t msgType;
3806 uint16_t msgLen;
3807 tSirUpdateIE updateIE;
3808 eUpdateIEsType updateType;
3809} tSirUpdateIEsInd, *tpSirUpdateIEsInd;
3810
3811/* Message format for requesting channel switch announcement to lower layers */
3812typedef struct sSirDfsCsaIeRequest {
3813 uint16_t msgType;
3814 uint16_t msgLen;
3815 uint8_t targetChannel;
3816 uint8_t csaIeRequired;
3817 uint8_t bssid[CDF_MAC_ADDR_SIZE];
3818 uint8_t ch_bandwidth;
3819} tSirDfsCsaIeRequest, *tpSirDfsCsaIeRequest;
3820
3821/* Indication from lower layer indicating the completion of first beacon send
3822 * after the beacon template update
3823 */
3824typedef struct sSirFirstBeaconTxCompleteInd {
3825 uint16_t messageType; /* eWNI_SME_MISSED_BEACON_IND */
3826 uint16_t length;
3827 uint8_t bssIdx;
3828} tSirFirstBeaconTxCompleteInd, *tpSirFirstBeaconTxCompleteInd;
3829
3830typedef struct sSirSmeCSAIeTxCompleteRsp {
3831 uint8_t sessionId;
3832 uint8_t chanSwIeTxStatus;
3833} tSirSmeCSAIeTxCompleteRsp, *tpSirSmeCSAIeTxCompleteRsp;
3834
3835/* Thermal Mitigation*/
3836
3837typedef struct {
3838 uint16_t minTempThreshold;
3839 uint16_t maxTempThreshold;
3840} t_thermal_level_info, *tp_thermal_level_info;
3841
3842typedef enum {
3843 WLAN_WMA_THERMAL_LEVEL_0,
3844 WLAN_WMA_THERMAL_LEVEL_1,
3845 WLAN_WMA_THERMAL_LEVEL_2,
3846 WLAN_WMA_THERMAL_LEVEL_3,
3847 WLAN_WMA_MAX_THERMAL_LEVELS
3848} t_thermal_level;
3849
3850typedef struct {
3851 /* Array of thermal levels */
3852 t_thermal_level_info thermalLevels[WLAN_WMA_MAX_THERMAL_LEVELS];
3853 uint8_t thermalCurrLevel;
3854 uint8_t thermalMgmtEnabled;
3855 uint32_t throttlePeriod;
3856} t_thermal_mgmt, *tp_thermal_mgmt;
3857
3858typedef struct sSirTxPowerLimit {
3859 /* Thermal limits for 2g and 5g */
3860 uint32_t txPower2g;
3861 uint32_t txPower5g;
3862} tSirTxPowerLimit;
3863
3864/* notify MODEM power state to FW */
3865typedef struct {
3866 uint32_t param;
3867} tSirModemPowerStateInd, *tpSirModemPowerStateInd;
3868
3869#ifdef WLAN_FEATURE_STATS_EXT
3870typedef struct {
3871 uint32_t vdev_id;
3872 uint32_t event_data_len;
3873 uint8_t event_data[];
3874} tSirStatsExtEvent, *tpSirStatsExtEvent;
3875#endif
3876
3877#ifdef WLAN_FEATURE_NAN
3878typedef struct {
3879 uint32_t event_data_len;
3880 uint8_t event_data[];
3881} tSirNanEvent, *tpSirNanEvent;
3882#endif
3883#ifdef WLAN_FEATURE_ROAM_OFFLOAD
3884typedef struct sSirSmeRoamOffloadSynchInd {
3885 uint16_t messageType; /*eWNI_SME_ROAM_OFFLOAD_SYNCH_IND */
3886 uint16_t length;
3887 uint16_t beaconProbeRespOffset;
3888 uint16_t beaconProbeRespLength;
3889 uint16_t reassocRespOffset;
3890 uint16_t reassocRespLength;
3891 uint8_t isBeacon;
3892 uint8_t roamedVdevId;
3893 tSirMacAddr bssId;
3894 int8_t txMgmtPower;
3895 uint32_t authStatus;
3896 uint8_t rssi;
3897 uint8_t roamReason;
3898 uint32_t chan_freq;
3899 uint8_t kck[SIR_KCK_KEY_LEN];
3900 uint8_t kek[SIR_KEK_KEY_LEN];
3901 uint8_t replay_ctr[SIR_REPLAY_CTR_LEN];
3902 tpSirBssDescription bss_desc_ptr;
3903} roam_offload_synch_ind;
3904
3905typedef struct sSirSmeRoamOffloadSynchCnf {
3906 uint8_t sessionId;
3907} tSirSmeRoamOffloadSynchCnf, *tpSirSmeRoamOffloadSynchCnf;
3908
3909typedef struct sSirSmeHOFailureInd {
3910 uint8_t sessionId;
3911} tSirSmeHOFailureInd, *tpSirSmeHOFailureInd;
3912
3913struct roam_offload_synch_fail {
3914 uint8_t session_id;
3915};
3916
3917#endif
3918
3919#ifdef FEATURE_WLAN_EXTSCAN
3920
3921/**
3922 * typedef enum wifi_scan_flags - wifi scan flags
3923 * @WIFI_SCAN_FLAG_INTERRUPTED: Indicates that scan results are not complete
3924 * because probes were not sent on some channels
3925 */
3926typedef enum {
3927 WIFI_SCAN_FLAG_INTERRUPTED = 1,
3928} wifi_scan_flags;
3929
3930typedef enum {
3931 WIFI_BAND_UNSPECIFIED,
3932 WIFI_BAND_BG = 1, /* 2.4 GHz */
3933 WIFI_BAND_A = 2, /* 5 GHz without DFS */
3934 WIFI_BAND_ABG = 3, /* 2.4 GHz + 5 GHz; no DFS */
3935 WIFI_BAND_A_DFS_ONLY = 4, /* 5 GHz DFS only */
3936 /* 5 is reserved */
3937 WIFI_BAND_A_WITH_DFS = 6, /* 5 GHz with DFS */
3938 WIFI_BAND_ABG_WITH_DFS = 7, /* 2.4 GHz + 5 GHz with DFS */
3939
3940 /* Keep it last */
3941 WIFI_BAND_MAX
3942} tWifiBand;
3943
3944/* wifi scan related events */
3945typedef enum {
3946 WIFI_SCAN_BUFFER_FULL,
3947 WIFI_SCAN_COMPLETE,
3948} tWifiScanEventType;
3949
3950/**
3951 * enum extscan_configuration_flags - extscan config flags
3952 * @EXTSCAN_LP_EXTENDED_BATCHING: extended batching
3953 */
3954enum extscan_configuration_flags {
3955 EXTSCAN_LP_EXTENDED_BATCHING = 0x00000001,
3956};
3957
3958typedef struct {
3959 struct cdf_mac_addr bssid;
3960
3961 /* Low threshold */
3962 int32_t low;
3963
3964 /* High threshold */
3965 int32_t high;
3966} tSirAPThresholdParam, *tpSirAPThresholdParam;
3967
3968typedef struct {
3969 uint32_t requestId;
3970 uint8_t sessionId;
3971} tSirGetExtScanCapabilitiesReqParams, *tpSirGetExtScanCapabilitiesReqParams;
3972
3973/**
3974 * struct ext_scan_capabilities_response - extscan capabilities response data
3975 * @requestId: request identifier
3976 * @status: status
3977 * @max_scan_cache_size: total space allocated for scan (in bytes)
3978 * @max_scan_buckets: maximum number of channel buckets
3979 * @max_ap_cache_per_scan: maximum number of APs that can be stored per scan
3980 * @max_rssi_sample_size: number of RSSI samples used for averaging RSSI
3981 * @ax_scan_reporting_threshold: max possible report_threshold
3982 * @max_hotlist_bssids: maximum number of entries for hotlist APs
3983 * @max_significant_wifi_change_aps: maximum number of entries for
3984 * significant wifi change APs
3985 * @max_bssid_history_entries: number of BSSID/RSSI entries that device can hold
3986 * @max_hotlist_ssids: maximum number of entries for hotlist SSIDs
3987 * @max_number_epno_networks: max number of epno entries
3988 * @max_number_epno_networks_by_ssid: max number of epno entries
3989 * if ssid is specified, that is, epno entries for
3990 * which an exact match is required,
3991 * or entries corresponding to hidden ssids
3992 * @max_number_of_white_listed_ssid: max number of white listed SSIDs
3993 */
3994struct ext_scan_capabilities_response {
3995 uint32_t requestId;
3996 uint32_t status;
3997
3998 uint32_t max_scan_cache_size;
3999 uint32_t max_scan_buckets;
4000 uint32_t max_ap_cache_per_scan;
4001 uint32_t max_rssi_sample_size;
4002 uint32_t max_scan_reporting_threshold;
4003
4004 uint32_t max_hotlist_bssids;
4005 uint32_t max_significant_wifi_change_aps;
4006
4007 uint32_t max_bssid_history_entries;
4008 uint32_t max_hotlist_ssids;
4009 uint32_t max_number_epno_networks;
4010 uint32_t max_number_epno_networks_by_ssid;
4011 uint32_t max_number_of_white_listed_ssid;
4012};
4013
4014typedef struct {
4015 uint32_t requestId;
4016 uint8_t sessionId;
4017
4018 /*
4019 * 1 - return cached results and flush it
4020 * 0 - return cached results and do not flush
4021 */
4022 bool flush;
4023} tSirExtScanGetCachedResultsReqParams, *tpSirExtScanGetCachedResultsReqParams;
4024
4025typedef struct {
4026 uint32_t requestId;
4027 uint32_t status;
4028} tSirExtScanGetCachedResultsRspParams, *tpSirExtScanGetCachedResultsRspParams;
4029
4030typedef struct {
4031 /* Time of discovery */
4032 uint64_t ts;
4033
4034 /* Null terminated SSID */
4035 uint8_t ssid[SIR_MAC_MAX_SSID_LENGTH + 1];
4036
4037 struct cdf_mac_addr bssid;
4038
4039 /* Frequency in MHz */
4040 uint32_t channel;
4041
4042 /* RSSI in dBm */
4043 int32_t rssi;
4044
4045 /* RTT in nanoseconds */
4046 uint32_t rtt;
4047
4048 /* Standard deviation in rtt */
4049 uint32_t rtt_sd;
4050
4051 /* Period advertised in the beacon */
4052 uint16_t beaconPeriod;
4053
4054 /* Capabilities advertised in the beacon */
4055 uint16_t capability;
4056
4057 uint16_t ieLength;
4058
4059 uint8_t ieData[];
4060} tSirWifiScanResult, *tpSirWifiScanResult;
4061
4062/**
4063 * struct extscan_hotlist_match - extscan hotlist match
4064 * @requestId: request identifier
4065 * @numOfAps: number of bssids retrieved by the scan
4066 * @moreData: 0 - for last fragment
4067 * 1 - still more fragment(s) coming
4068 * @ap: wifi scan result
4069 */
4070struct extscan_hotlist_match {
4071 uint32_t requestId;
4072 bool moreData;
4073 bool ap_found;
4074 uint32_t numOfAps;
4075 tSirWifiScanResult ap[];
4076};
4077
4078/**
4079 * struct extscan_cached_scan_result - extscan cached scan result
4080 * @scan_id: a unique identifier for the scan unit
4081 * @flags: a bitmask with additional information about scan
4082 * @num_results: number of bssids retrieved by the scan
4083 * @ap: wifi scan bssid results info
4084 */
4085struct extscan_cached_scan_result {
4086 uint32_t scan_id;
4087 uint32_t flags;
4088 uint32_t num_results;
4089 tSirWifiScanResult *ap;
4090};
4091
4092/**
4093 * struct tSirWifiScanResultEvent - wifi scan result event
4094 * @requestId: request identifier
4095 * @ap_found: flag to indicate ap found or not
4096 * true: AP was found
4097 * false: AP was lost
4098 * @numOfAps: number of aps
4099 * @moreData: more data
4100 * @ap: bssid information
4101 *
4102 */
4103typedef struct {
4104 uint32_t requestId;
4105 bool ap_found;
4106 uint32_t numOfAps;
4107 bool moreData;
4108 tSirWifiScanResult ap[];
4109} tSirWifiScanResultEvent, *tpSirWifiScanResultEvent;
4110
4111/**
4112 * struct extscan_cached_scan_results - extscan cached scan results
4113 * @request_id: request identifier
4114 * @more_data: 0 - for last fragment
4115 * 1 - still more fragment(s) coming
4116 * @num_scan_ids: number of scan ids
4117 * @result: wifi scan result
4118 */
4119struct extscan_cached_scan_results {
4120 uint32_t request_id;
4121 bool more_data;
4122 uint32_t num_scan_ids;
4123 struct extscan_cached_scan_result *result;
4124};
4125
4126
4127/**
4128 * struct tSirWifiFullScanResultEvent - extscan full scan event
4129 * @request_id: request identifier
4130 * @moreData: 0 - for last fragment
4131 * 1 - still more fragment(s) coming
4132 * @ap: bssid info
4133 *
4134 * Reported when each probe response is received, if reportEvents
4135 * enabled in tSirWifiScanCmdReqParams
4136 */
4137typedef struct {
4138 uint32_t requestId;
4139 bool moreData;
4140 tSirWifiScanResult ap;
4141} tSirWifiFullScanResultEvent, *tpSirWifiFullScanResultEvent;
4142
4143/**
4144 * struct pno_match_found - epno match found
4145 * @request_id: request identifier
4146 * @moreData: 0 - for last fragment
4147 * 1 - still more fragment(s) coming
4148 * @num_results: number of bssids, driver sends this event to upper layer
4149 * for every beacon, hence %num_results is always set to 1.
4150 * @ap: bssid info
4151 *
4152 * Reported when each beacon probe response is received with
4153 * epno match found tag.
4154 */
4155struct pno_match_found {
4156 uint32_t request_id;
4157 bool more_data;
4158 uint32_t num_results;
4159 tSirWifiScanResult ap[];
4160};
4161
4162typedef struct {
4163 /* Frequency in MHz */
4164 uint32_t channel;
4165
4166 uint32_t dwellTimeMs;
4167
4168 /* 0 => active
4169 1 => passive scan; ignored for DFS */
4170 bool passive;
4171
4172 uint8_t chnlClass;
4173} tSirWifiScanChannelSpec, *tpSirWifiScanChannelSpec;
4174
4175/**
4176 * struct tSirWifiScanBucketSpec - wifi scan bucket spec
4177 * @bucket: bucket identifier
4178 * @band: wifi band
4179 * @period: Desired period, in millisecond; if this is too
4180 * low, the firmware should choose to generate results as fast as
4181 * it can instead of failing the command byte
4182 * for exponential backoff bucket this is the min_period
4183 * @reportEvents: 0 => normal reporting (reporting rssi history
4184 * only, when rssi history buffer is % full)
4185 * 1 => same as 0 + report a scan completion event after scanning
4186 * this bucket
4187 * 2 => same as 1 + forward scan results
4188 * (beacons/probe responses + IEs) in real time to HAL
4189 * @max_period: if max_period is non zero or different than period,
4190 * then this bucket is an exponential backoff bucket and
4191 * the scan period will grow exponentially as per formula:
4192 * actual_period(N) = period ^ (N/(step_count+1)) to a
4193 * maximum period of max_period
4194 * @exponent: for exponential back off bucket: multiplier:
4195 * new_period = old_period * exponent
4196 * @step_count: for exponential back off bucket, number of scans performed
4197 * at a given period and until the exponent is applied
4198 * @numChannels: channels to scan; these may include DFS channels
4199 * Note that a given channel may appear in multiple buckets
4200 * @min_dwell_time_active: per bucket minimum active dwell time
4201 * @max_dwell_time_active: per bucket maximum active dwell time
4202 * @min_dwell_time_passive: per bucket minimum passive dwell time
4203 * @max_dwell_time_passive: per bucket maximum passive dwell time
4204 * @channels: Channel list
4205 */
4206typedef struct {
4207 uint8_t bucket;
4208 tWifiBand band;
4209 uint32_t period;
4210 uint32_t reportEvents;
4211 uint32_t max_period;
4212 uint32_t exponent;
4213 uint32_t step_count;
4214 uint32_t numChannels;
4215
4216 uint32_t min_dwell_time_active;
4217 uint32_t max_dwell_time_active;
4218 uint32_t min_dwell_time_passive;
4219 uint32_t max_dwell_time_passive;
4220 tSirWifiScanChannelSpec channels[WLAN_EXTSCAN_MAX_CHANNELS];
4221} tSirWifiScanBucketSpec, *tpSirWifiScanBucketSpec;
4222
4223/**
4224 * struct tSirWifiScanCmdReqParams - wifi scan command request params
4225 * @basePeriod: base timer period
4226 * @maxAPperScan: max ap per scan
4227 * @report_threshold_percent: report threshold
4228 * in %, when buffer is this much full, wake up host
4229 * @report_threshold_num_scans: report threshold number of scans
4230 * in number of scans, wake up host after these many scans
4231 * @requestId: request id
4232 * @sessionId: session id
4233 * @numBuckets: number of buckets
4234 * @min_dwell_time_active: per bucket minimum active dwell time
4235 * @max_dwell_time_active: per bucket maximum active dwell time
4236 * @min_dwell_time_passive: per bucket minimum passive dwell time
4237 * @max_dwell_time_passive: per bucket maximum passive dwell time
4238 * @configuration_flags: configuration flags
4239 * @buckets: buckets array
4240 */
4241typedef struct {
4242 uint32_t basePeriod;
4243 uint32_t maxAPperScan;
4244
4245 uint32_t report_threshold_percent;
4246 uint32_t report_threshold_num_scans;
4247
4248 uint32_t requestId;
4249 uint8_t sessionId;
4250 uint32_t numBuckets;
4251
4252 uint32_t min_dwell_time_active;
4253 uint32_t max_dwell_time_active;
4254 uint32_t min_dwell_time_passive;
4255 uint32_t max_dwell_time_passive;
4256 uint32_t configuration_flags;
4257 tSirWifiScanBucketSpec buckets[WLAN_EXTSCAN_MAX_BUCKETS];
4258} tSirWifiScanCmdReqParams, *tpSirWifiScanCmdReqParams;
4259
4260/**
4261 * struct sir_extscan_generic_response -
4262 * Generic ExtScan Response structure
4263 * @request_id: ID of the request
4264 * @status: operation status returned by firmware
4265 */
4266struct sir_extscan_generic_response {
4267 uint32_t request_id;
4268 uint32_t status;
4269};
4270
4271typedef struct {
4272 uint32_t requestId;
4273 uint8_t sessionId;
4274} tSirExtScanStopReqParams, *tpSirExtScanStopReqParams;
4275
4276/**
4277 * struct tSirExtScanSetBssidHotListReqParams - set hotlist request
4278 * @requestId: request identifier
4279 * @sessionId: session identifier
4280 * @lost_ap_sample_size: number of samples to confirm AP loss
4281 * @numAp: Number of hotlist APs
4282 * @ap: hotlist APs
4283 */
4284typedef struct {
4285 uint32_t requestId;
4286 uint8_t sessionId;
4287
4288 uint32_t lost_ap_sample_size;
4289 uint32_t numAp;
4290 tSirAPThresholdParam ap[WLAN_EXTSCAN_MAX_HOTLIST_APS];
4291} tSirExtScanSetBssidHotListReqParams, *tpSirExtScanSetBssidHotListReqParams;
4292
4293typedef struct {
4294 uint32_t requestId;
4295 uint8_t sessionId;
4296} tSirExtScanResetBssidHotlistReqParams,
4297*tpSirExtScanResetBssidHotlistReqParams;
4298
4299/**
4300 * struct sir_ssid_hotlist_param - param for SSID Hotlist
4301 * @ssid: SSID which is being hotlisted
4302 * @band: Band in which the given SSID should be scanned
4303 * @rssi_low: Low bound on RSSI
4304 * @rssi_high: High bound on RSSI
4305 */
4306struct sir_ssid_hotlist_param {
4307 tSirMacSSid ssid;
4308 uint8_t band;
4309 int32_t rssi_low;
4310 int32_t rssi_high;
4311};
4312
4313/**
4314 * struct sir_set_ssid_hotlist_request - set SSID hotlist request struct
4315 * @request_id: ID of the request
4316 * @session_id: ID of the session
4317 * @lost_ssid_sample_size: Number of consecutive scans in which the SSID
4318 * must not be seen in order to consider the SSID "lost"
4319 * @ssid_count: Number of valid entries in the @ssids array
4320 * @ssids: Array that defines the SSIDs that are in the hotlist
4321 */
4322struct sir_set_ssid_hotlist_request {
4323 uint32_t request_id;
4324 uint8_t session_id;
4325 uint32_t lost_ssid_sample_size;
4326 uint32_t ssid_count;
4327 struct sir_ssid_hotlist_param ssids[WLAN_EXTSCAN_MAX_HOTLIST_SSIDS];
4328};
4329
4330typedef struct {
4331 uint32_t requestId;
4332 uint8_t sessionId;
4333
4334 /* Number of samples for averaging RSSI */
4335 uint32_t rssiSampleSize;
4336
4337 /* Number of missed samples to confirm AP loss */
4338 uint32_t lostApSampleSize;
4339
4340 /* Number of APs breaching threshold required for firmware
4341 * to generate event
4342 */
4343 uint32_t minBreaching;
4344
4345 uint32_t numAp;
4346 tSirAPThresholdParam ap[WLAN_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS];
4347} tSirExtScanSetSigChangeReqParams, *tpSirExtScanSetSigChangeReqParams;
4348
4349typedef struct {
4350 struct cdf_mac_addr bssid;
4351 uint32_t channel;
4352 uint32_t numOfRssi;
4353
4354 /* Rssi history in db */
4355 int32_t rssi[];
4356} tSirWifiSignificantChange, *tpSirWifiSignificantChange;
4357
4358typedef struct {
4359 uint32_t requestId;
4360
4361 bool moreData;
4362 uint32_t numResults;
4363 tSirWifiSignificantChange ap[];
4364} tSirWifiSignificantChangeEvent, *tpSirWifiSignificantChangeEvent;
4365
4366typedef struct {
4367 uint32_t requestId;
4368 uint8_t sessionId;
4369} tSirExtScanResetSignificantChangeReqParams,
4370*tpSirExtScanResetSignificantChangeReqParams;
4371
4372typedef struct {
4373 uint32_t requestId;
4374 uint32_t numResultsAvailable;
4375} tSirExtScanResultsAvailableIndParams, *tpSirExtScanResultsAvailableIndParams;
4376
4377typedef struct {
4378 uint32_t requestId;
4379 uint32_t status;
4380 uint8_t scanEventType;
4381} tSirExtScanOnScanEventIndParams, *tpSirExtScanOnScanEventIndParams;
4382
4383/**
4384 * struct wifi_epno_network - enhanced pno network block
4385 * @ssid: ssid
4386 * @rssi_threshold: threshold for considering this SSID as found, required
4387 * granularity for this threshold is 4dBm to 8dBm
4388 * @flags: WIFI_PNO_FLAG_XXX
4389 * @auth_bit_field: auth bit field for matching WPA IE
4390 */
4391struct wifi_epno_network {
4392 tSirMacSSid ssid;
4393 int8_t rssi_threshold;
4394 uint8_t flags;
4395 uint8_t auth_bit_field;
4396};
4397
4398/**
4399 * struct wifi_epno_params - enhanced pno network params
4400 * @num_networks: number of ssids
4401 * @networks: PNO networks
4402 */
4403struct wifi_epno_params {
4404 uint32_t request_id;
4405 uint32_t session_id;
4406 uint32_t num_networks;
4407 struct wifi_epno_network networks[];
4408};
4409
4410#define SIR_PASSPOINT_REALM_LEN 256
4411#define SIR_PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16
4412#define SIR_PASSPOINT_PLMN_LEN 3
4413/**
4414 * struct wifi_passpoint_network - passpoint network block
4415 * @id: identifier of this network block
4416 * @realm: null terminated UTF8 encoded realm, 0 if unspecified
4417 * @roaming_consortium_ids: roaming consortium ids to match, 0s if unspecified
4418 * @plmn: mcc/mnc combination as per rules, 0s if unspecified
4419 */
4420struct wifi_passpoint_network {
4421 uint32_t id;
4422 uint8_t realm[SIR_PASSPOINT_REALM_LEN];
4423 int64_t roaming_consortium_ids[SIR_PASSPOINT_ROAMING_CONSORTIUM_ID_NUM];
4424 uint8_t plmn[SIR_PASSPOINT_PLMN_LEN];
4425};
4426
4427/**
4428 * struct wifi_passpoint_req - passpoint request
4429 * @request_id: request identifier
4430 * @num_networks: number of networks
4431 * @networks: passpoint networks
4432 */
4433struct wifi_passpoint_req {
4434 uint32_t request_id;
4435 uint32_t session_id;
4436 uint32_t num_networks;
4437 struct wifi_passpoint_network networks[];
4438};
4439
4440/**
4441 * struct wifi_passpoint_match - wifi passpoint network match
4442 * @id: network block identifier for the matched network
4443 * @anqp_len: length of ANQP blob
4444 * @ap: scan result, with channel and beacon information
4445 * @anqp: ANQP data, in the information_element format
4446 */
4447struct wifi_passpoint_match {
4448 uint32_t request_id;
4449 uint32_t id;
4450 uint32_t anqp_len;
4451 tSirWifiScanResult ap;
4452 uint8_t anqp[];
4453};
4454#endif /* FEATURE_WLAN_EXTSCAN */
4455
4456#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
4457typedef struct {
4458 uint32_t timer_val;
4459} tSirAutoShutdownCmdParams;
4460
4461typedef struct {
4462 uint32_t shutdown_reason;
4463} tSirAutoShutdownEvtParams;
4464#endif
4465
4466#ifdef WLAN_FEATURE_LINK_LAYER_STATS
4467
4468typedef struct {
4469 uint32_t reqId;
4470 uint8_t staId;
4471 uint32_t mpduSizeThreshold;
4472 uint32_t aggressiveStatisticsGathering;
4473} tSirLLStatsSetReq, *tpSirLLStatsSetReq;
4474
4475typedef struct {
4476 uint32_t reqId;
4477 uint8_t staId;
4478 uint32_t paramIdMask;
4479} tSirLLStatsGetReq, *tpSirLLStatsGetReq;
4480
4481typedef struct {
4482 uint32_t reqId;
4483 uint8_t staId;
4484 uint32_t statsClearReqMask;
4485 uint8_t stopReq;
4486} tSirLLStatsClearReq, *tpSirLLStatsClearReq;
4487
4488typedef struct {
4489 uint8_t oui[WIFI_SCANNING_MAC_OUI_LENGTH];
4490} tSirScanMacOui, *tpSirScanMacOui;
4491
4492enum {
4493 SIR_AP_RX_DATA_OFFLOAD = 0x00,
4494 SIR_STA_RX_DATA_OFFLOAD = 0x01,
4495};
4496
4497struct sir_ipa_offload_enable_disable {
4498 uint32_t offload_type;
4499 uint32_t vdev_id;
4500 uint32_t enable;
4501};
4502
4503/*---------------------------------------------------------------------------
4504 WLAN_HAL_LL_NOTIFY_STATS
4505 ---------------------------------------------------------------------------*/
4506
4507/******************************LINK LAYER Statistics**********************/
4508
4509typedef int tSirWifiRadio;
4510typedef int tSirWifiChannel;
4511typedef int tSirwifiTxRate;
4512
4513/* channel operating width */
4514typedef enum {
4515 WIFI_CHAN_WIDTH_20 = 0,
4516 WIFI_CHAN_WIDTH_40 = 1,
4517 WIFI_CHAN_WIDTH_80 = 2,
4518 WIFI_CHAN_WIDTH_160 = 3,
4519 WIFI_CHAN_WIDTH_80P80 = 4,
4520 WIFI_CHAN_WIDTH_5 = 5,
4521 WIFI_CHAN_WIDTH_10 = 6,
4522} tSirWifiChannelWidth;
4523
4524typedef enum {
4525 WIFI_DISCONNECTED = 0,
4526 WIFI_AUTHENTICATING = 1,
4527 WIFI_ASSOCIATING = 2,
4528 WIFI_ASSOCIATED = 3,
4529 WIFI_EAPOL_STARTED = 4, /* if done by firmware/driver */
4530 WIFI_EAPOL_COMPLETED = 5, /* if done by firmware/driver */
4531} tSirWifiConnectionState;
4532
4533typedef enum {
4534 WIFI_ROAMING_IDLE = 0,
4535 WIFI_ROAMING_ACTIVE = 1,
4536} tSirWifiRoamState;
4537
4538typedef enum {
4539 WIFI_INTERFACE_STA = 0,
4540 WIFI_INTERFACE_SOFTAP = 1,
4541 WIFI_INTERFACE_IBSS = 2,
4542 WIFI_INTERFACE_P2P_CLIENT = 3,
4543 WIFI_INTERFACE_P2P_GO = 4,
4544 WIFI_INTERFACE_NAN = 5,
4545 WIFI_INTERFACE_MESH = 6,
4546} tSirWifiInterfaceMode;
4547
4548/* set for QOS association */
4549#define WIFI_CAPABILITY_QOS 0x00000001
4550/* set for protected assoc (802.11 beacon frame control protected bit set) */
4551#define WIFI_CAPABILITY_PROTECTED 0x00000002
4552/* set if 802.11 Extended Capabilities element interworking bit is set */
4553#define WIFI_CAPABILITY_INTERWORKING 0x00000004
4554/* set for HS20 association */
4555#define WIFI_CAPABILITY_HS20 0x00000008
4556/* set is 802.11 Extended Capabilities element UTF-8 SSID bit is set */
4557#define WIFI_CAPABILITY_SSID_UTF8 0x00000010
4558/* set is 802.11 Country Element is present */
4559#define WIFI_CAPABILITY_COUNTRY 0x00000020
4560
4561typedef struct {
4562 /* tSirWifiInterfaceMode */
4563 /* interface mode */
4564 uint8_t mode;
4565 /* interface mac address (self) */
4566 struct cdf_mac_addr macAddr;
4567 /* tSirWifiConnectionState */
4568 /* connection state (valid for STA, CLI only) */
4569 uint8_t state;
4570 /* tSirWifiRoamState */
4571 /* roaming state */
4572 uint32_t roaming;
4573 /* WIFI_CAPABILITY_XXX (self) */
4574 uint32_t capabilities;
4575 /* null terminated SSID */
4576 uint8_t ssid[33];
4577 /* bssid */
4578 struct cdf_mac_addr bssid;
4579 /* country string advertised by AP */
4580 uint8_t apCountryStr[WNI_CFG_COUNTRY_CODE_LEN];
4581 /* country string for this association */
4582 uint8_t countryStr[WNI_CFG_COUNTRY_CODE_LEN];
4583} tSirWifiInterfaceInfo, *tpSirWifiInterfaceInfo;
4584
4585/* channel information */
4586typedef struct {
4587 /* channel width (20, 40, 80, 80+80, 160) */
4588 tSirWifiChannelWidth width;
4589 /* primary 20 MHz channel */
4590 tSirWifiChannel centerFreq;
4591 /* center frequency (MHz) first segment */
4592 tSirWifiChannel centerFreq0;
4593 /* center frequency (MHz) second segment */
4594 tSirWifiChannel centerFreq1;
4595} tSirWifiChannelInfo, *tpSirWifiChannelInfo;
4596
4597/* wifi rate info */
4598typedef struct {
4599 /* 0: OFDM, 1:CCK, 2:HT 3:VHT 4..7 reserved */
4600 uint32_t preamble:3;
4601 /* 0:1x1, 1:2x2, 3:3x3, 4:4x4 */
4602 uint32_t nss:2;
4603 /* 0:20MHz, 1:40Mhz, 2:80Mhz, 3:160Mhz */
4604 uint32_t bw:3;
4605 /* OFDM/CCK rate code would be as per ieee std in units of 0.5mbps */
4606 /* HT/VHT it would be mcs index */
4607 uint32_t rateMcsIdx:8;
4608 /* reserved */
4609 uint32_t reserved:16;
4610 /* units of 100 Kbps */
4611 uint32_t bitrate;
4612} tSirWifiRate, *tpSirWifiRate;
4613
4614/* channel statistics */
4615typedef struct {
4616 /* channel */
4617 tSirWifiChannelInfo channel;
4618 /* msecs the radio is awake (32 bits number accruing over time) */
4619 uint32_t onTime;
4620 /* msecs the CCA register is busy (32 bits number accruing over time) */
4621 uint32_t ccaBusyTime;
4622} tSirWifiChannelStats, *tpSirWifiChannelStats;
4623
4624/* radio statistics */
4625typedef struct {
4626 /* wifi radio (if multiple radio supported) */
4627 tSirWifiRadio radio;
4628 /* msecs the radio is awake (32 bits number accruing over time) */
4629 uint32_t onTime;
4630 /* msecs the radio is transmitting
4631 * (32 bits number accruing over time)
4632 */
4633 uint32_t txTime;
4634 /* msecs the radio is in active receive
4635 *(32 bits number accruing over time)
4636 */
4637 uint32_t rxTime;
4638 /* msecs the radio is awake due to all scan
4639 * (32 bits number accruing over time)
4640 */
4641 uint32_t onTimeScan;
4642 /* msecs the radio is awake due to NAN
4643 * (32 bits number accruing over time)
4644 */
4645 uint32_t onTimeNbd;
4646 /* msecs the radio is awake due to Gscan
4647 * (32 bits number accruing over time)
4648 */
4649 uint32_t onTimeGscan;
4650 /* msecs the radio is awake due to roam?scan
4651 * (32 bits number accruing over time)
4652 */
4653 uint32_t onTimeRoamScan;
4654 /* msecs the radio is awake due to PNO scan
4655 * (32 bits number accruing over time)
4656 */
4657 uint32_t onTimePnoScan;
4658 /* msecs the radio is awake due to HS2.0 scans and GAS exchange
4659 * (32 bits number accruing over time)
4660 */
4661 uint32_t onTimeHs20;
4662 /* number of channels */
4663 uint32_t numChannels;
4664 /* channel statistics tSirWifiChannelStats */
4665 tSirWifiChannelStats channels[0];
4666} tSirWifiRadioStat, *tpSirWifiRadioStat;
4667
4668/* per rate statistics */
4669typedef struct {
4670 /* rate information */
4671 tSirWifiRate rate;
4672 /* number of successfully transmitted data pkts (ACK rcvd) */
4673 uint32_t txMpdu;
4674 /* number of received data pkts */
4675 uint32_t rxMpdu;
4676 /* number of data packet losses (no ACK) */
4677 uint32_t mpduLost;
4678 /* total number of data pkt retries * */
4679 uint32_t retries;
4680 /* number of short data pkt retries */
4681 uint32_t retriesShort;
4682 /* number of long data pkt retries */
4683 uint32_t retriesLong;
4684} tSirWifiRateStat, *tpSirWifiRateStat;
4685
4686/* access categories */
4687typedef enum {
4688 WIFI_AC_VO = 0,
4689 WIFI_AC_VI = 1,
4690 WIFI_AC_BE = 2,
4691 WIFI_AC_BK = 3,
4692 WIFI_AC_MAX = 4,
4693} tSirWifiTrafficAc;
4694
4695/* wifi peer type */
4696typedef enum {
4697 WIFI_PEER_STA,
4698 WIFI_PEER_AP,
4699 WIFI_PEER_P2P_GO,
4700 WIFI_PEER_P2P_CLIENT,
4701 WIFI_PEER_NAN,
4702 WIFI_PEER_TDLS,
4703 WIFI_PEER_INVALID,
4704} tSirWifiPeerType;
4705
4706/* per peer statistics */
4707typedef struct {
4708 /* peer type (AP, TDLS, GO etc.) */
4709 tSirWifiPeerType type;
4710 /* mac address */
4711 struct cdf_mac_addr peerMacAddress;
4712 /* peer WIFI_CAPABILITY_XXX */
4713 uint32_t capabilities;
4714 /* number of rates */
4715 uint32_t numRate;
4716 /* per rate statistics, number of entries = num_rate */
4717 tSirWifiRateStat rateStats[0];
4718} tSirWifiPeerInfo, *tpSirWifiPeerInfo;
4719
4720/* per access category statistics */
4721typedef struct {
4722 /* tSirWifiTrafficAc */
4723 /* access category (VI, VO, BE, BK) */
4724 uint32_t ac;
4725 /* number of successfully transmitted unicast data pkts (ACK rcvd) */
4726 uint32_t txMpdu;
4727 /* number of received unicast mpdus */
4728 uint32_t rxMpdu;
4729 /* number of succesfully transmitted multicast data packets */
4730 /* STA case: implies ACK received from AP for the unicast */
4731 /* packet in which mcast pkt was sent */
4732 uint32_t txMcast;
4733 /* number of received multicast data packets */
4734 uint32_t rxMcast;
4735 /* number of received unicast a-mpdus */
4736 uint32_t rxAmpdu;
4737 /* number of transmitted unicast a-mpdus */
4738 uint32_t txAmpdu;
4739 /* number of data pkt losses (no ACK) */
4740 uint32_t mpduLost;
4741 /* total number of data pkt retries */
4742 uint32_t retries;
4743 /* number of short data pkt retries */
4744 uint32_t retriesShort;
4745 /* number of long data pkt retries */
4746 uint32_t retriesLong;
4747 /* data pkt min contention time (usecs) */
4748 uint32_t contentionTimeMin;
4749 /* data pkt max contention time (usecs) */
4750 uint32_t contentionTimeMax;
4751 /* data pkt avg contention time (usecs) */
4752 uint32_t contentionTimeAvg;
4753 /* num of data pkts used for contention statistics */
4754 uint32_t contentionNumSamples;
4755} tSirWifiWmmAcStat, *tpSirWifiWmmAcStat;
4756
4757/* Interface statistics - corresponding to 2nd most
4758 * LSB in wifi statistics bitmap for getting statistics
4759 */
4760typedef struct {
4761 /* current state of the interface */
4762 tSirWifiInterfaceInfo info;
4763 /* access point beacon received count from connected AP */
4764 uint32_t beaconRx;
4765 /* access point mgmt frames received count from */
4766 /* connected AP (including Beacon) */
4767 uint32_t mgmtRx;
4768 /* action frames received count */
4769 uint32_t mgmtActionRx;
4770 /* action frames transmit count */
4771 uint32_t mgmtActionTx;
4772 /* access Point Beacon and Management frames RSSI (averaged) */
4773 uint32_t rssiMgmt;
4774 /* access Point Data Frames RSSI (averaged) from connected AP */
4775 uint32_t rssiData;
4776 /* access Point ACK RSSI (averaged) from connected AP */
4777 uint32_t rssiAck;
4778 /* number of peers */
4779 uint32_t num_peers;
4780 /*
4781 * Indicates how many peer_stats events will be sent depending on the
4782 * num_peers.
4783 */
4784 uint32_t num_peer_events;
4785 /* number of ac */
4786 uint32_t num_ac;
4787 /* Roaming Stat */
4788 uint32_t roam_state;
4789 /*
4790 * Average Beacon spread offset is the averaged time delay between TBTT
4791 * and beacon TSF. Upper 32 bits of averaged 64 bit beacon spread offset
4792 */
4793 uint32_t avg_bcn_spread_offset_high;
4794 /* Lower 32 bits of averaged 64 bit beacon spread offset */
4795 uint32_t avg_bcn_spread_offset_low;
4796 /*
4797 * Takes value of 1 if AP leaks packets after sending an ACK for PM=1
4798 * otherwise 0
4799 */
4800 uint32_t is_leaky_ap;
4801 /*
4802 * Average number of frames received from AP after receiving the ACK
4803 * for a frame with PM = 1
4804 */
4805 uint32_t avg_rx_frms_leaked;
4806 /*
4807 * Rx leak watch window currently in force to minimize data loss
4808 * because of leaky AP. Rx leak window is the
4809 * time driver waits before shutting down the radio or switching
4810 * the channel and after receiving an ACK for
4811 * a data frame with PM bit set.
4812 */
4813 uint32_t rx_leak_window;
4814 /* per ac data packet statistics */
4815 tSirWifiWmmAcStat AccessclassStats[WIFI_AC_MAX];
4816} tSirWifiIfaceStat, *tpSirWifiIfaceStat;
4817
4818/* Peer statistics - corresponding to 3rd most LSB in
4819 * wifi statistics bitmap for getting statistics
4820 */
4821typedef struct {
4822 /* number of peers */
4823 uint32_t numPeers;
4824 /* per peer statistics */
4825 tSirWifiPeerInfo peerInfo[0];
4826} tSirWifiPeerStat, *tpSirWifiPeerStat;
4827
4828/* wifi statistics bitmap for getting statistics */
4829#define WMI_LINK_STATS_RADIO 0x00000001
4830#define WMI_LINK_STATS_IFACE 0x00000002
4831#define WMI_LINK_STATS_ALL_PEER 0x00000004
4832#define WMI_LINK_STATS_PER_PEER 0x00000008
4833
4834/* wifi statistics bitmap for clearing statistics */
4835/* all radio statistics */
4836#define WIFI_STATS_RADIO 0x00000001
4837/* cca_busy_time (within radio statistics) */
4838#define WIFI_STATS_RADIO_CCA 0x00000002
4839/* all channel statistics (within radio statistics) */
4840#define WIFI_STATS_RADIO_CHANNELS 0x00000004
4841/* all scan statistics (within radio statistics) */
4842#define WIFI_STATS_RADIO_SCAN 0x00000008
4843/* all interface statistics */
4844#define WIFI_STATS_IFACE 0x00000010
4845/* all tx rate statistics (within interface statistics) */
4846#define WIFI_STATS_IFACE_TXRATE 0x00000020
4847/* all ac statistics (within interface statistics) */
4848#define WIFI_STATS_IFACE_AC 0x00000040
4849/* all contention (min, max, avg) statistics (within ac statistics) */
4850#define WIFI_STATS_IFACE_CONTENTION 0x00000080
4851
4852typedef struct {
4853 uint32_t paramId;
4854 uint8_t ifaceId;
4855 uint32_t rspId;
4856 uint32_t moreResultToFollow;
4857 union {
4858 uint32_t num_peers;
4859 uint32_t num_radio;
4860 };
4861
4862 uint32_t peer_event_number;
4863 /* Variable length field - Do not add anything after this */
4864 uint8_t results[0];
4865} tSirLLStatsResults, *tpSirLLStatsResults;
4866
4867#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
4868
4869typedef struct sAniGetLinkStatus {
4870 uint16_t msgType; /* message type is same as the request type */
4871 uint16_t msgLen; /* length of the entire request */
4872 uint8_t linkStatus;
4873 uint8_t sessionId;
4874} tAniGetLinkStatus, *tpAniGetLinkStatus;
4875
4876#ifdef DHCP_SERVER_OFFLOAD
4877typedef struct {
4878 uint32_t vdev_id;
4879 uint32_t dhcpSrvOffloadEnabled;
4880 uint32_t dhcpClientNum;
4881 uint32_t dhcpSrvIP;
4882} tSirDhcpSrvOffloadInfo, *tpSirDhcpSrvOffloadInfo;
4883#endif /* DHCP_SERVER_OFFLOAD */
4884#ifdef WLAN_FEATURE_GPIO_LED_FLASHING
4885typedef struct {
4886 uint32_t reqId;
4887 /* pattern identifier. 0: disconnected 1: connected */
4888 uint32_t pattern_id;
4889 uint32_t led_x0; /* led flashing parameter0 */
4890 uint32_t led_x1; /* led flashing parameter1 */
4891} tSirLedFlashingReq, *tpSirLedFlashingReq;
4892#endif
4893/* find the size of given member within a structure */
4894#ifndef member_size
4895#define member_size(type, member) (sizeof(((type *)0)->member))
4896#endif
4897
4898#define RTT_INVALID 0x00
4899#define RTT_TIMING_MEAS_CAPABILITY 0x01
4900#define RTT_FINE_TIME_MEAS_INITIATOR_CAPABILITY 0x02
4901#define RTT_FINE_TIME_MEAS_RESPONDER_CAPABILITY 0x03
4902
4903/**
4904 * enum fine_time_meas_mask - bit mask to identify device's
4905 * fine timing measurement capability
4906 * @FINE_TIME_MEAS_STA_INITIATOR - STA role, Initiator capability is supported
4907 * @FINE_TIME_MEAS_STA_RESPONDER - STA role, Responder capability is supported
4908 * @FINE_TIME_MEAS_P2PCLI_INITIATOR - P2P-CLI supports initiator capability
4909 * @FINE_TIME_MEAS_P2PCLI_RESPONDER - P2P-CLI supports responder capability
4910 * @FINE_TIME_MEAS_P2PGO_INITIATOR - P2P-GO supports initiator capability
4911 * @FINE_TIME_MEAS_P2PGO_RESPONDER - P2P-GO supports responder capability
4912 * @FINE_TIME_MEAS_SAP_INITIATOR - SAP role, Initiator capability is supported
4913 * @FINE_TIME_MEAS_SAP_RESPONDER - SAP role, Responder capability is supported
4914 */
4915enum fine_time_meas_mask {
4916 FINE_TIME_MEAS_STA_INITIATOR = (1 << (0)),
4917 FINE_TIME_MEAS_STA_RESPONDER = (1 << (1)),
4918 FINE_TIME_MEAS_P2PCLI_INITIATOR = (1 << (2)),
4919 FINE_TIME_MEAS_P2PCLI_RESPONDER = (1 << (3)),
4920 FINE_TIME_MEAS_P2PGO_INITIATOR = (1 << (4)),
4921 FINE_TIME_MEAS_P2PGO_RESPONDER = (1 << (5)),
4922 FINE_TIME_MEAS_SAP_INITIATOR = (1 << (6)),
4923 FINE_TIME_MEAS_SAP_RESPONDER = (1 << (7)),
4924};
4925
4926/* number of neighbor reports that we can handle in Neighbor Report Response */
4927#define MAX_SUPPORTED_NEIGHBOR_RPT 15
4928
4929/**
4930 * struct sir_stats_avg_factor
4931 * @vdev_id: session id
4932 * @stats_avg_factor: average factor
4933 */
4934struct sir_stats_avg_factor {
4935 uint8_t vdev_id;
4936 uint16_t stats_avg_factor;
4937};
4938
4939/**
4940 * struct sir_guard_time_request
4941 * @vdev_id: session id
4942 * @guard_time: guard time
4943 */
4944struct sir_guard_time_request {
4945 uint8_t vdev_id;
4946 uint32_t guard_time;
4947};
4948
4949/* Max number of rates allowed in Supported Rates IE */
4950#define MAX_NUM_SUPPORTED_RATES (8)
4951
4952/*
4953 * struct rssi_monitor_req - rssi monitoring
4954 * @request_id: request id
4955 * @session_id: session id
4956 * @min_rssi: minimum rssi
4957 * @max_rssi: maximum rssi
4958 * @control: flag to indicate start or stop
4959 */
4960struct rssi_monitor_req {
4961 uint32_t request_id;
4962 uint32_t session_id;
4963 int8_t min_rssi;
4964 int8_t max_rssi;
4965 bool control;
4966};
4967
4968/**
4969 * struct rssi_breach_event - rssi breached event structure
4970 * @request_id: request id
4971 * @session_id: session id
4972 * @curr_rssi: current rssi
4973 * @curr_bssid: current bssid
4974 */
4975struct rssi_breach_event {
4976 uint32_t request_id;
4977 uint32_t session_id;
4978 int8_t curr_rssi;
4979 struct cdf_mac_addr curr_bssid;
4980};
4981
4982#define MAX_NUM_FW_SEGMENTS 4
4983
4984/**
4985 * struct fw_dump_seg_req - individual segment details
4986 * @seg_id - segment id.
4987 * @seg_start_addr_lo - lower address of the segment.
4988 * @seg_start_addr_hi - higher address of the segment.
4989 * @seg_length - length of the segment.
4990 * @dst_addr_lo - lower address of the destination buffer.
4991 * @dst_addr_hi - higher address of the destination buffer.
4992 *
4993 * This structure carries the information to firmware about the
4994 * individual segments. This structure is part of firmware memory
4995 * dump request.
4996 */
4997struct fw_dump_seg_req {
4998 uint8_t seg_id;
4999 uint32_t seg_start_addr_lo;
5000 uint32_t seg_start_addr_hi;
5001 uint32_t seg_length;
5002 uint32_t dst_addr_lo;
5003 uint32_t dst_addr_hi;
5004};
5005
5006/**
5007 * struct fw_dump_req - firmware memory dump request details.
5008 * @request_id - request id.
5009 * @num_seg - requested number of segments.
5010 * @fw_dump_seg_req - individual segment information.
5011 *
5012 * This structure carries information about the firmware
5013 * memory dump request.
5014 */
5015struct fw_dump_req {
5016 uint32_t request_id;
5017 uint32_t num_seg;
5018 struct fw_dump_seg_req segment[MAX_NUM_FW_SEGMENTS];
5019};
5020
5021/**
5022 * struct fw_dump_rsp - firmware dump response details.
5023 * @request_id - request id.
5024 * @dump_complete - copy completion status.
5025 *
5026 * This structure is used to store the firmware dump copy complete
5027 * response from the firmware.
5028 */
5029struct fw_dump_rsp {
5030 uint32_t request_id;
5031 uint32_t dump_complete;
5032};
5033
5034/**
5035 * struct vdev_ie_info - IE info
5036 * @vdev_id - vdev for which the IE is being sent
5037 * @ie_id - ID of the IE
5038 * @length - length of the IE data
5039 * @data - IE data
5040 *
5041 * This structure is used to store the IE information.
5042 */
5043struct vdev_ie_info {
5044 uint32_t vdev_id;
5045 uint32_t ie_id;
5046 uint32_t length;
5047 uint8_t *data;
5048};
5049
5050/**
5051 * struct send_extcap_ie - used to pass send_extcap_ie msg from SME to PE
5052 * @type - MSG type
5053 * @length - length of the message
5054 * @seesion_id - session_id for which the message is intended for
5055 *
5056 * This structure is used to pass send_extcap_ie msg from SME to PE
5057 */
5058struct send_extcap_ie {
5059 uint16_t msg_type; /* eWNI_SME_SET_IE_REQ */
5060 uint16_t length;
5061 uint8_t session_id;
5062};
5063
5064typedef void (*hw_mode_cb)(uint32_t status, uint32_t cfgd_hw_mode_index,
5065 uint32_t num_vdev_mac_entries,
5066 struct sir_vdev_mac_map *vdev_mac_map);
5067typedef void (*hw_mode_transition_cb)(uint32_t old_hw_mode_index,
5068 uint32_t new_hw_mode_index,
5069 uint32_t num_vdev_mac_entries,
5070 struct sir_vdev_mac_map *vdev_mac_map);
5071typedef void (*dual_mac_cb)(uint32_t status, uint32_t scan_config,
5072 uint32_t fw_mode_config);
5073
5074/**
5075 * struct sir_nss_update_request
5076 * @msgType: nss update msg type
5077 * @msgLen: length of the msg
5078 * @new_nss: new spatial stream value
5079 * @vdev_id: session id
5080 */
5081struct sir_nss_update_request {
5082 uint16_t msgType;
5083 uint16_t msgLen;
5084 uint8_t new_nss;
5085 uint32_t vdev_id;
5086};
5087
5088/**
5089 * struct sir_beacon_tx_complete_rsp
5090 *
5091 * @session_id: session for which beacon update happened
5092 * @tx_status: status of the beacon tx from FW
5093 */
5094struct sir_beacon_tx_complete_rsp {
5095 uint8_t session_id;
5096 uint8_t tx_status;
5097};
5098
5099typedef void (*nss_update_cb)(void *context, uint8_t tx_status, uint8_t vdev_id,
5100 uint8_t next_action);
5101
5102/**
5103 * OCB structures
5104 */
5105
5106#define NUM_AC (4)
5107#define OCB_CHANNEL_MAX (5)
5108
5109struct sir_qos_params {
5110 uint8_t aifsn;
5111 uint8_t cwmin;
5112 uint8_t cwmax;
5113};
5114
5115/**
5116 * struct sir_ocb_set_config_response
5117 * @status: response status
5118 */
5119struct sir_ocb_set_config_response {
5120 uint8_t status;
5121};
5122
5123/** Callback for the dcc_stats_event */
5124typedef void (*dcc_stats_event_callback_t)(void *hdd_ctx, uint32_t vdev_id,
5125 uint32_t num_channels, uint32_t stats_per_channel_array_len,
5126 const void *stats_per_channel_array);
5127
5128/**
5129 * struct sir_ocb_config_channel
5130 * @chan_freq: frequency of the channel
5131 * @bandwidth: bandwidth of the channel, either 10 or 20 MHz
5132 * @mac_address: MAC address assigned to this channel
5133 * @qos_params: QoS parameters
5134 * @max_pwr: maximum transmit power of the channel (dBm)
5135 * @min_pwr: minimum transmit power of the channel (dBm)
5136 * @reg_pwr: maximum transmit power specified by the regulatory domain (dBm)
5137 * @antenna_max: maximum antenna gain specified by the regulatory domain (dB)
5138 */
5139struct sir_ocb_config_channel {
5140 uint32_t chan_freq;
5141 uint32_t bandwidth;
5142 tSirMacAddr mac_address;
5143 struct sir_qos_params qos_params[MAX_NUM_AC];
5144 uint32_t max_pwr;
5145 uint32_t min_pwr;
5146 uint8_t reg_pwr;
5147 uint8_t antenna_max;
5148 uint16_t flags;
5149};
5150
5151/**
5152 * OCB_CHANNEL_FLAG_NO_RX_HDR - Don't add the RX stats header to packets
5153 * received on this channel.
5154 */
5155#define OCB_CHANNEL_FLAG_DISABLE_RX_STATS_HDR (1 << 0)
5156
5157/**
5158 * struct sir_ocb_config_sched
5159 * @chan_freq: frequency of the channel
5160 * @total_duration: duration of the schedule
5161 * @guard_interval: guard interval on the start of the schedule
5162 */
5163struct sir_ocb_config_sched {
5164 uint32_t chan_freq;
5165 uint32_t total_duration;
5166 uint32_t guard_interval;
5167};
5168
5169/**
5170 * struct sir_ocb_config
5171 * @session_id: session id
5172 * @channel_count: number of channels
5173 * @schedule_size: size of the channel schedule
5174 * @flags: reserved
5175 * @channels: array of OCB channels
5176 * @schedule: array of OCB schedule elements
5177 * @dcc_ndl_chan_list_len: size of the ndl_chan array
5178 * @dcc_ndl_chan_list: array of dcc channel info
5179 * @dcc_ndl_active_state_list_len: size of the active state array
5180 * @dcc_ndl_active_state_list: array of active states
5181 * @adapter: the OCB adapter
5182 * @dcc_stats_callback: callback for the response event
5183 */
5184struct sir_ocb_config {
5185 uint8_t session_id;
5186 uint32_t channel_count;
5187 uint32_t schedule_size;
5188 uint32_t flags;
5189 struct sir_ocb_config_channel *channels;
5190 struct sir_ocb_config_sched *schedule;
5191 uint32_t dcc_ndl_chan_list_len;
5192 void *dcc_ndl_chan_list;
5193 uint32_t dcc_ndl_active_state_list_len;
5194 void *dcc_ndl_active_state_list;
5195};
5196
5197/* The size of the utc time in bytes. */
5198#define SIZE_UTC_TIME (10)
5199/* The size of the utc time error in bytes. */
5200#define SIZE_UTC_TIME_ERROR (5)
5201
5202/**
5203 * struct sir_ocb_utc
5204 * @vdev_id: session id
5205 * @utc_time: number of nanoseconds from Jan 1st 1958
5206 * @time_error: the error in the UTC time. All 1's for unknown
5207 */
5208struct sir_ocb_utc {
5209 uint32_t vdev_id;
5210 uint8_t utc_time[SIZE_UTC_TIME];
5211 uint8_t time_error[SIZE_UTC_TIME_ERROR];
5212};
5213
5214/**
5215 * struct sir_ocb_timing_advert
5216 * @vdev_id: session id
5217 * @chan_freq: frequency on which to advertise
5218 * @repeat_rate: the number of times it will send TA in 5 seconds
5219 * @timestamp_offset: offset of the timestamp field in the TA frame
5220 * @time_value_offset: offset of the time_value field in the TA frame
5221 * @template_length: size in bytes of the TA frame
5222 * @template_value: the TA frame
5223 */
5224struct sir_ocb_timing_advert {
5225 uint32_t vdev_id;
5226 uint32_t chan_freq;
5227 uint32_t repeat_rate;
5228 uint32_t timestamp_offset;
5229 uint32_t time_value_offset;
5230 uint32_t template_length;
5231 uint8_t *template_value;
5232};
5233
5234/**
5235 * struct sir_ocb_get_tsf_timer_response
5236 * @vdev_id: session id
5237 * @timer_high: higher 32-bits of the timer
5238 * @timer_low: lower 32-bits of the timer
5239 */
5240struct sir_ocb_get_tsf_timer_response {
5241 uint32_t vdev_id;
5242 uint32_t timer_high;
5243 uint32_t timer_low;
5244};
5245
5246/**
5247 * struct sir_ocb_get_tsf_timer
5248 * @vdev_id: session id
5249 */
5250struct sir_ocb_get_tsf_timer {
5251 uint32_t vdev_id;
5252};
5253
5254/**
5255 * struct sir_dcc_get_stats_response
5256 * @vdev_id: session id
5257 * @num_channels: number of dcc channels
5258 * @channel_stats_array_len: size in bytes of the stats array
5259 * @channel_stats_array: the stats array
5260 */
5261struct sir_dcc_get_stats_response {
5262 uint32_t vdev_id;
5263 uint32_t num_channels;
5264 uint32_t channel_stats_array_len;
5265 void *channel_stats_array;
5266};
5267
5268/**
5269 * struct sir_dcc_get_stats
5270 * @vdev_id: session id
5271 * @channel_count: number of dcc channels
5272 * @request_array_len: size in bytes of the request array
5273 * @request_array: the request array
5274 */
5275struct sir_dcc_get_stats {
5276 uint32_t vdev_id;
5277 uint32_t channel_count;
5278 uint32_t request_array_len;
5279 void *request_array;
5280};
5281
5282/**
5283 * struct sir_dcc_clear_stats
5284 * @vdev_id: session id
5285 * @dcc_stats_bitmap: bitmap of clear option
5286 */
5287struct sir_dcc_clear_stats {
5288 uint32_t vdev_id;
5289 uint32_t dcc_stats_bitmap;
5290};
5291
5292/**
5293 * struct sir_dcc_update_ndl_response
5294 * @vdev_id: session id
5295 * @status: response status
5296 */
5297struct sir_dcc_update_ndl_response {
5298 uint32_t vdev_id;
5299 uint32_t status;
5300};
5301
5302/**
5303 * struct sir_dcc_update_ndl
5304 * @vdev_id: session id
5305 * @channel_count: number of channels to be updated
5306 * @dcc_ndl_chan_list_len: size in bytes of the ndl_chan array
5307 * @dcc_ndl_chan_list: the ndl_chan array
5308 * @dcc_ndl_active_state_list_len: size in bytes of the active_state array
5309 * @dcc_ndl_active_state_list: the active state array
5310 */
5311struct sir_dcc_update_ndl {
5312 uint32_t vdev_id;
5313 uint32_t channel_count;
5314 uint32_t dcc_ndl_chan_list_len;
5315 void *dcc_ndl_chan_list;
5316 uint32_t dcc_ndl_active_state_list_len;
5317 void *dcc_ndl_active_state_list;
5318};
5319
5320/**
5321 * enum powersave_qpower_mode: QPOWER modes
5322 * @QPOWER_DISABLED: Qpower is disabled
5323 * @QPOWER_ENABLED: Qpower is enabled
5324 * @QPOWER_DUTY_CYCLING: Qpower is enabled with duty cycling
5325 */
5326enum powersave_qpower_mode {
5327 QPOWER_DISABLED = 0,
5328 QPOWER_ENABLED = 1,
5329 QPOWER_DUTY_CYCLING = 2
5330};
5331
5332/**
5333 * enum powersave_qpower_mode: powersave_mode
5334 * @PS_NOT_SUPPORTED: Power save is not supported
5335 * @PS_LEGACY_NODEEPSLEEP: Legacy power save enabled and deep sleep disabled
5336 * @PS_QPOWER_NODEEPSLEEP: QPOWER enabled and deep sleep disabled
5337 * @PS_LEGACY_DEEPSLEEP: Legacy power save enabled and deep sleep enabled
5338 * @PS_QPOWER_DEEPSLEEP: QPOWER enabled and deep sleep enabled
5339 * @PS_DUTY_CYCLING_QPOWER: QPOWER enabled in duty cycling mode
5340 */
5341enum powersave_mode {
5342 PS_NOT_SUPPORTED = 0,
5343 PS_LEGACY_NODEEPSLEEP = 1,
5344 PS_QPOWER_NODEEPSLEEP = 2,
5345 PS_LEGACY_DEEPSLEEP = 3,
5346 PS_QPOWER_DEEPSLEEP = 4,
5347 PS_DUTY_CYCLING_QPOWER = 5
5348};
5349
5350#endif /* __SIR_API_H */