1 /** @file mlan_fw.h
2  *
3  *  @brief This file contains firmware specific defines.
4  *  structures and declares global function prototypes used
5  *  in MLAN module.
6  *
7  *  Copyright 2008-2024 NXP
8  *
9  *  SPDX-License-Identifier: BSD-3-Clause
10  *
11  */
12 
13 /******************************************************
14 Change log:
15     10/27/2008: initial version
16 ******************************************************/
17 
18 #ifndef _MLAN_FW_H_
19 #define _MLAN_FW_H_
20 
21 /** Interface header length */
22 #define INTF_HEADER_LEN                4U
23 #define WIFI_HOST_CMD_FIXED_HEADER_LEN 8U
24 
25 /** Ethernet header */
26 typedef struct
27 {
28     /** Ethernet header destination address */
29     t_u8 dest_addr[MLAN_MAC_ADDR_LENGTH];
30     /** Ethernet header source address */
31     t_u8 src_addr[MLAN_MAC_ADDR_LENGTH];
32     /** Ethernet header length */
33     t_u16 h803_len;
34 
35 } Eth803Hdr_t;
36 
37 /** RFC 1042 header */
38 typedef struct
39 {
40     /** LLC DSAP */
41     t_u8 llc_dsap;
42     /** LLC SSAP */
43     t_u8 llc_ssap;
44     /** LLC CTRL */
45     t_u8 llc_ctrl;
46     /** SNAP OUI */
47     t_u8 snap_oui[3];
48     /** SNAP type */
49     t_u16 snap_type;
50 
51 } Rfc1042Hdr_t;
52 
53 #ifdef PRAGMA_PACK
54 #pragma pack(push, 1)
55 #endif
56 
57 /** Rx packet header */
58 typedef MLAN_PACK_START struct
59 {
60     /** Etherner header */
61     Eth803Hdr_t eth803_hdr;
62     /** RFC 1042 header */
63     Rfc1042Hdr_t rfc1042_hdr;
64 
65 } MLAN_PACK_END RxPacketHdr_t;
66 
67 /** Enable Rate ctrl in TxPD */
68 #define TXPD_TXRATE_ENABLE MBIT(15)
69 
70 /** Rates supported in band B */
71 #define B_SUPPORTED_RATES 5
72 /** Rates supported in band G */
73 #define G_SUPPORTED_RATES 9
74 /** Rates supported in band BG */
75 #define BG_SUPPORTED_RATES 13
76 
77 /** Setup the number of rates passed in the driver/firmware API */
78 #define A_SUPPORTED_RATES 9
79 
80 /** CapInfo Short Slot Time Disabled */
81 // #define SHORT_SLOT_TIME_DISABLED(CapInfo) ((IEEEtypes_CapInfo_t)(CapInfo).short_slot_time = 0)
82 #define SHORT_SLOT_TIME_DISABLED(CapInfo) ((CapInfo) &= ~MBIT(10))
83 /** CapInfo Short Slot Time Enabled */
84 #define SHORT_SLOT_TIME_ENABLED(CapInfo) ((CapInfo) |= MBIT(10))
85 
86 /** CapInfo Spectrum Mgmt Enabled */
87 #define SPECTRUM_MGMT_ENABLED(CapInfo) ((CapInfo) |= MBIT(8))
88 /** CapInfo Radio Measurement Disabled */
89 #define RADIO_MEASUREMENT_DISABLED(CapInfo) ((CapInfo) &= ~MBIT(12))
90 /** CapInfo Radio Measurement Enabled */
91 #define RADIO_MEASUREMENT_ENABLED(CapInfo) ((CapInfo) |= MBIT(12))
92 
93 /** Setup the number of rates passed in the driver/firmware API */
94 #define HOSTCMD_SUPPORTED_RATES 14
95 
96 /** Rates supported in band N */
97 #define N_SUPPORTED_RATES 3
98 #ifdef STA_SUPPORT
99 #if CONFIG_5GHz_SUPPORT
100 /** All bands (B, G, N) */
101 #define ALL_802_11_BANDS (BAND_A | BAND_B | BAND_G | BAND_GN | BAND_AAC | BAND_GAC)
102 #else
103 #define ALL_802_11_BANDS (BAND_B | BAND_G | BAND_GN | BAND_GAC)
104 #endif
105 #else
106 /** All bands (B, G, A) */
107 #define ALL_802_11_BANDS (BAND_B | BAND_G | BAND_A)
108 #endif /* STA_SUPPORT */
109 
110 #ifdef STA_SUPPORT
111 /** Firmware multiple bands support */
112 #define FW_MULTI_BANDS_SUPPORT (MBIT(8) | MBIT(9) | MBIT(10) | MBIT(11) | MBIT(12) | MBIT(13))
113 #else
114 /** Firmware multiple bands support */
115 #define FW_MULTI_BANDS_SUPPORT (MBIT(8) | MBIT(9) | MBIT(10))
116 #endif /* STA_SUPPORT */
117 /** Check if multiple bands support is enabled in firmware */
118 #define IS_SUPPORT_MULTI_BANDS(_adapter) ((_adapter)->fw_cap_info & FW_MULTI_BANDS_SUPPORT)
119 /** Get default bands of the firmware */
120 #define GET_FW_DEFAULT_BANDS(_adapter) \
121     ((((((_adapter)->fw_cap_info & 0x3000) << 1) | ((_adapter)->fw_cap_info & ~0xF000)) >> 8) & ALL_802_11_BANDS)
122 
123 extern t_u8 SupportedRates_B[B_SUPPORTED_RATES];
124 extern t_u8 SupportedRates_G[G_SUPPORTED_RATES];
125 extern t_u8 SupportedRates_BG[BG_SUPPORTED_RATES];
126 extern t_u8 SupportedRates_A[A_SUPPORTED_RATES];
127 extern t_u8 SupportedRates_N[N_SUPPORTED_RATES];
128 extern t_u8 AdhocRates_G[G_SUPPORTED_RATES];
129 extern t_u8 AdhocRates_B[B_SUPPORTED_RATES];
130 extern t_u8 AdhocRates_BG[BG_SUPPORTED_RATES];
131 extern t_u8 AdhocRates_A[A_SUPPORTED_RATES];
132 
133 /** Default auto deep sleep mode */
134 #define DEFAULT_AUTO_DS_MODE MTRUE
135 /** Default power save mode */
136 #define DEFAULT_PS_MODE Wlan802_11PowerModePSP
137 
138 /** WEP Key index mask */
139 #define HostCmd_WEP_KEY_INDEX_MASK 0x3fff
140 /** Length of WEP 40 bit key */
141 #define WEP_40_BIT_LEN 5U
142 /** Length of WEP 104 bit key */
143 #define WEP_104_BIT_LEN 13U
144 
145 #if defined(WPA) || defined(WAPI_AP) || defined(HOST_AUTHENTICATOR)
146 /** Key information enabled */
147 #define KEY_INFO_ENABLED 0x01
148 /** KEY_TYPE_ID */
149 typedef enum _KEY_TYPE_ID
150 {
151     /** Key type : WEP */
152     KEY_TYPE_ID_WEP = 0,
153     /** Key type : TKIP */
154     KEY_TYPE_ID_TKIP = 1,
155     /** Key type : AES */
156     KEY_TYPE_ID_AES      = 2,
157     KEY_TYPE_ID_WAPI     = 3,
158     KEY_TYPE_ID_AES_CMAC = 4,
159     /** Key type : GCMP */
160     KEY_TYPE_ID_GCMP = 5,
161     /** Key type : GCMP_256 */
162     KEY_TYPE_ID_GCMP_256 = 6,
163     /** Key type : CCMP_256 */
164     KEY_TYPE_ID_CCMP_256 = 7,
165     /** Key type : GMAC_128 */
166     KEY_TYPE_ID_BIP_GMAC_128 = 8,
167     /** Key type : GMAC_256 */
168     KEY_TYPE_ID_BIP_GMAC_256 = 9,
169 } KEY_TYPE_ID;
170 
171 /** KEY_INFO_WEP*/
172 typedef enum _KEY_INFO_WEP
173 {
174 #ifdef KEY_MATERIAL_WEP
175     KEY_INFO_WEP_MCAST   = 0x01,
176     KEY_INFO_WEP_UNICAST = 0x02,
177     KEY_INFO_WEP_ENABLED = 0x04
178 #else
179     KEY_INFO_WEP_DEFAULT_KEY = 0x01
180 #endif
181 } KEY_INFO_WEP;
182 
183 /** KEY_INFO_TKIP */
184 typedef enum _KEY_INFO_TKIP
185 {
186     KEY_INFO_TKIP_MCAST   = 0x01,
187     KEY_INFO_TKIP_UNICAST = 0x02,
188     KEY_INFO_TKIP_ENABLED = 0x04
189 } KEY_INFO_TKIP;
190 
191 /** KEY_INFO_AES*/
192 typedef enum _KEY_INFO_AES
193 {
194     KEY_INFO_AES_MCAST      = 0x01,
195     KEY_INFO_AES_UNICAST    = 0x02,
196     KEY_INFO_AES_ENABLED    = 0x04,
197     KEY_INFO_AES_MCAST_IGTK = 0x400,
198 } KEY_INFO_AES;
199 
200 /** WPA AES key length */
201 #define WPA_AES_KEY_LEN 16
202 /** WPA TKIP key length */
203 #define WPA_TKIP_KEY_LEN 32
204 /** WPA AES IGTK key length */
205 #define CMAC_AES_KEY_LEN 16
206 /** IGTK key length */
207 #define WPA_IGTK_KEY_LEN     16
208 #define WPA_IGTK_256_KEY_LEN 32
209 #define WPA_GCMP_KEY_LEN     32
210 #define WPA_CCMP_256_KEY_LEN 32
211 #endif /* WPA || WAPI_AP || HOST_AUTHENTICATOR */
212 
213 #if defined(WAPI)
214 /** WAPI key length */
215 #define WAPI_KEY_LEN 50
216 /** KEY_INFO_WAPI*/
217 typedef enum _KEY_INFO_WAPI
218 {
219     KEY_INFO_WAPI_MCAST   = 0x01,
220     KEY_INFO_WAPI_UNICAST = 0x02,
221     KEY_INFO_WAPI_ENABLED = 0x04
222 } KEY_INFO_WAPI;
223 #endif /* WAPI */
224 
225 /** Maximum ethernet frame length sans FCS */
226 #define MV_ETH_FRAME_LEN 1514
227 
228 /** Length of SNAP header */
229 #define MRVDRV_SNAP_HEADER_LEN 8
230 
231 /** The number of times to try when waiting for downloaded firmware to
232      become active when multiple interface is present */
233 #define MAX_MULTI_INTERFACE_POLL_TRIES 1000
234 
235 /** The number of times to try when waiting for downloaded firmware to
236      become active. (polling the scratch register). */
237 #if defined(SD8997)
238 #define MAX_FIRMWARE_POLL_TRIES 10000
239 #else
240 #define MAX_FIRMWARE_POLL_TRIES 100
241 #endif
242 
243 /** This is for firmware specific length */
244 #define EXTRA_LEN 36
245 
246 /** Buffer size for ethernet Tx packets */
247 #define MRVDRV_ETH_TX_PACKET_BUFFER_SIZE (MV_ETH_FRAME_LEN + sizeof(TxPD) + EXTRA_LEN)
248 
249 /** Buffer size for ethernet Rx packets */
250 #define MRVDRV_ETH_RX_PACKET_BUFFER_SIZE (MV_ETH_FRAME_LEN + sizeof(RxPD) + MRVDRV_SNAP_HEADER_LEN + EXTRA_LEN)
251 
252 /* Macros in interface module */
253 
254 /** Number of firmware blocks to transfer */
255 #define FIRMWARE_TRANSFER_NBLOCK 2
256 
257 /** Enumeration definition*/
258 /** WLAN_802_11_PRIVACY_FILTER */
259 typedef enum _WLAN_802_11_PRIVACY_FILTER
260 {
261     Wlan802_11PrivFilterAcceptAll,
262     Wlan802_11PrivFilter8021xWEP
263 } WLAN_802_11_PRIVACY_FILTER;
264 
265 /** WLAN_802_11_WEP_STATUS */
266 typedef enum _WLAN_802_11_WEP_STATUS
267 {
268     Wlan802_11WEPEnabled,
269     Wlan802_11WEPDisabled,
270     Wlan802_11WEPKeyAbsent,
271     Wlan802_11WEPNotSupported
272 } WLAN_802_11_WEP_STATUS;
273 
274 #define RXPD_FLAG_EXTRA_HEADER (1 << 1)
275 
276 #if CONFIG_RSN_REPLAY_DETECTION
277 #define RXPD_FLAG_PN_CHECK_SUPPORT (1 << 2)
278 #endif
279 
280 /** SNR calculation */
281 #define CAL_SNR(RSSI, NF) ((t_s16)((t_s16)(RSSI) - (t_s16)(NF)))
282 
283 /** 2K buf size */
284 #define MLAN_TX_DATA_BUF_SIZE_2K 2048
285 
286 /** TLV  type ID definition */
287 #define PROPRIETARY_TLV_BASE_ID 0x0100U
288 
289 /** Terminating TLV Type */
290 #define MRVL_TERMINATE_TLV_ID 0xffff
291 
292 /** TLV type : SSID */
293 #define TLV_TYPE_SSID 0x0000
294 /** TLV type : Rates */
295 #define TLV_TYPE_RATES 0x0001
296 /** TLV type : PHY FH */
297 #define TLV_TYPE_PHY_FH 0x0002
298 /** TLV type : PHY DS */
299 #define TLV_TYPE_PHY_DS 0x0003
300 /** TLV type : CF */
301 #define TLV_TYPE_CF 0x0004
302 /** TLV type : IBSS */
303 #define TLV_TYPE_IBSS 0x0006
304 
305 /** TLV type : Domain */
306 #define TLV_TYPE_DOMAIN 0x0007
307 
308 /** TLV type : Power constraint */
309 #define TLV_TYPE_POWER_CONSTRAINT 0x0020
310 
311 /** TLV type : Power capability */
312 #define TLV_TYPE_POWER_CAPABILITY 0x0021
313 
314 /** TLV type : Vendor Specific IE */
315 #define TLV_TYPE_VENDOR_SPECIFIC_IE 0xdd
316 
317 /** TLV type : Key material */
318 #define TLV_TYPE_KEY_MATERIAL (PROPRIETARY_TLV_BASE_ID + 0x00) // 0x0100
319 /** TLV type : Channel list */
320 #define TLV_TYPE_CHANLIST (PROPRIETARY_TLV_BASE_ID + 0x01U) // 0x0101
321 /** TLV type : Number of probes */
322 #define TLV_TYPE_NUMPROBES (PROPRIETARY_TLV_BASE_ID + 0x02) // 0x0102
323 /** TLV type : Beacon RSSI low */
324 #define TLV_TYPE_RSSI_LOW (PROPRIETARY_TLV_BASE_ID + 0x04U) // 0x0104
325 /** TLV type : Beacon SNR low */
326 #define TLV_TYPE_SNR_LOW (PROPRIETARY_TLV_BASE_ID + 0x05U) // 0x0105
327 /** TLV type : Fail count */
328 #define TLV_TYPE_FAILCOUNT (PROPRIETARY_TLV_BASE_ID + 0x06U) // 0x0106
329 /** TLV type : BCN miss */
330 #define TLV_TYPE_BCNMISS (PROPRIETARY_TLV_BASE_ID + 0x07U) // 0x0107
331 /** TLV type : LED behavior */
332 #define TLV_TYPE_LEDBEHAVIOR (PROPRIETARY_TLV_BASE_ID + 0x09) // 0x0109
333 /** TLV type : Passthrough */
334 #define TLV_TYPE_PASSTHROUGH (PROPRIETARY_TLV_BASE_ID + 0x0aU) // 0x010a
335 /** TLV type : Power TBL 2.4 Ghz */
336 #define TLV_TYPE_POWER_TBL_2_4GHZ (PROPRIETARY_TLV_BASE_ID + 0x0c) // 0x010c
337 /** TLV type : Power TBL 5 GHz */
338 #define TLV_TYPE_POWER_TBL_5GHZ (PROPRIETARY_TLV_BASE_ID + 0x0d) // 0x010d
339 /** TLV type : WMM queue status */
340 #define TLV_TYPE_WMMQSTATUS (PROPRIETARY_TLV_BASE_ID + 0x10) // 0x0110
341 /** TLV type : Wildcard SSID */
342 #define TLV_TYPE_WILDCARDSSID (PROPRIETARY_TLV_BASE_ID + 0x12) // 0x0112
343 /** TLV type : TSF timestamp */
344 #define TLV_TYPE_TSFTIMESTAMP (PROPRIETARY_TLV_BASE_ID + 0x13) // 0x0113
345 /** TLV type : ARP filter */
346 #define TLV_TYPE_ARP_FILTER (PROPRIETARY_TLV_BASE_ID + 0x15U) // 0x0115
347 /** TLV type : Beacon RSSI high */
348 #define TLV_TYPE_RSSI_HIGH (PROPRIETARY_TLV_BASE_ID + 0x16U) // 0x0116
349 /** TLV type : Beacon SNR high */
350 #define TLV_TYPE_SNR_HIGH (PROPRIETARY_TLV_BASE_ID + 0x17U) // 0x0117
351 /** TLV type : Start BG scan later */
352 #define TLV_TYPE_STARTBGSCANLATER (PROPRIETARY_TLV_BASE_ID + 0x1e) // 0x011e
353 /** TLV type: BG scan repeat count */
354 #define TLV_TYPE_REPEAT_COUNT (PROPRIETARY_TLV_BASE_ID + 0xb0) // 0x01b0
355 /** TLV type : Authentication type */
356 #define TLV_TYPE_AUTH_TYPE (PROPRIETARY_TLV_BASE_ID + 0x1fU) // 0x011f
357 /** TLV type : BSSID */
358 #define TLV_TYPE_BSSID (PROPRIETARY_TLV_BASE_ID + 0x23U) // 0x0123
359 #if CONFIG_SCAN_WITH_RSSIFILTER
360 /** TLV type : RSSI Threshold */
361 #define TLV_TYPE_RSSI_THRESHOLD (PROPRIETARY_TLV_BASE_ID + 0x151)
362 #endif
363 
364 /** TLV type : Link Quality */
365 #define TLV_TYPE_LINK_QUALITY (PROPRIETARY_TLV_BASE_ID + 0x24U) // 0x0124
366 
367 /** TLV type : Data RSSI low */
368 #define TLV_TYPE_RSSI_LOW_DATA (PROPRIETARY_TLV_BASE_ID + 0x26U) // 0x0126
369 /** TLV type : Data SNR low */
370 #define TLV_TYPE_SNR_LOW_DATA (PROPRIETARY_TLV_BASE_ID + 0x27U) // 0x0127
371 /** TLV type : Data RSSI high */
372 #define TLV_TYPE_RSSI_HIGH_DATA (PROPRIETARY_TLV_BASE_ID + 0x28U) // 0x0128
373 /** TLV type : Data SNR high */
374 #define TLV_TYPE_SNR_HIGH_DATA (PROPRIETARY_TLV_BASE_ID + 0x29U) // 0x0129
375 
376 /** TLV type : Channel band list */
377 #define TLV_TYPE_CHANNELBANDLIST (PROPRIETARY_TLV_BASE_ID + 0x2a) // 0x012a
378 
379 /** TLV type : Passphrase */
380 #define TLV_TYPE_PASSPHRASE (PROPRIETARY_TLV_BASE_ID + 0x3cU) // 0x013c
381 
382 /** TLV type : WPA3 SAE Password */
383 #define TLV_TYPE_WPA3_SAE_PASSWORD (PROPRIETARY_TLV_BASE_ID + 0x141U) // 0x0241
384 
385 /** TLV type : SAE PWE Derivation Mode */
386 #define TLV_TYPE_WPA3_SAE_PWE_DERIVATION_MODE (PROPRIETARY_TLV_BASE_ID + 339) /* 0x0100 + 0x153 */
387 
388 /** TLV type: fw cap info */
389 #define TLV_TYPE_FW_CAP_INFO (PROPRIETARY_TLV_BASE_ID + 318)
390 
391 /** TLV type : Encryption Protocol TLV */
392 #define TLV_TYPE_ENCRYPTION_PROTO (PROPRIETARY_TLV_BASE_ID + 0x40) // 0x0140
393 /** TLV type : Cipher TLV */
394 #define TLV_TYPE_CIPHER (PROPRIETARY_TLV_BASE_ID + 0x42) // 0x0142
395 /** TLV type : PMK */
396 #define TLV_TYPE_PMK (PROPRIETARY_TLV_BASE_ID + 0x44U) // 0x0144
397 
398 /** TLV type : BCN miss */
399 #define TLV_TYPE_PRE_BCNMISS (PROPRIETARY_TLV_BASE_ID + 0x49U) // 0x0149
400 
401 /** TLV type: WAPI IE */
402 #define TLV_TYPE_WAPI_IE (PROPRIETARY_TLV_BASE_ID + 0x5e) // 0x015e
403 
404 /** TLV type: MGMT IE */
405 #define TLV_TYPE_MGMT_IE (PROPRIETARY_TLV_BASE_ID + 0x69) // 0x0169
406 /** TLV type: MAX_MGMT_IE */
407 #define TLV_TYPE_MAX_MGMT_IE (PROPRIETARY_TLV_BASE_ID + 0xaa) // 0x01aa
408 
409 /** TLV type : HT Capabilities */
410 #define TLV_TYPE_HT_CAP (PROPRIETARY_TLV_BASE_ID + 0x4a) // 0x014a
411 /** TLV type : HT Information */
412 #define TLV_TYPE_HT_INFO (PROPRIETARY_TLV_BASE_ID + 0x4b) // 0x014b
413 /** TLV type : Secondary Channel Offset */
414 #define TLV_SECONDARY_CHANNEL_OFFSET (PROPRIETARY_TLV_BASE_ID + 0x4c) // 0x014c
415 /** TLV type : 20/40 BSS Coexistence */
416 #define TLV_TYPE_2040BSS_COEXISTENCE (PROPRIETARY_TLV_BASE_ID + 0x4d) // 0x014d
417 /** TLV type : Overlapping BSS Scan Parameters */
418 #define TLV_TYPE_OVERLAP_BSS_SCAN_PARAM (PROPRIETARY_TLV_BASE_ID + 0x4e) // 0x014e
419 /** TLV type : Extended capabilities */
420 #define TLV_TYPE_EXTCAP (PROPRIETARY_TLV_BASE_ID + 0x4f) // 0x014f
421 /** TLV type : Set of MCS values that STA desires to use within the BSS */
422 #define TLV_TYPE_HT_OPERATIONAL_MCS_SET (PROPRIETARY_TLV_BASE_ID + 0x50) // 0x0150
423 /** TLV type : Channel TRPC Config */
424 #define TLV_TYPE_CHANNEL_TRPC_CONFIG (PROPRIETARY_TLV_BASE_ID + 0x89U) // 0x0189
425 /** TLV type : Channel RU PWR Config */
426 #define TLV_TYPE_CHANNEL_RU_PWR_CONFIG (PROPRIETARY_TLV_BASE_ID + 0x144U) // 0x0244
427 /** TLV type : RXBA_SYNC */
428 #define TLV_TYPE_RXBA_SYNC (PROPRIETARY_TLV_BASE_ID + 0x99) // 0x0199
429 #ifdef KEY_PARAM_SET_V2
430 /** TLV type: key param v2 */
431 #define TLV_TYPE_KEY_PARAM_V2 (PROPRIETARY_TLV_BASE_ID + 0x9CU) /* 0x019C */
432 #endif
433 #if CONFIG_EXT_SCAN_SUPPORT
434 /** TLV type : SCAN channel gap */
435 #define TLV_TYPE_SCAN_CHANNEL_GAP (PROPRIETARY_TLV_BASE_ID + 0xc5) /* 0x01c5 */
436 #endif
437 /** TLV type : BridgeParamSet */
438 #define TLV_TYPE_BRIDGE_PARAM (PROPRIETARY_TLV_BASE_ID + 0xe0)
439 /** TLV type : AutoLinkParamSet */
440 #define TLV_TYPE_AUTOLINK_PARAM (PROPRIETARY_TLV_BASE_ID + 0xe8) /*0x01e8*/
441 /** TLV type : Coex parameter config */
442 #define TLV_TYPE_EXT_BLE_COEX_CFG (PROPRIETARY_TLV_BASE_ID + 0x12F)
443 #if CONFIG_WIFI_CLOCKSYNC
444 /** TLV type : GPIO TSF LATCH CONFIG */
445 #define TLV_TYPE_GPIO_TSF_LATCH_CONFIG (PROPRIETARY_TLV_BASE_ID + 0x154U)
446 /** TLV type : GPIO TSF LATCH REPORT*/
447 #define TLV_TYPE_GPIO_TSF_LATCH_REPORT (PROPRIETARY_TLV_BASE_ID + 0x155U)
448 #endif /* CONFIG_WIFI_CLOCKSYNC */
449 
450 /** TLV ID : Management Frame */
451 #define TLV_TYPE_MGMT_FRAME (PROPRIETARY_TLV_BASE_ID + 0x68) /* 0x0168 */
452 /** TLV type: management filter  */
453 #define TLV_TYPE_MGMT_FRAME_WAKEUP (PROPRIETARY_TLV_BASE_ID + 0x116) /* 0x0216 */
454 
455 #define TLV_TYPE_PREV_BSSID (PROPRIETARY_TLV_BASE_ID + 330)
456 
457 #define TLV_TYPE_CSI_MONITOR_CFG (PROPRIETARY_TLV_BASE_ID + 354) /*0x0262*/
458 
459 /** ADDBA TID mask */
460 #define ADDBA_TID_MASK (MBIT(2) | MBIT(3) | MBIT(4) | MBIT(5))
461 /** DELBA TID mask */
462 #define DELBA_TID_MASK (MBIT(12) | MBIT(13) | MBIT(14) | MBIT(15))
463 /** ADDBA Starting Sequence Number Mask */
464 #define SSN_MASK 0xfff0
465 
466 /** Block Ack result status */
467 /** Block Ack Result : Success */
468 #define BA_RESULT_SUCCESS 0x0U
469 /** Block Ack Result : Execution failure */
470 #define BA_RESULT_FAILURE 0x1
471 /** Block Ack Result : Timeout */
472 #define BA_RESULT_TIMEOUT 0x2U
473 /** Block Ack Result : Data invalid */
474 #define BA_RESULT_DATA_INVALID 0x3
475 
476 /** Get the baStatus (NOT_SETUP, COMPLETE, IN_PROGRESS)
477  *  in Tx BA stream table */
478 #define IS_BASTREAM_SETUP(ptr) ((ptr)->ba_status)
479 
480 /** An AMPDU/AMSDU could be disallowed for certain TID. 0xff means
481  *  no aggregation is enabled for the assigned TID */
482 #define BA_STREAM_NOT_ALLOWED 0xffU
483 
484 /** Test if 11n is enabled by checking the HTCap IE */
485 #define IS_11N_ENABLED(priv)                                               \
486     (((priv)->config_bands & BAND_GN || (priv)->config_bands & BAND_AN) && \
487      ((priv)->curr_bss_params.bss_descriptor.pht_cap != MNULL))
488 /** Find out if we are the initiator or not */
489 #define INITIATOR_BIT(DelBAParamSet) (((DelBAParamSet)&MBIT(DELBA_INITIATOR_POS)) >> DELBA_INITIATOR_POS)
490 
491 /** 4K buf size */
492 #define MLAN_TX_DATA_BUF_SIZE_4K 4096
493 /** 8K buf size */
494 #define MLAN_TX_DATA_BUF_SIZE_8K 8192
495 #if CONFIG_11AC
496 /** 12K buf size */
497 #define MLAN_TX_DATA_BUF_SIZE_12K 12288
498 #endif
499 /** Max Rx AMPDU Size */
500 #define MAX_RX_AMPDU_SIZE_64K 0x03
501 /** Non green field station */
502 #define NON_GREENFIELD_STAS 0x04
503 #if CONFIG_AMSDU_IN_AMPDU
504 /** Supported A-MSDU size */
505 #define MAX_SUPPORT_AMSDU_SIZE 4096
506 #endif
507 
508 /** Max AMSDU size support */
509 #define HWSPEC_MAX_AMSDU_SUPP MBIT(31)
510 /** Greenfield support */
511 #define HWSPEC_GREENFIELD_SUPP MBIT(29)
512 /** SM Power Save enable */
513 #define CAPINFO_SMPS_ENABLE MBIT(27)
514 /** RX STBC support */
515 #define HWSPEC_RXSTBC_SUPP MBIT(26)
516 /** ShortGI @ 40Mhz support */
517 #define HWSPEC_SHORTGI40_SUPP MBIT(24)
518 /** ShortGI @ 20Mhz support */
519 #define HWSPEC_SHORTGI20_SUPP MBIT(23)
520 /** RX LDPC support */
521 #define HWSPEC_LDPC_SUPP MBIT(22)
522 /** Channel width 40Mhz support */
523 #define HWSPEC_CHANBW40_SUPP MBIT(17)
524 /** SM Power Save mode */
525 #define CAPINFO_SMPS_MODE MBIT(9)
526 /** 40Mhz intolarent enable */
527 #define CAPINFO_40MHZ_INTOLARENT MBIT(8)
528 
529 /** Default 11n capability mask for 2.4GHz */
530 #if defined(SD8978) || defined(SD8987) || defined(SD8997) || defined(SD9097) || defined(SD9098) || defined(SD9177)
531 #define DEFAULT_11N_CAP_MASK_BG \
532     (HWSPEC_SHORTGI20_SUPP | HWSPEC_RXSTBC_SUPP | HWSPEC_SHORTGI40_SUPP | HWSPEC_CHANBW40_SUPP | HWSPEC_LDPC_SUPP)
533 #elif defined(SD8801) || defined(RW610)
534 #define DEFAULT_11N_CAP_MASK_BG (HWSPEC_SHORTGI20_SUPP | HWSPEC_RXSTBC_SUPP | HWSPEC_LDPC_SUPP)
535 #endif
536 /** Default 11n capability mask for 5GHz */
537 #define DEFAULT_11N_CAP_MASK_A                                                                      \
538     (HWSPEC_CHANBW40_SUPP | HWSPEC_SHORTGI20_SUPP | HWSPEC_MAX_AMSDU_SUPP | HWSPEC_SHORTGI40_SUPP | \
539      HWSPEC_RXSTBC_SUPP | HWSPEC_LDPC_SUPP)
540 
541 /** Bits to ignore in hw_dev_cap as these bits are set in get_hw_spec */
542 #define IGN_HW_DEV_CAP (CAPINFO_40MHZ_INTOLARENT | (CAPINFO_SMPS_ENABLE | CAPINFO_SMPS_MODE))
543 
544 /** HW_SPEC FwCapInfo : If FW support RSN Replay Detection */
545 #define ISSUPP_RSN_REPLAY_DETECTION(FwCapInfo) (FwCapInfo & MBIT(28))
546 
547 /** HW_SPEC FwCapInfo */
548 #define ISSUPP_11NENABLED(FwCapInfo) ((FwCapInfo)&MBIT(11))
549 
550 /** HW_SPEC Dot11nDevCap : MAX AMSDU supported */
551 #define ISSUPP_MAXAMSDU(Dot11nDevCap) ((Dot11nDevCap)&MBIT(31))
552 /** HW_SPEC Dot11nDevCap : Beamforming support */
553 #define ISSUPP_BEAMFORMING(Dot11nDevCap) ((Dot11nDevCap)&MBIT(30))
554 /** HW_SPEC Dot11nDevCap : Green field support */
555 #define ISSUPP_GREENFIELD(Dot11nDevCap) ((Dot11nDevCap)&MBIT(29))
556 /** HW_SPEC Dot11nDevCap : AMPDU support */
557 #define ISSUPP_AMPDU(Dot11nDevCap) ((Dot11nDevCap)&MBIT(28))
558 /** HW_SPEC Dot11nDevCap : MIMO PS support  */
559 #define ISSUPP_MIMOPS(Dot11nDevCap) ((Dot11nDevCap)&MBIT(27))
560 /** HW_SPEC Dot11nDevCap : Rx STBC support */
561 #define ISSUPP_RXSTBC(Dot11nDevCap) ((Dot11nDevCap)&MBIT(26))
562 /** HW_SPEC Dot11nDevCap : Tx STBC support */
563 #define ISSUPP_TXSTBC(Dot11nDevCap) ((Dot11nDevCap)&MBIT(25))
564 /** HW_SPEC Dot11nDevCap : Short GI @ 40Mhz support */
565 #define ISSUPP_SHORTGI40(Dot11nDevCap) ((Dot11nDevCap)&MBIT(24))
566 /** HW_SPEC Dot11nDevCap : Short GI @ 20Mhz support */
567 #define ISSUPP_SHORTGI20(Dot11nDevCap) ((Dot11nDevCap)&MBIT(23))
568 /** HW_SPEC Dot11nDevCap : Rx LDPC support */
569 #define ISSUPP_RXLDPC(Dot11nDevCap) ((Dot11nDevCap)&MBIT(22))
570 /** HW_SPEC Dot11nDevCap : Number of TX BA streams supported */
571 #define ISSUPP_GETTXBASTREAM(Dot11nDevCap) ((Dot11nDevCap >> 18) & 0xF)
572 /** HW_SPEC Dot11nDevCap : Channel BW support @ 40Mhz  support */
573 #define ISSUPP_CHANWIDTH40(Dot11nDevCap) ((Dot11nDevCap)&MBIT(17))
574 /** HW_SPEC Dot11nDevCap : Channel BW support @ 20Mhz  support */
575 #define ISSUPP_CHANWIDTH20(Dot11nDevCap) ((Dot11nDevCap)&MBIT(16))
576 /** HW_SPEC Dot11nDevCap : Channel BW support @ 10Mhz  support */
577 #define ISSUPP_CHANWIDTH10(Dot11nDevCap) ((Dot11nDevCap)&MBIT(15))
578 /** Dot11nUsrCap : 40Mhz intolarance enabled */
579 #define ISENABLED_40MHZ_INTOLARENT(Dot11nDevCap) ((Dot11nDevCap)&MBIT(8))
580 /** HW_SPEC Dot11nDevCap : Rx AntennaD support */
581 #define ISSUPP_RXANTENNAD(Dot11nDevCap) ((Dot11nDevCap)&MBIT(7))
582 /** HW_SPEC Dot11nDevCap : Rx AntennaC support */
583 #define ISSUPP_RXANTENNAC(Dot11nDevCap) ((Dot11nDevCap)&MBIT(6))
584 /** HW_SPEC Dot11nDevCap : Rx AntennaB support */
585 #define ISSUPP_RXANTENNAB(Dot11nDevCap) ((Dot11nDevCap)&MBIT(5))
586 /** HW_SPEC Dot11nDevCap : Rx AntennaA support */
587 #define ISSUPP_RXANTENNAA(Dot11nDevCap) ((Dot11nDevCap)&MBIT(4))
588 /** HW_SPEC Dot11nDevCap : Tx AntennaD support */
589 #define ISSUPP_TXANTENNAD(Dot11nDevCap) ((Dot11nDevCap)&MBIT(3))
590 /** HW_SPEC Dot11nDevCap : Tx AntennaC support */
591 #define ISSUPP_TXANTENNAC(Dot11nDevCap) ((Dot11nDevCap)&MBIT(2))
592 /** HW_SPEC Dot11nDevCap : Tx AntennaB support */
593 #define ISSUPP_TXANTENNAB(Dot11nDevCap) ((Dot11nDevCap)&MBIT(1))
594 /** HW_SPEC Dot11nDevCap : Tx AntennaA support */
595 #define ISSUPP_TXANTENNAA(Dot11nDevCap) ((Dot11nDevCap)&MBIT(0))
596 
597 /** HW_SPEC Dot11nDevCap : Set support of channel bw @ 40Mhz */
598 #define SETSUPP_CHANWIDTH40(Dot11nDevCap) ((Dot11nDevCap) |= MBIT(17))
599 /** HW_SPEC Dot11nDevCap : Reset support of channel bw @ 40Mhz */
600 #define RESETSUPP_CHANWIDTH40(Dot11nDevCap) ((Dot11nDevCap) &= ~MBIT(17))
601 
602 /** Dot11nUsrCap : Reset 40Mhz intolarance enabled */
603 #define RESET_40MHZ_INTOLARENT(Dot11nDevCap) ((Dot11nDevCap) &= ~MBIT(8))
604 /** HW_SPEC Dot11nDevCap : Reset Short GI @ 40Mhz support */
605 #define RESETSUPP_SHORTGI40(Dot11nDevCap) ((Dot11nDevCap) &= ~MBIT(24))
606 
607 /** DevMCSSupported : Tx MCS supported */
608 #define GET_TXMCSSUPP(DevMCSSupported) ((DevMCSSupported) >> 4)
609 /** DevMCSSupported : Rx MCS supported */
610 #define GET_RXMCSSUPP(DevMCSSupported) ((DevMCSSupported)&0x0fU)
611 /** hw_dev_cap : MPDU DENSITY */
612 #define GET_MPDU_DENSITY(hw_dev_cap) (hw_dev_cap & 0x7)
613 
614 /** GET HTCapInfo : Supported Channel BW */
615 #define GETHT_SUPPCHANWIDTH(HTCapInfo) ((HTCapInfo)&MBIT(1))
616 /** GET HTCapInfo : Support for Greenfield */
617 #define GETHT_GREENFIELD(HTCapInfo) ((HTCapInfo)&MBIT(4))
618 /** GET HTCapInfo : Support for Short GI @ 20Mhz */
619 #define GETHT_SHORTGI20(HTCapInfo) ((HTCapInfo)&MBIT(5))
620 /** GET HTCapInfo : Support for Short GI @ 40Mhz */
621 #define GETHT_SHORTGI40(HTCapInfo) ((HTCapInfo)&MBIT(6))
622 /** GET HTCapInfo : Support for Tx STBC */
623 #define GETHT_TXSTBC(HTCapInfo) ((HTCapInfo)&MBIT(7))
624 
625 /** GET HTCapInfo : Support for Rx STBC */
626 #define GETHT_RXSTBC(HTCapInfo) (((HTCapInfo) >> 8) & 0x03)
627 /** GET HTCapInfo : Support for Delayed ACK */
628 #define GETHT_DELAYEDBACK(HTCapInfo) ((HTCapInfo)&MBIT(10))
629 /** GET HTCapInfo : Support for Max AMSDU */
630 #define GETHT_MAXAMSDU(HTCapInfo) ((HTCapInfo)&MBIT(11))
631 /** GET HTCapInfo : Support 40Mhz Intolarence */
632 #define GETHT_40MHZ_INTOLARANT(HTCapInfo) (HTCapInfo & MBIT(14))
633 
634 /** SET HTCapInfo : Set support for LDPC coding capability */
635 #define SETHT_LDPCCODINGCAP(HTCapInfo) ((HTCapInfo) |= MBIT(0))
636 /** SET HTCapInfo : Set support for Channel BW */
637 #define SETHT_SUPPCHANWIDTH(HTCapInfo) ((HTCapInfo) |= MBIT(1))
638 /** SET HTCapInfo : Set support for Greenfield */
639 #define SETHT_GREENFIELD(HTCapInfo) ((HTCapInfo) |= MBIT(4))
640 /** SET HTCapInfo : Set support for Short GI @ 20Mhz */
641 #define SETHT_SHORTGI20(HTCapInfo) ((HTCapInfo) |= MBIT(5))
642 /** SET HTCapInfo : Set support for Short GI @ 40Mhz */
643 #define SETHT_SHORTGI40(HTCapInfo) ((HTCapInfo) |= MBIT(6))
644 /** SET HTCapInfo : Set support for Tx STBC */
645 #define SETHT_TXSTBC(HTCapInfo) ((HTCapInfo) |= MBIT(7))
646 /** SET HTCapInfo : Set support for Rx STBC */
647 #define SETHT_RXSTBC(HTCapInfo, value) ((HTCapInfo) |= ((value) << 8))
648 /** SET HTCapInfo : Set support for delayed block ack */
649 #define SETHT_DELAYEDBACK(HTCapInfo) ((HTCapInfo) |= MBIT(10))
650 /** SET HTCapInfo : Set support for Max size AMSDU */
651 #define SETHT_MAXAMSDU(HTCapInfo) ((HTCapInfo) |= MBIT(11))
652 /** SET HTCapInfo : Set support for DSSS/CCK Rates @ 40Mhz */
653 #define SETHT_DSSSCCK40(HTCapInfo) ((HTCapInfo) |= MBIT(12))
654 /** SET HTCapInfo : Enable 40Mhz Intolarence */
655 #define SETHT_40MHZ_INTOLARANT(HTCapInfo) ((HTCapInfo) |= MBIT(14))
656 /** SET HTCapInfo : Disable Static SM power save */
657 #define SETHT_STATIC_SMPS(HTCapInfo) ((HTCapInfo) |= (MBIT(2) | MBIT(3)))
658 
659 /** RESET HTCapInfo : Set support for LDPC coding capability */
660 #define RESETHT_LDPCCODINGCAP(HTCapInfo) ((HTCapInfo) &= ~MBIT(0))
661 /** RESET HTCapInfo : Set support for Channel BW */
662 #define RESETHT_SUPPCHANWIDTH(HTCapInfo) ((HTCapInfo) &= ~MBIT(1))
663 /** RESET HTCapInfo : Set support for Greenfield */
664 #define RESETHT_GREENFIELD(HTCapInfo) ((HTCapInfo) &= ~MBIT(4))
665 /** RESET HTCapInfo : Set support for Short GI @ 20Mhz */
666 #define RESETHT_SHORTGI20(HTCapInfo) ((HTCapInfo) &= ~MBIT(5))
667 /** RESET HTCapInfo : Set support for Short GI @ 40Mhz */
668 #define RESETHT_SHORTGI40(HTCapInfo) ((HTCapInfo) &= ~MBIT(6))
669 /** RESET HTCapInfo : Set support for Tx STBC */
670 #define RESETHT_TXSTBC(HTCapInfo) ((HTCapInfo) &= ~MBIT(7))
671 /** RESET HTCapInfo : Set support for Rx STBC */
672 #define RESETHT_RXSTBC(HTCapInfo) ((HTCapInfo) &= ~(0x03 << 8))
673 /** RESET HTCapInfo : Set support for delayed block ack */
674 #define RESETHT_DELAYEDBACK(HTCapInfo) ((HTCapInfo) &= ~MBIT(10))
675 /** RESET HTCapInfo : Set support for Max size AMSDU */
676 #define RESETHT_MAXAMSDU(HTCapInfo) ((HTCapInfo) &= ~MBIT(11))
677 /** RESET HTCapInfo : Set support for Channel BW */
678 #define RESETHT_DSSSCCK40(HTCapInfo) ((HTCapInfo) &= ~MBIT(12))
679 /** RESET HTCapInfo : Disable 40Mhz Intolarence */
680 #define RESETHT_40MHZ_INTOLARANT(HTCapInfo) ((HTCapInfo) &= ~MBIT(14))
681 /** RESET HTCapInfo: Enable SM power save */
682 #define RESETHT_SM_POWERSAVE(HTCapInfo) ((HTCapInfo) &= ~(MBIT(2) | MBIT(3)))
683 /** RESET HTExtCap : Clear RD Responder bit */
684 #define RESETHT_EXTCAP_RDG(HTExtCap) ((HTExtCap) &= ~MBIT(11))
685 /** SET MCS32 */
686 #define SETHT_MCS32(x) (x[4] |= 1U)
687 /** Set mcs set defined bit */
688 #define SETHT_MCS_SET_DEFINED(x) (x[12] |= 1)
689 /** Set the highest Rx data rate */
690 #define SETHT_RX_HIGHEST_DT_SUPP(x, y) ((*(t_u16 *)(x + 10)) = y)
691 /** AMPDU factor size */
692 #define AMPDU_FACTOR_64K 0x03U
693 /** Set AMPDU size in A-MPDU paramter field */
694 #define SETAMPDU_SIZE(x, y) \
695     do                      \
696     {                       \
697         (x) = (x) & ~0x03U; \
698         (x) |= (y)&0x03U;   \
699     } while (false) /** Set AMPDU spacing in A-MPDU paramter field */
700 #define SETAMPDU_SPACING(x, y)    \
701     do                            \
702     {                             \
703         (x) = (x) & ~0x1cU;       \
704         (x) |= ((y)&0x07U) << 2U; \
705     } while (false)
706 
707 /** RadioType : Support for Band A */
708 #define ISSUPP_BANDA(FwCapInfo) (FwCapInfo & MBIT(10))
709 /** RadioType : Support for 40Mhz channel BW */
710 #define ISALLOWED_CHANWIDTH40(Field2) ((Field2)&MBIT(2))
711 /** RadioType : Set support 40Mhz channel */
712 #define SET_CHANWIDTH40(Field2) ((Field2) |= MBIT(2))
713 /** RadioType : Reset support 40Mhz channel */
714 #define RESET_CHANWIDTH40(Field2) ((Field2) &= ~(MBIT(0) | MBIT(1) | MBIT(2)))
715 /** RadioType : Get secondary channel */
716 #define GET_SECONDARYCHAN(Field2) ((Field2) & (MBIT(0) | MBIT(1)))
717 /** RadioType : Set secondary channel */
718 #define SET_SECONDARYCHAN(RadioType, SECCHAN) ((RadioType) |= ((SECCHAN) << 4))
719 
720 /** Locally administered address */
721 #define ISLOCALLY_ADMINISTERED_ADDR(mac) (mac & MBIT(1))
722 
723 /* fw_cap_info bit18 for ecsa support*/
724 #define FW_CAPINFO_ECSA MBIT(18)
725 
726 #if CONFIG_DRIVER_OWE
727 /** fw_cap_info bit30 for Embedded OWE Support*/
728 #define FW_CAPINFO_EMBEDDED_OWE_SUPPORT MBIT(30)
729 /** Check if Embedded OWE is supported by firmware */
730 #define IS_FW_SUPPORT_EMBEDDED_OWE(_adapter) (_adapter->fw_cap_info & FW_CAPINFO_EMBEDDED_OWE_SUPPORT)
731 #endif
732 
733 #if CONFIG_MULTI_BSSID_SUPPORT
734 /** FW cap info bit 9: Multi BSSID Support */
735 #define FW_CAPINFO_EXT_MULTI_BSSID MBIT(9)
736 /** Check if Multi BSSID supported by firmware */
737 #define IS_FW_SUPPORT_MULTIBSSID(_adapter) (_adapter->fw_cap_ext & FW_CAPINFO_EXT_MULTI_BSSID)
738 #endif
739 
740 /** FW cap info bit 16: Tx mgmt pkt with command*/
741 #if defined(SD8987)
742 #define FW_CAPINFO_EXT_CMD_TX_DATA          MBIT(29)
743 #define IS_FW_SUPPORT_CMD_TX_DATA(_adapter) (_adapter->fw_cap_info & FW_CAPINFO_EXT_CMD_TX_DATA)
744 #elif defined(SD9177)
745 #define FW_CAPINFO_EXT_CMD_TX_DATA          MBIT(16)
746 /** Check if transmit mgmt pkt through command supported by firmware */
747 #define IS_FW_SUPPORT_CMD_TX_DATA(_adapter) (_adapter->fw_cap_ext & FW_CAPINFO_EXT_CMD_TX_DATA)
748 #endif
749 
750 /** LLC/SNAP header len   */
751 #define LLC_SNAP_LEN 8
752 /** Ethernet header len */
753 #define ETH_HDR_LEN 14
754 
755 /** bandwidth following HTCAP */
756 #define BW_FOLLOW_HTCAP 0
757 /** bandwidth following VHTCAP */
758 #define BW_FOLLOW_VHTCAP 1U
759 
760 /** HW_SPEC FwCapInfo */
761 #define HWSPEC_11ACSGI80_SUPP  MBIT(5)
762 #define HWSPEC_11ACRXSTBC_SUPP MBIT(8)
763 
764 #define ISSUPP_11ACENABLED(FwCapInfo) ((FwCapInfo) & (MBIT(12) | MBIT(13)))
765 
766 #define ISSUPP_11AC2GENABLED(FwCapInfo) ((FwCapInfo)&MBIT(12))
767 #define ISSUPP_11AC5GENABLED(FwCapInfo) ((FwCapInfo)&MBIT(13))
768 
769 /** HW_SPEC FwCapExt: no 5G enabled */
770 #define ISSUPP_NO5G(FwCapExt) (FwCapExt & MBIT(17))
771 
772 /** HW_SPEC Dot11acDevCap : HTC-VHT supported */
773 #define ISSUPP_11ACVHTHTCVHT(Dot11acDevCap) (Dot11acDevCap & MBIT(22))
774 /** HW_SPEC Dot11acDevCap : VHT TXOP PS support */
775 #define ISSUPP_11ACVHTTXOPPS(Dot11acDevCap) (Dot11acDevCap & MBIT(21))
776 /** HW_SPEC Dot11acDevCap : MU RX beamformee support */
777 #define ISSUPP_11ACMURXBEAMFORMEE(Dot11acDevCap) (Dot11acDevCap & MBIT(20))
778 /** HW_SPEC Dot11acDevCap : MU TX beamformee support */
779 #define ISSUPP_11ACMUTXBEAMFORMEE(Dot11acDevCap) (Dot11acDevCap & MBIT(19))
780 /** HW_SPEC Dot11acDevCap : SU Beamformee support */
781 #define ISSUPP_11ACSUBEAMFORMEE(Dot11acDevCap) (Dot11acDevCap & MBIT(12))
782 /** HW_SPEC Dot11acDevCap : SU Beamformer support */
783 #define ISSUPP_11ACSUBEAMFORMER(Dot11acDevCap) (Dot11acDevCap & MBIT(11))
784 /** HW_SPEC Dot11acDevCap : Rx STBC support */
785 #define ISSUPP_11ACRXSTBC(Dot11acDevCap) (Dot11acDevCap & MBIT(8))
786 /** HW_SPEC Dot11acDevCap : Tx STBC support */
787 #define ISSUPP_11ACTXSTBC(Dot11acDevCap) (Dot11acDevCap & MBIT(7))
788 /** HW_SPEC Dot11acDevCap : Short GI support for 160MHz BW */
789 #define ISSUPP_11ACSGI160(Dot11acDevCap) (Dot11acDevCap & MBIT(6))
790 /** HW_SPEC Dot11acDevCap : Short GI support for 80MHz BW */
791 #define ISSUPP_11ACSGI80(Dot11acDevCap) (Dot11acDevCap & MBIT(5))
792 /** HW_SPEC Dot11acDevCap : LDPC coding support */
793 #define ISSUPP_11ACLDPC(Dot11acDevCap) (Dot11acDevCap & MBIT(4))
794 /** HW_SPEC Dot11acDevCap : Channel BW 20/40/80/160/80+80 MHz support */
795 #define ISSUPP_11ACBW8080(Dot11acDevCap) (Dot11acDevCap & MBIT(3))
796 /** HW_SPEC Dot11acDevCap : Channel BW 20/40/80/160 MHz support */
797 #define ISSUPP_11ACBW160(Dot11acDevCap) (Dot11acDevCap & MBIT(2))
798 
799 /** Set VHT Cap Info: Max MPDU length */
800 #define SET_VHTCAP_MAXMPDULEN(VHTCapInfo, value) ((VHTCapInfo) |= (value & 0x03U))
801 /** SET VHT CapInfo:  Supported Channel Width SET (2 bits)*/
802 #define SET_VHTCAP_CHWDSET(VHTCapInfo, value) ((VHTCapInfo) |= ((value & 0x3U) << 2))
803 /** SET VHT CapInfo:  Rx STBC (3 bits) */
804 #define SET_VHTCAP_RXSTBC(VHTCapInfo, value) ((VHTCapInfo) |= ((value & 0x7U) << 8))
805 /** SET VHT CapInfo:  Commpressed Steering Num of BFer Ant Supported (3 bits) */
806 #define SET_VHTCAP_SNBFERANT(VHTCapInfo, value) ((VHTCapInfo) |= ((value & 0x7U) << 13))
807 /** SET VHT CapInfo:  Num of Sounding Dimensions (3 bits) */
808 #define SET_VHTCAP_NUMSNDDM(VHTCapInfo, value) ((VHTCapInfo) |= ((value & 0x7U) << 16))
809 /** SET VHT CapInfo:  Max AMPDU Length Exponent (3 bits) */
810 #define SET_VHTCAP_MAXAMPDULENEXP(VHTCapInfo, value) ((VHTCapInfo) |= ((value & 0x7U) << 23))
811 /** SET VHT CapInfo:  VHT Link Adaptation Capable (2 bits) */
812 #define SET_VHTCAP_LINKADPCAP(VHTCapInfo, value) ((VHTCapInfo) |= ((value & 0x3U) << 26))
813 
814 /** HW_SPEC Dot11acDevCap : ReSet VHT Link Adapation Capable */
815 #define RESET_11ACVHTLINKCAPA(Dot11acDevCap, value) ((Dot11acDevCap) &= ~(0x03))
816 /** HW_SPEC Dot11acDevCap : ReSet Maximum AMPDU Length Exponent */
817 #define RESET_11ACAMPDULENEXP(Dot11acDevCap, value) ((Dot11acDevCap) &= ~(0x07))
818 /** HW_SPEC Dot11acDevCap : ReSet support of HTC-VHT */
819 #define RESET_11ACVHTHTCVHT(Dot11acDevCap) ((Dot11acDevCap) &= ~MBIT(22))
820 /** HW_SPEC Dot11acDevCap : ReSet support of VHT TXOP PS */
821 #define RESET_11ACVHTTXOPPS(Dot11acDevCap) ((Dot11acDevCap) &= ~MBIT(21))
822 /** HW_SPEC Dot11acDevCap : ReSet support of MU RX beamformee */
823 #define RESET_11ACMURXBEAMFORMEE(Dot11acDevCap) ((Dot11acDevCap) &= ~MBIT(20))
824 /** HW_SPEC Dot11acDevCap : ReSet support of MU TX beamformee */
825 #define RESET_11ACMUTXBEAMFORMEE(Dot11acDevCap) ((Dot11acDevCap) &= ~MBIT(19))
826 /** HW_SPEC Dot11acDevCap : ReSet Number of Sounding Dimensions */
827 #define RESET_11ACSOUNDINGNUM(Dot11acDevCap) ((Dot11acDevCap) &= ~((0x07) << 16))
828 /** HW_SPEC Dot11acDevCap : ReSet Compressed Steering Number
829  * of Beamformer Antenna */
830 #define RESET_11ACBFANTNUM(Dot11acDevCap) ((Dot11acDevCap) &= ~((0x07) << 13))
831 /** HW_SPEC Dot11acDevCap : ReSet support of SU Beamformee */
832 #define RESET_11ACSUBEAMFORMEE(Dot11acDevCap) ((Dot11acDevCap) &= ~MBIT(12))
833 /** HW_SPEC Dot11acDevCap : ReSet support of SU Beamformer */
834 #define RESET_11ACSUBEAMFORMER(Dot11acDevCap) ((Dot11acDevCap) &= ~MBIT(11))
835 /** HW_SPEC Dot11acDevCap : ReSet support of Rx STBC */
836 #define RESET_11ACRXSTBC(Dot11acDevCap) ((Dot11acDevCap) &= ~((0x07) << 8))
837 /** HW_SPEC Dot11acDevCap : ReSet support of Tx STBC */
838 #define RESET_11ACTXSTBC(Dot11acDevCap) ((Dot11acDevCap) &= ~MBIT(7))
839 /** HW_SPEC Dot11acDevCap : ReSet support of Short GI support for 160MHz BW */
840 #define RESET_11ACSGI160(Dot11acDevCap) ((Dot11acDevCap) &= ~MBIT(6))
841 /** HW_SPEC Dot11acDevCap : ReSet support of Short GI support for 80MHz BW */
842 #define RESET_11ACSGI80(Dot11acDevCap) ((Dot11acDevCap) &= ~MBIT(5))
843 /** HW_SPEC Dot11acDevCap : ReSet support of LDPC coding */
844 #define RESET_11ACLDPC(Dot11acDevCap) ((Dot11acDevCap) &= ~MBIT(4))
845 /** HW_SPEC Dot11acDevCap : ReSet support of
846  * Channel BW 20/40/80/160/80+80 MHz */
847 #define RESET_11ACBW8080(Dot11acDevCap) ((Dot11acDevCap) &= ~MBIT(3))
848 /** HW_SPEC Dot11acDevCap : ReSet support of
849  * Channel BW 20/40/80/160 MHz */
850 #define RESET_11ACBW160(Dot11acDevCap) ((Dot11acDevCap) &= ~MBIT(2))
851 /** HW_SPEC Dot11acDevCap : ReSet Max MPDU length */
852 #define RESET_11ACMAXMPDULEN(Dot11acDevCap) ((Dot11acDevCap) &= ~(0x03))
853 
854 /** Default 11ac capability mask for 2.4GHz */
855 #define DEFAULT_11AC_CAP_MASK_BG (HWSPEC_11ACSGI80_SUPP | HWSPEC_11ACRXSTBC_SUPP)
856 /** Default 11ac capability mask for 5GHz */
857 #define DEFAULT_11AC_CAP_MASK_A (HWSPEC_11ACSGI80_SUPP | HWSPEC_11ACRXSTBC_SUPP)
858 /** GET VHT CapInfo : MAX MPDU Length */
859 #define GET_VHTCAP_MAXMPDULEN(VHTCapInfo) ((VHTCapInfo)&0x3U)
860 /** GET VHT CapInfo:  Supported Channel Width SET (2 bits)*/
861 #define GET_VHTCAP_CHWDSET(VHTCapInfo) (((VHTCapInfo) >> 2) & 0x3U)
862 /** GET VHT CapInfo:  Rx STBC (3 bits) */
863 #define GET_VHTCAP_RXSTBC(VHTCapInfo) (((VHTCapInfo) >> 8) & 0x7U)
864 /** GET VHT CapInfo:  Compressed Steering Num of BFer Ant Supported (3 bits) */
865 #define GET_VHTCAP_SNBFERANT(VHTCapInfo) (((VHTCapInfo) >> 13) & 0x7U)
866 /** GET VHT CapInfo:  Num of Sounding Dimensions (3 bits) */
867 #define GET_VHTCAP_NUMSNDDM(VHTCapInfo) (((VHTCapInfo) >> 16) & 0x7U)
868 /** GET VHT CapInfo:  Max AMPDU Length Exponent (3 bits) */
869 #define GET_VHTCAP_MAXAMPDULENEXP(VHTCapInfo) (((VHTCapInfo) >> 23) & 0x7U)
870 /** GET VHT CapInfo:  VHT Link Adaptation Capable (2 bits) */
871 #define GET_VHTCAP_LINKADPCAP(VHTCapInfo) (((VHTCapInfo) >> 26) & 0x3U)
872 /**SET OPERATING MODE:Channel Width:80M*/
873 #define SET_OPER_MODE_80M(oper_mode) ((oper_mode) = (t_u8)((oper_mode) & ~MBIT(0)) | MBIT(1))
874 /**SET OPERATING MODE:Channel Width:40M*/
875 #define SET_OPER_MODE_40M(oper_mode) ((oper_mode) = (t_u8)((oper_mode) & ~MBIT(1)) | MBIT(0))
876 /**SET OPERATING MODE:Channel Width:20M*/
877 #define SET_OPER_MODE_20M(oper_mode) ((oper_mode) &= (t_u8)(~(0x03U)))
878 #define IS_OPER_MODE_20M(oper_mode)  (((oper_mode) & (MBIT(0) | MBIT(1))) == 0U)
879 /**SET OPERATING MODE:Rx NSS:2*/
880 #define SET_OPER_MODE_2NSS(oper_mode) ((oper_mode) = ((oper_mode) & ~(MBIT(5) | MBIT(6))) | MBIT(4))
881 /**SET OPERATING MODE:Rx NSS:1*/
882 #define SET_OPER_MODE_1NSS(oper_mode) ((oper_mode) &= ~(MBIT(4) | MBIT(5) | MBIT(6)))
883 
884 #define NO_NSS_SUPPORT                0x03U
885 #define GET_VHTMCS(MCSMapSet)         ((MCSMapSet)&0xFFFFU)
886 #define GET_VHTNSSMCS(MCSMapSet, nss) (((MCSMapSet) >> (2U * ((nss)-1U))) & 0x3U)
887 #define RET_VHTNSSMCS(MCSMapSet, nss) (((MCSMapSet) >> (2U * ((nss)-1))) & 0x3)
888 #define SET_VHTNSSMCS(MCSMapSet, nss, value) \
889     ((MCSMapSet) |= (t_u32)(((t_u32)(value)&0x0003U) << (t_u32)(2U * ((t_u32)(nss)-1U))))
890 
891 /** DevMCSSupported : Tx MCS supported */
892 #define GET_DEVTXMCSMAP(DevMCSMap)             ((DevMCSMap) >> 16)
893 #define GET_DEVNSSTXMCS(DevMCSMap, nss)        (((DevMCSMap) >> (2U * ((nss)-1U) + 16U)) & 0x3U)
894 #define SET_DEVNSSTXMCS(DevMCSMap, nss, value) ((DevMCSMap) |= ((value)&0x3) << (2 * ((nss)-1) + 16))
895 #define RESET_DEVTXMCSMAP(DevMCSMap)           ((DevMCSMap) &= 0xFFFFU)
896 /** DevMCSSupported : Rx MCS supported */
897 #define GET_DEVRXMCSMAP(DevMCSMap)             ((DevMCSMap)&0xFFFFU)
898 #define GET_DEVNSSRXMCS(DevMCSMap, nss)        (((DevMCSMap) >> (2U * ((nss)-1U))) & 0x3U)
899 #define SET_DEVNSSRXMCS(DevMCSMap, nss, value) ((DevMCSMap) |= ((value)&0x3) << (2 * ((nss)-1)))
900 #define RESET_DEVRXMCSMAP(DevMCSMap)           ((DevMCSMap) &= 0xFFFF0000U)
901 
902 #if CONFIG_11K_OFFLOAD
903 /** ExtCap : Set Support BSS_Transition */
904 #define SET_EXTCAP_BSS_TRANSITION(ext_cap) (ext_cap.BSS_Transition = 1)
905 /** ExtCap : Reset support BSS_Transition */
906 #define RESET_EXTCAP_BSS_TRANSITION(ext_cap) (ext_cap.BSS_Transition = 0)
907 #endif
908 
909 #if CONFIG_MULTI_BSSID_SUPPORT
910 /** ExtCap : Set support Multi BSSID */
911 #define SET_EXTCAP_MULTI_BSSID(ext_cap) (ext_cap.MultipleBSSID = 1)
912 #endif
913 
914 #if CONFIG_11AX
915 /** FW cap info bit 7 11AX */
916 #define FW_CAPINFO_EXT_802_11AX MBIT(7)
917 
918 /* HE MAC Capabilities Information field BIT 1 for TWT Req */
919 #define HE_MAC_CAP_TWT_REQ_SUPPORT MBIT(1)
920 /* HE MAC Capabilities Information field BIT 2 for TWT Resp*/
921 #define HE_MAC_CAP_TWT_RESP_SUPPORT MBIT(2)
922 /** Check if 11AX is supported by firmware */
923 #define IS_FW_SUPPORT_11AX(_adapter) (_adapter->fw_cap_ext & FW_CAPINFO_EXT_802_11AX)
924 /** ExtCap : Support for TWT RESP */
925 #define ISSUPP_EXTCAP_EXT_TWT_RESP(ext_cap) (ext_cap.TWTResp)
926 /** ExtCap : Set support Ext TWT_REQ */
927 #define SET_EXTCAP_TWT_REQ(ext_cap) (ext_cap.TWTReq = 1)
928 /** ExtCap : ReSet support Ext TWT REQ */
929 #define RESET_EXTCAP_TWT_REQ(ext_cap) (ext_cap.TWTReq = 0)
930 
931 typedef MLAN_PACK_START struct _MrvlIEtypes_He_cap_t
932 {
933     /** Header type */
934     t_u16 type;
935     /** Header length */
936     t_u16 len;
937     /** Element id extension */
938     t_u8 ext_id;
939     /** he mac capability info */
940     t_u8 he_mac_cap[6];
941     /** he phy capability info */
942     t_u8 he_phy_cap[11];
943     /** he txrx mcs support , size would be 4 or 8 or 12 */
944     t_u8 he_txrx_mcs_support[4];
945     /** 160Mhz tx rx mcs support*/
946     t_u8 he160_txrx_mcs_support[4];
947     /** 80+80 Mhz tx rx mcs suport */
948     t_u8 he8080_txrx_mcs_support[4];
949     /** PPE Thresholds (optional) */
950     t_u8 val[20];
951 } MLAN_PACK_END MrvlIEtypes_He_cap_t, *pMrvlIEtypes_he_cap_t;
952 
953 typedef MLAN_PACK_START struct _MrvlIEtypes_Extension_t
954 {
955     /** Header type */
956     t_u16 type;
957     /** Header length */
958     t_u16 len;
959     /** Element id extension */
960     t_u8 ext_id;
961     /** payload */
962     t_u8 data[];
963 } MLAN_PACK_END MrvlIEtypes_Extension_t, *pMrvlIEtypes_Extension_t;
964 #endif
965 
966 /** FW cap info TLV */
967 typedef MLAN_PACK_START struct _MrvlIEtypes_fw_cap_info_t
968 {
969     /** Header type */
970     t_u16 type;
971     /** Header length */
972     t_u16 len;
973     /** Fw cap info bitmap */
974     t_u32 fw_cap_info;
975     /** Extended fw cap info bitmap */
976     t_u32 fw_cap_ext;
977 } MLAN_PACK_END MrvlIEtypes_fw_cap_info_t, *pMrvlIEtypes_fw_cap_info_t;
978 
979 /** TLV type : Rate scope */
980 #define TLV_TYPE_RATE_DROP_PATTERN (PROPRIETARY_TLV_BASE_ID + 0x51U) // 0x0151
981 /** TLV type : Rate drop pattern */
982 #define TLV_TYPE_RATE_DROP_CONTROL (PROPRIETARY_TLV_BASE_ID + 0x52) // 0x0152
983 /** TLV type : Rate scope */
984 #define TLV_TYPE_RATE_SCOPE (PROPRIETARY_TLV_BASE_ID + 0x53U) // 0x0153
985 
986 /** TLV type : Power group */
987 #define TLV_TYPE_POWER_GROUP (PROPRIETARY_TLV_BASE_ID + 0x54U) // 0x0154
988 
989 /** Modulation class for DSSS Rates */
990 #define MOD_CLASS_HR_DSSS 0x03
991 /** Modulation class for OFDM Rates */
992 #define MOD_CLASS_OFDM 0x07U
993 /** Modulation class for HT Rates */
994 #define MOD_CLASS_HT 0x08
995 /** HT bandwidth 20 MHz */
996 #define HT_BW_20 0
997 /** HT bandwidth 40 MHz */
998 #define HT_BW_40 1U
999 /** TLV type : TX RATE CFG, rename from TLV_TYPE_GI_LTF_SIZE to include CMD and
1000  * HE ER SU settings to this tlv */
1001 #define TLV_TYPE_TX_RATE_CFG (PROPRIETARY_TLV_BASE_ID + 319) /* 0x023f */
1002 
1003 #if (CONFIG_EXT_SCAN_SUPPORT)
1004 /** TLV type : Scan Response */
1005 #define TLV_TYPE_BSS_SCAN_RSP (PROPRIETARY_TLV_BASE_ID + 0x56) // 0x0156
1006 /** TLV type : Scan Response Stats */
1007 #define TLV_TYPE_BSS_SCAN_INFO (PROPRIETARY_TLV_BASE_ID + 0x57) // 0x0157
1008 #endif
1009 
1010 /** TLV type : 11h Basic Rpt */
1011 #define TLV_TYPE_CHANRPT_11H_BASIC (PROPRIETARY_TLV_BASE_ID + 0x5b) // 0x015b
1012 
1013 /** TLV type : Action frame */
1014 #define TLV_TYPE_IEEE_ACTION_FRAME (PROPRIETARY_TLV_BASE_ID + 0x8c) // 0x018c
1015 
1016 #if (CONFIG_11MC) || (CONFIG_11AZ)
1017 #define FTM_SESSION_CFG_LCI_TLV_ID            (PROPRIETARY_TLV_BASE_ID + 270) /* 0x20e */
1018 #define FTM_SESSION_CFG_LOCATION_CIVIC_TLV_ID (PROPRIETARY_TLV_BASE_ID + 271) /* 0x20f */
1019 #define FTM_SESSION_CFG_INITATOR_TLV_ID       (PROPRIETARY_TLV_BASE_ID + 273) /* 0x211 */
1020 #define FTM_NTB_RANGING_CFG_TLV_ID            (PROPRIETARY_TLV_BASE_ID + 343) /* 0x257 */
1021 #define FTM_TB_RANGING_CFG_TLV_ID             (PROPRIETARY_TLV_BASE_ID + 344) /* 0x258 */
1022 
1023 #if CONFIG_WLS_CSI_PROC
1024 #define WLS_CSI_DATA_LEN_DW 181
1025 #define WLS_CSI_DATA_LEN    (WLS_CSI_DATA_LEN_DW * sizeof(uint32_t))
1026 #endif
1027 
1028 #endif
1029 
1030 #if CONFIG_SCAN_CHANNEL_GAP
1031 /** TLV type : SCAN channel gap */
1032 #define TLV_TYPE_SCAN_CHANNEL_GAP              \
1033     (PROPRIETARY_TLV_BASE_ID + 0xc5) /* 0x01c5 \
1034                                       */
1035 /** TLV type : Channel statistics */
1036 #define TLV_TYPE_CHANNEL_STATS (PROPRIETARY_TLV_BASE_ID + 0xc6) /* 0x01c6 */
1037 #endif
1038 
1039 /** Firmware Host Command ID Constants */
1040 /** Host Command ID : Get hardware specifications */
1041 #define HostCmd_CMD_GET_HW_SPEC 0x0003
1042 /** Host Command ID : 802.11 scan */
1043 #define HostCmd_CMD_802_11_SCAN 0x0006
1044 /** Host Command ID : 802.11 get log */
1045 #define HostCmd_CMD_802_11_GET_LOG 0x000b
1046 /** Host Command ID : MAC multicast address */
1047 #define HostCmd_CMD_MAC_MULTICAST_ADR 0x0010
1048 /** Host Command ID : 802.11 EEPROM access */
1049 #define HostCmd_CMD_802_11_EEPROM_ACCESS 0x0059
1050 /** Host Command ID : 802.11 associate */
1051 #define HostCmd_CMD_802_11_ASSOCIATE 0x0012
1052 
1053 /** Host Command ID : 802.11 SNMP MIB */
1054 #define HostCmd_CMD_802_11_SNMP_MIB 0x0016
1055 /** Host Command ID : MAC register access */
1056 #define HostCmd_CMD_MAC_REG_ACCESS 0x0019
1057 /** Host Command ID : BBP register access */
1058 #define HostCmd_CMD_BBP_REG_ACCESS 0x001a
1059 /** Host Command ID : RF register access */
1060 #define HostCmd_CMD_RF_REG_ACCESS 0x001b
1061 
1062 /** Host Command ID : 802.11 radio control */
1063 #define HostCmd_CMD_802_11_RADIO_CONTROL 0x001c
1064 /** Host Command ID : 802.11 RF channel */
1065 #define HostCmd_CMD_802_11_RF_CHANNEL 0x001d
1066 /** Host Command ID : 802.11 RF Tx power */
1067 #define HostCmd_CMD_802_11_RF_TX_POWER 0x001e
1068 
1069 /** Host Command ID : 802.11 RF antenna */
1070 #define HostCmd_CMD_802_11_RF_ANTENNA 0x0020
1071 
1072 /** Host Command ID : 802.11 deauthenticate */
1073 #define HostCmd_CMD_802_11_DEAUTHENTICATE 0x0024
1074 /** Host Command ID : MAC control */
1075 #define HostCmd_CMD_MAC_CONTROL 0x0028
1076 /** Host Command ID : 802.11 Ad-Hoc start */
1077 #define HostCmd_CMD_802_11_AD_HOC_START 0x002b
1078 /** Host Command ID : 802.11 Ad-Hoc join */
1079 #define HostCmd_CMD_802_11_AD_HOC_JOIN 0x002c
1080 
1081 /** Host Command ID : 802.11 key material */
1082 #define HostCmd_CMD_802_11_KEY_MATERIAL 0x005e
1083 
1084 /** Host Command ID : 802.11 Ad-Hoc stop */
1085 #define HostCmd_CMD_802_11_AD_HOC_STOP 0x0040
1086 
1087 /** Host Command ID : 802.22 MAC address */
1088 #define HostCmd_CMD_802_11_MAC_ADDRESS 0x004D
1089 
1090 /** Host Command ID : WMM Traffic Stream Status */
1091 #define HostCmd_CMD_WMM_TS_STATUS 0x005d
1092 
1093 /** Host Command ID : 802.11 D domain information */
1094 #define HostCmd_CMD_802_11D_DOMAIN_INFO 0x005b
1095 
1096 /** Host Command ID : 802.11 TPC information */
1097 #define HostCmd_CMD_802_11_TPC_INFO 0x005f
1098 /** Host Command ID : 802.11 TPC adapt req */
1099 #define HostCmd_CMD_802_11_TPC_ADAPT_REQ 0x0060
1100 /** Host Command ID : 802.11 channel SW ann */
1101 #define HostCmd_CMD_802_11_CHAN_SW_ANN 0x0061
1102 
1103 /** Host Command ID : Measurement request */
1104 #define HostCmd_CMD_MEASUREMENT_REQUEST 0x0062
1105 /** Host Command ID : Measurement report */
1106 #define HostCmd_CMD_MEASUREMENT_REPORT 0x0063
1107 
1108 /** Host Command ID : 802.11 sleep parameters */
1109 #define HostCmd_CMD_802_11_SLEEP_PARAMS 0x0066
1110 
1111 /** Host Command ID : 802.11 sleep period */
1112 #define HostCmd_CMD_802_11_SLEEP_PERIOD 0x0068
1113 
1114 /** Host Command ID: 802.11 BG scan config */
1115 #define HostCmd_CMD_802_11_BG_SCAN_CONFIG 0x006b
1116 /** Host Command ID : 802.11 BG scan query */
1117 #define HostCmd_CMD_802_11_BG_SCAN_QUERY 0x006cU
1118 
1119 /** Host Command ID : WMM ADDTS req */
1120 #define HostCmd_CMD_WMM_ADDTS_REQ 0x006E
1121 /** Host Command ID : WMM DELTS req */
1122 #define HostCmd_CMD_WMM_DELTS_REQ 0x006F
1123 /** Host Command ID : WMM queue configuration */
1124 #define HostCmd_CMD_WMM_QUEUE_CONFIG 0x0070
1125 /** Host Command ID : 802.11 get status */
1126 #define HostCmd_CMD_WMM_GET_STATUS 0x0071
1127 
1128 /** Host Command ID : 802.11 subscribe event */
1129 #define HostCmd_CMD_802_11_SUBSCRIBE_EVENT 0x0075
1130 
1131 #if CONFIG_WIFI_EU_CRYPTO
1132 /** Host Command ID : EU Test */
1133 #define HostCmd_CMD_EU_CRYPTO 0x0078
1134 #endif
1135 
1136 /** Host Command ID : 802.11 NET MONITOR*/
1137 #define HostCmd_CMD_802_11_NET_MONITOR 0x0102
1138 
1139 /** Host Command ID : 802.11 Tx rate query */
1140 #define HostCmd_CMD_802_11_TX_RATE_QUERY 0x007f
1141 
1142 /** Host Command ID :Get timestamp value */
1143 #define HostCmd_CMD_GET_TSF 0x0080
1144 
1145 /** Host Command ID : WMM queue stats */
1146 #define HostCmd_CMD_WMM_QUEUE_STATS 0x0081
1147 
1148 /** Host Command ID : KEEP ALIVE command */
1149 #define HostCmd_CMD_AUTO_TX 0x0082
1150 
1151 /** Host Command ID : 802.11 IBSS coalescing status */
1152 #define HostCmd_CMD_802_11_IBSS_COALESCING_STATUS 0x0083
1153 
1154 /** Host Command ID : Memory access */
1155 #define HostCmd_CMD_MEM_ACCESS 0x0086
1156 
1157 /** Host Command ID : SDIO GPIO interrupt configuration */
1158 #define HostCmd_CMD_SDIO_GPIO_INT_CONFIG 0x0088
1159 
1160 #if CONFIG_RF_TEST_MODE
1161 /** Host Command ID : Mfg command */
1162 #define HostCmd_CMD_MFG_COMMAND 0x0089
1163 #endif
1164 
1165 /** Host Command ID : Inactivity timeout ext */
1166 #define HostCmd_CMD_INACTIVITY_TIMEOUT_EXT 0x008a
1167 
1168 /** Host Command ID : DBGS configuration */
1169 #define HostCmd_CMD_DBGS_CFG 0x008b
1170 /** Host Command ID : Get memory */
1171 #define HostCmd_CMD_GET_MEM 0x008c
1172 
1173 #if (CONFIG_WIFI_TX_PER_TRACK) || (CONFIG_TX_RX_HISTOGRAM)
1174 /** Host Command ID: TX_RX_PKT_STATS */
1175 #define HostCmd_CMD_TX_RX_PKT_STATS 0x008d
1176 #endif
1177 
1178 /** Host Command ID : Cal data dnld */
1179 #define HostCmd_CMD_CFG_DATA 0x008f
1180 
1181 /** Host Command ID : SDIO pull control */
1182 #define HostCmd_CMD_SDIO_PULL_CTRL 0x0093
1183 
1184 /** Host Command ID : ECL system clock configuration */
1185 #define HostCmd_CMD_ECL_SYSTEM_CLOCK_CONFIG 0x0094
1186 
1187 /** Host Command ID : Extended version */
1188 #define HostCmd_CMD_VERSION_EXT 0x0097
1189 
1190 /** Host Command ID : MEF configuration */
1191 #define HostCmd_CMD_MEF_CFG 0x009a
1192 
1193 /** Host Command ID : 802.11 RSSI INFO*/
1194 #define HostCmd_CMD_RSSI_INFO 0x00a4
1195 
1196 /** Host Command ID : Function initialization */
1197 #define HostCmd_CMD_FUNC_INIT 0x00a9U
1198 /** Host Command ID : Function shutdown */
1199 #define HostCmd_CMD_FUNC_SHUTDOWN 0x00aa
1200 
1201 /** Host Command ID : Channel report request */
1202 #define HostCmd_CMD_CHAN_REPORT_REQUEST 0x00dd
1203 
1204 /** Host Command ID: SUPPLICANT_PMK */
1205 #define HostCmd_CMD_SUPPLICANT_PMK 0x00c4
1206 /** Host Command ID: SUPPLICANT_PROFILE */
1207 #define HostCmd_CMD_SUPPLICANT_PROFILE 0x00c5
1208 
1209 /** Host Command ID : Add Block Ack Request */
1210 #define HostCmd_CMD_11N_ADDBA_REQ 0x00ce
1211 /** Host Command ID : Delete a Block Ack Request */
1212 #define HostCmd_CMD_11N_CFG 0x00cd
1213 /** Host Command ID : Add Block Ack Response */
1214 #define HostCmd_CMD_11N_ADDBA_RSP 0x00cf
1215 /** Host Command ID : Delete a Block Ack Request */
1216 #define HostCmd_CMD_11N_DELBA 0x00d0
1217 /** Host Command ID: Configure Tx Buf size */
1218 #define HostCmd_CMD_RECONFIGURE_TX_BUFF 0x00d9
1219 /** Host Command ID: AMSDU Aggr Ctrl */
1220 #define HostCmd_CMD_AMSDU_AGGR_CTRL 0x00df
1221 
1222 /** Host Command ID : 802.11 TX power configuration */
1223 #define HostCmd_CMD_TXPWR_CFG 0x00d1
1224 
1225 /** Host Command ID : Soft Reset */
1226 #define HostCmd_CMD_SOFT_RESET 0x00d5
1227 
1228 /** Host Command ID : 802.11 b/g/n rate configration */
1229 #define HostCmd_CMD_TX_RATE_CFG 0x00d6
1230 
1231 /** Host Command ID : Coexistence mode config */
1232 #define HostCmd_CMD_ROBUST_COEX 0x00e0
1233 
1234 /** Host Command ID : Enhanced PS mode */
1235 #define HostCmd_CMD_802_11_PS_MODE_ENH 0x00e4
1236 
1237 /** Host command action : Host sleep configuration */
1238 #define HostCmd_CMD_802_11_HS_CFG_ENH 0x00e5
1239 
1240 /** Host Command ID : CAU register access */
1241 #define HostCmd_CMD_CAU_REG_ACCESS 0x00ed
1242 
1243 /** Host Command ID : mgmt IE list */
1244 #define HostCmd_CMD_MGMT_IE_LIST 0x00f2
1245 
1246 #if CONFIG_EXT_SCAN_SUPPORT
1247 /** Host Command ID : Extended scan support */
1248 #define HostCmd_CMD_802_11_SCAN_EXT 0x0107
1249 #endif
1250 
1251 /** Host Command ID : Forward mgmt frame */
1252 #define HostCmd_CMD_RX_MGMT_IND 0x010c
1253 
1254 /** Host Command ID : Set BSS_MODE */
1255 #define HostCmd_CMD_SET_BSS_MODE 0x00f7
1256 
1257 /** TLV OF CHAN_TRPC_CONFIG */
1258 #define TLV_TYPE_CHAN_TRPC_CONFIG (PROPRIETARY_TLV_BASE_ID + 137U)
1259 
1260 /** Host Command ID: Channel TRPC Config */
1261 #define HostCmd_CMD_CHANNEL_TRPC_CONFIG 0x00fb
1262 
1263 #ifdef UAP_SUPPORT
1264 /**  Host Command id: SYS_INFO */
1265 #define HOST_CMD_APCMD_SYS_INFO 0x00ae
1266 /** Host Command id: sys_reset */
1267 #define HOST_CMD_APCMD_SYS_RESET 0x00af
1268 /** Host Command id: SYS_CONFIGURE  */
1269 #define HOST_CMD_APCMD_SYS_CONFIGURE 0x00b0
1270 /** Host Command id: BSS_START */
1271 #define HOST_CMD_APCMD_BSS_START 0x00b1
1272 /** Host Command id: BSS_STOP  */
1273 #define HOST_CMD_APCMD_BSS_STOP 0x00b2
1274 /** Host Command id: sta_list */
1275 #define HOST_CMD_APCMD_STA_LIST 0x00b3
1276 /** Host Command id: STA_DEAUTH */
1277 #define HOST_CMD_APCMD_STA_DEAUTH 0x00b5
1278 
1279 #ifdef HOST_AUTHENTICATOR
1280 /** Host Command id: REPORT_MIC */
1281 #define HOST_CMD_APCMD_REPORT_MIC 0x00ee
1282 #endif
1283 #endif /* UAP_SUPPORT */
1284 
1285 /** Host Command ID: Tx data pause */
1286 #define HostCmd_CMD_CFG_TX_DATA_PAUSE 0x0103
1287 
1288 #if CONFIG_GTK_REKEY_OFFLOAD
1289 /** Host Command ID: GTK REKEY OFFLOAD CFG */
1290 #define HostCmd_CMD_CONFIG_GTK_REKEY_OFFLOAD_CFG 0x010f
1291 #endif
1292 
1293 #ifdef WIFI_DIRECT_SUPPORT
1294 /** Host Command ID: WIFI_DIRECT_MODE_CONFIG */
1295 #define HOST_CMD_WIFI_DIRECT_MODE_CONFIG 0x00eb
1296 #endif
1297 /** Host Command ID: Remain On Channel */
1298 #define HostCmd_CMD_802_11_REMAIN_ON_CHANNEL 0x010d
1299 
1300 /** Host Command ID: 11AC config */
1301 #define HostCmd_CMD_11AC_CFG 0x0112
1302 
1303 /** Host Command ID : OTP user data */
1304 #define HostCmd_CMD_OTP_READ_USER_DATA 0x0114
1305 
1306 #if CONFIG_11K_OFFLOAD
1307 /** Host Command ID : 802.11 K Feature Control */
1308 #define HostCmd_CMD_OFFLOAD_FEATURE_CONTROL 0x00fd
1309 #endif
1310 
1311 #ifdef SD8801
1312 #define HostCmd_CMD_ED_MAC_MODE 0x0124
1313 #else
1314 #define HostCmd_CMD_ED_MAC_MODE 0x0130
1315 #endif
1316 
1317 #ifdef WLAN_LOW_POWER_ENABLE
1318 #define HostCmd_CMD_LOW_POWER_MODE 0x0128
1319 #endif /* WLAN_LOW_POWER_ENABLE */
1320 
1321 #define HOST_CMD_SMART_MODE_CFG 0x012d
1322 
1323 #define HostCmd_CMD_AUTO_RECONNECT 0x0115
1324 
1325 /** Host Command ID : PMF_PARAMS */
1326 #define HostCmd_CMD_PMF_PARAMS 0x0131
1327 
1328 /** Host Command ID: ACS scan */
1329 #define HostCMD_APCMD_ACS_SCAN 0x0224
1330 
1331 /** Host Command ID : Bridge Mode */
1332 #define HostCmd_CMD_BRIDGE_MODE 0x022e
1333 
1334 /** Host Command ID: CW Mode */
1335 #define HostCmd_CMD_CW_MODE_CTRL 0x0239
1336 
1337 #if CONFIG_WMM
1338 /** Host Command ID: WMM Param Config */
1339 #define HostCmd_CMD_WMM_PARAM_CONFIG 0x023a
1340 #endif
1341 
1342 #if CONFIG_FW_VDLL
1343 #define HostCmd_CMD_VDLL 0x0240
1344 #endif
1345 
1346 #define HostCmd_CMD_BOOT_SLEEP 0x0258
1347 
1348 #ifdef SD8801
1349 #define HostCmd_MMH_ACS_CFG 0x025a
1350 #endif
1351 
1352 /** Host Command ID : GET TBTT Offset stats */
1353 #define HostCmd_CMD_TBTT_OFFSET 0x0268
1354 
1355 #if (CONFIG_IPS)
1356 /** Host Command ID : IPS Config */
1357 #define HostCmd_CMD_IPS_CONFIG 0x0279
1358 #endif
1359 
1360 #if CONFIG_RX_ABORT_CFG
1361 #define HostCmd_CMD_RX_ABORT_CFG 0x0261
1362 #endif
1363 
1364 #if CONFIG_RX_ABORT_CFG_EXT
1365 #define HostCmd_CMD_RX_ABORT_CFG_EXT 0x0262
1366 #endif
1367 
1368 #if CONFIG_CCK_DESENSE_CFG
1369 #define HostCmd_CMD_CCK_DESENSE_CFG 0x0265
1370 #endif
1371 
1372 /** Host Command ID: Tx Frame */
1373 #define HostCmd_CMD_802_11_TX_FRAME 0x0283
1374 
1375 #if 0
1376 /** Enhanced PS modes */
1377 typedef enum _ENH_PS_MODES
1378 {
1379     GET_PS = 0,
1380     SLEEP_CONFIRM = 5,
1381     DIS_AUTO_PS = 0xfe,
1382     EN_AUTO_PS = 0xff,
1383 } ENH_PS_MODES;
1384 #endif
1385 
1386 /** Command RET code, MSB is set to 1 */
1387 #define HostCmd_RET_BIT 0x8000
1388 
1389 /** General purpose action : Get */
1390 #define HostCmd_ACT_GEN_GET 0x0000U
1391 /** General purpose action : Set */
1392 #define HostCmd_ACT_GEN_SET 0x0001U
1393 /** Special purpose action : Set */
1394 #define HostCmd_ACT_SPC_SET 0x8001
1395 
1396 #if CONFIG_AUTO_NULL_TX
1397 /** Special purpose action : Set */
1398 #define HostCmd_ACT_SPC_AUTO_SET 0x8002
1399 /** Special purpose action : Set */
1400 #define HostCmd_ACT_SPC_AUTO_NOSET 0x8003
1401 #endif
1402 /** General purpose action : Get_Current */
1403 #define HostCmd_ACT_GEN_GET_CURRENT 0x0003
1404 /** General purpose action : Remove */
1405 #define HostCmd_ACT_GEN_REMOVE 0x0004
1406 /** General purpose action : Reset */
1407 #define HostCmd_ACT_GEN_RESET 0x0005
1408 
1409 #define HostCmd_ACT_GEN_START 0x0002
1410 #define HostCmd_ACT_GEN_STOP  0x0003
1411 
1412 /** Host command action : Set Rx */
1413 #define HostCmd_ACT_SET_RX 0x0001
1414 /** Host command action : Set Tx */
1415 #define HostCmd_ACT_SET_TX 0x0002
1416 /** Host command action : Set both Rx and Tx */
1417 #define HostCmd_ACT_SET_BOTH 0x0003
1418 /** Host command action : Get Rx */
1419 #define HostCmd_ACT_GET_RX 0x0004
1420 /** Host command action : Get Tx */
1421 #define HostCmd_ACT_GET_TX 0x0008
1422 /** Host command action : Get both Rx and Tx */
1423 #define HostCmd_ACT_GET_BOTH 0x000cU
1424 
1425 #if (CONFIG_WIFI_TX_PER_TRACK) || (CONFIG_TX_RX_HISTOGRAM)
1426 /** Host command action: Get Tx statics */
1427 #define HostCmd_ACT_GET_TX_STATICS 0x0001
1428 /** Host command action: Get Rx statics */
1429 #define HostCmd_ACT_GET_RX_STATICS 0x0002
1430 /** Host command action: Get both Tx and Rx statics */
1431 #define HostCmd_ACT_GET_BOTH_TX_AND_RX 0x0003
1432 /** Host command action: Set Tx PER tracking */
1433 #define HostCmd_ACT_SET_TX_PER_TRACKING 0x0004
1434 #endif
1435 
1436 /** General Result Code*/
1437 /** General result code OK */
1438 #define HostCmd_RESULT_OK 0x0000U
1439 /** Genenral error */
1440 #define HostCmd_RESULT_ERROR 0x0001
1441 /** Command is not valid */
1442 #define HostCmd_RESULT_NOT_SUPPORT 0x0002
1443 /** Command is pending */
1444 #define HostCmd_RESULT_PENDING 0x0003
1445 /** System is busy (command ignored) */
1446 #define HostCmd_RESULT_BUSY 0x0004U
1447 /** Data buffer is not big enough */
1448 #define HostCmd_RESULT_PARTIAL_DATA 0x0005
1449 
1450 /* Define action or option for HostCmd_CMD_MAC_CONTROL */
1451 /** MAC action : Rx on */
1452 #define HostCmd_ACT_MAC_RX_ON 0x0001U
1453 /** MAC action : Tx on */
1454 #define HostCmd_ACT_MAC_TX_ON 0x0002U
1455 /** MAC action : WEP enable */
1456 #define HostCmd_ACT_MAC_WEP_ENABLE 0x0008U
1457 /** MAC action : EthernetII enable */
1458 #define HostCmd_ACT_MAC_ETHERNETII_ENABLE 0x0010U
1459 /** MAC action : Promiscous mode enable */
1460 #define HostCmd_ACT_MAC_PROMISCUOUS_ENABLE 0x0080U
1461 /** MAC action : All multicast enable */
1462 #define HostCmd_ACT_MAC_ALL_MULTICAST_ENABLE 0x0100
1463 /** MAC action : RTS/CTS enable */
1464 #define HostCmd_ACT_MAC_RTS_CTS_ENABLE 0x0200
1465 /** MAC action : Strict protection enable */
1466 #define HostCmd_ACT_MAC_STRICT_PROTECTION_ENABLE 0x0400
1467 /** MAC action : Force 11n protection disable */
1468 #define HostCmd_ACT_MAC_FORCE_11N_PROTECTION_OFF 0x0800
1469 /** MAC action : Ad-Hoc G protection on */
1470 #define HostCmd_ACT_MAC_ADHOC_G_PROTECTION_ON 0x2000
1471 #if CONFIG_11AC
1472 /** MAC action : Static-Dynamic BW enable */
1473 #define HostCmd_ACT_MAC_STATIC_DYNAMIC_BW_ENABLE MBIT(16)
1474 /** MAC action : Dynamic BW */
1475 #define HostCmd_ACT_MAC_DYNAMIC_BW MBIT(17)
1476 #endif
1477 
1478 #if (CONFIG_11MC) || (CONFIG_11AZ)
1479 /** Host Command ID : FTM session config and control */
1480 #define HostCmd_CMD_FTM_SESSION_CFG  0x024d
1481 #define HostCmd_CMD_FTM_SESSION_CTRL 0x024e
1482 #endif
1483 
1484 /* Define action or option for HostCmd_CMD_802_11_SCAN */
1485 /** Scan type : BSS */
1486 #define HostCmd_BSS_MODE_BSS 0x0001
1487 /** Scan type : IBSS */
1488 #define HostCmd_BSS_MODE_IBSS 0x0002
1489 /** Scan type : Any */
1490 #define HostCmd_BSS_MODE_ANY 0x0003
1491 
1492 #if CONFIG_TX_AMPDU_PROT_MODE
1493 #define HostCmd_CMD_TX_AMPDU_PROT_MODE 0x0263
1494 #endif
1495 
1496 #if CONFIG_CSI
1497 #define HostCmd_CMD_CSI 0x025b
1498 #define CSI_CMD_ENABLE  0x0001
1499 #define CSI_CMD_DISABLE 0x0002
1500 #endif
1501 
1502 #if CONFIG_11AX
1503 /** Host Command ID: 11AX config */
1504 #define HostCmd_CMD_11AX_CFG 0x0266
1505 
1506 /** Host Command ID: 11AX command */
1507 #define HostCmd_CMD_11AX_CMD 0x026d
1508 
1509 #if CONFIG_11AX_TWT
1510 /** Host Command ID: TWT cfg command */
1511 #define HostCmd_CMD_TWT_CFG 0x0270
1512 #endif /* CONFIG_11AX_TWT */
1513 #endif
1514 
1515 #if CONFIG_WIFI_CLOCKSYNC
1516 /** Host Command ID: GPIO TSF LATCH */
1517 #define HostCmd_GPIO_TSF_LATCH_PARAM_CONFIG 0x0278
1518 #endif /* CONFIG_WIFI_CLOCKSYNC */
1519 
1520 /** Host Command ID: HS Wakeup Reason */
1521 #define HostCmd_CMD_HS_WAKEUP_REASON 0x0116
1522 
1523 #if CONFIG_MULTI_CHAN
1524 /** Host Command ID: Multi chan config */
1525 #define HostCmd_CMD_MULTI_CHAN_CONFIG 0x011e
1526 /** Host Command ID: Multi chan policy */
1527 #define HostCmd_CMD_MULTI_CHAN_POLICY 0x0121
1528 /** TLV ID for multi chan info */
1529 #define TLV_TYPE_MULTI_CHAN_INFO (PROPRIETARY_TLV_BASE_ID + 0xb7)
1530 /** TLV ID for multi chan group info */
1531 #define TLV_TYPE_MULTI_CHAN_GROUP_INFO_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0xb8)
1532 /** TLV ID for DRCS TimeSlice */
1533 #define MRVL_DRCS_TIME_SLICE_TLV_ID (PROPRIETARY_TLV_BASE_ID + 263U)
1534 /** Host Command ID: DRCS config */
1535 #define HostCmd_CMD_DRCS_CONFIG 0x024a
1536 
1537 #endif
1538 
1539 #if CONFIG_1AS
1540 #define HostCmd_CMD_HOST_CLOCK_CFG 0x0246
1541 #endif
1542 
1543 /* Radio type definitions for the channel TLV */
1544 /** Radio type BG */
1545 #define HostCmd_SCAN_RADIO_TYPE_BG 0U
1546 /** Radio type A */
1547 #define HostCmd_SCAN_RADIO_TYPE_A 1U
1548 
1549 /** Pairwise Cipher Suite length */
1550 #define PAIRWISE_CIPHER_SUITE_LEN 4
1551 /** AKM Suite length */
1552 #define AKM_SUITE_LEN 4
1553 /** PMKID length */
1554 #define PMKID_LEN 16
1555 /** Group mgmt Cipher Suite length */
1556 #define GROUP_MGMT_CIPHER_SUITE_LEN 4
1557 /** MFPC bit in RSN capability */
1558 #define MFPC_BIT 7
1559 /** MFPR bit in RSN capability */
1560 #define MFPR_BIT 6
1561 /** PMF ORing mask */
1562 #define PMF_MASK 0x00c0
1563 
1564 /** Bit mask for TxPD flags field for Tx status report */
1565 #define MRVDRV_TxPD_FLAGS_TX_PACKET_STATUS MBIT(5)
1566 
1567 /** Define bitmap conditions for HOST_SLEEP_CFG : GPIO FF */
1568 #define HOST_SLEEP_CFG_GPIO_FF 0xff
1569 /** Define bitmap conditions for HOST_SLEEP_CFG : GAP FF */
1570 #define HOST_SLEEP_CFG_GAP_FF 0xff
1571 
1572 /** Buffer Constants */
1573 /** Number of command buffers */
1574 #define MRVDRV_NUM_OF_CMD_BUFFER 20
1575 /** Size of command buffer */
1576 #define MRVDRV_SIZE_OF_CMD_BUFFER 2048U
1577 
1578 /** Maximum number of BSS Descriptors */
1579 /* wmsdk: Count taken from kconfig */
1580 #if CONFIG_MAX_AP_ENTRIES
1581 #define MRVDRV_MAX_BSSID_LIST CONFIG_MAX_AP_ENTRIES
1582 #else
1583 #define MRVDRV_MAX_BSSID_LIST 20U
1584 #endif /* CONFIG_MAX_AP_ENTRIES */
1585 
1586 /** Host command flag in command */
1587 #define CMD_F_HOSTCMD (1 << 0)
1588 /** command cancel flag in command */
1589 #define CMD_F_CANCELED (1 << 1)
1590 
1591 /** Host Command ID bit mask (bit 11:0) */
1592 #define HostCmd_CMD_ID_MASK 0x0fffU
1593 
1594 /** Host Command Sequence number mask (bit 7:0) */
1595 #define HostCmd_SEQ_NUM_MASK 0x00ff
1596 
1597 /** Host Command BSS number mask (bit 11:8) */
1598 #define HostCmd_BSS_NUM_MASK 0x0f00
1599 
1600 /** Host Command BSS type mask (bit 15:12) */
1601 #define HostCmd_BSS_TYPE_MASK 0xf000U
1602 
1603 /** Set BSS information to Host Command */
1604 #define HostCmd_SET_SEQ_NO_BSS_INFO(seq, num, type) \
1605     (((seq)&0x00ffU) | (((num)&0x000fU) << 8U)) | (((type)&0x000fU) << 12U)
1606 
1607 /** Get Sequence Number from Host Command (bit 7:0) */
1608 #define HostCmd_GET_SEQ_NO(seq) ((seq)&HostCmd_SEQ_NUM_MASK)
1609 
1610 /** Get BSS number from Host Command (bit 11:8) */
1611 #define HostCmd_GET_BSS_NO(seq) (((seq)&HostCmd_BSS_NUM_MASK) >> 8)
1612 
1613 /** Get BSS type from Host Command (bit 15:12) */
1614 #define HostCmd_GET_BSS_TYPE(seq) (((seq)&HostCmd_BSS_TYPE_MASK) >> 12)
1615 
1616 /** Card Event definition : Dummy host wakeup signal */
1617 #define EVENT_DUMMY_HOST_WAKEUP_SIGNAL 0x00000001
1618 /** Card Event definition : Link lost */
1619 #define EVENT_LINK_LOST 0x00000003
1620 /** Card Event definition : Link sensed */
1621 #define EVENT_LINK_SENSED 0x00000004
1622 /** Card Event definition : MIB changed */
1623 #define EVENT_MIB_CHANGED 0x00000006
1624 /** Card Event definition : Init done */
1625 #define EVENT_INIT_DONE 0x00000007
1626 /** Card Event definition : Deauthenticated */
1627 #define EVENT_DEAUTHENTICATED 0x00000008
1628 /** Card Event definition : Disassociated */
1629 #define EVENT_DISASSOCIATED 0x00000009
1630 /** Card Event definition : Power save awake */
1631 #define EVENT_PS_AWAKE 0x0000000a
1632 /** Card Event definition : Power save sleep */
1633 #define EVENT_PS_SLEEP 0x0000000b
1634 #if (CONFIG_WNM_PS)
1635 /** Card Event definition : WNM power save */
1636 #define EVENT_WNM_PS 0x00000097
1637 #endif
1638 /** Card Event definition : MIC error multicast */
1639 #define EVENT_MIC_ERR_MULTICAST 0x0000000d
1640 /** Card Event definition : MIC error unicast */
1641 #define EVENT_MIC_ERR_UNICAST 0x0000000e
1642 
1643 /** Card Event definition : Ad-Hoc BCN lost */
1644 #define EVENT_ADHOC_BCN_LOST 0x00000011
1645 
1646 /** Card Event definition : Stop Tx */
1647 #define EVENT_STOP_TX 0x00000013
1648 /** Card Event definition : Start Tx */
1649 #define EVENT_START_TX 0x00000014
1650 /** Card Event definition : Channel switch */
1651 #define EVENT_CHANNEL_SWITCH 0x00000015
1652 
1653 /** Card Event definition : MEAS report ready */
1654 #define EVENT_MEAS_REPORT_RDY 0x00000016
1655 
1656 /** Card Event definition : WMM status change */
1657 #define EVENT_WMM_STATUS_CHANGE 0x00000017
1658 
1659 /** Card Event definition : BG scan report */
1660 #define EVENT_BG_SCAN_REPORT 0x00000018
1661 /** Card Event definition : BG scan stopped */
1662 #define EVENT_BG_SCAN_STOPPED 0x00000065
1663 /** Card Event definition : Beacon RSSI low */
1664 #define EVENT_RSSI_LOW 0x00000019
1665 /** Card Event definition : Beacon SNR low */
1666 #define EVENT_SNR_LOW 0x0000001a
1667 /** Card Event definition : Maximum fail */
1668 #define EVENT_MAX_FAIL 0x0000001b
1669 /** Card Event definition : Beacon RSSI high */
1670 #define EVENT_RSSI_HIGH 0x0000001c
1671 /** Card Event definition : Beacon SNR high */
1672 #define EVENT_SNR_HIGH 0x0000001d
1673 
1674 /** Card Event definition : IBSS coalsced */
1675 #define EVENT_IBSS_COALESCED 0x0000001e
1676 
1677 /** Card Event definition : Data RSSI low */
1678 #define EVENT_DATA_RSSI_LOW 0x00000024
1679 /** Card Event definition : Data SNR low */
1680 #define EVENT_DATA_SNR_LOW 0x00000025
1681 /** Card Event definition : Data RSSI high */
1682 #define EVENT_DATA_RSSI_HIGH 0x00000026
1683 /** Card Event definition : Data SNR high */
1684 #define EVENT_DATA_SNR_HIGH 0x00000027
1685 
1686 /** Card Event definition : Link Quality */
1687 #define EVENT_LINK_QUALITY 0x00000028
1688 
1689 /** Card Event definition : Port release event */
1690 #define EVENT_PORT_RELEASE 0x0000002b
1691 
1692 /** Card Event definition : Pre-Beacon Lost */
1693 #define EVENT_PRE_BEACON_LOST 0x00000031
1694 
1695 /** Card Event definition : Add BA event */
1696 #define EVENT_ADDBA 0x00000033
1697 /** Card Event definition : Del BA event */
1698 #define EVENT_DELBA 0x00000034
1699 /** Card Event definition: BA stream timeout*/
1700 #define EVENT_BA_STREAM_TIMEOUT 0x00000037
1701 
1702 /** Card Event definition : AMSDU aggr control */
1703 #define EVENT_AMSDU_AGGR_CTRL 0x00000042
1704 
1705 /** Card Event definition: WEP ICV error */
1706 #define EVENT_WEP_ICV_ERR 0x00000046
1707 
1708 /** Card Event definition : Host sleep enable */
1709 #define EVENT_HS_ACT_REQ 0x00000047
1710 
1711 /** Card Event definition : BW changed */
1712 #define EVENT_BW_CHANGE 0x00000048
1713 
1714 /* fixme: enable this macro check after it is enabled systemically */
1715 /*  #ifdef WIFI_DIRECT_SUPPORT */
1716 /** WIFIDIRECT generic event */
1717 #define EVENT_WIFIDIRECT_GENERIC_EVENT 0x00000049
1718 /** WIFIDIRECT service discovery event */
1719 #define EVENT_WIFIDIRECT_SERVICE_DISCOVERY 0x0000004a
1720 /** Remain on Channel expired event */
1721 #define EVENT_REMAIN_ON_CHANNEL_EXPIRED 0x0000005f
1722 /* #endif */
1723 
1724 /** Card Event definition: Channel switch pending announcment */
1725 #define EVENT_CHANNEL_SWITCH_ANN 0x00000050
1726 
1727 /** Event definition:  Radar Detected by card */
1728 #define EVENT_RADAR_DETECTED 0x00000053
1729 
1730 /** Event definition:  Radar Detected by card */
1731 #define EVENT_CHANNEL_REPORT_RDY 0x00000054
1732 
1733 /** Event definition:  wake-up indication to host by card */
1734 #define EVENT_MEF_HOST_WAKEUP 0x0000004f
1735 #if CONFIG_EXT_SCAN_SUPPORT
1736 /** Event definition:  Scan results through event */
1737 #define EVENT_EXT_SCAN_REPORT 0x00000058
1738 #endif
1739 
1740 /** Event definition: RXBA_SYNC */
1741 #define EVENT_RXBA_SYNC 0x00000059
1742 
1743 #ifdef SD9177
1744 #define EVENT_IMD3_CAL_START 0x000000A0
1745 #define EVENT_IMD3_CAL_END   0x000000A1
1746 #endif
1747 
1748 #if CONFIG_WIFI_FW_DEBUG
1749 /** Event definition : FW debug information */
1750 #define EVENT_FW_DEBUG_INFO 0x00000063
1751 #endif
1752 
1753 #if (CONFIG_11MC) || (CONFIG_11AZ)
1754 #define EVENT_WLS_FTM_COMPLETE 0x00000086
1755 
1756 #define WLS_SUB_EVENT_FTM_COMPLETE       0
1757 #define WLS_SUB_EVENT_RADIO_RECEIVED     1
1758 #define WLS_SUB_EVENT_RADIO_RPT_RECEIVED 2
1759 #define WLS_SUB_EVENT_ANQP_RESP_RECEIVED 3
1760 
1761 #endif
1762 
1763 #if CONFIG_11K
1764 #define EVENT_NLIST_REPORT          0x00000079
1765 #define MRVL_NEIGHBOR_REPORT_TLV_ID 0x1de
1766 #endif
1767 
1768 #if (CONFIG_FW_VDLL) || (CONFIG_FW_VDLLV2)
1769 #define EVENT_VDLL_IND 0x00000081
1770 #endif
1771 
1772 #if CONFIG_WLAN_BRIDGE
1773 /** Event definition: auto link switched network */
1774 #define EVENT_AUTO_LINK_SWITCH_NEW_NODE 0X00000125
1775 #endif
1776 
1777 #ifdef UAP_SUPPORT
1778 /** Event ID: STA deauth */
1779 #define EVENT_MICRO_AP_STA_DEAUTH 0x0000002c
1780 /** Event ID: STA assoicated */
1781 #define EVENT_MICRO_AP_STA_ASSOC 0x0000002d
1782 /** Event ID: BSS started */
1783 #define EVENT_MICRO_AP_BSS_START 0x0000002e
1784 /** Event ID: BSS idle event */
1785 #define EVENT_MICRO_AP_BSS_IDLE 0x00000043
1786 /** Event ID: BSS active event */
1787 #define EVENT_MICRO_AP_BSS_ACTIVE 0x00000044
1788 /** Event ID: uAP in connected state for non-Open Auth*/
1789 #define EVENT_MICRO_AP_RSN_CONNECT 0x00000051
1790 
1791 #endif /* UAP_SUPPORT */
1792 
1793 /** Event ID: TX data pause event */
1794 #define EVENT_TX_DATA_PAUSE 0x00000055
1795 
1796 #if CONFIG_MULTI_CHAN
1797 /** Event ID: Multi Chan Info*/
1798 #define EVENT_MULTI_CHAN_INFO 0x0000006a
1799 #endif
1800 
1801 #define EVENT_TX_STATUS_REPORT 0x00000074
1802 
1803 #if (CONFIG_CSI) || (CONFIG_11MC) || (CONFIG_11AZ)
1804 #define EVENT_CSI 0x0000008D
1805 #endif
1806 
1807 /** Event ID: EV_SMC_GENERIC */
1808 #define EVENT_EV_SMC_GENERIC 0x00000077
1809 
1810 #if CONFIG_CSI
1811 #define EVENT_CSI 0x0000008D
1812 #endif
1813 
1814 /** Card Event definition : RESET PN */
1815 #if CONFIG_RSN_REPLAY_DETECTION
1816 #define EVENT_RESET_PN_ON_REKEY 0x00000092
1817 #endif
1818 
1819 #define EVENT_BLOCKEDSTA_AUTH_REPORT 0x00000093
1820 
1821 /** Event ID: Assoc Req IE*/
1822 #define EVENT_ASSOC_REQ_IE 0x00000095
1823 
1824 #define EVENT_ACCESS_BY_HOST 0x00000098
1825 
1826 /** Event ID mask */
1827 #define EVENT_ID_MASK 0xffff
1828 
1829 /** BSS number mask */
1830 #define BSS_NUM_MASK 0xfU
1831 
1832 /** Get BSS number from event cause (bit 23:16) */
1833 #define EVENT_GET_BSS_NUM(event_cause) (((event_cause) >> 16) & BSS_NUM_MASK)
1834 
1835 /** Get BSS type from event cause (bit 31:24) */
1836 #define EVENT_GET_BSS_TYPE(event_cause) (((event_cause) >> 24) & 0x00ff)
1837 
1838 #if CONFIG_TSP
1839 #define HostCmd_CMD_TSP_CFG 0x0280
1840 #endif
1841 
1842 #ifdef OTP_CHANINFO
1843 #define HostCmd_CMD_CHAN_REGION_CFG 0x0242
1844 /* mod_grp */
1845 typedef enum _mod_grp
1846 {
1847     MOD_CCK,          // 0
1848     MOD_OFDM_PSK,     // 1
1849     MOD_OFDM_QAM16,   // 2
1850     MOD_OFDM_QAM64,   // 3
1851     MOD_HT_20_PSK,    // 4
1852     MOD_HT_20_QAM16,  // 5
1853     MOD_HT_20_QAM64,  // 6
1854     MOD_HT_40_PSK,    // 7
1855     MOD_HT_40_QAM16,  // 8
1856     MOD_HT_40_QAM64,  // 9
1857 #ifdef STREAM_2x2
1858     MOD_HT2_20_PSK,   // 10
1859     MOD_HT2_20_QAM16, // 11
1860     MOD_HT2_20_QAM64, // 12
1861     MOD_HT2_40_PSK,   // 13
1862     MOD_HT2_40_QAM16, // 14
1863     MOD_HT2_40_QAM64, // 15
1864 #endif
1865 
1866 #if CONFIG_11AC
1867     MOD_VHT_20_QAM256,  // 16
1868     MOD_VHT_40_QAM256,  // 17
1869     MOD_VHT_80_PSK,     // 18
1870     MOD_VHT_80_QAM16,   // 19
1871     MOD_VHT_80_QAM64,   // 20
1872     MOD_VHT_80_QAM256,  // 21
1873 #ifdef STREAM_2x2
1874     MOD_VHT2_20_QAM256, // 22
1875     MOD_VHT2_40_QAM256, // 23
1876     MOD_VHT2_80_PSK,    // 24
1877     MOD_VHT2_80_QAM16,  // 25
1878     MOD_VHT2_80_QAM64,  // 26
1879     MOD_VHT2_80_QAM256, // 27
1880 #endif
1881 #endif
1882 } mod_grp;
1883 
1884 typedef MLAN_PACK_START struct _power_table_attr
1885 {
1886     t_u8 rows_2g;
1887     t_u8 cols_2g;
1888     t_u8 rows_5g;
1889     t_u8 cols_5g;
1890 } MLAN_PACK_END power_table_attr_t;
1891 
1892 #define FW_CFP_TABLE_MAX_ROWS_BG 14
1893 #ifdef STREAM_2X2
1894 #define FW_CFP_TABLE_MAX_COLS_BG 17
1895 #else
1896 #define FW_CFP_TABLE_MAX_COLS_BG 11
1897 #endif
1898 
1899 #if CONFIG_5GHz_SUPPORT
1900 #define FW_CFP_TABLE_MAX_ROWS_A 42
1901 #ifdef STREAM_2X2
1902 #define FW_CFP_TABLE_MAX_COLS_A 29
1903 #else
1904 #define FW_CFP_TABLE_MAX_COLS_A 17
1905 #endif
1906 #endif /* CONFIG_5GHz_SUPPORT */
1907 #endif /* OTP_CHANINFO */
1908 
1909 /** Host Command ID : GPIO independent reset configure */
1910 #define HostCmd_CMD_INDEPENDENT_RESET_CFG 0x0243
1911 
1912 #if CONFIG_COMPRESS_TX_PWTBL
1913 /** used in hostcmd to download region power cfg setting to firmware */
1914 #define HostCmd_CMD_REGION_POWER_CFG 0x0249
1915 #endif
1916 
1917 /** Event_WEP_ICV_ERR structure */
1918 typedef MLAN_PACK_START struct _Event_WEP_ICV_ERR
1919 {
1920     /** Reason code */
1921     t_u16 reason_code;
1922     /** Source MAC address */
1923     t_u8 src_mac_addr[MLAN_MAC_ADDR_LENGTH];
1924     /** WEP decryption used key */
1925     t_u8 wep_key_index;
1926     /** WEP key length */
1927     t_u8 wep_key_length;
1928     /** WEP key */
1929     t_u8 key[MAX_WEP_KEY_SIZE];
1930 } MLAN_PACK_END Event_WEP_ICV_ERR;
1931 
1932 /** WLAN_802_11_FIXED_IEs */
1933 typedef MLAN_PACK_START struct _WLAN_802_11_FIXED_IEs
1934 {
1935     /** Timestamp */
1936     t_u8 time_stamp[8];
1937     /** Beacon interval */
1938     t_u16 beacon_interval;
1939     /** Capabilities*/
1940     t_u16 capabilities;
1941 } MLAN_PACK_END WLAN_802_11_FIXED_IEs;
1942 
1943 /** WLAN_802_11_VARIABLE_IEs */
1944 typedef MLAN_PACK_START struct _WLAN_802_11_VARIABLE_IEs
1945 {
1946     /** Element ID */
1947     IEEEtypes_ElementId_e element_id;
1948     /** Length */
1949     t_u8 length;
1950     /** IE data */
1951     t_u8 data[1];
1952 } MLAN_PACK_END WLAN_802_11_VARIABLE_IEs;
1953 
1954 /** TLV related data structures*/
1955 /** MrvlIEtypesHeader_t */
1956 typedef MLAN_PACK_START struct _MrvlIEtypesHeader
1957 {
1958     /** Header type */
1959     t_u16 type;
1960     /** Header length */
1961     t_u16 len;
1962 } MLAN_PACK_END MrvlIEtypesHeader_t;
1963 
1964 /** MrvlIEtypes_Data_t */
1965 typedef MLAN_PACK_START struct _MrvlIEtypes_Data_t
1966 {
1967     /** Header */
1968     MrvlIEtypesHeader_t header;
1969     /** Data */
1970     t_u8 data[1];
1971 } MLAN_PACK_END MrvlIEtypes_Data_t;
1972 
1973 /** MrvlIEtypes_PrevBssid_t */
1974 typedef MLAN_PACK_START struct _MrvlIEtypes_PrevBssid_t
1975 {
1976     /** Header */
1977     MrvlIEtypesHeader_t header;
1978     /** prev_bssid **/
1979     t_u8 prev_bssid[6];
1980 } MLAN_PACK_END MrvlIEtypes_PrevBssid_t;
1981 
1982 /** MrvlIETypes_ActionFrame_t */
1983 typedef MLAN_PACK_START struct
1984 {
1985     MrvlIEtypesHeader_t header; /**< Header */
1986 
1987     t_u8 smcstartAddr[MLAN_MAC_ADDR_LENGTH];
1988     t_u8 smcendAddr[MLAN_MAC_ADDR_LENGTH];
1989     t_u16 filter_type;
1990 
1991 } MLAN_PACK_END MrvlIETypes_SmcAddrRange_t;
1992 
1993 #if CONFIG_HOST_SLEEP
1994 #define MAX_MGMT_FRAME_FILTER         2
1995 #define EVENT_MANAGEMENT_FRAME_WAKEUP 0x00000088
1996 
1997 typedef MLAN_PACK_START struct _mgmt_frame_filter
1998 {
1999     /** action - bitmap
2000      ** On matching rx'd pkt and filter during NON_HOSTSLEEP mode:
2001      **   Action[1]=0  Discard
2002      **   Action[1]=1  Allow
2003      ** Note that default action on non-match is "Allow".
2004      **
2005      ** On matching rx'd pkt and filter during HOSTSLEEP mode:
2006      **   Action[1:0]=00  Discard and Not Wake host
2007      **   Action[1:0]=01  Discard and Wake host
2008      **   Action[1:0]=10  Invalid
2009      ** Note that default action on non-match is "Discard and Not Wake
2010      *host".
2011      **/
2012     t_u8 action;
2013     /** Frame type(p2p...)
2014      ** type=0: invalid
2015      ** type=1: p2p
2016      ** type=0xff: management frames(assoc req/rsp, probe req/rsp,...)
2017      ** type=others: reserved
2018      **/
2019     t_u8 type;
2020     /** Frame mask according to each type
2021      ** When type=1 for p2p, frame-mask have following define:
2022      **    Bit      Frame
2023      **     0       GO Negotiation Request
2024      **     1       GO Negotiation Response
2025      **     2       GO Negotiation Confirmation
2026      **     3       P2P Invitation Request
2027      **     4       P2P Invitation Response
2028      **     5       Device Discoverability Request
2029      **     6       Device Discoverability Response
2030      **     7       Provision Discovery Request
2031      **     8       Provision Discovery Response
2032      **     9       Notice of Absence
2033      **     10      P2P Presence Request
2034      **     11      P2P Presence Response
2035      **     12      GO Discoverability Request
2036      **     13-31   Reserved
2037      **
2038      ** When type=others, frame-mask is reserved.
2039      **/
2040     t_u32 frame_mask;
2041 } MLAN_PACK_END mgmt_frame_filter;
2042 
2043 /** MrvlIEtypes_MgmtFrameFilter_t */
2044 typedef MLAN_PACK_START struct _MrvlIEtypes_MgmtFrameFilter_t
2045 {
2046     /** Header */
2047     MrvlIEtypesHeader_t header;
2048     /** management frame filters */
2049     mgmt_frame_filter filter[MAX_MGMT_FRAME_FILTER];
2050 } MLAN_PACK_END MrvlIEtypes_MgmtFrameFilter_t;
2051 #endif
2052 
2053 /** MrvlIETypes_SMCFrameFilter_t */
2054 
2055 #define MAX_FILTER_LENGTH 10
2056 typedef MLAN_PACK_START struct
2057 {
2058     MrvlIEtypesHeader_t header; /**< Header */
2059     uint8_t frame_filter[MAX_FILTER_LENGTH];
2060 
2061 } MLAN_PACK_END MrvlIETypes_SmcFrameFilter_t;
2062 
2063 /** Bit mask for TxPD status field for null packet */
2064 #define MRVDRV_TxPD_POWER_MGMT_NULL_PACKET 0x01
2065 /** Bit mask for TxPD status field for last packet */
2066 #define MRVDRV_TxPD_POWER_MGMT_LAST_PACKET 0x08
2067 
2068 /** Packet type: 802.11 */
2069 #define PKT_TYPE_802DOT11   0x05
2070 #define PKT_TYPE_MGMT_FRAME 0xE5U
2071 /** Packet type: AMSDU */
2072 #define PKT_TYPE_AMSDU 0xE6U
2073 /** Packet type: BAR */
2074 #define PKT_TYPE_BAR 0xE7U
2075 /** Packet type: debugging */
2076 #define PKT_TYPE_DEBUG 0xEF
2077 
2078 /** TxPD descriptor */
2079 typedef MLAN_PACK_START struct _TxPD
2080 {
2081     /** BSS type */
2082     t_u8 bss_type;
2083     /** BSS number */
2084     t_u8 bss_num;
2085     /** Tx packet length */
2086     t_u16 tx_pkt_length;
2087     /** Tx packet offset */
2088     t_u16 tx_pkt_offset;
2089     /** Tx packet type */
2090     t_u16 tx_pkt_type;
2091     /** Tx Control */
2092     t_u32 tx_control;
2093     /** Pkt Priority */
2094     t_u8 priority;
2095     /** Transmit Pkt Flags*/
2096     t_u8 flags;
2097     /** Amount of time the packet has been queued in the driver (units = 2ms)*/
2098     t_u8 pkt_delay_2ms;
2099     /** Reserved */
2100     t_u8 reserved1[2];
2101     /** Trasnit Pkt Token Id*/
2102     t_u8 tx_token_id;
2103     /** reserverd */
2104     t_u8 reserved[4];
2105 } MLAN_PACK_END TxPD, *PTxPD;
2106 
2107 /** RxPD Descriptor */
2108 typedef MLAN_PACK_START struct _RxPD
2109 {
2110     /** BSS type */
2111     t_u8 bss_type;
2112     /** BSS number */
2113     t_u8 bss_num;
2114     /** Rx Packet Length */
2115     t_u16 rx_pkt_length;
2116     /** Rx Pkt offset */
2117     t_u16 rx_pkt_offset;
2118     /** Rx packet type */
2119     t_u16 rx_pkt_type;
2120     /** Sequence number */
2121     t_u16 seq_num;
2122     /** Packet Priority */
2123     t_u8 priority;
2124     /** Rx Packet Rate */
2125     t_u8 rx_rate;
2126     /** SNR */
2127     t_s8 snr;
2128     /** Noise Floor */
2129     t_s8 nf;
2130 #ifdef SD8801
2131     /** Ht Info [Bit 0] RxRate format: LG=0, HT=1
2132      * [Bit 1]  HT Bandwidth: BW20 = 0, BW40 = 1
2133      * [Bit 2]  HT Guard Interval: LGI = 0, SGI = 1 */
2134     t_u8 ht_info;
2135 #else
2136     /** [Bit 1] [Bit 0] RxRate format: legacy rate = 00 HT = 01 VHT = 10
2137      *  [Bit 3] [Bit 2] HT/VHT Bandwidth BW20 = 00 BW40 = 01 BW80 = 10 BW160 = 11
2138      *  [Bit 4] HT/VHT Guard interval LGI = 0 SGI = 1
2139      *  [Bit 5] STBC support Enabled = 1
2140      *  [Bit 6] LDPC support Enabled = 1
2141      *  [Bit 7] Reserved */
2142     t_u8 rate_info;
2143 #endif
2144     /** Reserved */
2145     t_u8 reserved[3];
2146     /** TDLS flags, bit 0: 0=InfraLink, 1=DirectLink */
2147     t_u8 flags;
2148     /**For SD8887 antenna info: 0 = 2.4G antenna a; 1 = 2.4G antenna b; 3 = 5G antenna; 0xff = invalid value */
2149     t_u8 antenna;
2150     /** Reserved */
2151     t_u64 reserved1;
2152 #if CONFIG_TXPD_RXPD_V3
2153     t_u32 rx_info;
2154 #else  /* CONFIG_TXPD_RXPD_V3 */
2155     /** band config */
2156     t_u8 band_config;
2157     /** chan number */
2158     t_u8 chan_num;
2159 #endif /* CONFIG_TXPD_RXPD_V3 */
2160 #if CONFIG_RSN_REPLAY_DETECTION
2161     /** PN number high 32 bits*/
2162     t_u32 hi_rx_count32;
2163     /** PN number low 16 bits*/
2164     t_u16 lo_rx_count16;
2165     /** Reserved */
2166     t_u8 reserved3[2];
2167 #else
2168     /** Reserved */
2169     t_u8 reserved3[8];
2170 #endif
2171 } MLAN_PACK_END RxPD, *PRxPD;
2172 
2173 #ifdef UAP_SUPPORT
2174 /** TxPD descriptor */
2175 typedef MLAN_PACK_START struct _UapTxPD
2176 {
2177     /** BSS type */
2178     t_u8 bss_type;
2179     /** BSS number */
2180     t_u8 bss_num;
2181     /** Tx packet length */
2182     t_u16 tx_pkt_length;
2183     /** Tx packet offset */
2184     t_u16 tx_pkt_offset;
2185     /** Tx packet type */
2186     t_u16 tx_pkt_type;
2187     /** Tx Control */
2188     t_u32 tx_control;
2189     /** Pkt Priority */
2190     t_u8 priority;
2191     /** Transmit Pkt Flags*/
2192     t_u8 flags;
2193     /** Amount of time the packet has been queued in the driver (units = 2ms)*/
2194     t_u8 pkt_delay_2ms;
2195     /** Reserved */
2196     t_u8 reserved1;
2197     /** Reserved */
2198     t_u32 reserved;
2199 } MLAN_PACK_END UapTxPD, *PUapTxPD;
2200 
2201 /** RxPD Descriptor */
2202 typedef MLAN_PACK_START struct _UapRxPD
2203 {
2204     /** BSS Type */
2205     t_u8 bss_type;
2206     /** BSS number*/
2207     t_u8 bss_num;
2208     /** Rx packet length */
2209     t_u16 rx_pkt_length;
2210     /** Rx packet offset */
2211     t_u16 rx_pkt_offset;
2212     /** Rx packet type */
2213     t_u16 rx_pkt_type;
2214     /** Sequence number */
2215     t_u16 seq_num;
2216     /** Packet Priority */
2217     t_u8 priority;
2218     /** reserved */
2219     t_u8 reserved1;
2220 } MLAN_PACK_END UapRxPD, *PUapRxPD;
2221 
2222 /** Fixed size of station association event */
2223 #define ASSOC_EVENT_FIX_SIZE 12U
2224 
2225 /** IEEEtypes_FrameCtl_t*/
2226 #ifdef BIG_ENDIAN_SUPPORT
2227 typedef MLAN_PACK_START struct _IEEEtypes_FrameCtl_t
2228 {
2229     /** Order */
2230     t_u8 order : 1;
2231     /** Wep */
2232     t_u8 wep : 1;
2233     /** More Data */
2234     t_u8 more_data : 1;
2235     /** Power Mgmt */
2236     t_u8 pwr_mgmt : 1;
2237     /** Retry */
2238     t_u8 retry : 1;
2239     /** More Frag */
2240     t_u8 more_frag : 1;
2241     /** From DS */
2242     t_u8 from_ds : 1;
2243     /** To DS */
2244     t_u8 to_ds : 1;
2245     /** Sub Type */
2246     t_u8 sub_type : 4;
2247     /** Type */
2248     t_u8 type : 2;
2249     /** Protocol Version */
2250     t_u8 protocol_version : 2;
2251 } MLAN_PACK_END IEEEtypes_FrameCtl_t;
2252 #else
2253 typedef MLAN_PACK_START struct _IEEEtypes_FrameCtl_t
2254 {
2255     /** Protocol Version */
2256     t_u8 protocol_version : 2;
2257     /** Type */
2258     t_u8 type : 2;
2259     /** Sub Type */
2260     t_u8 sub_type : 4;
2261     /** To DS */
2262     t_u8 to_ds : 1;
2263     /** From DS */
2264     t_u8 from_ds : 1;
2265     /** More Frag */
2266     t_u8 more_frag : 1;
2267     /** Retry */
2268     t_u8 retry : 1;
2269     /** Power Mgmt */
2270     t_u8 pwr_mgmt : 1;
2271     /** More Data */
2272     t_u8 more_data : 1;
2273     /** Wep */
2274     t_u8 wep : 1;
2275     /** Order */
2276     t_u8 order : 1;
2277 } MLAN_PACK_END IEEEtypes_FrameCtl_t;
2278 #endif
2279 
2280 #ifdef UAP_HOST_MLME
2281 #ifdef UAP_SUPPORT
2282 /** action add station */
2283 #define HostCmd_ACT_ADD_STA 0x1
2284 /** remove station */
2285 #define HostCmd_ACT_REMOVE_STA 0x0
2286 /** HostCmd_DS_ADD_STATION */
2287 typedef MLAN_PACK_START struct _HostCmd_DS_ADD_STATION
2288 {
2289     /** 1 -add, 0 --delete */
2290     t_u16 action;
2291     /** aid */
2292     t_u16 aid;
2293     /** peer_mac */
2294     t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH];
2295     /** Listen Interval */
2296     int listen_interval;
2297     /** Capability Info */
2298     t_u16 cap_info;
2299     /** tlv start */
2300     t_u8 tlv[];
2301 } MLAN_PACK_END HostCmd_DS_ADD_STATION;
2302 
2303 /** Host Command ID : Add New Station */
2304 #define HostCmd_CMD_ADD_NEW_STATION 0x025f
2305 /** TLV id: station flag */
2306 #define TLV_TYPE_UAP_STA_FLAGS (PROPRIETARY_TLV_BASE_ID + 313)
2307 /**MrvlIEtypes_Sta_Flag_t */
2308 typedef MLAN_PACK_START struct _MrvlIEtypes_StaFlag_t
2309 {
2310     /** Header */
2311     MrvlIEtypesHeader_t header;
2312     /** station flag     */
2313     t_u32 sta_flags;
2314 } MLAN_PACK_END MrvlIEtypes_StaFlag_t;
2315 #endif
2316 #endif
2317 
2318 /** MrvlIETypes_MgmtFrameSet_t */
2319 typedef MLAN_PACK_START struct _MrvlIETypes_MgmtFrameSet_t
2320 {
2321     /** Type */
2322     t_u16 type;
2323     /** Length */
2324     t_u16 len;
2325     /** Frame Control */
2326     IEEEtypes_FrameCtl_t frame_control;
2327     /* t_u8 frame_contents[0]; */
2328 } MLAN_PACK_END MrvlIETypes_MgmtFrameSet_t;
2329 
2330 /** IEEEtypes_AssocRqst_t */
2331 typedef MLAN_PACK_START struct _IEEEtypes_AssocRqst_t
2332 {
2333     /** Capability Info */
2334     t_u16 cap_info;
2335     /** Listen Interval */
2336     t_u16 listen_interval;
2337     /* t_u8 ie_buffer[0]; */
2338 } MLAN_PACK_END IEEEtypes_AssocRqst_t;
2339 
2340 /** IEEEtypes_ReAssocRqst_t */
2341 typedef MLAN_PACK_START struct _IEEEtypes_ReAssocRqst_t
2342 {
2343     /** Capability Info */
2344     t_u16 cap_info;
2345     /** Listen Interval */
2346     t_u16 listen_interval;
2347     /** Current AP Address */
2348     t_u8 current_ap_addr[MLAN_MAC_ADDR_LENGTH];
2349     /* t_u8 ie_buffer[0]; */
2350 } MLAN_PACK_END IEEEtypes_ReAssocRqst_t;
2351 #endif /* UAP_SUPPORT */
2352 
2353 /** wlan_802_11_header */
2354 typedef MLAN_PACK_START struct _wlan_802_11_header
2355 {
2356     /** Frame Control */
2357     t_u16 frm_ctl;
2358     /** Duration ID */
2359     t_u16 duration_id;
2360     /** Address1 */
2361     mlan_802_11_mac_addr addr1;
2362     /** Address2 */
2363     mlan_802_11_mac_addr addr2;
2364     /** Address3 */
2365     mlan_802_11_mac_addr addr3;
2366     /** Sequence Control */
2367     t_u16 seq_ctl;
2368     /** Address4 */
2369     mlan_802_11_mac_addr addr4;
2370 } MLAN_PACK_END wlan_802_11_header;
2371 
2372 #if CONFIG_11K_OFFLOAD
2373 /** host_OffloadFeatureStdControl_t */
2374 typedef MLAN_PACK_START struct
2375 {
2376     t_u8 client_radar_detect : 1;
2377     t_u8 wmm_ac_dynamic_ps : 1;
2378     t_u8 wmm_ac_tpsec_modify : 1;
2379     t_u8 dot11h_rm : 1;
2380     t_u8 dot11k_rm : 1;
2381     t_u8 dot11k_nbor_support : 1;
2382     t_u8 dot11k_lm : 1;
2383     t_u8 dot11k_tsm : 1;
2384 
2385     t_u8 pmf_capable : 1;
2386     t_u8 pmf_required : 1;
2387     t_u8 vowifi_probe_tpc_rpt : 1;
2388     t_u8 dot11v_bss_trans : 1;
2389     t_u8 rbc : 1;
2390     t_u8 reserved : 3;
2391 } MLAN_PACK_END host_OffloadFeatureStdControl_t;
2392 
2393 /** END HostCmd_OFFLOAD_FEATURE_CTRL */
2394 typedef MLAN_PACK_START struct _HostCmd_OFFLOAD_FEATURE_CTRL
2395 {
2396     t_u8 featureSelect;
2397     union
2398     {
2399         host_OffloadFeatureStdControl_t std;
2400         t_u8 empty;
2401     } control;
2402 } MLAN_PACK_END HostCmd_OFFLOAD_FEATURE_CTRL;
2403 #endif /* CONFIG_11K_OFFLOAD*/
2404 
2405 /** wlan_802_11_header packet from FW with length */
2406 typedef MLAN_PACK_START struct _wlan_mgmt_pkt
2407 {
2408     /** Packet Length */
2409     t_u16 frm_len;
2410     /** wlan_802_11_header */
2411     wlan_802_11_header wlan_header;
2412 } MLAN_PACK_END wlan_mgmt_pkt;
2413 
2414 #ifdef STA_SUPPORT
2415 /** (Beaconsize(256)-5(IEId,len,contrystr(3))/3(FirstChan,NoOfChan,MaxPwr) */
2416 #define MAX_NO_OF_CHAN 40U
2417 
2418 /** Channel-power table entries */
2419 typedef MLAN_PACK_START struct _chan_power_11d
2420 {
2421     /** 11D channel */
2422     t_u8 chan;
2423     /** Band for channel */
2424     t_u8 band;
2425     /** 11D channel power */
2426     t_u8 pwr;
2427     /** AP seen on channel */
2428     t_u8 ap_seen;
2429 } MLAN_PACK_END chan_power_11d_t;
2430 
2431 /** Region channel info */
2432 typedef MLAN_PACK_START struct _parsed_region_chan_11d
2433 {
2434     /** 11D channel power per channel */
2435     chan_power_11d_t chan_pwr[MAX_NO_OF_CHAN];
2436     /** 11D number of channels */
2437     t_u8 no_of_chan;
2438 } MLAN_PACK_END parsed_region_chan_11d_t;
2439 #endif /* STA_SUPPORT */
2440 
2441 /** ChanScanMode_t */
2442 typedef MLAN_PACK_START struct _ChanScanMode_t
2443 {
2444 #ifdef BIG_ENDIAN_SUPPORT
2445     /** Reserved */
2446     t_u8 reserved_7 : 1;
2447     /** First passive scan then active scan */
2448     t_u8 passive_to_active_scan : 1;
2449     /** First channel in scan */
2450     t_u8 first_chan : 1;
2451     /** Enable hidden ssid report */
2452     t_u8 hidden_ssid_report : 1;
2453     /** Enable probe response timeout */
2454     t_u8 rsp_timeout_en : 1;
2455     /** Multidomain scan mode */
2456     t_u8 multidomain_scan : 1;
2457     /** Disble channel filtering flag */
2458     t_u8 disable_chan_filt : 1;
2459     /** Channel scan mode passive flag */
2460     t_u8 passive_scan : 1;
2461 #else
2462     /** Channel scan mode passive flag */
2463     t_u8 passive_scan : 1;
2464     /** Disble channel filtering flag */
2465     t_u8 disable_chan_filt : 1;
2466     /** Multidomain scan mode */
2467     t_u8 multidomain_scan : 1;
2468     /** Enable probe response timeout */
2469     t_u8 rsp_timeout_en : 1;
2470     /** Enable hidden ssid report */
2471     t_u8 hidden_ssid_report : 1;
2472     /** First channel in scan */
2473     t_u8 first_chan : 1;
2474     /** First passive scan then active scan */
2475     t_u8 passive_to_active_scan : 1;
2476     /** Reserved */
2477     t_u8 reserved_7 : 1;
2478 #endif
2479 } MLAN_PACK_END ChanScanMode_t;
2480 
2481 /** secondary channel is below */
2482 #define SECOND_CHANNEL_BELOW 0x30
2483 /** secondary channel is above */
2484 #define SECOND_CHANNEL_ABOVE 0x10
2485 /** channel offset */
2486 enum
2487 {
2488     SEC_CHAN_NONE  = 0,
2489     SEC_CHAN_ABOVE = 1,
2490     SEC_CHAN_BELOW = 3
2491 };
2492 /** channel bandwidth */
2493 enum
2494 {
2495     CHAN_BW_20MHZ = 0,
2496     CHAN_BW_10MHZ,
2497     CHAN_BW_40MHZ,
2498     CHAN_BW_80MHZ,
2499 };
2500 /** ChanScanParamSet_t */
2501 typedef MLAN_PACK_START struct _ChanScanParamSet_t
2502 {
2503     /** Channel scan parameter : Radio type */
2504     t_u8 radio_type;
2505     /** Channel scan parameter : Channel number */
2506     t_u8 chan_number;
2507     /** Channel scan parameter : Channel scan mode */
2508     ChanScanMode_t chan_scan_mode;
2509     /** Channel scan parameter : Minimum scan time */
2510     t_u16 min_scan_time;
2511     /** Channel scan parameter : Maximum scan time */
2512     t_u16 max_scan_time;
2513 } MLAN_PACK_END ChanScanParamSet_t;
2514 
2515 /** MrvlIEtypes_ChanListParamSet_t */
2516 typedef MLAN_PACK_START struct _MrvlIEtypes_ChanListParamSet_t
2517 {
2518     /** Header */
2519     MrvlIEtypesHeader_t header;
2520     /** Channel scan parameters */
2521     ChanScanParamSet_t chan_scan_param[1];
2522 } MLAN_PACK_END MrvlIEtypes_ChanListParamSet_t;
2523 
2524 /** ChanBandParamSet_t */
2525 typedef struct _ChanBandParamSet_t
2526 {
2527     /** Channel scan parameter : Radio type */
2528     t_u8 radio_type;
2529     /** Channel number */
2530     t_u8 chan_number;
2531 } ChanBandParamSet_t;
2532 
2533 /** MrvlIEtypes_ChanBandListParamSet_t */
2534 typedef MLAN_PACK_START struct _MrvlIEtypes_ChanBandListParamSet_t
2535 {
2536     /** Header */
2537     MrvlIEtypesHeader_t header;
2538     /** Channel Band parameters */
2539     ChanBandParamSet_t chan_band_param[1];
2540 } MLAN_PACK_END MrvlIEtypes_ChanBandListParamSet_t;
2541 
2542 #if CONFIG_SCAN_WITH_RSSIFILTER
2543 typedef MLAN_PACK_START struct _MrvlIEtypes_RssiThresholdParamSet_t
2544 {
2545     /** Header */
2546     MrvlIEtypesHeader_t header;
2547     /** Enable or disable the TLV */
2548     t_u8 enable;
2549     /** Threshold of RSSI */
2550     t_s16 rssi_threshold;
2551     /** Reserved */
2552     t_u8 reserved;
2553 } MLAN_PACK_END MrvlIEtypes_RssiThresholdParamSet_t;
2554 #endif
2555 
2556 /** MrvlIEtypes_RatesParamSet_t */
2557 typedef MLAN_PACK_START struct _MrvlIEtypes_RatesParamSet_t
2558 {
2559     /** Header */
2560     MrvlIEtypesHeader_t header;
2561     /** Rates */
2562     t_u8 rates[MAX_DATA_RATES];
2563 } MLAN_PACK_END MrvlIEtypes_RatesParamSet_t;
2564 
2565 #if CONFIG_EXT_SCAN_SUPPORT
2566 /** _MrvlIEtypes_Bssid_List_t */
2567 typedef MLAN_PACK_START struct _MrvlIEtypes_Bssid_List_t
2568 {
2569     /** Header */
2570     MrvlIEtypesHeader_t header;
2571     /** BSSID */
2572     t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
2573 } MLAN_PACK_END MrvlIEtypes_Bssid_List_t;
2574 #endif
2575 
2576 /** MrvlIEtypes_SsIdParamSet_t */
2577 typedef MLAN_PACK_START struct _MrvlIEtypes_SsIdParamSet_t
2578 {
2579     /** Header */
2580     MrvlIEtypesHeader_t header;
2581     /** SSID */
2582     t_u8 ssid[1];
2583 } MLAN_PACK_END MrvlIEtypes_SsIdParamSet_t;
2584 
2585 #if CONFIG_HOST_MLME
2586 /**MrvlIEtypes_AssocType_t */
2587 typedef MLAN_PACK_START struct _MrvlIEtypes_HostMlme_t
2588 {
2589     /** Header */
2590     MrvlIEtypesHeader_t header;
2591     /** Authentication type */
2592     t_u8 host_mlme;
2593 } MLAN_PACK_END MrvlIEtypes_HostMlme_t;
2594 #endif
2595 
2596 /** MrvlIEtypes_NumProbes_t */
2597 typedef MLAN_PACK_START struct _MrvlIEtypes_NumProbes_t
2598 {
2599     /** Header */
2600     MrvlIEtypesHeader_t header;
2601     /** Number of probes */
2602     t_u16 num_probes;
2603 } MLAN_PACK_END MrvlIEtypes_NumProbes_t;
2604 
2605 /** MrvlIEtypes_WildCardSsIdParamSet_t */
2606 typedef MLAN_PACK_START struct _MrvlIEtypes_WildCardSsIdParamSet_t
2607 {
2608     /** Header */
2609     MrvlIEtypesHeader_t header;
2610     /** Maximum SSID length */
2611     t_u8 max_ssid_length;
2612     /** SSID */
2613     t_u8 ssid[1];
2614 } MLAN_PACK_END MrvlIEtypes_WildCardSsIdParamSet_t;
2615 
2616 /**TSF data size */
2617 #define TSF_DATA_SIZE 8U
2618 /** Table of TSF values returned in the scan result */
2619 typedef MLAN_PACK_START struct _MrvlIEtypes_TsfTimestamp_t
2620 {
2621     /** Header */
2622     MrvlIEtypesHeader_t header;
2623     /** the length of each TSF data is 8 bytes, could be multiple TSF here */
2624     t_u8 tsf_data[1];
2625 } MLAN_PACK_END MrvlIEtypes_TsfTimestamp_t;
2626 
2627 /** CfParamSet_t */
2628 typedef MLAN_PACK_START struct _CfParamSet_t
2629 {
2630     /** CF parameter : Count */
2631     t_u8 cfp_cnt;
2632     /** CF parameter : Period */
2633     t_u8 cfp_period;
2634     /** CF parameter : Duration */
2635     t_u16 cfp_max_duration;
2636     /** CF parameter : Duration remaining */
2637     t_u16 cfp_duration_remaining;
2638 } MLAN_PACK_END CfParamSet_t;
2639 
2640 /** IbssParamSet_t */
2641 typedef MLAN_PACK_START struct _IbssParamSet_t
2642 {
2643     /** ATIM window value */
2644     t_u16 atim_window;
2645 } MLAN_PACK_END IbssParamSet_t;
2646 
2647 /** MrvlIEtypes_SsParamSet_t */
2648 typedef MLAN_PACK_START struct _MrvlIEtypes_SsParamSet_t
2649 {
2650     /** Header */
2651     MrvlIEtypesHeader_t header;
2652     /** CF/IBSS parameters sets */
2653     union
2654     {
2655         /** CF parameter set */
2656         CfParamSet_t cf_param_set[1];
2657         /** IBSS parameter set */
2658         IbssParamSet_t ibss_param_set[1];
2659     } cf_ibss;
2660 } MLAN_PACK_END MrvlIEtypes_SsParamSet_t;
2661 
2662 /** FhParamSet_t */
2663 typedef MLAN_PACK_START struct _FhParamSet_t
2664 {
2665     /** FH parameter : Dwell time */
2666     t_u16 dwell_time;
2667     /** FH parameter : Hop set */
2668     t_u8 hop_set;
2669     /** FH parameter : Hop pattern */
2670     t_u8 hop_pattern;
2671     /** FH parameter : Hop index */
2672     t_u8 hop_index;
2673 } MLAN_PACK_END FhParamSet_t;
2674 
2675 /** DsParamSet_t */
2676 typedef MLAN_PACK_START struct _DsParamSet_t
2677 {
2678     /** Current channel number */
2679     t_u8 current_chan;
2680 } MLAN_PACK_END DsParamSet_t;
2681 
2682 /** MrvlIEtypes_PhyParamSet_t */
2683 typedef MLAN_PACK_START struct _MrvlIEtypes_PhyParamSet_t
2684 {
2685     /** Header */
2686     MrvlIEtypesHeader_t header;
2687     /** FH/DS parameters */
2688     union
2689     {
2690         /** FH parameter set */
2691         FhParamSet_t fh_param_set[1];
2692         /** DS parameter set */
2693         DsParamSet_t ds_param_set[1];
2694     } fh_ds;
2695 } MLAN_PACK_END MrvlIEtypes_PhyParamSet_t;
2696 
2697 /* Auth type to be used in the Authentication portion of an Assoc seq */
2698 /** MrvlIEtypes_AuthType_t */
2699 typedef MLAN_PACK_START struct _MrvlIEtypes_AuthType_t
2700 {
2701     /** Header */
2702     MrvlIEtypesHeader_t header;
2703     /** Authentication type */
2704     t_u16 auth_type;
2705 } MLAN_PACK_END MrvlIEtypes_AuthType_t;
2706 
2707 #if CONFIG_SCAN_CHANNEL_GAP
2708 /** MrvlIEtypes_ScanChanGap_t */
2709 typedef MLAN_PACK_START struct _MrvlIEtypes_ScanChanGap_t
2710 {
2711     /** Header */
2712     MrvlIEtypesHeader_t header;
2713     /** Time gap in units to TUs to be used between
2714      * two consecutive channels scan */
2715     t_u16 gap;
2716 } MLAN_PACK_END MrvlIEtypes_ScanChanGap_t;
2717 
2718 /** channel statictics */
2719 typedef MLAN_PACK_START struct _chan_statistics_t
2720 {
2721     /** channle number */
2722     t_u8 chan_num;
2723     /** band info */
2724     Band_Config_t bandcfg;
2725     /** flags */
2726     t_u8 flags;
2727     /** noise */
2728     t_s8 noise;
2729     /** total network */
2730     t_u16 total_networks;
2731     /** scan duration */
2732     t_u16 cca_scan_duration;
2733     /** busy duration */
2734     t_u16 cca_busy_duration;
2735 } MLAN_PACK_END chan_statistics_t;
2736 
2737 /** channel statictics tlv */
2738 typedef MLAN_PACK_START struct _MrvlIEtypes_ChannelStats_t
2739 {
2740     /** Header */
2741     MrvlIEtypesHeader_t header;
2742     /** channel statictics */
2743     chan_statistics_t chanStat[];
2744 } MLAN_PACK_END MrvlIEtypes_ChannelStats_t;
2745 #endif
2746 
2747 /** MrvlIETypes_ActionFrame_t */
2748 typedef MLAN_PACK_START struct
2749 {
2750     MrvlIEtypesHeader_t header; /**< Header */
2751 
2752     t_u8 srcAddr[MLAN_MAC_ADDR_LENGTH];
2753     t_u8 dstAddr[MLAN_MAC_ADDR_LENGTH];
2754 
2755     IEEEtypes_ActionFrame_t actionFrame;
2756 
2757 } MLAN_PACK_END MrvlIETypes_ActionFrame_t;
2758 
2759 /** MrvlIEtypes_RxBaSync_t */
2760 typedef MLAN_PACK_START struct _MrvlIEtypes_RxBaSync_t
2761 {
2762     /** Header */
2763     MrvlIEtypesHeader_t header;
2764     /** mac address */
2765     t_u8 mac[MLAN_MAC_ADDR_LENGTH];
2766     /** tid */
2767     t_u8 tid;
2768     /** reserved field */
2769     t_u8 reserved;
2770     /** start seq num */
2771     t_u16 seq_num;
2772     /** bitmap len */
2773     t_u16 bitmap_len;
2774     /** bitmap */
2775     t_u8 bitmap[1];
2776 } MLAN_PACK_END MrvlIEtypes_RxBaSync_t;
2777 
2778 /** MrvlIEtypes_RsnParamSet_t */
2779 typedef MLAN_PACK_START struct _MrvlIEtypes_RsnParamSet_t
2780 {
2781     /** Header */
2782     MrvlIEtypesHeader_t header;
2783     /** RSN IE */
2784     t_u8 rsn_ie[1];
2785 } MLAN_PACK_END MrvlIEtypes_RsnParamSet_t;
2786 
2787 #if defined(WPA) || defined(WAPI_AP) || defined(HOST_AUTHENTICATOR)
2788 #ifdef KEY_PARAM_SET_V2
2789 /** Key Info flag for multicast key */
2790 #define KEY_INFO_MCAST_KEY 0x01U
2791 /** Key Info flag for unicast key */
2792 #define KEY_INFO_UCAST_KEY 0x02U
2793 /** Key Info flag for enable key */
2794 #define KEY_INFO_ENABLE_KEY 0x04
2795 /** Key Info flag for default key */
2796 #define KEY_INFO_DEFAULT_KEY 0x08U
2797 /** Key Info flag for TX key */
2798 #define KEY_INFO_TX_KEY 0x10U
2799 /** Key Info flag for RX key */
2800 #define KEY_INFO_RX_KEY       0x20U
2801 #define KEY_INFO_CMAC_AES_KEY 0x400
2802 /** PN size for WPA/WPA2 */
2803 #define WPA_PN_SIZE 8
2804 /** PN size for PMF IGTK */
2805 #define IGTK_PN_SIZE 8
2806 /** WAPI KEY size */
2807 #define WAPI_KEY_SIZE 32
2808 /** key params fix size */
2809 #define KEY_PARAMS_FIXED_LEN 10U
2810 /** key index mask */
2811 #define KEY_INDEX_MASK 0xfU
2812 
2813 /** wep_param */
2814 typedef MLAN_PACK_START struct _wep_param_t
2815 {
2816     /** key_len */
2817     t_u16 key_len;
2818     /** wep key */
2819     t_u8 key[MAX_WEP_KEY_SIZE];
2820 } MLAN_PACK_END wep_param_t;
2821 
2822 /** tkip_param */
2823 typedef MLAN_PACK_START struct _tkip_param
2824 {
2825     /** Rx packet num */
2826     t_u8 pn[WPA_PN_SIZE];
2827     /** key_len */
2828     t_u16 key_len;
2829     /** tkip key */
2830     t_u8 key[WPA_TKIP_KEY_LEN];
2831 } MLAN_PACK_END tkip_param;
2832 
2833 /** aes_param */
2834 typedef MLAN_PACK_START struct _aes_param
2835 {
2836     /** Rx packet num */
2837     t_u8 pn[WPA_PN_SIZE];
2838     /** key_len */
2839     t_u16 key_len;
2840     /** aes key */
2841     t_u8 key[WPA_AES_KEY_LEN];
2842 } MLAN_PACK_END aes_param;
2843 
2844 /** wapi_param */
2845 typedef MLAN_PACK_START struct _wapi_param
2846 {
2847     /** Rx packet num */
2848     t_u8 pn[PN_SIZE];
2849     /** key_len */
2850     t_u16 key_len;
2851     /** wapi key */
2852     t_u8 key[WAPI_KEY_SIZE];
2853 } MLAN_PACK_END wapi_param;
2854 
2855 /** cmac_aes_param */
2856 typedef MLAN_PACK_START struct _cmac_aes_param
2857 {
2858     /** IGTK pn */
2859     t_u8 ipn[IGTK_PN_SIZE];
2860     /** key_len */
2861     t_u16 key_len;
2862     /** aes key */
2863     t_u8 key[CMAC_AES_KEY_LEN];
2864 } MLAN_PACK_END cmac_aes_param;
2865 
2866 /** gmac_aes_256_param */
2867 typedef MLAN_PACK_START struct _gmac_aes_256_param
2868 {
2869     /** IGTK pn */
2870     t_u8 ipn[IGTK_PN_SIZE];
2871     /** key_len */
2872     t_u16 key_len;
2873     /** aes key */
2874     t_u8 key[WPA_IGTK_256_KEY_LEN];
2875 } MLAN_PACK_END gmac_aes_256_param;
2876 
2877 /** gmac_param */
2878 typedef MLAN_PACK_START struct _gcmp_param
2879 {
2880     /** GCMP pn */
2881     t_u8 pn[WPA_PN_SIZE];
2882     /** key_len */
2883     t_u16 key_len; /** aes key */
2884     t_u8 key[WPA_GCMP_KEY_LEN];
2885 } MLAN_PACK_END gcmp_param;
2886 
2887 /** ccmp256_param */
2888 typedef MLAN_PACK_START struct _ccmp256_param
2889 {
2890     /** CCMP pn */
2891     t_u8 pn[WPA_PN_SIZE];
2892     /** key_len */
2893     t_u16 key_len;
2894     /** ccmp256 key */
2895     t_u8 key[WPA_CCMP_256_KEY_LEN];
2896 } MLAN_PACK_END ccmp_256_param;
2897 
2898 /** MrvlIEtype_KeyParamSet_t */
2899 typedef MLAN_PACK_START struct _MrvlIEtype_KeyParamSetV2_t
2900 {
2901     /** Type ID */
2902     t_u16 type;
2903     /** Length of Payload */
2904     t_u16 length;
2905     /** mac address */
2906     t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH];
2907     /** key index */
2908     t_u8 key_idx;
2909     /** Type of Key: WEP=0, TKIP=1, AES=2, WAPI=3 AES_CMAC=4 */
2910     t_u8 key_type;
2911     /** Key Control Info specific to a key_type_id */
2912     t_u16 key_info;
2913     union
2914     {
2915         /** wep key param */
2916         wep_param_t wep;
2917         /** tkip key param */
2918         tkip_param tkip;
2919         /** aes key param */
2920         aes_param aes;
2921         /** wapi key param */
2922         wapi_param wapi;
2923         /** IGTK key param */
2924         cmac_aes_param cmac_aes;
2925         /** IGTK key param */
2926         gmac_aes_256_param gmac_aes;
2927         /** gcmp key param */
2928         gcmp_param gcmp;
2929         /** ccmp 256 key parameters */
2930         ccmp_256_param ccmp256;
2931     } key_params;
2932 } MLAN_PACK_END MrvlIEtype_KeyParamSetV2_t;
2933 #else
2934 /** Key_param_set fixed length */
2935 #define KEYPARAMSET_FIXED_LEN 6
2936 
2937 /** cmac_aes_param */
2938 typedef MLAN_PACK_START struct _cmac_param
2939 {
2940     /** IGTK pn */
2941     t_u8 ipn[IGTK_PN_SIZE];
2942     /** aes key */
2943     t_u8 key[CMAC_AES_KEY_LEN];
2944 } MLAN_PACK_END cmac_param;
2945 
2946 /** MrvlIEtype_KeyParamSet_t */
2947 typedef MLAN_PACK_START struct _MrvlIEtype_KeyParamSet_t
2948 {
2949     /** Type ID */
2950     t_u16 type;
2951     /** Length of Payload */
2952     t_u16 length;
2953     /** Type of Key: WEP=0, TKIP=1, AES=2 WAPI=3 AES_CMAC=4 */
2954     t_u16 key_type_id;
2955     /** Key Control Info specific to a key_type_id */
2956     t_u16 key_info;
2957     /** Length of key */
2958     t_u16 key_len;
2959     /** Key material of size key_len */
2960 #if defined(WAPI)
2961     t_u8 key[50];
2962 #else
2963     t_u8 key[32];
2964 #endif
2965 } MLAN_PACK_END MrvlIEtype_KeyParamSet_t;
2966 #endif /* KEY_PARAM_SET_V2 */
2967 
2968 /** HostCmd_DS_802_11_KEY_MATERIAL */
2969 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_KEY_MATERIAL
2970 {
2971     /** Action */
2972     t_u16 action;
2973 #ifdef KEY_PARAM_SET_V2
2974     /** Key parameter set */
2975     MrvlIEtype_KeyParamSetV2_t key_param_set;
2976 #else
2977     /** Key parameter set */
2978     MrvlIEtype_KeyParamSet_t key_param_set;
2979 #endif
2980 } MLAN_PACK_END HostCmd_DS_802_11_KEY_MATERIAL;
2981 #endif /* WPA || WAPI_AP || HOST_AUTHENTICATOR */
2982 
2983 #if CONFIG_GTK_REKEY_OFFLOAD
2984 /** HostCmd_DS_GTK_REKEY_PARAMS */
2985 typedef MLAN_PACK_START struct _HostCmd_DS_GTK_REKEY_PARAMS
2986 {
2987     /** Action */
2988     t_u16 action;
2989     /** Key confirmation key */
2990     t_u8 kck[MLAN_KCK_LEN];
2991     /** Key encryption key */
2992     t_u8 kek[MLAN_KEK_LEN];
2993     /** Replay counter low 32 bit */
2994     t_u32 replay_ctr_low;
2995     /** Replay counter high 32 bit */
2996     t_u32 replay_ctr_high;
2997 } MLAN_PACK_END HostCmd_DS_GTK_REKEY_PARAMS;
2998 #endif
2999 
3000 /** Data structure of WMM QoS information */
3001 typedef MLAN_PACK_START struct _WmmQosInfo_t
3002 {
3003 #ifdef BIG_ENDIAN_SUPPORT
3004     /** QoS UAPSD */
3005     t_u8 qos_uapsd : 1;
3006     /** Reserved */
3007     t_u8 reserved : 3;
3008     /** Parameter set count */
3009     t_u8 para_set_count : 4;
3010 #else
3011     /** Parameter set count */
3012     t_u8 para_set_count : 4;
3013     /** Reserved */
3014     t_u8 reserved : 3;
3015     /** QoS UAPSD */
3016     t_u8 qos_uapsd : 1;
3017 #endif /* BIG_ENDIAN_SUPPORT */
3018 } MLAN_PACK_END WmmQosInfo_t, *pWmmQosInfo_t;
3019 
3020 /** Data structure of WMM ECW */
3021 typedef MLAN_PACK_START struct _WmmEcw_t
3022 {
3023 #ifdef BIG_ENDIAN_SUPPORT
3024     /** Maximum Ecw */
3025     t_u8 ecw_max : 4;
3026     /** Minimum Ecw */
3027     t_u8 ecw_min : 4;
3028 #else
3029     /** Minimum Ecw */
3030     t_u8 ecw_min : 4;
3031     /** Maximum Ecw */
3032     t_u8 ecw_max : 4;
3033 #endif /* BIG_ENDIAN_SUPPORT */
3034 } MLAN_PACK_END WmmEcw_t, *pWmmEcw_t;
3035 
3036 /** Data structure of WMM Aci/Aifsn */
3037 typedef MLAN_PACK_START struct _WmmAciAifsn_t
3038 {
3039 #ifdef BIG_ENDIAN_SUPPORT
3040     /** Reserved */
3041     t_u8 reserved : 1;
3042     /** Aci */
3043     t_u8 aci : 2;
3044     /** Acm */
3045     t_u8 acm : 1;
3046     /** Aifsn */
3047     t_u8 aifsn : 4;
3048 #else
3049     /** Aifsn */
3050     t_u8 aifsn : 4;
3051     /** Acm */
3052     t_u8 acm : 1;
3053     /** Aci */
3054     t_u8 aci : 2;
3055     /** Reserved */
3056     t_u8 reserved : 1;
3057 #endif /* BIG_ENDIAN_SUPPORT */
3058 } MLAN_PACK_END WmmAciAifsn_t, *pWmmAciAifsn_t;
3059 
3060 /** Data structure of WMM AC parameters  */
3061 typedef MLAN_PACK_START struct _WmmAcParameters_t
3062 {
3063     WmmAciAifsn_t aci_aifsn; /**< AciAifSn */
3064     WmmEcw_t ecw;            /**< Ecw */
3065     t_u16 tx_op_limit;       /**< Tx op limit */
3066 } MLAN_PACK_END WmmAcParameters_t, *pWmmAcParameters_t;
3067 
3068 /** Data structure of WMM parameter  */
3069 typedef MLAN_PACK_START struct _WmmParameter_t
3070 {
3071     /** OuiType:  00:50:f2:02 */
3072     t_u8 ouitype[4];
3073     /** Oui subtype: 01 */
3074     t_u8 ouisubtype;
3075     /** version: 01 */
3076     t_u8 version;
3077     /** QoS information */
3078     t_u8 qos_info;
3079     /** Reserved */
3080     t_u8 reserved;
3081     /** AC Parameters Record WMM_AC_BE, WMM_AC_BK, WMM_AC_VI, WMM_AC_VO */
3082     WmmAcParameters_t ac_params[MAX_AC_QUEUES];
3083 } MLAN_PACK_END WmmParameter_t, *pWmmParameter_t;
3084 
3085 /** Data structure of Host command WMM_PARAM_CFG  */
3086 typedef MLAN_PACK_START struct _HostCmd_DS_WMM_PARAM_CONFIG
3087 {
3088     /** action */
3089     t_u16 action;
3090     /** AC Parameters Record WMM_AC_BE, WMM_AC_BK, WMM_AC_VI, WMM_AC_VO */
3091     WmmAcParameters_t ac_params[MAX_AC_QUEUES];
3092 } MLAN_PACK_END HostCmd_DS_WMM_PARAM_CONFIG;
3093 
3094 /* Definition of firmware host command */
3095 /** HostCmd_DS_GEN */
3096 typedef MLAN_PACK_START struct _HostCmd_DS_GEN
3097 {
3098     /** Command */
3099     t_u16 command;
3100     /** Size */
3101     t_u16 size;
3102     /** Sequence number */
3103     t_u16 seq_num;
3104     /** Result */
3105     t_u16 result;
3106 } MLAN_PACK_END HostCmd_DS_GEN;
3107 
3108 /** Size of HostCmd_DS_GEN */
3109 #define S_DS_GEN sizeof(HostCmd_DS_GEN)
3110 
3111 #define MAX_MOD_GROUP 35
3112 /** modulation setting */
3113 typedef MLAN_PACK_START struct _mod_group_setting
3114 {
3115     /** modulation group */
3116     t_u8 mod_group;
3117     /** power */
3118     t_u8 power;
3119 } MLAN_PACK_END mod_group_setting;
3120 
3121 /** chan trpc config */
3122 typedef MLAN_PACK_START struct _ChanTRPCConfig_t
3123 {
3124     /** start freq */
3125     t_u16 start_freq;
3126     /* channel width */
3127     t_u8 width;
3128     /** channel number */
3129     t_u8 chan_num;
3130     mod_group_setting mod_group[MAX_MOD_GROUP];
3131 } MLAN_PACK_END ChanTRPCConfig_t;
3132 
3133 /** MrvlIETypes_ChanTRPCConfig_t */
3134 typedef MLAN_PACK_START struct _MrvlIETypes_ChanTRPCConfig_t
3135 {
3136     /** Header */
3137     MrvlIEtypesHeader_t header;
3138     /** start freq */
3139     t_u16 start_freq;
3140     /* channel width */
3141     t_u8 width;
3142     /** channel number */
3143     t_u8 chan_num;
3144     mod_group_setting mod_group[0];
3145 } MLAN_PACK_END MrvlIETypes_ChanTRPCConfig_t;
3146 
3147 /** Address type: broadcast */
3148 #define ADDR_TYPE_BROADCAST 1
3149 /* Address type: unicast */
3150 #define ADDR_TYPE_UNICAST 2
3151 /* Address type: multicast */
3152 #define ADDR_TYPE_MULTICAST 3
3153 
3154 /** Ether type: any */
3155 #define ETHER_TYPE_ANY 0xffff
3156 /** Ether type: ARP */
3157 #define ETHER_TYPE_ARP 0x0608
3158 
3159 /** IPv4 address any */
3160 #define IPV4_ADDR_ANY 0xffffffffU
3161 
3162 /** Header structure for ARP filter */
3163 typedef MLAN_PACK_START struct _arpfilter_header
3164 {
3165     /** Type */
3166     t_u16 type;
3167     /** TLV length */
3168     t_u16 len;
3169 } MLAN_PACK_END arpfilter_header;
3170 
3171 /** Filter entry structure */
3172 typedef MLAN_PACK_START struct _filter_entry
3173 {
3174     /** Address type */
3175     t_u16 addr_type;
3176     /** Ether type */
3177     t_u16 eth_type;
3178     /** IPv4 address */
3179     t_u32 ipv4_addr;
3180 } MLAN_PACK_END filter_entry;
3181 
3182 typedef MLAN_PACK_START struct _HostCmd_DS_MEF_CFG
3183 {
3184     /** Criteria */
3185     t_u32 criteria;
3186     /** Number of entries */
3187     t_u16 nentries;
3188 } MLAN_PACK_END HostCmd_DS_MEF_CFG;
3189 
3190 /** mef entry struct */
3191 typedef MLAN_PACK_START struct _mef_entry_header
3192 {
3193     /**mode:1->hostsleep;2->non hostsleep mode*/
3194     t_u8 mode;
3195     /**action=0->discard and not wake host
3196      * action=1->discard and wake host
3197      * action=3->allow and wake host*/
3198     t_u8 action;
3199     /* Len */
3200     t_u16 len;
3201 } MLAN_PACK_END mef_entry_header;
3202 
3203 /** mef op struct is to help to generate mef data*/
3204 typedef MLAN_PACK_START struct _mef_op
3205 {
3206     /** operand_type*/
3207     t_u8 operand_type;
3208     /** reserved*/
3209     t_u8 rsvd[3];
3210     /** data */
3211     t_u8 val[MAX_NUM_BYTE_SEQ + 1];
3212 } MLAN_PACK_END mef_op;
3213 
3214 /* HostCmd_DS_802_11_SLEEP_PERIOD */
3215 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SLEEP_PERIOD
3216 {
3217     /** ACT_GET/ACT_SET */
3218     t_u16 action;
3219 
3220     /** Sleep Period in msec */
3221     t_u16 sleep_pd;
3222 } MLAN_PACK_END HostCmd_DS_802_11_SLEEP_PERIOD;
3223 
3224 /* HostCmd_DS_802_11_SLEEP_PARAMS */
3225 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SLEEP_PARAMS
3226 {
3227     /** ACT_GET/ACT_SET */
3228     t_u16 action;
3229     /** Sleep clock error in ppm */
3230     t_u16 error;
3231     /** Wakeup offset in usec */
3232     t_u16 offset;
3233     /** Clock stabilization time in usec */
3234     t_u16 stable_time;
3235     /** Control periodic calibration */
3236     t_u8 cal_control;
3237     /** Control the use of external sleep clock */
3238     t_u8 external_sleep_clk;
3239     /** Reserved field, should be set to zero */
3240     t_u16 reserved;
3241 } MLAN_PACK_END HostCmd_DS_802_11_SLEEP_PARAMS;
3242 
3243 /** Sleep response control */
3244 typedef enum _sleep_resp_ctrl
3245 {
3246     RESP_NOT_NEEDED = 0,
3247     RESP_NEEDED,
3248 } sleep_resp_ctrl;
3249 
3250 /** Structure definition for the new ieee power save parameters*/
3251 typedef MLAN_PACK_START struct __ps_param
3252 {
3253     /** Null packet interval */
3254     t_u16 null_pkt_interval;
3255     /** Num dtims */
3256     t_u16 multiple_dtims;
3257     /** becaon miss interval */
3258     t_u16 bcn_miss_timeout;
3259     /** local listen interval */
3260     t_u16 local_listen_interval;
3261     /** Adhoc awake period */
3262     t_u16 adhoc_wake_period;
3263     /** mode - (0x01 - firmware to automatically choose PS_POLL or NULL mode, 0x02 - PS_POLL, 0x03 - NULL mode ) */
3264     t_u16 mode;
3265     /** Delay to PS in milliseconds */
3266     t_u16 delay_to_ps;
3267 } MLAN_PACK_END ps_param;
3268 
3269 /** Structure definition for the new auto deep sleep command */
3270 typedef MLAN_PACK_START struct __auto_ds_param
3271 {
3272     /** Deep sleep inactivity timeout */
3273     t_u16 deep_sleep_timeout;
3274 } MLAN_PACK_END auto_ds_param;
3275 
3276 #if (CONFIG_WNM_PS)
3277 /** Structure definition for the wnm power save command */
3278 typedef MLAN_PACK_START struct __wnm_ps_param
3279 {
3280     /** 0: enable WNM Sleep Mode, 1: disable WNM Sleep Mode */
3281     t_u8 action;
3282     /** Null packet interval */
3283     t_u16 null_pkt_interval;
3284     /** becaon miss interval */
3285     t_u16 bcn_miss_timeout;
3286     /** local listen interval */
3287     t_u16 local_listen_interval;
3288     /** mode - (0x01 - firmware to automatically choose PS_POLL or NULL mode, 0x02 - PS_POLL, 0x03 - NULL mode ) */
3289     t_u16 ps_mode;
3290     /** Delay to PS in milliseconds */
3291     t_u16 delay_to_ps;
3292     /** WNM sleep interval */
3293     t_u16 wnm_sleep_interval;
3294 } MLAN_PACK_END wnm_ps_param;
3295 
3296 /** Structure definition for the wnm power save result */
3297 typedef MLAN_PACK_START struct __wnm_ps_result
3298 {
3299     /** 0: enable WNM Sleep Mode, 1: disable WNM Sleep Mode */
3300     t_u8 action;
3301     /** 0: successful; 1: fail */
3302     t_u8 result;
3303 } MLAN_PACK_END wnm_ps_result;
3304 #endif
3305 
3306 /** Structure definition for sleep confirmation in the new ps command */
3307 typedef struct __sleep_confirm_param
3308 {
3309     /** response control 0x00 - response not needed, 0x01 - response needed */
3310     t_u16 resp_ctrl;
3311 } sleep_confirm_param;
3312 
3313 /* bit define for pre_asleep*/
3314 #define BLOCK_CMD_IN_PRE_ASLEEP MBIT(0)
3315 /** MrvlIEtypes_ext_ps_param_t */
3316 typedef MLAN_PACK_START struct _MrvlIEtypes_ext_ps_param_t
3317 {
3318     /** Header */
3319     MrvlIEtypesHeader_t header;
3320     /** mode: bit0:BLOCK_CMD_IN_PRE_ASLEEP */
3321     t_u32 mode;
3322 } MLAN_PACK_END MrvlIEtypes_ext_ps_param_t;
3323 
3324 /** ext_ps_param_t */
3325 typedef MLAN_PACK_START struct _ext_ps_param
3326 {
3327     /** reserved */
3328     t_u16 reserved;
3329     /** ext_ps_param tlv */
3330     MrvlIEtypes_ext_ps_param_t param;
3331 } MLAN_PACK_END ext_ps_param;
3332 
3333 /** bitmap for get auto deepsleep */
3334 #define BITMAP_AUTO_DS 0x01U
3335 /** bitmap for sta power save */
3336 #define BITMAP_STA_PS 0x10U
3337 /** bitmap for uap inactivity based PS */
3338 #define BITMAP_UAP_INACT_PS 0x100U
3339 /** bitmap for uap DTIM PS */
3340 #define BITMAP_UAP_DTIM_PS 0x200U
3341 /** Structure definition for the new ieee power save parameters*/
3342 typedef struct _auto_ps_param
3343 {
3344     /** bitmap for enable power save mode */
3345     t_u16 ps_bitmap;
3346     /* auto deep sleep parameter, sta power save parameter uap inactivity
3347        parameter uap DTIM parameter */
3348 } auto_ps_param;
3349 
3350 /** fix size for auto ps */
3351 #define AUTO_PS_FIX_SIZE 4U
3352 
3353 /** TLV type : auto ds param */
3354 #define TLV_TYPE_AUTO_DS_PARAM (PROPRIETARY_TLV_BASE_ID + 0x71U) // 0x0171
3355 /** TLV type : ps param */
3356 #define TLV_TYPE_PS_PARAM (PROPRIETARY_TLV_BASE_ID + 0x72U) // 0x0172
3357 
3358 #if (CONFIG_WNM_PS)
3359 /** TLV type : wnm param */
3360 #define TLV_TYPE_WNM_PARAM (PROPRIETARY_TLV_BASE_ID + 0x158) // 0x0258
3361 #endif
3362 /** TLV type: ps_ext_param */
3363 #define TLV_TYPE_PS_EXT_PARAM (PROPRIETARY_TLV_BASE_ID + 0x15F) /* 0x25F */
3364 
3365 /** MrvlIEtypes_auto_ds_param_t */
3366 typedef MLAN_PACK_START struct _MrvlIEtypes_auto_ds_param_t
3367 {
3368     /** Header */
3369     MrvlIEtypesHeader_t header;
3370     /** auto ds param */
3371     auto_ds_param param;
3372 } MLAN_PACK_END MrvlIEtypes_auto_ds_param_t;
3373 
3374 /** MrvlIEtypes_ps_param_t */
3375 typedef MLAN_PACK_START struct _MrvlIEtypes_ps_param_t
3376 {
3377     /** Header */
3378     MrvlIEtypesHeader_t header;
3379     /** ps param */
3380     ps_param param;
3381 } MLAN_PACK_END MrvlIEtypes_ps_param_t;
3382 
3383 #if (CONFIG_WNM_PS)
3384 /** MrvlIEtypes_wnm_ps_param_t */
3385 typedef MLAN_PACK_START struct _MrvlIEtypes_wnm_ps_param_t
3386 {
3387     /** Header */
3388     MrvlIEtypesHeader_t header;
3389     /** wnm ps param */
3390     wnm_ps_param param;
3391 } MLAN_PACK_END MrvlIEtypes_wnm_ps_param_t;
3392 #endif
3393 
3394 /** Structure definition for new power save command */
3395 typedef MLAN_PACK_START struct _HostCmd_DS_PS_MODE_ENH
3396 {
3397     /** Action */
3398     uint16_t action;
3399     /** Data speciifc to action */
3400     /* For IEEE power save data will be as UINT16 mode (0x01 - firmware to
3401        automatically choose PS_POLL or NULL mode, 0x02 - PS_POLL, 0x03 - NULL
3402        mode ) UINT16 NullpacketInterval UINT16 NumDtims UINT16
3403        BeaconMissInterval UINT16 locallisteninterval UINT16 adhocawakeperiod */
3404 
3405     /* For auto deep sleep */
3406     /* UINT16 Deep sleep inactivity timeout */
3407 
3408     /* For PS sleep confirm UINT16 responeCtrl - 0x00 - reponse from fw not
3409        needed, 0x01 - response from fw is needed */
3410 
3411     union
3412     {
3413         /** PS param definition */
3414         ps_param opt_ps;
3415         /** Auto ds param definition */
3416         auto_ds_param auto_ds;
3417         /** Sleep comfirm param definition */
3418         sleep_confirm_param sleep_cfm;
3419         /** bitmap for get PS info and Disable PS mode */
3420         t_u16 ps_bitmap;
3421         /** auto ps param */
3422         auto_ps_param auto_ps;
3423 #if (CONFIG_WNM_PS)
3424         /** wnm ps param */
3425         wnm_ps_param param;
3426 #endif
3427         /** ext ps param */
3428         ext_ps_param ext_param;
3429     } params;
3430 } MLAN_PACK_END HostCmd_DS_802_11_PS_MODE_ENH;
3431 
3432 /** UAP FW version 2 */
3433 #define UAP_FW_VERSION_2 0x2
3434 
3435 /** HostCMD_DS_APCMD_ACS_SCAN */
3436 typedef MLAN_PACK_START struct _HostCMD_DS_APCMD_ACS_SCAN
3437 {
3438     /** band */
3439     Band_Config_t bandcfg;
3440     /** channel */
3441     t_u8 chan;
3442 } MLAN_PACK_END HostCMD_DS_APCMD_ACS_SCAN;
3443 
3444 /** HostCmd_DS_GET_HW_SPEC */
3445 typedef MLAN_PACK_START struct _HostCmd_DS_GET_HW_SPEC
3446 {
3447     /** HW Interface version number */
3448     t_u16 hw_if_version;
3449     /** HW version number */
3450     t_u16 version;
3451     /** Reserved field */
3452     t_u16 reserved;
3453     /** Max no of Multicast address  */
3454     t_u16 num_of_mcast_adr;
3455     /** MAC address */
3456     t_u8 permanent_addr[MLAN_MAC_ADDR_LENGTH];
3457     /** Region Code */
3458     t_u16 region_code;
3459     /** Number of antenna used */
3460     t_u16 number_of_antenna;
3461     /** FW release number, example 0x1234=1.2.3.4 */
3462     t_u32 fw_release_number;
3463     /** hw dev cap */
3464     t_u32 hw_dev_cap;
3465     /** Reserved field */
3466     t_u32 reserved_2;
3467     /** Reserved field */
3468     t_u32 reserved_3;
3469     /** FW/HW Capability */
3470     t_u32 fw_cap_info;
3471     /** 802.11n Device Capabilities */
3472     t_u32 dot_11n_dev_cap;
3473     /** MIMO abstraction of MCSs supported by device */
3474     t_u8 dev_mcs_support;
3475     /** Valid end port at init */
3476     t_u16 mp_end_port;
3477     /** mgmt IE buffer count */
3478     t_u16 mgmt_buf_count;
3479     /** Reserved */
3480     t_u32 reserved_8;
3481     /** Reserved */
3482     t_u32 reserved_9;
3483     /** 802.11ac Device Capabilities */
3484     t_u32 Dot11acDevCap;
3485     /** MCSs supported by 802.11ac device */
3486     t_u32 Dot11acMcsSupport;
3487 } MLAN_PACK_END HostCmd_DS_GET_HW_SPEC;
3488 
3489 /**  HostCmd_DS_802_11_CFG_DATA */
3490 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_CFG_DATA
3491 {
3492     /** Action */
3493     t_u16 action;
3494     /** Type */
3495     t_u16 type;
3496     /** Data length */
3497     t_u16 data_len;
3498     /** Data */
3499     t_u8 data[1];
3500 } MLAN_PACK_END HostCmd_DS_802_11_CFG_DATA;
3501 
3502 /**  HostCmd_DS_CMD_802_11_RSSI_INFO */
3503 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_RSSI_INFO
3504 {
3505     /** Action */
3506     t_u16 action;
3507     /** Parameter used for exponential averaging for Data */
3508     t_u16 ndata;
3509     /** Parameter used for exponential averaging for Beacon */
3510     t_u16 nbcn;
3511     /** Reserved field 0 */
3512     t_u16 reserved[9];
3513     /** Reserved field 1 */
3514     t_u64 reserved_1;
3515 } MLAN_PACK_END HostCmd_DS_802_11_RSSI_INFO;
3516 
3517 /** HostCmd_DS_802_11_RSSI_INFO_RSP */
3518 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_RSSI_INFO_RSP
3519 {
3520     /** Action */
3521     t_u16 action;
3522     /** Parameter used for exponential averaging for Data */
3523     t_u16 ndata;
3524     /** Parameter used for exponential averaging for beacon */
3525     t_u16 nbcn;
3526     /** Last Data RSSI in dBm */
3527     t_s16 data_rssi_last;
3528     /** Last Data NF in dBm */
3529     t_s16 data_nf_last;
3530     /** AVG DATA RSSI in dBm */
3531     t_s16 data_rssi_avg;
3532     /** AVG DATA NF in dBm */
3533     t_s16 data_nf_avg;
3534     /** Last BEACON RSSI in dBm */
3535     t_s16 bcn_rssi_last;
3536     /** Last BEACON NF in dBm */
3537     t_s16 bcn_nf_last;
3538     /** AVG BEACON RSSI in dBm */
3539     t_s16 bcn_rssi_avg;
3540     /** AVG BEACON NF in dBm */
3541     t_s16 bcn_nf_avg;
3542     /** Last RSSI Beacon TSF */
3543     t_u64 tsf_bcn;
3544 } MLAN_PACK_END HostCmd_DS_802_11_RSSI_INFO_RSP;
3545 
3546 /** HostCmd_DS_802_11_MAC_ADDRESS */
3547 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_MAC_ADDRESS
3548 {
3549     /** Action */
3550     t_u16 action;
3551     /** MAC address */
3552     t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH];
3553 } MLAN_PACK_END HostCmd_DS_802_11_MAC_ADDRESS;
3554 
3555 /** HostCmd_DS_MAC_CONTROL */
3556 typedef MLAN_PACK_START struct _HostCmd_DS_MAC_CONTROL
3557 {
3558     /** Action */
3559     t_u32 action;
3560 } MLAN_PACK_END HostCmd_DS_MAC_CONTROL;
3561 
3562 #if (CONFIG_WIFI_IND_RESET) && (CONFIG_WIFI_IND_DNLD)
3563 /** HostCmd_DS_IND_RST */
3564 typedef MLAN_PACK_START struct _HostCmd_DS_IND_RST
3565 {
3566     /** Action */
3567     t_u16 action;
3568     /** CMD_SUBID */
3569     t_u16 sub_id;
3570 } MLAN_PACK_END HostCmd_DS_IND_RST;
3571 
3572 /** HostCmd_DS_INDEPENDENT_RESET_CFG */
3573 typedef MLAN_PACK_START struct _HostCmd_DS_INDEPENDENT_RESET_CFG
3574 {
3575     /** ACT_GET/ACT_SET */
3576     t_u16 action;
3577     /** out band independent reset */
3578     t_u8 ir_mode;
3579     /** gpio pin */
3580     t_u8 gpio_pin;
3581 } MLAN_PACK_END HostCmd_DS_INDEPENDENT_RESET_CFG;
3582 #endif
3583 
3584 /** HostCmd_DS_CMD_TX_DATA_PAUSE */
3585 typedef MLAN_PACK_START struct _HostCmd_DS_CMD_TX_DATA_PAUSE
3586 {
3587     /** Action */
3588     t_u16 action;
3589     /** Enable/disable Tx data pause */
3590     t_u8 enable_tx_pause;
3591     /** Max number of TX buffers allowed for all PS clients*/
3592     t_u8 pause_tx_count;
3593 } MLAN_PACK_END HostCmd_DS_CMD_TX_DATA_PAUSE;
3594 
3595 /** TLV type : TX pause TLV */
3596 #define TLV_TYPE_TX_PAUSE (PROPRIETARY_TLV_BASE_ID + 0x94) // 0x0194
3597 /** MrvlIEtypes_SsIdParamSet_t */
3598 typedef MLAN_PACK_START struct _MrvlIEtypes_tx_pause_t
3599 {
3600     /** Header */
3601     MrvlIEtypesHeader_t header;
3602     /** peer mac address */
3603     t_u8 peermac[MLAN_MAC_ADDR_LENGTH];
3604     /** Tx pause state, 1--pause, 0--free flowing */
3605     t_u8 tx_pause;
3606     /** total packets queued for the client */
3607     t_u8 pkt_cnt;
3608 } MLAN_PACK_END MrvlIEtypes_tx_pause_t;
3609 
3610 /**  HostCmd_CMD_MAC_MULTICAST_ADR */
3611 typedef MLAN_PACK_START struct _HostCmd_DS_MAC_MULTICAST_ADR
3612 {
3613     /** Action */
3614     t_u16 action;
3615     /** Number of addresses */
3616     t_u16 num_of_adrs;
3617     /** List of MAC */
3618     t_u8 mac_list[MLAN_MAC_ADDR_LENGTH * MLAN_MAX_MULTICAST_LIST_SIZE];
3619 } MLAN_PACK_END HostCmd_DS_MAC_MULTICAST_ADR;
3620 
3621 /**  HostCmd_CMD_802_11_DEAUTHENTICATE */
3622 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_DEAUTHENTICATE
3623 {
3624     /** MAC address */
3625     t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH];
3626     /** Deauthentication resaon code */
3627     t_u16 reason_code;
3628 } MLAN_PACK_END HostCmd_DS_802_11_DEAUTHENTICATE;
3629 
3630 /** HostCmd_DS_802_11_ASSOCIATE */
3631 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_ASSOCIATE
3632 {
3633     /** Peer STA address */
3634     t_u8 peer_sta_addr[MLAN_MAC_ADDR_LENGTH];
3635     /** Capability information */
3636     IEEEtypes_CapInfo_t cap_info;
3637     /** Listen interval */
3638     t_u16 listen_interval;
3639     /** Beacon period */
3640     t_u16 beacon_period;
3641     /** DTIM period */
3642     t_u8 dtim_period;
3643 
3644     /**
3645      *  MrvlIEtypes_SsIdParamSet_t  SsIdParamSet;
3646      *  MrvlIEtypes_PhyParamSet_t   PhyParamSet;
3647      *  MrvlIEtypes_SsParamSet_t    SsParamSet;
3648      *  MrvlIEtypes_RatesParamSet_t RatesParamSet;
3649      */
3650 } MLAN_PACK_END HostCmd_DS_802_11_ASSOCIATE;
3651 
3652 /** HostCmd_CMD_802_11_ASSOCIATE response */
3653 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_ASSOCIATE_RSP
3654 {
3655     /** Association response structure */
3656     IEEEtypes_AssocRsp_t assoc_rsp;
3657 } MLAN_PACK_END HostCmd_DS_802_11_ASSOCIATE_RSP;
3658 
3659 /** HostCmd_DS_802_11_AD_HOC_START*/
3660 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_AD_HOC_START
3661 {
3662     /** AdHoc SSID */
3663     t_u8 ssid[MLAN_MAX_SSID_LENGTH];
3664     /** BSS mode */
3665     mlan_bss_mode bss_mode;
3666     /** Beacon period */
3667     t_u16 beacon_period;
3668     /** DTIM period */
3669     t_u8 dtim_period;
3670     /** SS parameter set */
3671     IEEEtypes_SsParamSet_t ss_param_set;
3672     /** PHY parameter set */
3673     IEEEtypes_PhyParamSet_t phy_param_set;
3674     /** Reserved field */
3675     t_u16 reserved1;
3676     /** Capability information */
3677     IEEEtypes_CapInfo_t cap;
3678     /** Supported data rates */
3679     t_u8 DataRate[HOSTCMD_SUPPORTED_RATES];
3680 } MLAN_PACK_END HostCmd_DS_802_11_AD_HOC_START;
3681 
3682 /**  HostCmd_CMD_802_11_AD_HOC_START response */
3683 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_AD_HOC_START_RESULT
3684 {
3685     /** Padding */
3686     t_u8 pad[3];
3687     /** AdHoc BSSID */
3688     t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
3689     /** Padding to sync with FW structure*/
3690     t_u8 pad2[2];
3691     /** Result */
3692     t_u8 result;
3693 } MLAN_PACK_END HostCmd_DS_802_11_AD_HOC_START_RESULT;
3694 
3695 /**  HostCmd_CMD_802_11_AD_HOC_START response */
3696 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_AD_HOC_JOIN_RESULT
3697 {
3698     /** Result */
3699     t_u8 result;
3700 } MLAN_PACK_END HostCmd_DS_802_11_AD_HOC_JOIN_RESULT;
3701 
3702 /** AdHoc_BssDesc_t */
3703 typedef MLAN_PACK_START struct _AdHoc_BssDesc_t
3704 {
3705     /** BSSID */
3706     t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
3707     /** SSID */
3708     t_u8 ssid[MLAN_MAX_SSID_LENGTH];
3709     /** BSS mode */
3710     mlan_bss_mode bss_mode;
3711     /** Beacon period */
3712     t_u16 beacon_period;
3713     /** DTIM period */
3714     t_u8 dtim_period;
3715     /** Timestamp */
3716     t_u8 time_stamp[8];
3717     /** Local time */
3718     t_u8 local_time[8];
3719     /** PHY parameter set */
3720     IEEEtypes_PhyParamSet_t phy_param_set;
3721     /** SS parameter set */
3722     IEEEtypes_SsParamSet_t ss_param_set;
3723     /** Capability information */
3724     IEEEtypes_CapInfo_t cap;
3725     /** Supported data rates */
3726     t_u8 data_rates[HOSTCMD_SUPPORTED_RATES];
3727 
3728     /*
3729      *  DO NOT ADD ANY FIELDS TO THIS STRUCTURE.
3730      *  It is used in the Adhoc join command and will cause a
3731      *  binary layout mismatch with the firmware
3732      */
3733 } MLAN_PACK_END AdHoc_BssDesc_t;
3734 
3735 /** HostCmd_DS_802_11_AD_HOC_JOIN */
3736 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_AD_HOC_JOIN
3737 {
3738     /** AdHoc BSS descriptor */
3739     AdHoc_BssDesc_t bss_descriptor;
3740     /** Reserved field */
3741     t_u16 reserved1;
3742     /** Reserved field */
3743     t_u16 reserved2;
3744 } MLAN_PACK_END HostCmd_DS_802_11_AD_HOC_JOIN;
3745 
3746 #if CONFIG_NET_MONITOR
3747 /** MrvlIEtypes_Monitor_filter_t */
3748 typedef MLAN_PACK_START struct _MrvlIEtypes_Monitor_filter_t
3749 {
3750     /** Header */
3751     MrvlIEtypesHeader_t header;
3752     /** mac num of filter*/
3753     t_u8 filter_num;
3754     /** mac address */
3755     mlan_802_11_mac_addr mac_list[MAX_MONIT_MAC_FILTER_NUM];
3756 } MLAN_PACK_END MrvlIEtypes_Monitor_filter_t;
3757 
3758 /**  HostCmd_CMD_802_11_NET_MONITOR */
3759 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_NET_MONITOR
3760 {
3761     t_u16 action;
3762     t_u16 monitor_activity;
3763     t_u16 filter_flags;
3764     MrvlIEtypes_ChanBandListParamSet_t monitor_channel;
3765     MrvlIEtypes_Monitor_filter_t monitor_filter;
3766 } MLAN_PACK_END HostCmd_DS_802_11_NET_MONITOR;
3767 #endif
3768 
3769 /** Interrupt Raising Edge */
3770 #define INT_RASING_EDGE 0
3771 /** Interrupt Falling Edge */
3772 #define INT_FALLING_EDGE 1
3773 
3774 /** Delay 1 usec */
3775 #define DELAY_1_US 1
3776 
3777 typedef MLAN_PACK_START struct _HostCmd_DS_SDIO_GPIO_INT_CONFIG
3778 {
3779     /** Action */
3780     t_u16 action;
3781     /** GPIO interrupt pin */
3782     t_u16 gpio_pin;
3783     /** GPIO interrupt edge, 1: failing edge; 0: raising edge */
3784     t_u16 gpio_int_edge;
3785     /** GPIO interrupt pulse widthin usec units */
3786     t_u16 gpio_pulse_width;
3787 } MLAN_PACK_END HostCmd_DS_SDIO_GPIO_INT_CONFIG;
3788 
3789 typedef MLAN_PACK_START struct _HostCmd_DS_SDIO_PULL_CTRL
3790 {
3791     /** Action */
3792     t_u16 action;
3793     /** The delay of pulling up in us */
3794     t_u16 pull_up;
3795     /** The delay of pulling down in us */
3796     t_u16 pull_down;
3797 } MLAN_PACK_END HostCmd_DS_SDIO_PULL_CTRL;
3798 
3799 /** HostCmd_DS_802_11_GET_LOG */
3800 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_GET_LOG
3801 {
3802     /** Number of multicast transmitted frames */
3803     t_u32 mcast_tx_frame;
3804     /** Number of failures */
3805     t_u32 failed;
3806     /** Number of retries */
3807     t_u32 retry;
3808     /** Number of multiretries */
3809     t_u32 multiretry;
3810     /** Number of duplicate frames */
3811     t_u32 frame_dup;
3812     /** Number of RTS success */
3813     t_u32 rts_success;
3814     /** Number of RTS failure */
3815     t_u32 rts_failure;
3816     /** Number of acknowledgement failure */
3817     t_u32 ack_failure;
3818     /** Number of fragmented packets received */
3819     t_u32 rx_frag;
3820     /** Number of multicast frames received */
3821     t_u32 mcast_rx_frame;
3822     /** FCS error */
3823     t_u32 fcs_error;
3824     /** Number of transmitted frames */
3825     t_u32 tx_frame;
3826     /** Reserved field */
3827     t_u32 reserved;
3828     /** Number of WEP icv error for each key */
3829     t_u32 wep_icv_err_cnt[4];
3830     /** Beacon received count */
3831     t_u32 bcn_rcv_cnt;
3832     /** Beacon missed count */
3833     t_u32 bcn_miss_cnt;
3834     /** Tx frag count */
3835     t_u32 tx_frag_cnt;
3836     /** Qos Tx frag count */
3837     t_u32 qos_tx_frag_cnt[8];
3838     /** Qos failed count */
3839     t_u32 qos_failed_cnt[8];
3840     /** Qos retry count */
3841     t_u32 qos_retry_cnt[8];
3842     /** Qos multi retry count */
3843     t_u32 qos_multi_retry_cnt[8];
3844     /** Qos frame dup count */
3845     t_u32 qos_frm_dup_cnt[8];
3846     /** Qos rts success count */
3847     t_u32 qos_rts_suc_cnt[8];
3848     /** Qos rts failure count */
3849     t_u32 qos_rts_failure_cnt[8];
3850     /** Qos ack failure count */
3851     t_u32 qos_ack_failure_cnt[8];
3852     /** Qos Rx frag count */
3853     t_u32 qos_rx_frag_cnt[8];
3854     /** Qos Tx frame count */
3855     t_u32 qos_tx_frm_cnt[8];
3856     /** Qos discarded frame count */
3857     t_u32 qos_discarded_frm_cnt[8];
3858     /** Qos mpdus Rx count */
3859     t_u32 qos_mpdus_rx_cnt[8];
3860     /** Qos retry rx count */
3861     t_u32 qos_retries_rx_cnt[8];
3862     /** CMAC ICV errors count */
3863     t_u32 cmacicv_errors;
3864     /** CMAC replays count */
3865     t_u32 cmac_replays;
3866     /** mgmt CCMP replays count */
3867     t_u32 mgmt_ccmp_replays;
3868     /** TKIP ICV errors count */
3869     t_u32 tkipicv_errors;
3870     /** TKIP replays count */
3871     t_u32 tkip_replays;
3872     /** CCMP decrypt errors count */
3873     t_u32 ccmp_decrypt_errors;
3874     /** CCMP replays count */
3875     t_u32 ccmp_replays;
3876     /** Tx amsdu count */
3877     t_u32 tx_amsdu_cnt;
3878     /** failed amsdu count */
3879     t_u32 failed_amsdu_cnt;
3880     /** retry amsdu count */
3881     t_u32 retry_amsdu_cnt;
3882     /** multi-retry amsdu count */
3883     t_u32 multi_retry_amsdu_cnt;
3884     /** Tx octets in amsdu count */
3885     t_u64 tx_octets_in_amsdu_cnt;
3886     /** amsdu ack failure count */
3887     t_u32 amsdu_ack_failure_cnt;
3888     /** Rx amsdu count */
3889     t_u32 rx_amsdu_cnt;
3890     /** Rx octets in amsdu count */
3891     t_u64 rx_octets_in_amsdu_cnt;
3892     /** Tx ampdu count */
3893     t_u32 tx_ampdu_cnt;
3894     /** tx mpdus in ampdu count */
3895     t_u32 tx_mpdus_in_ampdu_cnt;
3896     /** tx octets in ampdu count */
3897     t_u64 tx_octets_in_ampdu_cnt;
3898     /** ampdu Rx count */
3899     t_u32 ampdu_rx_cnt;
3900     /** mpdu in Rx ampdu count */
3901     t_u32 mpdu_in_rx_ampdu_cnt;
3902     /** Rx octets ampdu count */
3903     t_u64 rx_octets_in_ampdu_cnt;
3904     /** ampdu delimiter CRC error count */
3905     t_u32 ampdu_delimiter_crc_error_cnt;
3906     /** Rx Stuck Related Info*/
3907     /** Rx Stuck Issue count */
3908     t_u32 rx_stuck_issue_cnt[2];
3909     /** Rx Stuck Recovery count */
3910     t_u32 rx_stuck_recovery_cnt;
3911     /** Rx Stuck TSF */
3912     t_u64 rx_stuck_tsf[2];
3913     /** Tx Watchdog Recovery Related Info */
3914     /** Tx Watchdog Recovery count */
3915     t_u32 tx_watchdog_recovery_cnt;
3916     /** Tx Watchdog TSF */
3917     t_u64 tx_watchdog_tsf[2];
3918     /** Channel Switch Related Info */
3919     /** Channel Switch Announcement Sent */
3920     t_u32 channel_switch_ann_sent;
3921     /** Channel Switch State */
3922     t_u32 channel_switch_state;
3923     /** Register Class */
3924     t_u32 reg_class;
3925     /** Channel Number */
3926     t_u32 channel_number;
3927     /** Channel Switch Mode */
3928     t_u32 channel_switch_mode;
3929     /** Reset Rx Mac Count */
3930     t_u32 rx_reset_mac_recovery_cnt;
3931     /** ISR2 Not Done Count*/
3932     t_u32 rx_Isr2_NotDone_Cnt;
3933     /** GDMA Abort Count */
3934     t_u32 gdma_abort_cnt;
3935     /** Rx Reset MAC Count */
3936     t_u32 g_reset_rx_mac_cnt;
3937     // Ownership error counters
3938     /*Error Ownership error count*/
3939     t_u32 dwCtlErrCnt;
3940     /*Control Ownership error count*/
3941     t_u32 dwBcnErrCnt;
3942     /*Control Ownership error count*/
3943     t_u32 dwMgtErrCnt;
3944     /*Control Ownership error count*/
3945     t_u32 dwDatErrCnt;
3946     /*BIGTK MME good count*/
3947     t_u32 bigtk_mmeGoodCnt;
3948     /*BIGTK Replay error count*/
3949     t_u32 bigtk_replayErrCnt;
3950     /*BIGTK MIC error count*/
3951     t_u32 bigtk_micErrCnt;
3952     /*BIGTK MME not included count*/
3953     t_u32 bigtk_mmeNotFoundCnt;
3954 } MLAN_PACK_END HostCmd_DS_802_11_GET_LOG;
3955 
3956 /**_HostCmd_TX_RATE_QUERY */
3957 typedef MLAN_PACK_START struct _HostCmd_TX_RATE_QUERY
3958 {
3959     /** Tx rate */
3960     t_u8 tx_rate;
3961 #ifdef SD8801
3962     /** Ht Info [Bit 0] RxRate format: LG=0, HT=1
3963      * [Bit 1]  HT Bandwidth: BW20 = 0, BW40 = 1
3964      * [Bit 2]  HT Guard Interval: LGI = 0, SGI = 1 */
3965     t_u8 ht_info;
3966 #else
3967     /** Tx Rate Info:
3968      * [Bit 0-1] tx rate format: LG = 0, HT = 1, VHT = 2, HE = 3
3969      * [Bit 2-3] HT/VHT Bandwidth: BW20 = 0, BW40 = 1, BW80 = 2, BW160 = 3
3970      * [Bit 4]   HT/VHT Guard Interval: LGI = 0, SGI = 1
3971      * [Bit 5]   STBC support
3972      * [Bit 6]   LDPC support
3973      * [Bit 7] [Bit 4] 11ax GI, 00, 01, 10, 11 */
3974     t_u8 tx_rate_info;
3975 #endif
3976 #if CONFIG_11AX
3977     /**
3978      * BIT0: DCM
3979      * BIT3-BIT1: tone mode
3980      **  000: 26  tone
3981      **  001: 52  tone
3982      **  010: 106 tone
3983      **  011: 242 tone
3984      **  100: 484 tone
3985      **  101: 996 tone
3986      * BIT7-BIT4: resvd
3987      **/
3988     t_u8 ext_tx_rate_info;
3989 #endif
3990 } MLAN_PACK_END HostCmd_TX_RATE_QUERY;
3991 
3992 typedef MLAN_PACK_START struct _hs_config_param
3993 {
3994     /** bit0=1: broadcast data
3995      * bit1=1: unicast data
3996      * bit2=1: mac events
3997      * bit3=1: multicast data
3998      */
3999     t_u32 conditions;
4000     /** GPIO pin or 0xff for interface */
4001     t_u8 gpio;
4002     /** gap in milliseconds or or 0xff for special setting when GPIO is used to wakeup host */
4003     t_u8 gap;
4004 } MLAN_PACK_END hs_config_param;
4005 
4006 #if 0
4007 /** HS Action 0x0001 - Configure enhanced host sleep mode, 0x0002 - Activate enhanced host sleep mode */
4008 typedef enum _Host_Sleep_Action
4009 {
4010     HS_CONFIGURE = 0x0001,
4011     HS_ACTIVATE = 0x0002,
4012 } Host_Sleep_Action;
4013 #endif
4014 
4015 /** Structure definition for activating enhanced hs */
4016 typedef MLAN_PACK_START struct __hs_activate_param
4017 {
4018     /** response control 0x00 - response not needed, 0x01 - response needed */
4019     t_u16 resp_ctrl;
4020 } MLAN_PACK_END hs_activate_param;
4021 
4022 /** HostCmd_DS_802_11_HS_CFG_ENH */
4023 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_HS_CFG_ENH
4024 {
4025     /** Action 0x0001 - Configure enhanced host sleep mode, 0x0002 - Activate enhanced host sleep mode */
4026     t_u16 action;
4027 
4028     union
4029     {
4030         /** Configure enhanced hs */
4031         hs_config_param hs_config;
4032         /** Activate enhanced hs */
4033         hs_activate_param hs_activate;
4034     } params;
4035 } MLAN_PACK_END HostCmd_DS_802_11_HS_CFG_ENH;
4036 
4037 /** SNMP_MIB_INDEX */
4038 typedef enum _SNMP_MIB_INDEX
4039 {
4040     OpRateSet_i     = 1,
4041     DtimPeriod_i    = 3,
4042     RtsThresh_i     = 5,
4043     ShortRetryLim_i = 6,
4044     LongRetryLim_i  = 7,
4045     FragThresh_i    = 8,
4046     Dot11D_i        = 9,
4047     Dot11H_i        = 10,
4048     WwsMode_i       = 17,
4049     Thermal_i       = 34,
4050     ECSAEnable_i    = 42,
4051     StopDeauth_i    = 44,
4052 } SNMP_MIB_INDEX;
4053 
4054 #if CONFIG_TURBO_MODE
4055 /** Used just for Turbo mode */
4056 #define OID_WMM_TURBO_MODE 0x27
4057 /** turbo_mode parameters */
4058 typedef MLAN_PACK_START struct _turbo_mode_para
4059 {
4060     t_u16 action;
4061     t_u16 oid;
4062     t_u16 size;
4063     /** set prot mode */
4064     t_u8 mode;
4065 } MLAN_PACK_END turbo_mode_para;
4066 #endif
4067 
4068 /** max SNMP buf size */
4069 #define MAX_SNMP_BUF_SIZE 128U
4070 
4071 /**  HostCmd_CMD_802_11_SNMP_MIB */
4072 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SNMP_MIB
4073 {
4074     /** SNMP query type */
4075     t_u16 query_type;
4076     /** SNMP object ID */
4077     t_u16 oid;
4078     /** SNMP buffer size */
4079     t_u16 buf_size;
4080     /** Value */
4081     t_u8 value[1];
4082 } MLAN_PACK_END HostCmd_DS_802_11_SNMP_MIB;
4083 
4084 /** HostCmd_DS_AUTO_TX structure */
4085 typedef MLAN_PACK_START struct _HostCmd_DS_AUTO_TX
4086 {
4087     /** Action Set or get */
4088     t_u16 action;
4089     /** Tlv buffer */
4090     t_u8 tlv_buffer[0];
4091 } MLAN_PACK_END HostCmd_DS_AUTO_TX;
4092 
4093 #define OID_CLOUD_KEEP_ALIVE              0
4094 #define EVENT_CLOUD_KEEP_ALIVE_RETRY_FAIL 133
4095 /** TLV for cloud keep alive control info */
4096 #define TLV_TYPE_CLOUD_KEEP_ALIVE (PROPRIETARY_TLV_BASE_ID + 0x102) /* 0x0100 + 258 */
4097 typedef MLAN_PACK_START struct _MrvlIEtypes_Cloud_Keep_Alive_t
4098 {
4099     /** Header */
4100     MrvlIEtypesHeader_t header;
4101     /** ID for cloud keep alive */
4102     t_u8 keep_alive_id;
4103     /** Enable/disable for this ID */
4104     t_u8 enable;
4105     /** TLV buffer */
4106     t_u8 tlv[0];
4107 } MLAN_PACK_END MrvlIEtypes_Cloud_Keep_Alive_t;
4108 
4109 /** TLV for cloud keep alive control info */
4110 #define TLV_TYPE_KEEP_ALIVE_CTRL (PROPRIETARY_TLV_BASE_ID + 0x103) /* 0x0100 + 259 */
4111 typedef MLAN_PACK_START struct _MrvlIEtypes_Keep_Alive_Ctrl_t
4112 {
4113     /** Header */
4114     MrvlIEtypesHeader_t header;
4115     /** period to send keep alive packet */
4116     t_u32 snd_interval;
4117     /** period to send retry packet */
4118     t_u16 retry_interval;
4119     /** count to send retry packet */
4120     t_u16 retry_count;
4121 } MLAN_PACK_END MrvlIEtypes_Keep_Alive_Ctrl_t;
4122 
4123 /** TLV for cloud keep alive packet */
4124 #define TLV_TYPE_KEEP_ALIVE_PKT (PROPRIETARY_TLV_BASE_ID + 0x104) /* 0x0100 + 260 */
4125 typedef MLAN_PACK_START struct _MrvlIEtypes_Keep_Alive_Pkt_t
4126 {
4127     /** Header */
4128     MrvlIEtypesHeader_t header;
4129     /** Ethernet Header */
4130     Eth803Hdr_t eth_header;
4131     /** packet buffer*/
4132     t_u8 ip_packet[];
4133 } MLAN_PACK_END MrvlIEtypes_Keep_Alive_Pkt_t;
4134 
4135 #define TLV_TYPE_AUTO_TX (PROPRIETARY_TLV_BASE_ID + 0x18) // 0x0118
4136 /** AutoTx_MacFrame_t */
4137 typedef MLAN_PACK_START struct AutoTx_MacFrame
4138 {
4139     t_u16 interval;                           /**< in seconds */
4140     t_u8 priority;                            /**< User Priority: 0~7, ignored if non-WMM */
4141     t_u8 reserved;                            /**< set to 0 */
4142     t_u16 frame_len;                          /**< Length of MAC frame payload */
4143     t_u8 dest_mac_addr[MLAN_MAC_ADDR_LENGTH]; /**< Destination MAC address */
4144     t_u8 src_mac_addr[MLAN_MAC_ADDR_LENGTH];  /**< Source MAC address */
4145     t_u8 payload[];                           /**< Payload */
4146 } MLAN_PACK_END AutoTx_MacFrame_t;
4147 
4148 /** MrvlIEtypes_AutoTx_t */
4149 typedef MLAN_PACK_START struct MrvlIEtypes_AutoTx
4150 {
4151     MrvlIEtypesHeader_t header;          /**< Header */
4152     AutoTx_MacFrame_t auto_tx_mac_frame; /**< Auto Tx MAC frame */
4153 } MLAN_PACK_END MrvlIEtypes_AutoTx_t;
4154 
4155 /** HostCmd_DS_802_11_AUTO_TX */
4156 typedef MLAN_PACK_START struct MAPP_HostCmd_DS_802_11_AUTO_TX
4157 {
4158     /** Action */
4159     t_u16 action;                 /* 0 = ACT_GET; 1 = ACT_SET; */
4160     MrvlIEtypes_AutoTx_t auto_tx; /**< Auto Tx */
4161 } MLAN_PACK_END HostCmd_DS_802_11_AUTO_TX;
4162 
4163 /** MrvlIEtypes_Auto_Null_Tx_t */
4164 typedef MLAN_PACK_START struct _MrvlIEtypes_Auto_Null_Tx_t
4165 {
4166     /** Header */
4167     MrvlIEtypesHeader_t header;
4168     /** bit15:14 unit: 00-s 01-us 10-ms 11-one_shot  bit13-0: interval */
4169     t_u16 interval;
4170     /** bit7-4: bandwidth. bit3-0: priority, ignored if non-WMM */
4171     t_u8 priority;
4172     /** Packet index, set to 0 */
4173     t_u8 index;
4174     /** Set to 0 for auto null tx */
4175     t_u8 getTodToAForPkts;
4176     /** Length of MAC frame payload */
4177     t_u16 frame_len;
4178     /** Destination MAC address */
4179     t_u8 dest_mac_addr[MLAN_MAC_ADDR_LENGTH];
4180     /** Source MAC address */
4181     t_u8 src_mac_addr[MLAN_MAC_ADDR_LENGTH]; /**< Source MAC address */
4182     /** '0x00,0x00' for auto null tx */
4183     t_u16 frame_body_len;
4184 } MLAN_PACK_END MrvlIEtypes_Auto_Null_Tx_t;
4185 
4186 /** Radio on */
4187 #define RADIO_ON 0x01
4188 /** Radio off */
4189 #define RADIO_OFF 0x00
4190 
4191 /** HostCmd_CMD_802_11_RADIO_CONTROL */
4192 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_RADIO_CONTROL
4193 {
4194     /** Action */
4195     t_u16 action;
4196     /** Control */
4197     t_u16 control;
4198 } MLAN_PACK_END HostCmd_DS_802_11_RADIO_CONTROL;
4199 
4200 /** MrvlRateScope_t */
4201 typedef MLAN_PACK_START struct _MrvlRateScope_t
4202 {
4203     /** Header Type */
4204     t_u16 type;
4205     /** Header Length */
4206     t_u16 length;
4207     /** Bitmap of HR/DSSS rates */
4208     t_u16 hr_dsss_rate_bitmap;
4209     /** Bitmap of OFDM rates */
4210     t_u16 ofdm_rate_bitmap;
4211     /** Bitmap of HT-MCSs allowed for initial rate */
4212     t_u16 ht_mcs_rate_bitmap[8];
4213     /** VHT MCS rate bitmap */
4214     t_u16 vht_mcs_rate_bitmap[8];
4215 #if CONFIG_11AX
4216     /** HE MCS rate bitmap */
4217     t_u16 he_mcs_rate_bitmap[8];
4218 #endif
4219 } MLAN_PACK_END MrvlRateScope_t;
4220 
4221 /** MrvlRateDropControl_t */
4222 typedef MLAN_PACK_START struct _MrvlRateDropControl_t
4223 {
4224     /** Header Length */
4225     t_u16 length;
4226     /** Rate Information */
4227     t_u32 rate_info[1];
4228 } MLAN_PACK_END MrvlRateDropControl_t;
4229 
4230 /** MrvlRateDropPattern_t */
4231 typedef MLAN_PACK_START struct _MrvlRateDropPattern_t
4232 {
4233     /** Header Type */
4234     t_u16 type;
4235     /** Header Length */
4236     t_u16 length;
4237     /** Rate Drop Mode */
4238     t_u32 rate_drop_mode;
4239     /* MrvlRateDropControl_t RateDropControl[0]; */
4240 } MLAN_PACK_END MrvlRateDropPattern_t;
4241 
4242 /** MrvlIETypes_rate_setting_t */
4243 typedef MLAN_PACK_START struct _MrvlIETypes_rate_setting_t
4244 {
4245     /** Header */
4246     MrvlIEtypesHeader_t header;
4247     /** Rate Setting */
4248     t_u16 rate_setting;
4249 } MLAN_PACK_END MrvlIETypes_rate_setting_t;
4250 
4251 /** HostCmd_DS_TX_RATE_CFG */
4252 typedef MLAN_PACK_START struct _HostCmd_DS_TX_RATE_CFG
4253 {
4254     /** Action */
4255     t_u16 action;
4256     /** Tx Rate Configuration Index */
4257     t_u16 cfg_index;
4258     /* MrvlRateScope_t RateScope; MrvlRateDropPattern_t RateDrop; */
4259 } MLAN_PACK_END HostCmd_DS_TX_RATE_CFG;
4260 
4261 #if CONFIG_WIFI_TX_PER_TRACK
4262 #define TLV_TYPE_TX_PER_TRACK   (PROPRIETARY_TLV_BASE_ID + 338)
4263 #define EVENT_PER_STATUS_REPORT 0x94
4264 typedef MLAN_PACK_START struct _HostCmd_DS_TX_RX_PKT_STATS
4265 {
4266     /** Enable or disable */
4267     t_u8 enable;
4268     /** Action */
4269     t_u16 action;
4270 } MLAN_PACK_END HostCmd_DS_TX_RX_PKT_STATS;
4271 
4272 typedef MLAN_PACK_START struct _MrvlTxPerTrackInfo_t
4273 {
4274     /** Header Type */
4275     t_u16 type;
4276     /** Header Length */
4277     t_u16 length;
4278     /** Tx stat check period */
4279     t_u8 tx_stat_check_period;
4280     /** Tx stat check ratio */
4281     t_u8 tx_stat_check_ratio;
4282     /** Tx stat check packet number */
4283     t_u16 tx_stat_check_num;
4284 } MLAN_PACK_END MrvlTxPerTrackInfo_t;
4285 #endif
4286 
4287 #if CONFIG_TX_RX_HISTOGRAM
4288 /** TX and RX histogram statistic parameters*/
4289 typedef MLAN_PACK_START struct _HostCmd_DS_TX_RX_HISTOGRAM
4290 {
4291     /** Enable or disable get tx/rx histogram statistic */
4292     t_u8 enable;
4293     /** Choose to get TX, RX or both histogram statistic */
4294     t_u16 action;
4295 } MLAN_PACK_END HostCmd_DS_TX_RX_HISTOGRAM;
4296 #endif
4297 
4298 #if CONFIG_RX_ABORT_CFG
4299 typedef MLAN_PACK_START struct _HostCmd_DS_RX_ABORT_CFG
4300 {
4301     t_u16 action;
4302     /** Enable or disable */
4303     t_u8 enable;
4304     /** RSSI threshold */
4305     t_s8 rssi_threshold;
4306 } MLAN_PACK_END HostCmd_DS_RX_ABORT_CFG;
4307 #endif
4308 
4309 #if CONFIG_RX_ABORT_CFG_EXT
4310 typedef MLAN_PACK_START struct _HostCmd_DS_RX_ABORT_CFG_EXT
4311 {
4312     /** Action */
4313     t_u16 action;
4314     /** Enable/disable dyn rx abort on weak pkt rssi */
4315     t_u8 enable;
4316     /** specify rssi margin */
4317     t_s8 rssi_margin;
4318     /** specify ceil rssi threshold */
4319     t_s8 ceil_rssi_threshold;
4320     /** specify floor rssi threshold */
4321     t_s8 floor_rssi_threshold;
4322     /** current dynamic rssi threshold */
4323     t_s8 current_dynamic_rssi_threshold;
4324     /** rssi config: default or user configured */
4325     t_u8 rssi_default_config;
4326     /** EDMAC status */
4327     t_u8 edmac_enable;
4328 } MLAN_PACK_END HostCmd_DS_RX_ABORT_CFG_EXT;
4329 #endif
4330 
4331 #if CONFIG_CCK_DESENSE_CFG
4332 typedef MLAN_PACK_START struct _HostCmd_DS_CCK_DESENSE_CFG
4333 {
4334     /** Action */
4335     t_u16 action;
4336     /** cck desense mode: 0:disable 1:normal 2:dynamic */
4337     t_u16 mode;
4338     /** specify rssi margin */
4339     t_s8 margin;
4340     /** specify ceil rssi threshold */
4341     t_s8 ceil_thresh;
4342     /** cck desense "on" interval count */
4343     t_u8 num_on_intervals;
4344     /** cck desense "off" interval count */
4345     t_u8 num_off_intervals;
4346 } MLAN_PACK_END HostCmd_DS_CCK_DESENSE_CFG;
4347 #endif
4348 
4349 /** Power_Group_t */
4350 typedef MLAN_PACK_START struct _Power_Group_t
4351 {
4352     /** Modulation Class */
4353     t_u8 modulation_class;
4354     /** MCS Code or Legacy RateID */
4355     t_u8 first_rate_code;
4356     /** MCS Code or Legacy RateID */
4357     t_u8 last_rate_code;
4358     /** Power Adjustment Step */
4359     t_s8 power_step;
4360     /** Minimal Tx Power Level [dBm] */
4361     t_s8 power_min;
4362     /** Maximal Tx Power Level [dBm] */
4363     t_s8 power_max;
4364     /** 0: HTBW20, 1: HTBW40 */
4365     t_u8 ht_bandwidth;
4366     /** Reserved */
4367     t_u8 reserved;
4368 } MLAN_PACK_END Power_Group_t;
4369 
4370 /** MrvlTypes_Power_Group_t */
4371 typedef MLAN_PACK_START struct _MrvlTypes_Power_Group_t
4372 {
4373     /** Header Type */
4374     t_u16 type;
4375     /** Header Length */
4376     t_u16 length;
4377     /* Power_Group_t PowerGroups */
4378 } MLAN_PACK_END MrvlTypes_Power_Group_t;
4379 
4380 /** HostCmd_CMD_TXPWR_CFG */
4381 typedef MLAN_PACK_START struct _HostCmd_DS_TXPWR_CFG
4382 {
4383     /** Action */
4384     t_u16 action;
4385     /** Power group configuration index */
4386     t_u16 cfg_index;
4387     /** Power group configuration mode */
4388     t_u32 mode;
4389     /* MrvlTypes_Power_Group_t PowerGrpCfg[0] */
4390 } MLAN_PACK_END HostCmd_DS_TXPWR_CFG;
4391 
4392 /** HostCmd_CMD_802_11_RF_TX_POWER */
4393 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_RF_TX_POWER
4394 {
4395     /** Action */
4396     t_u16 action;
4397     /** Current power level */
4398     t_u16 current_level;
4399     /** Maximum power */
4400     t_u8 max_power;
4401     /** Minimum power */
4402     t_u8 min_power;
4403 } MLAN_PACK_END HostCmd_DS_802_11_RF_TX_POWER;
4404 
4405 /** Connection type infra */
4406 #define CONNECTION_TYPE_INFRA 0
4407 /** Connection type adhoc */
4408 #define CONNECTION_TYPE_ADHOC 1
4409 #ifdef WIFI_DIRECT_SUPPORT
4410 /** BSS Mode: WIFIDIRECT Client */
4411 #define BSS_MODE_WIFIDIRECT_CLIENT 0
4412 /** BSS Mode: WIFIDIRECT GO */
4413 #define BSS_MODE_WIFIDIRECT_GO 2
4414 #endif
4415 /** HostCmd_DS_SET_BSS_MODE */
4416 typedef MLAN_PACK_START struct _HostCmd_DS_SET_BSS_MODE
4417 {
4418     /** connection type */
4419     t_u8 con_type;
4420 } MLAN_PACK_END HostCmd_DS_SET_BSS_MODE;
4421 
4422 /** HostCmd_DS_REMAIN_ON_CHANNEL */
4423 typedef MLAN_PACK_START struct _HostCmd_DS_REMAIN_ON_CHANNEL
4424 {
4425     /** Action 0-GET, 1-SET, 4 CLEAR*/
4426     t_u16 action;
4427     /** Not used set to zero */
4428     t_u8 status;
4429     /** Not used set to zero */
4430     t_u8 reserved;
4431     /** Band cfg */
4432     t_u8 bandcfg;
4433     /** channel */
4434     t_u8 channel;
4435     /** remain time: Unit ms*/
4436     t_u32 remain_period;
4437 } MLAN_PACK_END HostCmd_DS_REMAIN_ON_CHANNEL;
4438 
4439 #ifdef WIFI_DIRECT_SUPPORT
4440 /** HostCmd_DS_WIFI_DIRECT_MODE */
4441 typedef MLAN_PACK_START struct _HostCmd_DS_WIFI_DIRECT_MODE
4442 {
4443     /** Action 0-GET, 1-SET*/
4444     t_u16 action;
4445     /**0:disable 1:listen 2:GO 3:p2p client 4:find 5:stop find*/
4446     t_u16 mode;
4447 } MLAN_PACK_END HostCmd_DS_WIFI_DIRECT_MODE;
4448 #endif
4449 
4450 #ifdef STA_SUPPORT
4451 
4452 /**
4453  * @brief Structure used internally in the wlan driver to configure a scan.
4454  *
4455  * Sent to the command process module to configure the firmware
4456  *   scan command prepared by wlan_cmd_802_11_scan.
4457  *
4458  * @sa wlan_scan_networks
4459  *
4460  */
4461 typedef MLAN_PACK_START struct _wlan_scan_cmd_config
4462 {
4463     /**
4464      *  BSS Type to be sent in the firmware command
4465      *
4466      *  Field can be used to restrict the types of networks returned in the
4467      *    scan.  Valid settings are:
4468      *
4469      *   - MLAN_SCAN_MODE_BSS  (infrastructure)
4470      *   - MLAN_SCAN_MODE_IBSS (adhoc)
4471      *   - MLAN_SCAN_MODE_ANY  (unrestricted, adhoc and infrastructure)
4472      */
4473     t_u8 bss_mode;
4474 
4475     /**
4476      *  Specific BSSID used to filter scan results in the firmware
4477      */
4478     t_u8 specific_bssid[MLAN_MAC_ADDR_LENGTH];
4479 
4480     /**
4481      *  Length of TLVs sent in command starting at tlvBuffer
4482      */
4483     t_u32 tlv_buf_len;
4484 
4485     /**
4486      *  SSID TLV(s) and ChanList TLVs to be sent in the firmware command
4487      *
4488      *  TLV_TYPE_CHANLIST, MrvlIEtypes_ChanListParamSet_t
4489      *  TLV_TYPE_SSID, MrvlIEtypes_SsIdParamSet_t
4490      */
4491     t_u8 tlv_buf[1]; /* SSID TLV(s) and ChanList TLVs are stored
4492                         here */
4493 } MLAN_PACK_END wlan_scan_cmd_config;
4494 
4495 /**
4496  *  Sructure to retrieve the scan table
4497  */
4498 typedef MLAN_PACK_START struct
4499 {
4500     /**
4501      *  - Zero based scan entry to start retrieval in command request
4502      *  - Number of scans entries returned in command response
4503      */
4504     t_u32 scan_number;
4505     /**
4506      * Buffer marker for multiple wlan_ioctl_get_scan_table_entry structures.
4507      *   Each struct is padded to the nearest 32 bit boundary.
4508      */
4509     t_u8 scan_table_entry_buf[1];
4510 } MLAN_PACK_END wlan_get_scan_table_info;
4511 
4512 /** Generic structure defined for parsing WPA/RSN IEs for GTK/PTK OUIs */
4513 typedef MLAN_PACK_START struct
4514 {
4515     /** Group key oui */
4516     t_u8 GrpKeyOui[4];
4517     /** Number of PTKs */
4518     t_u8 PtkCnt[2];
4519     /** Ptk body starts here */
4520     t_u8 PtkBody[4];
4521 } MLAN_PACK_END IEBody;
4522 #endif /* STA_SUPPORT */
4523 
4524 /*
4525  * This scan handle Country Information IE(802.11d compliant)
4526  * Define data structure for HostCmd_CMD_802_11_SCAN
4527  */
4528 /** HostCmd_DS_802_11_SCAN */
4529 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SCAN
4530 {
4531     /** BSS mode */
4532     t_u8 bss_mode;
4533     /** BSSID */
4534     t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
4535     /** TLV buffer */
4536     t_u8 tlv_buffer[1];
4537     /** MrvlIEtypes_SsIdParamSet_t      SsIdParamSet;
4538      *  MrvlIEtypes_ChanListParamSet_t  ChanListParamSet;
4539      *  MrvlIEtypes_RatesParamSet_t     OpRateSet;
4540      */
4541 } MLAN_PACK_END HostCmd_DS_802_11_SCAN;
4542 
4543 #if CONFIG_EXT_SCAN_SUPPORT
4544 /*
4545  * This scan handle Country Information IE(802.11d compliant)
4546  * Define data structure for HostCmd_CMD_802_11_SCAN_EXT
4547  */
4548 /** HostCmd_DS_802_11_SCAN_EXT */
4549 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SCAN_EXT
4550 {
4551     /** Reserved */
4552     t_u32 reserved;
4553     /** TLV buffer */
4554     t_u8 tlv_buffer[1];
4555     /** MrvlIEtypes_Bssid_List_t            BssIdList;
4556      *  MrvlIEtypes_SsIdParamSet_t          SSIDParamSet;
4557      *  MrvlIEtypes_ChanListParamSet_t      ChanListParamSet;
4558      *  MrvlIEtypes_RatesParamSet_t         OpRateSet;
4559      *  MrvlIEtypes_NumProbes_t             NumProbes;
4560      *  MrvlIEtypes_WildCardSsIdParamSet_t  WildCardSSIDParamSet;
4561      */
4562 } MLAN_PACK_END HostCmd_DS_802_11_SCAN_EXT;
4563 
4564 typedef MLAN_PACK_START struct _MrvlIEtypes_Bss_Scan_Rsp_t
4565 {
4566     /** Header */
4567     MrvlIEtypesHeader_t header;
4568     /** BSSID of the BSS descriptor */
4569     t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
4570     /** Beacon/Probe response buffer */
4571     t_u8 frame_body[1];
4572 } MLAN_PACK_END MrvlIEtypes_Bss_Scan_Rsp_t;
4573 
4574 typedef MLAN_PACK_START struct _MrvlIEtypes_Bss_Scan_Info_t
4575 {
4576     /** Header */
4577     MrvlIEtypesHeader_t header;
4578     /** RSSI for scan entry */
4579     t_s16 rssi;
4580     /** Channel ANPI */
4581     t_s16 anpi;
4582     /** Channel load (parts per 255) */
4583     t_u8 cca_busy_fraction;
4584     /** Band */
4585     t_u8 band;
4586     /** Channel */
4587     t_u8 channel;
4588     /** Reserved */
4589     t_u8 reserved;
4590     /** TSF data */
4591     t_u64 tsf;
4592 } MLAN_PACK_END MrvlIEtypes_Bss_Scan_Info_t;
4593 #endif /* CONFIG_EXT_SCAN_SUPPORT */
4594 
4595 /** HostCmd_DS_RX_MGMT_IND */
4596 typedef MLAN_PACK_START struct _HostCmd_DS_RX_MGMT_IND
4597 {
4598     /** Action */
4599     t_u16 action;
4600     /** Mgmt frame subtype mask */
4601     t_u32 mgmt_subtype_mask;
4602     /** Data frame subtype mask */
4603     t_u32 data_subtype_mask;
4604 } MLAN_PACK_END HostCmd_DS_RX_MGMT_IND;
4605 
4606 /** HostCmd_DS_802_11_SCAN_RSP */
4607 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SCAN_RSP
4608 {
4609     /** Size of BSS descriptor */
4610     t_u16 bss_descript_size;
4611     /** Numner of sets */
4612     t_u8 number_of_sets;
4613     /** BSS descriptor and TLV buffer */
4614     t_u8 bss_desc_and_tlv_buffer[1];
4615 } MLAN_PACK_END HostCmd_DS_802_11_SCAN_RSP;
4616 
4617 /** HostCmd_DS_802_11_BG_SCAN_CONFIG */
4618 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_BG_SCAN_CONFIG
4619 {
4620     /** action */
4621     t_u16 action;
4622     /** 0: disable, 1: enable */
4623     t_u8 enable;
4624     /** bss type */
4625     t_u8 bss_type;
4626     /** num of channel per scan */
4627     t_u8 chan_per_scan;
4628     /** reserved field */
4629     t_u8 reserved;
4630     /** reserved field */
4631     t_u16 reserved1;
4632     /** interval between consecutive scans */
4633     t_u32 scan_interval;
4634     /** reserved field */
4635     t_u32 reserved2;
4636     /** condition to trigger report to host */
4637     t_u32 report_condition;
4638     /** reserved field */
4639     t_u16 reserved3;
4640 } MLAN_PACK_END HostCmd_DS_802_11_BG_SCAN_CONFIG;
4641 
4642 /** HostCmd_DS_802_11_BG_SCAN_QUERY */
4643 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_BG_SCAN_QUERY
4644 {
4645     /** Flush */
4646     t_u8 flush;
4647 } MLAN_PACK_END HostCmd_DS_802_11_BG_SCAN_QUERY;
4648 
4649 /** HostCmd_DS_802_11_BG_SCAN_QUERY_RSP */
4650 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_BG_SCAN_QUERY_RSP
4651 {
4652     /** Report condition */
4653     t_u32 report_condition;
4654     /** Scan response */
4655     HostCmd_DS_802_11_SCAN_RSP scan_resp;
4656 } MLAN_PACK_END HostCmd_DS_802_11_BG_SCAN_QUERY_RSP;
4657 
4658 /** MrvlIEtypes_StartLater_t */
4659 typedef MLAN_PACK_START struct _MrvlIEtypes_StartLater_t
4660 {
4661     /** Header */
4662     MrvlIEtypesHeader_t header;
4663     /* 0 - BGScan start immediately, 1 - BGScan will start later after "Scan
4664        Interval" */
4665     t_u16 value;
4666 } MLAN_PACK_END MrvlIEtypes_StartLater_t;
4667 
4668 /** MrvlIEtypes_RepeatCount_t */
4669 typedef MLAN_PACK_START struct _MrvlIEtypes_RepeatCount_t
4670 {
4671     /** Header */
4672     MrvlIEtypesHeader_t header;
4673     /* Repeat count */
4674     t_u16 repeat_count;
4675 } MLAN_PACK_END MrvlIEtypes_RepeatCount_t;
4676 
4677 /** MrvlIEtypes_DomainParamSet_t */
4678 typedef MLAN_PACK_START struct _MrvlIEtypes_DomainParamSet
4679 {
4680     /** Header */
4681     MrvlIEtypesHeader_t header;
4682     /** Country code */
4683     t_u8 country_code[COUNTRY_CODE_LEN];
4684     /** Set of subbands */
4685     IEEEtypes_SubbandSet_t sub_band[1];
4686 } MLAN_PACK_END MrvlIEtypes_DomainParamSet_t;
4687 
4688 /** HostCmd_DS_802_11D_DOMAIN_INFO */
4689 typedef MLAN_PACK_START struct _HostCmd_DS_802_11D_DOMAIN_INFO
4690 {
4691     /** Action */
4692     t_u16 action;
4693     /** Domain parameter set */
4694     MrvlIEtypes_DomainParamSet_t domain;
4695 } MLAN_PACK_END HostCmd_DS_802_11D_DOMAIN_INFO;
4696 
4697 /** HostCmd_DS_802_11D_DOMAIN_INFO_RSP */
4698 typedef MLAN_PACK_START struct _HostCmd_DS_802_11D_DOMAIN_INFO_RSP
4699 {
4700     /** Action */
4701     t_u16 action;
4702     /** Domain parameter set */
4703     MrvlIEtypes_DomainParamSet_t domain;
4704 } MLAN_PACK_END HostCmd_DS_802_11D_DOMAIN_INFO_RSP;
4705 
4706 /** HostCmd_DS_11N_ADDBA_REQ */
4707 typedef MLAN_PACK_START struct _HostCmd_DS_11N_ADDBA_REQ
4708 {
4709     /** Result of the ADDBA Request Operation */
4710     t_u8 add_req_result;
4711     /** Peer MAC address */
4712     t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH];
4713     /** Dialog Token */
4714     t_u8 dialog_token;
4715     /** Block Ack Parameter Set */
4716     t_u16 block_ack_param_set;
4717     /** Block Act Timeout Value */
4718     t_u16 block_ack_tmo;
4719     /** Starting Sequence Number */
4720     t_u16 ssn;
4721 } MLAN_PACK_END HostCmd_DS_11N_ADDBA_REQ;
4722 
4723 /** HostCmd_DS_11N_ADDBA_RSP */
4724 typedef MLAN_PACK_START struct _HostCmd_DS_11N_ADDBA_RSP
4725 {
4726     /** Result of the ADDBA Response Operation */
4727     t_u8 add_rsp_result;
4728     /** Peer MAC address */
4729     t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH];
4730     /** Dialog Token */
4731     t_u8 dialog_token;
4732     /** Status Code */
4733     t_u16 status_code;
4734     /** Block Ack Parameter Set */
4735     t_u16 block_ack_param_set;
4736     /** Block Act Timeout Value */
4737     t_u16 block_ack_tmo;
4738     /** Starting Sequence Number */
4739     t_u16 ssn;
4740 } MLAN_PACK_END HostCmd_DS_11N_ADDBA_RSP;
4741 
4742 /** HostCmd_DS_11N_DELBA */
4743 typedef MLAN_PACK_START struct _HostCmd_DS_11N_DELBA
4744 {
4745     /** Result of the ADDBA Request Operation */
4746     t_u8 del_result;
4747     /** Peer MAC address */
4748     t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH];
4749     /** Delete Block Ack Parameter Set */
4750     t_u16 del_ba_param_set;
4751     /** Reason Code sent for DELBA */
4752     t_u16 reason_code;
4753     /** Reserved */
4754     t_u8 reserved;
4755 } MLAN_PACK_END HostCmd_DS_11N_DELBA;
4756 
4757 /** HostCmd_DS_11N_BATIMEOUT */
4758 typedef MLAN_PACK_START struct _HostCmd_DS_11N_BATIMEOUT
4759 {
4760     /** TID */
4761     t_u8 tid;
4762     /** Peer MAC address */
4763     t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH];
4764     /** Delete Block Ack Parameter Set */
4765     t_u8 origninator;
4766 } MLAN_PACK_END HostCmd_DS_11N_BATIMEOUT;
4767 
4768 /** HostCmd_DS_11N_CFG */
4769 typedef MLAN_PACK_START struct _HostCmd_DS_11N_CFG
4770 {
4771     /** Action */
4772     t_u16 action;
4773     /** HTTxCap */
4774     t_u16 ht_tx_cap;
4775     /** HTTxInfo */
4776     t_u16 ht_tx_info;
4777     /** Misc configuration */
4778     t_u16 misc_config;
4779 } MLAN_PACK_END HostCmd_DS_11N_CFG;
4780 
4781 #define VHT_MCS_SET_LEN 8
4782 
4783 /** HostCmd_DS_11AC_CFG */
4784 typedef MLAN_PACK_START struct _HostCmd_DS_11AC_CFG
4785 {
4786     /** Action */
4787     t_u16 action;
4788     /** BandConfig */
4789     t_u8 band_config;
4790     /** Misc Configuration */
4791     t_u8 misc_config;
4792     /** VHT Capability Info */
4793     t_u32 vht_cap_info;
4794     /** VHT Support MCS Set */
4795     t_u8 vht_supp_mcs_set[VHT_MCS_SET_LEN];
4796 } MLAN_PACK_END HostCmd_DS_11AC_CFG;
4797 
4798 #if CONFIG_11AX
4799 /** HostCmd_DS_11AX_CFG */
4800 typedef MLAN_PACK_START struct _HostCmd_DS_11AX_CFG
4801 {
4802     /** Action */
4803     t_u16 action;
4804     /** BandConfig */
4805     t_u8 band_config;
4806     /** TLV for HE capability or HE operation */
4807     t_u8 val[];
4808 } MLAN_PACK_END HostCmd_DS_11AX_CFG;
4809 
4810 /** HostCmd_DS_11AX_CMD_CFG */
4811 typedef MLAN_PACK_START struct _HostCmd_DS_11AX_CMD_CFG
4812 {
4813     /** Action */
4814     t_u16 action;
4815     /** CMD_SUBID */
4816     t_u16 sub_id;
4817     /** TLV or value for cmd */
4818     t_u8 val[];
4819 } MLAN_PACK_END HostCmd_DS_11AX_CMD_CFG;
4820 
4821 #if CONFIG_11AX_TWT
4822 /** Type definition of hostcmd_twt_setup */
4823 typedef MLAN_PACK_START struct _hostcmd_twt_setup
4824 {
4825     /** Implicit, 0: TWT session is explicit, 1: Session is implicit */
4826     t_u8 implicit;
4827     /** Announced, 0: Unannounced, 1: Announced TWT */
4828     t_u8 announced;
4829     /** Trigger Enabled, 0: Non-Trigger enabled, 1: Trigger enabled TWT */
4830     t_u8 trigger_enabled;
4831     /** TWT Information Disabled, 0: TWT info enabled, 1: TWT info disabled */
4832     t_u8 twt_info_disabled;
4833     /** Negotiation Type, 0: Future Individual TWT SP start time, 1: Next
4834      * Wake TBTT time */
4835     t_u8 negotiation_type;
4836     /** TWT Wakeup Duration, time after which the TWT requesting STA can
4837      * transition to doze state */
4838     t_u8 twt_wakeup_duration;
4839     /** Flow Identifier. Range: [0-7]*/
4840     t_u8 flow_identifier;
4841     /** Hard Constraint, 0: FW can tweak the TWT setup parameters if it is
4842      *rejected by AP.
4843      ** 1: Firmware should not tweak any parameters. */
4844     t_u8 hard_constraint;
4845     /** TWT Exponent, Range: [0-63] */
4846     t_u8 twt_exponent;
4847     /** TWT Mantissa Range: [0-sizeof(UINT16)] */
4848     t_u16 twt_mantissa;
4849     /** TWT Request Type, 0: REQUEST_TWT, 1: SUGGEST_TWT*/
4850     t_u8 twt_request;
4851     /** TWT Setup State. Set to 0 by driver, filled by FW in response*/
4852     t_u8 twt_setup_state;
4853     /** TWT link lost timeout threshold */
4854     t_u16 bcnMiss_threshold;
4855 } MLAN_PACK_END hostcmd_twt_setup, *phostcmd_twt_setup;
4856 
4857 /** Type definition of hostcmd_twt_teardown */
4858 typedef MLAN_PACK_START struct _hostcmd_twt_teardown
4859 {
4860     /** TWT Flow Identifier. Range: [0-7] */
4861     t_u8 flow_identifier;
4862     /** Negotiation Type. 0: Future Individual TWT SP start time, 1: Next
4863      * Wake TBTT time */
4864     t_u8 negotiation_type;
4865     /** Tear down all TWT. 1: To teardown all TWT, 0 otherwise */
4866     t_u8 teardown_all_twt;
4867     /** TWT Teardown State. Set to 0 by driver, filled by FW in response */
4868     t_u8 twt_teardown_state;
4869     /** Reserved, set to 0. */
4870     t_u8 reserved[3];
4871 } MLAN_PACK_END hostcmd_twt_teardown, *phostcmd_twt_teardown;
4872 
4873 /** Type definition of hostcmd_twt_report */
4874 typedef MLAN_PACK_START struct _hostcmd_twt_report
4875 {
4876     /** TWT report type, 0: BTWT id */
4877     t_u8 type;
4878     /** TWT report length of value in data */
4879     t_u8 length;
4880     t_u8 reserve[2];
4881     /** TWT report payload for FW response to fill */
4882     t_u8 data[36];
4883 } MLAN_PACK_END hostcmd_twt_report, *phostcmd_twt_report;
4884 /** Type definition of hostcmd_twt_information */
4885 typedef MLAN_PACK_START struct _hostcmd_twt_information
4886 {
4887     /** TWT Flow Identifier. Range: [0-7] */
4888     t_u8 flow_identifier;
4889     /** TWT operation suspend duration in milli seconds. */
4890     t_u32 suspend_duration;
4891     /** TWT information state from FW. */
4892     t_u8 information_state;
4893 } MLAN_PACK_END hostcmd_twt_information, *phostcmd_twt_information;
4894 /** HostCmd_DS_TWT_CFG */
4895 typedef MLAN_PACK_START struct _HostCmd_DS_TWT_CFG
4896 {
4897     /** Action */
4898     t_u16 action;
4899     /** CMD_SUBID */
4900     t_u16 sub_id;
4901     /** TWT Setup/Teardown configuration parameters */
4902     union
4903     {
4904         /** TWT Setup config for Sub ID: MLAN_11AX_TWT_SETUP_SUBID */
4905         hostcmd_twt_setup twt_setup;
4906         /** TWT Teardown config for Sub ID: MLAN_11AX_TWT_TEARDOWN_SUBID */
4907         hostcmd_twt_teardown twt_teardown;
4908         /** TWT report for Sub ID: MLAN_11AX_TWT_REPORT_SUBID */
4909         hostcmd_twt_report twt_report;
4910         /** TWT report for Sub ID: MLAN_11AX_TWT_INFORMATION_SUBID */
4911         hostcmd_twt_information twt_information;
4912     } param;
4913 } MLAN_PACK_END HostCmd_DS_TWT_CFG;
4914 #endif /* CONFIG_11AX_TWT */
4915 
4916 #if CONFIG_MMSF
4917 /** Type definition of hostcmd_mmsf_cfg*/
4918 typedef MLAN_PACK_START struct _HostCmd_DS_MMSF_CFG
4919 {
4920     /** 1 - set; 0 - get*/
4921     t_u16 action;
4922     /** sub-command id*/
4923     t_u16 sub_id;
4924     /** 1 - enable MMSF; 0 - disable MMSF */
4925     t_u8 enableMMSF;
4926     /** Density value */
4927     t_u8 ampduDensity;
4928     /** MMSF value */
4929     t_u8 ampduMMSF;
4930 } MLAN_PACK_END HostCmd_DS_MMSF_CFG;
4931 #endif
4932 #endif
4933 
4934 #if CONFIG_WIFI_RECOVERY
4935 /** Type definition of HostCmd_DS_TMRC_CFG*/
4936 typedef MLAN_PACK_START struct _HostCmd_DS_TMRC_CFG
4937 {
4938     /** 1 - set; 0 - get*/
4939     t_u16 action;
4940     /** sub-command id*/
4941     t_u16 sub_id;
4942 } MLAN_PACK_END HostCmd_DS_TMRC_CFG;
4943 #endif
4944 
4945 #if CONFIG_WIFI_CLOCKSYNC
4946 /** MrvlIEtypes_GPIO_TSF_LATCH_CONFIG*/
4947 typedef MLAN_PACK_START struct _MrvlIEtypes_GPIO_TSF_LATCH_CONFIG
4948 {
4949     /** Header */
4950     MrvlIEtypesHeader_t header;
4951     /**clock sync Mode */
4952     t_u8 clock_sync_mode;
4953     /**clock sync Role */
4954     t_u8 clock_sync_Role;
4955     /**clock sync GPIO Pin Number */
4956     t_u8 clock_sync_gpio_pin_number;
4957     /**clock sync GPIO Level or Toggle */
4958     t_u8 clock_sync_gpio_level_toggle;
4959     /**clock sync GPIO Pulse Width */
4960     t_u16 clock_sync_gpio_pulse_width;
4961 } MLAN_PACK_END MrvlIEtypes_GPIO_TSF_LATCH_CONFIG;
4962 
4963 /** MrvlIEtypes_GPIO_TSF_LATCH_REPORT */
4964 typedef MLAN_PACK_START struct _MrvlIEtypes_GPIO_TSF_LATCH_REPORT
4965 {
4966     /** Header */
4967     MrvlIEtypesHeader_t header;
4968     /**get tsf info format */
4969     t_u16 tsf_format;
4970     /**tsf info */
4971     t_u16 tsf_info;
4972     /**tsf */
4973     t_u64 tsf;
4974     /**Positive or negative offset in microsecond from Beacon TSF to GPIO toggle TSF  */
4975     t_s32 tsf_offset;
4976 } MLAN_PACK_END MrvlIEtypes_GPIO_TSF_LATCH_REPORT;
4977 
4978 /** HostCmd_DS_GPIO_TSF_LATCH_PARAM_CONFIG */
4979 typedef MLAN_PACK_START struct _HostCmd_DS_GPIO_TSF_LATCH_PARAM_CONFIG
4980 {
4981     /** Action 0-GET, 1-SET */
4982     t_u16 action;
4983     /** MrvlIEtypes_GPIO_TSF_LATCH_CONFIG
4984      *  MrvlIEtypes_GPIO_TSF_LATCH_REPORT
4985      */
4986     t_u8 tlv_buf[];
4987 } MLAN_PACK_END HostCmd_DS_GPIO_TSF_LATCH_PARAM_CONFIG;
4988 #endif /* CONFIG_WIFI_CLOCKSYNC */
4989 
4990 /** HostCmd_DS_TXBUF_CFG*/
4991 typedef MLAN_PACK_START struct _HostCmd_DS_TXBUF_CFG
4992 {
4993     /** Action */
4994     t_u16 action;
4995     /** Buffer Size */
4996     t_u16 buff_size;
4997     /** End Port_for Multiport */
4998     t_u16 mp_end_port;
4999     /** Reserved */
5000     t_u16 reserved3;
5001 } MLAN_PACK_END HostCmd_DS_TXBUF_CFG;
5002 
5003 /** HostCmd_DS_AMSDU_AGGR_CTRL */
5004 typedef MLAN_PACK_START struct _HostCmd_DS_AMSDU_AGGR_CTRL
5005 {
5006     /** Action */
5007     t_u16 action;
5008     /** Enable */
5009     t_u16 enable;
5010     /** Get the current Buffer Size valid */
5011     t_u16 curr_buf_size;
5012 } MLAN_PACK_END HostCmd_DS_AMSDU_AGGR_CTRL;
5013 
5014 /** HostCmd_DS_ECL_SYSTEM_CLOCK_CONFIG */
5015 typedef MLAN_PACK_START struct _HostCmd_DS_ECL_SYSTEM_CLOCK_CONFIG
5016 {
5017     /** Action */
5018     t_u16 action;
5019     /** Current system clock */
5020     t_u16 cur_sys_clk;
5021     /** Clock type */
5022     t_u16 sys_clk_type;
5023     /** Length of clocks */
5024     t_u16 sys_clk_len;
5025     /** System clocks */
5026     t_u16 sys_clk[16];
5027 } MLAN_PACK_END HostCmd_DS_ECL_SYSTEM_CLOCK_CONFIG;
5028 
5029 /** MrvlIEtypes_WmmParamSet_t */
5030 typedef MLAN_PACK_START struct _MrvlIEtypes_WmmParamSet_t
5031 {
5032     /** Header */
5033     MrvlIEtypesHeader_t header;
5034     /** WMM IE */
5035     t_u8 wmm_ie[1];
5036 } MLAN_PACK_END MrvlIEtypes_WmmParamSet_t;
5037 
5038 /** MrvlIEtypes_WmmQueueStatus_t */
5039 typedef MLAN_PACK_START struct
5040 {
5041     /** Header */
5042     MrvlIEtypesHeader_t header;
5043     /** Queue index */
5044     t_u8 queue_index;
5045     /** Disabled flag */
5046     t_u8 disabled;
5047     /** Medium time allocation in 32us units*/
5048     t_u16 medium_time;
5049     /** Flow required flag */
5050     t_u8 flow_required;
5051     /** Flow created flag */
5052     t_u8 flow_created;
5053     /** Reserved */
5054     t_u32 reserved;
5055 } MLAN_PACK_END MrvlIEtypes_WmmQueueStatus_t;
5056 
5057 /** Size of a TSPEC.  Used to allocate necessary buffer space in commands */
5058 #define WMM_TSPEC_SIZE 63
5059 
5060 /** Maximum number of AC QOS queues available in the driver/firmware */
5061 #define MAX_AC_QUEUES 4
5062 
5063 /** Extra IE bytes allocated in messages for appended IEs after a TSPEC */
5064 #define WMM_ADDTS_EXTRA_IE_BYTES 256
5065 
5066 /** Extra TLV bytes allocated in messages for configuring WMM Queues */
5067 #define WMM_QUEUE_CONFIG_EXTRA_TLV_BYTES 64
5068 
5069 /** Number of bins in the histogram for the HostCmd_DS_WMM_QUEUE_STATS */
5070 #define WMM_STATS_PKTS_HIST_BINS 7
5071 
5072 /**
5073  *  @brief Firmware command structure to retrieve the firmware WMM status.
5074  *
5075  *  Used to retrieve the status of each WMM AC Queue in TLV
5076  *    format (MrvlIEtypes_WmmQueueStatus_t) as well as the current WMM
5077  *    parameter IE advertised by the AP.
5078  *
5079  *  Used in response to a EVENT_WMM_STATUS_CHANGE event signaling
5080  *    a QOS change on one of the ACs or a change in the WMM Parameter in
5081  *    the Beacon.
5082  *
5083  *  TLV based command, byte arrays used for max sizing purpose. There are no
5084  *    arguments sent in the command, the TLVs are returned by the firmware.
5085  */
5086 typedef MLAN_PACK_START struct
5087 {
5088     /** Queue status TLV */
5089     t_u8 queue_status_tlv[sizeof(MrvlIEtypes_WmmQueueStatus_t) * MAX_AC_QUEUES];
5090     /** WMM parameter TLV */
5091     t_u8 wmm_param_tlv[sizeof(IEEEtypes_WmmParameter_t) + 2];
5092 } MLAN_PACK_END HostCmd_DS_WMM_GET_STATUS;
5093 
5094 /**
5095  *  @brief Command structure for the HostCmd_CMD_WMM_ADDTS_REQ firmware command
5096  */
5097 typedef MLAN_PACK_START struct
5098 {
5099     mlan_cmd_result_e command_result;                  /**< Command result */
5100     t_u32 timeout_ms;                                  /**< Timeout value in milliseconds */
5101     t_u8 dialog_token;                                 /**< Dialog token */
5102     t_u8 ieee_status_code;                             /**< IEEE status code */
5103     t_u8 tspec_data[WMM_TSPEC_SIZE];                   /**< TSPEC data */
5104     t_u8 addts_extra_ie_buf[WMM_ADDTS_EXTRA_IE_BYTES]; /**< Extra IE buffer */
5105 } MLAN_PACK_END HostCmd_DS_WMM_ADDTS_REQ;
5106 
5107 /**
5108  *  @brief Command structure for the HostCmd_CMD_WMM_DELTS_REQ firmware command
5109  */
5110 typedef MLAN_PACK_START struct
5111 {
5112     mlan_cmd_result_e command_result; /**< Command result */
5113     t_u8 dialog_token;                /**< Dialog token */
5114     t_u8 ieee_reason_code;            /**< IEEE reason code */
5115     t_u8 tspec_data[WMM_TSPEC_SIZE];  /**< TSPEC data */
5116 } MLAN_PACK_END HostCmd_DS_WMM_DELTS_REQ;
5117 
5118 /**
5119  *  @brief Command structure for the HostCmd_CMD_WMM_QUEUE_CONFIG firmware cmd
5120  *
5121  *  Set/Get/Default the Queue parameters for a specific AC in the firmware.
5122  */
5123 typedef MLAN_PACK_START struct
5124 {
5125     mlan_wmm_queue_config_action_e action; /**< Set, Get, or Default */
5126     mlan_wmm_ac_e access_category;         /**< WMM_AC_BK(0) to WMM_AC_VO(3) */
5127     /** @brief MSDU lifetime expiry per 802.11e
5128      *
5129      *   - Ignored if 0 on a set command
5130      *   - Set to the 802.11e specified 500 TUs when defaulted
5131      */
5132     t_u16 msdu_lifetime_expiry;
5133     t_u8 tlv_buffer[WMM_QUEUE_CONFIG_EXTRA_TLV_BYTES]; /**< Not supported */
5134 } MLAN_PACK_END HostCmd_DS_WMM_QUEUE_CONFIG;
5135 
5136 /**
5137  *  @brief Command structure for the HostCmd_CMD_WMM_QUEUE_STATS firmware cmd
5138  *
5139  *  Turn statistical collection on/off for a given AC or retrieve the
5140  *    accumulated stats for an AC and clear them in the firmware.
5141  */
5142 typedef MLAN_PACK_START struct
5143 {
5144     mlan_wmm_queue_stats_action_e action; /**< Start, Stop, or Get */
5145 #ifdef BIG_ENDIAN_SUPPORT
5146     t_u8 select_bin : 7;                  /**< WMM_AC_BK(0) to WMM_AC_VO(3), or TID */
5147     t_u8 select_is_userpri : 1;           /**< Set if select_bin is UP, Clear for AC */
5148 #else
5149     t_u8 select_is_userpri : 1; /**< Set if select_bin is UP, Clear for AC */
5150     t_u8 select_bin : 7;        /**< WMM_AC_BK(0) to WMM_AC_VO(3), or TID */
5151 #endif
5152     t_u16 pkt_count;       /**< Number of successful packets transmitted */
5153     t_u16 pkt_loss;        /**< Packets lost; not included in pktCount */
5154     t_u32 avg_queue_delay; /**< Average Queue delay in microsec */
5155     t_u32 avg_tx_delay;    /**< Average Transmission delay in microsec */
5156     t_u16 used_time;       /**< Calc used time - units of 32 microsec */
5157     t_u16 policed_time;    /**< Calc policed time - units of 32 microsec */
5158     /** @brief Queue Delay Histogram; number of packets per queue delay range
5159      *
5160      *  [0] -  0ms <= delay < 5ms
5161      *  [1] -  5ms <= delay < 10ms
5162      *  [2] - 10ms <= delay < 20ms
5163      *  [3] - 20ms <= delay < 30ms
5164      *  [4] - 30ms <= delay < 40ms
5165      *  [5] - 40ms <= delay < 50ms
5166      *  [6] - 50ms <= delay < msduLifetime (TUs)
5167      */
5168     t_u16 delay_histogram[WMM_STATS_PKTS_HIST_BINS];
5169     /** Reserved */
5170     t_u16 reserved_1;
5171 } MLAN_PACK_END HostCmd_DS_WMM_QUEUE_STATS;
5172 
5173 /**
5174  *  @brief Command structure for the HostCmd_CMD_WMM_TS_STATUS firmware cmd
5175  *
5176  *  Query the firmware to get the status of the WMM Traffic Streams
5177  */
5178 typedef MLAN_PACK_START struct
5179 {
5180     /** TSID: Range: 0->7 */
5181     t_u8 tid;
5182     /** TSID specified is valid */
5183     t_u8 valid;
5184     /** AC TSID is active on */
5185     t_u8 access_category;
5186     /** UP specified for the TSID */
5187     t_u8 user_priority;
5188     /** Power save mode for TSID: 0 (legacy), 1 (UAPSD) */
5189     t_u8 psb;
5190     /** Uplink(1), Downlink(2), Bidirectional(3) */
5191     t_u8 flow_dir;
5192     /** Medium time granted for the TSID */
5193     t_u16 medium_time;
5194 } MLAN_PACK_END HostCmd_DS_WMM_TS_STATUS;
5195 
5196 /** Firmware status for a specific AC */
5197 typedef MLAN_PACK_START struct
5198 {
5199     /** Disabled flag */
5200     t_u8 disabled;
5201     /** Flow required flag */
5202     t_u8 flow_required;
5203     /** Flow created flag */
5204     t_u8 flow_created;
5205 } MLAN_PACK_END WmmAcStatus_t;
5206 
5207 /**  Local Power Capability */
5208 typedef MLAN_PACK_START struct _MrvlIEtypes_PowerCapability_t
5209 {
5210     /** Header */
5211     MrvlIEtypesHeader_t header;
5212     /** Minmum power */
5213     t_s8 min_power;
5214     /** Maximum power */
5215     t_s8 max_power;
5216 } MLAN_PACK_END MrvlIEtypes_PowerCapability_t;
5217 
5218 /** HT Capabilities element */
5219 typedef MLAN_PACK_START struct _MrvlIETypes_HTCap_t
5220 {
5221     /** Header */
5222     MrvlIEtypesHeader_t header;
5223 
5224     /** HTCap struct */
5225     HTCap_t ht_cap;
5226 } MLAN_PACK_END MrvlIETypes_HTCap_t;
5227 
5228 /** HT Information element */
5229 typedef MLAN_PACK_START struct _MrvlIETypes_HTInfo_t
5230 {
5231     /** Header */
5232     MrvlIEtypesHeader_t header;
5233 
5234     /** HTInfo struct */
5235     HTInfo_t ht_info;
5236 } MLAN_PACK_END MrvlIETypes_HTInfo_t;
5237 
5238 /** 20/40 BSS Coexistence element */
5239 typedef MLAN_PACK_START struct _MrvlIETypes_2040BSSCo_t
5240 {
5241     /** Header */
5242     MrvlIEtypesHeader_t header;
5243 
5244     /** BSSCo2040_t struct */
5245     BSSCo2040_t bss_co_2040;
5246 } MLAN_PACK_END MrvlIETypes_2040BSSCo_t;
5247 
5248 /** Extended Capabilities element */
5249 typedef MLAN_PACK_START struct _MrvlIETypes_ExtCap_t
5250 {
5251     /** Header */
5252     MrvlIEtypesHeader_t header;
5253 
5254     /** ExtCap_t struct */
5255     ExtCap_t ext_cap;
5256 } MLAN_PACK_END MrvlIETypes_ExtCap_t;
5257 
5258 /** Overlapping BSS Scan Parameters element */
5259 typedef MLAN_PACK_START struct _MrvlIETypes_OverlapBSSScanParam_t
5260 {
5261     /** Header */
5262     MrvlIEtypesHeader_t header;
5263 
5264     /** OBSSScanParam_t struct */
5265     OBSSScanParam_t obss_scan_param;
5266 } MLAN_PACK_END MrvlIETypes_OverlapBSSScanParam_t;
5267 
5268 /** Set of MCS values that STA desires to use within the BSS */
5269 typedef MLAN_PACK_START struct _MrvlIETypes_HTOperationalMCSSet_t
5270 {
5271     /** Header */
5272     MrvlIEtypesHeader_t header;
5273 
5274     /** Bitmap indicating MCSs that STA desires to use within the BSS */
5275     t_u8 ht_operational_mcs_bitmap[16];
5276 } MLAN_PACK_END MrvlIETypes_HTOperationalMCSSet_t;
5277 
5278 /** VHT Capabilities element */
5279 typedef MLAN_PACK_START struct _MrvlIETypes_VHTCap_t
5280 {
5281     /** Header */
5282     MrvlIEtypesHeader_t header;
5283 
5284     /** VHTCap struct */
5285     VHT_capa_t vht_cap;
5286 } MLAN_PACK_END MrvlIETypes_VHTCap_t;
5287 
5288 /** VHT Operations IE */
5289 typedef MLAN_PACK_START struct _MrvlIETypes_VHTOprat_t
5290 {
5291     /** Header */
5292     MrvlIEtypesHeader_t header;
5293 
5294     /** Channel width */
5295     t_u8 chan_width;
5296     /** Channel center frequency 1 */
5297     t_u8 chan_center_freq_1;
5298     /** Channel center frequency 2 */
5299     t_u8 chan_center_freq_2;
5300     /** Basic MCS set map, each 2 bits stands for a Nss */
5301     t_u16 basic_MCS_map;
5302 } MLAN_PACK_END MrvlIETypes_VHTOprat_t;
5303 
5304 /** VHT Transmit Power Envelope IE */
5305 typedef MLAN_PACK_START struct _MrvlIETypes_VHTtxpower_t
5306 {
5307     /** Header */
5308     MrvlIEtypesHeader_t header;
5309 
5310     /** Maximum tx power */
5311     t_u8 max_tx_power;
5312     /** Channel center frequency */
5313     t_u8 chan_center_freq;
5314     /** Channel width */
5315     t_u8 chan_width;
5316 } MLAN_PACK_END MrvlIETypes_VHTtxpower_t;
5317 
5318 /** Extended Power Constraint IE */
5319 typedef MLAN_PACK_START struct _MrvlIETypes_ExtPwerCons_t
5320 {
5321     /** Header */
5322     MrvlIEtypesHeader_t header;
5323 
5324     /** channel width */
5325     t_u8 chan_width;
5326     /** local power constraint */
5327     t_u8 local_power_cons;
5328 } MLAN_PACK_END MrvlIETypes_ExtPwerCons_t;
5329 
5330 /** Extended BSS Load IE */
5331 typedef MLAN_PACK_START struct _MrvlIETypes_ExtBSSload_t
5332 {
5333     /** Header */
5334     MrvlIEtypesHeader_t header;
5335 
5336     /** MIMO Capability count */
5337     t_u8 MU_MIMO_capa_count;
5338     /** Stream under utilization */
5339     t_u8 stream_underutilization;
5340     /** VHT40 util */
5341     t_u8 VHT40_util;
5342     /** VHT80 util */
5343     t_u8 VHT80_util;
5344     /** VHT160 util */
5345     t_u8 VHT160_util;
5346 } MLAN_PACK_END MrvlIETypes_ExtBSSload_t;
5347 
5348 /** Quiet Channel IE */
5349 typedef MLAN_PACK_START struct _MrvlIETypes_QuietChan_t
5350 {
5351     /** Header */
5352     MrvlIEtypesHeader_t header;
5353 
5354     /** AP quiet mode */
5355     t_u8 AP_quiet_mode;
5356     /** Quiet count */
5357     t_u8 quiet_count;
5358     /** Quiet period */
5359     t_u8 quiet_period;
5360     /** Quiet duration */
5361     t_u16 quiet_dur;
5362     /** Quiet offset */
5363     t_u16 quiet_offset;
5364 } MLAN_PACK_END MrvlIETypes_QuietChan_t;
5365 
5366 /** Wide Bandwidth Channel Switch IE */
5367 typedef MLAN_PACK_START struct _MrvlIETypes_BWSwitch_t
5368 {
5369     /** Header */
5370     MrvlIEtypesHeader_t header;
5371 
5372     /** New Channel width */
5373     t_u8 new_chan_width;
5374     /** New Channel center frequency 1 */
5375     t_u8 new_chan_center_freq_1;
5376     /** New channel center frequency 2 */
5377     t_u8 new_chan_center_freq_2;
5378 } MLAN_PACK_END MrvlIETypes_BWSwitch_t;
5379 
5380 /** AID IE */
5381 typedef MLAN_PACK_START struct _MrvlIETypes_AID_t
5382 {
5383     /** Header */
5384     MrvlIEtypesHeader_t header;
5385 
5386     /** AID number */
5387     t_u16 AID;
5388 } MLAN_PACK_END MrvlIETypes_AID_t;
5389 
5390 /** Operating Mode Notification IE */
5391 typedef MLAN_PACK_START struct _MrvlIETypes_OperModeNtf_t
5392 {
5393     /** Header */
5394     MrvlIEtypesHeader_t header;
5395 
5396     /** operating mdoe */
5397     t_u8 oper_mode;
5398 } MLAN_PACK_END MrvlIETypes_OperModeNtf_t;
5399 
5400 #ifdef WIFI_DIRECT_SUPPORT
5401 /** MrvlIEtypes_psk_t */
5402 typedef MLAN_PACK_START struct _MrvlIEtypes_psk_t
5403 {
5404     /** Header */
5405     MrvlIEtypesHeader_t header;
5406     /** PSK */
5407     t_u8 psk[MLAN_MAX_KEY_LENGTH];
5408 } MLAN_PACK_END MrvlIEtypes_psk_t;
5409 #endif /* WIFI_DIRECT_SUPPORT */
5410 
5411 /** MrvlIEtypes_PMK_t */
5412 typedef MLAN_PACK_START struct _MrvlIEtypes_PMK_t
5413 {
5414     /** Header */
5415     MrvlIEtypesHeader_t header;
5416     /** PMK */
5417     t_u8 pmk[1];
5418 } MLAN_PACK_END MrvlIEtypes_PMK_t;
5419 
5420 /** MrvlIEtypes_Passphrase_t */
5421 typedef MLAN_PACK_START struct _MrvlIEtypes_Passphrase_t
5422 {
5423     /** Header */
5424     MrvlIEtypesHeader_t header;
5425     /** Passphrase */
5426     char passphrase[1];
5427 } MLAN_PACK_END MrvlIEtypes_Passphrase_t;
5428 
5429 /** MrvlIEtypes_Passphrase_t */
5430 typedef MLAN_PACK_START struct _MrvlIEtypes_Password_t
5431 {
5432     /** Header */
5433     MrvlIEtypesHeader_t header;
5434     /** Passphrase */
5435     char password[1];
5436 } MLAN_PACK_END MrvlIEtypes_Password_t;
5437 
5438 /** MrvlIEtypes_SAE_PWE_Mode_t */
5439 typedef MLAN_PACK_START struct _MrvlIEtypes_SAE_PWE_Mode_t
5440 {
5441     /** Header */
5442     MrvlIEtypesHeader_t header;
5443     /** WPA3 SAE mechanism for PWE derivation */
5444     char pwe[1];
5445 } MLAN_PACK_END MrvlIEtypes_SAE_PWE_Mode_t;
5446 
5447 /** SAE H2E capability bit in RSNX */
5448 #define SAE_H2E_BIT 5
5449 
5450 /* unicastCipher -
5451  *      Bit 0   : RFU
5452  *      Bit 1   : RFU
5453  *      Bit 2   : TKIP
5454  *      Bit 3   : AES CCKM
5455  *      Bit 2-7 : RFU
5456  * multicastCipher -
5457  *      Bit 0   : WEP40
5458  *      Bit 1   : WEP104
5459  *      Bit 2   : TKIP
5460  *      Bit 3   : AES
5461  *      Bit 4-7 : Reserved for now
5462  */
5463 /** MrvlIEtypes_Cipher_t */
5464 typedef MLAN_PACK_START struct _MrvlIEtypes_Cipher_t
5465 {
5466     /** Header */
5467     MrvlIEtypesHeader_t header;
5468     /** PairCipher */
5469     t_u8 pair_cipher;
5470     /** GroupCipher */
5471     t_u8 group_cipher;
5472 } MLAN_PACK_END MrvlIEtypes_Cipher_t;
5473 
5474 /* rsnMode -
5475  *      Bit 0    : No RSN
5476  *      Bit 1-2  : RFU
5477  *      Bit 3    : WPA
5478  *      Bit 4    : WPA-NONE
5479  *      Bit 5    : WPA2
5480  *      Bit 6    : AES CCKM
5481  *      Bit 7-15 : RFU
5482  */
5483 /** MrvlIEtypes_EncrProto_t */
5484 typedef MLAN_PACK_START struct _MrvlIEtypes_EncrProto_t
5485 {
5486     /** Header */
5487     MrvlIEtypesHeader_t header;
5488     /** EncrProto */
5489     t_u16 rsn_mode;
5490 } MLAN_PACK_END MrvlIEtypes_EncrProto_t;
5491 
5492 /** MrvlIEtypes_Bssid_t */
5493 typedef MLAN_PACK_START struct _MrvlIEtypes_Bssid_t
5494 {
5495     /** Header */
5496     MrvlIEtypesHeader_t header;
5497     /** Bssid */
5498     t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
5499 } MLAN_PACK_END MrvlIEtypes_Bssid_t;
5500 
5501 /*
5502  * This struct will handle GET,SET,CLEAR function for embedded
5503  * supplicant.
5504  * Define data structure for HostCmd_CMD_802_11_SUPPLICANT_PMK
5505  */
5506 /** HostCmd_DS_802_11_SUPPLICANT_PMK */
5507 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SUPPLICANT_PMK
5508 {
5509     /** CMD Action GET/SET/CLEAR */
5510     t_u16 action;
5511     /** CacheResult initialized to 0 */
5512     t_u16 cache_result;
5513     /** TLV Buffer */
5514     t_u8 tlv_buffer[1];
5515     /** MrvlIEtypes_SsidParamSet_t  SsidParamSet;
5516      * MrvlIEtypes_PMK_t           Pmk;
5517      * MrvlIEtypes_Passphrase_t    Passphrase;
5518      * MrvlIEtypes_Bssid_t         Bssid;
5519      **/
5520 } MLAN_PACK_END HostCmd_DS_802_11_SUPPLICANT_PMK;
5521 
5522 /*
5523  * This struct will GET the Supplicant supported bitmaps
5524  * The GET_CURRENT action will get the network profile used
5525  * for the current assocation.
5526  * Define data structure for HostCmd_CMD_802_11_SUPPLICANT_PROFILE
5527  */
5528 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SUPPLICANT_PROFILE
5529 {
5530     /** GET/SET/GET_CURRENT */
5531     t_u16 action;
5532     /** Reserved */
5533     t_u16 reserved;
5534     /** TLVBuffer */
5535     t_u8 tlv_buf[1];
5536     /* MrvlIEtypes_EncrProto_t */
5537 } MLAN_PACK_END HostCmd_DS_802_11_SUPPLICANT_PROFILE;
5538 
5539 /** HostCmd_CMD_802_11_RF_CHANNEL */
5540 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_RF_CHANNEL
5541 {
5542     /** Action */
5543     t_u16 action;
5544     /** Current channel */
5545     t_u16 current_channel;
5546     /** RF type */
5547     t_u16 rf_type;
5548     /** Reserved field */
5549     t_u16 reserved;
5550 #ifdef STA_SUPPORT
5551     /** Reserved */
5552     t_u8 reserved_1[32];
5553 #else  /* STA_SUPPORT */
5554     /** List of channels */
5555     t_u8 channel_list[32];
5556 #endif /* !STA_SUPPORT */
5557 } MLAN_PACK_END HostCmd_DS_802_11_RF_CHANNEL;
5558 
5559 /** HostCmd_DS_VERSION_EXT */
5560 typedef MLAN_PACK_START struct _HostCmd_DS_VERSION_EXT
5561 {
5562     /** Selected version string */
5563     t_u8 version_str_sel;
5564     /** Version string */
5565     char version_str[128];
5566 } MLAN_PACK_END HostCmd_DS_VERSION_EXT;
5567 
5568 /** HostCmd_CMD_CW_MODE_CTRL */
5569 typedef MLAN_PACK_START struct _HostCmd_DS_CW_MODE_CTRL
5570 {
5571     /** Action for CW Tone Control */
5572     t_u16 action;
5573     /** Mode of Operation 0: Disbale 1: Tx Continuous Packet 2: Tx Continuous Wave */
5574     t_u8 mode;
5575     /** channel */
5576     t_u8 channel;
5577     /** channel info*/
5578     t_u8 chanInfo;
5579     /** Tx Power level in dBm */
5580     t_u16 txPower;
5581     /** Packet Length */
5582     t_u16 pktLength;
5583     /** bit rate Info */
5584     t_u32 rateInfo;
5585 } MLAN_PACK_END HostCmd_DS_CW_MODE_CTRL;
5586 
5587 /** HostCmd_CMD_802_11_RF_ANTENNA */
5588 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_RF_ANTENNA
5589 {
5590 #ifdef STREAM_2X2
5591     /** Action for Tx antenna */
5592     t_u16 action_tx;
5593     /** Tx antenna mode Bit0:1, Bit1:2, Bit0-1:1+2, 0xffff: diversity */
5594     t_u16 tx_antenna_mode;
5595     /** Action for Rx antenna */
5596     t_u16 action_rx;
5597     /** Rx antenna mode Bit0:1, Bit1:2, Bit0-1:1+2, 0xffff: diversity */
5598     t_u16 rx_antenna_mode;
5599 #else
5600     /** Action */
5601     t_u16 action;
5602     /**  Antenna or 0xffff (diversity) */
5603     t_u16 antenna_mode;
5604     /** Evaluate time */
5605     t_u16 evaluate_time;
5606     /** Current antenna */
5607     t_u16 current_antenna;
5608 #ifdef RW610
5609     /** Evaluate mode */
5610     t_u8 evaluate_mode;
5611 #endif
5612 #endif
5613 } MLAN_PACK_END HostCmd_DS_802_11_RF_ANTENNA;
5614 
5615 /** HostCmd_DS_802_11_IBSS_STATUS */
5616 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_IBSS_STATUS
5617 {
5618     /** Action */
5619     t_u16 action;
5620     /** Enable */
5621     t_u16 enable;
5622     /** BSSID */
5623     t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
5624     /** Beacon interval */
5625     t_u16 beacon_interval;
5626     /** ATIM window interval */
5627     t_u16 atim_window;
5628     /** User G rate protection */
5629     t_u16 use_g_rate_protect;
5630 } MLAN_PACK_END HostCmd_DS_802_11_IBSS_STATUS;
5631 
5632 /** HostCmd_DS_MGMT_IE_LIST_CFG */
5633 typedef MLAN_PACK_START struct _HostCmd_DS_MGMT_IE_LIST
5634 {
5635     /** Action */
5636     t_u16 action;
5637     /** Get/Set mgmt IE */
5638     mlan_ds_misc_custom_ie ds_mgmt_ie;
5639 } MLAN_PACK_END HostCmd_DS_MGMT_IE_LIST_CFG;
5640 
5641 /** HostCmd_CMD_MAC_REG_ACCESS */
5642 typedef MLAN_PACK_START struct _HostCmd_DS_MAC_REG_ACCESS
5643 {
5644     /** Action */
5645     t_u16 action;
5646     /** MAC register offset */
5647     t_u16 offset;
5648     /** MAC register value */
5649     t_u32 value;
5650 } MLAN_PACK_END HostCmd_DS_MAC_REG_ACCESS;
5651 
5652 /** HostCmd_CMD_BBP_REG_ACCESS */
5653 typedef MLAN_PACK_START struct _HostCmd_DS_BBP_REG_ACCESS
5654 {
5655     /** Acion */
5656     t_u16 action;
5657     /** BBP register offset */
5658     t_u16 offset;
5659     /** BBP register value */
5660     t_u8 value;
5661     /** Reserved field */
5662     t_u8 reserved[3];
5663 } MLAN_PACK_END HostCmd_DS_BBP_REG_ACCESS;
5664 
5665 /**  HostCmd_CMD_RF_REG_ACCESS */
5666 typedef MLAN_PACK_START struct _HostCmd_DS_RF_REG_ACCESS
5667 {
5668     /** Action */
5669     t_u16 action;
5670     /** RF register offset */
5671     t_u16 offset;
5672     /** RF register value */
5673     t_u8 value;
5674     /** Reserved field */
5675     t_u8 reserved[3];
5676 } MLAN_PACK_END HostCmd_DS_RF_REG_ACCESS;
5677 
5678 /** HostCmd_DS_802_11_EEPROM_ACCESS */
5679 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_EEPROM_ACCESS
5680 {
5681     /** Action */
5682     t_u16 action;
5683 
5684     /** multiple 4 */
5685     t_u16 offset;
5686     /** Number of bytes */
5687     t_u16 byte_count;
5688     /** Value */
5689     t_u8 value;
5690 } MLAN_PACK_END HostCmd_DS_802_11_EEPROM_ACCESS;
5691 
5692 /** HostCmd_DS_MEM_ACCESS */
5693 typedef MLAN_PACK_START struct _HostCmd_DS_MEM_ACCESS
5694 {
5695     /** Action */
5696     t_u16 action;
5697     /** Reserved field */
5698     t_u16 reserved;
5699     /** Address */
5700     t_u32 addr;
5701     /** Value */
5702     t_u32 value;
5703 } MLAN_PACK_END HostCmd_DS_MEM_ACCESS;
5704 
5705 /** HostCmd_DS_AUTO_RECONNECT */
5706 typedef MLAN_PACK_START struct _HostCmd_DS_AUTO_RECONNECT
5707 {
5708     /** Action */
5709     t_u16 action;
5710     /** Reconnect Counter */
5711     t_u8 reconnect_counter;
5712     /** Reconnect Interval */
5713     t_u8 reconnect_interval;
5714     /** Flags */
5715     t_u16 flags;
5716 } MLAN_PACK_END HostCmd_DS_AUTO_RECONNECT;
5717 
5718 /** HostCmd_CMD_HS_WAKEUP_REASON */
5719 typedef MLAN_PACK_START struct _HostCmd_DS_HS_WAKEUP_REASON
5720 {
5721     /** wakeupReason:
5722      * 0: unknown
5723      * 1: Broadcast data matched
5724      * 2: Multicast data matched
5725      * 3: Unicast data matched
5726      * 4: Maskable event matched
5727      * 5. Non-maskable event matched
5728      * 6: Non-maskable condition matched (EAPoL rekey)
5729      * 7: Magic pattern matched
5730      * Others: reserved. (set to 0) */
5731     t_u16 wakeup_reason;
5732 } MLAN_PACK_END HostCmd_DS_HS_WAKEUP_REASON;
5733 
5734 /** HostCmd_BRIDGE_MODE */
5735 typedef MLAN_PACK_START struct _HostCmd_BRIDGE_MODE
5736 {
5737     /** Action */
5738     t_u16 action;
5739     /** Enable */
5740     t_u8 enable;
5741 } MLAN_PACK_END HostCmd_BRIDGE_MODE;
5742 
5743 /** HostCmd_DS_SUBSCRIBE_EVENT */
5744 typedef MLAN_PACK_START struct _HostCmd_DS_SUBSCRIBE_EVENT
5745 {
5746     /** Action */
5747     t_u16 action;
5748     /** Bitmap of subscribed events */
5749     t_u16 event_bitmap;
5750 } MLAN_PACK_END HostCmd_DS_SUBSCRIBE_EVENT;
5751 
5752 /** HostCmd_DS_OTP_USER_DATA */
5753 typedef MLAN_PACK_START struct _HostCmd_DS_OTP_USER_DATA
5754 {
5755     /** Action */
5756     t_u16 action;
5757     /** Reserved field */
5758     t_u16 reserved;
5759     /** User data length */
5760     t_u16 user_data_length;
5761     /** User data */
5762     t_u8 user_data[1];
5763 } MLAN_PACK_END HostCmd_DS_OTP_USER_DATA;
5764 
5765 /** HostCmd_DS_INACTIVITY_TIMEOUT_EXT */
5766 typedef MLAN_PACK_START struct _HostCmd_DS_INACTIVITY_TIMEOUT_EXT
5767 {
5768     /** ACT_GET/ACT_SET */
5769     t_u16 action;
5770     /** uS, 0 means 1000uS(1ms) */
5771     t_u16 timeout_unit;
5772     /** Inactivity timeout for unicast data */
5773     t_u16 unicast_timeout;
5774     /** Inactivity timeout for multicast data */
5775     t_u16 mcast_timeout;
5776     /** Timeout for additional RX traffic after Null PM1 packet exchange */
5777     t_u16 ps_entry_timeout;
5778     /** Inactivity timeout for cmd */
5779     t_u16 ps_cmd_timeout;
5780 } MLAN_PACK_END HostCmd_DS_INACTIVITY_TIMEOUT_EXT;
5781 
5782 /** HostCmd_DS_CMD_TX_AMPDU_PROT_MODE */
5783 typedef MLAN_PACK_START struct _HostCmd_DS_CMD_TX_AMPDU_PROT_MODE
5784 {
5785     /** Action */
5786     t_u16 action;
5787     /** Prot mode */
5788     t_u16 mode;
5789 } MLAN_PACK_END HostCmd_DS_CMD_TX_AMPDU_PROT_MODE;
5790 
5791 /** TLV type : STA Mac address */
5792 #define TLV_TYPE_STA_MAC_ADDRESS (PROPRIETARY_TLV_BASE_ID + 0x20) // 0x0120
5793 
5794 /** MrvlIEtypes_MacAddr_t */
5795 typedef MLAN_PACK_START struct _MrvlIEtypes_MacAddr_t
5796 {
5797     /** Header */
5798     MrvlIEtypesHeader_t header;
5799     /** mac address */
5800     t_u8 mac[MLAN_MAC_ADDR_LENGTH];
5801 } MLAN_PACK_END MrvlIEtypes_MacAddr_t;
5802 
5803 #ifdef SD8801
5804 typedef MLAN_PACK_START struct _MrvlIETypes_ExtBLECoex_Config_t
5805 {
5806     /** Header */
5807     MrvlIEtypesHeader_t header;
5808     /** Enable or disable external coexistence */
5809     t_u8 Enabled;
5810     /** Ignore the priority of the external radio request */
5811     t_u8 IgnorePriority;
5812     /** Default priority when the priority of the external radio
5813 request is ignored */
5814     t_u8 DefaultPriority;
5815     /** Input request GPIO pin for EXT_RADIO_REQ signal */
5816     t_u8 EXT_RADIO_REQ_ip_gpio_num;
5817     /** Input request GPIO polarity for EXT_RADIO_REQ signal */
5818     t_u8 EXT_RADIO_REQ_ip_gpio_polarity;
5819     /** Input priority GPIO pin for EXT_RADIO_PRI signal */
5820     t_u8 EXT_RADIO_PRI_ip_gpio_num;
5821     /** Input priority GPIO polarity for EXT_RADIO_PRI signal */
5822     t_u8 EXT_RADIO_PRI_ip_gpio_polarity;
5823     /** Output grant GPIO pin for WLAN_GRANT signal */
5824     t_u8 WLAN_GRANT_op_gpio_num;
5825     /** Output grant GPIO polarity of WLAN_GRANT */
5826     t_u8 WLAN_GRANT_op_gpio_polarity;
5827     /** Reserved Bytes */
5828     t_u16 reserved_1;
5829     /** Reserved Bytes */
5830     t_u16 reserved_2;
5831     /** External Radio Request count */
5832     t_u16 EXT_RADIO_REQ_count;
5833     /** External Radio Priority count */
5834     t_u16 EXT_RADIO_PRI_count;
5835     /** WLAN GRANT count */
5836     t_u16 WLAN_GRANT_count;
5837 } MLAN_PACK_END MrvlIETypes_ExtBLECoex_Config_t;
5838 
5839 typedef MLAN_PACK_START struct _HostCmd_DS_ExtBLECoex_Config_t
5840 {
5841     /** Action */
5842     t_u16 action;
5843     /** Reserved field */
5844     t_u16 reserved;
5845     /** External Coex Configuration Data */
5846     MrvlIETypes_ExtBLECoex_Config_t coex_cfg_data;
5847 } MLAN_PACK_END HostCmd_DS_ExtBLECoex_Config_t;
5848 #endif
5849 
5850 /** Assoc Request */
5851 #define SUBTYPE_ASSOC_REQUEST 0U
5852 /** Assoc Response */
5853 #define SUBTYPE_ASSOC_RESP 1U
5854 /** ReAssoc Request */
5855 #define SUBTYPE_REASSOC_REQUEST 2U
5856 /** ReAssoc Response */
5857 #define SUBTYPE_REASSOC_RESP 3U
5858 /** Probe Request */
5859 #define SUBTYPE_PROBE_REQUEST 4U
5860 /** Probe Response */
5861 #define SUBTYPE_PROBE_RESP 5U
5862 /** Disassoc Request */
5863 #define SUBTYPE_DISASSOC 10
5864 /** Auth Request */
5865 #define SUBTYPE_AUTH 11
5866 /** Deauth Request */
5867 #define SUBTYPE_DEAUTH 12
5868 /** Action frame */
5869 #define SUBTYPE_ACTION 13
5870 
5871 #ifdef UAP_SUPPORT
5872 /** TLV type : AP Channel band Config */
5873 #define TLV_TYPE_UAP_CHAN_BAND_CONFIG (PROPRIETARY_TLV_BASE_ID + 0x2aU) // 0x012a
5874 /** TLV type : AP Mac address */
5875 #define TLV_TYPE_UAP_MAC_ADDRESS (PROPRIETARY_TLV_BASE_ID + 0x2b) // 0x012b
5876 /** TLV type : AP Beacon period */
5877 #define TLV_TYPE_UAP_BEACON_PERIOD (PROPRIETARY_TLV_BASE_ID + 0x2c) // 0x012c
5878 /** TLV type : AP DTIM period */
5879 #define TLV_TYPE_UAP_DTIM_PERIOD (PROPRIETARY_TLV_BASE_ID + 0x2d) // 0x012d
5880 /** TLV type : AP Tx power */
5881 #define TLV_TYPE_UAP_TX_POWER (PROPRIETARY_TLV_BASE_ID + 0x2fU) // 0x012f
5882 /** TLV type : AP SSID broadcast control */
5883 #define TLV_TYPE_UAP_BCAST_SSID_CTL (PROPRIETARY_TLV_BASE_ID + 0x30) // 0x0130
5884 /** TLV type : AP Preamble control */
5885 #define TLV_TYPE_UAP_PREAMBLE_CTL (PROPRIETARY_TLV_BASE_ID + 0x31) // 0x0131
5886 /** TLV type : AP Antenna control */
5887 #define TLV_TYPE_UAP_ANTENNA_CTL (PROPRIETARY_TLV_BASE_ID + 0x32) // 0x0132
5888 /** TLV type : AP RTS threshold */
5889 #define TLV_TYPE_UAP_RTS_THRESHOLD (PROPRIETARY_TLV_BASE_ID + 0x33) // 0x0133
5890 /** TLV type : AP Tx data rate */
5891 #define TLV_TYPE_UAP_TX_DATA_RATE (PROPRIETARY_TLV_BASE_ID + 0x35) // 0x0135
5892 /** TLV type: AP Packet forwarding control */
5893 #define TLV_TYPE_UAP_PKT_FWD_CTL (PROPRIETARY_TLV_BASE_ID + 0x36U) // 0x0136
5894 /** TLV type: STA information */
5895 #define TLV_TYPE_UAP_STA_INFO (PROPRIETARY_TLV_BASE_ID + 0x37) // 0x0137
5896 /** TLV type: AP STA MAC address filter */
5897 #define TLV_TYPE_UAP_STA_MAC_ADDR_FILTER (PROPRIETARY_TLV_BASE_ID + 0x38) // 0x0138
5898 /** TLV type: AP STA ageout timer */
5899 #define TLV_TYPE_UAP_STA_AGEOUT_TIMER (PROPRIETARY_TLV_BASE_ID + 0x39) // 0x0139
5900 /** TLV type: AP WEP keys */
5901 #define TLV_TYPE_UAP_WEP_KEY (PROPRIETARY_TLV_BASE_ID + 0x3b) // 0x013b
5902 /** TLV type: AP WPA passphrase */
5903 #define TLV_TYPE_UAP_WPA_PASSPHRASE (PROPRIETARY_TLV_BASE_ID + 0x3c) // 0x013c
5904 /** TLV type: AP protocol */
5905 #define TLV_TYPE_UAP_ENCRYPT_PROTOCOL (PROPRIETARY_TLV_BASE_ID + 0x40) // 0x0140
5906 /** TLV type: AP AKMP */
5907 #define TLV_TYPE_UAP_AKMP (PROPRIETARY_TLV_BASE_ID + 0x41) // 0x0141
5908 /** TLV type: AP Fragment threshold */
5909 #define TLV_TYPE_UAP_FRAG_THRESHOLD (PROPRIETARY_TLV_BASE_ID + 0x46) // 0x0146
5910 /** TLV type: AP Group rekey timer */
5911 #define TLV_TYPE_UAP_GRP_REKEY_TIME (PROPRIETARY_TLV_BASE_ID + 0x47) // 0x0147
5912 /**TLV type : AP Max Station number */
5913 #define TLV_TYPE_UAP_MAX_STA_CNT (PROPRIETARY_TLV_BASE_ID + 0x55U) // 0x0155
5914 /**TLV type : AP Retry limit */
5915 #define TLV_TYPE_UAP_RETRY_LIMIT (PROPRIETARY_TLV_BASE_ID + 0x5d) // 0x015d
5916 /** TLV type : AP MCBC data rate */
5917 #define TLV_TYPE_UAP_MCBC_DATA_RATE (PROPRIETARY_TLV_BASE_ID + 0x62) // 0x0162
5918 /**TLV type: AP RSN replay protection */
5919 #define TLV_TYPE_UAP_RSN_REPLAY_PROTECT (PROPRIETARY_TLV_BASE_ID + 0x64) // 0x0164
5920 /** TLV ID : Management Frame */
5921 #define TLV_TYPE_UAP_MGMT_FRAME (PROPRIETARY_TLV_BASE_ID + 0x68U) // 0x0168
5922 /** TLV: Management IE list */
5923 #define MRVL_MGMT_IE_LIST_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x69U)
5924 #ifdef UAP_SUPPORT
5925 /**TLV type: AP mgmt IE passthru mask */
5926 #define TLV_TYPE_UAP_MGMT_IE_PASSTHRU_MASK (PROPRIETARY_TLV_BASE_ID + 0x70U) // 0x0170
5927 #endif
5928 /** TLV type : AP ECSA CONFIG TLV */
5929 #define TLV_TYPE_UAP_ECSA_CONFIG (PROPRIETARY_TLV_BASE_ID + 289)
5930 
5931 #if CONFIG_IMD3_CFG
5932 #define TLV_TYPE_IMD_VALIDATION (PROPRIETARY_TLV_BASE_ID + 0x60) // 0x0160
5933 #endif
5934 
5935 /** TLV : 20/40 coex config */
5936 #define TLV_TYPE_2040_BSS_COEX_CONTROL (PROPRIETARY_TLV_BASE_ID + 0x98) // 0x0198
5937 /**TLV type: AP pairwise handshake timeout */
5938 #define TLV_TYPE_UAP_EAPOL_PWK_HSK_TIMEOUT (PROPRIETARY_TLV_BASE_ID + 0x75) // 0x0175
5939 /**TLV type: AP pairwise handshake retries */
5940 #define TLV_TYPE_UAP_EAPOL_PWK_HSK_RETRIES (PROPRIETARY_TLV_BASE_ID + 0x76) // 0x0176
5941 /**TLV type: AP groupwise handshake timeout */
5942 #define TLV_TYPE_UAP_EAPOL_GWK_HSK_TIMEOUT (PROPRIETARY_TLV_BASE_ID + 0x77) // 0x0177
5943 /**TLV type: AP groupwise handshake retries */
5944 #define TLV_TYPE_UAP_EAPOL_GWK_HSK_RETRIES (PROPRIETARY_TLV_BASE_ID + 0x78) // 0x0178
5945 /** TLV type: AP PS STA ageout timer */
5946 #define TLV_TYPE_UAP_PS_STA_AGEOUT_TIMER (PROPRIETARY_TLV_BASE_ID + 0x7b) // 0x017b
5947 /** TLV type : Pairwise Cipher */
5948 #define TLV_TYPE_PWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 0x91) // 0x0191
5949 /** TLV type : Group Cipher */
5950 #define TLV_TYPE_GWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 0x92) // 0x0192
5951 /** TLV type : BSS Status */
5952 #define TLV_TYPE_BSS_STATUS (PROPRIETARY_TLV_BASE_ID + 0x93) // 0x0193
5953 
5954 #if CONFIG_11AX
5955 /** TLV type: Extension ID for 11AX Capability */
5956 #define TLV_TYPE_EXTENSION_ID 0x00ff
5957 #endif
5958 
5959 #if CONFIG_HOST_MLME
5960 /**TLV type : Host MLME Flag*/
5961 #define TLV_TYPE_HOST_MLME (PROPRIETARY_TLV_BASE_ID + 307)
5962 #endif
5963 
5964 #if CONFIG_EXTERNAL_COEX_PTA
5965 /** TLV type : Robust Coex */
5966 #define TLV_TYPE_ROBUST_COEX (PROPRIETARY_TLV_BASE_ID + 0x138) // 0x0238
5967 #endif
5968 
5969 /** TLV type : WPA3 SAE Passowrd */
5970 #define TLV_TYPE_UAP_WPA3_SAE_PASSWORD (PROPRIETARY_TLV_BASE_ID + 0x141) // 0x0241
5971 
5972 #ifdef WIFI_DIRECT_SUPPORT
5973 /** TLV type : AP PSK */
5974 #define TLV_TYPE_UAP_PSK (PROPRIETARY_TLV_BASE_ID + 0xa8) // 0x01a8
5975 #endif                                                    /* WIFI_DIRECT_SUPPORT */
5976 
5977 /** MrvlIEtypes_AutoLinkParamSet_t */
5978 typedef MLAN_PACK_START struct _MrvlIEtypes_AutoLinkParamSet_t
5979 {
5980     /** Header */
5981     MrvlIEtypesHeader_t header;
5982     /** Auto Link Periodical scan interval */
5983     uint32_t scan_timer_interval;
5984     /** The condition triggers Auto Link periodical scan
5985     0:trigger scan when current link is not good
5986     1:trigger scan by host setting(always periodical scan)
5987     */
5988     uint8_t scan_timer_condition;
5989     /** Auto Link periodical scan channel list:
5990     0:only scan with previous In-STA associated channel
5991     1: 2.4G all channels
5992     */
5993     uint8_t scan_channel_list;
5994 } MLAN_PACK_END MrvlIEtypes_AutoLinkParamSet_t;
5995 
5996 /** MrvlIEtypes_BridgeParamSet_t */
5997 typedef MLAN_PACK_START struct _MrvlIEtypes_BridgeParamSet_t
5998 {
5999     /** Header */
6000     MrvlIEtypesHeader_t header;
6001     /** SSID of External AP */
6002     MrvlIEtypes_SsIdParamSet_t SSID_ExAP;
6003     /** Passphrase of External AP */
6004     MrvlIEtypes_Passphrase_t pass_ExAP;
6005     /** SSID of External AP */
6006     MrvlIEtypes_SsIdParamSet_t SSID_bridge;
6007     /** Passphrase of External AP */
6008     MrvlIEtypes_Passphrase_t pass_bridge;
6009 } MLAN_PACK_END MrvlIEtypes_BridgeParamSet_t;
6010 
6011 /** MrvlIEtypes_beacon_period_t */
6012 typedef MLAN_PACK_START struct _MrvlIEtypes_beacon_period_t
6013 {
6014     /** Header */
6015     MrvlIEtypesHeader_t header;
6016     /** beacon period */
6017     t_u16 beacon_period;
6018 } MLAN_PACK_END MrvlIEtypes_beacon_period_t;
6019 
6020 /** MrvlIEtypes_ecsa_config_t */
6021 typedef MLAN_PACK_START struct _MrvlIEtypes_ecsa_config_t
6022 {
6023     /** Header */
6024     MrvlIEtypesHeader_t header;
6025     /** enable */
6026     t_u16 enable;
6027     /** data traffic mode */
6028     t_u8 ChannelSwitchMode;
6029     /** channel switch count */
6030     t_u8 ChannelSwitchCount;
6031 } MLAN_PACK_END MrvlIEtypes_ecsa_config_t;
6032 
6033 /** MrvlIEtypes_dtim_period_t */
6034 typedef MLAN_PACK_START struct _MrvlIEtypes_dtim_period_t
6035 {
6036     /** Header */
6037     MrvlIEtypesHeader_t header;
6038     /** DTIM period */
6039     t_u8 dtim_period;
6040 } MLAN_PACK_END MrvlIEtypes_dtim_period_t;
6041 
6042 /** MrvlIEtypes_tx_rate_t */
6043 typedef MLAN_PACK_START struct _MrvlIEtypes_tx_rate_t
6044 {
6045     /** Header */
6046     MrvlIEtypesHeader_t header;
6047     /** tx data rate */
6048     t_u16 tx_data_rate;
6049 } MLAN_PACK_END MrvlIEtypes_tx_rate_t;
6050 
6051 /** MrvlIEtypes_mcbc_rate_t */
6052 typedef MLAN_PACK_START struct _MrvlIEtypes_mcbc_rate_t
6053 {
6054     /** Header */
6055     MrvlIEtypesHeader_t header;
6056     /** mcbc data rate */
6057     t_u16 mcbc_data_rate;
6058 } MLAN_PACK_END MrvlIEtypes_mcbc_rate_t;
6059 
6060 /** MrvlIEtypes_tx_power_t */
6061 typedef MLAN_PACK_START struct _MrvlIEtypes_tx_power_t
6062 {
6063     /** Header */
6064     MrvlIEtypesHeader_t header;
6065     /** tx power */
6066     t_u8 tx_power;
6067 } MLAN_PACK_END MrvlIEtypes_tx_power_t;
6068 
6069 /** MrvlIEtypes_bcast_ssid_t */
6070 typedef MLAN_PACK_START struct _MrvlIEtypes_bcast_ssid_t
6071 {
6072     /** Header */
6073     MrvlIEtypesHeader_t header;
6074     /** bcast ssid control*/
6075     t_u8 bcast_ssid_ctl;
6076 } MLAN_PACK_END MrvlIEtypes_bcast_ssid_t;
6077 
6078 /** MrvlIEtypes_antenna_mode_t */
6079 typedef MLAN_PACK_START struct _MrvlIEtypes_antenna_mode_t
6080 {
6081     /** Header */
6082     MrvlIEtypesHeader_t header;
6083     /** which antenna */
6084     t_u8 which_antenna;
6085     /** antenna mode*/
6086     t_u8 antenna_mode;
6087 } MLAN_PACK_END MrvlIEtypes_antenna_mode_t;
6088 
6089 /** MrvlIEtypes_pkt_forward_t */
6090 typedef MLAN_PACK_START struct _MrvlIEtypes_pkt_forward_t
6091 {
6092     /** Header */
6093     MrvlIEtypesHeader_t header;
6094     /** pkt foward control */
6095     t_u8 pkt_forward_ctl;
6096 } MLAN_PACK_END MrvlIEtypes_pkt_forward_t;
6097 
6098 /** MrvlIEtypes_max_sta_count_t */
6099 typedef MLAN_PACK_START struct _MrvlIEtypes_max_sta_count_t
6100 {
6101     /** Header */
6102     MrvlIEtypesHeader_t header;
6103     /** max station count */
6104     t_u16 max_sta_count;
6105 } MLAN_PACK_END MrvlIEtypes_max_sta_count_t;
6106 
6107 /** MrvlIEtypes_sta_ageout_t */
6108 typedef MLAN_PACK_START struct _MrvlIEtypes_sta_ageout_t
6109 {
6110     /** Header */
6111     MrvlIEtypesHeader_t header;
6112     /** station age out timer */
6113     t_u32 sta_ageout_timer;
6114 } MLAN_PACK_END MrvlIEtypes_sta_ageout_t;
6115 
6116 /** MrvlIEtypes_rts_threshold_t */
6117 typedef MLAN_PACK_START struct _MrvlIEtypes_rts_threshold_t
6118 {
6119     /** Header */
6120     MrvlIEtypesHeader_t header;
6121     /** rts threshold */
6122     t_u16 rts_threshold;
6123 } MLAN_PACK_END MrvlIEtypes_rts_threshold_t;
6124 
6125 /** MrvlIEtypes_frag_threshold_t */
6126 typedef MLAN_PACK_START struct _MrvlIEtypes_frag_threshold_t
6127 {
6128     /** Header */
6129     MrvlIEtypesHeader_t header;
6130     /** frag threshold */
6131     t_u16 frag_threshold;
6132 } MLAN_PACK_END MrvlIEtypes_frag_threshold_t;
6133 
6134 /** MrvlIEtypes_retry_limit_t */
6135 typedef MLAN_PACK_START struct _MrvlIEtypes_retry_limit_t
6136 {
6137     /** Header */
6138     MrvlIEtypesHeader_t header;
6139     /** retry limit */
6140     t_u8 retry_limit;
6141 } MLAN_PACK_END MrvlIEtypes_retry_limit_t;
6142 
6143 /** MrvlIEtypes_eapol_pwk_hsk_timeout_t */
6144 typedef MLAN_PACK_START struct _MrvlIEtypes_eapol_pwk_hsk_timeout_t
6145 {
6146     /** Header */
6147     MrvlIEtypesHeader_t header;
6148     /** pairwise update timeout in milliseconds */
6149     t_u32 pairwise_update_timeout;
6150 } MLAN_PACK_END MrvlIEtypes_eapol_pwk_hsk_timeout_t;
6151 
6152 /** MrvlIEtypes_eapol_pwk_hsk_retries_t */
6153 typedef MLAN_PACK_START struct _MrvlIEtypes_eapol_pwk_hsk_retries_t
6154 {
6155     /** Header */
6156     MrvlIEtypesHeader_t header;
6157     /** pairwise handshake retries */
6158     t_u32 pwk_retries;
6159 } MLAN_PACK_END MrvlIEtypes_eapol_pwk_hsk_retries_t;
6160 
6161 /** MrvlIEtypes_eapol_gwk_hsk_timeout_t */
6162 typedef MLAN_PACK_START struct _MrvlIEtypes_eapol_gwk_hsk_timeout_t
6163 {
6164     /** Header */
6165     MrvlIEtypesHeader_t header;
6166     /** groupwise update timeout in milliseconds */
6167     t_u32 groupwise_update_timeout;
6168 } MLAN_PACK_END MrvlIEtypes_eapol_gwk_hsk_timeout_t;
6169 
6170 /** MrvlIEtypes_eapol_gwk_hsk_retries_t */
6171 typedef MLAN_PACK_START struct _MrvlIEtypes_eapol_gwk_hsk_retries_t
6172 {
6173     /** Header */
6174     MrvlIEtypesHeader_t header;
6175     /** groupwise handshake retries */
6176     t_u32 gwk_retries;
6177 } MLAN_PACK_END MrvlIEtypes_eapol_gwk_hsk_retries_t;
6178 
6179 #ifdef UAP_SUPPORT
6180 /** MrvlIEtypes_mgmt_ie_passthru_t */
6181 typedef MLAN_PACK_START struct _MrvlIEtypes_mgmt_ie_passthru_t
6182 {
6183     /** Header */
6184     MrvlIEtypesHeader_t header;
6185     /** mgmt IE mask value */
6186     t_u32 mgmt_ie_mask;
6187 } MLAN_PACK_END MrvlIEtypes_mgmt_ie_passthru_t;
6188 #endif
6189 
6190 /** TLV buffer : 2040 coex config */
6191 typedef MLAN_PACK_START struct _MrvlIEtypes_2040_coex_enable_t
6192 {
6193     /** Header */
6194     MrvlIEtypesHeader_t header;
6195     /** Enable */
6196     t_u8 enable_2040coex;
6197 } MLAN_PACK_END MrvlIEtypes_2040_coex_enable_t;
6198 
6199 /** MrvlIEtypes_mac_filter_t */
6200 typedef MLAN_PACK_START struct _MrvlIEtypes_mac_filter_t
6201 {
6202     /** Header */
6203     MrvlIEtypesHeader_t header;
6204     /** Filter mode */
6205     t_u8 filter_mode;
6206     /** Number of STA MACs */
6207     t_u8 count;
6208     /** STA MAC addresses buffer */
6209     t_u8 mac_address[1];
6210 } MLAN_PACK_END MrvlIEtypes_mac_filter_t;
6211 
6212 /** setting for band_config - band=5GHZ */
6213 #define BAND_CONFIG_5GHZ 0x01U
6214 
6215 #if CONFIG_UNII4_BAND_SUPPORT
6216 /** TODO: Temporary work around until firmware fix is available */
6217 /** setting for band_config - channel 173 */
6218 #define BAND_CONFIG_CH_173 0x11U
6219 #endif
6220 
6221 /** MrvlIEtypes_retry_limit_t */
6222 typedef MLAN_PACK_START struct _MrvlIEtypes_channel_band_t
6223 {
6224     /** Header */
6225     MrvlIEtypesHeader_t header;
6226     /** Band Configuration
6227      *
6228      * [7-6] Channel Selection Mode; 00 manual, 01 ACS
6229      * [3-2] Channel Width; 00 20 MHz
6230      * [1-0] Band Info; 00 2.4 GHz
6231      */
6232     t_u8 band_config;
6233     /** channel */
6234     t_u8 channel;
6235 } MLAN_PACK_END MrvlIEtypes_channel_band_t;
6236 
6237 /** MrvlIEtypes_auth_type_t */
6238 typedef MLAN_PACK_START struct _MrvlIEtypes_auth_type_t
6239 {
6240     /** Header */
6241     MrvlIEtypesHeader_t header;
6242     /** Authentication type */
6243     t_u8 auth_type;
6244     /** PWE derivation */
6245     t_u8 PWE_derivation;
6246     /** transition disable */
6247     t_u8 transition_disable;
6248 } MLAN_PACK_END MrvlIEtypes_auth_type_t;
6249 
6250 /** MrvlIEtypes_encrypt_protocol_t */
6251 typedef MLAN_PACK_START struct _MrvlIEtypes_encrypt_protocol_t
6252 {
6253     /** Header */
6254     MrvlIEtypesHeader_t header;
6255     /** encryption protocol */
6256     t_u16 protocol;
6257 } MLAN_PACK_END MrvlIEtypes_encrypt_protocol_t;
6258 
6259 /** MrvlIEtypes_pwk_cipher_t */
6260 typedef MLAN_PACK_START struct _MrvlIEtypes_pwk_cipher_t
6261 {
6262     /** Header */
6263     MrvlIEtypesHeader_t header;
6264     /** protocol */
6265     t_u16 protocol;
6266     /** pairwise cipher */
6267     t_u8 pairwise_cipher;
6268     /** reserved */
6269     t_u8 reserved;
6270 } MLAN_PACK_END MrvlIEtypes_pwk_cipher_t;
6271 
6272 /** MrvlIEtypes_gwk_cipher_t */
6273 typedef MLAN_PACK_START struct _MrvlIEtypes_gwk_cipher_t
6274 {
6275     /** Header */
6276     MrvlIEtypesHeader_t header;
6277     /** group cipher */
6278     t_u8 group_cipher;
6279     /** reserved */
6280     t_u8 reserved;
6281 } MLAN_PACK_END MrvlIEtypes_gwk_cipher_t;
6282 
6283 /** MrvlIEtypes_akmp_t */
6284 typedef MLAN_PACK_START struct _MrvlIEtypes_akmp_t
6285 {
6286     /** Header */
6287     MrvlIEtypesHeader_t header;
6288     /** key management */
6289     t_u16 key_mgmt;
6290     /** key management operation */
6291     t_u16 key_mgmt_operation;
6292 } MLAN_PACK_END MrvlIEtypes_akmp_t;
6293 
6294 /** MrvlIEtypes_passphrase_t */
6295 typedef MLAN_PACK_START struct _MrvlIEtypes_passphrase_t
6296 {
6297     /** Header */
6298     MrvlIEtypesHeader_t header;
6299     /** passphrase */
6300     t_u8 passphrase[1];
6301 } MLAN_PACK_END MrvlIEtypes_passphrase_t;
6302 
6303 /** MrvlIEtypes_passphrase_t */
6304 typedef MLAN_PACK_START struct _MrvlIEtypes_password_t
6305 {
6306     /** Header */
6307     MrvlIEtypesHeader_t header;
6308     /** passphrase */
6309     t_u8 password[1];
6310 } MLAN_PACK_END MrvlIEtypes_password_t;
6311 
6312 /** MrvlIEtypes_rsn_replay_prot_t */
6313 typedef MLAN_PACK_START struct _MrvlIEtypes_rsn_replay_prot_t
6314 {
6315     /** Header */
6316     MrvlIEtypesHeader_t header;
6317     /** rsn replay proection */
6318     t_u8 rsn_replay_prot;
6319 } MLAN_PACK_END MrvlIEtypes_rsn_replay_prot_t;
6320 
6321 /** MrvlIEtypes_group_rekey_time_t */
6322 typedef MLAN_PACK_START struct _MrvlIEtypes_group_rekey_time_t
6323 {
6324     /** Header */
6325     MrvlIEtypesHeader_t header;
6326     /** group key rekey time */
6327     t_u32 gk_rekey_time;
6328 } MLAN_PACK_END MrvlIEtypes_group_rekey_time_t;
6329 
6330 /** MrvlIEtypes_wep_key_t */
6331 typedef MLAN_PACK_START struct _MrvlIEtypes_wep_key_t
6332 {
6333     /** Header */
6334     MrvlIEtypesHeader_t header;
6335     /** key index */
6336     t_u8 key_index;
6337     /** is default */
6338     t_u8 is_default;
6339     /** key data */
6340     t_u8 key[1];
6341 } MLAN_PACK_END MrvlIEtypes_wep_key_t;
6342 
6343 /** MrvlIEtypes_bss_status_t */
6344 typedef MLAN_PACK_START struct _MrvlIEtypes_bss_status_t
6345 {
6346     /** Header */
6347     MrvlIEtypesHeader_t header;
6348     /** BSS status, READ only */
6349     t_u16 bss_status;
6350 } MLAN_PACK_END MrvlIEtypes_bss_status_t;
6351 
6352 /** MrvlIEtypes_preamble_t */
6353 typedef MLAN_PACK_START struct _MrvlIEtypes_preamble_t
6354 {
6355     /** Header */
6356     MrvlIEtypesHeader_t header;
6357     /** preamble type, READ only */
6358     t_u8 preamble_type;
6359 } MLAN_PACK_END MrvlIEtypes_preamble_t;
6360 
6361 /** MrvlIEtypes_wmm_parameter_t */
6362 typedef MLAN_PACK_START struct _MrvlIEtypes_wmm_parameter_t
6363 {
6364     /** Header */
6365     MrvlIEtypesHeader_t header;
6366     /** WMM parameter */
6367     WmmParameter_t wmm_para;
6368 } MLAN_PACK_END MrvlIEtypes_wmm_parameter_t;
6369 
6370 /** SNMP_MIB_UAP_INDEX */
6371 typedef enum _SNMP_MIB_UAP_INDEX
6372 {
6373     tkip_mic_failures             = 0x0b,
6374     ccmp_decrypt_errors           = 0x0c,
6375     wep_undecryptable_count       = 0x0d,
6376     wep_icv_error_count           = 0x0e,
6377     decrypt_failure_count         = 0xf,
6378     dot11_failed_count            = 0x12,
6379     dot11_retry_count             = 0x13,
6380     dot11_multi_retry_count       = 0x14,
6381     dot11_frame_dup_count         = 0x15,
6382     dot11_rts_success_count       = 0x16,
6383     dot11_rts_failure_count       = 0x17,
6384     dot11_ack_failure_count       = 0x18,
6385     dot11_rx_fragment_count       = 0x19,
6386     dot11_mcast_rx_frame_count    = 0x1a,
6387     dot11_fcs_error_count         = 0x1b,
6388     dot11_tx_frame_count          = 0x1c,
6389     dot11_rsna_tkip_cm_invoked    = 0x1d,
6390     dot11_rsna_4way_hshk_failures = 0x1e,
6391     dot11_mcast_tx_count          = 0x1f,
6392 } SNMP_MIB_UAP_INDEX;
6393 
6394 /** MrvlIEtypes_snmp_oid_t */
6395 typedef MLAN_PACK_START struct _MrvlIEtypes_snmp_oid_t
6396 {
6397     /** Header */
6398     MrvlIEtypesHeader_t header;
6399     /** data */
6400     t_u32 data;
6401 } MLAN_PACK_END MrvlIEtypes_snmp_oid_t;
6402 
6403 /** HostCmd_SYS_CONFIG */
6404 typedef MLAN_PACK_START struct _HostCmd_DS_SYS_CONFIG
6405 {
6406     /** CMD Action GET/SET*/
6407     t_u16 action;
6408     /** Tlv buffer */
6409     t_u8 tlv_buffer[1];
6410 } MLAN_PACK_END HostCmd_DS_SYS_CONFIG;
6411 
6412 #ifdef SD8801
6413 /** HostCmd_ACS_CONFIG */
6414 typedef MLAN_PACK_START struct _HostCmd_DS_ACS_CONFIG
6415 {
6416     /** channel */
6417     t_u8 chan;
6418     /** Tlv buffer */
6419     t_u8 tlv_buffer[1];
6420 } MLAN_PACK_END HostCmd_DS_ACS_CONFIG;
6421 #endif
6422 
6423 /** HostCmd_SYS_CONFIG */
6424 typedef MLAN_PACK_START struct _HostCmd_DS_SYS_INFO
6425 {
6426     /** sys info */
6427     t_u8 sys_info[64];
6428 } MLAN_PACK_END HostCmd_DS_SYS_INFO;
6429 
6430 /** HostCmd_DS_STA_DEAUTH */
6431 typedef MLAN_PACK_START struct _HostCmd_DS_STA_DEAUTH
6432 {
6433     /** mac address */
6434     t_u8 mac[MLAN_MAC_ADDR_LENGTH];
6435     /** reason code */
6436     t_u16 reason;
6437 } MLAN_PACK_END HostCmd_DS_STA_DEAUTH;
6438 
6439 /** HostCmd_DS_REPORT_MIC */
6440 typedef MLAN_PACK_START struct _HostCmd_DS_REPORT_MIC
6441 {
6442     /** mac address */
6443     t_u8 mac[MLAN_MAC_ADDR_LENGTH];
6444 } MLAN_PACK_END HostCmd_DS_REPORT_MIC;
6445 
6446 /** HostCmd_PMF_CONFIG */
6447 typedef MLAN_PACK_START struct _HostCmd_DS_PMF_PARAMS
6448 {
6449     /** CMD Action GET/SET*/
6450     t_u16 action;
6451     /** Params */
6452     MLAN_PACK_START struct
6453     {
6454         t_u8 mfpc : 1; /* capable bit */
6455         t_u8 mfpr : 1; /* required bit */
6456         t_u8 rsvd : 6;
6457     } MLAN_PACK_END params;
6458 } MLAN_PACK_END HostCmd_DS_PMF_PARAMS;
6459 
6460 /** Host Command id: POWER_MGMT  */
6461 #define HOST_CMD_POWER_MGMT_EXT 0x00ef
6462 /** TLV type: AP Sleep param */
6463 #define TLV_TYPE_AP_SLEEP_PARAM (PROPRIETARY_TLV_BASE_ID + 0x6aU) // 0x016a
6464 /** TLV type: AP Inactivity Sleep param */
6465 #define TLV_TYPE_AP_INACT_SLEEP_PARAM (PROPRIETARY_TLV_BASE_ID + 0x6bU) // 0x016b
6466 
6467 /** MrvlIEtypes_sleep_param_t */
6468 typedef MLAN_PACK_START struct _MrvlIEtypes_sleep_param_t
6469 {
6470     /** Header */
6471     MrvlIEtypesHeader_t header;
6472     /** control bitmap */
6473     t_u32 ctrl_bitmap;
6474     /** min_sleep */
6475     t_u32 min_sleep;
6476     /** max_sleep */
6477     t_u32 max_sleep;
6478 } MLAN_PACK_END MrvlIEtypes_sleep_param_t;
6479 
6480 /** MrvlIEtypes_inact_sleep_param_t */
6481 typedef MLAN_PACK_START struct _MrvlIEtypes_inact_sleep_param_t
6482 {
6483     /** Header */
6484     MrvlIEtypesHeader_t header;
6485     /** inactivity timeout */
6486     t_u32 inactivity_to;
6487 
6488     /** min_awake */
6489     t_u32 min_awake;
6490     /** max_awake */
6491     t_u32 max_awake;
6492 } MLAN_PACK_END MrvlIEtypes_inact_sleep_param_t;
6493 
6494 /** HostCmd_DS_POWER_MGMT */
6495 typedef MLAN_PACK_START struct _HostCmd_DS_POWER_MGMT_EXT
6496 {
6497     /** CMD Action Get/Set*/
6498     t_u16 action;
6499     /** power mode */
6500     t_u16 power_mode;
6501 } MLAN_PACK_END HostCmd_DS_POWER_MGMT_EXT;
6502 
6503 /** MrvlIEtypes_ps_sta_ageout_t */
6504 typedef MLAN_PACK_START struct _MrvlIEtypes_ps_sta_ageout_t
6505 {
6506     /** Header */
6507     MrvlIEtypesHeader_t header;
6508     /** station age out timer */
6509     t_u32 ps_sta_ageout_timer;
6510 } MLAN_PACK_END MrvlIEtypes_ps_sta_ageout_t;
6511 
6512 /** MrvlIEtypes_sta_info_t */
6513 typedef MLAN_PACK_START struct _MrvlIEtypes_sta_info_t
6514 {
6515     /** Header */
6516     MrvlIEtypesHeader_t header;
6517     /** STA MAC address */
6518     t_u8 mac_address[MLAN_MAC_ADDR_LENGTH];
6519     /** Power mfg status */
6520     t_u8 power_mfg_status;
6521     /** RSSI */
6522     t_s8 rssi;
6523 } MLAN_PACK_END MrvlIEtypes_sta_info_t;
6524 
6525 /** HostCmd_DS_STA_LIST */
6526 typedef MLAN_PACK_START struct _HostCmd_DS_STA_LIST
6527 {
6528     /** Number of STAs */
6529     t_u16 sta_count;
6530     /* MrvlIEtypes_sta_info_t sta_info[0]; */
6531 } MLAN_PACK_END HostCmd_DS_STA_LIST;
6532 
6533 /** TLV ID : WAPI Information */
6534 #define TLV_TYPE_AP_WAPI_INFO (PROPRIETARY_TLV_BASE_ID + 0x67) // 0x0167
6535 
6536 /** MrvlIEtypes_sta_info_t */
6537 typedef MLAN_PACK_START struct _MrvlIEtypes_wapi_info_t
6538 {
6539     /** Header */
6540     MrvlIEtypesHeader_t header;
6541     /** Multicast PN */
6542     t_u8 multicast_PN[16];
6543 } MLAN_PACK_END MrvlIEtypes_wapi_info_t;
6544 #endif /* UAP_SUPPORT */
6545 
6546 #ifdef WLAN_LOW_POWER_ENABLE
6547 /** HostCmd_CONFIG_LOW_PWR_MODE */
6548 typedef MLAN_PACK_START struct _HostCmd_CONFIG_LOW_PWR_MODE
6549 {
6550     /** Enable LPM */
6551     t_u8 enable;
6552 } MLAN_PACK_END HostCmd_CONFIG_LOW_PWR_MODE;
6553 #endif /* WLAN_LOW_POWER_ENABLE */
6554 
6555 /** HostCmd_CMD_GET_TSF */
6556 typedef MLAN_PACK_START struct _HostCmd_DS_TSF
6557 {
6558     /** tsf value*/
6559     t_u64 tsf;
6560 } MLAN_PACK_END HostCmd_DS_TSF;
6561 /* WLAN_GET_TSF*/
6562 
6563 /** HostCmd_CMD_TBTT_OFFSET */
6564 typedef MLAN_PACK_START struct _HostCmd_DS_TBTT_OFFSET
6565 {
6566     /** Action */
6567     t_u16 action;
6568     /** Min TBTT offset */
6569     t_u32 min_tbtt_offset;
6570     /** Max TBTT offset */
6571     t_u32 max_tbtt_offset;
6572     /** Avg TBTT offset */
6573     t_u32 avg_tbtt_offset;
6574 } MLAN_PACK_END HostCmd_DS_TBTT_OFFSET;
6575 
6576 /** HostCmd_CONFIG_ED_MAC_MODE */
6577 typedef MLAN_PACK_START struct _HostCmd_CONFIG_ED_MAC_MODE
6578 {
6579     /** Enable/Disable ED CTRL 2G */
6580     t_u16 ed_ctrl_2g;
6581     /** Offset of default threshold */
6582     t_s16 ed_offset_2g;
6583 #if CONFIG_5GHz_SUPPORT
6584     /** Enable/Disable ED MAC mode */
6585     t_u16 ed_ctrl_5g;
6586     /** Offset of default threshold */
6587     t_s16 ed_offset_5g;
6588     /** Enable/Disable ED MAC mode */
6589     t_u32 ed_bitmap_txq_lock;
6590 #endif
6591 } MLAN_PACK_END HostCmd_CONFIG_ED_MAC_MODE;
6592 
6593 #if CONFIG_ECSA
6594 #define MRVL_ACTION_CHAN_SWITCH_ANNOUNCE (PROPRIETARY_TLV_BASE_ID + 0x341)
6595 
6596 /** MrvlIEtypes_uap_chan_switch */
6597 typedef MLAN_PACK_START struct _MrvlIEtypes_action_chan_switch_t
6598 {
6599     /** Header */
6600     MrvlIEtypesHeader_t header;
6601     /* 0 send broadcast CSA action frame, 1 send unicast CSA action frame */
6602     t_u32 mode;
6603     /**ie buf*/
6604     t_u8 ie_buf[];
6605 } MLAN_PACK_END MrvlIEtypes_action_chan_switch_t;
6606 #endif
6607 
6608 #if CONFIG_RF_TEST_MODE
6609 
6610 #define MFG_CMD_SET_TEST_MODE        1
6611 #define MFG_CMD_UNSET_TEST_MODE      0
6612 #define MFG_CMD_TX_ANT               0x1004
6613 #define MFG_CMD_RX_ANT               0x1005
6614 #define MFG_CMD_TX_CONT              0x1009
6615 #define MFG_CMD_RF_CHAN              0x100A
6616 #define MFG_CMD_CLR_RX_ERR           0x1010
6617 #define MFG_CMD_TX_FRAME             0x1021
6618 #define MFG_CMD_RFPWR                0x1033
6619 #define MFG_CMD_RF_BAND_AG           0x1034
6620 #define MFG_CMD_RF_CHANNELBW         0x1044
6621 #define MFG_CMD_RADIO_MODE_CFG       0x1211
6622 #define MFG_CMD_CONFIG_MAC_HE_TB_TX  0x110A
6623 #define MFG_CMD_CONFIG_TRIGGER_FRAME 0x110C
6624 #define MFG_CMD_OTP_MAC_ADD          0x108C
6625 #define MFG_CMD_OTP_CAL_DATA         0x121A
6626 
6627 typedef MLAN_PACK_START struct _HostCmd_DS_MFG_CMD_GENERIC_CFG
6628 {
6629     /** MFG command code */
6630     t_u32 mfg_cmd;
6631     /** Action */
6632     t_u16 action;
6633     /** Device ID */
6634     t_u16 device_id;
6635     /** MFG Error code */
6636     t_u32 error;
6637     /** value 1 */
6638     t_u32 data1;
6639     /** value 2 */
6640     t_u32 data2;
6641     /** value 3 */
6642     t_u32 data3;
6643 } MLAN_PACK_END HostCmd_DS_MFG_CMD_GENERIC_CFG;
6644 
6645 typedef MLAN_PACK_START struct _HostCmd_DS_MFG_CMD_TX_FRAME2
6646 {
6647     /** MFG command code */
6648     t_u32 mfg_cmd;
6649     /** Action */
6650     t_u16 action;
6651     /** Device ID */
6652     t_u16 device_id;
6653     /** MFG Error code */
6654     t_u32 error;
6655     /** enable */
6656     t_u32 enable;
6657     /** data_rate */
6658     t_u32 data_rate;
6659     /** frame pattern */
6660     t_u32 frame_pattern;
6661     /** frame length */
6662     t_u32 frame_length;
6663     /** BSSID */
6664     t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
6665     /** Adjust burst sifs */
6666     t_u16 adjust_burst_sifs;
6667     /** Burst sifs in us*/
6668     t_u32 burst_sifs_in_us;
6669     /** short preamble */
6670     t_u32 short_preamble;
6671     /** active sub channel */
6672     t_u32 act_sub_ch;
6673     /** short GI */
6674     t_u32 short_gi;
6675     /** Adv coding */
6676     t_u32 adv_coding;
6677     /** Tx beamforming */
6678     t_u32 tx_bf;
6679     /** HT Greenfield Mode*/
6680     t_u32 gf_mode;
6681     /** STBC */
6682     t_u32 stbc;
6683     /** power id */
6684     t_u32 rsvd[2];
6685 } MLAN_PACK_END HostCmd_DS_MFG_CMD_TX_FRAME2;
6686 
6687 typedef MLAN_PACK_START struct _HostCmd_DS_MFG_CMD_TX_CONT
6688 {
6689     /** MFG command code */
6690     t_u32 mfg_cmd;
6691     /** Action */
6692     t_u16 action;
6693     /** Device ID */
6694     t_u16 device_id;
6695     /** MFG Error code */
6696     t_u32 error;
6697     /** enable Tx*/
6698     t_u32 enable_tx;
6699     /** Continuous Wave mode */
6700     t_u32 cw_mode;
6701     /** payload pattern */
6702     t_u32 payload_pattern;
6703     /** CS Mode */
6704     t_u32 cs_mode;
6705     /** active sub channel */
6706     t_u32 act_sub_ch;
6707     /** Tx rate */
6708     t_u32 tx_rate;
6709     /** power id */
6710     t_u32 rsvd;
6711 } MLAN_PACK_END HostCmd_DS_MFG_CMD_TX_CONT;
6712 
6713 typedef MLAN_PACK_START struct _HostCmd_DS_MFG_CMD_HE_TBTX_T
6714 {
6715     /** MFG command code */
6716     t_u32 mfg_cmd;
6717     /** Action */
6718     t_u16 action;
6719     /** Device ID */
6720     t_u16 device_id;
6721     /** MFG Error code */
6722     t_u32 error;
6723     /** Enable Tx */
6724     t_u16 enable;
6725     /** Q num */
6726     t_u16 qnum;
6727     /** AID */
6728     t_u16 aid;
6729     /** AXQ Mu Timer */
6730     t_u16 axq_mu_timer;
6731     /** Tx Power */
6732     t_s16 tx_power;
6733 } MLAN_PACK_END HostCmd_DS_MFG_CMD_HE_TBTX_T;
6734 
6735 typedef MLAN_PACK_START struct _HostCmd_MFG_CMD_IEEETYPES_CTLBASICTRIGHDR_T
6736 {
6737     /** MFG command code */
6738     t_u32 mfg_cmd;
6739     /** Action */
6740     t_u16 action;
6741     /** Device ID */
6742     t_u16 device_id;
6743     /** MFG Error code */
6744     t_u32 error;
6745     /** enable Tx*/
6746     t_u32 enable_tx;
6747     /** enable Stand Alone HE TB */
6748     t_u32 standalone_hetb;
6749     /** Frame Control */
6750     mfg_cmd_IEEEtypes_FrameCtrl_t frmCtl;
6751     /** Duration */
6752     t_u16 duration;
6753     /** Destination MAC Address */
6754     t_u8 dest_addr[MLAN_MAC_ADDR_LENGTH];
6755     /** Source MAC Address */
6756     t_u8 src_addr[MLAN_MAC_ADDR_LENGTH];
6757     /** Common Info Field **/
6758     mfg_cmd_IEEEtypes_HETrigComInfo_t trig_common_field;
6759     /** User Info Field **/
6760     mfg_cmd_IEEEtypes_HETrigUserInfo_t trig_user_info_field;
6761     /** Trigger Dependent User Info Field **/
6762     mfg_cmd_IEEETypes_BasicHETrigUserInfo_t basic_trig_user_info;
6763 } MLAN_PACK_END HostCmd_MFG_CMD_IEEETYPES_CTLBASICTRIGHDR_T;
6764 
6765 typedef MLAN_PACK_START struct _HostCmd_DS_MFG_CMD_OTP_MAC_ADD_T
6766 {
6767     /** MFG command code */
6768     t_u32 mfg_cmd;
6769     /** Action */
6770     t_u16 action;
6771     /** Device ID */
6772     t_u16 device_id;
6773     /** MFG Error code */
6774     t_u32 error;
6775     /** Destination MAC Address */
6776     t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH];
6777 } MLAN_PACK_END HostCmd_DS_MFG_CMD_OTP_MAC_ADD_T;
6778 
6779 #define CAL_DATA_LEN 2800
6780 typedef MLAN_PACK_START struct _HostCmd_DS_MFG_CMD_OTP_CAL_DATA_T
6781 {
6782     /** MFG command code */
6783     t_u32 mfg_cmd;
6784     /** Action */
6785     t_u16 action;
6786     /** Device ID */
6787     t_u16 device_id;
6788     /** MFG Error code */
6789     t_u32 error;
6790     /** CAL Data write status */
6791     t_u32 cal_data_status;
6792     /** CAL Data Length*/
6793     t_u32 cal_data_len;
6794     /** Destination MAC Address */
6795     t_u8 cal_data[CAL_DATA_LEN];
6796 } MLAN_PACK_END HostCmd_DS_MFG_CMD_OTP_CAL_DATA_T;
6797 #endif
6798 
6799 #ifdef OTP_CHANINFO
6800 #define TLV_TYPE_CHAN_ATTR_CFG    (PROPRIETARY_TLV_BASE_ID + 237U)
6801 #define TLV_TYPE_REGION_INFO      (PROPRIETARY_TLV_BASE_ID + 238U)
6802 #define TLV_TYPE_POWER_TABLE      (PROPRIETARY_TLV_BASE_ID + 262U)
6803 #define TLV_TYPE_POWER_TABLE_ATTR (PROPRIETARY_TLV_BASE_ID + 317U)
6804 /** HostCmd_DS_CHAN_REGION_CFG */
6805 typedef MLAN_PACK_START struct _HostCmd_DS_CHAN_REGION_CFG
6806 {
6807     /** Action */
6808     t_u16 action;
6809 } MLAN_PACK_END HostCmd_DS_CHAN_REGION_CFG;
6810 #endif
6811 
6812 /**
6813  * @brief 802.11h Local Power Constraint NXP extended TLV
6814  */
6815 typedef MLAN_PACK_START struct
6816 {
6817     MrvlIEtypesHeader_t header; /**< NXP TLV header: ID/Len */
6818     t_u8 chan;                  /**< Channel local constraint applies to */
6819 
6820     /** Power constraint included in beacons and used by fw to offset 11d info */
6821     t_u8 constraint;
6822 
6823 } MLAN_PACK_END MrvlIEtypes_LocalPowerConstraint_t;
6824 
6825 /*
6826  *
6827  * Data structures for driver/firmware command processing
6828  *
6829  */
6830 
6831 /**  TPC Info structure sent in CMD_802_11_TPC_INFO command to firmware */
6832 typedef MLAN_PACK_START struct
6833 {
6834     MrvlIEtypes_LocalPowerConstraint_t local_constraint; /**< Local constraint */
6835     MrvlIEtypes_PowerCapability_t power_cap;             /**< Power Capability */
6836 
6837 } MLAN_PACK_END HostCmd_DS_802_11_TPC_INFO;
6838 
6839 /**  TPC Request structure sent in CMD_802_11_TPC_ADAPT_REQ command to firmware */
6840 typedef MLAN_PACK_START struct
6841 {
6842     t_u8 dest_mac[MLAN_MAC_ADDR_LENGTH]; /**< Destination STA address  */
6843     t_u16 timeout;                       /**< Response timeout in ms */
6844     t_u8 rate_index;                     /**< IEEE Rate index to send request */
6845 
6846 } MLAN_PACK_END HostCmd_TpcRequest;
6847 
6848 /**  TPC Response structure received from the CMD_802_11_TPC_ADAPT_REQ command */
6849 typedef MLAN_PACK_START struct
6850 {
6851     t_u8 tpc_ret_code; /**< Firmware command result status code */
6852     t_s8 tx_power;     /**< Reported TX Power from the TPC Report element */
6853     t_s8 link_margin;  /**< Reported link margin from the TPC Report element */
6854     t_s8 rssi;         /**< RSSI of the received TPC Report frame */
6855 
6856 } MLAN_PACK_END HostCmd_TpcResponse;
6857 
6858 /**  CMD_802_11_TPC_ADAPT_REQ substruct. Union of the TPC request and response */
6859 typedef MLAN_PACK_START union
6860 {
6861     HostCmd_TpcRequest req;   /**< Request struct sent to firmware */
6862     HostCmd_TpcResponse resp; /**< Response struct received from firmware */
6863 
6864 } MLAN_PACK_END HostCmd_DS_802_11_TPC_ADAPT_REQ;
6865 
6866 /**  CMD_802_11_CHAN_SW_ANN firmware command substructure */
6867 typedef MLAN_PACK_START struct
6868 {
6869     t_u8 switch_mode;  /**< Set to 1 for a quiet switch request, no STA tx */
6870     t_u8 new_chan;     /**< Requested new channel */
6871     t_u8 switch_count; /**< Number of TBTTs until the switch is to occur */
6872 } MLAN_PACK_END HostCmd_DS_802_11_CHAN_SW_ANN;
6873 
6874 /**
6875  * @brief Enumeration of measurement types, including max supported
6876  *        enum for 11h/11k
6877  */
6878 typedef MLAN_PACK_START enum _MeasType_t {
6879     WLAN_MEAS_BASIC = 0,                      /**< 11h: Basic */
6880     WLAN_MEAS_NUM_TYPES,                      /**< Number of enumerated measurements */
6881     WLAN_MEAS_11H_MAX_TYPE = WLAN_MEAS_BASIC, /**< Max 11h measurement */
6882 
6883 } MLAN_PACK_END MeasType_t;
6884 
6885 /**
6886  * @brief Mode octet of the measurement request element (7.3.2.21)
6887  */
6888 typedef MLAN_PACK_START struct
6889 {
6890 #ifdef BIG_ENDIAN_SUPPORT
6891     t_u8 rsvd5_7 : 3;            /**< Reserved */
6892     t_u8 duration_mandatory : 1; /**< 11k: duration spec. for meas. is mandatory */
6893     t_u8 report : 1;             /**< 11h: en/disable report rcpt. of spec. type */
6894     t_u8 request : 1;            /**< 11h: en/disable requests of specified type */
6895     t_u8 enable : 1;             /**< 11h: enable report/request bits */
6896     t_u8 parallel : 1;           /**< 11k: series or parallel with previous meas */
6897 #else
6898     t_u8 parallel : 1;           /**< 11k: series or parallel with previous meas */
6899     t_u8 enable : 1;             /**< 11h: enable report/request bits */
6900     t_u8 request : 1;            /**< 11h: en/disable requests of specified type */
6901     t_u8 report : 1;             /**< 11h: en/disable report rcpt. of spec. type */
6902     t_u8 duration_mandatory : 1; /**< 11k: duration spec. for meas. is mandatory */
6903     t_u8 rsvd5_7 : 3;            /**< Reserved */
6904 #endif                           /* BIG_ENDIAN_SUPPORT */
6905 
6906 } MLAN_PACK_END MeasReqMode_t;
6907 
6908 /**
6909  * @brief Common measurement request structure (7.3.2.21.1 to 7.3.2.21.3)
6910  */
6911 typedef MLAN_PACK_START struct
6912 {
6913     t_u8 channel;     /**< Channel to measure */
6914     t_u64 start_time; /**< TSF Start time of measurement (0 for immediate) */
6915     t_u16 duration;   /**< TU duration of the measurement */
6916 
6917 } MLAN_PACK_END MeasReqCommonFormat_t;
6918 
6919 /**
6920  * @brief Basic measurement request structure (7.3.2.21.1)
6921  */
6922 typedef MeasReqCommonFormat_t MeasReqBasic_t;
6923 
6924 /**
6925  * @brief CCA measurement request structure (7.3.2.21.2)
6926  */
6927 typedef MeasReqCommonFormat_t MeasReqCCA_t;
6928 
6929 /**
6930  * @brief RPI measurement request structure (7.3.2.21.3)
6931  */
6932 typedef MeasReqCommonFormat_t MeasReqRPI_t;
6933 
6934 /**
6935  * @brief Union of the availble measurement request types.  Passed in the
6936  *        driver/firmware interface.
6937  */
6938 typedef union
6939 {
6940     MeasReqBasic_t basic; /**< Basic measurement request */
6941     MeasReqCCA_t cca;     /**< CCA measurement request */
6942     MeasReqRPI_t rpi;     /**< RPI measurement request */
6943 
6944 } MeasRequest_t;
6945 
6946 /**
6947  * @brief Mode octet of the measurement report element (7.3.2.22)
6948  */
6949 typedef MLAN_PACK_START struct
6950 {
6951 #ifdef BIG_ENDIAN_SUPPORT
6952     t_u8 rsvd3_7 : 5;   /**< Reserved */
6953     t_u8 refused : 1;   /**< Measurement refused */
6954     t_u8 incapable : 1; /**< Incapable of performing measurement */
6955     t_u8 late : 1;      /**< Start TSF time missed for measurement */
6956 #else
6957     t_u8 late : 1;               /**< Start TSF time missed for measurement */
6958     t_u8 incapable : 1;          /**< Incapable of performing measurement */
6959     t_u8 refused : 1;            /**< Measurement refused */
6960     t_u8 rsvd3_7 : 5;            /**< Reserved */
6961 #endif                  /* BIG_ENDIAN_SUPPORT */
6962 
6963 } MLAN_PACK_END MeasRptMode_t;
6964 
6965 /**
6966  * @brief Basic measurement report (7.3.2.22.1)
6967  */
6968 typedef MLAN_PACK_START struct
6969 {
6970     t_u8 channel;          /**< Channel to measured */
6971     t_u64 start_time;      /**< Start time (TSF) of measurement */
6972     t_u16 duration;        /**< Duration of measurement in TUs */
6973     MeasRptBasicMap_t map; /**< Basic measurement report */
6974 
6975 } MLAN_PACK_END MeasRptBasic_t;
6976 
6977 /**
6978  * @brief CCA measurement report (7.3.2.22.2)
6979  */
6980 typedef MLAN_PACK_START struct
6981 {
6982     t_u8 channel;       /**< Channel to measured */
6983     t_u64 start_time;   /**< Start time (TSF) of measurement */
6984     t_u16 duration;     /**< Duration of measurement in TUs  */
6985     t_u8 busy_fraction; /**< Fractional duration CCA indicated chan busy */
6986 
6987 } MLAN_PACK_END MeasRptCCA_t;
6988 
6989 /**
6990  * @brief RPI measurement report (7.3.2.22.3)
6991  */
6992 typedef MLAN_PACK_START struct
6993 {
6994     t_u8 channel;     /**< Channel to measured  */
6995     t_u64 start_time; /**< Start time (TSF) of measurement */
6996     t_u16 duration;   /**< Duration of measurement in TUs  */
6997     t_u8 density[8];  /**< RPI Density histogram report */
6998 
6999 } MLAN_PACK_END MeasRptRPI_t;
7000 
7001 /**
7002  * @brief Union of the availble measurement report types.  Passed in the
7003  *        driver/firmware interface.
7004  */
7005 typedef union
7006 {
7007     MeasRptBasic_t basic; /**< Basic measurement report */
7008     MeasRptCCA_t cca;     /**< CCA measurement report */
7009     MeasRptRPI_t rpi;     /**< RPI measurement report */
7010 
7011 } MeasReport_t;
7012 
7013 /**
7014  * @brief Structure passed to firmware to perform a measurement
7015  */
7016 typedef MLAN_PACK_START struct
7017 {
7018     t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH]; /**< Reporting STA address */
7019     t_u8 dialog_token;                   /**< Measurement dialog toke */
7020     MeasReqMode_t req_mode;              /**< Report mode  */
7021     MeasType_t meas_type;                /**< Measurement type */
7022     MeasRequest_t req;                   /**< Measurement request data */
7023 
7024 } MLAN_PACK_END HostCmd_DS_MEASUREMENT_REQUEST;
7025 
7026 /**
7027  * @brief Structure passed back from firmware with a measurement report,
7028  *        also can be to send a measurement report to another STA
7029  */
7030 typedef MLAN_PACK_START struct
7031 {
7032     t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH]; /**< Reporting STA address */
7033     t_u8 dialog_token;                   /**< Measurement dialog token */
7034     MeasRptMode_t rpt_mode;              /**< Report mode */
7035     MeasType_t meas_type;                /**< Measurement type */
7036     MeasReport_t rpt;                    /**< Measurement report data */
7037 
7038 } MLAN_PACK_END HostCmd_DS_MEASUREMENT_REPORT;
7039 
7040 typedef MLAN_PACK_START struct
7041 {
7042     t_u16 startFreq;
7043     t_u8 chanWidth;
7044     t_u8 chanNum;
7045 
7046 } MLAN_PACK_END MrvlChannelDesc_t;
7047 
7048 typedef MLAN_PACK_START struct
7049 {
7050     t_u8 modGroup;
7051     t_u8 txPower;
7052 
7053 } MLAN_PACK_END MrvlChanTrpcEntry_t;
7054 
7055 typedef MLAN_PACK_START struct
7056 {
7057     MrvlIEtypesHeader_t header; /**< Header */
7058 
7059     MrvlChannelDesc_t chanDesc;
7060     MrvlChanTrpcEntry_t chanTrpcEntry[10];
7061 
7062 } MLAN_PACK_END MrvlIEtypes_ChanTrpcCfg_t;
7063 
7064 typedef MLAN_PACK_START struct
7065 {
7066     MrvlIEtypes_ChanTrpcCfg_t ChanTrpc[26];
7067 
7068 } MLAN_PACK_END MrvlIEtypes_ChanTrpc_t;
7069 
7070 typedef MLAN_PACK_START struct
7071 {
7072     t_u16 action;
7073     t_u16 reserved;
7074     // MrvlIEtypes_ChanTrpc_t ChanTrpcG;
7075     t_u8 tlv_buffer[1]; /** MrvlIEtypes_ChanTrpcCfg_t TLVs */
7076 } MLAN_PACK_END HostCmd_DS_CHAN_TRPC_CONFIG;
7077 
7078 typedef MLAN_PACK_START struct
7079 {
7080     MrvlIEtypesHeader_t Header; /**< Header */
7081 
7082     MeasRptBasicMap_t map;      /**< IEEE 802.11h basic meas report */
7083 } MLAN_PACK_END MrvlIEtypes_ChanRpt11hBasic_t;
7084 
7085 typedef MLAN_PACK_START struct
7086 {
7087     MrvlChannelDesc_t chan_desc; /**< Channel band, number */
7088     t_u32 millisec_dwell_time;   /**< Channel dwell time in milliseconds */
7089 } MLAN_PACK_END HostCmd_DS_CHAN_RPT_REQ;
7090 
7091 typedef MLAN_PACK_START struct
7092 {
7093     t_u32 cmd_result;   /**< Rpt request command result (0 == SUCCESS) */
7094     t_u64 start_tsf;    /**< TSF Measurement started */
7095     t_u32 duration;     /**< Duration of measurement in microsecs */
7096     t_u8 tlv_buffer[1]; /**< TLV Buffer */
7097 } MLAN_PACK_END HostCmd_DS_CHAN_RPT_RSP;
7098 
7099 #if CONFIG_WIFI_EU_CRYPTO
7100 typedef MLAN_PACK_START struct
7101 {
7102     /* EncDec: 0-Decrypt, 1-Encrypt */
7103     t_u16 EncDec;
7104     /* Algorithm: 1-RC4, 2-AES, 3-AES_KEY_WRAP,4-AES-CCM */
7105     t_u16 Algorithm;
7106     /* KeyLength: Length of Key (bytes) */
7107     t_u16 KeyLength;
7108     /* Key: Key */
7109     t_u8 Key[32];
7110     /* NonceLength: Length of Nonce (bytes) */
7111     t_u16 NonceLength;
7112     /* Nonce: Nonce */
7113     t_u8 Nonce[14];
7114     /* AADLength: Length of AAD (bytes) */
7115     t_u16 AADLength;
7116     /* AAD: AAD */
7117     t_u8 AAD[32];
7118     /* DataType: DataType */
7119     t_u16 DataType;
7120     /* DataLength: Data Length */
7121     t_u16 DataLength;
7122     /* Data: Data */
7123     t_u8 Data[1];
7124 } MLAN_PACK_END HostCmd_DS_EU_AES_CRYPTO;
7125 
7126 typedef MLAN_PACK_START struct
7127 {
7128     /* EncDec: 0-Decrypt, 1-Encrypt */
7129     t_u16 EncDec;
7130     /* Algorithm: 1-RC4, 2-AES, 3-AES_KEY_WRAP, 4-AES-CCMP, 6-AES-GCMP */
7131     t_u16 Algorithm;
7132     /* KeyLength: Length of KeyIV (bytes) */
7133     t_u16 KeyIVLength;
7134     /* KeyIV: KeyIV */
7135     t_u8 KeyIV[32];
7136     /* KeyLength: Length of Key (bytes) */
7137     t_u16 KeyLength;
7138     /* Key: Key */
7139     t_u8 Key[32];
7140     /* DataType: DataType */
7141     t_u16 DataType;
7142     /* DataLength: Data Length */
7143     t_u16 DataLength;
7144     /* Data: Data */
7145     t_u8 Data[1];
7146 } MLAN_PACK_END HostCmd_DS_EU_CRYPTO;
7147 
7148 typedef enum _crypto_algorithm
7149 {
7150     CRYPTO_RC4      = 1,
7151     CRYPTO_AES_ECB  = 2,
7152     CRYPTO_AES_WRAP = 3,
7153     CRYPTO_AES_CCMP = 4,
7154     CRYPTO_AES_GCMP = 6,
7155 } crypto_algorithm;
7156 
7157 typedef MLAN_PACK_START struct
7158 {
7159     /* KeyLength: Length of KeyIV (bytes) */
7160     t_u16 KeyIVLength;
7161     /* KeyIV: KeyIV */
7162     t_u8 KeyIV[32];
7163     /* NonceLength: Length of Nonce (bytes) */
7164     t_u16 NonceLength;
7165     /* Nonce: Nonce */
7166     t_u8 Nonce[14];
7167     /* AADLength: Length of AAD (bytes) */
7168     t_u16 AADLength;
7169     /* AAD: AAD */
7170     t_u8 AAD[32];
7171     /* KeyLength: Length of Key (bytes) */
7172     t_u16 KeyLength;
7173     /* Key: Key */
7174     t_u8 Key[32];
7175     /* DataLength: Length of Data (bytes) */
7176     t_u16 *DataLength;
7177     /* Data: Data */
7178     t_u8 *Data;
7179 } MLAN_PACK_END EU_Crypto;
7180 #endif
7181 
7182 #if (CONFIG_IPS)
7183 typedef MLAN_PACK_START struct
7184 {
7185     t_u32 enable;
7186 } MLAN_PACK_END HostCmd_DS_IPS_CONFIG;
7187 #endif
7188 
7189 /** statistics threshold */
7190 typedef MLAN_PACK_START struct
7191 {
7192     /** Header */
7193     MrvlIEtypesHeader_t header;
7194     /** value */
7195     t_u8 value;
7196     /** reporting frequency */
7197     t_u8 frequency;
7198 } MLAN_PACK_END MrvlIEtypes_BeaconHighRssiThreshold_t, MrvlIEtypes_BeaconLowRssiThreshold_t,
7199     MrvlIEtypes_BeaconHighSnrThreshold_t, MrvlIEtypes_BeaconLowSnrThreshold_t, MrvlIEtypes_FailureCount_t,
7200     MrvlIEtypes_DataLowRssiThreshold_t, MrvlIEtypes_DataHighRssiThreshold_t, MrvlIEtypes_DataLowSnrThreshold_t,
7201     MrvlIEtypes_DataHighSnrThreshold_t, MrvlIETypes_PreBeaconMissed_t, MrvlIEtypes_BeaconsMissed_t;
7202 
7203 /** statistics threshold for LinkQuality */
7204 typedef MLAN_PACK_START struct
7205 {
7206     /** Header */
7207     MrvlIEtypesHeader_t header;
7208     /** Link SNR threshold (dB) */
7209     t_u16 link_snr;
7210     /** Link SNR frequency */
7211     t_u16 link_snr_freq;
7212     /* Second minimum rate value as per the rate table below */
7213     t_u16 link_rate;
7214     /* Second minimum rate frequency */
7215     t_u16 link_rate_freq;
7216     /* Tx latency value (us) */
7217     t_u16 link_tx_latency;
7218     /* Tx latency frequency */
7219     t_u16 link_tx_lantency_freq;
7220 } MLAN_PACK_END MrvlIEtypes_LinkQualityThreshold_t;
7221 
7222 /** Supported operating classes element */
7223 typedef MLAN_PACK_START struct _MrvlIETypes_SuppOperClass_t
7224 {
7225     /** Header */
7226     MrvlIEtypesHeader_t header;
7227     /** Current operationg class **/
7228     t_u8 current_oper_class;
7229     /** Operating class list */
7230     t_u8 oper_class[1];
7231 } MLAN_PACK_END MrvlIETypes_SuppOperClass_t;
7232 
7233 #if CONFIG_MULTI_CHAN
7234 typedef MLAN_PACK_START struct _MrvlTypes_DrcsTimeSlice_t
7235 {
7236     /** Header */
7237     MrvlIEtypesHeader_t header;
7238     /** Channel Index*/
7239     t_u16 chan_idx;
7240     /** Channel time (in TU) for chan_idx*/
7241     t_u8 chantime;
7242     /** Channel swith time (in TU) for chan_idx*/
7243     t_u8 switchtime;
7244     /** Undoze time (in TU) for chan_idx*/
7245     t_u8 undozetime;
7246     /** Rx traffic control scheme when channel switch*/
7247     /** only valid for GC/STA interface*/
7248     t_u8 mode;
7249 } MLAN_PACK_END MrvlTypes_DrcsTimeSlice_t;
7250 typedef MLAN_PACK_START struct _HostCmd_DS_MULTI_CHAN_CFG
7251 {
7252     /** Action */
7253     t_u16 action;
7254     /** Channel time */
7255     t_u32 channel_time;
7256     /** Buffer weight */
7257     t_u8 buffer_weight;
7258     /** TLV buffer */
7259     t_u8 tlv_buf[];
7260     /* t_u8 *tlv_buf; */
7261 } MLAN_PACK_END HostCmd_DS_MULTI_CHAN_CFG;
7262 
7263 typedef MLAN_PACK_START struct _HostCmd_DS_DRCS_CFG
7264 {
7265     /** Action */
7266     t_u16 action;
7267     /** TLV buffer */
7268     MrvlTypes_DrcsTimeSlice_t time_slicing;
7269     /** TLV buffer */
7270     MrvlTypes_DrcsTimeSlice_t drcs_buf[];
7271     /* t_u8 *tlv_buf; */
7272 } MLAN_PACK_END HostCmd_DS_DRCS_CFG;
7273 
7274 typedef MLAN_PACK_START struct _HostCmd_DS_MULTI_CHAN_POLICY
7275 {
7276     /** Action */
7277     t_u16 action;
7278     /** Multi-channel Policy */
7279     t_u16 policy;
7280 } MLAN_PACK_END HostCmd_DS_MULTI_CHAN_POLICY;
7281 
7282 /** MrvlIEtypes_multi_chan_info_t */
7283 typedef MLAN_PACK_START struct _MrvlIETypes_mutli_chan_info_t
7284 {
7285     /** Header */
7286     MrvlIEtypesHeader_t header;
7287     /** multi channel operation status */
7288     t_u16 status;
7289     /** Tlv buffer */
7290     t_u8 tlv_buffer[];
7291 } MLAN_PACK_END MrvlIEtypes_multi_chan_info_t;
7292 #endif
7293 
7294 #if (CONFIG_11MC) || (CONFIG_11AZ)
7295 /**Structure for FTM complete subevent*/
7296 typedef MLAN_PACK_START struct _wls_subevent_ftm_complete
7297 {
7298     /** BSS Number */
7299     t_u8 bssNum;
7300     /** BSS Type */
7301     t_u8 bssType;
7302     /** MAC address of the responder */
7303     t_u8 mac[MLAN_MAC_ADDR_LENGTH];
7304     /** Average RTT */
7305     t_u32 avg_rtt;
7306     /** Average Clock offset */
7307     t_u32 avg_clk_offset;
7308     /** Measure start timestamp */
7309     t_u32 meas_start_tsf;
7310 } MLAN_PACK_END wls_subevent_ftm_complete_t;
7311 
7312 /** Structure for FTM events*/
7313 typedef MLAN_PACK_START struct _wls_event_t
7314 {
7315     /* No of bytes in packet including this field */
7316     t_u16 length;
7317     /* Type: Event (3) */
7318     t_u16 type;
7319     /** Event ID */
7320     t_u16 event_id;
7321     /** BSS index number for multiple BSS support */
7322     t_u8 bss_index;
7323     /** BSS type */
7324     t_u8 bss_type;
7325     /** sub event id */
7326     t_u8 sub_event_id;
7327     union
7328     {
7329         /** FTM Complete Sub event*/
7330         wls_subevent_ftm_complete_t ftm_complete;
7331     } e;
7332 } MLAN_PACK_END wls_event_t;
7333 
7334 /** Structure of FTM_SESSION_CFG_NTB_RANGING / FTM_SESSION_CFG_TB_RANGING TLV data*/
7335 typedef MLAN_PACK_START struct _ranging_cfg
7336 {
7337     /** Indicates the channel BW for session*/
7338     /*0: HE20, 1: HE40, 2: HE80, 3: HE80+80, 4: HE160, 5:HE160_SRF*/
7339     t_u8 format_bw;
7340     /** indicates for bandwidths less than or equal to 80 MHz the maximum number of space-time streams to be used in
7341      * DL/UL NDP frames in the session*/
7342     t_u8 max_i2r_sts_upto80;
7343     /**indicates for bandwidths less than or equal to 80 MHz the maximum number of space-time streams to be used in
7344      * DL/UL NDP frames in the session*/
7345     t_u8 max_r2i_sts_upto80;
7346     /**Specify measurement freq in Hz to calculate measurement interval*/
7347     t_u8 az_measurement_freq;
7348     /**Indicates the number of measurements to be done for session*/
7349     t_u8 az_number_of_measurements;
7350     /** Initator lmr feedback */
7351     t_u8 i2r_lmr_feedback;
7352     /**Include location civic request (Expect location civic from responder)*/
7353     t_u8 civic_req;
7354     /**Include LCI request (Expect LCI info from responder)*/
7355     t_u8 lci_req;
7356 } MLAN_PACK_END ranging_cfg_t;
7357 
7358 /** Structure of FTM_SESSION_CFG TLV data*/
7359 typedef MLAN_PACK_START struct _ftm_session_cfg
7360 {
7361     /** Indicates how many burst instances are requested for the FTM session*/
7362     t_u8 burst_exponent;
7363     /** Indicates the duration of a burst instance*/
7364     t_u8 burst_duration;
7365     /**Minimum time between consecutive FTM frames*/
7366     t_u8 min_delta_FTM;
7367     /**ASAP/non-ASAP casel*/
7368     t_u8 is_ASAP;
7369     /**Number of FTMs per burst*/
7370     t_u8 per_burst_FTM;
7371     /**FTM channel spacing: HT20/HT40/VHT80/... */
7372     t_u8 channel_spacing;
7373     /**Indicates the interval between two consecutive burst instances*/
7374     t_u16 burst_period;
7375 } MLAN_PACK_END ftm_session_cfg_t;
7376 
7377 /** Structure for FTM_SESSION_CFG_LOCATION_CIVIC TLV data*/
7378 typedef MLAN_PACK_START struct _civic_loc_cfg
7379 {
7380     /**Civic location type*/
7381     t_u8 civic_location_type;
7382     /**Country code*/
7383     t_u16 country_code;
7384     /**Civic address type*/
7385     t_u8 civic_address_type;
7386     /**Civic address length*/
7387     t_u8 civic_address_length;
7388     /**Civic Address*/
7389     t_u8 civic_address[256];
7390 } MLAN_PACK_END civic_loc_cfg_t;
7391 
7392 /** Structure for FTM_SESSION_CFG_LCI TLV data*/
7393 typedef MLAN_PACK_START struct _lci_cfg
7394 {
7395     /** known longitude*/
7396     double longitude;
7397     /** known Latitude*/
7398     double latitude;
7399     /** known altitude*/
7400     double altitude;
7401     /** known Latitude uncertainty*/
7402     t_u8 lat_unc;
7403     /** known Longitude uncertainty*/
7404     t_u8 long_unc;
7405     /** Known Altitude uncertainty*/
7406     t_u8 alt_unc;
7407     /** 1 word for additional Z information */
7408     t_u32 z_info;
7409 } MLAN_PACK_END lci_cfg_t;
7410 
7411 /** Structure for FTM_SESSION_CFG_NTB_RANGING TLV*/
7412 typedef MLAN_PACK_START struct _ranging_cfg_tlv
7413 {
7414     /** Type*/
7415     t_u16 type;
7416     /** Length*/
7417     t_u16 len;
7418     /** Value*/
7419     ranging_cfg_t val;
7420 } MLAN_PACK_END ranging_cfg_tlv_t;
7421 
7422 /** Structure for FTM_SESSION_CFG  TLV*/
7423 typedef MLAN_PACK_START struct _ftm_session_cfg_tlv
7424 {
7425     /** Type*/
7426     t_u16 type;
7427     /** Length*/
7428     t_u16 len;
7429     /** Value*/
7430     ftm_session_cfg_t val;
7431     t_u8 civic_req;
7432     t_u8 lci_req;
7433 } MLAN_PACK_END ftm_session_cfg_tlv_t;
7434 
7435 /** Structure for FTM_SESSION_CFG_LOCATION_CIVIC TLV*/
7436 typedef MLAN_PACK_START struct _civic_loc_tlv
7437 {
7438     /** Type*/
7439     t_u16 type;
7440     /** Length*/
7441     t_u16 len;
7442     /** Value*/
7443     civic_loc_cfg_t val;
7444 } MLAN_PACK_END civic_loc_tlv_t;
7445 
7446 /** Structure for FTM_SESSION_CFG_LCI TLV*/
7447 typedef MLAN_PACK_START struct _lci_tlv
7448 {
7449     /** Type*/
7450     t_u16 type;
7451     /** Length*/
7452     t_u16 len;
7453     /** Value*/
7454     lci_cfg_t val;
7455 } MLAN_PACK_END lci_tlv_t;
7456 
7457 /** Structure for DOT11MC FTM_SESSION_CFG */
7458 typedef MLAN_PACK_START struct _dot11mc_ftm_cfg
7459 {
7460     /** FTM session cfg*/
7461     ftm_session_cfg_tlv_t sess_tlv;
7462     /** Location Request cfg*/
7463     lci_tlv_t lci_tlv;
7464     /** Civic location cfg*/
7465     civic_loc_tlv_t civic_tlv;
7466 
7467 } MLAN_PACK_END dot11mc_ftm_cfg_t;
7468 
7469 /** Structure for DOT11AZ FTM_SESSION_CFG */
7470 typedef MLAN_PACK_START struct _dot11az_ftmcfg_ntb_t
7471 {
7472     /** NTB session cfg */
7473     ranging_cfg_tlv_t range_tlv;
7474 } MLAN_PACK_END dot11az_ftm_cfg_t;
7475 
7476 /** Type definition for hostcmd_ftm_session_cfg */
7477 typedef MLAN_PACK_START struct _HostCmd_FTM_SESSION_CFG
7478 {
7479     /** 0:Get, 1:Set */
7480     t_u16 action;
7481     /** FTM_SESSION_CFG_TLVs*/
7482     union
7483     {
7484         /**11az cfg*/
7485         dot11az_ftm_cfg_t cfg_11az;
7486         /** 11mc cfg*/
7487         dot11mc_ftm_cfg_t cfg_11mc;
7488     } tlv;
7489 } MLAN_PACK_END HostCmd_FTM_SESSION_CFG;
7490 
7491 /** Type definition for hostcmd_ftm_session_ctrl */
7492 typedef MLAN_PACK_START struct _Hostcmd_FTM_SESSION_CTRL
7493 {
7494     /** 0: Not used, 1: Start, 2: Stop*/
7495     t_u16 action;
7496     /*FTM for ranging*/
7497     t_u8 for_ranging;
7498     /** Mac address of the peer with whom FTM session is required*/
7499     t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH];
7500     /** Channel on which FTM must be started */
7501     t_u8 chan;
7502 } MLAN_PACK_END HostCmd_FTM_SESSION_CTRL;
7503 
7504 #if CONFIG_WLS_CSI_PROC
7505 typedef MLAN_PACK_START struct _CSI_EVENT_HEADER_t
7506 {
7507     /** No of bytes in packet including this field */
7508     t_u16 length;
7509     /** Type: Event (3) */
7510     t_u16 type;
7511     /** Event ID */
7512     t_u16 event_id;
7513     /** BSS index number for multiple BSS support */
7514     t_u8 bss_index;
7515     /** BSS type */
7516     t_u8 bss_type;
7517 } MLAN_PACK_END csi_event_t;
7518 
7519 typedef MLAN_PACK_START struct _Hostcmd_WLS_CSI_ACK
7520 {
7521     t_u16 action;
7522     t_u16 sub_id;
7523     t_u32 ack;
7524     t_u32 phase_roll;
7525     t_u32 firstpath_delay;
7526     t_u32 fft_size_pointer;
7527     t_u32 csi_tsf;
7528 } MLAN_PACK_END HostCmd_WLS_CSI_ACK;
7529 #endif
7530 
7531 #endif
7532 
7533 #if CONFIG_1AS
7534 /** HostCmd_DS_HOST_CLOCK_CFG */
7535 typedef MLAN_PACK_START struct _HostCmd_DS_HOST_CLOCK_CFG
7536 {
7537     /** Action */
7538     t_u16 action;
7539     /** host time nano secs value */
7540     t_u64 time;
7541     /** HW time in nano sec value */
7542     t_u64 hw_time;
7543 } MLAN_PACK_END HostCmd_DS_HOST_CLOCK_CFG;
7544 #endif
7545 
7546 #if CONFIG_CSI
7547 /** MrvlIEtypes_channel_bandcfg_t */
7548 typedef MLAN_PACK_START struct _MrvlIEtypes_channel_bandcfg_t
7549 {
7550     /** Header */
7551     MrvlIEtypesHeader_t header;
7552     /** Enable getting CSI data on special channel */
7553     t_u8 csi_monitor_enable;
7554     /** CSI data received in cfg channel with mac addr filter, not only RA is us or other*/
7555     t_u8 ra4us;
7556     /** bandconfig*/
7557     t_u8 bandconfig;
7558     /** channel num */
7559     t_u8 channel;
7560 } MLAN_PACK_END MrvlIEtypes_channel_bandcfg_t;
7561 
7562 /**
7563  * @brief Structure passed to firmware to config csi info
7564  */
7565 typedef MLAN_PACK_START struct _HostCmd_DS_CSI_CFG
7566 {
7567     /** Action */
7568     t_u16 action;
7569     /** Header ID*/
7570     t_u32 head_id;
7571     /** Tail ID */
7572     t_u32 tail_id;
7573     /** Number of CSI filters */
7574     t_u8 csi_filter_cnt;
7575     /** Chip ID */
7576     t_u8 chip_id;
7577     /** CSI filters */
7578     wifi_csi_filter_t csi_filter[CSI_FILTER_MAX];
7579     /**channel and bandconfig*/
7580     MrvlIEtypes_channel_bandcfg_t channel_bandconfig;
7581 } MLAN_PACK_END HostCmd_DS_CSI_CFG;
7582 #endif
7583 
7584 /** HostCmd_DS_BOOT_SLEEP */
7585 typedef MLAN_PACK_START struct _HostCmd_DS_BOOT_SLEEP
7586 {
7587     /** Set or Get */
7588     t_u16 action;
7589     /** 1 on or 0 off */
7590     t_u16 enable;
7591 } MLAN_PACK_END HostCmd_DS_BOOT_SLEEP;
7592 
7593 #if CONFIG_TSP
7594 typedef MLAN_PACK_START struct _HostCmd_DS_TSP_CFG
7595 {
7596     /** Action */
7597     t_u16 action;
7598     /** enable/disabel tsp algothrim*/
7599     t_u16 thermalPowerMgmtenable;
7600     /** backoff*/
7601     t_u32 powerMgmtBackoff;
7602     /** high Threshold*/
7603     t_u32 highPwrBOThrshld;
7604     /** low Threshold*/
7605     t_u32 lowPwrBOThrshld;
7606     /** DUTY_CYC_STEP */
7607     t_u32 dutycycstep;
7608     /** DUTY_CYC_MIN */
7609     t_u32 dutycycmin;
7610     /** HIGH_THRESHOLD_TEMP*/
7611     int highthrtemp;
7612     /** LOW_THRESHOLD_TEMP*/
7613     int lowthrtemp;
7614     /** CAU TSEN temperature */
7615     int currCAUTemp;
7616     /** RFU temperature */
7617     int currRFUTemp;
7618 } MLAN_PACK_END HostCmd_DS_TSP_CFG;
7619 
7620 typedef MLAN_PACK_START struct _TSP_CFG
7621 {
7622     /** enable/disabel tsp algothrim*/
7623     t_u16 *thermalPowerMgmtenable;
7624     /** backoff*/
7625     t_u32 *powerMgmtBackoff;
7626     /** high Threshold*/
7627     t_u32 *highPwrBOThrshld;
7628     /** low Threshold*/
7629     t_u32 *lowPwrBOThrshld;
7630     /** DUTY_CYC_STEP */
7631     t_u32 *dutycycstep;
7632     /** DUTY_CYC_MIN */
7633     t_u32 *dutycycmin;
7634     /** HIGH_THRESHOLD_TEMP*/
7635     int *highthrtemp;
7636     /** LOW_THRESHOLD_TEMP*/
7637     int *lowthrtemp;
7638     /** CAU TSEN temperature */
7639     int *currCAUTemp;
7640     /** RFU temperature */
7641     int *currRFUTemp;
7642 } MLAN_PACK_END TSP_CFG;
7643 #endif
7644 
7645 #if CONFIG_COEX_DUTY_CYCLE
7646 /** TLV type : Coex duty cycle */
7647 #define TLV_TYPE_COEX_DUTY_CYCLE (PROPRIETARY_TLV_BASE_ID + 0x290)
7648 
7649 /** MrvlIETypes_SingleAntDutyCycle_Config_t */
7650 typedef MLAN_PACK_START struct _MrvlIETypes_SingleAntDutyCycle_Config_t
7651 {
7652     /** Header */
7653     MrvlIEtypesHeader_t header;
7654     /** Enable: 0x1 generic time, 0x2 Enable Dutycycle */
7655     t_u16 enabled;
7656     /** Enter value in Units (1Unit = 1ms), should be no more than wlanTime */
7657     t_u16 nbTime;
7658     /** Enter value in Units (1Unit = 1ms) */
7659     t_u16 wlanTime;
7660 } MLAN_PACK_END MrvlIETypes_SingleAntDutyCycle_Config_t;
7661 
7662 /** HostCmd_SIGNLE_ANT_DUTY_CYCLE structure */
7663 typedef MLAN_PACK_START struct _HostCmd_SIGNLE_ANT_DUTY_CYCLE
7664 {
7665     /** Action */
7666     t_u16 action;
7667     /** Reserved field */
7668     t_u16 reserved;
7669     /** Single Ant Duty Cycle Configuration Data */
7670     MrvlIETypes_SingleAntDutyCycle_Config_t single_ant_cfg_data;
7671 } MLAN_PACK_END HostCmd_SIGNLE_ANT_DUTY_CYCLE;
7672 
7673 /** MrvlIETypes_DualAntDutyCycle_Config_t */
7674 typedef MLAN_PACK_START struct _MrvlIETypes_DualAntDutyCycle_Config_t
7675 {
7676     /** Header */
7677     MrvlIEtypesHeader_t header;
7678     /** Enable: 0x1 generic time, 0x2 Enable Dutycycle */
7679     t_u16 enabled;
7680     /** Enter value in Units (1Unit = 1ms), should be no more than TotalTime */
7681     t_u16 nbTime;
7682     /** Enter value in Units (1Unit = 1ms) */
7683     t_u16 wlanTime;
7684     /** Enter value in Units (1Unit = 1ms) */
7685     t_u16 wlanBlockTime;
7686 } MLAN_PACK_END MrvlIETypes_DualAntDutyCycle_Config_t;
7687 
7688 /** HostCmd_DUAL_ANT_DUTY_CYCLE structure */
7689 typedef MLAN_PACK_START struct _HostCmd_DUAL_ANT_DUTY_CYCLE
7690 {
7691     t_u16 action;
7692     t_u16 reserved;
7693     /** Dual Ant Duty Cycle Configuration Data */
7694     MrvlIETypes_DualAntDutyCycle_Config_t dual_ant_cfg_data;
7695 } MLAN_PACK_END HostCmd_DUAL_ANT_DUTY_CYCLE;
7696 #endif
7697 
7698 #if (CONFIG_EXTERNAL_COEX_PTA) || (CONFIG_IMD3_CFG)
7699 
7700 /** HostCmd_EXTERNAL_COEX_PTA structure */
7701 typedef MLAN_PACK_START struct _MrvlIETypes_Coex_params_t
7702 {
7703     /** External coex pta type */
7704     t_u16 tlv_type;
7705     /** Externel coex pta tlv length */
7706     t_u16 tlv_length;
7707 } MLAN_PACK_END MrvlIETypes_Coex_params_t;
7708 #endif
7709 
7710 #if CONFIG_EXTERNAL_COEX_PTA
7711 /** MrvlIETypes_DualAntDutyCycle_Config_t */
7712 typedef MLAN_PACK_START struct _MrvlIETypes_ExternalCoexPta_Config_t
7713 {
7714     MrvlIETypes_Coex_params_t param;
7715     /** Enable: 0x01, Disable: 0x00 */
7716     t_u8 enabled;
7717     /** Enable ExtWifiBtArb: 0x01, Disable ExWifiBtArb: 0x00 */
7718     t_u8 ext_WifiBtArb;
7719     /** Active high: 0x00, Active low: 0x01 */
7720     t_u8 polGrantPin;
7721     /**  Enable PriPtaInt: 0x01, Disable PriPtaInt: 0x00 */
7722     t_u8 enable_PriPtaInt;
7723     /** State input disable: 0x00, State info is from state pin: 0x01, State info is sampled on priority pin: 0x02 */
7724     t_u8 enable_StatusFromPta;
7725     /** Timing to sample Priority bit */
7726     t_u16 setPriSampTiming;
7727     /** Timing to sample Tx/Rx info */
7728     t_u16 setStateInfoSampTiming;
7729     /** Enable external traffic Tx/Rx Priority: 0x01, Disable external traffic Tx/Rx Priority: 0x00 */
7730     t_u8 extRadioTrafficPrio;
7731     /** Enable wci-2 interface: 0x01, Disable wci-2 interface: 0x00 */
7732     t_u8 extCoexHwIntWci2;
7733 } MLAN_PACK_END MrvlIETypes_ExternalCoexPta_Config_t;
7734 
7735 /** HostCmd_EXTERNAL_COEX_PTA structure */
7736 typedef MLAN_PACK_START struct _HostCmd_EXTERNAL_COEX_PTA
7737 {
7738     /** Get: 0x00, Set: 0x01 */
7739     t_u16 action;
7740     /** Reserved filed */
7741     t_u16 reserved;
7742     /** External Coex Pta Configuration Data */
7743     MrvlIETypes_ExternalCoexPta_Config_t coex_pta_cfg_data;
7744 } MLAN_PACK_END HostCmd_EXTERNAL_COEX_PTA;
7745 #endif
7746 
7747 #if CONFIG_IMD3_CFG
7748 /** MrvlIETypes_IMD_Config_t */
7749 typedef MLAN_PACK_START struct _MrvlIETypes_IMD_Config_t
7750 {
7751     /** Tlv param*/
7752     MrvlIETypes_Coex_params_t param;
7753     /** Rbc mode*/
7754     t_u8 rbc_mode;
7755     /** Reserved filed*/
7756     t_u8 reserved;
7757     /** Dynamic Mode */
7758     t_u16 DynamicMode;
7759 } MLAN_PACK_END MrvlIETypes_IMD_Config_t;
7760 /** HostCmd_IMD3_CFG structure */
7761 typedef MLAN_PACK_START struct _HostCmd_IMD3_CFG
7762 {
7763     /** Get: 0x00, Set: 0x01 */
7764     t_u16 action;
7765     /** Reserved filed */
7766     t_u16 reserved;
7767     /** Imd config */
7768     MrvlIETypes_IMD_Config_t imd_cfg;
7769 } MLAN_PACK_END HostCmd_IMD3_CFG;
7770 #endif
7771 
7772 /** HostCmd_DS_80211_TX_FRAME */
7773 typedef MLAN_PACK_START struct _HostCmd_DS_80211_TX_FRAME
7774 {
7775     /** Action Set or get */
7776     t_u16 action;
7777     /** status */
7778     t_u16 status;
7779     /** BandConfig */
7780     t_u8 band_config;
7781     /** channel */
7782     t_u8 channel;
7783     /** reserved */
7784     t_u32 reserved;
7785     /** buffer include TxPD and full Tx packet */
7786     t_u8 buffer[];
7787 } MLAN_PACK_END HostCmd_DS_80211_TX_FRAME;
7788 
7789 /** HostCmd_DS_COMMAND */
7790 /* Note in case the fixed header of 8 bytes is modified please modify WIFI_HOST_CMD_FIXED_HEADER_LEN too */
7791 typedef MLAN_PACK_START struct _HostCmd_DS_COMMAND
7792 {
7793     /** Command Header : Command */
7794     t_u16 command;
7795     /** Command Header : Size */
7796     t_u16 size;
7797     /** Command Header : Sequence number */
7798     t_u16 seq_num;
7799     /** Command Header : Result */
7800     t_u16 result;
7801     /** Command Body */
7802     union
7803     {
7804         /** Hardware specifications */
7805         HostCmd_DS_GET_HW_SPEC hw_spec;
7806         /** Cfg data */
7807         HostCmd_DS_802_11_CFG_DATA cfg_data;
7808         /** MAC control */
7809         HostCmd_DS_MAC_CONTROL mac_ctrl;
7810 #if (CONFIG_WIFI_IND_RESET) && (CONFIG_WIFI_IND_DNLD)
7811         /** Test Independent reset */
7812         HostCmd_DS_IND_RST ind_rst;
7813         /** GPIO Independent reset configure */
7814         HostCmd_DS_INDEPENDENT_RESET_CFG ind_rst_cfg;
7815 #endif
7816         /** MAC address */
7817         HostCmd_DS_802_11_MAC_ADDRESS mac_addr;
7818         /** MAC muticast address */
7819         HostCmd_DS_MAC_MULTICAST_ADR mc_addr;
7820         /** Get log */
7821         HostCmd_DS_802_11_GET_LOG get_log;
7822         /** RSSI information */
7823         HostCmd_DS_802_11_RSSI_INFO rssi_info;
7824         /** RSSI information response */
7825         HostCmd_DS_802_11_RSSI_INFO_RSP rssi_info_rsp;
7826         /** SNMP MIB */
7827         HostCmd_DS_802_11_SNMP_MIB smib;
7828         /** Radio control */
7829         HostCmd_DS_802_11_RADIO_CONTROL radio;
7830         /** RF channel */
7831         HostCmd_DS_802_11_RF_CHANNEL rf_channel;
7832         /** Tx rate query */
7833         HostCmd_TX_RATE_QUERY tx_rate;
7834         /** Tx rate configuration */
7835         HostCmd_DS_TX_RATE_CFG tx_rate_cfg;
7836         /** Tx power configuration */
7837         HostCmd_DS_TXPWR_CFG txp_cfg;
7838         /** RF Tx power configuration */
7839         HostCmd_DS_802_11_RF_TX_POWER txp;
7840         /** CW Mode: Tx CW Level control */
7841         HostCmd_DS_CW_MODE_CTRL cwmode;
7842         /** RF antenna */
7843         HostCmd_DS_802_11_RF_ANTENNA antenna;
7844 #if CONFIG_NET_MONITOR
7845         /** Net Monitor Mode command */
7846         HostCmd_DS_802_11_NET_MONITOR net_mon;
7847 #endif
7848         /** Enhanced power save command */
7849         HostCmd_DS_802_11_PS_MODE_ENH psmode_enh;
7850         HostCmd_DS_802_11_HS_CFG_ENH opt_hs_cfg;
7851         /** Scan */
7852         HostCmd_DS_802_11_SCAN scan;
7853 #if CONFIG_EXT_SCAN_SUPPORT
7854         /** Extended Scan */
7855         HostCmd_DS_802_11_SCAN_EXT ext_scan;
7856 #endif
7857 
7858         /** Mgmt frame subtype mask */
7859         HostCmd_DS_RX_MGMT_IND rx_mgmt_ind;
7860         /** Scan response */
7861         HostCmd_DS_802_11_SCAN_RSP scan_resp;
7862 
7863         HostCmd_DS_802_11_BG_SCAN_CONFIG bg_scan_config;
7864         HostCmd_DS_802_11_BG_SCAN_QUERY bg_scan_query;
7865         HostCmd_DS_802_11_BG_SCAN_QUERY_RSP bg_scan_query_resp;
7866         HostCmd_DS_SUBSCRIBE_EVENT subscribe_event;
7867         HostCmd_DS_OTP_USER_DATA otp_user_data;
7868         /** Associate */
7869         HostCmd_DS_802_11_ASSOCIATE associate;
7870 
7871         /** Associate response */
7872         HostCmd_DS_802_11_ASSOCIATE_RSP associate_rsp;
7873         /** Deauthenticate */
7874         HostCmd_DS_802_11_DEAUTHENTICATE deauth;
7875         /** Ad-Hoc start */
7876         HostCmd_DS_802_11_AD_HOC_START adhoc_start;
7877         /** Ad-Hoc start result */
7878         HostCmd_DS_802_11_AD_HOC_START_RESULT adhoc_start_result;
7879         /** Ad-Hoc join result */
7880         HostCmd_DS_802_11_AD_HOC_JOIN_RESULT adhoc_join_result;
7881         /** Ad-Hoc join */
7882         HostCmd_DS_802_11_AD_HOC_JOIN adhoc_join;
7883         /** Domain information */
7884         HostCmd_DS_802_11D_DOMAIN_INFO domain_info;
7885         /** Domain information response */
7886         HostCmd_DS_802_11D_DOMAIN_INFO_RSP domain_info_resp;
7887         HostCmd_DS_802_11_TPC_ADAPT_REQ tpc_req;
7888         HostCmd_DS_802_11_TPC_INFO tpc_info;
7889         HostCmd_DS_802_11_CHAN_SW_ANN chan_sw_ann;
7890         HostCmd_DS_CHAN_RPT_REQ chan_rpt_req;
7891         HostCmd_DS_MEASUREMENT_REQUEST meas_req;
7892         HostCmd_DS_MEASUREMENT_REPORT meas_rpt;
7893         /** Add BA request */
7894         HostCmd_DS_11N_ADDBA_REQ add_ba_req;
7895         /** Add BA response */
7896         HostCmd_DS_11N_ADDBA_RSP add_ba_rsp;
7897         /** Delete BA entry */
7898         HostCmd_DS_11N_DELBA del_ba;
7899         /** Tx buffer configuration */
7900         HostCmd_DS_TXBUF_CFG tx_buf;
7901         /** AMSDU Aggr Ctrl configuration */
7902         HostCmd_DS_AMSDU_AGGR_CTRL amsdu_aggr_ctrl;
7903         /** 11n configuration */
7904         HostCmd_DS_11N_CFG htcfg;
7905         /** HostCmd_DS_11AC_CFG */
7906         HostCmd_DS_11AC_CFG vhtcfg;
7907 #if CONFIG_11AX
7908         /** HostCmd_DS_11AX_CFG */
7909         HostCmd_DS_11AX_CFG axcfg;
7910 #if CONFIG_11AX_TWT
7911         /** HostCmd_DS_TWT_CFG */
7912         HostCmd_DS_TWT_CFG twtcfg;
7913 #endif /* CONFIG_11AX_TWT  */
7914 #if CONFIG_MMSF
7915         /* HostCmd_DS_MMSF_CFG*/
7916         HostCmd_DS_MMSF_CFG mmsf_cfg;
7917 #endif
7918 #endif /* CONFIG_11AX */
7919 #if CONFIG_WIFI_RECOVERY
7920         /* HostCmd_DS_TMRC_CFG*/
7921         HostCmd_DS_TMRC_CFG tmrc_cfg;
7922 #endif
7923         /** WMM status get */
7924         HostCmd_DS_WMM_GET_STATUS get_wmm_status;
7925         /** WMM ADDTS */
7926         HostCmd_DS_WMM_ADDTS_REQ add_ts;
7927         /** WMM DELTS */
7928         HostCmd_DS_WMM_DELTS_REQ del_ts;
7929         /** WMM set/get queue config */
7930         HostCmd_DS_WMM_QUEUE_CONFIG queue_config;
7931         /** WMM on/of/get queue statistics */
7932         HostCmd_DS_WMM_QUEUE_STATS queue_stats;
7933         /** WMM get traffic stream status */
7934         HostCmd_DS_WMM_TS_STATUS ts_status;
7935         /** WMM param config*/
7936         HostCmd_DS_WMM_PARAM_CONFIG param_config;
7937 #if defined(WPA) || defined(WAPI_AP) || defined(HOST_AUTHENTICATOR)
7938         /** Key material */
7939         HostCmd_DS_802_11_KEY_MATERIAL key_material;
7940 #endif /*WPA || WAPI_AP || HOST_AUTHENTICATOR*/
7941 #if CONFIG_GTK_REKEY_OFFLOAD
7942         /** GTK Rekey parameters */
7943         HostCmd_DS_GTK_REKEY_PARAMS gtk_rekey;
7944 #endif
7945         /** E-Supplicant PSK */
7946         HostCmd_DS_802_11_SUPPLICANT_PMK esupplicant_psk;
7947         /** E-Supplicant profile */
7948         HostCmd_DS_802_11_SUPPLICANT_PROFILE esupplicant_profile;
7949         /** Extended version */
7950         HostCmd_DS_VERSION_EXT verext;
7951         /** Adhoc Coalescing */
7952         HostCmd_DS_802_11_IBSS_STATUS ibss_coalescing;
7953         /** Mgmt IE list configuration */
7954         HostCmd_DS_MGMT_IE_LIST_CFG mgmt_ie_list;
7955         /** System clock configuration */
7956         HostCmd_DS_ECL_SYSTEM_CLOCK_CONFIG sys_clock_cfg;
7957         /** MAC register access */
7958         HostCmd_DS_MAC_REG_ACCESS mac_reg;
7959         /** BBP register access */
7960         HostCmd_DS_BBP_REG_ACCESS bbp_reg;
7961         /** RF register access */
7962         HostCmd_DS_RF_REG_ACCESS rf_reg;
7963         /** EEPROM register access */
7964         HostCmd_DS_802_11_EEPROM_ACCESS eeprom;
7965         /** Memory access */
7966         HostCmd_DS_MEM_ACCESS mem;
7967         /** Bridge mode */
7968         HostCmd_BRIDGE_MODE bridge_mode;
7969         /** Auto Reconnect */
7970         HostCmd_DS_AUTO_RECONNECT auto_reconnect;
7971         /** HS Wakeup Reason */
7972         HostCmd_DS_HS_WAKEUP_REASON hs_wakeup_reason;
7973         /** Inactivity timeout extend */
7974         HostCmd_DS_INACTIVITY_TIMEOUT_EXT inactivity_to;
7975 #ifdef UAP_SUPPORT
7976         HostCmd_DS_SYS_CONFIG sys_config;
7977         HostCmd_DS_SYS_INFO sys_info;
7978         HostCmd_DS_STA_DEAUTH sta_deauth;
7979         HostCmd_DS_STA_LIST sta_list;
7980         HostCmd_DS_POWER_MGMT_EXT pm_cfg;
7981         HostCmd_DS_REPORT_MIC report_mic;
7982         HostCmd_DS_PMF_PARAMS pmf_params;
7983 #ifdef SD8801
7984         HostCmd_DS_ACS_CONFIG acs_scan;
7985 #else
7986         HostCMD_DS_APCMD_ACS_SCAN acs_scan;
7987 #endif
7988 #endif /* UAP_SUPPORT */
7989 #ifdef UAP_HOST_MLME
7990         HostCmd_DS_ADD_STATION sta_info;
7991 #endif
7992         /** Sleep period command */
7993         HostCmd_DS_802_11_SLEEP_PERIOD sleep_pd;
7994         /** Sleep params command */
7995         HostCmd_DS_802_11_SLEEP_PARAMS sleep_param;
7996 
7997         /** SDIO GPIO interrupt config command */
7998         HostCmd_DS_SDIO_GPIO_INT_CONFIG sdio_gpio_int;
7999         HostCmd_DS_SDIO_PULL_CTRL sdio_pull_ctl;
8000         HostCmd_DS_SET_BSS_MODE bss_mode;
8001         HostCmd_DS_CMD_TX_DATA_PAUSE tx_data_pause;
8002         HostCmd_DS_REMAIN_ON_CHANNEL remain_on_chan;
8003 #ifdef WIFI_DIRECT_SUPPORT
8004         HostCmd_DS_WIFI_DIRECT_MODE wifi_direct_mode;
8005 #endif
8006 #ifdef WLAN_LOW_POWER_ENABLE
8007         HostCmd_CONFIG_LOW_PWR_MODE low_pwr_mode_cfg;
8008 #endif /* WLAN_LOW_POWER_ENABLE */
8009         HostCmd_CONFIG_ED_MAC_MODE ed_mac_mode_cfg;
8010         HostCmd_DS_CHAN_TRPC_CONFIG chan_trpc_cfg;
8011 #if CONFIG_EXTERNAL_BLE_COEX
8012         MrvlIETypes_ExtBLECoex_Config_t ext_ble_coex_cfg;
8013 #endif
8014         HostCmd_DS_TSF tsf_cfg;
8015 #if CONFIG_WIFI_CLOCKSYNC
8016         HostCmd_DS_GPIO_TSF_LATCH_PARAM_CONFIG gpio_tsf_latch;
8017 #endif /* CONFIG_WIFI_CLOCKSYNC */
8018         HostCmd_DS_TBTT_OFFSET tbtt_offset;
8019 #if CONFIG_RF_TEST_MODE
8020         HostCmd_DS_MFG_CMD_GENERIC_CFG mfg_generic_cfg;
8021         HostCmd_DS_MFG_CMD_TX_FRAME2 mfg_tx_frame2;
8022         HostCmd_DS_MFG_CMD_TX_CONT mfg_tx_cont;
8023         HostCmd_DS_MFG_CMD_HE_TBTX_T mfg_he_power;
8024         HostCmd_MFG_CMD_IEEETYPES_CTLBASICTRIGHDR_T mfg_tx_trigger_config;
8025         HostCmd_DS_MFG_CMD_OTP_MAC_ADD_T mfg_otp_mac_addr_rd_wr;
8026         HostCmd_DS_MFG_CMD_OTP_CAL_DATA_T mfg_otp_cal_data_rd_wr;
8027 #endif
8028 #if CONFIG_WIFI_TX_PER_TRACK
8029         HostCmd_DS_TX_RX_PKT_STATS pkt_stats;
8030 #endif
8031 #if CONFIG_TX_RX_HISTOGRAM
8032         HostCmd_DS_TX_RX_HISTOGRAM histogram;
8033 #endif
8034 #ifdef OTP_CHANINFO
8035         HostCmd_DS_CHAN_REGION_CFG reg_cfg;
8036 #endif
8037 #if CONFIG_11K_OFFLOAD
8038         /** OFFLOAD FEATURE CTRL */
8039         HostCmd_OFFLOAD_FEATURE_CTRL fctrl;
8040 #endif /* CONFIG_11K_OFFLOAD */
8041 #if CONFIG_WIFI_EU_CRYPTO
8042         HostCmd_DS_EU_AES_CRYPTO eu_aes_crypto;
8043         HostCmd_DS_EU_CRYPTO eu_crypto;
8044 #endif
8045 
8046 #if CONFIG_11AX
8047         HostCmd_DS_11AX_CMD_CFG axcmd;
8048 #endif
8049 #ifdef SD8801
8050         HostCmd_DS_ExtBLECoex_Config_t ext_ble_coex_cfg;
8051 #endif
8052 #if CONFIG_MULTI_CHAN
8053         HostCmd_DS_MULTI_CHAN_CFG multi_chan_cfg;
8054         HostCmd_DS_MULTI_CHAN_POLICY multi_chan_policy;
8055         HostCmd_DS_DRCS_CFG drcs_cfg;
8056 #endif
8057 #if CONFIG_1AS
8058         HostCmd_DS_HOST_CLOCK_CFG host_clock_cfg;
8059 #endif
8060 #if (CONFIG_11MC) || (CONFIG_11AZ)
8061         /** hostcmd for session_ctrl user command */
8062         HostCmd_FTM_SESSION_CTRL ftm_session_ctrl;
8063         /** hostcmd for session_cfg user command */
8064         HostCmd_FTM_SESSION_CFG ftm_session_cfg;
8065 #if CONFIG_WLS_CSI_PROC
8066         HostCmd_WLS_CSI_ACK wls_csi_ack;
8067 #endif
8068 #endif
8069 #if CONFIG_TX_AMPDU_PROT_MODE
8070         HostCmd_DS_CMD_TX_AMPDU_PROT_MODE tx_ampdu_prot_mode;
8071 #endif
8072 #if (CONFIG_IPS)
8073         HostCmd_DS_IPS_CONFIG ips_config;
8074 #endif
8075 #if CONFIG_CSI
8076         HostCmd_DS_CSI_CFG csi_params;
8077 #endif
8078 
8079         /** boot sleep configure */
8080         HostCmd_DS_BOOT_SLEEP boot_sleep;
8081 
8082 #if CONFIG_RX_ABORT_CFG
8083         HostCmd_DS_RX_ABORT_CFG rx_abort_cfg;
8084 #endif
8085 
8086 #if CONFIG_RX_ABORT_CFG_EXT
8087         HostCmd_DS_RX_ABORT_CFG_EXT rx_abort_cfg_ext;
8088 #endif
8089 
8090 #if CONFIG_CCK_DESENSE_CFG
8091         HostCmd_DS_CCK_DESENSE_CFG cck_desense_cfg;
8092 #endif
8093 
8094 #if CONFIG_FW_VDLL
8095         uint8_t *vdll_cmd_mem;
8096 #endif
8097 #if CONFIG_TSP
8098         HostCmd_DS_TSP_CFG tsp_cfg;
8099 #endif
8100 #if CONFIG_CLOUD_KEEP_ALIVE
8101         HostCmd_DS_AUTO_TX auto_tx;
8102 #endif
8103 #if CONFIG_COEX_DUTY_CYCLE
8104         HostCmd_SIGNLE_ANT_DUTY_CYCLE single_ant_duty_cycle;
8105         HostCmd_DUAL_ANT_DUTY_CYCLE dual_ant_duty_cycle;
8106 #endif
8107 #if CONFIG_EXTERNAL_COEX_PTA
8108         HostCmd_EXTERNAL_COEX_PTA external_coex_pta;
8109 #endif
8110 #if CONFIG_IMD3_CFG
8111         HostCmd_IMD3_CFG imd3_cfg;
8112 #endif
8113         HostCmd_DS_80211_TX_FRAME tx_frame;
8114     } params;
8115 } MLAN_PACK_END HostCmd_DS_COMMAND;
8116 
8117 /** PS_CMD_ConfirmSleep */
8118 typedef MLAN_PACK_START struct _OPT_Confirm_Sleep
8119 {
8120     /** Command */
8121     t_u16 command;
8122     /** Size */
8123     t_u16 size;
8124     /** Sequence number */
8125     t_u16 seq_num;
8126     /** Result */
8127     t_u16 result;
8128     /** Action */
8129     t_u16 action;
8130     /** Sleep comfirm param definition */
8131     sleep_confirm_param sleep_cfm;
8132 } MLAN_PACK_END OPT_Confirm_Sleep;
8133 
8134 typedef MLAN_PACK_START struct _opt_sleep_confirm_buffer
8135 {
8136     /** Header for interface */
8137     t_u8 hdr[4];
8138     /** New power save command used to send sleep confirmation to the firmware */
8139     OPT_Confirm_Sleep ps_cfm_sleep;
8140 } MLAN_PACK_END opt_sleep_confirm_buffer;
8141 
8142 #if (CONFIG_FW_VDLL) || (CONFIG_FW_VDLLV2)
8143 /** req host side download vdll block */
8144 #define VDLL_IND_TYPE_REQ 0
8145 /** notify vdll start offset in firmware image */
8146 #define VDLL_IND_TYPE_OFFSET 1
8147 /** notify vdll download error: signature error */
8148 #define VDLL_IND_TYPE_ERR_SIG 2
8149 /** notify vdll download error: ID error */
8150 #define VDLL_IND_TYPE_ERR_ID 3
8151 #if defined(SD9177)
8152 /** notify vdll download error: Secure error */
8153 #define VDLL_IND_TYPE_ERR_SECURE 4
8154 /** notify vdll download vdll complete */
8155 #define VDLL_IND_TYPE_COMPLETE 5
8156 #elif defined(SD8978) || defined(SD8987) || defined(SD8997) || defined(RW610)
8157 /** notify VDLL_V2 interface reset */
8158 #define VDLL_IND_TYPE_INTF_RESET 5
8159 #endif
8160 
8161 /** vdll indicate event structure */
8162 typedef MLAN_PACK_START struct _vdll_ind
8163 {
8164     /*VDLL ind type*/
8165     t_u16 type;
8166     /*reserved*/
8167     t_u16 reserved;
8168     /*indicate the offset downloaded so far*/
8169     t_u32 offset;
8170     /*VDLL block size*/
8171     t_u16 block_len;
8172 } MLAN_PACK_END vdll_ind, *pvdll_ind;
8173 
8174 /** mlan_event_vdllv2_indication data structure */
8175 typedef MLAN_PACK_START struct _mlan_event_vdll_indication
8176 {
8177     /** Event ID */
8178     t_u16 event_id;
8179     /** BSS index number for multiple BSS support */
8180     t_u8 bss_index;
8181     /** BSS type */
8182     t_u8 bss_type;
8183     /** vdll indicate event */
8184     vdll_ind vdllInd;
8185 } MLAN_PACK_END mlan_event_vdll_indication, *pmlan_event_vdll_indication;
8186 
8187 #endif /* CONFIG_FW_VDLL || CONFIG_FW_VDLLV2*/
8188 
8189 #ifdef PRAGMA_PACK
8190 #pragma pack(pop)
8191 #endif
8192 
8193 #endif /* !_MLAN_FW_H_ */
8194