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 #if 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 #if 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 #define EVENT_CSI_STATUS 0x000000A7
1813 #endif
1814 
1815 /** Card Event definition : RESET PN */
1816 #if CONFIG_RSN_REPLAY_DETECTION
1817 #define EVENT_RESET_PN_ON_REKEY 0x00000092
1818 #endif
1819 
1820 #define EVENT_BLOCKEDSTA_AUTH_REPORT 0x00000093
1821 
1822 /** Event ID: Assoc Req IE*/
1823 #define EVENT_ASSOC_REQ_IE 0x00000095
1824 
1825 #define EVENT_ACCESS_BY_HOST 0x00000098
1826 
1827 /** Event ID mask */
1828 #define EVENT_ID_MASK 0xffff
1829 
1830 /** BSS number mask */
1831 #define BSS_NUM_MASK 0xfU
1832 
1833 /** Get BSS number from event cause (bit 23:16) */
1834 #define EVENT_GET_BSS_NUM(event_cause) (((event_cause) >> 16) & BSS_NUM_MASK)
1835 
1836 /** Get BSS type from event cause (bit 31:24) */
1837 #define EVENT_GET_BSS_TYPE(event_cause) (((event_cause) >> 24) & 0x00ff)
1838 
1839 #if CONFIG_TSP
1840 #define HostCmd_CMD_TSP_CFG 0x0280
1841 #endif
1842 
1843 #ifdef OTP_CHANINFO
1844 #define HostCmd_CMD_CHAN_REGION_CFG 0x0242
1845 /* mod_grp */
1846 typedef enum _mod_grp
1847 {
1848     MOD_CCK,          // 0
1849     MOD_OFDM_PSK,     // 1
1850     MOD_OFDM_QAM16,   // 2
1851     MOD_OFDM_QAM64,   // 3
1852     MOD_HT_20_PSK,    // 4
1853     MOD_HT_20_QAM16,  // 5
1854     MOD_HT_20_QAM64,  // 6
1855     MOD_HT_40_PSK,    // 7
1856     MOD_HT_40_QAM16,  // 8
1857     MOD_HT_40_QAM64,  // 9
1858 #ifdef STREAM_2x2
1859     MOD_HT2_20_PSK,   // 10
1860     MOD_HT2_20_QAM16, // 11
1861     MOD_HT2_20_QAM64, // 12
1862     MOD_HT2_40_PSK,   // 13
1863     MOD_HT2_40_QAM16, // 14
1864     MOD_HT2_40_QAM64, // 15
1865 #endif
1866 
1867 #if CONFIG_11AC
1868     MOD_VHT_20_QAM256,  // 16
1869     MOD_VHT_40_QAM256,  // 17
1870     MOD_VHT_80_PSK,     // 18
1871     MOD_VHT_80_QAM16,   // 19
1872     MOD_VHT_80_QAM64,   // 20
1873     MOD_VHT_80_QAM256,  // 21
1874 #ifdef STREAM_2x2
1875     MOD_VHT2_20_QAM256, // 22
1876     MOD_VHT2_40_QAM256, // 23
1877     MOD_VHT2_80_PSK,    // 24
1878     MOD_VHT2_80_QAM16,  // 25
1879     MOD_VHT2_80_QAM64,  // 26
1880     MOD_VHT2_80_QAM256, // 27
1881 #endif
1882 #endif
1883 } mod_grp;
1884 
1885 typedef MLAN_PACK_START struct _power_table_attr
1886 {
1887     t_u8 rows_2g;
1888     t_u8 cols_2g;
1889     t_u8 rows_5g;
1890     t_u8 cols_5g;
1891 } MLAN_PACK_END power_table_attr_t;
1892 
1893 #define FW_CFP_TABLE_MAX_ROWS_BG 14
1894 #ifdef STREAM_2X2
1895 #define FW_CFP_TABLE_MAX_COLS_BG 17
1896 #else
1897 #define FW_CFP_TABLE_MAX_COLS_BG 11
1898 #endif
1899 
1900 #if CONFIG_5GHz_SUPPORT
1901 #define FW_CFP_TABLE_MAX_ROWS_A 42
1902 #ifdef STREAM_2X2
1903 #define FW_CFP_TABLE_MAX_COLS_A 29
1904 #else
1905 #define FW_CFP_TABLE_MAX_COLS_A 17
1906 #endif
1907 #endif /* CONFIG_5GHz_SUPPORT */
1908 #endif /* OTP_CHANINFO */
1909 
1910 /** Host Command ID : GPIO independent reset configure */
1911 #define HostCmd_CMD_INDEPENDENT_RESET_CFG 0x0243
1912 
1913 #if CONFIG_COMPRESS_TX_PWTBL
1914 /** used in hostcmd to download region power cfg setting to firmware */
1915 #define HostCmd_CMD_REGION_POWER_CFG 0x0249
1916 #endif
1917 
1918 /** Event_WEP_ICV_ERR structure */
1919 typedef MLAN_PACK_START struct _Event_WEP_ICV_ERR
1920 {
1921     /** Reason code */
1922     t_u16 reason_code;
1923     /** Source MAC address */
1924     t_u8 src_mac_addr[MLAN_MAC_ADDR_LENGTH];
1925     /** WEP decryption used key */
1926     t_u8 wep_key_index;
1927     /** WEP key length */
1928     t_u8 wep_key_length;
1929     /** WEP key */
1930     t_u8 key[MAX_WEP_KEY_SIZE];
1931 } MLAN_PACK_END Event_WEP_ICV_ERR;
1932 
1933 /** WLAN_802_11_FIXED_IEs */
1934 typedef MLAN_PACK_START struct _WLAN_802_11_FIXED_IEs
1935 {
1936     /** Timestamp */
1937     t_u8 time_stamp[8];
1938     /** Beacon interval */
1939     t_u16 beacon_interval;
1940     /** Capabilities*/
1941     t_u16 capabilities;
1942 } MLAN_PACK_END WLAN_802_11_FIXED_IEs;
1943 
1944 /** WLAN_802_11_VARIABLE_IEs */
1945 typedef MLAN_PACK_START struct _WLAN_802_11_VARIABLE_IEs
1946 {
1947     /** Element ID */
1948     IEEEtypes_ElementId_e element_id;
1949     /** Length */
1950     t_u8 length;
1951     /** IE data */
1952     t_u8 data[1];
1953 } MLAN_PACK_END WLAN_802_11_VARIABLE_IEs;
1954 
1955 /** TLV related data structures*/
1956 /** MrvlIEtypesHeader_t */
1957 typedef MLAN_PACK_START struct _MrvlIEtypesHeader
1958 {
1959     /** Header type */
1960     t_u16 type;
1961     /** Header length */
1962     t_u16 len;
1963 } MLAN_PACK_END MrvlIEtypesHeader_t;
1964 
1965 /** MrvlIEtypes_Data_t */
1966 typedef MLAN_PACK_START struct _MrvlIEtypes_Data_t
1967 {
1968     /** Header */
1969     MrvlIEtypesHeader_t header;
1970     /** Data */
1971     t_u8 data[1];
1972 } MLAN_PACK_END MrvlIEtypes_Data_t;
1973 
1974 /** MrvlIEtypes_PrevBssid_t */
1975 typedef MLAN_PACK_START struct _MrvlIEtypes_PrevBssid_t
1976 {
1977     /** Header */
1978     MrvlIEtypesHeader_t header;
1979     /** prev_bssid **/
1980     t_u8 prev_bssid[6];
1981 } MLAN_PACK_END MrvlIEtypes_PrevBssid_t;
1982 
1983 /** MrvlIETypes_ActionFrame_t */
1984 typedef MLAN_PACK_START struct
1985 {
1986     MrvlIEtypesHeader_t header; /**< Header */
1987 
1988     t_u8 smcstartAddr[MLAN_MAC_ADDR_LENGTH];
1989     t_u8 smcendAddr[MLAN_MAC_ADDR_LENGTH];
1990     t_u16 filter_type;
1991 
1992 } MLAN_PACK_END MrvlIETypes_SmcAddrRange_t;
1993 
1994 #if CONFIG_HOST_SLEEP
1995 #define MAX_MGMT_FRAME_FILTER         2
1996 #define EVENT_MANAGEMENT_FRAME_WAKEUP 0x00000088
1997 
1998 typedef MLAN_PACK_START struct _mgmt_frame_filter
1999 {
2000     /** action - bitmap
2001      ** On matching rx'd pkt and filter during NON_HOSTSLEEP mode:
2002      **   Action[1]=0  Discard
2003      **   Action[1]=1  Allow
2004      ** Note that default action on non-match is "Allow".
2005      **
2006      ** On matching rx'd pkt and filter during HOSTSLEEP mode:
2007      **   Action[1:0]=00  Discard and Not Wake host
2008      **   Action[1:0]=01  Discard and Wake host
2009      **   Action[1:0]=10  Invalid
2010      ** Note that default action on non-match is "Discard and Not Wake
2011      *host".
2012      **/
2013     t_u8 action;
2014     /** Frame type(p2p...)
2015      ** type=0: invalid
2016      ** type=1: p2p
2017      ** type=0xff: management frames(assoc req/rsp, probe req/rsp,...)
2018      ** type=others: reserved
2019      **/
2020     t_u8 type;
2021     /** Frame mask according to each type
2022      ** When type=1 for p2p, frame-mask have following define:
2023      **    Bit      Frame
2024      **     0       GO Negotiation Request
2025      **     1       GO Negotiation Response
2026      **     2       GO Negotiation Confirmation
2027      **     3       P2P Invitation Request
2028      **     4       P2P Invitation Response
2029      **     5       Device Discoverability Request
2030      **     6       Device Discoverability Response
2031      **     7       Provision Discovery Request
2032      **     8       Provision Discovery Response
2033      **     9       Notice of Absence
2034      **     10      P2P Presence Request
2035      **     11      P2P Presence Response
2036      **     12      GO Discoverability Request
2037      **     13-31   Reserved
2038      **
2039      ** When type=others, frame-mask is reserved.
2040      **/
2041     t_u32 frame_mask;
2042 } MLAN_PACK_END mgmt_frame_filter;
2043 
2044 /** MrvlIEtypes_MgmtFrameFilter_t */
2045 typedef MLAN_PACK_START struct _MrvlIEtypes_MgmtFrameFilter_t
2046 {
2047     /** Header */
2048     MrvlIEtypesHeader_t header;
2049     /** management frame filters */
2050     mgmt_frame_filter filter[MAX_MGMT_FRAME_FILTER];
2051 } MLAN_PACK_END MrvlIEtypes_MgmtFrameFilter_t;
2052 #endif
2053 
2054 /** MrvlIETypes_SMCFrameFilter_t */
2055 
2056 #define MAX_FILTER_LENGTH 10
2057 typedef MLAN_PACK_START struct
2058 {
2059     MrvlIEtypesHeader_t header; /**< Header */
2060     uint8_t frame_filter[MAX_FILTER_LENGTH];
2061 
2062 } MLAN_PACK_END MrvlIETypes_SmcFrameFilter_t;
2063 
2064 /** Bit mask for TxPD status field for null packet */
2065 #define MRVDRV_TxPD_POWER_MGMT_NULL_PACKET 0x01
2066 /** Bit mask for TxPD status field for last packet */
2067 #define MRVDRV_TxPD_POWER_MGMT_LAST_PACKET 0x08
2068 
2069 /** Packet type: 802.11 */
2070 #define PKT_TYPE_802DOT11   0x05
2071 #define PKT_TYPE_MGMT_FRAME 0xE5U
2072 /** Packet type: AMSDU */
2073 #define PKT_TYPE_AMSDU 0xE6U
2074 /** Packet type: BAR */
2075 #define PKT_TYPE_BAR 0xE7U
2076 /** Packet type: debugging */
2077 #define PKT_TYPE_DEBUG 0xEF
2078 
2079 /** TxPD descriptor */
2080 typedef MLAN_PACK_START struct _TxPD
2081 {
2082     /** BSS type */
2083     t_u8 bss_type;
2084     /** BSS number */
2085     t_u8 bss_num;
2086     /** Tx packet length */
2087     t_u16 tx_pkt_length;
2088     /** Tx packet offset */
2089     t_u16 tx_pkt_offset;
2090     /** Tx packet type */
2091     t_u16 tx_pkt_type;
2092     /** Tx Control */
2093     t_u32 tx_control;
2094     /** Pkt Priority */
2095     t_u8 priority;
2096     /** Transmit Pkt Flags*/
2097     t_u8 flags;
2098     /** Amount of time the packet has been queued in the driver (units = 2ms)*/
2099     t_u8 pkt_delay_2ms;
2100     /** Reserved */
2101     t_u8 reserved1[2];
2102     /** Trasnit Pkt Token Id*/
2103     t_u8 tx_token_id;
2104     /** reserverd */
2105     t_u8 reserved[4];
2106 } MLAN_PACK_END TxPD, *PTxPD;
2107 
2108 /** RxPD Descriptor */
2109 typedef MLAN_PACK_START struct _RxPD
2110 {
2111     /** BSS type */
2112     t_u8 bss_type;
2113     /** BSS number */
2114     t_u8 bss_num;
2115     /** Rx Packet Length */
2116     t_u16 rx_pkt_length;
2117     /** Rx Pkt offset */
2118     t_u16 rx_pkt_offset;
2119     /** Rx packet type */
2120     t_u16 rx_pkt_type;
2121     /** Sequence number */
2122     t_u16 seq_num;
2123     /** Packet Priority */
2124     t_u8 priority;
2125     /** Rx Packet Rate */
2126     t_u8 rx_rate;
2127     /** SNR */
2128     t_s8 snr;
2129     /** Noise Floor */
2130     t_s8 nf;
2131 #ifdef SD8801
2132     /** Ht Info [Bit 0] RxRate format: LG=0, HT=1
2133      * [Bit 1]  HT Bandwidth: BW20 = 0, BW40 = 1
2134      * [Bit 2]  HT Guard Interval: LGI = 0, SGI = 1 */
2135     t_u8 ht_info;
2136 #else
2137     /** [Bit 1] [Bit 0] RxRate format: legacy rate = 00 HT = 01 VHT = 10
2138      *  [Bit 3] [Bit 2] HT/VHT Bandwidth BW20 = 00 BW40 = 01 BW80 = 10 BW160 = 11
2139      *  [Bit 4] HT/VHT Guard interval LGI = 0 SGI = 1
2140      *  [Bit 5] STBC support Enabled = 1
2141      *  [Bit 6] LDPC support Enabled = 1
2142      *  [Bit 7] Reserved */
2143     t_u8 rate_info;
2144 #endif
2145     /** Reserved */
2146     t_u8 reserved[3];
2147     /** TDLS flags, bit 0: 0=InfraLink, 1=DirectLink */
2148     t_u8 flags;
2149     /**For SD8887 antenna info: 0 = 2.4G antenna a; 1 = 2.4G antenna b; 3 = 5G antenna; 0xff = invalid value */
2150     t_u8 antenna;
2151     /** Reserved */
2152     t_u64 reserved1;
2153 #if CONFIG_TXPD_RXPD_V3
2154     t_u32 rx_info;
2155 #else  /* CONFIG_TXPD_RXPD_V3 */
2156     /** band config */
2157     t_u8 band_config;
2158     /** chan number */
2159     t_u8 chan_num;
2160 #endif /* CONFIG_TXPD_RXPD_V3 */
2161 #if CONFIG_RSN_REPLAY_DETECTION
2162     /** PN number high 32 bits*/
2163     t_u32 hi_rx_count32;
2164     /** PN number low 16 bits*/
2165     t_u16 lo_rx_count16;
2166     /** Reserved */
2167     t_u8 reserved3[2];
2168 #else
2169     /** Reserved */
2170     t_u8 reserved3[8];
2171 #endif
2172 } MLAN_PACK_END RxPD, *PRxPD;
2173 
2174 /** IEEEtypes_FrameCtl_t*/
2175 #ifdef BIG_ENDIAN_SUPPORT
2176 typedef MLAN_PACK_START struct _IEEEtypes_FrameCtl_t
2177 {
2178     /** Order */
2179     t_u8 order : 1;
2180     /** Wep */
2181     t_u8 wep : 1;
2182     /** More Data */
2183     t_u8 more_data : 1;
2184     /** Power Mgmt */
2185     t_u8 pwr_mgmt : 1;
2186     /** Retry */
2187     t_u8 retry : 1;
2188     /** More Frag */
2189     t_u8 more_frag : 1;
2190     /** From DS */
2191     t_u8 from_ds : 1;
2192     /** To DS */
2193     t_u8 to_ds : 1;
2194     /** Sub Type */
2195     t_u8 sub_type : 4;
2196     /** Type */
2197     t_u8 type : 2;
2198     /** Protocol Version */
2199     t_u8 protocol_version : 2;
2200 } MLAN_PACK_END IEEEtypes_FrameCtl_t;
2201 #else
2202 typedef MLAN_PACK_START struct _IEEEtypes_FrameCtl_t
2203 {
2204     /** Protocol Version */
2205     t_u8 protocol_version : 2;
2206     /** Type */
2207     t_u8 type : 2;
2208     /** Sub Type */
2209     t_u8 sub_type : 4;
2210     /** To DS */
2211     t_u8 to_ds : 1;
2212     /** From DS */
2213     t_u8 from_ds : 1;
2214     /** More Frag */
2215     t_u8 more_frag : 1;
2216     /** Retry */
2217     t_u8 retry : 1;
2218     /** Power Mgmt */
2219     t_u8 pwr_mgmt : 1;
2220     /** More Data */
2221     t_u8 more_data : 1;
2222     /** Wep */
2223     t_u8 wep : 1;
2224     /** Order */
2225     t_u8 order : 1;
2226 } MLAN_PACK_END IEEEtypes_FrameCtl_t;
2227 #endif
2228 
2229 #if UAP_SUPPORT
2230 /** TxPD descriptor */
2231 typedef MLAN_PACK_START struct _UapTxPD
2232 {
2233     /** BSS type */
2234     t_u8 bss_type;
2235     /** BSS number */
2236     t_u8 bss_num;
2237     /** Tx packet length */
2238     t_u16 tx_pkt_length;
2239     /** Tx packet offset */
2240     t_u16 tx_pkt_offset;
2241     /** Tx packet type */
2242     t_u16 tx_pkt_type;
2243     /** Tx Control */
2244     t_u32 tx_control;
2245     /** Pkt Priority */
2246     t_u8 priority;
2247     /** Transmit Pkt Flags*/
2248     t_u8 flags;
2249     /** Amount of time the packet has been queued in the driver (units = 2ms)*/
2250     t_u8 pkt_delay_2ms;
2251     /** Reserved */
2252     t_u8 reserved1;
2253     /** Reserved */
2254     t_u32 reserved;
2255 } MLAN_PACK_END UapTxPD, *PUapTxPD;
2256 
2257 /** RxPD Descriptor */
2258 typedef MLAN_PACK_START struct _UapRxPD
2259 {
2260     /** BSS Type */
2261     t_u8 bss_type;
2262     /** BSS number*/
2263     t_u8 bss_num;
2264     /** Rx packet length */
2265     t_u16 rx_pkt_length;
2266     /** Rx packet offset */
2267     t_u16 rx_pkt_offset;
2268     /** Rx packet type */
2269     t_u16 rx_pkt_type;
2270     /** Sequence number */
2271     t_u16 seq_num;
2272     /** Packet Priority */
2273     t_u8 priority;
2274     /** reserved */
2275     t_u8 reserved1;
2276 } MLAN_PACK_END UapRxPD, *PUapRxPD;
2277 
2278 /** Fixed size of station association event */
2279 #define ASSOC_EVENT_FIX_SIZE 12U
2280 
2281 #if UAP_HOST_MLME
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 
2317 /** MrvlIETypes_MgmtFrameSet_t */
2318 typedef MLAN_PACK_START struct _MrvlIETypes_MgmtFrameSet_t
2319 {
2320     /** Type */
2321     t_u16 type;
2322     /** Length */
2323     t_u16 len;
2324     /** Frame Control */
2325     IEEEtypes_FrameCtl_t frame_control;
2326     /* t_u8 frame_contents[0]; */
2327 } MLAN_PACK_END MrvlIETypes_MgmtFrameSet_t;
2328 
2329 /** IEEEtypes_AssocRqst_t */
2330 typedef MLAN_PACK_START struct _IEEEtypes_AssocRqst_t
2331 {
2332     /** Capability Info */
2333     t_u16 cap_info;
2334     /** Listen Interval */
2335     t_u16 listen_interval;
2336     /* t_u8 ie_buffer[0]; */
2337 } MLAN_PACK_END IEEEtypes_AssocRqst_t;
2338 
2339 /** IEEEtypes_ReAssocRqst_t */
2340 typedef MLAN_PACK_START struct _IEEEtypes_ReAssocRqst_t
2341 {
2342     /** Capability Info */
2343     t_u16 cap_info;
2344     /** Listen Interval */
2345     t_u16 listen_interval;
2346     /** Current AP Address */
2347     t_u8 current_ap_addr[MLAN_MAC_ADDR_LENGTH];
2348     /* t_u8 ie_buffer[0]; */
2349 } MLAN_PACK_END IEEEtypes_ReAssocRqst_t;
2350 #endif /* UAP_SUPPORT */
2351 
2352 /** wlan_802_11_header */
2353 typedef MLAN_PACK_START struct _wlan_802_11_header
2354 {
2355     /** Frame Control */
2356     t_u16 frm_ctl;
2357     /** Duration ID */
2358     t_u16 duration_id;
2359     /** Address1 */
2360     mlan_802_11_mac_addr addr1;
2361     /** Address2 */
2362     mlan_802_11_mac_addr addr2;
2363     /** Address3 */
2364     mlan_802_11_mac_addr addr3;
2365     /** Sequence Control */
2366     t_u16 seq_ctl;
2367     /** Address4 */
2368     mlan_802_11_mac_addr addr4;
2369 } MLAN_PACK_END wlan_802_11_header;
2370 
2371 #if CONFIG_11K_OFFLOAD
2372 /** host_OffloadFeatureStdControl_t */
2373 typedef MLAN_PACK_START struct
2374 {
2375     t_u8 client_radar_detect : 1;
2376     t_u8 wmm_ac_dynamic_ps : 1;
2377     t_u8 wmm_ac_tpsec_modify : 1;
2378     t_u8 dot11h_rm : 1;
2379     t_u8 dot11k_rm : 1;
2380     t_u8 dot11k_nbor_support : 1;
2381     t_u8 dot11k_lm : 1;
2382     t_u8 dot11k_tsm : 1;
2383 
2384     t_u8 pmf_capable : 1;
2385     t_u8 pmf_required : 1;
2386     t_u8 vowifi_probe_tpc_rpt : 1;
2387     t_u8 dot11v_bss_trans : 1;
2388     t_u8 rbc : 1;
2389     t_u8 reserved : 3;
2390 } MLAN_PACK_END host_OffloadFeatureStdControl_t;
2391 
2392 /** END HostCmd_OFFLOAD_FEATURE_CTRL */
2393 typedef MLAN_PACK_START struct _HostCmd_OFFLOAD_FEATURE_CTRL
2394 {
2395     t_u8 featureSelect;
2396     union
2397     {
2398         host_OffloadFeatureStdControl_t std;
2399         t_u8 empty;
2400     } control;
2401 } MLAN_PACK_END HostCmd_OFFLOAD_FEATURE_CTRL;
2402 #endif /* CONFIG_11K_OFFLOAD*/
2403 
2404 /** wlan_802_11_header packet from FW with length */
2405 typedef MLAN_PACK_START struct _wlan_mgmt_pkt
2406 {
2407     /** Packet Length */
2408     t_u16 frm_len;
2409     /** wlan_802_11_header */
2410     wlan_802_11_header wlan_header;
2411 } MLAN_PACK_END wlan_mgmt_pkt;
2412 
2413 #ifdef STA_SUPPORT
2414 /** (Beaconsize(256)-5(IEId,len,contrystr(3))/3(FirstChan,NoOfChan,MaxPwr) */
2415 #define MAX_NO_OF_CHAN 40U
2416 
2417 /** Channel-power table entries */
2418 typedef MLAN_PACK_START struct _chan_power_11d
2419 {
2420     /** 11D channel */
2421     t_u8 chan;
2422     /** Band for channel */
2423     t_u8 band;
2424     /** 11D channel power */
2425     t_u8 pwr;
2426     /** AP seen on channel */
2427     t_u8 ap_seen;
2428 } MLAN_PACK_END chan_power_11d_t;
2429 
2430 /** Region channel info */
2431 typedef MLAN_PACK_START struct _parsed_region_chan_11d
2432 {
2433     /** 11D channel power per channel */
2434     chan_power_11d_t chan_pwr[MAX_NO_OF_CHAN];
2435     /** 11D number of channels */
2436     t_u8 no_of_chan;
2437 } MLAN_PACK_END parsed_region_chan_11d_t;
2438 #endif /* STA_SUPPORT */
2439 
2440 /** ChanScanMode_t */
2441 typedef MLAN_PACK_START struct _ChanScanMode_t
2442 {
2443 #ifdef BIG_ENDIAN_SUPPORT
2444     /** Reserved */
2445     t_u8 reserved_7 : 1;
2446     /** First passive scan then active scan */
2447     t_u8 passive_to_active_scan : 1;
2448     /** First channel in scan */
2449     t_u8 first_chan : 1;
2450     /** Enable hidden ssid report */
2451     t_u8 hidden_ssid_report : 1;
2452     /** Enable probe response timeout */
2453     t_u8 rsp_timeout_en : 1;
2454     /** Multidomain scan mode */
2455     t_u8 multidomain_scan : 1;
2456     /** Disble channel filtering flag */
2457     t_u8 disable_chan_filt : 1;
2458     /** Channel scan mode passive flag */
2459     t_u8 passive_scan : 1;
2460 #else
2461     /** Channel scan mode passive flag */
2462     t_u8 passive_scan : 1;
2463     /** Disble channel filtering flag */
2464     t_u8 disable_chan_filt : 1;
2465     /** Multidomain scan mode */
2466     t_u8 multidomain_scan : 1;
2467     /** Enable probe response timeout */
2468     t_u8 rsp_timeout_en : 1;
2469     /** Enable hidden ssid report */
2470     t_u8 hidden_ssid_report : 1;
2471     /** First channel in scan */
2472     t_u8 first_chan : 1;
2473     /** First passive scan then active scan */
2474     t_u8 passive_to_active_scan : 1;
2475     /** Reserved */
2476     t_u8 reserved_7 : 1;
2477 #endif
2478 } MLAN_PACK_END ChanScanMode_t;
2479 
2480 /** secondary channel is below */
2481 #define SECOND_CHANNEL_BELOW 0x30
2482 /** secondary channel is above */
2483 #define SECOND_CHANNEL_ABOVE 0x10
2484 /** channel offset */
2485 enum
2486 {
2487     SEC_CHAN_NONE  = 0,
2488     SEC_CHAN_ABOVE = 1,
2489     SEC_CHAN_BELOW = 3
2490 };
2491 /** channel bandwidth */
2492 enum
2493 {
2494     CHAN_BW_20MHZ = 0,
2495     CHAN_BW_10MHZ,
2496     CHAN_BW_40MHZ,
2497     CHAN_BW_80MHZ,
2498 };
2499 /** ChanScanParamSet_t */
2500 typedef MLAN_PACK_START struct _ChanScanParamSet_t
2501 {
2502     /** Channel scan parameter : Radio type */
2503     t_u8 radio_type;
2504     /** Channel scan parameter : Channel number */
2505     t_u8 chan_number;
2506     /** Channel scan parameter : Channel scan mode */
2507     ChanScanMode_t chan_scan_mode;
2508     /** Channel scan parameter : Minimum scan time */
2509     t_u16 min_scan_time;
2510     /** Channel scan parameter : Maximum scan time */
2511     t_u16 max_scan_time;
2512 } MLAN_PACK_END ChanScanParamSet_t;
2513 
2514 /** MrvlIEtypes_ChanListParamSet_t */
2515 typedef MLAN_PACK_START struct _MrvlIEtypes_ChanListParamSet_t
2516 {
2517     /** Header */
2518     MrvlIEtypesHeader_t header;
2519     /** Channel scan parameters */
2520     ChanScanParamSet_t chan_scan_param[1];
2521 } MLAN_PACK_END MrvlIEtypes_ChanListParamSet_t;
2522 
2523 /** ChanBandParamSet_t */
2524 typedef struct _ChanBandParamSet_t
2525 {
2526     /** Channel scan parameter : Radio type */
2527     t_u8 radio_type;
2528     /** Channel number */
2529     t_u8 chan_number;
2530 } ChanBandParamSet_t;
2531 
2532 /** MrvlIEtypes_ChanBandListParamSet_t */
2533 typedef MLAN_PACK_START struct _MrvlIEtypes_ChanBandListParamSet_t
2534 {
2535     /** Header */
2536     MrvlIEtypesHeader_t header;
2537     /** Channel Band parameters */
2538     ChanBandParamSet_t chan_band_param[1];
2539 } MLAN_PACK_END MrvlIEtypes_ChanBandListParamSet_t;
2540 
2541 #if CONFIG_SCAN_WITH_RSSIFILTER
2542 typedef MLAN_PACK_START struct _MrvlIEtypes_RssiThresholdParamSet_t
2543 {
2544     /** Header */
2545     MrvlIEtypesHeader_t header;
2546     /** Enable or disable the TLV */
2547     t_u8 enable;
2548     /** Threshold of RSSI */
2549     t_s16 rssi_threshold;
2550     /** Reserved */
2551     t_u8 reserved;
2552 } MLAN_PACK_END MrvlIEtypes_RssiThresholdParamSet_t;
2553 #endif
2554 
2555 /** MrvlIEtypes_RatesParamSet_t */
2556 typedef MLAN_PACK_START struct _MrvlIEtypes_RatesParamSet_t
2557 {
2558     /** Header */
2559     MrvlIEtypesHeader_t header;
2560     /** Rates */
2561     t_u8 rates[MAX_DATA_RATES];
2562 } MLAN_PACK_END MrvlIEtypes_RatesParamSet_t;
2563 
2564 #if CONFIG_EXT_SCAN_SUPPORT
2565 /** _MrvlIEtypes_Bssid_List_t */
2566 typedef MLAN_PACK_START struct _MrvlIEtypes_Bssid_List_t
2567 {
2568     /** Header */
2569     MrvlIEtypesHeader_t header;
2570     /** BSSID */
2571     t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
2572 } MLAN_PACK_END MrvlIEtypes_Bssid_List_t;
2573 #endif
2574 
2575 /** MrvlIEtypes_SsIdParamSet_t */
2576 typedef MLAN_PACK_START struct _MrvlIEtypes_SsIdParamSet_t
2577 {
2578     /** Header */
2579     MrvlIEtypesHeader_t header;
2580     /** SSID */
2581     t_u8 ssid[1];
2582 } MLAN_PACK_END MrvlIEtypes_SsIdParamSet_t;
2583 
2584 #if CONFIG_HOST_MLME
2585 /**MrvlIEtypes_AssocType_t */
2586 typedef MLAN_PACK_START struct _MrvlIEtypes_HostMlme_t
2587 {
2588     /** Header */
2589     MrvlIEtypesHeader_t header;
2590     /** Authentication type */
2591     t_u8 host_mlme;
2592 } MLAN_PACK_END MrvlIEtypes_HostMlme_t;
2593 #endif
2594 
2595 /** MrvlIEtypes_NumProbes_t */
2596 typedef MLAN_PACK_START struct _MrvlIEtypes_NumProbes_t
2597 {
2598     /** Header */
2599     MrvlIEtypesHeader_t header;
2600     /** Number of probes */
2601     t_u16 num_probes;
2602 } MLAN_PACK_END MrvlIEtypes_NumProbes_t;
2603 
2604 /** MrvlIEtypes_WildCardSsIdParamSet_t */
2605 typedef MLAN_PACK_START struct _MrvlIEtypes_WildCardSsIdParamSet_t
2606 {
2607     /** Header */
2608     MrvlIEtypesHeader_t header;
2609     /** Maximum SSID length */
2610     t_u8 max_ssid_length;
2611     /** SSID */
2612     t_u8 ssid[1];
2613 } MLAN_PACK_END MrvlIEtypes_WildCardSsIdParamSet_t;
2614 
2615 /**TSF data size */
2616 #define TSF_DATA_SIZE 8U
2617 /** Table of TSF values returned in the scan result */
2618 typedef MLAN_PACK_START struct _MrvlIEtypes_TsfTimestamp_t
2619 {
2620     /** Header */
2621     MrvlIEtypesHeader_t header;
2622     /** the length of each TSF data is 8 bytes, could be multiple TSF here */
2623     t_u8 tsf_data[1];
2624 } MLAN_PACK_END MrvlIEtypes_TsfTimestamp_t;
2625 
2626 /** CfParamSet_t */
2627 typedef MLAN_PACK_START struct _CfParamSet_t
2628 {
2629     /** CF parameter : Count */
2630     t_u8 cfp_cnt;
2631     /** CF parameter : Period */
2632     t_u8 cfp_period;
2633     /** CF parameter : Duration */
2634     t_u16 cfp_max_duration;
2635     /** CF parameter : Duration remaining */
2636     t_u16 cfp_duration_remaining;
2637 } MLAN_PACK_END CfParamSet_t;
2638 
2639 /** IbssParamSet_t */
2640 typedef MLAN_PACK_START struct _IbssParamSet_t
2641 {
2642     /** ATIM window value */
2643     t_u16 atim_window;
2644 } MLAN_PACK_END IbssParamSet_t;
2645 
2646 /** MrvlIEtypes_SsParamSet_t */
2647 typedef MLAN_PACK_START struct _MrvlIEtypes_SsParamSet_t
2648 {
2649     /** Header */
2650     MrvlIEtypesHeader_t header;
2651     /** CF/IBSS parameters sets */
2652     union
2653     {
2654         /** CF parameter set */
2655         CfParamSet_t cf_param_set[1];
2656         /** IBSS parameter set */
2657         IbssParamSet_t ibss_param_set[1];
2658     } cf_ibss;
2659 } MLAN_PACK_END MrvlIEtypes_SsParamSet_t;
2660 
2661 /** FhParamSet_t */
2662 typedef MLAN_PACK_START struct _FhParamSet_t
2663 {
2664     /** FH parameter : Dwell time */
2665     t_u16 dwell_time;
2666     /** FH parameter : Hop set */
2667     t_u8 hop_set;
2668     /** FH parameter : Hop pattern */
2669     t_u8 hop_pattern;
2670     /** FH parameter : Hop index */
2671     t_u8 hop_index;
2672 } MLAN_PACK_END FhParamSet_t;
2673 
2674 /** DsParamSet_t */
2675 typedef MLAN_PACK_START struct _DsParamSet_t
2676 {
2677     /** Current channel number */
2678     t_u8 current_chan;
2679 } MLAN_PACK_END DsParamSet_t;
2680 
2681 /** MrvlIEtypes_PhyParamSet_t */
2682 typedef MLAN_PACK_START struct _MrvlIEtypes_PhyParamSet_t
2683 {
2684     /** Header */
2685     MrvlIEtypesHeader_t header;
2686     /** FH/DS parameters */
2687     union
2688     {
2689         /** FH parameter set */
2690         FhParamSet_t fh_param_set[1];
2691         /** DS parameter set */
2692         DsParamSet_t ds_param_set[1];
2693     } fh_ds;
2694 } MLAN_PACK_END MrvlIEtypes_PhyParamSet_t;
2695 
2696 /* Auth type to be used in the Authentication portion of an Assoc seq */
2697 /** MrvlIEtypes_AuthType_t */
2698 typedef MLAN_PACK_START struct _MrvlIEtypes_AuthType_t
2699 {
2700     /** Header */
2701     MrvlIEtypesHeader_t header;
2702     /** Authentication type */
2703     t_u16 auth_type;
2704 } MLAN_PACK_END MrvlIEtypes_AuthType_t;
2705 
2706 #if CONFIG_SCAN_CHANNEL_GAP
2707 /** MrvlIEtypes_ScanChanGap_t */
2708 typedef MLAN_PACK_START struct _MrvlIEtypes_ScanChanGap_t
2709 {
2710     /** Header */
2711     MrvlIEtypesHeader_t header;
2712     /** Time gap in units to TUs to be used between
2713      * two consecutive channels scan */
2714     t_u16 gap;
2715 } MLAN_PACK_END MrvlIEtypes_ScanChanGap_t;
2716 
2717 /** channel statictics */
2718 typedef MLAN_PACK_START struct _chan_statistics_t
2719 {
2720     /** channle number */
2721     t_u8 chan_num;
2722     /** band info */
2723     Band_Config_t bandcfg;
2724     /** flags */
2725     t_u8 flags;
2726     /** noise */
2727     t_s8 noise;
2728     /** total network */
2729     t_u16 total_networks;
2730     /** scan duration */
2731     t_u16 cca_scan_duration;
2732     /** busy duration */
2733     t_u16 cca_busy_duration;
2734 } MLAN_PACK_END chan_statistics_t;
2735 
2736 /** channel statictics tlv */
2737 typedef MLAN_PACK_START struct _MrvlIEtypes_ChannelStats_t
2738 {
2739     /** Header */
2740     MrvlIEtypesHeader_t header;
2741     /** channel statictics */
2742     chan_statistics_t chanStat[];
2743 } MLAN_PACK_END MrvlIEtypes_ChannelStats_t;
2744 #endif
2745 
2746 /** MrvlIETypes_ActionFrame_t */
2747 typedef MLAN_PACK_START struct
2748 {
2749     MrvlIEtypesHeader_t header; /**< Header */
2750 
2751     t_u8 srcAddr[MLAN_MAC_ADDR_LENGTH];
2752     t_u8 dstAddr[MLAN_MAC_ADDR_LENGTH];
2753 
2754     IEEEtypes_ActionFrame_t actionFrame;
2755 
2756 } MLAN_PACK_END MrvlIETypes_ActionFrame_t;
2757 
2758 /** MrvlIEtypes_RxBaSync_t */
2759 typedef MLAN_PACK_START struct _MrvlIEtypes_RxBaSync_t
2760 {
2761     /** Header */
2762     MrvlIEtypesHeader_t header;
2763     /** mac address */
2764     t_u8 mac[MLAN_MAC_ADDR_LENGTH];
2765     /** tid */
2766     t_u8 tid;
2767     /** reserved field */
2768     t_u8 reserved;
2769     /** start seq num */
2770     t_u16 seq_num;
2771     /** bitmap len */
2772     t_u16 bitmap_len;
2773     /** bitmap */
2774     t_u8 bitmap[1];
2775 } MLAN_PACK_END MrvlIEtypes_RxBaSync_t;
2776 
2777 /** MrvlIEtypes_RsnParamSet_t */
2778 typedef MLAN_PACK_START struct _MrvlIEtypes_RsnParamSet_t
2779 {
2780     /** Header */
2781     MrvlIEtypesHeader_t header;
2782     /** RSN IE */
2783     t_u8 rsn_ie[1];
2784 } MLAN_PACK_END MrvlIEtypes_RsnParamSet_t;
2785 
2786 #if defined(WPA) || defined(WAPI_AP) || defined(HOST_AUTHENTICATOR)
2787 #ifdef KEY_PARAM_SET_V2
2788 /** Key Info flag for multicast key */
2789 #define KEY_INFO_MCAST_KEY 0x01U
2790 /** Key Info flag for unicast key */
2791 #define KEY_INFO_UCAST_KEY 0x02U
2792 /** Key Info flag for enable key */
2793 #define KEY_INFO_ENABLE_KEY 0x04
2794 /** Key Info flag for default key */
2795 #define KEY_INFO_DEFAULT_KEY 0x08U
2796 /** Key Info flag for TX key */
2797 #define KEY_INFO_TX_KEY 0x10U
2798 /** Key Info flag for RX key */
2799 #define KEY_INFO_RX_KEY       0x20U
2800 #define KEY_INFO_CMAC_AES_KEY 0x400
2801 /** PN size for WPA/WPA2 */
2802 #define WPA_PN_SIZE 8
2803 /** PN size for PMF IGTK */
2804 #define IGTK_PN_SIZE 8
2805 /** WAPI KEY size */
2806 #define WAPI_KEY_SIZE 32
2807 /** key params fix size */
2808 #define KEY_PARAMS_FIXED_LEN 10U
2809 /** key index mask */
2810 #define KEY_INDEX_MASK 0xfU
2811 
2812 /** wep_param */
2813 typedef MLAN_PACK_START struct _wep_param_t
2814 {
2815     /** key_len */
2816     t_u16 key_len;
2817     /** wep key */
2818     t_u8 key[MAX_WEP_KEY_SIZE];
2819 } MLAN_PACK_END wep_param_t;
2820 
2821 /** tkip_param */
2822 typedef MLAN_PACK_START struct _tkip_param
2823 {
2824     /** Rx packet num */
2825     t_u8 pn[WPA_PN_SIZE];
2826     /** key_len */
2827     t_u16 key_len;
2828     /** tkip key */
2829     t_u8 key[WPA_TKIP_KEY_LEN];
2830 } MLAN_PACK_END tkip_param;
2831 
2832 /** aes_param */
2833 typedef MLAN_PACK_START struct _aes_param
2834 {
2835     /** Rx packet num */
2836     t_u8 pn[WPA_PN_SIZE];
2837     /** key_len */
2838     t_u16 key_len;
2839     /** aes key */
2840     t_u8 key[WPA_AES_KEY_LEN];
2841 } MLAN_PACK_END aes_param;
2842 
2843 /** wapi_param */
2844 typedef MLAN_PACK_START struct _wapi_param
2845 {
2846     /** Rx packet num */
2847     t_u8 pn[PN_SIZE];
2848     /** key_len */
2849     t_u16 key_len;
2850     /** wapi key */
2851     t_u8 key[WAPI_KEY_SIZE];
2852 } MLAN_PACK_END wapi_param;
2853 
2854 /** cmac_aes_param */
2855 typedef MLAN_PACK_START struct _cmac_aes_param
2856 {
2857     /** IGTK pn */
2858     t_u8 ipn[IGTK_PN_SIZE];
2859     /** key_len */
2860     t_u16 key_len;
2861     /** aes key */
2862     t_u8 key[CMAC_AES_KEY_LEN];
2863 } MLAN_PACK_END cmac_aes_param;
2864 
2865 /** gmac_aes_256_param */
2866 typedef MLAN_PACK_START struct _gmac_aes_256_param
2867 {
2868     /** IGTK pn */
2869     t_u8 ipn[IGTK_PN_SIZE];
2870     /** key_len */
2871     t_u16 key_len;
2872     /** aes key */
2873     t_u8 key[WPA_IGTK_256_KEY_LEN];
2874 } MLAN_PACK_END gmac_aes_256_param;
2875 
2876 /** gmac_param */
2877 typedef MLAN_PACK_START struct _gcmp_param
2878 {
2879     /** GCMP pn */
2880     t_u8 pn[WPA_PN_SIZE];
2881     /** key_len */
2882     t_u16 key_len; /** aes key */
2883     t_u8 key[WPA_GCMP_KEY_LEN];
2884 } MLAN_PACK_END gcmp_param;
2885 
2886 /** ccmp256_param */
2887 typedef MLAN_PACK_START struct _ccmp256_param
2888 {
2889     /** CCMP pn */
2890     t_u8 pn[WPA_PN_SIZE];
2891     /** key_len */
2892     t_u16 key_len;
2893     /** ccmp256 key */
2894     t_u8 key[WPA_CCMP_256_KEY_LEN];
2895 } MLAN_PACK_END ccmp_256_param;
2896 
2897 /** MrvlIEtype_KeyParamSet_t */
2898 typedef MLAN_PACK_START struct _MrvlIEtype_KeyParamSetV2_t
2899 {
2900     /** Type ID */
2901     t_u16 type;
2902     /** Length of Payload */
2903     t_u16 length;
2904     /** mac address */
2905     t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH];
2906     /** key index */
2907     t_u8 key_idx;
2908     /** Type of Key: WEP=0, TKIP=1, AES=2, WAPI=3 AES_CMAC=4 */
2909     t_u8 key_type;
2910     /** Key Control Info specific to a key_type_id */
2911     t_u16 key_info;
2912     union
2913     {
2914         /** wep key param */
2915         wep_param_t wep;
2916         /** tkip key param */
2917         tkip_param tkip;
2918         /** aes key param */
2919         aes_param aes;
2920         /** wapi key param */
2921         wapi_param wapi;
2922         /** IGTK key param */
2923         cmac_aes_param cmac_aes;
2924         /** IGTK key param */
2925         gmac_aes_256_param gmac_aes;
2926         /** gcmp key param */
2927         gcmp_param gcmp;
2928         /** ccmp 256 key parameters */
2929         ccmp_256_param ccmp256;
2930     } key_params;
2931 } MLAN_PACK_END MrvlIEtype_KeyParamSetV2_t;
2932 #else
2933 /** Key_param_set fixed length */
2934 #define KEYPARAMSET_FIXED_LEN 6
2935 
2936 /** cmac_aes_param */
2937 typedef MLAN_PACK_START struct _cmac_param
2938 {
2939     /** IGTK pn */
2940     t_u8 ipn[IGTK_PN_SIZE];
2941     /** aes key */
2942     t_u8 key[CMAC_AES_KEY_LEN];
2943 } MLAN_PACK_END cmac_param;
2944 
2945 /** MrvlIEtype_KeyParamSet_t */
2946 typedef MLAN_PACK_START struct _MrvlIEtype_KeyParamSet_t
2947 {
2948     /** Type ID */
2949     t_u16 type;
2950     /** Length of Payload */
2951     t_u16 length;
2952     /** Type of Key: WEP=0, TKIP=1, AES=2 WAPI=3 AES_CMAC=4 */
2953     t_u16 key_type_id;
2954     /** Key Control Info specific to a key_type_id */
2955     t_u16 key_info;
2956     /** Length of key */
2957     t_u16 key_len;
2958     /** Key material of size key_len */
2959 #if defined(WAPI)
2960     t_u8 key[50];
2961 #else
2962     t_u8 key[32];
2963 #endif
2964 } MLAN_PACK_END MrvlIEtype_KeyParamSet_t;
2965 #endif /* KEY_PARAM_SET_V2 */
2966 
2967 /** HostCmd_DS_802_11_KEY_MATERIAL */
2968 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_KEY_MATERIAL
2969 {
2970     /** Action */
2971     t_u16 action;
2972 #ifdef KEY_PARAM_SET_V2
2973     /** Key parameter set */
2974     MrvlIEtype_KeyParamSetV2_t key_param_set;
2975 #else
2976     /** Key parameter set */
2977     MrvlIEtype_KeyParamSet_t key_param_set;
2978 #endif
2979 } MLAN_PACK_END HostCmd_DS_802_11_KEY_MATERIAL;
2980 #endif /* WPA || WAPI_AP || HOST_AUTHENTICATOR */
2981 
2982 #if CONFIG_GTK_REKEY_OFFLOAD
2983 /** HostCmd_DS_GTK_REKEY_PARAMS */
2984 typedef MLAN_PACK_START struct _HostCmd_DS_GTK_REKEY_PARAMS
2985 {
2986     /** Action */
2987     t_u16 action;
2988     /** Key confirmation key */
2989     t_u8 kck[MLAN_KCK_LEN];
2990     /** Key encryption key */
2991     t_u8 kek[MLAN_KEK_LEN];
2992     /** Replay counter low 32 bit */
2993     t_u32 replay_ctr_low;
2994     /** Replay counter high 32 bit */
2995     t_u32 replay_ctr_high;
2996 } MLAN_PACK_END HostCmd_DS_GTK_REKEY_PARAMS;
2997 #endif
2998 
2999 /** Data structure of WMM QoS information */
3000 typedef MLAN_PACK_START struct _WmmQosInfo_t
3001 {
3002 #ifdef BIG_ENDIAN_SUPPORT
3003     /** QoS UAPSD */
3004     t_u8 qos_uapsd : 1;
3005     /** Reserved */
3006     t_u8 reserved : 3;
3007     /** Parameter set count */
3008     t_u8 para_set_count : 4;
3009 #else
3010     /** Parameter set count */
3011     t_u8 para_set_count : 4;
3012     /** Reserved */
3013     t_u8 reserved : 3;
3014     /** QoS UAPSD */
3015     t_u8 qos_uapsd : 1;
3016 #endif /* BIG_ENDIAN_SUPPORT */
3017 } MLAN_PACK_END WmmQosInfo_t, *pWmmQosInfo_t;
3018 
3019 /** Data structure of WMM ECW */
3020 typedef MLAN_PACK_START struct _WmmEcw_t
3021 {
3022 #ifdef BIG_ENDIAN_SUPPORT
3023     /** Maximum Ecw */
3024     t_u8 ecw_max : 4;
3025     /** Minimum Ecw */
3026     t_u8 ecw_min : 4;
3027 #else
3028     /** Minimum Ecw */
3029     t_u8 ecw_min : 4;
3030     /** Maximum Ecw */
3031     t_u8 ecw_max : 4;
3032 #endif /* BIG_ENDIAN_SUPPORT */
3033 } MLAN_PACK_END WmmEcw_t, *pWmmEcw_t;
3034 
3035 /** Data structure of WMM Aci/Aifsn */
3036 typedef MLAN_PACK_START struct _WmmAciAifsn_t
3037 {
3038 #ifdef BIG_ENDIAN_SUPPORT
3039     /** Reserved */
3040     t_u8 reserved : 1;
3041     /** Aci */
3042     t_u8 aci : 2;
3043     /** Acm */
3044     t_u8 acm : 1;
3045     /** Aifsn */
3046     t_u8 aifsn : 4;
3047 #else
3048     /** Aifsn */
3049     t_u8 aifsn : 4;
3050     /** Acm */
3051     t_u8 acm : 1;
3052     /** Aci */
3053     t_u8 aci : 2;
3054     /** Reserved */
3055     t_u8 reserved : 1;
3056 #endif /* BIG_ENDIAN_SUPPORT */
3057 } MLAN_PACK_END WmmAciAifsn_t, *pWmmAciAifsn_t;
3058 
3059 /** Data structure of WMM AC parameters  */
3060 typedef MLAN_PACK_START struct _WmmAcParameters_t
3061 {
3062     WmmAciAifsn_t aci_aifsn; /**< AciAifSn */
3063     WmmEcw_t ecw;            /**< Ecw */
3064     t_u16 tx_op_limit;       /**< Tx op limit */
3065 } MLAN_PACK_END WmmAcParameters_t, *pWmmAcParameters_t;
3066 
3067 /** Data structure of WMM parameter  */
3068 typedef MLAN_PACK_START struct _WmmParameter_t
3069 {
3070     /** OuiType:  00:50:f2:02 */
3071     t_u8 ouitype[4];
3072     /** Oui subtype: 01 */
3073     t_u8 ouisubtype;
3074     /** version: 01 */
3075     t_u8 version;
3076     /** QoS information */
3077     t_u8 qos_info;
3078     /** Reserved */
3079     t_u8 reserved;
3080     /** AC Parameters Record WMM_AC_BE, WMM_AC_BK, WMM_AC_VI, WMM_AC_VO */
3081     WmmAcParameters_t ac_params[MAX_AC_QUEUES];
3082 } MLAN_PACK_END WmmParameter_t, *pWmmParameter_t;
3083 
3084 /** Data structure of Host command WMM_PARAM_CFG  */
3085 typedef MLAN_PACK_START struct _HostCmd_DS_WMM_PARAM_CONFIG
3086 {
3087     /** action */
3088     t_u16 action;
3089     /** AC Parameters Record WMM_AC_BE, WMM_AC_BK, WMM_AC_VI, WMM_AC_VO */
3090     WmmAcParameters_t ac_params[MAX_AC_QUEUES];
3091 } MLAN_PACK_END HostCmd_DS_WMM_PARAM_CONFIG;
3092 
3093 /* Definition of firmware host command */
3094 /** HostCmd_DS_GEN */
3095 typedef MLAN_PACK_START struct _HostCmd_DS_GEN
3096 {
3097     /** Command */
3098     t_u16 command;
3099     /** Size */
3100     t_u16 size;
3101     /** Sequence number */
3102     t_u16 seq_num;
3103     /** Result */
3104     t_u16 result;
3105 } MLAN_PACK_END HostCmd_DS_GEN;
3106 
3107 /** Size of HostCmd_DS_GEN */
3108 #define S_DS_GEN sizeof(HostCmd_DS_GEN)
3109 
3110 #define MAX_MOD_GROUP 35
3111 /** modulation setting */
3112 typedef MLAN_PACK_START struct _mod_group_setting
3113 {
3114     /** modulation group */
3115     t_u8 mod_group;
3116     /** power */
3117     t_u8 power;
3118 } MLAN_PACK_END mod_group_setting;
3119 
3120 /** chan trpc config */
3121 typedef MLAN_PACK_START struct _ChanTRPCConfig_t
3122 {
3123     /** start freq */
3124     t_u16 start_freq;
3125     /* channel width */
3126     t_u8 width;
3127     /** channel number */
3128     t_u8 chan_num;
3129     mod_group_setting mod_group[MAX_MOD_GROUP];
3130 } MLAN_PACK_END ChanTRPCConfig_t;
3131 
3132 /** MrvlIETypes_ChanTRPCConfig_t */
3133 typedef MLAN_PACK_START struct _MrvlIETypes_ChanTRPCConfig_t
3134 {
3135     /** Header */
3136     MrvlIEtypesHeader_t header;
3137     /** start freq */
3138     t_u16 start_freq;
3139     /* channel width */
3140     t_u8 width;
3141     /** channel number */
3142     t_u8 chan_num;
3143     mod_group_setting mod_group[0];
3144 } MLAN_PACK_END MrvlIETypes_ChanTRPCConfig_t;
3145 
3146 /** Address type: broadcast */
3147 #define ADDR_TYPE_BROADCAST 1
3148 /* Address type: unicast */
3149 #define ADDR_TYPE_UNICAST 2
3150 /* Address type: multicast */
3151 #define ADDR_TYPE_MULTICAST 3
3152 
3153 /** Ether type: any */
3154 #define ETHER_TYPE_ANY 0xffff
3155 /** Ether type: ARP */
3156 #define ETHER_TYPE_ARP 0x0608
3157 
3158 /** IPv4 address any */
3159 #define IPV4_ADDR_ANY 0xffffffffU
3160 
3161 /** Header structure for ARP filter */
3162 typedef MLAN_PACK_START struct _arpfilter_header
3163 {
3164     /** Type */
3165     t_u16 type;
3166     /** TLV length */
3167     t_u16 len;
3168 } MLAN_PACK_END arpfilter_header;
3169 
3170 /** Filter entry structure */
3171 typedef MLAN_PACK_START struct _filter_entry
3172 {
3173     /** Address type */
3174     t_u16 addr_type;
3175     /** Ether type */
3176     t_u16 eth_type;
3177     /** IPv4 address */
3178     t_u32 ipv4_addr;
3179 } MLAN_PACK_END filter_entry;
3180 
3181 typedef MLAN_PACK_START struct _HostCmd_DS_MEF_CFG
3182 {
3183     /** Criteria */
3184     t_u32 criteria;
3185     /** Number of entries */
3186     t_u16 nentries;
3187 } MLAN_PACK_END HostCmd_DS_MEF_CFG;
3188 
3189 /** mef entry struct */
3190 typedef MLAN_PACK_START struct _mef_entry_header
3191 {
3192     /**mode:1->hostsleep;2->non hostsleep mode*/
3193     t_u8 mode;
3194     /**action=0->discard and not wake host
3195      * action=1->discard and wake host
3196      * action=3->allow and wake host*/
3197     t_u8 action;
3198     /* Len */
3199     t_u16 len;
3200 } MLAN_PACK_END mef_entry_header;
3201 
3202 /** mef op struct is to help to generate mef data*/
3203 typedef MLAN_PACK_START struct _mef_op
3204 {
3205     /** operand_type*/
3206     t_u8 operand_type;
3207     /** reserved*/
3208     t_u8 rsvd[3];
3209     /** data */
3210     t_u8 val[MAX_NUM_BYTE_SEQ + 1];
3211 } MLAN_PACK_END mef_op;
3212 
3213 /* HostCmd_DS_802_11_SLEEP_PERIOD */
3214 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SLEEP_PERIOD
3215 {
3216     /** ACT_GET/ACT_SET */
3217     t_u16 action;
3218 
3219     /** Sleep Period in msec */
3220     t_u16 sleep_pd;
3221 } MLAN_PACK_END HostCmd_DS_802_11_SLEEP_PERIOD;
3222 
3223 /* HostCmd_DS_802_11_SLEEP_PARAMS */
3224 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SLEEP_PARAMS
3225 {
3226     /** ACT_GET/ACT_SET */
3227     t_u16 action;
3228     /** Sleep clock error in ppm */
3229     t_u16 error;
3230     /** Wakeup offset in usec */
3231     t_u16 offset;
3232     /** Clock stabilization time in usec */
3233     t_u16 stable_time;
3234     /** Control periodic calibration */
3235     t_u8 cal_control;
3236     /** Control the use of external sleep clock */
3237     t_u8 external_sleep_clk;
3238     /** Reserved field, should be set to zero */
3239     t_u16 reserved;
3240 } MLAN_PACK_END HostCmd_DS_802_11_SLEEP_PARAMS;
3241 
3242 /** Sleep response control */
3243 typedef enum _sleep_resp_ctrl
3244 {
3245     RESP_NOT_NEEDED = 0,
3246     RESP_NEEDED,
3247 } sleep_resp_ctrl;
3248 
3249 /** Structure definition for the new ieee power save parameters*/
3250 typedef MLAN_PACK_START struct __ps_param
3251 {
3252     /** Null packet interval */
3253     t_u16 null_pkt_interval;
3254     /** Num dtims */
3255     t_u16 multiple_dtims;
3256     /** becaon miss interval */
3257     t_u16 bcn_miss_timeout;
3258     /** local listen interval */
3259     t_u16 local_listen_interval;
3260     /** Adhoc awake period */
3261     t_u16 adhoc_wake_period;
3262     /** mode - (0x01 - firmware to automatically choose PS_POLL or NULL mode, 0x02 - PS_POLL, 0x03 - NULL mode ) */
3263     t_u16 mode;
3264     /** Delay to PS in milliseconds */
3265     t_u16 delay_to_ps;
3266 } MLAN_PACK_END ps_param;
3267 
3268 /** Structure definition for the new auto deep sleep command */
3269 typedef MLAN_PACK_START struct __auto_ds_param
3270 {
3271     /** Deep sleep inactivity timeout */
3272     t_u16 deep_sleep_timeout;
3273 } MLAN_PACK_END auto_ds_param;
3274 
3275 #if (CONFIG_WNM_PS)
3276 /** Structure definition for the wnm power save command */
3277 typedef MLAN_PACK_START struct __wnm_ps_param
3278 {
3279     /** 0: enable WNM Sleep Mode, 1: disable WNM Sleep Mode */
3280     t_u8 action;
3281     /** Null packet interval */
3282     t_u16 null_pkt_interval;
3283     /** becaon miss interval */
3284     t_u16 bcn_miss_timeout;
3285     /** local listen interval */
3286     t_u16 local_listen_interval;
3287     /** mode - (0x01 - firmware to automatically choose PS_POLL or NULL mode, 0x02 - PS_POLL, 0x03 - NULL mode ) */
3288     t_u16 ps_mode;
3289     /** Delay to PS in milliseconds */
3290     t_u16 delay_to_ps;
3291     /** WNM sleep interval */
3292     t_u16 wnm_sleep_interval;
3293 } MLAN_PACK_END wnm_ps_param;
3294 
3295 /** Structure definition for the wnm power save result */
3296 typedef MLAN_PACK_START struct __wnm_ps_result
3297 {
3298     /** 0: enable WNM Sleep Mode, 1: disable WNM Sleep Mode */
3299     t_u8 action;
3300     /** 0: successful; 1: fail */
3301     t_u8 result;
3302 } MLAN_PACK_END wnm_ps_result;
3303 #endif
3304 
3305 /** Structure definition for sleep confirmation in the new ps command */
3306 typedef struct __sleep_confirm_param
3307 {
3308     /** response control 0x00 - response not needed, 0x01 - response needed */
3309     t_u16 resp_ctrl;
3310 } sleep_confirm_param;
3311 
3312 /* bit define for pre_asleep*/
3313 #define BLOCK_CMD_IN_PRE_ASLEEP MBIT(0)
3314 /** MrvlIEtypes_ext_ps_param_t */
3315 typedef MLAN_PACK_START struct _MrvlIEtypes_ext_ps_param_t
3316 {
3317     /** Header */
3318     MrvlIEtypesHeader_t header;
3319     /** mode: bit0:BLOCK_CMD_IN_PRE_ASLEEP */
3320     t_u32 mode;
3321 } MLAN_PACK_END MrvlIEtypes_ext_ps_param_t;
3322 
3323 /** ext_ps_param_t */
3324 typedef MLAN_PACK_START struct _ext_ps_param
3325 {
3326     /** reserved */
3327     t_u16 reserved;
3328     /** ext_ps_param tlv */
3329     MrvlIEtypes_ext_ps_param_t param;
3330 } MLAN_PACK_END ext_ps_param;
3331 
3332 /** bitmap for get auto deepsleep */
3333 #define BITMAP_AUTO_DS 0x01U
3334 /** bitmap for sta power save */
3335 #define BITMAP_STA_PS 0x10U
3336 /** bitmap for uap inactivity based PS */
3337 #define BITMAP_UAP_INACT_PS 0x100U
3338 /** bitmap for uap DTIM PS */
3339 #define BITMAP_UAP_DTIM_PS 0x200U
3340 /** Structure definition for the new ieee power save parameters*/
3341 typedef struct _auto_ps_param
3342 {
3343     /** bitmap for enable power save mode */
3344     t_u16 ps_bitmap;
3345     /* auto deep sleep parameter, sta power save parameter uap inactivity
3346        parameter uap DTIM parameter */
3347 } auto_ps_param;
3348 
3349 /** fix size for auto ps */
3350 #define AUTO_PS_FIX_SIZE 4U
3351 
3352 /** TLV type : auto ds param */
3353 #define TLV_TYPE_AUTO_DS_PARAM (PROPRIETARY_TLV_BASE_ID + 0x71U) // 0x0171
3354 /** TLV type : ps param */
3355 #define TLV_TYPE_PS_PARAM (PROPRIETARY_TLV_BASE_ID + 0x72U) // 0x0172
3356 
3357 #if (CONFIG_WNM_PS)
3358 /** TLV type : wnm param */
3359 #define TLV_TYPE_WNM_PARAM (PROPRIETARY_TLV_BASE_ID + 0x158) // 0x0258
3360 #endif
3361 /** TLV type: ps_ext_param */
3362 #define TLV_TYPE_PS_EXT_PARAM (PROPRIETARY_TLV_BASE_ID + 0x15F) /* 0x25F */
3363 
3364 /** MrvlIEtypes_auto_ds_param_t */
3365 typedef MLAN_PACK_START struct _MrvlIEtypes_auto_ds_param_t
3366 {
3367     /** Header */
3368     MrvlIEtypesHeader_t header;
3369     /** auto ds param */
3370     auto_ds_param param;
3371 } MLAN_PACK_END MrvlIEtypes_auto_ds_param_t;
3372 
3373 /** MrvlIEtypes_ps_param_t */
3374 typedef MLAN_PACK_START struct _MrvlIEtypes_ps_param_t
3375 {
3376     /** Header */
3377     MrvlIEtypesHeader_t header;
3378     /** ps param */
3379     ps_param param;
3380 } MLAN_PACK_END MrvlIEtypes_ps_param_t;
3381 
3382 #if (CONFIG_WNM_PS)
3383 /** MrvlIEtypes_wnm_ps_param_t */
3384 typedef MLAN_PACK_START struct _MrvlIEtypes_wnm_ps_param_t
3385 {
3386     /** Header */
3387     MrvlIEtypesHeader_t header;
3388     /** wnm ps param */
3389     wnm_ps_param param;
3390 } MLAN_PACK_END MrvlIEtypes_wnm_ps_param_t;
3391 #endif
3392 
3393 /** Structure definition for new power save command */
3394 typedef MLAN_PACK_START struct _HostCmd_DS_PS_MODE_ENH
3395 {
3396     /** Action */
3397     uint16_t action;
3398     /** Data speciifc to action */
3399     /* For IEEE power save data will be as UINT16 mode (0x01 - firmware to
3400        automatically choose PS_POLL or NULL mode, 0x02 - PS_POLL, 0x03 - NULL
3401        mode ) UINT16 NullpacketInterval UINT16 NumDtims UINT16
3402        BeaconMissInterval UINT16 locallisteninterval UINT16 adhocawakeperiod */
3403 
3404     /* For auto deep sleep */
3405     /* UINT16 Deep sleep inactivity timeout */
3406 
3407     /* For PS sleep confirm UINT16 responeCtrl - 0x00 - reponse from fw not
3408        needed, 0x01 - response from fw is needed */
3409 
3410     union
3411     {
3412         /** PS param definition */
3413         ps_param opt_ps;
3414         /** Auto ds param definition */
3415         auto_ds_param auto_ds;
3416         /** Sleep comfirm param definition */
3417         sleep_confirm_param sleep_cfm;
3418         /** bitmap for get PS info and Disable PS mode */
3419         t_u16 ps_bitmap;
3420         /** auto ps param */
3421         auto_ps_param auto_ps;
3422 #if (CONFIG_WNM_PS)
3423         /** wnm ps param */
3424         wnm_ps_param param;
3425 #endif
3426         /** ext ps param */
3427         ext_ps_param ext_param;
3428     } params;
3429 } MLAN_PACK_END HostCmd_DS_802_11_PS_MODE_ENH;
3430 
3431 /** UAP FW version 2 */
3432 #define UAP_FW_VERSION_2 0x2
3433 
3434 /** HostCMD_DS_APCMD_ACS_SCAN */
3435 typedef MLAN_PACK_START struct _HostCMD_DS_APCMD_ACS_SCAN
3436 {
3437     /** band */
3438     Band_Config_t bandcfg;
3439     /** channel */
3440     t_u8 chan;
3441 } MLAN_PACK_END HostCMD_DS_APCMD_ACS_SCAN;
3442 
3443 /** HostCmd_DS_GET_HW_SPEC */
3444 typedef MLAN_PACK_START struct _HostCmd_DS_GET_HW_SPEC
3445 {
3446     /** HW Interface version number */
3447     t_u16 hw_if_version;
3448     /** HW version number */
3449     t_u16 version;
3450     /** Reserved field */
3451     t_u16 reserved;
3452     /** Max no of Multicast address  */
3453     t_u16 num_of_mcast_adr;
3454     /** MAC address */
3455     t_u8 permanent_addr[MLAN_MAC_ADDR_LENGTH];
3456     /** Region Code */
3457     t_u16 region_code;
3458     /** Number of antenna used */
3459     t_u16 number_of_antenna;
3460     /** FW release number, example 0x1234=1.2.3.4 */
3461     t_u32 fw_release_number;
3462     /** hw dev cap */
3463     t_u32 hw_dev_cap;
3464     /** Reserved field */
3465     t_u32 reserved_2;
3466     /** Reserved field */
3467     t_u32 reserved_3;
3468     /** FW/HW Capability */
3469     t_u32 fw_cap_info;
3470     /** 802.11n Device Capabilities */
3471     t_u32 dot_11n_dev_cap;
3472     /** MIMO abstraction of MCSs supported by device */
3473     t_u8 dev_mcs_support;
3474     /** Valid end port at init */
3475     t_u16 mp_end_port;
3476     /** mgmt IE buffer count */
3477     t_u16 mgmt_buf_count;
3478     /** Reserved */
3479     t_u32 reserved_8;
3480     /** Reserved */
3481     t_u32 reserved_9;
3482     /** 802.11ac Device Capabilities */
3483     t_u32 Dot11acDevCap;
3484     /** MCSs supported by 802.11ac device */
3485     t_u32 Dot11acMcsSupport;
3486 } MLAN_PACK_END HostCmd_DS_GET_HW_SPEC;
3487 
3488 /**  HostCmd_DS_802_11_CFG_DATA */
3489 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_CFG_DATA
3490 {
3491     /** Action */
3492     t_u16 action;
3493     /** Type */
3494     t_u16 type;
3495     /** Data length */
3496     t_u16 data_len;
3497     /** Data */
3498     t_u8 data[1];
3499 } MLAN_PACK_END HostCmd_DS_802_11_CFG_DATA;
3500 
3501 /**  HostCmd_DS_CMD_802_11_RSSI_INFO */
3502 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_RSSI_INFO
3503 {
3504     /** Action */
3505     t_u16 action;
3506     /** Parameter used for exponential averaging for Data */
3507     t_u16 ndata;
3508     /** Parameter used for exponential averaging for Beacon */
3509     t_u16 nbcn;
3510     /** Reserved field 0 */
3511     t_u16 reserved[9];
3512     /** Reserved field 1 */
3513     t_u64 reserved_1;
3514 } MLAN_PACK_END HostCmd_DS_802_11_RSSI_INFO;
3515 
3516 /** HostCmd_DS_802_11_RSSI_INFO_RSP */
3517 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_RSSI_INFO_RSP
3518 {
3519     /** Action */
3520     t_u16 action;
3521     /** Parameter used for exponential averaging for Data */
3522     t_u16 ndata;
3523     /** Parameter used for exponential averaging for beacon */
3524     t_u16 nbcn;
3525     /** Last Data RSSI in dBm */
3526     t_s16 data_rssi_last;
3527     /** Last Data NF in dBm */
3528     t_s16 data_nf_last;
3529     /** AVG DATA RSSI in dBm */
3530     t_s16 data_rssi_avg;
3531     /** AVG DATA NF in dBm */
3532     t_s16 data_nf_avg;
3533     /** Last BEACON RSSI in dBm */
3534     t_s16 bcn_rssi_last;
3535     /** Last BEACON NF in dBm */
3536     t_s16 bcn_nf_last;
3537     /** AVG BEACON RSSI in dBm */
3538     t_s16 bcn_rssi_avg;
3539     /** AVG BEACON NF in dBm */
3540     t_s16 bcn_nf_avg;
3541     /** Last RSSI Beacon TSF */
3542     t_u64 tsf_bcn;
3543 } MLAN_PACK_END HostCmd_DS_802_11_RSSI_INFO_RSP;
3544 
3545 /** HostCmd_DS_802_11_MAC_ADDRESS */
3546 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_MAC_ADDRESS
3547 {
3548     /** Action */
3549     t_u16 action;
3550     /** MAC address */
3551     t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH];
3552 } MLAN_PACK_END HostCmd_DS_802_11_MAC_ADDRESS;
3553 
3554 /** HostCmd_DS_MAC_CONTROL */
3555 typedef MLAN_PACK_START struct _HostCmd_DS_MAC_CONTROL
3556 {
3557     /** Action */
3558     t_u32 action;
3559 } MLAN_PACK_END HostCmd_DS_MAC_CONTROL;
3560 
3561 #if (CONFIG_WIFI_IND_RESET) && (CONFIG_WIFI_IND_DNLD)
3562 /** HostCmd_DS_IND_RST */
3563 typedef MLAN_PACK_START struct _HostCmd_DS_IND_RST
3564 {
3565     /** Action */
3566     t_u16 action;
3567     /** CMD_SUBID */
3568     t_u16 sub_id;
3569 } MLAN_PACK_END HostCmd_DS_IND_RST;
3570 
3571 /** HostCmd_DS_INDEPENDENT_RESET_CFG */
3572 typedef MLAN_PACK_START struct _HostCmd_DS_INDEPENDENT_RESET_CFG
3573 {
3574     /** ACT_GET/ACT_SET */
3575     t_u16 action;
3576     /** out band independent reset */
3577     t_u8 ir_mode;
3578     /** gpio pin */
3579     t_u8 gpio_pin;
3580 } MLAN_PACK_END HostCmd_DS_INDEPENDENT_RESET_CFG;
3581 #endif
3582 
3583 /** HostCmd_DS_CMD_TX_DATA_PAUSE */
3584 typedef MLAN_PACK_START struct _HostCmd_DS_CMD_TX_DATA_PAUSE
3585 {
3586     /** Action */
3587     t_u16 action;
3588     /** Enable/disable Tx data pause */
3589     t_u8 enable_tx_pause;
3590     /** Max number of TX buffers allowed for all PS clients*/
3591     t_u8 pause_tx_count;
3592 } MLAN_PACK_END HostCmd_DS_CMD_TX_DATA_PAUSE;
3593 
3594 /** TLV type : TX pause TLV */
3595 #define TLV_TYPE_TX_PAUSE (PROPRIETARY_TLV_BASE_ID + 0x94) // 0x0194
3596 /** MrvlIEtypes_SsIdParamSet_t */
3597 typedef MLAN_PACK_START struct _MrvlIEtypes_tx_pause_t
3598 {
3599     /** Header */
3600     MrvlIEtypesHeader_t header;
3601     /** peer mac address */
3602     t_u8 peermac[MLAN_MAC_ADDR_LENGTH];
3603     /** Tx pause state, 1--pause, 0--free flowing */
3604     t_u8 tx_pause;
3605     /** total packets queued for the client */
3606     t_u8 pkt_cnt;
3607 } MLAN_PACK_END MrvlIEtypes_tx_pause_t;
3608 
3609 /**  HostCmd_CMD_MAC_MULTICAST_ADR */
3610 typedef MLAN_PACK_START struct _HostCmd_DS_MAC_MULTICAST_ADR
3611 {
3612     /** Action */
3613     t_u16 action;
3614     /** Number of addresses */
3615     t_u16 num_of_adrs;
3616     /** List of MAC */
3617     t_u8 mac_list[MLAN_MAC_ADDR_LENGTH * MLAN_MAX_MULTICAST_LIST_SIZE];
3618 } MLAN_PACK_END HostCmd_DS_MAC_MULTICAST_ADR;
3619 
3620 /**  HostCmd_CMD_802_11_DEAUTHENTICATE */
3621 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_DEAUTHENTICATE
3622 {
3623     /** MAC address */
3624     t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH];
3625     /** Deauthentication resaon code */
3626     t_u16 reason_code;
3627 } MLAN_PACK_END HostCmd_DS_802_11_DEAUTHENTICATE;
3628 
3629 /** HostCmd_DS_802_11_ASSOCIATE */
3630 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_ASSOCIATE
3631 {
3632     /** Peer STA address */
3633     t_u8 peer_sta_addr[MLAN_MAC_ADDR_LENGTH];
3634     /** Capability information */
3635     IEEEtypes_CapInfo_t cap_info;
3636     /** Listen interval */
3637     t_u16 listen_interval;
3638     /** Beacon period */
3639     t_u16 beacon_period;
3640     /** DTIM period */
3641     t_u8 dtim_period;
3642 
3643     /**
3644      *  MrvlIEtypes_SsIdParamSet_t  SsIdParamSet;
3645      *  MrvlIEtypes_PhyParamSet_t   PhyParamSet;
3646      *  MrvlIEtypes_SsParamSet_t    SsParamSet;
3647      *  MrvlIEtypes_RatesParamSet_t RatesParamSet;
3648      */
3649 } MLAN_PACK_END HostCmd_DS_802_11_ASSOCIATE;
3650 
3651 /** HostCmd_CMD_802_11_ASSOCIATE response */
3652 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_ASSOCIATE_RSP
3653 {
3654     /** Association response structure */
3655     IEEEtypes_AssocRsp_t assoc_rsp;
3656 } MLAN_PACK_END HostCmd_DS_802_11_ASSOCIATE_RSP;
3657 
3658 /** HostCmd_DS_802_11_AD_HOC_START*/
3659 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_AD_HOC_START
3660 {
3661     /** AdHoc SSID */
3662     t_u8 ssid[MLAN_MAX_SSID_LENGTH];
3663     /** BSS mode */
3664     mlan_bss_mode bss_mode;
3665     /** Beacon period */
3666     t_u16 beacon_period;
3667     /** DTIM period */
3668     t_u8 dtim_period;
3669     /** SS parameter set */
3670     IEEEtypes_SsParamSet_t ss_param_set;
3671     /** PHY parameter set */
3672     IEEEtypes_PhyParamSet_t phy_param_set;
3673     /** Reserved field */
3674     t_u16 reserved1;
3675     /** Capability information */
3676     IEEEtypes_CapInfo_t cap;
3677     /** Supported data rates */
3678     t_u8 DataRate[HOSTCMD_SUPPORTED_RATES];
3679 } MLAN_PACK_END HostCmd_DS_802_11_AD_HOC_START;
3680 
3681 /**  HostCmd_CMD_802_11_AD_HOC_START response */
3682 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_AD_HOC_START_RESULT
3683 {
3684     /** Padding */
3685     t_u8 pad[3];
3686     /** AdHoc BSSID */
3687     t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
3688     /** Padding to sync with FW structure*/
3689     t_u8 pad2[2];
3690     /** Result */
3691     t_u8 result;
3692 } MLAN_PACK_END HostCmd_DS_802_11_AD_HOC_START_RESULT;
3693 
3694 /**  HostCmd_CMD_802_11_AD_HOC_START response */
3695 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_AD_HOC_JOIN_RESULT
3696 {
3697     /** Result */
3698     t_u8 result;
3699 } MLAN_PACK_END HostCmd_DS_802_11_AD_HOC_JOIN_RESULT;
3700 
3701 /** AdHoc_BssDesc_t */
3702 typedef MLAN_PACK_START struct _AdHoc_BssDesc_t
3703 {
3704     /** BSSID */
3705     t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
3706     /** SSID */
3707     t_u8 ssid[MLAN_MAX_SSID_LENGTH];
3708     /** BSS mode */
3709     mlan_bss_mode bss_mode;
3710     /** Beacon period */
3711     t_u16 beacon_period;
3712     /** DTIM period */
3713     t_u8 dtim_period;
3714     /** Timestamp */
3715     t_u8 time_stamp[8];
3716     /** Local time */
3717     t_u8 local_time[8];
3718     /** PHY parameter set */
3719     IEEEtypes_PhyParamSet_t phy_param_set;
3720     /** SS parameter set */
3721     IEEEtypes_SsParamSet_t ss_param_set;
3722     /** Capability information */
3723     IEEEtypes_CapInfo_t cap;
3724     /** Supported data rates */
3725     t_u8 data_rates[HOSTCMD_SUPPORTED_RATES];
3726 
3727     /*
3728      *  DO NOT ADD ANY FIELDS TO THIS STRUCTURE.
3729      *  It is used in the Adhoc join command and will cause a
3730      *  binary layout mismatch with the firmware
3731      */
3732 } MLAN_PACK_END AdHoc_BssDesc_t;
3733 
3734 /** HostCmd_DS_802_11_AD_HOC_JOIN */
3735 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_AD_HOC_JOIN
3736 {
3737     /** AdHoc BSS descriptor */
3738     AdHoc_BssDesc_t bss_descriptor;
3739     /** Reserved field */
3740     t_u16 reserved1;
3741     /** Reserved field */
3742     t_u16 reserved2;
3743 } MLAN_PACK_END HostCmd_DS_802_11_AD_HOC_JOIN;
3744 
3745 #if CONFIG_NET_MONITOR
3746 /** MrvlIEtypes_Monitor_filter_t */
3747 typedef MLAN_PACK_START struct _MrvlIEtypes_Monitor_filter_t
3748 {
3749     /** Header */
3750     MrvlIEtypesHeader_t header;
3751     /** mac num of filter*/
3752     t_u8 filter_num;
3753     /** mac address */
3754     mlan_802_11_mac_addr mac_list[MAX_MONIT_MAC_FILTER_NUM];
3755 } MLAN_PACK_END MrvlIEtypes_Monitor_filter_t;
3756 
3757 /**  HostCmd_CMD_802_11_NET_MONITOR */
3758 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_NET_MONITOR
3759 {
3760     t_u16 action;
3761     t_u16 monitor_activity;
3762     t_u16 filter_flags;
3763     MrvlIEtypes_ChanBandListParamSet_t monitor_channel;
3764     MrvlIEtypes_Monitor_filter_t monitor_filter;
3765 } MLAN_PACK_END HostCmd_DS_802_11_NET_MONITOR;
3766 #endif
3767 
3768 /** Interrupt Raising Edge */
3769 #define INT_RASING_EDGE 0
3770 /** Interrupt Falling Edge */
3771 #define INT_FALLING_EDGE 1
3772 
3773 /** Delay 1 usec */
3774 #define DELAY_1_US 1
3775 
3776 typedef MLAN_PACK_START struct _HostCmd_DS_SDIO_GPIO_INT_CONFIG
3777 {
3778     /** Action */
3779     t_u16 action;
3780     /** GPIO interrupt pin */
3781     t_u16 gpio_pin;
3782     /** GPIO interrupt edge, 1: failing edge; 0: raising edge */
3783     t_u16 gpio_int_edge;
3784     /** GPIO interrupt pulse widthin usec units */
3785     t_u16 gpio_pulse_width;
3786 } MLAN_PACK_END HostCmd_DS_SDIO_GPIO_INT_CONFIG;
3787 
3788 typedef MLAN_PACK_START struct _HostCmd_DS_SDIO_PULL_CTRL
3789 {
3790     /** Action */
3791     t_u16 action;
3792     /** The delay of pulling up in us */
3793     t_u16 pull_up;
3794     /** The delay of pulling down in us */
3795     t_u16 pull_down;
3796 } MLAN_PACK_END HostCmd_DS_SDIO_PULL_CTRL;
3797 
3798 /** HostCmd_DS_802_11_GET_LOG */
3799 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_GET_LOG
3800 {
3801     /** Number of multicast transmitted frames */
3802     t_u32 mcast_tx_frame;
3803     /** Number of failures */
3804     t_u32 failed;
3805     /** Number of retries */
3806     t_u32 retry;
3807     /** Number of multiretries */
3808     t_u32 multiretry;
3809     /** Number of duplicate frames */
3810     t_u32 frame_dup;
3811     /** Number of RTS success */
3812     t_u32 rts_success;
3813     /** Number of RTS failure */
3814     t_u32 rts_failure;
3815     /** Number of acknowledgement failure */
3816     t_u32 ack_failure;
3817     /** Number of fragmented packets received */
3818     t_u32 rx_frag;
3819     /** Number of multicast frames received */
3820     t_u32 mcast_rx_frame;
3821     /** FCS error */
3822     t_u32 fcs_error;
3823     /** Number of transmitted frames */
3824     t_u32 tx_frame;
3825     /** Reserved field */
3826     t_u32 reserved;
3827     /** Number of WEP icv error for each key */
3828     t_u32 wep_icv_err_cnt[4];
3829     /** Beacon received count */
3830     t_u32 bcn_rcv_cnt;
3831     /** Beacon missed count */
3832     t_u32 bcn_miss_cnt;
3833     /** Tx frag count */
3834     t_u32 tx_frag_cnt;
3835     /** Qos Tx frag count */
3836     t_u32 qos_tx_frag_cnt[8];
3837     /** Qos failed count */
3838     t_u32 qos_failed_cnt[8];
3839     /** Qos retry count */
3840     t_u32 qos_retry_cnt[8];
3841     /** Qos multi retry count */
3842     t_u32 qos_multi_retry_cnt[8];
3843     /** Qos frame dup count */
3844     t_u32 qos_frm_dup_cnt[8];
3845     /** Qos rts success count */
3846     t_u32 qos_rts_suc_cnt[8];
3847     /** Qos rts failure count */
3848     t_u32 qos_rts_failure_cnt[8];
3849     /** Qos ack failure count */
3850     t_u32 qos_ack_failure_cnt[8];
3851     /** Qos Rx frag count */
3852     t_u32 qos_rx_frag_cnt[8];
3853     /** Qos Tx frame count */
3854     t_u32 qos_tx_frm_cnt[8];
3855     /** Qos discarded frame count */
3856     t_u32 qos_discarded_frm_cnt[8];
3857     /** Qos mpdus Rx count */
3858     t_u32 qos_mpdus_rx_cnt[8];
3859     /** Qos retry rx count */
3860     t_u32 qos_retries_rx_cnt[8];
3861     /** CMAC ICV errors count */
3862     t_u32 cmacicv_errors;
3863     /** CMAC replays count */
3864     t_u32 cmac_replays;
3865     /** mgmt CCMP replays count */
3866     t_u32 mgmt_ccmp_replays;
3867     /** TKIP ICV errors count */
3868     t_u32 tkipicv_errors;
3869     /** TKIP replays count */
3870     t_u32 tkip_replays;
3871     /** CCMP decrypt errors count */
3872     t_u32 ccmp_decrypt_errors;
3873     /** CCMP replays count */
3874     t_u32 ccmp_replays;
3875     /** Tx amsdu count */
3876     t_u32 tx_amsdu_cnt;
3877     /** failed amsdu count */
3878     t_u32 failed_amsdu_cnt;
3879     /** retry amsdu count */
3880     t_u32 retry_amsdu_cnt;
3881     /** multi-retry amsdu count */
3882     t_u32 multi_retry_amsdu_cnt;
3883     /** Tx octets in amsdu count */
3884     t_u64 tx_octets_in_amsdu_cnt;
3885     /** amsdu ack failure count */
3886     t_u32 amsdu_ack_failure_cnt;
3887     /** Rx amsdu count */
3888     t_u32 rx_amsdu_cnt;
3889     /** Rx octets in amsdu count */
3890     t_u64 rx_octets_in_amsdu_cnt;
3891     /** Tx ampdu count */
3892     t_u32 tx_ampdu_cnt;
3893     /** tx mpdus in ampdu count */
3894     t_u32 tx_mpdus_in_ampdu_cnt;
3895     /** tx octets in ampdu count */
3896     t_u64 tx_octets_in_ampdu_cnt;
3897     /** ampdu Rx count */
3898     t_u32 ampdu_rx_cnt;
3899     /** mpdu in Rx ampdu count */
3900     t_u32 mpdu_in_rx_ampdu_cnt;
3901     /** Rx octets ampdu count */
3902     t_u64 rx_octets_in_ampdu_cnt;
3903     /** ampdu delimiter CRC error count */
3904     t_u32 ampdu_delimiter_crc_error_cnt;
3905     /** Rx Stuck Related Info*/
3906     /** Rx Stuck Issue count */
3907     t_u32 rx_stuck_issue_cnt[2];
3908     /** Rx Stuck Recovery count */
3909     t_u32 rx_stuck_recovery_cnt;
3910     /** Rx Stuck TSF */
3911     t_u64 rx_stuck_tsf[2];
3912     /** Tx Watchdog Recovery Related Info */
3913     /** Tx Watchdog Recovery count */
3914     t_u32 tx_watchdog_recovery_cnt;
3915     /** Tx Watchdog TSF */
3916     t_u64 tx_watchdog_tsf[2];
3917     /** Channel Switch Related Info */
3918     /** Channel Switch Announcement Sent */
3919     t_u32 channel_switch_ann_sent;
3920     /** Channel Switch State */
3921     t_u32 channel_switch_state;
3922     /** Register Class */
3923     t_u32 reg_class;
3924     /** Channel Number */
3925     t_u32 channel_number;
3926     /** Channel Switch Mode */
3927     t_u32 channel_switch_mode;
3928     /** Reset Rx Mac Count */
3929     t_u32 rx_reset_mac_recovery_cnt;
3930     /** ISR2 Not Done Count*/
3931     t_u32 rx_Isr2_NotDone_Cnt;
3932     /** GDMA Abort Count */
3933     t_u32 gdma_abort_cnt;
3934     /** Rx Reset MAC Count */
3935     t_u32 g_reset_rx_mac_cnt;
3936     // Ownership error counters
3937     /*Error Ownership error count*/
3938     t_u32 dwCtlErrCnt;
3939     /*Control Ownership error count*/
3940     t_u32 dwBcnErrCnt;
3941     /*Control Ownership error count*/
3942     t_u32 dwMgtErrCnt;
3943     /*Control Ownership error count*/
3944     t_u32 dwDatErrCnt;
3945     /*BIGTK MME good count*/
3946     t_u32 bigtk_mmeGoodCnt;
3947     /*BIGTK Replay error count*/
3948     t_u32 bigtk_replayErrCnt;
3949     /*BIGTK MIC error count*/
3950     t_u32 bigtk_micErrCnt;
3951     /*BIGTK MME not included count*/
3952     t_u32 bigtk_mmeNotFoundCnt;
3953 } MLAN_PACK_END HostCmd_DS_802_11_GET_LOG;
3954 
3955 /**_HostCmd_TX_RATE_QUERY */
3956 typedef MLAN_PACK_START struct _HostCmd_TX_RATE_QUERY
3957 {
3958     /** Tx rate */
3959     t_u8 tx_rate;
3960 #ifdef SD8801
3961     /** Ht Info [Bit 0] RxRate format: LG=0, HT=1
3962      * [Bit 1]  HT Bandwidth: BW20 = 0, BW40 = 1
3963      * [Bit 2]  HT Guard Interval: LGI = 0, SGI = 1 */
3964     t_u8 ht_info;
3965 #else
3966     /** Tx Rate Info:
3967      * [Bit 0-1] tx rate format: LG = 0, HT = 1, VHT = 2, HE = 3
3968      * [Bit 2-3] HT/VHT Bandwidth: BW20 = 0, BW40 = 1, BW80 = 2, BW160 = 3
3969      * [Bit 4]   HT/VHT Guard Interval: LGI = 0, SGI = 1
3970      * [Bit 5]   STBC support
3971      * [Bit 6]   LDPC support
3972      * [Bit 7] [Bit 4] 11ax GI, 00, 01, 10, 11 */
3973     t_u8 tx_rate_info;
3974 #endif
3975 #if CONFIG_11AX
3976     /**
3977      * BIT0: DCM
3978      * BIT3-BIT1: tone mode
3979      **  000: 26  tone
3980      **  001: 52  tone
3981      **  010: 106 tone
3982      **  011: 242 tone
3983      **  100: 484 tone
3984      **  101: 996 tone
3985      * BIT7-BIT4: resvd
3986      **/
3987     t_u8 ext_tx_rate_info;
3988 #endif
3989 } MLAN_PACK_END HostCmd_TX_RATE_QUERY;
3990 
3991 typedef MLAN_PACK_START struct _hs_config_param
3992 {
3993     /** bit0=1: broadcast data
3994      * bit1=1: unicast data
3995      * bit2=1: mac events
3996      * bit3=1: multicast data
3997      */
3998     t_u32 conditions;
3999     /** GPIO pin or 0xff for interface */
4000     t_u8 gpio;
4001     /** gap in milliseconds or or 0xff for special setting when GPIO is used to wakeup host */
4002     t_u8 gap;
4003 } MLAN_PACK_END hs_config_param;
4004 
4005 #if 0
4006 /** HS Action 0x0001 - Configure enhanced host sleep mode, 0x0002 - Activate enhanced host sleep mode */
4007 typedef enum _Host_Sleep_Action
4008 {
4009     HS_CONFIGURE = 0x0001,
4010     HS_ACTIVATE = 0x0002,
4011 } Host_Sleep_Action;
4012 #endif
4013 
4014 /** Structure definition for activating enhanced hs */
4015 typedef MLAN_PACK_START struct __hs_activate_param
4016 {
4017     /** response control 0x00 - response not needed, 0x01 - response needed */
4018     t_u16 resp_ctrl;
4019 } MLAN_PACK_END hs_activate_param;
4020 
4021 /** HostCmd_DS_802_11_HS_CFG_ENH */
4022 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_HS_CFG_ENH
4023 {
4024     /** Action 0x0001 - Configure enhanced host sleep mode, 0x0002 - Activate enhanced host sleep mode */
4025     t_u16 action;
4026 
4027     union
4028     {
4029         /** Configure enhanced hs */
4030         hs_config_param hs_config;
4031         /** Activate enhanced hs */
4032         hs_activate_param hs_activate;
4033     } params;
4034 } MLAN_PACK_END HostCmd_DS_802_11_HS_CFG_ENH;
4035 
4036 /** SNMP_MIB_INDEX */
4037 typedef enum _SNMP_MIB_INDEX
4038 {
4039     OpRateSet_i     = 1,
4040     DtimPeriod_i    = 3,
4041     RtsThresh_i     = 5,
4042     ShortRetryLim_i = 6,
4043     LongRetryLim_i  = 7,
4044     FragThresh_i    = 8,
4045     Dot11D_i        = 9,
4046     Dot11H_i        = 10,
4047     WwsMode_i       = 17,
4048     Thermal_i       = 34,
4049     ECSAEnable_i    = 42,
4050     StopDeauth_i    = 44,
4051 } SNMP_MIB_INDEX;
4052 
4053 #if CONFIG_TURBO_MODE
4054 /** Used just for Turbo mode */
4055 #define OID_WMM_TURBO_MODE 0x27
4056 /** turbo_mode parameters */
4057 typedef MLAN_PACK_START struct _turbo_mode_para
4058 {
4059     t_u16 action;
4060     t_u16 oid;
4061     t_u16 size;
4062     /** set prot mode */
4063     t_u8 mode;
4064 } MLAN_PACK_END turbo_mode_para;
4065 #endif
4066 
4067 /** max SNMP buf size */
4068 #define MAX_SNMP_BUF_SIZE 128U
4069 
4070 /**  HostCmd_CMD_802_11_SNMP_MIB */
4071 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SNMP_MIB
4072 {
4073     /** SNMP query type */
4074     t_u16 query_type;
4075     /** SNMP object ID */
4076     t_u16 oid;
4077     /** SNMP buffer size */
4078     t_u16 buf_size;
4079     /** Value */
4080     t_u8 value[1];
4081 } MLAN_PACK_END HostCmd_DS_802_11_SNMP_MIB;
4082 
4083 /** HostCmd_DS_AUTO_TX structure */
4084 typedef MLAN_PACK_START struct _HostCmd_DS_AUTO_TX
4085 {
4086     /** Action Set or get */
4087     t_u16 action;
4088     /** Tlv buffer */
4089     t_u8 tlv_buffer[0];
4090 } MLAN_PACK_END HostCmd_DS_AUTO_TX;
4091 
4092 #define OID_CLOUD_KEEP_ALIVE              0
4093 #define EVENT_CLOUD_KEEP_ALIVE_RETRY_FAIL 133
4094 /** TLV for cloud keep alive control info */
4095 #define TLV_TYPE_CLOUD_KEEP_ALIVE (PROPRIETARY_TLV_BASE_ID + 0x102) /* 0x0100 + 258 */
4096 typedef MLAN_PACK_START struct _MrvlIEtypes_Cloud_Keep_Alive_t
4097 {
4098     /** Header */
4099     MrvlIEtypesHeader_t header;
4100     /** ID for cloud keep alive */
4101     t_u8 keep_alive_id;
4102     /** Enable/disable for this ID */
4103     t_u8 enable;
4104     /** TLV buffer */
4105     t_u8 tlv[0];
4106 } MLAN_PACK_END MrvlIEtypes_Cloud_Keep_Alive_t;
4107 
4108 /** TLV for cloud keep alive control info */
4109 #define TLV_TYPE_KEEP_ALIVE_CTRL (PROPRIETARY_TLV_BASE_ID + 0x103) /* 0x0100 + 259 */
4110 typedef MLAN_PACK_START struct _MrvlIEtypes_Keep_Alive_Ctrl_t
4111 {
4112     /** Header */
4113     MrvlIEtypesHeader_t header;
4114     /** period to send keep alive packet */
4115     t_u32 snd_interval;
4116     /** period to send retry packet */
4117     t_u16 retry_interval;
4118     /** count to send retry packet */
4119     t_u16 retry_count;
4120 } MLAN_PACK_END MrvlIEtypes_Keep_Alive_Ctrl_t;
4121 
4122 /** TLV for cloud keep alive packet */
4123 #define TLV_TYPE_KEEP_ALIVE_PKT (PROPRIETARY_TLV_BASE_ID + 0x104) /* 0x0100 + 260 */
4124 typedef MLAN_PACK_START struct _MrvlIEtypes_Keep_Alive_Pkt_t
4125 {
4126     /** Header */
4127     MrvlIEtypesHeader_t header;
4128     /** Ethernet Header */
4129     Eth803Hdr_t eth_header;
4130     /** packet buffer*/
4131     t_u8 ip_packet[];
4132 } MLAN_PACK_END MrvlIEtypes_Keep_Alive_Pkt_t;
4133 
4134 #define TLV_TYPE_AUTO_TX (PROPRIETARY_TLV_BASE_ID + 0x18) // 0x0118
4135 /** AutoTx_MacFrame_t */
4136 typedef MLAN_PACK_START struct AutoTx_MacFrame
4137 {
4138     t_u16 interval;                           /**< in seconds */
4139     t_u8 priority;                            /**< User Priority: 0~7, ignored if non-WMM */
4140     t_u8 reserved;                            /**< set to 0 */
4141     t_u16 frame_len;                          /**< Length of MAC frame payload */
4142     t_u8 dest_mac_addr[MLAN_MAC_ADDR_LENGTH]; /**< Destination MAC address */
4143     t_u8 src_mac_addr[MLAN_MAC_ADDR_LENGTH];  /**< Source MAC address */
4144     t_u8 payload[];                           /**< Payload */
4145 } MLAN_PACK_END AutoTx_MacFrame_t;
4146 
4147 /** MrvlIEtypes_AutoTx_t */
4148 typedef MLAN_PACK_START struct MrvlIEtypes_AutoTx
4149 {
4150     MrvlIEtypesHeader_t header;          /**< Header */
4151     AutoTx_MacFrame_t auto_tx_mac_frame; /**< Auto Tx MAC frame */
4152 } MLAN_PACK_END MrvlIEtypes_AutoTx_t;
4153 
4154 /** HostCmd_DS_802_11_AUTO_TX */
4155 typedef MLAN_PACK_START struct MAPP_HostCmd_DS_802_11_AUTO_TX
4156 {
4157     /** Action */
4158     t_u16 action;                 /* 0 = ACT_GET; 1 = ACT_SET; */
4159     MrvlIEtypes_AutoTx_t auto_tx; /**< Auto Tx */
4160 } MLAN_PACK_END HostCmd_DS_802_11_AUTO_TX;
4161 
4162 /** MrvlIEtypes_Auto_Null_Tx_t */
4163 typedef MLAN_PACK_START struct _MrvlIEtypes_Auto_Null_Tx_t
4164 {
4165     /** Header */
4166     MrvlIEtypesHeader_t header;
4167     /** bit15:14 unit: 00-s 01-us 10-ms 11-one_shot  bit13-0: interval */
4168     t_u16 interval;
4169     /** bit7-4: bandwidth. bit3-0: priority, ignored if non-WMM */
4170     t_u8 priority;
4171     /** Packet index, set to 0 */
4172     t_u8 index;
4173     /** Set to 0 for auto null tx */
4174     t_u8 getTodToAForPkts;
4175     /** Length of MAC frame payload */
4176     t_u16 frame_len;
4177     /** Destination MAC address */
4178     t_u8 dest_mac_addr[MLAN_MAC_ADDR_LENGTH];
4179     /** Source MAC address */
4180     t_u8 src_mac_addr[MLAN_MAC_ADDR_LENGTH]; /**< Source MAC address */
4181     /** '0x00,0x00' for auto null tx */
4182     t_u16 frame_body_len;
4183 } MLAN_PACK_END MrvlIEtypes_Auto_Null_Tx_t;
4184 
4185 /** Radio on */
4186 #define RADIO_ON 0x01
4187 /** Radio off */
4188 #define RADIO_OFF 0x00
4189 
4190 /** HostCmd_CMD_802_11_RADIO_CONTROL */
4191 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_RADIO_CONTROL
4192 {
4193     /** Action */
4194     t_u16 action;
4195     /** Control */
4196     t_u16 control;
4197 } MLAN_PACK_END HostCmd_DS_802_11_RADIO_CONTROL;
4198 
4199 /** MrvlRateScope_t */
4200 typedef MLAN_PACK_START struct _MrvlRateScope_t
4201 {
4202     /** Header Type */
4203     t_u16 type;
4204     /** Header Length */
4205     t_u16 length;
4206     /** Bitmap of HR/DSSS rates */
4207     t_u16 hr_dsss_rate_bitmap;
4208     /** Bitmap of OFDM rates */
4209     t_u16 ofdm_rate_bitmap;
4210     /** Bitmap of HT-MCSs allowed for initial rate */
4211     t_u16 ht_mcs_rate_bitmap[8];
4212     /** VHT MCS rate bitmap */
4213     t_u16 vht_mcs_rate_bitmap[8];
4214 #if CONFIG_11AX
4215     /** HE MCS rate bitmap */
4216     t_u16 he_mcs_rate_bitmap[8];
4217 #endif
4218 } MLAN_PACK_END MrvlRateScope_t;
4219 
4220 /** MrvlRateDropControl_t */
4221 typedef MLAN_PACK_START struct _MrvlRateDropControl_t
4222 {
4223     /** Header Length */
4224     t_u16 length;
4225     /** Rate Information */
4226     t_u32 rate_info[1];
4227 } MLAN_PACK_END MrvlRateDropControl_t;
4228 
4229 /** MrvlRateDropPattern_t */
4230 typedef MLAN_PACK_START struct _MrvlRateDropPattern_t
4231 {
4232     /** Header Type */
4233     t_u16 type;
4234     /** Header Length */
4235     t_u16 length;
4236     /** Rate Drop Mode */
4237     t_u32 rate_drop_mode;
4238     /* MrvlRateDropControl_t RateDropControl[0]; */
4239 } MLAN_PACK_END MrvlRateDropPattern_t;
4240 
4241 /** MrvlIETypes_rate_setting_t */
4242 typedef MLAN_PACK_START struct _MrvlIETypes_rate_setting_t
4243 {
4244     /** Header */
4245     MrvlIEtypesHeader_t header;
4246     /** Rate Setting */
4247     t_u16 rate_setting;
4248 } MLAN_PACK_END MrvlIETypes_rate_setting_t;
4249 
4250 /** HostCmd_DS_TX_RATE_CFG */
4251 typedef MLAN_PACK_START struct _HostCmd_DS_TX_RATE_CFG
4252 {
4253     /** Action */
4254     t_u16 action;
4255     /** Tx Rate Configuration Index */
4256     t_u16 cfg_index;
4257     /* MrvlRateScope_t RateScope; MrvlRateDropPattern_t RateDrop; */
4258 } MLAN_PACK_END HostCmd_DS_TX_RATE_CFG;
4259 
4260 #if CONFIG_WIFI_TX_PER_TRACK
4261 #define TLV_TYPE_TX_PER_TRACK   (PROPRIETARY_TLV_BASE_ID + 338)
4262 #define EVENT_PER_STATUS_REPORT 0x94
4263 typedef MLAN_PACK_START struct _HostCmd_DS_TX_RX_PKT_STATS
4264 {
4265     /** Enable or disable */
4266     t_u8 enable;
4267     /** Action */
4268     t_u16 action;
4269 } MLAN_PACK_END HostCmd_DS_TX_RX_PKT_STATS;
4270 
4271 typedef MLAN_PACK_START struct _MrvlTxPerTrackInfo_t
4272 {
4273     /** Header Type */
4274     t_u16 type;
4275     /** Header Length */
4276     t_u16 length;
4277     /** Tx stat check period */
4278     t_u8 tx_stat_check_period;
4279     /** Tx stat check ratio */
4280     t_u8 tx_stat_check_ratio;
4281     /** Tx stat check packet number */
4282     t_u16 tx_stat_check_num;
4283 } MLAN_PACK_END MrvlTxPerTrackInfo_t;
4284 #endif
4285 
4286 #if CONFIG_TX_RX_HISTOGRAM
4287 /** TX and RX histogram statistic parameters*/
4288 typedef MLAN_PACK_START struct _HostCmd_DS_TX_RX_HISTOGRAM
4289 {
4290     /** Enable or disable get tx/rx histogram statistic */
4291     t_u8 enable;
4292     /** Choose to get TX, RX or both histogram statistic */
4293     t_u16 action;
4294 } MLAN_PACK_END HostCmd_DS_TX_RX_HISTOGRAM;
4295 #endif
4296 
4297 #if CONFIG_RX_ABORT_CFG
4298 typedef MLAN_PACK_START struct _HostCmd_DS_RX_ABORT_CFG
4299 {
4300     t_u16 action;
4301     /** Enable or disable */
4302     t_u8 enable;
4303     /** RSSI threshold */
4304     t_s8 rssi_threshold;
4305 } MLAN_PACK_END HostCmd_DS_RX_ABORT_CFG;
4306 #endif
4307 
4308 #if CONFIG_RX_ABORT_CFG_EXT
4309 typedef MLAN_PACK_START struct _HostCmd_DS_RX_ABORT_CFG_EXT
4310 {
4311     /** Action */
4312     t_u16 action;
4313     /** Enable/disable dyn rx abort on weak pkt rssi */
4314     t_u8 enable;
4315     /** specify rssi margin */
4316     t_s8 rssi_margin;
4317     /** specify ceil rssi threshold */
4318     t_s8 ceil_rssi_threshold;
4319     /** specify floor rssi threshold */
4320     t_s8 floor_rssi_threshold;
4321     /** current dynamic rssi threshold */
4322     t_s8 current_dynamic_rssi_threshold;
4323     /** rssi config: default or user configured */
4324     t_u8 rssi_default_config;
4325     /** EDMAC status */
4326     t_u8 edmac_enable;
4327 } MLAN_PACK_END HostCmd_DS_RX_ABORT_CFG_EXT;
4328 #endif
4329 
4330 #if CONFIG_CCK_DESENSE_CFG
4331 typedef MLAN_PACK_START struct _HostCmd_DS_CCK_DESENSE_CFG
4332 {
4333     /** Action */
4334     t_u16 action;
4335     /** cck desense mode: 0:disable 1:normal 2:dynamic */
4336     t_u16 mode;
4337     /** specify rssi margin */
4338     t_s8 margin;
4339     /** specify ceil rssi threshold */
4340     t_s8 ceil_thresh;
4341     /** cck desense "on" interval count */
4342     t_u8 num_on_intervals;
4343     /** cck desense "off" interval count */
4344     t_u8 num_off_intervals;
4345 } MLAN_PACK_END HostCmd_DS_CCK_DESENSE_CFG;
4346 #endif
4347 
4348 /** Power_Group_t */
4349 typedef MLAN_PACK_START struct _Power_Group_t
4350 {
4351     /** Modulation Class */
4352     t_u8 modulation_class;
4353     /** MCS Code or Legacy RateID */
4354     t_u8 first_rate_code;
4355     /** MCS Code or Legacy RateID */
4356     t_u8 last_rate_code;
4357     /** Power Adjustment Step */
4358     t_s8 power_step;
4359     /** Minimal Tx Power Level [dBm] */
4360     t_s8 power_min;
4361     /** Maximal Tx Power Level [dBm] */
4362     t_s8 power_max;
4363     /** 0: HTBW20, 1: HTBW40 */
4364     t_u8 ht_bandwidth;
4365     /** Reserved */
4366     t_u8 reserved;
4367 } MLAN_PACK_END Power_Group_t;
4368 
4369 /** MrvlTypes_Power_Group_t */
4370 typedef MLAN_PACK_START struct _MrvlTypes_Power_Group_t
4371 {
4372     /** Header Type */
4373     t_u16 type;
4374     /** Header Length */
4375     t_u16 length;
4376     /* Power_Group_t PowerGroups */
4377 } MLAN_PACK_END MrvlTypes_Power_Group_t;
4378 
4379 /** HostCmd_CMD_TXPWR_CFG */
4380 typedef MLAN_PACK_START struct _HostCmd_DS_TXPWR_CFG
4381 {
4382     /** Action */
4383     t_u16 action;
4384     /** Power group configuration index */
4385     t_u16 cfg_index;
4386     /** Power group configuration mode */
4387     t_u32 mode;
4388     /* MrvlTypes_Power_Group_t PowerGrpCfg[0] */
4389 } MLAN_PACK_END HostCmd_DS_TXPWR_CFG;
4390 
4391 /** HostCmd_CMD_802_11_RF_TX_POWER */
4392 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_RF_TX_POWER
4393 {
4394     /** Action */
4395     t_u16 action;
4396     /** Current power level */
4397     t_u16 current_level;
4398     /** Maximum power */
4399     t_u8 max_power;
4400     /** Minimum power */
4401     t_u8 min_power;
4402 } MLAN_PACK_END HostCmd_DS_802_11_RF_TX_POWER;
4403 
4404 /** Connection type infra */
4405 #define CONNECTION_TYPE_INFRA 0
4406 /** Connection type adhoc */
4407 #define CONNECTION_TYPE_ADHOC 1
4408 #ifdef WIFI_DIRECT_SUPPORT
4409 /** BSS Mode: WIFIDIRECT Client */
4410 #define BSS_MODE_WIFIDIRECT_CLIENT 0
4411 /** BSS Mode: WIFIDIRECT GO */
4412 #define BSS_MODE_WIFIDIRECT_GO 2
4413 #endif
4414 /** HostCmd_DS_SET_BSS_MODE */
4415 typedef MLAN_PACK_START struct _HostCmd_DS_SET_BSS_MODE
4416 {
4417     /** connection type */
4418     t_u8 con_type;
4419 } MLAN_PACK_END HostCmd_DS_SET_BSS_MODE;
4420 
4421 /** HostCmd_DS_REMAIN_ON_CHANNEL */
4422 typedef MLAN_PACK_START struct _HostCmd_DS_REMAIN_ON_CHANNEL
4423 {
4424     /** Action 0-GET, 1-SET, 4 CLEAR*/
4425     t_u16 action;
4426     /** Not used set to zero */
4427     t_u8 status;
4428     /** Not used set to zero */
4429     t_u8 reserved;
4430     /** Band cfg */
4431     t_u8 bandcfg;
4432     /** channel */
4433     t_u8 channel;
4434     /** remain time: Unit ms*/
4435     t_u32 remain_period;
4436 } MLAN_PACK_END HostCmd_DS_REMAIN_ON_CHANNEL;
4437 
4438 #ifdef WIFI_DIRECT_SUPPORT
4439 /** HostCmd_DS_WIFI_DIRECT_MODE */
4440 typedef MLAN_PACK_START struct _HostCmd_DS_WIFI_DIRECT_MODE
4441 {
4442     /** Action 0-GET, 1-SET*/
4443     t_u16 action;
4444     /**0:disable 1:listen 2:GO 3:p2p client 4:find 5:stop find*/
4445     t_u16 mode;
4446 } MLAN_PACK_END HostCmd_DS_WIFI_DIRECT_MODE;
4447 #endif
4448 
4449 #ifdef STA_SUPPORT
4450 
4451 /**
4452  * @brief Structure used internally in the wlan driver to configure a scan.
4453  *
4454  * Sent to the command process module to configure the firmware
4455  *   scan command prepared by wlan_cmd_802_11_scan.
4456  *
4457  * @sa wlan_scan_networks
4458  *
4459  */
4460 typedef MLAN_PACK_START struct _wlan_scan_cmd_config
4461 {
4462     /**
4463      *  BSS Type to be sent in the firmware command
4464      *
4465      *  Field can be used to restrict the types of networks returned in the
4466      *    scan.  Valid settings are:
4467      *
4468      *   - MLAN_SCAN_MODE_BSS  (infrastructure)
4469      *   - MLAN_SCAN_MODE_IBSS (adhoc)
4470      *   - MLAN_SCAN_MODE_ANY  (unrestricted, adhoc and infrastructure)
4471      */
4472     t_u8 bss_mode;
4473 
4474     /**
4475      *  Specific BSSID used to filter scan results in the firmware
4476      */
4477     t_u8 specific_bssid[MLAN_MAC_ADDR_LENGTH];
4478 
4479     /**
4480      *  Length of TLVs sent in command starting at tlvBuffer
4481      */
4482     t_u32 tlv_buf_len;
4483 
4484     /**
4485      *  SSID TLV(s) and ChanList TLVs to be sent in the firmware command
4486      *
4487      *  TLV_TYPE_CHANLIST, MrvlIEtypes_ChanListParamSet_t
4488      *  TLV_TYPE_SSID, MrvlIEtypes_SsIdParamSet_t
4489      */
4490     t_u8 tlv_buf[1]; /* SSID TLV(s) and ChanList TLVs are stored
4491                         here */
4492 } MLAN_PACK_END wlan_scan_cmd_config;
4493 
4494 /**
4495  *  Sructure to retrieve the scan table
4496  */
4497 typedef MLAN_PACK_START struct
4498 {
4499     /**
4500      *  - Zero based scan entry to start retrieval in command request
4501      *  - Number of scans entries returned in command response
4502      */
4503     t_u32 scan_number;
4504     /**
4505      * Buffer marker for multiple wlan_ioctl_get_scan_table_entry structures.
4506      *   Each struct is padded to the nearest 32 bit boundary.
4507      */
4508     t_u8 scan_table_entry_buf[1];
4509 } MLAN_PACK_END wlan_get_scan_table_info;
4510 
4511 /** Generic structure defined for parsing WPA/RSN IEs for GTK/PTK OUIs */
4512 typedef MLAN_PACK_START struct
4513 {
4514     /** Group key oui */
4515     t_u8 GrpKeyOui[4];
4516     /** Number of PTKs */
4517     t_u8 PtkCnt[2];
4518     /** Ptk body starts here */
4519     t_u8 PtkBody[4];
4520 } MLAN_PACK_END IEBody;
4521 #endif /* STA_SUPPORT */
4522 
4523 /*
4524  * This scan handle Country Information IE(802.11d compliant)
4525  * Define data structure for HostCmd_CMD_802_11_SCAN
4526  */
4527 /** HostCmd_DS_802_11_SCAN */
4528 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SCAN
4529 {
4530     /** BSS mode */
4531     t_u8 bss_mode;
4532     /** BSSID */
4533     t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
4534     /** TLV buffer */
4535     t_u8 tlv_buffer[1];
4536     /** MrvlIEtypes_SsIdParamSet_t      SsIdParamSet;
4537      *  MrvlIEtypes_ChanListParamSet_t  ChanListParamSet;
4538      *  MrvlIEtypes_RatesParamSet_t     OpRateSet;
4539      */
4540 } MLAN_PACK_END HostCmd_DS_802_11_SCAN;
4541 
4542 #if CONFIG_EXT_SCAN_SUPPORT
4543 /*
4544  * This scan handle Country Information IE(802.11d compliant)
4545  * Define data structure for HostCmd_CMD_802_11_SCAN_EXT
4546  */
4547 /** HostCmd_DS_802_11_SCAN_EXT */
4548 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SCAN_EXT
4549 {
4550     /** Reserved */
4551     t_u32 reserved;
4552     /** TLV buffer */
4553     t_u8 tlv_buffer[1];
4554     /** MrvlIEtypes_Bssid_List_t            BssIdList;
4555      *  MrvlIEtypes_SsIdParamSet_t          SSIDParamSet;
4556      *  MrvlIEtypes_ChanListParamSet_t      ChanListParamSet;
4557      *  MrvlIEtypes_RatesParamSet_t         OpRateSet;
4558      *  MrvlIEtypes_NumProbes_t             NumProbes;
4559      *  MrvlIEtypes_WildCardSsIdParamSet_t  WildCardSSIDParamSet;
4560      */
4561 } MLAN_PACK_END HostCmd_DS_802_11_SCAN_EXT;
4562 
4563 typedef MLAN_PACK_START struct _MrvlIEtypes_Bss_Scan_Rsp_t
4564 {
4565     /** Header */
4566     MrvlIEtypesHeader_t header;
4567     /** BSSID of the BSS descriptor */
4568     t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
4569     /** Beacon/Probe response buffer */
4570     t_u8 frame_body[1];
4571 } MLAN_PACK_END MrvlIEtypes_Bss_Scan_Rsp_t;
4572 
4573 typedef MLAN_PACK_START struct _MrvlIEtypes_Bss_Scan_Info_t
4574 {
4575     /** Header */
4576     MrvlIEtypesHeader_t header;
4577     /** RSSI for scan entry */
4578     t_s16 rssi;
4579     /** Channel ANPI */
4580     t_s16 anpi;
4581     /** Channel load (parts per 255) */
4582     t_u8 cca_busy_fraction;
4583     /** Band */
4584     t_u8 band;
4585     /** Channel */
4586     t_u8 channel;
4587     /** Reserved */
4588     t_u8 reserved;
4589     /** TSF data */
4590     t_u64 tsf;
4591 } MLAN_PACK_END MrvlIEtypes_Bss_Scan_Info_t;
4592 #endif /* CONFIG_EXT_SCAN_SUPPORT */
4593 
4594 /** HostCmd_DS_RX_MGMT_IND */
4595 typedef MLAN_PACK_START struct _HostCmd_DS_RX_MGMT_IND
4596 {
4597     /** Action */
4598     t_u16 action;
4599     /** Mgmt frame subtype mask */
4600     t_u32 mgmt_subtype_mask;
4601     /** Data frame subtype mask */
4602     t_u32 data_subtype_mask;
4603 } MLAN_PACK_END HostCmd_DS_RX_MGMT_IND;
4604 
4605 /** HostCmd_DS_802_11_SCAN_RSP */
4606 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SCAN_RSP
4607 {
4608     /** Size of BSS descriptor */
4609     t_u16 bss_descript_size;
4610     /** Numner of sets */
4611     t_u8 number_of_sets;
4612     /** BSS descriptor and TLV buffer */
4613     t_u8 bss_desc_and_tlv_buffer[1];
4614 } MLAN_PACK_END HostCmd_DS_802_11_SCAN_RSP;
4615 
4616 /** HostCmd_DS_802_11_BG_SCAN_CONFIG */
4617 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_BG_SCAN_CONFIG
4618 {
4619     /** action */
4620     t_u16 action;
4621     /** 0: disable, 1: enable */
4622     t_u8 enable;
4623     /** bss type */
4624     t_u8 bss_type;
4625     /** num of channel per scan */
4626     t_u8 chan_per_scan;
4627     /** reserved field */
4628     t_u8 reserved;
4629     /** reserved field */
4630     t_u16 reserved1;
4631     /** interval between consecutive scans */
4632     t_u32 scan_interval;
4633     /** reserved field */
4634     t_u32 reserved2;
4635     /** condition to trigger report to host */
4636     t_u32 report_condition;
4637     /** reserved field */
4638     t_u16 reserved3;
4639 } MLAN_PACK_END HostCmd_DS_802_11_BG_SCAN_CONFIG;
4640 
4641 /** HostCmd_DS_802_11_BG_SCAN_QUERY */
4642 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_BG_SCAN_QUERY
4643 {
4644     /** Flush */
4645     t_u8 flush;
4646 } MLAN_PACK_END HostCmd_DS_802_11_BG_SCAN_QUERY;
4647 
4648 /** HostCmd_DS_802_11_BG_SCAN_QUERY_RSP */
4649 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_BG_SCAN_QUERY_RSP
4650 {
4651     /** Report condition */
4652     t_u32 report_condition;
4653     /** Scan response */
4654     HostCmd_DS_802_11_SCAN_RSP scan_resp;
4655 } MLAN_PACK_END HostCmd_DS_802_11_BG_SCAN_QUERY_RSP;
4656 
4657 /** MrvlIEtypes_StartLater_t */
4658 typedef MLAN_PACK_START struct _MrvlIEtypes_StartLater_t
4659 {
4660     /** Header */
4661     MrvlIEtypesHeader_t header;
4662     /* 0 - BGScan start immediately, 1 - BGScan will start later after "Scan
4663        Interval" */
4664     t_u16 value;
4665 } MLAN_PACK_END MrvlIEtypes_StartLater_t;
4666 
4667 /** MrvlIEtypes_RepeatCount_t */
4668 typedef MLAN_PACK_START struct _MrvlIEtypes_RepeatCount_t
4669 {
4670     /** Header */
4671     MrvlIEtypesHeader_t header;
4672     /* Repeat count */
4673     t_u16 repeat_count;
4674 } MLAN_PACK_END MrvlIEtypes_RepeatCount_t;
4675 
4676 /** MrvlIEtypes_DomainParamSet_t */
4677 typedef MLAN_PACK_START struct _MrvlIEtypes_DomainParamSet
4678 {
4679     /** Header */
4680     MrvlIEtypesHeader_t header;
4681     /** Country code */
4682     t_u8 country_code[COUNTRY_CODE_LEN];
4683     /** Set of subbands */
4684     IEEEtypes_SubbandSet_t sub_band[1];
4685 } MLAN_PACK_END MrvlIEtypes_DomainParamSet_t;
4686 
4687 /** HostCmd_DS_802_11D_DOMAIN_INFO */
4688 typedef MLAN_PACK_START struct _HostCmd_DS_802_11D_DOMAIN_INFO
4689 {
4690     /** Action */
4691     t_u16 action;
4692     /** Domain parameter set */
4693     MrvlIEtypes_DomainParamSet_t domain;
4694 } MLAN_PACK_END HostCmd_DS_802_11D_DOMAIN_INFO;
4695 
4696 /** HostCmd_DS_802_11D_DOMAIN_INFO_RSP */
4697 typedef MLAN_PACK_START struct _HostCmd_DS_802_11D_DOMAIN_INFO_RSP
4698 {
4699     /** Action */
4700     t_u16 action;
4701     /** Domain parameter set */
4702     MrvlIEtypes_DomainParamSet_t domain;
4703 } MLAN_PACK_END HostCmd_DS_802_11D_DOMAIN_INFO_RSP;
4704 
4705 /** HostCmd_DS_11N_ADDBA_REQ */
4706 typedef MLAN_PACK_START struct _HostCmd_DS_11N_ADDBA_REQ
4707 {
4708     /** Result of the ADDBA Request Operation */
4709     t_u8 add_req_result;
4710     /** Peer MAC address */
4711     t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH];
4712     /** Dialog Token */
4713     t_u8 dialog_token;
4714     /** Block Ack Parameter Set */
4715     t_u16 block_ack_param_set;
4716     /** Block Act Timeout Value */
4717     t_u16 block_ack_tmo;
4718     /** Starting Sequence Number */
4719     t_u16 ssn;
4720 } MLAN_PACK_END HostCmd_DS_11N_ADDBA_REQ;
4721 
4722 /** HostCmd_DS_11N_ADDBA_RSP */
4723 typedef MLAN_PACK_START struct _HostCmd_DS_11N_ADDBA_RSP
4724 {
4725     /** Result of the ADDBA Response Operation */
4726     t_u8 add_rsp_result;
4727     /** Peer MAC address */
4728     t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH];
4729     /** Dialog Token */
4730     t_u8 dialog_token;
4731     /** Status Code */
4732     t_u16 status_code;
4733     /** Block Ack Parameter Set */
4734     t_u16 block_ack_param_set;
4735     /** Block Act Timeout Value */
4736     t_u16 block_ack_tmo;
4737     /** Starting Sequence Number */
4738     t_u16 ssn;
4739 } MLAN_PACK_END HostCmd_DS_11N_ADDBA_RSP;
4740 
4741 /** HostCmd_DS_11N_DELBA */
4742 typedef MLAN_PACK_START struct _HostCmd_DS_11N_DELBA
4743 {
4744     /** Result of the ADDBA Request Operation */
4745     t_u8 del_result;
4746     /** Peer MAC address */
4747     t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH];
4748     /** Delete Block Ack Parameter Set */
4749     t_u16 del_ba_param_set;
4750     /** Reason Code sent for DELBA */
4751     t_u16 reason_code;
4752     /** Reserved */
4753     t_u8 reserved;
4754 } MLAN_PACK_END HostCmd_DS_11N_DELBA;
4755 
4756 /** HostCmd_DS_11N_BATIMEOUT */
4757 typedef MLAN_PACK_START struct _HostCmd_DS_11N_BATIMEOUT
4758 {
4759     /** TID */
4760     t_u8 tid;
4761     /** Peer MAC address */
4762     t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH];
4763     /** Delete Block Ack Parameter Set */
4764     t_u8 origninator;
4765 } MLAN_PACK_END HostCmd_DS_11N_BATIMEOUT;
4766 
4767 /** HostCmd_DS_11N_CFG */
4768 typedef MLAN_PACK_START struct _HostCmd_DS_11N_CFG
4769 {
4770     /** Action */
4771     t_u16 action;
4772     /** HTTxCap */
4773     t_u16 ht_tx_cap;
4774     /** HTTxInfo */
4775     t_u16 ht_tx_info;
4776     /** Misc configuration */
4777     t_u16 misc_config;
4778 } MLAN_PACK_END HostCmd_DS_11N_CFG;
4779 
4780 #define VHT_MCS_SET_LEN 8
4781 
4782 /** HostCmd_DS_11AC_CFG */
4783 typedef MLAN_PACK_START struct _HostCmd_DS_11AC_CFG
4784 {
4785     /** Action */
4786     t_u16 action;
4787     /** BandConfig */
4788     t_u8 band_config;
4789     /** Misc Configuration */
4790     t_u8 misc_config;
4791     /** VHT Capability Info */
4792     t_u32 vht_cap_info;
4793     /** VHT Support MCS Set */
4794     t_u8 vht_supp_mcs_set[VHT_MCS_SET_LEN];
4795 } MLAN_PACK_END HostCmd_DS_11AC_CFG;
4796 
4797 #if CONFIG_11AX
4798 /** HostCmd_DS_11AX_CFG */
4799 typedef MLAN_PACK_START struct _HostCmd_DS_11AX_CFG
4800 {
4801     /** Action */
4802     t_u16 action;
4803     /** BandConfig */
4804     t_u8 band_config;
4805     /** TLV for HE capability or HE operation */
4806     t_u8 val[];
4807 } MLAN_PACK_END HostCmd_DS_11AX_CFG;
4808 
4809 /** HostCmd_DS_11AX_CMD_CFG */
4810 typedef MLAN_PACK_START struct _HostCmd_DS_11AX_CMD_CFG
4811 {
4812     /** Action */
4813     t_u16 action;
4814     /** CMD_SUBID */
4815     t_u16 sub_id;
4816     /** TLV or value for cmd */
4817     t_u8 val[];
4818 } MLAN_PACK_END HostCmd_DS_11AX_CMD_CFG;
4819 
4820 #if CONFIG_11AX_TWT
4821 /** Type definition of hostcmd_twt_setup */
4822 typedef MLAN_PACK_START struct _hostcmd_twt_setup
4823 {
4824     /** Implicit, 0: TWT session is explicit, 1: Session is implicit */
4825     t_u8 implicit;
4826     /** Announced, 0: Unannounced, 1: Announced TWT */
4827     t_u8 announced;
4828     /** Trigger Enabled, 0: Non-Trigger enabled, 1: Trigger enabled TWT */
4829     t_u8 trigger_enabled;
4830     /** TWT Information Disabled, 0: TWT info enabled, 1: TWT info disabled */
4831     t_u8 twt_info_disabled;
4832     /** Negotiation Type, 0: Future Individual TWT SP start time, 1: Next
4833      * Wake TBTT time */
4834     t_u8 negotiation_type;
4835     /** TWT Wakeup Duration, time after which the TWT requesting STA can
4836      * transition to doze state */
4837     t_u8 twt_wakeup_duration;
4838     /** Flow Identifier. Range: [0-7]*/
4839     t_u8 flow_identifier;
4840     /** Hard Constraint, 0: FW can tweak the TWT setup parameters if it is
4841      *rejected by AP.
4842      ** 1: Firmware should not tweak any parameters. */
4843     t_u8 hard_constraint;
4844     /** TWT Exponent, Range: [0-63] */
4845     t_u8 twt_exponent;
4846     /** TWT Mantissa Range: [0-sizeof(UINT16)] */
4847     t_u16 twt_mantissa;
4848     /** TWT Request Type, 0: REQUEST_TWT, 1: SUGGEST_TWT*/
4849     t_u8 twt_request;
4850     /** TWT Setup State. Set to 0 by driver, filled by FW in response*/
4851     t_u8 twt_setup_state;
4852     /** TWT link lost timeout threshold */
4853     t_u16 bcnMiss_threshold;
4854 } MLAN_PACK_END hostcmd_twt_setup, *phostcmd_twt_setup;
4855 
4856 /** Type definition of hostcmd_twt_teardown */
4857 typedef MLAN_PACK_START struct _hostcmd_twt_teardown
4858 {
4859     /** TWT Flow Identifier. Range: [0-7] */
4860     t_u8 flow_identifier;
4861     /** Negotiation Type. 0: Future Individual TWT SP start time, 1: Next
4862      * Wake TBTT time */
4863     t_u8 negotiation_type;
4864     /** Tear down all TWT. 1: To teardown all TWT, 0 otherwise */
4865     t_u8 teardown_all_twt;
4866     /** TWT Teardown State. Set to 0 by driver, filled by FW in response */
4867     t_u8 twt_teardown_state;
4868     /** Reserved, set to 0. */
4869     t_u8 reserved[3];
4870 } MLAN_PACK_END hostcmd_twt_teardown, *phostcmd_twt_teardown;
4871 
4872 /** Type definition of hostcmd_twt_report */
4873 typedef MLAN_PACK_START struct _hostcmd_twt_report
4874 {
4875     /** TWT report type, 0: BTWT id */
4876     t_u8 type;
4877     /** TWT report length of value in data */
4878     t_u8 length;
4879     t_u8 reserve[2];
4880     /** TWT report payload for FW response to fill */
4881     t_u8 data[54]; //WLAN_BTWT_REPORT_LEN* WLAN_BTWT_REPORT_MAX_NUM
4882 } MLAN_PACK_END hostcmd_twt_report, *phostcmd_twt_report;
4883 /** Type definition of hostcmd_twt_information */
4884 typedef MLAN_PACK_START struct _hostcmd_twt_information
4885 {
4886     /** TWT Flow Identifier. Range: [0-7] */
4887     t_u8 flow_identifier;
4888     /** TWT operation suspend duration in milli seconds. */
4889     t_u32 suspend_duration;
4890     /** TWT information state from FW. */
4891     t_u8 information_state;
4892 } MLAN_PACK_END hostcmd_twt_information, *phostcmd_twt_information;
4893 /** HostCmd_DS_TWT_CFG */
4894 typedef MLAN_PACK_START struct _HostCmd_DS_TWT_CFG
4895 {
4896     /** Action */
4897     t_u16 action;
4898     /** CMD_SUBID */
4899     t_u16 sub_id;
4900     /** TWT Setup/Teardown configuration parameters */
4901     union
4902     {
4903         /** TWT Setup config for Sub ID: MLAN_11AX_TWT_SETUP_SUBID */
4904         hostcmd_twt_setup twt_setup;
4905         /** TWT Teardown config for Sub ID: MLAN_11AX_TWT_TEARDOWN_SUBID */
4906         hostcmd_twt_teardown twt_teardown;
4907         /** TWT report for Sub ID: MLAN_11AX_TWT_REPORT_SUBID */
4908         hostcmd_twt_report twt_report;
4909         /** TWT report for Sub ID: MLAN_11AX_TWT_INFORMATION_SUBID */
4910         hostcmd_twt_information twt_information;
4911     } param;
4912 } MLAN_PACK_END HostCmd_DS_TWT_CFG;
4913 #endif /* CONFIG_11AX_TWT */
4914 
4915 #if CONFIG_MMSF
4916 /** Type definition of hostcmd_mmsf_cfg*/
4917 typedef MLAN_PACK_START struct _HostCmd_DS_MMSF_CFG
4918 {
4919     /** 1 - set; 0 - get*/
4920     t_u16 action;
4921     /** sub-command id*/
4922     t_u16 sub_id;
4923     /** 1 - enable MMSF; 0 - disable MMSF */
4924     t_u8 enableMMSF;
4925     /** Density value */
4926     t_u8 ampduDensity;
4927     /** MMSF value */
4928     t_u8 ampduMMSF;
4929 } MLAN_PACK_END HostCmd_DS_MMSF_CFG;
4930 #endif
4931 #endif
4932 
4933 #if CONFIG_WIFI_RECOVERY
4934 /** Type definition of HostCmd_DS_TMRC_CFG*/
4935 typedef MLAN_PACK_START struct _HostCmd_DS_TMRC_CFG
4936 {
4937     /** 1 - set; 0 - get*/
4938     t_u16 action;
4939     /** sub-command id*/
4940     t_u16 sub_id;
4941 } MLAN_PACK_END HostCmd_DS_TMRC_CFG;
4942 #endif
4943 
4944 #if CONFIG_WIFI_CLOCKSYNC
4945 /** MrvlIEtypes_GPIO_TSF_LATCH_CONFIG*/
4946 typedef MLAN_PACK_START struct _MrvlIEtypes_GPIO_TSF_LATCH_CONFIG
4947 {
4948     /** Header */
4949     MrvlIEtypesHeader_t header;
4950     /**clock sync Mode */
4951     t_u8 clock_sync_mode;
4952     /**clock sync Role */
4953     t_u8 clock_sync_Role;
4954     /**clock sync GPIO Pin Number */
4955     t_u8 clock_sync_gpio_pin_number;
4956     /**clock sync GPIO Level or Toggle */
4957     t_u8 clock_sync_gpio_level_toggle;
4958     /**clock sync GPIO Pulse Width */
4959     t_u16 clock_sync_gpio_pulse_width;
4960 } MLAN_PACK_END MrvlIEtypes_GPIO_TSF_LATCH_CONFIG;
4961 
4962 /** MrvlIEtypes_GPIO_TSF_LATCH_REPORT */
4963 typedef MLAN_PACK_START struct _MrvlIEtypes_GPIO_TSF_LATCH_REPORT
4964 {
4965     /** Header */
4966     MrvlIEtypesHeader_t header;
4967     /**get tsf info format */
4968     t_u16 tsf_format;
4969     /**tsf info */
4970     t_u16 tsf_info;
4971     /**tsf */
4972     t_u64 tsf;
4973     /**Positive or negative offset in microsecond from Beacon TSF to GPIO toggle TSF  */
4974     t_s32 tsf_offset;
4975 } MLAN_PACK_END MrvlIEtypes_GPIO_TSF_LATCH_REPORT;
4976 
4977 /** HostCmd_DS_GPIO_TSF_LATCH_PARAM_CONFIG */
4978 typedef MLAN_PACK_START struct _HostCmd_DS_GPIO_TSF_LATCH_PARAM_CONFIG
4979 {
4980     /** Action 0-GET, 1-SET */
4981     t_u16 action;
4982     /** MrvlIEtypes_GPIO_TSF_LATCH_CONFIG
4983      *  MrvlIEtypes_GPIO_TSF_LATCH_REPORT
4984      */
4985     t_u8 tlv_buf[];
4986 } MLAN_PACK_END HostCmd_DS_GPIO_TSF_LATCH_PARAM_CONFIG;
4987 #endif /* CONFIG_WIFI_CLOCKSYNC */
4988 
4989 /** HostCmd_DS_TXBUF_CFG*/
4990 typedef MLAN_PACK_START struct _HostCmd_DS_TXBUF_CFG
4991 {
4992     /** Action */
4993     t_u16 action;
4994     /** Buffer Size */
4995     t_u16 buff_size;
4996     /** End Port_for Multiport */
4997     t_u16 mp_end_port;
4998     /** Reserved */
4999     t_u16 reserved3;
5000 } MLAN_PACK_END HostCmd_DS_TXBUF_CFG;
5001 
5002 /** HostCmd_DS_AMSDU_AGGR_CTRL */
5003 typedef MLAN_PACK_START struct _HostCmd_DS_AMSDU_AGGR_CTRL
5004 {
5005     /** Action */
5006     t_u16 action;
5007     /** Enable */
5008     t_u16 enable;
5009     /** Get the current Buffer Size valid */
5010     t_u16 curr_buf_size;
5011 } MLAN_PACK_END HostCmd_DS_AMSDU_AGGR_CTRL;
5012 
5013 /** HostCmd_DS_ECL_SYSTEM_CLOCK_CONFIG */
5014 typedef MLAN_PACK_START struct _HostCmd_DS_ECL_SYSTEM_CLOCK_CONFIG
5015 {
5016     /** Action */
5017     t_u16 action;
5018     /** Current system clock */
5019     t_u16 cur_sys_clk;
5020     /** Clock type */
5021     t_u16 sys_clk_type;
5022     /** Length of clocks */
5023     t_u16 sys_clk_len;
5024     /** System clocks */
5025     t_u16 sys_clk[16];
5026 } MLAN_PACK_END HostCmd_DS_ECL_SYSTEM_CLOCK_CONFIG;
5027 
5028 /** MrvlIEtypes_WmmParamSet_t */
5029 typedef MLAN_PACK_START struct _MrvlIEtypes_WmmParamSet_t
5030 {
5031     /** Header */
5032     MrvlIEtypesHeader_t header;
5033     /** WMM IE */
5034     t_u8 wmm_ie[1];
5035 } MLAN_PACK_END MrvlIEtypes_WmmParamSet_t;
5036 
5037 /** MrvlIEtypes_WmmQueueStatus_t */
5038 typedef MLAN_PACK_START struct
5039 {
5040     /** Header */
5041     MrvlIEtypesHeader_t header;
5042     /** Queue index */
5043     t_u8 queue_index;
5044     /** Disabled flag */
5045     t_u8 disabled;
5046     /** Medium time allocation in 32us units*/
5047     t_u16 medium_time;
5048     /** Flow required flag */
5049     t_u8 flow_required;
5050     /** Flow created flag */
5051     t_u8 flow_created;
5052     /** Reserved */
5053     t_u32 reserved;
5054 } MLAN_PACK_END MrvlIEtypes_WmmQueueStatus_t;
5055 
5056 /** Size of a TSPEC.  Used to allocate necessary buffer space in commands */
5057 #define WMM_TSPEC_SIZE 63
5058 
5059 /** Maximum number of AC QOS queues available in the driver/firmware */
5060 #define MAX_AC_QUEUES 4
5061 
5062 /** Extra IE bytes allocated in messages for appended IEs after a TSPEC */
5063 #define WMM_ADDTS_EXTRA_IE_BYTES 256
5064 
5065 /** Extra TLV bytes allocated in messages for configuring WMM Queues */
5066 #define WMM_QUEUE_CONFIG_EXTRA_TLV_BYTES 64
5067 
5068 /** Number of bins in the histogram for the HostCmd_DS_WMM_QUEUE_STATS */
5069 #define WMM_STATS_PKTS_HIST_BINS 7
5070 
5071 /**
5072  *  @brief Firmware command structure to retrieve the firmware WMM status.
5073  *
5074  *  Used to retrieve the status of each WMM AC Queue in TLV
5075  *    format (MrvlIEtypes_WmmQueueStatus_t) as well as the current WMM
5076  *    parameter IE advertised by the AP.
5077  *
5078  *  Used in response to a EVENT_WMM_STATUS_CHANGE event signaling
5079  *    a QOS change on one of the ACs or a change in the WMM Parameter in
5080  *    the Beacon.
5081  *
5082  *  TLV based command, byte arrays used for max sizing purpose. There are no
5083  *    arguments sent in the command, the TLVs are returned by the firmware.
5084  */
5085 typedef MLAN_PACK_START struct
5086 {
5087     /** Queue status TLV */
5088     t_u8 queue_status_tlv[sizeof(MrvlIEtypes_WmmQueueStatus_t) * MAX_AC_QUEUES];
5089     /** WMM parameter TLV */
5090     t_u8 wmm_param_tlv[sizeof(IEEEtypes_WmmParameter_t) + 2];
5091 } MLAN_PACK_END HostCmd_DS_WMM_GET_STATUS;
5092 
5093 /**
5094  *  @brief Command structure for the HostCmd_CMD_WMM_ADDTS_REQ firmware command
5095  */
5096 typedef MLAN_PACK_START struct
5097 {
5098     mlan_cmd_result_e command_result;                  /**< Command result */
5099     t_u32 timeout_ms;                                  /**< Timeout value in milliseconds */
5100     t_u8 dialog_token;                                 /**< Dialog token */
5101     t_u8 ieee_status_code;                             /**< IEEE status code */
5102     t_u8 tspec_data[WMM_TSPEC_SIZE];                   /**< TSPEC data */
5103     t_u8 addts_extra_ie_buf[WMM_ADDTS_EXTRA_IE_BYTES]; /**< Extra IE buffer */
5104 } MLAN_PACK_END HostCmd_DS_WMM_ADDTS_REQ;
5105 
5106 /**
5107  *  @brief Command structure for the HostCmd_CMD_WMM_DELTS_REQ firmware command
5108  */
5109 typedef MLAN_PACK_START struct
5110 {
5111     mlan_cmd_result_e command_result; /**< Command result */
5112     t_u8 dialog_token;                /**< Dialog token */
5113     t_u8 ieee_reason_code;            /**< IEEE reason code */
5114     t_u8 tspec_data[WMM_TSPEC_SIZE];  /**< TSPEC data */
5115 } MLAN_PACK_END HostCmd_DS_WMM_DELTS_REQ;
5116 
5117 /**
5118  *  @brief Command structure for the HostCmd_CMD_WMM_QUEUE_CONFIG firmware cmd
5119  *
5120  *  Set/Get/Default the Queue parameters for a specific AC in the firmware.
5121  */
5122 typedef MLAN_PACK_START struct
5123 {
5124     mlan_wmm_queue_config_action_e action; /**< Set, Get, or Default */
5125     mlan_wmm_ac_e access_category;         /**< WMM_AC_BK(0) to WMM_AC_VO(3) */
5126     /** @brief MSDU lifetime expiry per 802.11e
5127      *
5128      *   - Ignored if 0 on a set command
5129      *   - Set to the 802.11e specified 500 TUs when defaulted
5130      */
5131     t_u16 msdu_lifetime_expiry;
5132     t_u8 tlv_buffer[WMM_QUEUE_CONFIG_EXTRA_TLV_BYTES]; /**< Not supported */
5133 } MLAN_PACK_END HostCmd_DS_WMM_QUEUE_CONFIG;
5134 
5135 /**
5136  *  @brief Command structure for the HostCmd_CMD_WMM_QUEUE_STATS firmware cmd
5137  *
5138  *  Turn statistical collection on/off for a given AC or retrieve the
5139  *    accumulated stats for an AC and clear them in the firmware.
5140  */
5141 typedef MLAN_PACK_START struct
5142 {
5143     mlan_wmm_queue_stats_action_e action; /**< Start, Stop, or Get */
5144 #ifdef BIG_ENDIAN_SUPPORT
5145     t_u8 select_bin : 7;                  /**< WMM_AC_BK(0) to WMM_AC_VO(3), or TID */
5146     t_u8 select_is_userpri : 1;           /**< Set if select_bin is UP, Clear for AC */
5147 #else
5148     t_u8 select_is_userpri : 1; /**< Set if select_bin is UP, Clear for AC */
5149     t_u8 select_bin : 7;        /**< WMM_AC_BK(0) to WMM_AC_VO(3), or TID */
5150 #endif
5151     t_u16 pkt_count;       /**< Number of successful packets transmitted */
5152     t_u16 pkt_loss;        /**< Packets lost; not included in pktCount */
5153     t_u32 avg_queue_delay; /**< Average Queue delay in microsec */
5154     t_u32 avg_tx_delay;    /**< Average Transmission delay in microsec */
5155     t_u16 used_time;       /**< Calc used time - units of 32 microsec */
5156     t_u16 policed_time;    /**< Calc policed time - units of 32 microsec */
5157     /** @brief Queue Delay Histogram; number of packets per queue delay range
5158      *
5159      *  [0] -  0ms <= delay < 5ms
5160      *  [1] -  5ms <= delay < 10ms
5161      *  [2] - 10ms <= delay < 20ms
5162      *  [3] - 20ms <= delay < 30ms
5163      *  [4] - 30ms <= delay < 40ms
5164      *  [5] - 40ms <= delay < 50ms
5165      *  [6] - 50ms <= delay < msduLifetime (TUs)
5166      */
5167     t_u16 delay_histogram[WMM_STATS_PKTS_HIST_BINS];
5168     /** Reserved */
5169     t_u16 reserved_1;
5170 } MLAN_PACK_END HostCmd_DS_WMM_QUEUE_STATS;
5171 
5172 /**
5173  *  @brief Command structure for the HostCmd_CMD_WMM_TS_STATUS firmware cmd
5174  *
5175  *  Query the firmware to get the status of the WMM Traffic Streams
5176  */
5177 typedef MLAN_PACK_START struct
5178 {
5179     /** TSID: Range: 0->7 */
5180     t_u8 tid;
5181     /** TSID specified is valid */
5182     t_u8 valid;
5183     /** AC TSID is active on */
5184     t_u8 access_category;
5185     /** UP specified for the TSID */
5186     t_u8 user_priority;
5187     /** Power save mode for TSID: 0 (legacy), 1 (UAPSD) */
5188     t_u8 psb;
5189     /** Uplink(1), Downlink(2), Bidirectional(3) */
5190     t_u8 flow_dir;
5191     /** Medium time granted for the TSID */
5192     t_u16 medium_time;
5193 } MLAN_PACK_END HostCmd_DS_WMM_TS_STATUS;
5194 
5195 /** Firmware status for a specific AC */
5196 typedef MLAN_PACK_START struct
5197 {
5198     /** Disabled flag */
5199     t_u8 disabled;
5200     /** Flow required flag */
5201     t_u8 flow_required;
5202     /** Flow created flag */
5203     t_u8 flow_created;
5204 } MLAN_PACK_END WmmAcStatus_t;
5205 
5206 /**  Local Power Capability */
5207 typedef MLAN_PACK_START struct _MrvlIEtypes_PowerCapability_t
5208 {
5209     /** Header */
5210     MrvlIEtypesHeader_t header;
5211     /** Minmum power */
5212     t_s8 min_power;
5213     /** Maximum power */
5214     t_s8 max_power;
5215 } MLAN_PACK_END MrvlIEtypes_PowerCapability_t;
5216 
5217 /** HT Capabilities element */
5218 typedef MLAN_PACK_START struct _MrvlIETypes_HTCap_t
5219 {
5220     /** Header */
5221     MrvlIEtypesHeader_t header;
5222 
5223     /** HTCap struct */
5224     HTCap_t ht_cap;
5225 } MLAN_PACK_END MrvlIETypes_HTCap_t;
5226 
5227 /** HT Information element */
5228 typedef MLAN_PACK_START struct _MrvlIETypes_HTInfo_t
5229 {
5230     /** Header */
5231     MrvlIEtypesHeader_t header;
5232 
5233     /** HTInfo struct */
5234     HTInfo_t ht_info;
5235 } MLAN_PACK_END MrvlIETypes_HTInfo_t;
5236 
5237 /** 20/40 BSS Coexistence element */
5238 typedef MLAN_PACK_START struct _MrvlIETypes_2040BSSCo_t
5239 {
5240     /** Header */
5241     MrvlIEtypesHeader_t header;
5242 
5243     /** BSSCo2040_t struct */
5244     BSSCo2040_t bss_co_2040;
5245 } MLAN_PACK_END MrvlIETypes_2040BSSCo_t;
5246 
5247 /** Extended Capabilities element */
5248 typedef MLAN_PACK_START struct _MrvlIETypes_ExtCap_t
5249 {
5250     /** Header */
5251     MrvlIEtypesHeader_t header;
5252 
5253     /** ExtCap_t struct */
5254     ExtCap_t ext_cap;
5255 } MLAN_PACK_END MrvlIETypes_ExtCap_t;
5256 
5257 /** Overlapping BSS Scan Parameters element */
5258 typedef MLAN_PACK_START struct _MrvlIETypes_OverlapBSSScanParam_t
5259 {
5260     /** Header */
5261     MrvlIEtypesHeader_t header;
5262 
5263     /** OBSSScanParam_t struct */
5264     OBSSScanParam_t obss_scan_param;
5265 } MLAN_PACK_END MrvlIETypes_OverlapBSSScanParam_t;
5266 
5267 /** Set of MCS values that STA desires to use within the BSS */
5268 typedef MLAN_PACK_START struct _MrvlIETypes_HTOperationalMCSSet_t
5269 {
5270     /** Header */
5271     MrvlIEtypesHeader_t header;
5272 
5273     /** Bitmap indicating MCSs that STA desires to use within the BSS */
5274     t_u8 ht_operational_mcs_bitmap[16];
5275 } MLAN_PACK_END MrvlIETypes_HTOperationalMCSSet_t;
5276 
5277 /** VHT Capabilities element */
5278 typedef MLAN_PACK_START struct _MrvlIETypes_VHTCap_t
5279 {
5280     /** Header */
5281     MrvlIEtypesHeader_t header;
5282 
5283     /** VHTCap struct */
5284     VHT_capa_t vht_cap;
5285 } MLAN_PACK_END MrvlIETypes_VHTCap_t;
5286 
5287 /** VHT Operations IE */
5288 typedef MLAN_PACK_START struct _MrvlIETypes_VHTOprat_t
5289 {
5290     /** Header */
5291     MrvlIEtypesHeader_t header;
5292 
5293     /** Channel width */
5294     t_u8 chan_width;
5295     /** Channel center frequency 1 */
5296     t_u8 chan_center_freq_1;
5297     /** Channel center frequency 2 */
5298     t_u8 chan_center_freq_2;
5299     /** Basic MCS set map, each 2 bits stands for a Nss */
5300     t_u16 basic_MCS_map;
5301 } MLAN_PACK_END MrvlIETypes_VHTOprat_t;
5302 
5303 /** VHT Transmit Power Envelope IE */
5304 typedef MLAN_PACK_START struct _MrvlIETypes_VHTtxpower_t
5305 {
5306     /** Header */
5307     MrvlIEtypesHeader_t header;
5308 
5309     /** Maximum tx power */
5310     t_u8 max_tx_power;
5311     /** Channel center frequency */
5312     t_u8 chan_center_freq;
5313     /** Channel width */
5314     t_u8 chan_width;
5315 } MLAN_PACK_END MrvlIETypes_VHTtxpower_t;
5316 
5317 /** Extended Power Constraint IE */
5318 typedef MLAN_PACK_START struct _MrvlIETypes_ExtPwerCons_t
5319 {
5320     /** Header */
5321     MrvlIEtypesHeader_t header;
5322 
5323     /** channel width */
5324     t_u8 chan_width;
5325     /** local power constraint */
5326     t_u8 local_power_cons;
5327 } MLAN_PACK_END MrvlIETypes_ExtPwerCons_t;
5328 
5329 /** Extended BSS Load IE */
5330 typedef MLAN_PACK_START struct _MrvlIETypes_ExtBSSload_t
5331 {
5332     /** Header */
5333     MrvlIEtypesHeader_t header;
5334 
5335     /** MIMO Capability count */
5336     t_u8 MU_MIMO_capa_count;
5337     /** Stream under utilization */
5338     t_u8 stream_underutilization;
5339     /** VHT40 util */
5340     t_u8 VHT40_util;
5341     /** VHT80 util */
5342     t_u8 VHT80_util;
5343     /** VHT160 util */
5344     t_u8 VHT160_util;
5345 } MLAN_PACK_END MrvlIETypes_ExtBSSload_t;
5346 
5347 /** Quiet Channel IE */
5348 typedef MLAN_PACK_START struct _MrvlIETypes_QuietChan_t
5349 {
5350     /** Header */
5351     MrvlIEtypesHeader_t header;
5352 
5353     /** AP quiet mode */
5354     t_u8 AP_quiet_mode;
5355     /** Quiet count */
5356     t_u8 quiet_count;
5357     /** Quiet period */
5358     t_u8 quiet_period;
5359     /** Quiet duration */
5360     t_u16 quiet_dur;
5361     /** Quiet offset */
5362     t_u16 quiet_offset;
5363 } MLAN_PACK_END MrvlIETypes_QuietChan_t;
5364 
5365 /** Wide Bandwidth Channel Switch IE */
5366 typedef MLAN_PACK_START struct _MrvlIETypes_BWSwitch_t
5367 {
5368     /** Header */
5369     MrvlIEtypesHeader_t header;
5370 
5371     /** New Channel width */
5372     t_u8 new_chan_width;
5373     /** New Channel center frequency 1 */
5374     t_u8 new_chan_center_freq_1;
5375     /** New channel center frequency 2 */
5376     t_u8 new_chan_center_freq_2;
5377 } MLAN_PACK_END MrvlIETypes_BWSwitch_t;
5378 
5379 /** AID IE */
5380 typedef MLAN_PACK_START struct _MrvlIETypes_AID_t
5381 {
5382     /** Header */
5383     MrvlIEtypesHeader_t header;
5384 
5385     /** AID number */
5386     t_u16 AID;
5387 } MLAN_PACK_END MrvlIETypes_AID_t;
5388 
5389 /** Operating Mode Notification IE */
5390 typedef MLAN_PACK_START struct _MrvlIETypes_OperModeNtf_t
5391 {
5392     /** Header */
5393     MrvlIEtypesHeader_t header;
5394 
5395     /** operating mdoe */
5396     t_u8 oper_mode;
5397 } MLAN_PACK_END MrvlIETypes_OperModeNtf_t;
5398 
5399 #ifdef WIFI_DIRECT_SUPPORT
5400 /** MrvlIEtypes_psk_t */
5401 typedef MLAN_PACK_START struct _MrvlIEtypes_psk_t
5402 {
5403     /** Header */
5404     MrvlIEtypesHeader_t header;
5405     /** PSK */
5406     t_u8 psk[MLAN_MAX_KEY_LENGTH];
5407 } MLAN_PACK_END MrvlIEtypes_psk_t;
5408 #endif /* WIFI_DIRECT_SUPPORT */
5409 
5410 /** MrvlIEtypes_PMK_t */
5411 typedef MLAN_PACK_START struct _MrvlIEtypes_PMK_t
5412 {
5413     /** Header */
5414     MrvlIEtypesHeader_t header;
5415     /** PMK */
5416     t_u8 pmk[1];
5417 } MLAN_PACK_END MrvlIEtypes_PMK_t;
5418 
5419 /** MrvlIEtypes_Passphrase_t */
5420 typedef MLAN_PACK_START struct _MrvlIEtypes_Passphrase_t
5421 {
5422     /** Header */
5423     MrvlIEtypesHeader_t header;
5424     /** Passphrase */
5425     char passphrase[1];
5426 } MLAN_PACK_END MrvlIEtypes_Passphrase_t;
5427 
5428 /** MrvlIEtypes_Passphrase_t */
5429 typedef MLAN_PACK_START struct _MrvlIEtypes_Password_t
5430 {
5431     /** Header */
5432     MrvlIEtypesHeader_t header;
5433     /** Passphrase */
5434     char password[1];
5435 } MLAN_PACK_END MrvlIEtypes_Password_t;
5436 
5437 /** MrvlIEtypes_SAE_PWE_Mode_t */
5438 typedef MLAN_PACK_START struct _MrvlIEtypes_SAE_PWE_Mode_t
5439 {
5440     /** Header */
5441     MrvlIEtypesHeader_t header;
5442     /** WPA3 SAE mechanism for PWE derivation */
5443     char pwe[1];
5444 } MLAN_PACK_END MrvlIEtypes_SAE_PWE_Mode_t;
5445 
5446 /** SAE H2E capability bit in RSNX */
5447 #define SAE_H2E_BIT 5
5448 
5449 /* unicastCipher -
5450  *      Bit 0   : RFU
5451  *      Bit 1   : RFU
5452  *      Bit 2   : TKIP
5453  *      Bit 3   : AES CCKM
5454  *      Bit 2-7 : RFU
5455  * multicastCipher -
5456  *      Bit 0   : WEP40
5457  *      Bit 1   : WEP104
5458  *      Bit 2   : TKIP
5459  *      Bit 3   : AES
5460  *      Bit 4-7 : Reserved for now
5461  */
5462 /** MrvlIEtypes_Cipher_t */
5463 typedef MLAN_PACK_START struct _MrvlIEtypes_Cipher_t
5464 {
5465     /** Header */
5466     MrvlIEtypesHeader_t header;
5467     /** PairCipher */
5468     t_u8 pair_cipher;
5469     /** GroupCipher */
5470     t_u8 group_cipher;
5471 } MLAN_PACK_END MrvlIEtypes_Cipher_t;
5472 
5473 /* rsnMode -
5474  *      Bit 0    : No RSN
5475  *      Bit 1-2  : RFU
5476  *      Bit 3    : WPA
5477  *      Bit 4    : WPA-NONE
5478  *      Bit 5    : WPA2
5479  *      Bit 6    : AES CCKM
5480  *      Bit 7-15 : RFU
5481  */
5482 /** MrvlIEtypes_EncrProto_t */
5483 typedef MLAN_PACK_START struct _MrvlIEtypes_EncrProto_t
5484 {
5485     /** Header */
5486     MrvlIEtypesHeader_t header;
5487     /** EncrProto */
5488     t_u16 rsn_mode;
5489 } MLAN_PACK_END MrvlIEtypes_EncrProto_t;
5490 
5491 /** MrvlIEtypes_Bssid_t */
5492 typedef MLAN_PACK_START struct _MrvlIEtypes_Bssid_t
5493 {
5494     /** Header */
5495     MrvlIEtypesHeader_t header;
5496     /** Bssid */
5497     t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
5498 } MLAN_PACK_END MrvlIEtypes_Bssid_t;
5499 
5500 /*
5501  * This struct will handle GET,SET,CLEAR function for embedded
5502  * supplicant.
5503  * Define data structure for HostCmd_CMD_802_11_SUPPLICANT_PMK
5504  */
5505 /** HostCmd_DS_802_11_SUPPLICANT_PMK */
5506 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SUPPLICANT_PMK
5507 {
5508     /** CMD Action GET/SET/CLEAR */
5509     t_u16 action;
5510     /** CacheResult initialized to 0 */
5511     t_u16 cache_result;
5512     /** TLV Buffer */
5513     t_u8 tlv_buffer[1];
5514     /** MrvlIEtypes_SsidParamSet_t  SsidParamSet;
5515      * MrvlIEtypes_PMK_t           Pmk;
5516      * MrvlIEtypes_Passphrase_t    Passphrase;
5517      * MrvlIEtypes_Bssid_t         Bssid;
5518      **/
5519 } MLAN_PACK_END HostCmd_DS_802_11_SUPPLICANT_PMK;
5520 
5521 /*
5522  * This struct will GET the Supplicant supported bitmaps
5523  * The GET_CURRENT action will get the network profile used
5524  * for the current assocation.
5525  * Define data structure for HostCmd_CMD_802_11_SUPPLICANT_PROFILE
5526  */
5527 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_SUPPLICANT_PROFILE
5528 {
5529     /** GET/SET/GET_CURRENT */
5530     t_u16 action;
5531     /** Reserved */
5532     t_u16 reserved;
5533     /** TLVBuffer */
5534     t_u8 tlv_buf[1];
5535     /* MrvlIEtypes_EncrProto_t */
5536 } MLAN_PACK_END HostCmd_DS_802_11_SUPPLICANT_PROFILE;
5537 
5538 /** HostCmd_CMD_802_11_RF_CHANNEL */
5539 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_RF_CHANNEL
5540 {
5541     /** Action */
5542     t_u16 action;
5543     /** Current channel */
5544     t_u16 current_channel;
5545     /** RF type */
5546     t_u16 rf_type;
5547     /** Reserved field */
5548     t_u16 reserved;
5549 #ifdef STA_SUPPORT
5550     /** Reserved */
5551     t_u8 reserved_1[32];
5552 #else  /* STA_SUPPORT */
5553     /** List of channels */
5554     t_u8 channel_list[32];
5555 #endif /* !STA_SUPPORT */
5556 } MLAN_PACK_END HostCmd_DS_802_11_RF_CHANNEL;
5557 
5558 /** HostCmd_DS_VERSION_EXT */
5559 typedef MLAN_PACK_START struct _HostCmd_DS_VERSION_EXT
5560 {
5561     /** Selected version string */
5562     t_u8 version_str_sel;
5563     /** Version string */
5564     char version_str[128];
5565 } MLAN_PACK_END HostCmd_DS_VERSION_EXT;
5566 
5567 /** HostCmd_CMD_CW_MODE_CTRL */
5568 typedef MLAN_PACK_START struct _HostCmd_DS_CW_MODE_CTRL
5569 {
5570     /** Action for CW Tone Control */
5571     t_u16 action;
5572     /** Mode of Operation 0: Disbale 1: Tx Continuous Packet 2: Tx Continuous Wave */
5573     t_u8 mode;
5574     /** channel */
5575     t_u8 channel;
5576     /** channel info*/
5577     t_u8 chanInfo;
5578     /** Tx Power level in dBm */
5579     t_u16 txPower;
5580     /** Packet Length */
5581     t_u16 pktLength;
5582     /** bit rate Info */
5583     t_u32 rateInfo;
5584 } MLAN_PACK_END HostCmd_DS_CW_MODE_CTRL;
5585 
5586 /** HostCmd_CMD_802_11_RF_ANTENNA */
5587 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_RF_ANTENNA
5588 {
5589 #ifdef STREAM_2X2
5590     /** Action for Tx antenna */
5591     t_u16 action_tx;
5592     /** Tx antenna mode Bit0:1, Bit1:2, Bit0-1:1+2, 0xffff: diversity */
5593     t_u16 tx_antenna_mode;
5594     /** Action for Rx antenna */
5595     t_u16 action_rx;
5596     /** Rx antenna mode Bit0:1, Bit1:2, Bit0-1:1+2, 0xffff: diversity */
5597     t_u16 rx_antenna_mode;
5598 #else
5599     /** Action */
5600     t_u16 action;
5601     /**  Antenna or 0xffff (diversity) */
5602     t_u16 antenna_mode;
5603     /** Evaluate time */
5604     t_u16 evaluate_time;
5605     /** Current antenna */
5606     t_u16 current_antenna;
5607 #ifdef RW610
5608     /** Evaluate mode */
5609     t_u8 evaluate_mode;
5610 #endif
5611 #endif
5612 } MLAN_PACK_END HostCmd_DS_802_11_RF_ANTENNA;
5613 
5614 /** HostCmd_DS_802_11_IBSS_STATUS */
5615 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_IBSS_STATUS
5616 {
5617     /** Action */
5618     t_u16 action;
5619     /** Enable */
5620     t_u16 enable;
5621     /** BSSID */
5622     t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
5623     /** Beacon interval */
5624     t_u16 beacon_interval;
5625     /** ATIM window interval */
5626     t_u16 atim_window;
5627     /** User G rate protection */
5628     t_u16 use_g_rate_protect;
5629 } MLAN_PACK_END HostCmd_DS_802_11_IBSS_STATUS;
5630 
5631 /** HostCmd_DS_MGMT_IE_LIST_CFG */
5632 typedef MLAN_PACK_START struct _HostCmd_DS_MGMT_IE_LIST
5633 {
5634     /** Action */
5635     t_u16 action;
5636     /** Get/Set mgmt IE */
5637     mlan_ds_misc_custom_ie ds_mgmt_ie;
5638 } MLAN_PACK_END HostCmd_DS_MGMT_IE_LIST_CFG;
5639 
5640 /** HostCmd_CMD_MAC_REG_ACCESS */
5641 typedef MLAN_PACK_START struct _HostCmd_DS_MAC_REG_ACCESS
5642 {
5643     /** Action */
5644     t_u16 action;
5645     /** MAC register offset */
5646     t_u16 offset;
5647     /** MAC register value */
5648     t_u32 value;
5649 } MLAN_PACK_END HostCmd_DS_MAC_REG_ACCESS;
5650 
5651 /** HostCmd_CMD_BBP_REG_ACCESS */
5652 typedef MLAN_PACK_START struct _HostCmd_DS_BBP_REG_ACCESS
5653 {
5654     /** Acion */
5655     t_u16 action;
5656     /** BBP register offset */
5657     t_u16 offset;
5658     /** BBP register value */
5659     t_u8 value;
5660     /** Reserved field */
5661     t_u8 reserved[3];
5662 } MLAN_PACK_END HostCmd_DS_BBP_REG_ACCESS;
5663 
5664 /**  HostCmd_CMD_RF_REG_ACCESS */
5665 typedef MLAN_PACK_START struct _HostCmd_DS_RF_REG_ACCESS
5666 {
5667     /** Action */
5668     t_u16 action;
5669     /** RF register offset */
5670     t_u16 offset;
5671     /** RF register value */
5672     t_u8 value;
5673     /** Reserved field */
5674     t_u8 reserved[3];
5675 } MLAN_PACK_END HostCmd_DS_RF_REG_ACCESS;
5676 
5677 /** HostCmd_DS_802_11_EEPROM_ACCESS */
5678 typedef MLAN_PACK_START struct _HostCmd_DS_802_11_EEPROM_ACCESS
5679 {
5680     /** Action */
5681     t_u16 action;
5682 
5683     /** multiple 4 */
5684     t_u16 offset;
5685     /** Number of bytes */
5686     t_u16 byte_count;
5687     /** Value */
5688     t_u8 value;
5689 } MLAN_PACK_END HostCmd_DS_802_11_EEPROM_ACCESS;
5690 
5691 /** HostCmd_DS_MEM_ACCESS */
5692 typedef MLAN_PACK_START struct _HostCmd_DS_MEM_ACCESS
5693 {
5694     /** Action */
5695     t_u16 action;
5696     /** Reserved field */
5697     t_u16 reserved;
5698     /** Address */
5699     t_u32 addr;
5700     /** Value */
5701     t_u32 value;
5702 } MLAN_PACK_END HostCmd_DS_MEM_ACCESS;
5703 
5704 /** HostCmd_DS_AUTO_RECONNECT */
5705 typedef MLAN_PACK_START struct _HostCmd_DS_AUTO_RECONNECT
5706 {
5707     /** Action */
5708     t_u16 action;
5709     /** Reconnect Counter */
5710     t_u8 reconnect_counter;
5711     /** Reconnect Interval */
5712     t_u8 reconnect_interval;
5713     /** Flags */
5714     t_u16 flags;
5715 } MLAN_PACK_END HostCmd_DS_AUTO_RECONNECT;
5716 
5717 /** HostCmd_CMD_HS_WAKEUP_REASON */
5718 typedef MLAN_PACK_START struct _HostCmd_DS_HS_WAKEUP_REASON
5719 {
5720     /** wakeupReason:
5721      * 0: unknown
5722      * 1: Broadcast data matched
5723      * 2: Multicast data matched
5724      * 3: Unicast data matched
5725      * 4: Maskable event matched
5726      * 5. Non-maskable event matched
5727      * 6: Non-maskable condition matched (EAPoL rekey)
5728      * 7: Magic pattern matched
5729      * Others: reserved. (set to 0) */
5730     t_u16 wakeup_reason;
5731 } MLAN_PACK_END HostCmd_DS_HS_WAKEUP_REASON;
5732 
5733 /** HostCmd_BRIDGE_MODE */
5734 typedef MLAN_PACK_START struct _HostCmd_BRIDGE_MODE
5735 {
5736     /** Action */
5737     t_u16 action;
5738     /** Enable */
5739     t_u8 enable;
5740 } MLAN_PACK_END HostCmd_BRIDGE_MODE;
5741 
5742 /** HostCmd_DS_SUBSCRIBE_EVENT */
5743 typedef MLAN_PACK_START struct _HostCmd_DS_SUBSCRIBE_EVENT
5744 {
5745     /** Action */
5746     t_u16 action;
5747     /** Bitmap of subscribed events */
5748     t_u16 event_bitmap;
5749 } MLAN_PACK_END HostCmd_DS_SUBSCRIBE_EVENT;
5750 
5751 /** HostCmd_DS_OTP_USER_DATA */
5752 typedef MLAN_PACK_START struct _HostCmd_DS_OTP_USER_DATA
5753 {
5754     /** Action */
5755     t_u16 action;
5756     /** Reserved field */
5757     t_u16 reserved;
5758     /** User data length */
5759     t_u16 user_data_length;
5760     /** User data */
5761     t_u8 user_data[1];
5762 } MLAN_PACK_END HostCmd_DS_OTP_USER_DATA;
5763 
5764 /** HostCmd_DS_INACTIVITY_TIMEOUT_EXT */
5765 typedef MLAN_PACK_START struct _HostCmd_DS_INACTIVITY_TIMEOUT_EXT
5766 {
5767     /** ACT_GET/ACT_SET */
5768     t_u16 action;
5769     /** uS, 0 means 1000uS(1ms) */
5770     t_u16 timeout_unit;
5771     /** Inactivity timeout for unicast data */
5772     t_u16 unicast_timeout;
5773     /** Inactivity timeout for multicast data */
5774     t_u16 mcast_timeout;
5775     /** Timeout for additional RX traffic after Null PM1 packet exchange */
5776     t_u16 ps_entry_timeout;
5777     /** Inactivity timeout for cmd */
5778     t_u16 ps_cmd_timeout;
5779 } MLAN_PACK_END HostCmd_DS_INACTIVITY_TIMEOUT_EXT;
5780 
5781 /** HostCmd_DS_CMD_TX_AMPDU_PROT_MODE */
5782 typedef MLAN_PACK_START struct _HostCmd_DS_CMD_TX_AMPDU_PROT_MODE
5783 {
5784     /** Action */
5785     t_u16 action;
5786     /** Prot mode */
5787     t_u16 mode;
5788 } MLAN_PACK_END HostCmd_DS_CMD_TX_AMPDU_PROT_MODE;
5789 
5790 /** TLV type : STA Mac address */
5791 #define TLV_TYPE_STA_MAC_ADDRESS (PROPRIETARY_TLV_BASE_ID + 0x20) // 0x0120
5792 
5793 /** MrvlIEtypes_MacAddr_t */
5794 typedef MLAN_PACK_START struct _MrvlIEtypes_MacAddr_t
5795 {
5796     /** Header */
5797     MrvlIEtypesHeader_t header;
5798     /** mac address */
5799     t_u8 mac[MLAN_MAC_ADDR_LENGTH];
5800 } MLAN_PACK_END MrvlIEtypes_MacAddr_t;
5801 
5802 #ifdef SD8801
5803 typedef MLAN_PACK_START struct _MrvlIETypes_ExtBLECoex_Config_t
5804 {
5805     /** Header */
5806     MrvlIEtypesHeader_t header;
5807     /** Enable or disable external coexistence */
5808     t_u8 Enabled;
5809     /** Ignore the priority of the external radio request */
5810     t_u8 IgnorePriority;
5811     /** Default priority when the priority of the external radio
5812 request is ignored */
5813     t_u8 DefaultPriority;
5814     /** Input request GPIO pin for EXT_RADIO_REQ signal */
5815     t_u8 EXT_RADIO_REQ_ip_gpio_num;
5816     /** Input request GPIO polarity for EXT_RADIO_REQ signal */
5817     t_u8 EXT_RADIO_REQ_ip_gpio_polarity;
5818     /** Input priority GPIO pin for EXT_RADIO_PRI signal */
5819     t_u8 EXT_RADIO_PRI_ip_gpio_num;
5820     /** Input priority GPIO polarity for EXT_RADIO_PRI signal */
5821     t_u8 EXT_RADIO_PRI_ip_gpio_polarity;
5822     /** Output grant GPIO pin for WLAN_GRANT signal */
5823     t_u8 WLAN_GRANT_op_gpio_num;
5824     /** Output grant GPIO polarity of WLAN_GRANT */
5825     t_u8 WLAN_GRANT_op_gpio_polarity;
5826     /** Reserved Bytes */
5827     t_u16 reserved_1;
5828     /** Reserved Bytes */
5829     t_u16 reserved_2;
5830     /** External Radio Request count */
5831     t_u16 EXT_RADIO_REQ_count;
5832     /** External Radio Priority count */
5833     t_u16 EXT_RADIO_PRI_count;
5834     /** WLAN GRANT count */
5835     t_u16 WLAN_GRANT_count;
5836 } MLAN_PACK_END MrvlIETypes_ExtBLECoex_Config_t;
5837 
5838 typedef MLAN_PACK_START struct _HostCmd_DS_ExtBLECoex_Config_t
5839 {
5840     /** Action */
5841     t_u16 action;
5842     /** Reserved field */
5843     t_u16 reserved;
5844     /** External Coex Configuration Data */
5845     MrvlIETypes_ExtBLECoex_Config_t coex_cfg_data;
5846 } MLAN_PACK_END HostCmd_DS_ExtBLECoex_Config_t;
5847 #endif
5848 
5849 /** Assoc Request */
5850 #define SUBTYPE_ASSOC_REQUEST 0U
5851 /** Assoc Response */
5852 #define SUBTYPE_ASSOC_RESP 1U
5853 /** ReAssoc Request */
5854 #define SUBTYPE_REASSOC_REQUEST 2U
5855 /** ReAssoc Response */
5856 #define SUBTYPE_REASSOC_RESP 3U
5857 /** Probe Request */
5858 #define SUBTYPE_PROBE_REQUEST 4U
5859 /** Probe Response */
5860 #define SUBTYPE_PROBE_RESP 5U
5861 /** Disassoc Request */
5862 #define SUBTYPE_DISASSOC 10
5863 /** Auth Request */
5864 #define SUBTYPE_AUTH 11
5865 /** Deauth Request */
5866 #define SUBTYPE_DEAUTH 12
5867 /** Action frame */
5868 #define SUBTYPE_ACTION 13
5869 
5870 #if UAP_SUPPORT || CONFIG_NET_MONITOR
5871 /** TLV type : AP Channel band Config */
5872 #define TLV_TYPE_UAP_CHAN_BAND_CONFIG (PROPRIETARY_TLV_BASE_ID + 0x2aU) // 0x012a
5873 /** TLV type : AP Mac address */
5874 #define TLV_TYPE_UAP_MAC_ADDRESS (PROPRIETARY_TLV_BASE_ID + 0x2b) // 0x012b
5875 /** TLV type : AP Beacon period */
5876 #define TLV_TYPE_UAP_BEACON_PERIOD (PROPRIETARY_TLV_BASE_ID + 0x2c) // 0x012c
5877 /** TLV type : AP DTIM period */
5878 #define TLV_TYPE_UAP_DTIM_PERIOD (PROPRIETARY_TLV_BASE_ID + 0x2d) // 0x012d
5879 /** TLV type : AP Tx power */
5880 #define TLV_TYPE_UAP_TX_POWER (PROPRIETARY_TLV_BASE_ID + 0x2fU) // 0x012f
5881 /** TLV type : AP SSID broadcast control */
5882 #define TLV_TYPE_UAP_BCAST_SSID_CTL (PROPRIETARY_TLV_BASE_ID + 0x30) // 0x0130
5883 /** TLV type : AP Preamble control */
5884 #define TLV_TYPE_UAP_PREAMBLE_CTL (PROPRIETARY_TLV_BASE_ID + 0x31) // 0x0131
5885 /** TLV type : AP Antenna control */
5886 #define TLV_TYPE_UAP_ANTENNA_CTL (PROPRIETARY_TLV_BASE_ID + 0x32) // 0x0132
5887 /** TLV type : AP RTS threshold */
5888 #define TLV_TYPE_UAP_RTS_THRESHOLD (PROPRIETARY_TLV_BASE_ID + 0x33) // 0x0133
5889 /** TLV type : AP Tx data rate */
5890 #define TLV_TYPE_UAP_TX_DATA_RATE (PROPRIETARY_TLV_BASE_ID + 0x35) // 0x0135
5891 /** TLV type: AP Packet forwarding control */
5892 #define TLV_TYPE_UAP_PKT_FWD_CTL (PROPRIETARY_TLV_BASE_ID + 0x36U) // 0x0136
5893 /** TLV type: STA information */
5894 #define TLV_TYPE_UAP_STA_INFO (PROPRIETARY_TLV_BASE_ID + 0x37) // 0x0137
5895 /** TLV type: AP STA MAC address filter */
5896 #define TLV_TYPE_UAP_STA_MAC_ADDR_FILTER (PROPRIETARY_TLV_BASE_ID + 0x38) // 0x0138
5897 /** TLV type: AP STA ageout timer */
5898 #define TLV_TYPE_UAP_STA_AGEOUT_TIMER (PROPRIETARY_TLV_BASE_ID + 0x39) // 0x0139
5899 /** TLV type: AP WEP keys */
5900 #define TLV_TYPE_UAP_WEP_KEY (PROPRIETARY_TLV_BASE_ID + 0x3b) // 0x013b
5901 /** TLV type: AP WPA passphrase */
5902 #define TLV_TYPE_UAP_WPA_PASSPHRASE (PROPRIETARY_TLV_BASE_ID + 0x3c) // 0x013c
5903 /** TLV type: AP protocol */
5904 #define TLV_TYPE_UAP_ENCRYPT_PROTOCOL (PROPRIETARY_TLV_BASE_ID + 0x40) // 0x0140
5905 /** TLV type: AP AKMP */
5906 #define TLV_TYPE_UAP_AKMP (PROPRIETARY_TLV_BASE_ID + 0x41) // 0x0141
5907 /** TLV type: AP Fragment threshold */
5908 #define TLV_TYPE_UAP_FRAG_THRESHOLD (PROPRIETARY_TLV_BASE_ID + 0x46) // 0x0146
5909 /** TLV type: AP Group rekey timer */
5910 #define TLV_TYPE_UAP_GRP_REKEY_TIME (PROPRIETARY_TLV_BASE_ID + 0x47) // 0x0147
5911 /**TLV type : AP Max Station number */
5912 #define TLV_TYPE_UAP_MAX_STA_CNT (PROPRIETARY_TLV_BASE_ID + 0x55U) // 0x0155
5913 /**TLV type : AP Retry limit */
5914 #define TLV_TYPE_UAP_RETRY_LIMIT (PROPRIETARY_TLV_BASE_ID + 0x5d) // 0x015d
5915 /** TLV type : AP MCBC data rate */
5916 #define TLV_TYPE_UAP_MCBC_DATA_RATE (PROPRIETARY_TLV_BASE_ID + 0x62) // 0x0162
5917 /**TLV type: AP RSN replay protection */
5918 #define TLV_TYPE_UAP_RSN_REPLAY_PROTECT (PROPRIETARY_TLV_BASE_ID + 0x64) // 0x0164
5919 /** TLV ID : Management Frame */
5920 #define TLV_TYPE_UAP_MGMT_FRAME (PROPRIETARY_TLV_BASE_ID + 0x68U) // 0x0168
5921 #endif /* UAP_SUPPORT || CONFIG_NET_MONITOR */
5922 /** TLV: Management IE list */
5923 #define MRVL_MGMT_IE_LIST_TLV_ID (PROPRIETARY_TLV_BASE_ID + 0x69U)
5924 
5925 #if CONFIG_IMD3_CFG
5926 #define TLV_TYPE_IMD_VALIDATION (PROPRIETARY_TLV_BASE_ID + 0x60) // 0x0160
5927 #endif
5928 
5929 #if UAP_SUPPORT
5930 /**TLV type: AP mgmt IE passthru mask */
5931 #define TLV_TYPE_UAP_MGMT_IE_PASSTHRU_MASK (PROPRIETARY_TLV_BASE_ID + 0x70U) // 0x0170
5932 /** TLV type : AP ECSA CONFIG TLV */
5933 #define TLV_TYPE_UAP_ECSA_CONFIG (PROPRIETARY_TLV_BASE_ID + 289)
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 #endif /* UAP_SUPPORT */
5954 
5955 #if CONFIG_11AX
5956 /** TLV type: Extension ID for 11AX Capability */
5957 #define TLV_TYPE_EXTENSION_ID 0x00ff
5958 #endif
5959 
5960 #if CONFIG_HOST_MLME
5961 /**TLV type : Host MLME Flag*/
5962 #define TLV_TYPE_HOST_MLME (PROPRIETARY_TLV_BASE_ID + 307)
5963 #endif
5964 
5965 #if CONFIG_EXTERNAL_COEX_PTA
5966 /** TLV type : Robust Coex */
5967 #define TLV_TYPE_ROBUST_COEX (PROPRIETARY_TLV_BASE_ID + 0x138) // 0x0238
5968 #endif
5969 
5970 #if UAP_SUPPORT
5971 /** TLV type : WPA3 SAE Passowrd */
5972 #define TLV_TYPE_UAP_WPA3_SAE_PASSWORD (PROPRIETARY_TLV_BASE_ID + 0x141) // 0x0241
5973 
5974 #ifdef WIFI_DIRECT_SUPPORT
5975 /** TLV type : AP PSK */
5976 #define TLV_TYPE_UAP_PSK (PROPRIETARY_TLV_BASE_ID + 0xa8) // 0x01a8
5977 #endif                                                    /* WIFI_DIRECT_SUPPORT */
5978 
5979 /** MrvlIEtypes_AutoLinkParamSet_t */
5980 typedef MLAN_PACK_START struct _MrvlIEtypes_AutoLinkParamSet_t
5981 {
5982     /** Header */
5983     MrvlIEtypesHeader_t header;
5984     /** Auto Link Periodical scan interval */
5985     uint32_t scan_timer_interval;
5986     /** The condition triggers Auto Link periodical scan
5987     0:trigger scan when current link is not good
5988     1:trigger scan by host setting(always periodical scan)
5989     */
5990     uint8_t scan_timer_condition;
5991     /** Auto Link periodical scan channel list:
5992     0:only scan with previous In-STA associated channel
5993     1: 2.4G all channels
5994     */
5995     uint8_t scan_channel_list;
5996 } MLAN_PACK_END MrvlIEtypes_AutoLinkParamSet_t;
5997 
5998 /** MrvlIEtypes_BridgeParamSet_t */
5999 typedef MLAN_PACK_START struct _MrvlIEtypes_BridgeParamSet_t
6000 {
6001     /** Header */
6002     MrvlIEtypesHeader_t header;
6003     /** SSID of External AP */
6004     MrvlIEtypes_SsIdParamSet_t SSID_ExAP;
6005     /** Passphrase of External AP */
6006     MrvlIEtypes_Passphrase_t pass_ExAP;
6007     /** SSID of External AP */
6008     MrvlIEtypes_SsIdParamSet_t SSID_bridge;
6009     /** Passphrase of External AP */
6010     MrvlIEtypes_Passphrase_t pass_bridge;
6011 } MLAN_PACK_END MrvlIEtypes_BridgeParamSet_t;
6012 
6013 /** MrvlIEtypes_beacon_period_t */
6014 typedef MLAN_PACK_START struct _MrvlIEtypes_beacon_period_t
6015 {
6016     /** Header */
6017     MrvlIEtypesHeader_t header;
6018     /** beacon period */
6019     t_u16 beacon_period;
6020 } MLAN_PACK_END MrvlIEtypes_beacon_period_t;
6021 
6022 /** MrvlIEtypes_ecsa_config_t */
6023 typedef MLAN_PACK_START struct _MrvlIEtypes_ecsa_config_t
6024 {
6025     /** Header */
6026     MrvlIEtypesHeader_t header;
6027     /** enable */
6028     t_u16 enable;
6029     /** data traffic mode */
6030     t_u8 ChannelSwitchMode;
6031     /** channel switch count */
6032     t_u8 ChannelSwitchCount;
6033 } MLAN_PACK_END MrvlIEtypes_ecsa_config_t;
6034 
6035 /** MrvlIEtypes_dtim_period_t */
6036 typedef MLAN_PACK_START struct _MrvlIEtypes_dtim_period_t
6037 {
6038     /** Header */
6039     MrvlIEtypesHeader_t header;
6040     /** DTIM period */
6041     t_u8 dtim_period;
6042 } MLAN_PACK_END MrvlIEtypes_dtim_period_t;
6043 
6044 /** MrvlIEtypes_tx_rate_t */
6045 typedef MLAN_PACK_START struct _MrvlIEtypes_tx_rate_t
6046 {
6047     /** Header */
6048     MrvlIEtypesHeader_t header;
6049     /** tx data rate */
6050     t_u16 tx_data_rate;
6051 } MLAN_PACK_END MrvlIEtypes_tx_rate_t;
6052 
6053 /** MrvlIEtypes_mcbc_rate_t */
6054 typedef MLAN_PACK_START struct _MrvlIEtypes_mcbc_rate_t
6055 {
6056     /** Header */
6057     MrvlIEtypesHeader_t header;
6058     /** mcbc data rate */
6059     t_u16 mcbc_data_rate;
6060 } MLAN_PACK_END MrvlIEtypes_mcbc_rate_t;
6061 
6062 /** MrvlIEtypes_tx_power_t */
6063 typedef MLAN_PACK_START struct _MrvlIEtypes_tx_power_t
6064 {
6065     /** Header */
6066     MrvlIEtypesHeader_t header;
6067     /** tx power */
6068     t_u8 tx_power;
6069 } MLAN_PACK_END MrvlIEtypes_tx_power_t;
6070 
6071 /** MrvlIEtypes_bcast_ssid_t */
6072 typedef MLAN_PACK_START struct _MrvlIEtypes_bcast_ssid_t
6073 {
6074     /** Header */
6075     MrvlIEtypesHeader_t header;
6076     /** bcast ssid control*/
6077     t_u8 bcast_ssid_ctl;
6078 } MLAN_PACK_END MrvlIEtypes_bcast_ssid_t;
6079 
6080 /** MrvlIEtypes_antenna_mode_t */
6081 typedef MLAN_PACK_START struct _MrvlIEtypes_antenna_mode_t
6082 {
6083     /** Header */
6084     MrvlIEtypesHeader_t header;
6085     /** which antenna */
6086     t_u8 which_antenna;
6087     /** antenna mode*/
6088     t_u8 antenna_mode;
6089 } MLAN_PACK_END MrvlIEtypes_antenna_mode_t;
6090 
6091 /** MrvlIEtypes_pkt_forward_t */
6092 typedef MLAN_PACK_START struct _MrvlIEtypes_pkt_forward_t
6093 {
6094     /** Header */
6095     MrvlIEtypesHeader_t header;
6096     /** pkt foward control */
6097     t_u8 pkt_forward_ctl;
6098 } MLAN_PACK_END MrvlIEtypes_pkt_forward_t;
6099 
6100 /** MrvlIEtypes_max_sta_count_t */
6101 typedef MLAN_PACK_START struct _MrvlIEtypes_max_sta_count_t
6102 {
6103     /** Header */
6104     MrvlIEtypesHeader_t header;
6105     /** max station count */
6106     t_u16 max_sta_count;
6107 } MLAN_PACK_END MrvlIEtypes_max_sta_count_t;
6108 
6109 /** MrvlIEtypes_sta_ageout_t */
6110 typedef MLAN_PACK_START struct _MrvlIEtypes_sta_ageout_t
6111 {
6112     /** Header */
6113     MrvlIEtypesHeader_t header;
6114     /** station age out timer */
6115     t_u32 sta_ageout_timer;
6116 } MLAN_PACK_END MrvlIEtypes_sta_ageout_t;
6117 
6118 /** MrvlIEtypes_rts_threshold_t */
6119 typedef MLAN_PACK_START struct _MrvlIEtypes_rts_threshold_t
6120 {
6121     /** Header */
6122     MrvlIEtypesHeader_t header;
6123     /** rts threshold */
6124     t_u16 rts_threshold;
6125 } MLAN_PACK_END MrvlIEtypes_rts_threshold_t;
6126 
6127 /** MrvlIEtypes_frag_threshold_t */
6128 typedef MLAN_PACK_START struct _MrvlIEtypes_frag_threshold_t
6129 {
6130     /** Header */
6131     MrvlIEtypesHeader_t header;
6132     /** frag threshold */
6133     t_u16 frag_threshold;
6134 } MLAN_PACK_END MrvlIEtypes_frag_threshold_t;
6135 
6136 /** MrvlIEtypes_retry_limit_t */
6137 typedef MLAN_PACK_START struct _MrvlIEtypes_retry_limit_t
6138 {
6139     /** Header */
6140     MrvlIEtypesHeader_t header;
6141     /** retry limit */
6142     t_u8 retry_limit;
6143 } MLAN_PACK_END MrvlIEtypes_retry_limit_t;
6144 
6145 /** MrvlIEtypes_eapol_pwk_hsk_timeout_t */
6146 typedef MLAN_PACK_START struct _MrvlIEtypes_eapol_pwk_hsk_timeout_t
6147 {
6148     /** Header */
6149     MrvlIEtypesHeader_t header;
6150     /** pairwise update timeout in milliseconds */
6151     t_u32 pairwise_update_timeout;
6152 } MLAN_PACK_END MrvlIEtypes_eapol_pwk_hsk_timeout_t;
6153 
6154 /** MrvlIEtypes_eapol_pwk_hsk_retries_t */
6155 typedef MLAN_PACK_START struct _MrvlIEtypes_eapol_pwk_hsk_retries_t
6156 {
6157     /** Header */
6158     MrvlIEtypesHeader_t header;
6159     /** pairwise handshake retries */
6160     t_u32 pwk_retries;
6161 } MLAN_PACK_END MrvlIEtypes_eapol_pwk_hsk_retries_t;
6162 
6163 /** MrvlIEtypes_eapol_gwk_hsk_timeout_t */
6164 typedef MLAN_PACK_START struct _MrvlIEtypes_eapol_gwk_hsk_timeout_t
6165 {
6166     /** Header */
6167     MrvlIEtypesHeader_t header;
6168     /** groupwise update timeout in milliseconds */
6169     t_u32 groupwise_update_timeout;
6170 } MLAN_PACK_END MrvlIEtypes_eapol_gwk_hsk_timeout_t;
6171 
6172 /** MrvlIEtypes_eapol_gwk_hsk_retries_t */
6173 typedef MLAN_PACK_START struct _MrvlIEtypes_eapol_gwk_hsk_retries_t
6174 {
6175     /** Header */
6176     MrvlIEtypesHeader_t header;
6177     /** groupwise handshake retries */
6178     t_u32 gwk_retries;
6179 } MLAN_PACK_END MrvlIEtypes_eapol_gwk_hsk_retries_t;
6180 
6181 #if UAP_SUPPORT
6182 /** MrvlIEtypes_mgmt_ie_passthru_t */
6183 typedef MLAN_PACK_START struct _MrvlIEtypes_mgmt_ie_passthru_t
6184 {
6185     /** Header */
6186     MrvlIEtypesHeader_t header;
6187     /** mgmt IE mask value */
6188     t_u32 mgmt_ie_mask;
6189 } MLAN_PACK_END MrvlIEtypes_mgmt_ie_passthru_t;
6190 #endif
6191 
6192 /** TLV buffer : 2040 coex config */
6193 typedef MLAN_PACK_START struct _MrvlIEtypes_2040_coex_enable_t
6194 {
6195     /** Header */
6196     MrvlIEtypesHeader_t header;
6197     /** Enable */
6198     t_u8 enable_2040coex;
6199 } MLAN_PACK_END MrvlIEtypes_2040_coex_enable_t;
6200 
6201 /** MrvlIEtypes_mac_filter_t */
6202 typedef MLAN_PACK_START struct _MrvlIEtypes_mac_filter_t
6203 {
6204     /** Header */
6205     MrvlIEtypesHeader_t header;
6206     /** Filter mode */
6207     t_u8 filter_mode;
6208     /** Number of STA MACs */
6209     t_u8 count;
6210     /** STA MAC addresses buffer */
6211     t_u8 mac_address[1];
6212 } MLAN_PACK_END MrvlIEtypes_mac_filter_t;
6213 
6214 /** setting for band_config - band=5GHZ */
6215 #define BAND_CONFIG_5GHZ 0x01U
6216 
6217 #if CONFIG_UNII4_BAND_SUPPORT
6218 /** TODO: Temporary work around until firmware fix is available */
6219 /** setting for band_config - channel 173 */
6220 #define BAND_CONFIG_CH_173 0x11U
6221 #endif
6222 #endif /* UAP_SUPPORT */
6223 
6224 /** MrvlIEtypes_retry_limit_t */
6225 typedef MLAN_PACK_START struct _MrvlIEtypes_channel_band_t
6226 {
6227     /** Header */
6228     MrvlIEtypesHeader_t header;
6229     /** Band Configuration
6230      *
6231      * [7-6] Channel Selection Mode; 00 manual, 01 ACS
6232      * [3-2] Channel Width; 00 20 MHz
6233      * [1-0] Band Info; 00 2.4 GHz
6234      */
6235     t_u8 band_config;
6236     /** channel */
6237     t_u8 channel;
6238 } MLAN_PACK_END MrvlIEtypes_channel_band_t;
6239 
6240 #if UAP_SUPPORT
6241 /** MrvlIEtypes_auth_type_t */
6242 typedef MLAN_PACK_START struct _MrvlIEtypes_auth_type_t
6243 {
6244     /** Header */
6245     MrvlIEtypesHeader_t header;
6246     /** Authentication type */
6247     t_u8 auth_type;
6248     /** PWE derivation */
6249     t_u8 PWE_derivation;
6250     /** transition disable */
6251     t_u8 transition_disable;
6252 } MLAN_PACK_END MrvlIEtypes_auth_type_t;
6253 
6254 /** MrvlIEtypes_encrypt_protocol_t */
6255 typedef MLAN_PACK_START struct _MrvlIEtypes_encrypt_protocol_t
6256 {
6257     /** Header */
6258     MrvlIEtypesHeader_t header;
6259     /** encryption protocol */
6260     t_u16 protocol;
6261 } MLAN_PACK_END MrvlIEtypes_encrypt_protocol_t;
6262 
6263 /** MrvlIEtypes_pwk_cipher_t */
6264 typedef MLAN_PACK_START struct _MrvlIEtypes_pwk_cipher_t
6265 {
6266     /** Header */
6267     MrvlIEtypesHeader_t header;
6268     /** protocol */
6269     t_u16 protocol;
6270     /** pairwise cipher */
6271     t_u8 pairwise_cipher;
6272     /** reserved */
6273     t_u8 reserved;
6274 } MLAN_PACK_END MrvlIEtypes_pwk_cipher_t;
6275 
6276 /** MrvlIEtypes_gwk_cipher_t */
6277 typedef MLAN_PACK_START struct _MrvlIEtypes_gwk_cipher_t
6278 {
6279     /** Header */
6280     MrvlIEtypesHeader_t header;
6281     /** group cipher */
6282     t_u8 group_cipher;
6283     /** reserved */
6284     t_u8 reserved;
6285 } MLAN_PACK_END MrvlIEtypes_gwk_cipher_t;
6286 
6287 /** MrvlIEtypes_akmp_t */
6288 typedef MLAN_PACK_START struct _MrvlIEtypes_akmp_t
6289 {
6290     /** Header */
6291     MrvlIEtypesHeader_t header;
6292     /** key management */
6293     t_u16 key_mgmt;
6294     /** key management operation */
6295     t_u16 key_mgmt_operation;
6296 } MLAN_PACK_END MrvlIEtypes_akmp_t;
6297 
6298 /** MrvlIEtypes_passphrase_t */
6299 typedef MLAN_PACK_START struct _MrvlIEtypes_passphrase_t
6300 {
6301     /** Header */
6302     MrvlIEtypesHeader_t header;
6303     /** passphrase */
6304     t_u8 passphrase[1];
6305 } MLAN_PACK_END MrvlIEtypes_passphrase_t;
6306 
6307 /** MrvlIEtypes_passphrase_t */
6308 typedef MLAN_PACK_START struct _MrvlIEtypes_password_t
6309 {
6310     /** Header */
6311     MrvlIEtypesHeader_t header;
6312     /** passphrase */
6313     t_u8 password[1];
6314 } MLAN_PACK_END MrvlIEtypes_password_t;
6315 
6316 /** MrvlIEtypes_rsn_replay_prot_t */
6317 typedef MLAN_PACK_START struct _MrvlIEtypes_rsn_replay_prot_t
6318 {
6319     /** Header */
6320     MrvlIEtypesHeader_t header;
6321     /** rsn replay proection */
6322     t_u8 rsn_replay_prot;
6323 } MLAN_PACK_END MrvlIEtypes_rsn_replay_prot_t;
6324 
6325 /** MrvlIEtypes_group_rekey_time_t */
6326 typedef MLAN_PACK_START struct _MrvlIEtypes_group_rekey_time_t
6327 {
6328     /** Header */
6329     MrvlIEtypesHeader_t header;
6330     /** group key rekey time */
6331     t_u32 gk_rekey_time;
6332 } MLAN_PACK_END MrvlIEtypes_group_rekey_time_t;
6333 
6334 /** MrvlIEtypes_wep_key_t */
6335 typedef MLAN_PACK_START struct _MrvlIEtypes_wep_key_t
6336 {
6337     /** Header */
6338     MrvlIEtypesHeader_t header;
6339     /** key index */
6340     t_u8 key_index;
6341     /** is default */
6342     t_u8 is_default;
6343     /** key data */
6344     t_u8 key[1];
6345 } MLAN_PACK_END MrvlIEtypes_wep_key_t;
6346 
6347 /** MrvlIEtypes_bss_status_t */
6348 typedef MLAN_PACK_START struct _MrvlIEtypes_bss_status_t
6349 {
6350     /** Header */
6351     MrvlIEtypesHeader_t header;
6352     /** BSS status, READ only */
6353     t_u16 bss_status;
6354 } MLAN_PACK_END MrvlIEtypes_bss_status_t;
6355 
6356 /** MrvlIEtypes_preamble_t */
6357 typedef MLAN_PACK_START struct _MrvlIEtypes_preamble_t
6358 {
6359     /** Header */
6360     MrvlIEtypesHeader_t header;
6361     /** preamble type, READ only */
6362     t_u8 preamble_type;
6363 } MLAN_PACK_END MrvlIEtypes_preamble_t;
6364 
6365 /** MrvlIEtypes_wmm_parameter_t */
6366 typedef MLAN_PACK_START struct _MrvlIEtypes_wmm_parameter_t
6367 {
6368     /** Header */
6369     MrvlIEtypesHeader_t header;
6370     /** WMM parameter */
6371     WmmParameter_t wmm_para;
6372 } MLAN_PACK_END MrvlIEtypes_wmm_parameter_t;
6373 
6374 /** SNMP_MIB_UAP_INDEX */
6375 typedef enum _SNMP_MIB_UAP_INDEX
6376 {
6377     tkip_mic_failures             = 0x0b,
6378     ccmp_decrypt_errors           = 0x0c,
6379     wep_undecryptable_count       = 0x0d,
6380     wep_icv_error_count           = 0x0e,
6381     decrypt_failure_count         = 0xf,
6382     dot11_failed_count            = 0x12,
6383     dot11_retry_count             = 0x13,
6384     dot11_multi_retry_count       = 0x14,
6385     dot11_frame_dup_count         = 0x15,
6386     dot11_rts_success_count       = 0x16,
6387     dot11_rts_failure_count       = 0x17,
6388     dot11_ack_failure_count       = 0x18,
6389     dot11_rx_fragment_count       = 0x19,
6390     dot11_mcast_rx_frame_count    = 0x1a,
6391     dot11_fcs_error_count         = 0x1b,
6392     dot11_tx_frame_count          = 0x1c,
6393     dot11_rsna_tkip_cm_invoked    = 0x1d,
6394     dot11_rsna_4way_hshk_failures = 0x1e,
6395     dot11_mcast_tx_count          = 0x1f,
6396 } SNMP_MIB_UAP_INDEX;
6397 
6398 /** MrvlIEtypes_snmp_oid_t */
6399 typedef MLAN_PACK_START struct _MrvlIEtypes_snmp_oid_t
6400 {
6401     /** Header */
6402     MrvlIEtypesHeader_t header;
6403     /** data */
6404     t_u32 data;
6405 } MLAN_PACK_END MrvlIEtypes_snmp_oid_t;
6406 
6407 /** HostCmd_SYS_CONFIG */
6408 typedef MLAN_PACK_START struct _HostCmd_DS_SYS_CONFIG
6409 {
6410     /** CMD Action GET/SET*/
6411     t_u16 action;
6412     /** Tlv buffer */
6413     t_u8 tlv_buffer[1];
6414 } MLAN_PACK_END HostCmd_DS_SYS_CONFIG;
6415 
6416 #ifdef SD8801
6417 /** HostCmd_ACS_CONFIG */
6418 typedef MLAN_PACK_START struct _HostCmd_DS_ACS_CONFIG
6419 {
6420     /** channel */
6421     t_u8 chan;
6422     /** Tlv buffer */
6423     t_u8 tlv_buffer[1];
6424 } MLAN_PACK_END HostCmd_DS_ACS_CONFIG;
6425 #endif
6426 
6427 /** HostCmd_SYS_CONFIG */
6428 typedef MLAN_PACK_START struct _HostCmd_DS_SYS_INFO
6429 {
6430     /** sys info */
6431     t_u8 sys_info[64];
6432 } MLAN_PACK_END HostCmd_DS_SYS_INFO;
6433 
6434 /** HostCmd_DS_STA_DEAUTH */
6435 typedef MLAN_PACK_START struct _HostCmd_DS_STA_DEAUTH
6436 {
6437     /** mac address */
6438     t_u8 mac[MLAN_MAC_ADDR_LENGTH];
6439     /** reason code */
6440     t_u16 reason;
6441 } MLAN_PACK_END HostCmd_DS_STA_DEAUTH;
6442 
6443 /** HostCmd_DS_REPORT_MIC */
6444 typedef MLAN_PACK_START struct _HostCmd_DS_REPORT_MIC
6445 {
6446     /** mac address */
6447     t_u8 mac[MLAN_MAC_ADDR_LENGTH];
6448 } MLAN_PACK_END HostCmd_DS_REPORT_MIC;
6449 
6450 /** HostCmd_PMF_CONFIG */
6451 typedef MLAN_PACK_START struct _HostCmd_DS_PMF_PARAMS
6452 {
6453     /** CMD Action GET/SET*/
6454     t_u16 action;
6455     /** Params */
6456     MLAN_PACK_START struct
6457     {
6458         t_u8 mfpc : 1; /* capable bit */
6459         t_u8 mfpr : 1; /* required bit */
6460         t_u8 rsvd : 6;
6461     } MLAN_PACK_END params;
6462 } MLAN_PACK_END HostCmd_DS_PMF_PARAMS;
6463 
6464 /** Host Command id: POWER_MGMT  */
6465 #define HOST_CMD_POWER_MGMT_EXT 0x00ef
6466 /** TLV type: AP Sleep param */
6467 #define TLV_TYPE_AP_SLEEP_PARAM (PROPRIETARY_TLV_BASE_ID + 0x6aU) // 0x016a
6468 /** TLV type: AP Inactivity Sleep param */
6469 #define TLV_TYPE_AP_INACT_SLEEP_PARAM (PROPRIETARY_TLV_BASE_ID + 0x6bU) // 0x016b
6470 
6471 /** MrvlIEtypes_sleep_param_t */
6472 typedef MLAN_PACK_START struct _MrvlIEtypes_sleep_param_t
6473 {
6474     /** Header */
6475     MrvlIEtypesHeader_t header;
6476     /** control bitmap */
6477     t_u32 ctrl_bitmap;
6478     /** min_sleep */
6479     t_u32 min_sleep;
6480     /** max_sleep */
6481     t_u32 max_sleep;
6482 } MLAN_PACK_END MrvlIEtypes_sleep_param_t;
6483 
6484 /** MrvlIEtypes_inact_sleep_param_t */
6485 typedef MLAN_PACK_START struct _MrvlIEtypes_inact_sleep_param_t
6486 {
6487     /** Header */
6488     MrvlIEtypesHeader_t header;
6489     /** inactivity timeout */
6490     t_u32 inactivity_to;
6491 
6492     /** min_awake */
6493     t_u32 min_awake;
6494     /** max_awake */
6495     t_u32 max_awake;
6496 } MLAN_PACK_END MrvlIEtypes_inact_sleep_param_t;
6497 
6498 /** HostCmd_DS_POWER_MGMT */
6499 typedef MLAN_PACK_START struct _HostCmd_DS_POWER_MGMT_EXT
6500 {
6501     /** CMD Action Get/Set*/
6502     t_u16 action;
6503     /** power mode */
6504     t_u16 power_mode;
6505 } MLAN_PACK_END HostCmd_DS_POWER_MGMT_EXT;
6506 
6507 /** MrvlIEtypes_ps_sta_ageout_t */
6508 typedef MLAN_PACK_START struct _MrvlIEtypes_ps_sta_ageout_t
6509 {
6510     /** Header */
6511     MrvlIEtypesHeader_t header;
6512     /** station age out timer */
6513     t_u32 ps_sta_ageout_timer;
6514 } MLAN_PACK_END MrvlIEtypes_ps_sta_ageout_t;
6515 
6516 /** MrvlIEtypes_sta_info_t */
6517 typedef MLAN_PACK_START struct _MrvlIEtypes_sta_info_t
6518 {
6519     /** Header */
6520     MrvlIEtypesHeader_t header;
6521     /** STA MAC address */
6522     t_u8 mac_address[MLAN_MAC_ADDR_LENGTH];
6523     /** Power mfg status */
6524     t_u8 power_mfg_status;
6525     /** RSSI */
6526     t_s8 rssi;
6527 } MLAN_PACK_END MrvlIEtypes_sta_info_t;
6528 
6529 /** HostCmd_DS_STA_LIST */
6530 typedef MLAN_PACK_START struct _HostCmd_DS_STA_LIST
6531 {
6532     /** Number of STAs */
6533     t_u16 sta_count;
6534     /* MrvlIEtypes_sta_info_t sta_info[0]; */
6535 } MLAN_PACK_END HostCmd_DS_STA_LIST;
6536 
6537 /** TLV ID : WAPI Information */
6538 #define TLV_TYPE_AP_WAPI_INFO (PROPRIETARY_TLV_BASE_ID + 0x67) // 0x0167
6539 
6540 /** MrvlIEtypes_sta_info_t */
6541 typedef MLAN_PACK_START struct _MrvlIEtypes_wapi_info_t
6542 {
6543     /** Header */
6544     MrvlIEtypesHeader_t header;
6545     /** Multicast PN */
6546     t_u8 multicast_PN[16];
6547 } MLAN_PACK_END MrvlIEtypes_wapi_info_t;
6548 #endif /* UAP_SUPPORT */
6549 
6550 #ifdef WLAN_LOW_POWER_ENABLE
6551 /** HostCmd_CONFIG_LOW_PWR_MODE */
6552 typedef MLAN_PACK_START struct _HostCmd_CONFIG_LOW_PWR_MODE
6553 {
6554     /** Enable LPM */
6555     t_u8 enable;
6556 } MLAN_PACK_END HostCmd_CONFIG_LOW_PWR_MODE;
6557 #endif /* WLAN_LOW_POWER_ENABLE */
6558 
6559 /** HostCmd_CMD_GET_TSF */
6560 typedef MLAN_PACK_START struct _HostCmd_DS_TSF
6561 {
6562     /** tsf value*/
6563     t_u64 tsf;
6564 } MLAN_PACK_END HostCmd_DS_TSF;
6565 /* WLAN_GET_TSF*/
6566 
6567 /** HostCmd_CMD_TBTT_OFFSET */
6568 typedef MLAN_PACK_START struct _HostCmd_DS_TBTT_OFFSET
6569 {
6570     /** Action */
6571     t_u16 action;
6572     /** Min TBTT offset */
6573     t_u32 min_tbtt_offset;
6574     /** Max TBTT offset */
6575     t_u32 max_tbtt_offset;
6576     /** Avg TBTT offset */
6577     t_u32 avg_tbtt_offset;
6578 } MLAN_PACK_END HostCmd_DS_TBTT_OFFSET;
6579 
6580 /** HostCmd_CONFIG_ED_MAC_MODE */
6581 typedef MLAN_PACK_START struct _HostCmd_CONFIG_ED_MAC_MODE
6582 {
6583     /** Enable/Disable ED CTRL 2G */
6584     t_u16 ed_ctrl_2g;
6585     /** Offset of default threshold */
6586     t_s16 ed_offset_2g;
6587 #if CONFIG_5GHz_SUPPORT
6588     /** Enable/Disable ED MAC mode */
6589     t_u16 ed_ctrl_5g;
6590     /** Offset of default threshold */
6591     t_s16 ed_offset_5g;
6592     /** Enable/Disable ED MAC mode */
6593     t_u32 ed_bitmap_txq_lock;
6594 #endif
6595 } MLAN_PACK_END HostCmd_CONFIG_ED_MAC_MODE;
6596 
6597 #if CONFIG_ECSA
6598 #define MRVL_ACTION_CHAN_SWITCH_ANNOUNCE (PROPRIETARY_TLV_BASE_ID + 0x341)
6599 
6600 /** MrvlIEtypes_uap_chan_switch */
6601 typedef MLAN_PACK_START struct _MrvlIEtypes_action_chan_switch_t
6602 {
6603     /** Header */
6604     MrvlIEtypesHeader_t header;
6605     /* 0 send broadcast CSA action frame, 1 send unicast CSA action frame */
6606     t_u32 mode;
6607     /**ie buf*/
6608     t_u8 ie_buf[];
6609 } MLAN_PACK_END MrvlIEtypes_action_chan_switch_t;
6610 #endif
6611 
6612 #if CONFIG_RF_TEST_MODE
6613 
6614 #define MFG_CMD_SET_TEST_MODE        1
6615 #define MFG_CMD_UNSET_TEST_MODE      0
6616 #define MFG_CMD_TX_ANT               0x1004
6617 #define MFG_CMD_RX_ANT               0x1005
6618 #define MFG_CMD_TX_CONT              0x1009
6619 #define MFG_CMD_RF_CHAN              0x100A
6620 #define MFG_CMD_CLR_RX_ERR           0x1010
6621 #define MFG_CMD_TX_FRAME             0x1021
6622 #define MFG_CMD_RFPWR                0x1033
6623 #define MFG_CMD_RF_BAND_AG           0x1034
6624 #define MFG_CMD_RF_CHANNELBW         0x1044
6625 #define MFG_CMD_RADIO_MODE_CFG       0x1211
6626 #define MFG_CMD_CONFIG_MAC_HE_TB_TX  0x110A
6627 #define MFG_CMD_CONFIG_TRIGGER_FRAME 0x110C
6628 #define MFG_CMD_OTP_MAC_ADD          0x108C
6629 #define MFG_CMD_OTP_CAL_DATA         0x121A
6630 
6631 typedef MLAN_PACK_START struct _HostCmd_DS_MFG_CMD_GENERIC_CFG
6632 {
6633     /** MFG command code */
6634     t_u32 mfg_cmd;
6635     /** Action */
6636     t_u16 action;
6637     /** Device ID */
6638     t_u16 device_id;
6639     /** MFG Error code */
6640     t_u32 error;
6641     /** value 1 */
6642     t_u32 data1;
6643     /** value 2 */
6644     t_u32 data2;
6645     /** value 3 */
6646     t_u32 data3;
6647 } MLAN_PACK_END HostCmd_DS_MFG_CMD_GENERIC_CFG;
6648 
6649 typedef MLAN_PACK_START struct _HostCmd_DS_MFG_CMD_TX_FRAME2
6650 {
6651     /** MFG command code */
6652     t_u32 mfg_cmd;
6653     /** Action */
6654     t_u16 action;
6655     /** Device ID */
6656     t_u16 device_id;
6657     /** MFG Error code */
6658     t_u32 error;
6659     /** enable */
6660     t_u32 enable;
6661     /** data_rate */
6662     t_u32 data_rate;
6663     /** frame pattern */
6664     t_u32 frame_pattern;
6665     /** frame length */
6666     t_u32 frame_length;
6667     /** BSSID */
6668     t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
6669     /** Adjust burst sifs */
6670     t_u16 adjust_burst_sifs;
6671     /** Burst sifs in us*/
6672     t_u32 burst_sifs_in_us;
6673     /** short preamble */
6674     t_u32 short_preamble;
6675     /** active sub channel */
6676     t_u32 act_sub_ch;
6677     /** short GI */
6678     t_u32 short_gi;
6679     /** Adv coding */
6680     t_u32 adv_coding;
6681     /** Tx beamforming */
6682     t_u32 tx_bf;
6683     /** HT Greenfield Mode*/
6684     t_u32 gf_mode;
6685     /** STBC */
6686     t_u32 stbc;
6687     /** power id */
6688     t_u32 rsvd[2];
6689 } MLAN_PACK_END HostCmd_DS_MFG_CMD_TX_FRAME2;
6690 
6691 typedef MLAN_PACK_START struct _HostCmd_DS_MFG_CMD_TX_CONT
6692 {
6693     /** MFG command code */
6694     t_u32 mfg_cmd;
6695     /** Action */
6696     t_u16 action;
6697     /** Device ID */
6698     t_u16 device_id;
6699     /** MFG Error code */
6700     t_u32 error;
6701     /** enable Tx*/
6702     t_u32 enable_tx;
6703     /** Continuous Wave mode */
6704     t_u32 cw_mode;
6705     /** payload pattern */
6706     t_u32 payload_pattern;
6707     /** CS Mode */
6708     t_u32 cs_mode;
6709     /** active sub channel */
6710     t_u32 act_sub_ch;
6711     /** Tx rate */
6712     t_u32 tx_rate;
6713     /** power id */
6714     t_u32 rsvd;
6715 } MLAN_PACK_END HostCmd_DS_MFG_CMD_TX_CONT;
6716 
6717 typedef MLAN_PACK_START struct _HostCmd_DS_MFG_CMD_HE_TBTX_T
6718 {
6719     /** MFG command code */
6720     t_u32 mfg_cmd;
6721     /** Action */
6722     t_u16 action;
6723     /** Device ID */
6724     t_u16 device_id;
6725     /** MFG Error code */
6726     t_u32 error;
6727     /** Enable Tx */
6728     t_u16 enable;
6729     /** Q num */
6730     t_u16 qnum;
6731     /** AID */
6732     t_u16 aid;
6733     /** AXQ Mu Timer */
6734     t_u16 axq_mu_timer;
6735     /** Tx Power */
6736     t_s16 tx_power;
6737 } MLAN_PACK_END HostCmd_DS_MFG_CMD_HE_TBTX_T;
6738 
6739 typedef MLAN_PACK_START struct _HostCmd_MFG_CMD_IEEETYPES_CTLBASICTRIGHDR_T
6740 {
6741     /** MFG command code */
6742     t_u32 mfg_cmd;
6743     /** Action */
6744     t_u16 action;
6745     /** Device ID */
6746     t_u16 device_id;
6747     /** MFG Error code */
6748     t_u32 error;
6749     /** enable Tx*/
6750     t_u32 enable_tx;
6751     /** enable Stand Alone HE TB */
6752     t_u32 standalone_hetb;
6753     /** Frame Control */
6754     mfg_cmd_IEEEtypes_FrameCtrl_t frmCtl;
6755     /** Duration */
6756     t_u16 duration;
6757     /** Destination MAC Address */
6758     t_u8 dest_addr[MLAN_MAC_ADDR_LENGTH];
6759     /** Source MAC Address */
6760     t_u8 src_addr[MLAN_MAC_ADDR_LENGTH];
6761     /** Common Info Field **/
6762     mfg_cmd_IEEEtypes_HETrigComInfo_t trig_common_field;
6763     /** User Info Field **/
6764     mfg_cmd_IEEEtypes_HETrigUserInfo_t trig_user_info_field;
6765     /** Trigger Dependent User Info Field **/
6766     mfg_cmd_IEEETypes_BasicHETrigUserInfo_t basic_trig_user_info;
6767 } MLAN_PACK_END HostCmd_MFG_CMD_IEEETYPES_CTLBASICTRIGHDR_T;
6768 
6769 typedef MLAN_PACK_START struct _HostCmd_DS_MFG_CMD_OTP_MAC_ADD_T
6770 {
6771     /** MFG command code */
6772     t_u32 mfg_cmd;
6773     /** Action */
6774     t_u16 action;
6775     /** Device ID */
6776     t_u16 device_id;
6777     /** MFG Error code */
6778     t_u32 error;
6779     /** Destination MAC Address */
6780     t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH];
6781 } MLAN_PACK_END HostCmd_DS_MFG_CMD_OTP_MAC_ADD_T;
6782 
6783 #define CAL_DATA_LEN 2800
6784 typedef MLAN_PACK_START struct _HostCmd_DS_MFG_CMD_OTP_CAL_DATA_T
6785 {
6786     /** MFG command code */
6787     t_u32 mfg_cmd;
6788     /** Action */
6789     t_u16 action;
6790     /** Device ID */
6791     t_u16 device_id;
6792     /** MFG Error code */
6793     t_u32 error;
6794     /** CAL Data write status */
6795     t_u32 cal_data_status;
6796     /** CAL Data Length*/
6797     t_u32 cal_data_len;
6798     /** Destination MAC Address */
6799     t_u8 cal_data[CAL_DATA_LEN];
6800 } MLAN_PACK_END HostCmd_DS_MFG_CMD_OTP_CAL_DATA_T;
6801 #endif
6802 
6803 #ifdef OTP_CHANINFO
6804 #define TLV_TYPE_CHAN_ATTR_CFG    (PROPRIETARY_TLV_BASE_ID + 237U)
6805 #define TLV_TYPE_REGION_INFO      (PROPRIETARY_TLV_BASE_ID + 238U)
6806 #define TLV_TYPE_POWER_TABLE      (PROPRIETARY_TLV_BASE_ID + 262U)
6807 #define TLV_TYPE_POWER_TABLE_ATTR (PROPRIETARY_TLV_BASE_ID + 317U)
6808 /** HostCmd_DS_CHAN_REGION_CFG */
6809 typedef MLAN_PACK_START struct _HostCmd_DS_CHAN_REGION_CFG
6810 {
6811     /** Action */
6812     t_u16 action;
6813 } MLAN_PACK_END HostCmd_DS_CHAN_REGION_CFG;
6814 #endif
6815 
6816 /**
6817  * @brief 802.11h Local Power Constraint NXP extended TLV
6818  */
6819 typedef MLAN_PACK_START struct
6820 {
6821     MrvlIEtypesHeader_t header; /**< NXP TLV header: ID/Len */
6822     t_u8 chan;                  /**< Channel local constraint applies to */
6823 
6824     /** Power constraint included in beacons and used by fw to offset 11d info */
6825     t_u8 constraint;
6826 
6827 } MLAN_PACK_END MrvlIEtypes_LocalPowerConstraint_t;
6828 
6829 /*
6830  *
6831  * Data structures for driver/firmware command processing
6832  *
6833  */
6834 
6835 /**  TPC Info structure sent in CMD_802_11_TPC_INFO command to firmware */
6836 typedef MLAN_PACK_START struct
6837 {
6838     MrvlIEtypes_LocalPowerConstraint_t local_constraint; /**< Local constraint */
6839     MrvlIEtypes_PowerCapability_t power_cap;             /**< Power Capability */
6840 
6841 } MLAN_PACK_END HostCmd_DS_802_11_TPC_INFO;
6842 
6843 /**  TPC Request structure sent in CMD_802_11_TPC_ADAPT_REQ command to firmware */
6844 typedef MLAN_PACK_START struct
6845 {
6846     t_u8 dest_mac[MLAN_MAC_ADDR_LENGTH]; /**< Destination STA address  */
6847     t_u16 timeout;                       /**< Response timeout in ms */
6848     t_u8 rate_index;                     /**< IEEE Rate index to send request */
6849 
6850 } MLAN_PACK_END HostCmd_TpcRequest;
6851 
6852 /**  TPC Response structure received from the CMD_802_11_TPC_ADAPT_REQ command */
6853 typedef MLAN_PACK_START struct
6854 {
6855     t_u8 tpc_ret_code; /**< Firmware command result status code */
6856     t_s8 tx_power;     /**< Reported TX Power from the TPC Report element */
6857     t_s8 link_margin;  /**< Reported link margin from the TPC Report element */
6858     t_s8 rssi;         /**< RSSI of the received TPC Report frame */
6859 
6860 } MLAN_PACK_END HostCmd_TpcResponse;
6861 
6862 /**  CMD_802_11_TPC_ADAPT_REQ substruct. Union of the TPC request and response */
6863 typedef MLAN_PACK_START union
6864 {
6865     HostCmd_TpcRequest req;   /**< Request struct sent to firmware */
6866     HostCmd_TpcResponse resp; /**< Response struct received from firmware */
6867 
6868 } MLAN_PACK_END HostCmd_DS_802_11_TPC_ADAPT_REQ;
6869 
6870 /**  CMD_802_11_CHAN_SW_ANN firmware command substructure */
6871 typedef MLAN_PACK_START struct
6872 {
6873     t_u8 switch_mode;  /**< Set to 1 for a quiet switch request, no STA tx */
6874     t_u8 new_chan;     /**< Requested new channel */
6875     t_u8 switch_count; /**< Number of TBTTs until the switch is to occur */
6876 } MLAN_PACK_END HostCmd_DS_802_11_CHAN_SW_ANN;
6877 
6878 /**
6879  * @brief Enumeration of measurement types, including max supported
6880  *        enum for 11h/11k
6881  */
6882 typedef MLAN_PACK_START enum _MeasType_t {
6883     WLAN_MEAS_BASIC = 0,                      /**< 11h: Basic */
6884     WLAN_MEAS_NUM_TYPES,                      /**< Number of enumerated measurements */
6885     WLAN_MEAS_11H_MAX_TYPE = WLAN_MEAS_BASIC, /**< Max 11h measurement */
6886 
6887 } MLAN_PACK_END MeasType_t;
6888 
6889 /**
6890  * @brief Mode octet of the measurement request element (7.3.2.21)
6891  */
6892 typedef MLAN_PACK_START struct
6893 {
6894 #ifdef BIG_ENDIAN_SUPPORT
6895     t_u8 rsvd5_7 : 3;            /**< Reserved */
6896     t_u8 duration_mandatory : 1; /**< 11k: duration spec. for meas. is mandatory */
6897     t_u8 report : 1;             /**< 11h: en/disable report rcpt. of spec. type */
6898     t_u8 request : 1;            /**< 11h: en/disable requests of specified type */
6899     t_u8 enable : 1;             /**< 11h: enable report/request bits */
6900     t_u8 parallel : 1;           /**< 11k: series or parallel with previous meas */
6901 #else
6902     t_u8 parallel : 1;           /**< 11k: series or parallel with previous meas */
6903     t_u8 enable : 1;             /**< 11h: enable report/request bits */
6904     t_u8 request : 1;            /**< 11h: en/disable requests of specified type */
6905     t_u8 report : 1;             /**< 11h: en/disable report rcpt. of spec. type */
6906     t_u8 duration_mandatory : 1; /**< 11k: duration spec. for meas. is mandatory */
6907     t_u8 rsvd5_7 : 3;            /**< Reserved */
6908 #endif                           /* BIG_ENDIAN_SUPPORT */
6909 
6910 } MLAN_PACK_END MeasReqMode_t;
6911 
6912 /**
6913  * @brief Common measurement request structure (7.3.2.21.1 to 7.3.2.21.3)
6914  */
6915 typedef MLAN_PACK_START struct
6916 {
6917     t_u8 channel;     /**< Channel to measure */
6918     t_u64 start_time; /**< TSF Start time of measurement (0 for immediate) */
6919     t_u16 duration;   /**< TU duration of the measurement */
6920 
6921 } MLAN_PACK_END MeasReqCommonFormat_t;
6922 
6923 /**
6924  * @brief Basic measurement request structure (7.3.2.21.1)
6925  */
6926 typedef MeasReqCommonFormat_t MeasReqBasic_t;
6927 
6928 /**
6929  * @brief CCA measurement request structure (7.3.2.21.2)
6930  */
6931 typedef MeasReqCommonFormat_t MeasReqCCA_t;
6932 
6933 /**
6934  * @brief RPI measurement request structure (7.3.2.21.3)
6935  */
6936 typedef MeasReqCommonFormat_t MeasReqRPI_t;
6937 
6938 /**
6939  * @brief Union of the availble measurement request types.  Passed in the
6940  *        driver/firmware interface.
6941  */
6942 typedef union
6943 {
6944     MeasReqBasic_t basic; /**< Basic measurement request */
6945     MeasReqCCA_t cca;     /**< CCA measurement request */
6946     MeasReqRPI_t rpi;     /**< RPI measurement request */
6947 
6948 } MeasRequest_t;
6949 
6950 /**
6951  * @brief Mode octet of the measurement report element (7.3.2.22)
6952  */
6953 typedef MLAN_PACK_START struct
6954 {
6955 #ifdef BIG_ENDIAN_SUPPORT
6956     t_u8 rsvd3_7 : 5;   /**< Reserved */
6957     t_u8 refused : 1;   /**< Measurement refused */
6958     t_u8 incapable : 1; /**< Incapable of performing measurement */
6959     t_u8 late : 1;      /**< Start TSF time missed for measurement */
6960 #else
6961     t_u8 late : 1;               /**< Start TSF time missed for measurement */
6962     t_u8 incapable : 1;          /**< Incapable of performing measurement */
6963     t_u8 refused : 1;            /**< Measurement refused */
6964     t_u8 rsvd3_7 : 5;            /**< Reserved */
6965 #endif                  /* BIG_ENDIAN_SUPPORT */
6966 
6967 } MLAN_PACK_END MeasRptMode_t;
6968 
6969 /**
6970  * @brief Basic measurement report (7.3.2.22.1)
6971  */
6972 typedef MLAN_PACK_START struct
6973 {
6974     t_u8 channel;          /**< Channel to measured */
6975     t_u64 start_time;      /**< Start time (TSF) of measurement */
6976     t_u16 duration;        /**< Duration of measurement in TUs */
6977     MeasRptBasicMap_t map; /**< Basic measurement report */
6978 
6979 } MLAN_PACK_END MeasRptBasic_t;
6980 
6981 /**
6982  * @brief CCA measurement report (7.3.2.22.2)
6983  */
6984 typedef MLAN_PACK_START struct
6985 {
6986     t_u8 channel;       /**< Channel to measured */
6987     t_u64 start_time;   /**< Start time (TSF) of measurement */
6988     t_u16 duration;     /**< Duration of measurement in TUs  */
6989     t_u8 busy_fraction; /**< Fractional duration CCA indicated chan busy */
6990 
6991 } MLAN_PACK_END MeasRptCCA_t;
6992 
6993 /**
6994  * @brief RPI measurement report (7.3.2.22.3)
6995  */
6996 typedef MLAN_PACK_START struct
6997 {
6998     t_u8 channel;     /**< Channel to measured  */
6999     t_u64 start_time; /**< Start time (TSF) of measurement */
7000     t_u16 duration;   /**< Duration of measurement in TUs  */
7001     t_u8 density[8];  /**< RPI Density histogram report */
7002 
7003 } MLAN_PACK_END MeasRptRPI_t;
7004 
7005 /**
7006  * @brief Union of the availble measurement report types.  Passed in the
7007  *        driver/firmware interface.
7008  */
7009 typedef union
7010 {
7011     MeasRptBasic_t basic; /**< Basic measurement report */
7012     MeasRptCCA_t cca;     /**< CCA measurement report */
7013     MeasRptRPI_t rpi;     /**< RPI measurement report */
7014 
7015 } MeasReport_t;
7016 
7017 /**
7018  * @brief Structure passed to firmware to perform a measurement
7019  */
7020 typedef MLAN_PACK_START struct
7021 {
7022     t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH]; /**< Reporting STA address */
7023     t_u8 dialog_token;                   /**< Measurement dialog toke */
7024     MeasReqMode_t req_mode;              /**< Report mode  */
7025     MeasType_t meas_type;                /**< Measurement type */
7026     MeasRequest_t req;                   /**< Measurement request data */
7027 
7028 } MLAN_PACK_END HostCmd_DS_MEASUREMENT_REQUEST;
7029 
7030 /**
7031  * @brief Structure passed back from firmware with a measurement report,
7032  *        also can be to send a measurement report to another STA
7033  */
7034 typedef MLAN_PACK_START struct
7035 {
7036     t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH]; /**< Reporting STA address */
7037     t_u8 dialog_token;                   /**< Measurement dialog token */
7038     MeasRptMode_t rpt_mode;              /**< Report mode */
7039     MeasType_t meas_type;                /**< Measurement type */
7040     MeasReport_t rpt;                    /**< Measurement report data */
7041 
7042 } MLAN_PACK_END HostCmd_DS_MEASUREMENT_REPORT;
7043 
7044 typedef MLAN_PACK_START struct
7045 {
7046     t_u16 startFreq;
7047     t_u8 chanWidth;
7048     t_u8 chanNum;
7049 
7050 } MLAN_PACK_END MrvlChannelDesc_t;
7051 
7052 typedef MLAN_PACK_START struct
7053 {
7054     t_u8 modGroup;
7055     t_u8 txPower;
7056 
7057 } MLAN_PACK_END MrvlChanTrpcEntry_t;
7058 
7059 typedef MLAN_PACK_START struct
7060 {
7061     MrvlIEtypesHeader_t header; /**< Header */
7062 
7063     MrvlChannelDesc_t chanDesc;
7064     MrvlChanTrpcEntry_t chanTrpcEntry[10];
7065 
7066 } MLAN_PACK_END MrvlIEtypes_ChanTrpcCfg_t;
7067 
7068 typedef MLAN_PACK_START struct
7069 {
7070     MrvlIEtypes_ChanTrpcCfg_t ChanTrpc[26];
7071 
7072 } MLAN_PACK_END MrvlIEtypes_ChanTrpc_t;
7073 
7074 typedef MLAN_PACK_START struct
7075 {
7076     t_u16 action;
7077     t_u16 reserved;
7078     // MrvlIEtypes_ChanTrpc_t ChanTrpcG;
7079     t_u8 tlv_buffer[1]; /** MrvlIEtypes_ChanTrpcCfg_t TLVs */
7080 } MLAN_PACK_END HostCmd_DS_CHAN_TRPC_CONFIG;
7081 
7082 typedef MLAN_PACK_START struct
7083 {
7084     MrvlIEtypesHeader_t Header; /**< Header */
7085 
7086     MeasRptBasicMap_t map;      /**< IEEE 802.11h basic meas report */
7087 } MLAN_PACK_END MrvlIEtypes_ChanRpt11hBasic_t;
7088 
7089 typedef MLAN_PACK_START struct
7090 {
7091     MrvlChannelDesc_t chan_desc; /**< Channel band, number */
7092     t_u32 millisec_dwell_time;   /**< Channel dwell time in milliseconds */
7093 } MLAN_PACK_END HostCmd_DS_CHAN_RPT_REQ;
7094 
7095 typedef MLAN_PACK_START struct
7096 {
7097     t_u32 cmd_result;   /**< Rpt request command result (0 == SUCCESS) */
7098     t_u64 start_tsf;    /**< TSF Measurement started */
7099     t_u32 duration;     /**< Duration of measurement in microsecs */
7100     t_u8 tlv_buffer[1]; /**< TLV Buffer */
7101 } MLAN_PACK_END HostCmd_DS_CHAN_RPT_RSP;
7102 
7103 #if CONFIG_WIFI_EU_CRYPTO
7104 typedef MLAN_PACK_START struct
7105 {
7106     /* EncDec: 0-Decrypt, 1-Encrypt */
7107     t_u16 EncDec;
7108     /* Algorithm: 1-RC4, 2-AES, 3-AES_KEY_WRAP,4-AES-CCM */
7109     t_u16 Algorithm;
7110     /* KeyLength: Length of Key (bytes) */
7111     t_u16 KeyLength;
7112     /* Key: Key */
7113     t_u8 Key[32];
7114     /* NonceLength: Length of Nonce (bytes) */
7115     t_u16 NonceLength;
7116     /* Nonce: Nonce */
7117     t_u8 Nonce[14];
7118     /* AADLength: Length of AAD (bytes) */
7119     t_u16 AADLength;
7120     /* AAD: AAD */
7121     t_u8 AAD[32];
7122     /* DataType: DataType */
7123     t_u16 DataType;
7124     /* DataLength: Data Length */
7125     t_u16 DataLength;
7126     /* Data: Data */
7127     t_u8 Data[1];
7128 } MLAN_PACK_END HostCmd_DS_EU_AES_CRYPTO;
7129 
7130 typedef MLAN_PACK_START struct
7131 {
7132     /* EncDec: 0-Decrypt, 1-Encrypt */
7133     t_u16 EncDec;
7134     /* Algorithm: 1-RC4, 2-AES, 3-AES_KEY_WRAP, 4-AES-CCMP, 6-AES-GCMP */
7135     t_u16 Algorithm;
7136     /* KeyLength: Length of KeyIV (bytes) */
7137     t_u16 KeyIVLength;
7138     /* KeyIV: KeyIV */
7139     t_u8 KeyIV[32];
7140     /* KeyLength: Length of Key (bytes) */
7141     t_u16 KeyLength;
7142     /* Key: Key */
7143     t_u8 Key[32];
7144     /* DataType: DataType */
7145     t_u16 DataType;
7146     /* DataLength: Data Length */
7147     t_u16 DataLength;
7148     /* Data: Data */
7149     t_u8 Data[1];
7150 } MLAN_PACK_END HostCmd_DS_EU_CRYPTO;
7151 
7152 typedef enum _crypto_algorithm
7153 {
7154     CRYPTO_RC4      = 1,
7155     CRYPTO_AES_ECB  = 2,
7156     CRYPTO_AES_WRAP = 3,
7157     CRYPTO_AES_CCMP = 4,
7158     CRYPTO_AES_GCMP = 6,
7159 } crypto_algorithm;
7160 
7161 typedef MLAN_PACK_START struct
7162 {
7163     /* KeyLength: Length of KeyIV (bytes) */
7164     t_u16 KeyIVLength;
7165     /* KeyIV: KeyIV */
7166     t_u8 KeyIV[32];
7167     /* NonceLength: Length of Nonce (bytes) */
7168     t_u16 NonceLength;
7169     /* Nonce: Nonce */
7170     t_u8 Nonce[14];
7171     /* AADLength: Length of AAD (bytes) */
7172     t_u16 AADLength;
7173     /* AAD: AAD */
7174     t_u8 AAD[32];
7175     /* KeyLength: Length of Key (bytes) */
7176     t_u16 KeyLength;
7177     /* Key: Key */
7178     t_u8 Key[32];
7179     /* DataLength: Length of Data (bytes) */
7180     t_u16 *DataLength;
7181     /* Data: Data */
7182     t_u8 *Data;
7183 } MLAN_PACK_END EU_Crypto;
7184 #endif
7185 
7186 #if (CONFIG_IPS)
7187 typedef MLAN_PACK_START struct
7188 {
7189     t_u32 enable;
7190 } MLAN_PACK_END HostCmd_DS_IPS_CONFIG;
7191 #endif
7192 
7193 /** statistics threshold */
7194 typedef MLAN_PACK_START struct
7195 {
7196     /** Header */
7197     MrvlIEtypesHeader_t header;
7198     /** value */
7199     t_u8 value;
7200     /** reporting frequency */
7201     t_u8 frequency;
7202 } MLAN_PACK_END MrvlIEtypes_BeaconHighRssiThreshold_t, MrvlIEtypes_BeaconLowRssiThreshold_t,
7203     MrvlIEtypes_BeaconHighSnrThreshold_t, MrvlIEtypes_BeaconLowSnrThreshold_t, MrvlIEtypes_FailureCount_t,
7204     MrvlIEtypes_DataLowRssiThreshold_t, MrvlIEtypes_DataHighRssiThreshold_t, MrvlIEtypes_DataLowSnrThreshold_t,
7205     MrvlIEtypes_DataHighSnrThreshold_t, MrvlIETypes_PreBeaconMissed_t, MrvlIEtypes_BeaconsMissed_t;
7206 
7207 /** statistics threshold for LinkQuality */
7208 typedef MLAN_PACK_START struct
7209 {
7210     /** Header */
7211     MrvlIEtypesHeader_t header;
7212     /** Link SNR threshold (dB) */
7213     t_u16 link_snr;
7214     /** Link SNR frequency */
7215     t_u16 link_snr_freq;
7216     /* Second minimum rate value as per the rate table below */
7217     t_u16 link_rate;
7218     /* Second minimum rate frequency */
7219     t_u16 link_rate_freq;
7220     /* Tx latency value (us) */
7221     t_u16 link_tx_latency;
7222     /* Tx latency frequency */
7223     t_u16 link_tx_lantency_freq;
7224 } MLAN_PACK_END MrvlIEtypes_LinkQualityThreshold_t;
7225 
7226 /** Supported operating classes element */
7227 typedef MLAN_PACK_START struct _MrvlIETypes_SuppOperClass_t
7228 {
7229     /** Header */
7230     MrvlIEtypesHeader_t header;
7231     /** Current operationg class **/
7232     t_u8 current_oper_class;
7233     /** Operating class list */
7234     t_u8 oper_class[1];
7235 } MLAN_PACK_END MrvlIETypes_SuppOperClass_t;
7236 
7237 #if CONFIG_MULTI_CHAN
7238 typedef MLAN_PACK_START struct _MrvlTypes_DrcsTimeSlice_t
7239 {
7240     /** Header */
7241     MrvlIEtypesHeader_t header;
7242     /** Channel Index*/
7243     t_u16 chan_idx;
7244     /** Channel time (in TU) for chan_idx*/
7245     t_u8 chantime;
7246     /** Channel swith time (in TU) for chan_idx*/
7247     t_u8 switchtime;
7248     /** Undoze time (in TU) for chan_idx*/
7249     t_u8 undozetime;
7250     /** Rx traffic control scheme when channel switch*/
7251     /** only valid for GC/STA interface*/
7252     t_u8 mode;
7253 } MLAN_PACK_END MrvlTypes_DrcsTimeSlice_t;
7254 typedef MLAN_PACK_START struct _HostCmd_DS_MULTI_CHAN_CFG
7255 {
7256     /** Action */
7257     t_u16 action;
7258     /** Channel time */
7259     t_u32 channel_time;
7260     /** Buffer weight */
7261     t_u8 buffer_weight;
7262     /** TLV buffer */
7263     t_u8 tlv_buf[];
7264     /* t_u8 *tlv_buf; */
7265 } MLAN_PACK_END HostCmd_DS_MULTI_CHAN_CFG;
7266 
7267 typedef MLAN_PACK_START struct _HostCmd_DS_DRCS_CFG
7268 {
7269     /** Action */
7270     t_u16 action;
7271     /** TLV buffer */
7272     MrvlTypes_DrcsTimeSlice_t time_slicing;
7273     /** TLV buffer */
7274     MrvlTypes_DrcsTimeSlice_t drcs_buf[];
7275     /* t_u8 *tlv_buf; */
7276 } MLAN_PACK_END HostCmd_DS_DRCS_CFG;
7277 
7278 typedef MLAN_PACK_START struct _HostCmd_DS_MULTI_CHAN_POLICY
7279 {
7280     /** Action */
7281     t_u16 action;
7282     /** Multi-channel Policy */
7283     t_u16 policy;
7284 } MLAN_PACK_END HostCmd_DS_MULTI_CHAN_POLICY;
7285 
7286 /** MrvlIEtypes_multi_chan_info_t */
7287 typedef MLAN_PACK_START struct _MrvlIETypes_mutli_chan_info_t
7288 {
7289     /** Header */
7290     MrvlIEtypesHeader_t header;
7291     /** multi channel operation status */
7292     t_u16 status;
7293     /** Tlv buffer */
7294     t_u8 tlv_buffer[];
7295 } MLAN_PACK_END MrvlIEtypes_multi_chan_info_t;
7296 #endif
7297 
7298 #if (CONFIG_11MC) || (CONFIG_11AZ)
7299 /**Structure for FTM complete subevent*/
7300 typedef MLAN_PACK_START struct _wls_subevent_ftm_complete
7301 {
7302     /** BSS Number */
7303     t_u8 bssNum;
7304     /** BSS Type */
7305     t_u8 bssType;
7306     /** MAC address of the responder */
7307     t_u8 mac[MLAN_MAC_ADDR_LENGTH];
7308     /** Average RTT */
7309     t_u32 avg_rtt;
7310     /** Average Clock offset */
7311     t_u32 avg_clk_offset;
7312     /** Measure start timestamp */
7313     t_u32 meas_start_tsf;
7314 } MLAN_PACK_END wls_subevent_ftm_complete_t;
7315 
7316 /** Structure for FTM events*/
7317 typedef MLAN_PACK_START struct _wls_event_t
7318 {
7319     /* No of bytes in packet including this field */
7320     t_u16 length;
7321     /* Type: Event (3) */
7322     t_u16 type;
7323     /** Event ID */
7324     t_u16 event_id;
7325     /** BSS index number for multiple BSS support */
7326     t_u8 bss_index;
7327     /** BSS type */
7328     t_u8 bss_type;
7329     /** sub event id */
7330     t_u8 sub_event_id;
7331     union
7332     {
7333         /** FTM Complete Sub event*/
7334         wls_subevent_ftm_complete_t ftm_complete;
7335     } e;
7336 } MLAN_PACK_END wls_event_t;
7337 
7338 /** Structure of FTM_SESSION_CFG_NTB_RANGING / FTM_SESSION_CFG_TB_RANGING TLV data*/
7339 typedef MLAN_PACK_START struct _ranging_cfg
7340 {
7341     /** Indicates the channel BW for session*/
7342     /*0: HE20, 1: HE40, 2: HE80, 3: HE80+80, 4: HE160, 5:HE160_SRF*/
7343     t_u8 format_bw;
7344     /** indicates for bandwidths less than or equal to 80 MHz the maximum number of space-time streams to be used in
7345      * DL/UL NDP frames in the session*/
7346     t_u8 max_i2r_sts_upto80;
7347     /**indicates for bandwidths less than or equal to 80 MHz the maximum number of space-time streams to be used in
7348      * DL/UL NDP frames in the session*/
7349     t_u8 max_r2i_sts_upto80;
7350     /**Specify measurement freq in Hz to calculate measurement interval*/
7351     t_u8 az_measurement_freq;
7352     /**Indicates the number of measurements to be done for session*/
7353     t_u8 az_number_of_measurements;
7354     /** Initator lmr feedback */
7355     t_u8 i2r_lmr_feedback;
7356     /**Include location civic request (Expect location civic from responder)*/
7357     t_u8 civic_req;
7358     /**Include LCI request (Expect LCI info from responder)*/
7359     t_u8 lci_req;
7360 } MLAN_PACK_END ranging_cfg_t;
7361 
7362 /** Structure of FTM_SESSION_CFG TLV data*/
7363 typedef MLAN_PACK_START struct _ftm_session_cfg
7364 {
7365     /** Indicates how many burst instances are requested for the FTM session*/
7366     t_u8 burst_exponent;
7367     /** Indicates the duration of a burst instance*/
7368     t_u8 burst_duration;
7369     /**Minimum time between consecutive FTM frames*/
7370     t_u8 min_delta_FTM;
7371     /**ASAP/non-ASAP casel*/
7372     t_u8 is_ASAP;
7373     /**Number of FTMs per burst*/
7374     t_u8 per_burst_FTM;
7375     /**FTM channel spacing: HT20/HT40/VHT80/... */
7376     t_u8 channel_spacing;
7377     /**Indicates the interval between two consecutive burst instances*/
7378     t_u16 burst_period;
7379 } MLAN_PACK_END ftm_session_cfg_t;
7380 
7381 /** Structure for FTM_SESSION_CFG_LOCATION_CIVIC TLV data*/
7382 typedef MLAN_PACK_START struct _civic_loc_cfg
7383 {
7384     /**Civic location type*/
7385     t_u8 civic_location_type;
7386     /**Country code*/
7387     t_u16 country_code;
7388     /**Civic address type*/
7389     t_u8 civic_address_type;
7390     /**Civic address length*/
7391     t_u8 civic_address_length;
7392     /**Civic Address*/
7393     t_u8 civic_address[256];
7394 } MLAN_PACK_END civic_loc_cfg_t;
7395 
7396 /** Structure for FTM_SESSION_CFG_LCI TLV data*/
7397 typedef MLAN_PACK_START struct _lci_cfg
7398 {
7399     /** known longitude*/
7400     double longitude;
7401     /** known Latitude*/
7402     double latitude;
7403     /** known altitude*/
7404     double altitude;
7405     /** known Latitude uncertainty*/
7406     t_u8 lat_unc;
7407     /** known Longitude uncertainty*/
7408     t_u8 long_unc;
7409     /** Known Altitude uncertainty*/
7410     t_u8 alt_unc;
7411     /** 1 word for additional Z information */
7412     t_u32 z_info;
7413 } MLAN_PACK_END lci_cfg_t;
7414 
7415 /** Structure for FTM_SESSION_CFG_NTB_RANGING TLV*/
7416 typedef MLAN_PACK_START struct _ranging_cfg_tlv
7417 {
7418     /** Type*/
7419     t_u16 type;
7420     /** Length*/
7421     t_u16 len;
7422     /** Value*/
7423     ranging_cfg_t val;
7424 } MLAN_PACK_END ranging_cfg_tlv_t;
7425 
7426 /** Structure for FTM_SESSION_CFG  TLV*/
7427 typedef MLAN_PACK_START struct _ftm_session_cfg_tlv
7428 {
7429     /** Type*/
7430     t_u16 type;
7431     /** Length*/
7432     t_u16 len;
7433     /** Value*/
7434     ftm_session_cfg_t val;
7435     t_u8 civic_req;
7436     t_u8 lci_req;
7437 } MLAN_PACK_END ftm_session_cfg_tlv_t;
7438 
7439 /** Structure for FTM_SESSION_CFG_LOCATION_CIVIC TLV*/
7440 typedef MLAN_PACK_START struct _civic_loc_tlv
7441 {
7442     /** Type*/
7443     t_u16 type;
7444     /** Length*/
7445     t_u16 len;
7446     /** Value*/
7447     civic_loc_cfg_t val;
7448 } MLAN_PACK_END civic_loc_tlv_t;
7449 
7450 /** Structure for FTM_SESSION_CFG_LCI TLV*/
7451 typedef MLAN_PACK_START struct _lci_tlv
7452 {
7453     /** Type*/
7454     t_u16 type;
7455     /** Length*/
7456     t_u16 len;
7457     /** Value*/
7458     lci_cfg_t val;
7459 } MLAN_PACK_END lci_tlv_t;
7460 
7461 /** Structure for DOT11MC FTM_SESSION_CFG */
7462 typedef MLAN_PACK_START struct _dot11mc_ftm_cfg
7463 {
7464     /** FTM session cfg*/
7465     ftm_session_cfg_tlv_t sess_tlv;
7466     /** Location Request cfg*/
7467     lci_tlv_t lci_tlv;
7468     /** Civic location cfg*/
7469     civic_loc_tlv_t civic_tlv;
7470 
7471 } MLAN_PACK_END dot11mc_ftm_cfg_t;
7472 
7473 /** Structure for DOT11AZ FTM_SESSION_CFG */
7474 typedef MLAN_PACK_START struct _dot11az_ftmcfg_ntb_t
7475 {
7476     /** NTB session cfg */
7477     ranging_cfg_tlv_t range_tlv;
7478 } MLAN_PACK_END dot11az_ftm_cfg_t;
7479 
7480 /** Type definition for hostcmd_ftm_session_cfg */
7481 typedef MLAN_PACK_START struct _HostCmd_FTM_SESSION_CFG
7482 {
7483     /** 0:Get, 1:Set */
7484     t_u16 action;
7485     /** FTM_SESSION_CFG_TLVs*/
7486     union
7487     {
7488         /**11az cfg*/
7489         dot11az_ftm_cfg_t cfg_11az;
7490         /** 11mc cfg*/
7491         dot11mc_ftm_cfg_t cfg_11mc;
7492     } tlv;
7493 } MLAN_PACK_END HostCmd_FTM_SESSION_CFG;
7494 
7495 /** Type definition for hostcmd_ftm_session_ctrl */
7496 typedef MLAN_PACK_START struct _Hostcmd_FTM_SESSION_CTRL
7497 {
7498     /** 0: Not used, 1: Start, 2: Stop*/
7499     t_u16 action;
7500     /*FTM for ranging*/
7501     t_u8 for_ranging;
7502     /** Mac address of the peer with whom FTM session is required*/
7503     t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH];
7504     /** Channel on which FTM must be started */
7505     t_u8 chan;
7506 } MLAN_PACK_END HostCmd_FTM_SESSION_CTRL;
7507 
7508 #if CONFIG_WLS_CSI_PROC
7509 typedef MLAN_PACK_START struct _CSI_EVENT_HEADER_t
7510 {
7511     /** No of bytes in packet including this field */
7512     t_u16 length;
7513     /** Type: Event (3) */
7514     t_u16 type;
7515     /** Event ID */
7516     t_u16 event_id;
7517     /** BSS index number for multiple BSS support */
7518     t_u8 bss_index;
7519     /** BSS type */
7520     t_u8 bss_type;
7521 } MLAN_PACK_END csi_event_t;
7522 
7523 typedef MLAN_PACK_START struct _Hostcmd_WLS_CSI_ACK
7524 {
7525     t_u16 action;
7526     t_u16 sub_id;
7527     t_u32 ack;
7528     t_u32 phase_roll;
7529     t_u32 firstpath_delay;
7530     t_u32 fft_size_pointer;
7531     t_u32 csi_tsf;
7532 } MLAN_PACK_END HostCmd_WLS_CSI_ACK;
7533 #endif
7534 
7535 #endif
7536 
7537 #if CONFIG_1AS
7538 /** HostCmd_DS_HOST_CLOCK_CFG */
7539 typedef MLAN_PACK_START struct _HostCmd_DS_HOST_CLOCK_CFG
7540 {
7541     /** Action */
7542     t_u16 action;
7543     /** host time nano secs value */
7544     t_u64 time;
7545     /** HW time in nano sec value */
7546     t_u64 hw_time;
7547 } MLAN_PACK_END HostCmd_DS_HOST_CLOCK_CFG;
7548 #endif
7549 
7550 #if CONFIG_CSI
7551 /** MrvlIEtypes_channel_bandcfg_t */
7552 typedef MLAN_PACK_START struct _MrvlIEtypes_channel_bandcfg_t
7553 {
7554     /** Header */
7555     MrvlIEtypesHeader_t header;
7556     /** Enable getting CSI data on special channel */
7557     t_u8 csi_monitor_enable;
7558     /** CSI data received in cfg channel with mac addr filter, not only RA is us or other*/
7559     t_u8 ra4us;
7560     /** bandconfig*/
7561     t_u8 bandconfig;
7562     /** channel num */
7563     t_u8 channel;
7564 } MLAN_PACK_END MrvlIEtypes_channel_bandcfg_t;
7565 
7566 /**
7567  * @brief Structure passed to firmware to config csi info
7568  */
7569 typedef MLAN_PACK_START struct _HostCmd_DS_CSI_CFG
7570 {
7571     /** Action */
7572     t_u16 action;
7573     /** Header ID*/
7574     t_u32 head_id;
7575     /** Tail ID */
7576     t_u32 tail_id;
7577     /** Number of CSI filters */
7578     t_u8 csi_filter_cnt;
7579     /** Chip ID */
7580     t_u8 chip_id;
7581     /** CSI filters */
7582     wifi_csi_filter_t csi_filter[CSI_FILTER_MAX];
7583     /**channel and bandconfig*/
7584     MrvlIEtypes_channel_bandcfg_t channel_bandconfig;
7585 } MLAN_PACK_END HostCmd_DS_CSI_CFG;
7586 #endif
7587 
7588 /** HostCmd_DS_BOOT_SLEEP */
7589 typedef MLAN_PACK_START struct _HostCmd_DS_BOOT_SLEEP
7590 {
7591     /** Set or Get */
7592     t_u16 action;
7593     /** 1 on or 0 off */
7594     t_u16 enable;
7595 } MLAN_PACK_END HostCmd_DS_BOOT_SLEEP;
7596 
7597 #if CONFIG_TSP
7598 typedef MLAN_PACK_START struct _HostCmd_DS_TSP_CFG
7599 {
7600     /** Action */
7601     t_u16 action;
7602     /** enable/disabel tsp algothrim*/
7603     t_u16 thermalPowerMgmtenable;
7604     /** backoff*/
7605     t_u32 powerMgmtBackoff;
7606     /** high Threshold*/
7607     t_u32 highPwrBOThrshld;
7608     /** low Threshold*/
7609     t_u32 lowPwrBOThrshld;
7610     /** DUTY_CYC_STEP */
7611     t_u32 dutycycstep;
7612     /** DUTY_CYC_MIN */
7613     t_u32 dutycycmin;
7614     /** HIGH_THRESHOLD_TEMP*/
7615     int highthrtemp;
7616     /** LOW_THRESHOLD_TEMP*/
7617     int lowthrtemp;
7618     /** CAU TSEN temperature */
7619     int currCAUTemp;
7620     /** RFU temperature */
7621     int currRFUTemp;
7622 } MLAN_PACK_END HostCmd_DS_TSP_CFG;
7623 
7624 typedef MLAN_PACK_START struct _TSP_CFG
7625 {
7626     /** enable/disabel tsp algothrim*/
7627     t_u16 *thermalPowerMgmtenable;
7628     /** backoff*/
7629     t_u32 *powerMgmtBackoff;
7630     /** high Threshold*/
7631     t_u32 *highPwrBOThrshld;
7632     /** low Threshold*/
7633     t_u32 *lowPwrBOThrshld;
7634     /** DUTY_CYC_STEP */
7635     t_u32 *dutycycstep;
7636     /** DUTY_CYC_MIN */
7637     t_u32 *dutycycmin;
7638     /** HIGH_THRESHOLD_TEMP*/
7639     int *highthrtemp;
7640     /** LOW_THRESHOLD_TEMP*/
7641     int *lowthrtemp;
7642     /** CAU TSEN temperature */
7643     int *currCAUTemp;
7644     /** RFU temperature */
7645     int *currRFUTemp;
7646 } MLAN_PACK_END TSP_CFG;
7647 #endif
7648 
7649 #if CONFIG_COEX_DUTY_CYCLE
7650 /** TLV type : Coex duty cycle */
7651 #define TLV_TYPE_COEX_DUTY_CYCLE (PROPRIETARY_TLV_BASE_ID + 0x290)
7652 
7653 /** MrvlIETypes_SingleAntDutyCycle_Config_t */
7654 typedef MLAN_PACK_START struct _MrvlIETypes_SingleAntDutyCycle_Config_t
7655 {
7656     /** Header */
7657     MrvlIEtypesHeader_t header;
7658     /** Enable: 0x1 generic time, 0x2 Enable Dutycycle */
7659     t_u16 enabled;
7660     /** Enter value in Units (1Unit = 1ms), should be no more than wlanTime */
7661     t_u16 nbTime;
7662     /** Enter value in Units (1Unit = 1ms) */
7663     t_u16 wlanTime;
7664 } MLAN_PACK_END MrvlIETypes_SingleAntDutyCycle_Config_t;
7665 
7666 /** HostCmd_SIGNLE_ANT_DUTY_CYCLE structure */
7667 typedef MLAN_PACK_START struct _HostCmd_SIGNLE_ANT_DUTY_CYCLE
7668 {
7669     /** Action */
7670     t_u16 action;
7671     /** Reserved field */
7672     t_u16 reserved;
7673     /** Single Ant Duty Cycle Configuration Data */
7674     MrvlIETypes_SingleAntDutyCycle_Config_t single_ant_cfg_data;
7675 } MLAN_PACK_END HostCmd_SIGNLE_ANT_DUTY_CYCLE;
7676 
7677 /** MrvlIETypes_DualAntDutyCycle_Config_t */
7678 typedef MLAN_PACK_START struct _MrvlIETypes_DualAntDutyCycle_Config_t
7679 {
7680     /** Header */
7681     MrvlIEtypesHeader_t header;
7682     /** Enable: 0x1 generic time, 0x2 Enable Dutycycle */
7683     t_u16 enabled;
7684     /** Enter value in Units (1Unit = 1ms), should be no more than TotalTime */
7685     t_u16 nbTime;
7686     /** Enter value in Units (1Unit = 1ms) */
7687     t_u16 wlanTime;
7688     /** Enter value in Units (1Unit = 1ms) */
7689     t_u16 wlanBlockTime;
7690 } MLAN_PACK_END MrvlIETypes_DualAntDutyCycle_Config_t;
7691 
7692 /** HostCmd_DUAL_ANT_DUTY_CYCLE structure */
7693 typedef MLAN_PACK_START struct _HostCmd_DUAL_ANT_DUTY_CYCLE
7694 {
7695     t_u16 action;
7696     t_u16 reserved;
7697     /** Dual Ant Duty Cycle Configuration Data */
7698     MrvlIETypes_DualAntDutyCycle_Config_t dual_ant_cfg_data;
7699 } MLAN_PACK_END HostCmd_DUAL_ANT_DUTY_CYCLE;
7700 #endif
7701 
7702 #if (CONFIG_EXTERNAL_COEX_PTA) || (CONFIG_IMD3_CFG)
7703 
7704 /** HostCmd_EXTERNAL_COEX_PTA structure */
7705 typedef MLAN_PACK_START struct _MrvlIETypes_Coex_params_t
7706 {
7707     /** External coex pta type */
7708     t_u16 tlv_type;
7709     /** Externel coex pta tlv length */
7710     t_u16 tlv_length;
7711 } MLAN_PACK_END MrvlIETypes_Coex_params_t;
7712 #endif
7713 
7714 #if CONFIG_EXTERNAL_COEX_PTA
7715 /** MrvlIETypes_DualAntDutyCycle_Config_t */
7716 typedef MLAN_PACK_START struct _MrvlIETypes_ExternalCoexPta_Config_t
7717 {
7718     MrvlIETypes_Coex_params_t param;
7719     /** Enable: 0x01, Disable: 0x00 */
7720     t_u8 enabled;
7721     /** Enable ExtWifiBtArb: 0x01, Disable ExWifiBtArb: 0x00 */
7722     t_u8 ext_WifiBtArb;
7723     /** Active high: 0x00, Active low: 0x01 */
7724     t_u8 polGrantPin;
7725     /**  Enable PriPtaInt: 0x01, Disable PriPtaInt: 0x00 */
7726     t_u8 enable_PriPtaInt;
7727     /** State input disable: 0x00, State info is from state pin: 0x01, State info is sampled on priority pin: 0x02 */
7728     t_u8 enable_StatusFromPta;
7729     /** Timing to sample Priority bit */
7730     t_u16 setPriSampTiming;
7731     /** Timing to sample Tx/Rx info */
7732     t_u16 setStateInfoSampTiming;
7733     /** Enable external traffic Tx/Rx Priority: 0x01, Disable external traffic Tx/Rx Priority: 0x00 */
7734     t_u8 extRadioTrafficPrio;
7735     /** Enable wci-2 interface: 0x01, Disable wci-2 interface: 0x00 */
7736     t_u8 extCoexHwIntWci2;
7737 } MLAN_PACK_END MrvlIETypes_ExternalCoexPta_Config_t;
7738 
7739 /** HostCmd_EXTERNAL_COEX_PTA structure */
7740 typedef MLAN_PACK_START struct _HostCmd_EXTERNAL_COEX_PTA
7741 {
7742     /** Get: 0x00, Set: 0x01 */
7743     t_u16 action;
7744     /** Reserved filed */
7745     t_u16 reserved;
7746     /** External Coex Pta Configuration Data */
7747     MrvlIETypes_ExternalCoexPta_Config_t coex_pta_cfg_data;
7748 } MLAN_PACK_END HostCmd_EXTERNAL_COEX_PTA;
7749 #endif
7750 
7751 #if CONFIG_IMD3_CFG
7752 /** MrvlIETypes_IMD_Config_t */
7753 typedef MLAN_PACK_START struct _MrvlIETypes_IMD_Config_t
7754 {
7755     /** Tlv param*/
7756     MrvlIETypes_Coex_params_t param;
7757     /** Rbc mode*/
7758     t_u8 rbc_mode;
7759     /** Reserved filed*/
7760     t_u8 reserved;
7761     /** Dynamic Mode */
7762     t_u16 DynamicMode;
7763 } MLAN_PACK_END MrvlIETypes_IMD_Config_t;
7764 /** HostCmd_IMD3_CFG structure */
7765 typedef MLAN_PACK_START struct _HostCmd_IMD3_CFG
7766 {
7767     /** Get: 0x00, Set: 0x01 */
7768     t_u16 action;
7769     /** Reserved filed */
7770     t_u16 reserved;
7771     /** Imd config */
7772     MrvlIETypes_IMD_Config_t imd_cfg;
7773 } MLAN_PACK_END HostCmd_IMD3_CFG;
7774 #endif
7775 
7776 /** HostCmd_DS_80211_TX_FRAME */
7777 typedef MLAN_PACK_START struct _HostCmd_DS_80211_TX_FRAME
7778 {
7779     /** Action Set or get */
7780     t_u16 action;
7781     /** status */
7782     t_u16 status;
7783     /** BandConfig */
7784     t_u8 band_config;
7785     /** channel */
7786     t_u8 channel;
7787     /** reserved */
7788     t_u32 reserved;
7789     /** buffer include TxPD and full Tx packet */
7790     t_u8 buffer[];
7791 } MLAN_PACK_END HostCmd_DS_80211_TX_FRAME;
7792 
7793 /** HostCmd_DS_COMMAND */
7794 /* Note in case the fixed header of 8 bytes is modified please modify WIFI_HOST_CMD_FIXED_HEADER_LEN too */
7795 typedef MLAN_PACK_START struct _HostCmd_DS_COMMAND
7796 {
7797     /** Command Header : Command */
7798     t_u16 command;
7799     /** Command Header : Size */
7800     t_u16 size;
7801     /** Command Header : Sequence number */
7802     t_u16 seq_num;
7803     /** Command Header : Result */
7804     t_u16 result;
7805     /** Command Body */
7806     union
7807     {
7808         /** Hardware specifications */
7809         HostCmd_DS_GET_HW_SPEC hw_spec;
7810         /** Cfg data */
7811         HostCmd_DS_802_11_CFG_DATA cfg_data;
7812         /** MAC control */
7813         HostCmd_DS_MAC_CONTROL mac_ctrl;
7814 #if (CONFIG_WIFI_IND_RESET) && (CONFIG_WIFI_IND_DNLD)
7815         /** Test Independent reset */
7816         HostCmd_DS_IND_RST ind_rst;
7817         /** GPIO Independent reset configure */
7818         HostCmd_DS_INDEPENDENT_RESET_CFG ind_rst_cfg;
7819 #endif
7820         /** MAC address */
7821         HostCmd_DS_802_11_MAC_ADDRESS mac_addr;
7822         /** MAC muticast address */
7823         HostCmd_DS_MAC_MULTICAST_ADR mc_addr;
7824         /** Get log */
7825         HostCmd_DS_802_11_GET_LOG get_log;
7826         /** RSSI information */
7827         HostCmd_DS_802_11_RSSI_INFO rssi_info;
7828         /** RSSI information response */
7829         HostCmd_DS_802_11_RSSI_INFO_RSP rssi_info_rsp;
7830         /** SNMP MIB */
7831         HostCmd_DS_802_11_SNMP_MIB smib;
7832         /** Radio control */
7833         HostCmd_DS_802_11_RADIO_CONTROL radio;
7834         /** RF channel */
7835         HostCmd_DS_802_11_RF_CHANNEL rf_channel;
7836         /** Tx rate query */
7837         HostCmd_TX_RATE_QUERY tx_rate;
7838         /** Tx rate configuration */
7839         HostCmd_DS_TX_RATE_CFG tx_rate_cfg;
7840         /** Tx power configuration */
7841         HostCmd_DS_TXPWR_CFG txp_cfg;
7842         /** RF Tx power configuration */
7843         HostCmd_DS_802_11_RF_TX_POWER txp;
7844         /** CW Mode: Tx CW Level control */
7845         HostCmd_DS_CW_MODE_CTRL cwmode;
7846         /** RF antenna */
7847         HostCmd_DS_802_11_RF_ANTENNA antenna;
7848 #if CONFIG_NET_MONITOR
7849         /** Net Monitor Mode command */
7850         HostCmd_DS_802_11_NET_MONITOR net_mon;
7851 #endif
7852         /** Enhanced power save command */
7853         HostCmd_DS_802_11_PS_MODE_ENH psmode_enh;
7854         HostCmd_DS_802_11_HS_CFG_ENH opt_hs_cfg;
7855         /** Scan */
7856         HostCmd_DS_802_11_SCAN scan;
7857 #if CONFIG_EXT_SCAN_SUPPORT
7858         /** Extended Scan */
7859         HostCmd_DS_802_11_SCAN_EXT ext_scan;
7860 #endif
7861 
7862         /** Mgmt frame subtype mask */
7863         HostCmd_DS_RX_MGMT_IND rx_mgmt_ind;
7864         /** Scan response */
7865         HostCmd_DS_802_11_SCAN_RSP scan_resp;
7866 
7867         HostCmd_DS_802_11_BG_SCAN_CONFIG bg_scan_config;
7868         HostCmd_DS_802_11_BG_SCAN_QUERY bg_scan_query;
7869         HostCmd_DS_802_11_BG_SCAN_QUERY_RSP bg_scan_query_resp;
7870         HostCmd_DS_SUBSCRIBE_EVENT subscribe_event;
7871         HostCmd_DS_OTP_USER_DATA otp_user_data;
7872         /** Associate */
7873         HostCmd_DS_802_11_ASSOCIATE associate;
7874 
7875         /** Associate response */
7876         HostCmd_DS_802_11_ASSOCIATE_RSP associate_rsp;
7877         /** Deauthenticate */
7878         HostCmd_DS_802_11_DEAUTHENTICATE deauth;
7879         /** Ad-Hoc start */
7880         HostCmd_DS_802_11_AD_HOC_START adhoc_start;
7881         /** Ad-Hoc start result */
7882         HostCmd_DS_802_11_AD_HOC_START_RESULT adhoc_start_result;
7883         /** Ad-Hoc join result */
7884         HostCmd_DS_802_11_AD_HOC_JOIN_RESULT adhoc_join_result;
7885         /** Ad-Hoc join */
7886         HostCmd_DS_802_11_AD_HOC_JOIN adhoc_join;
7887         /** Domain information */
7888         HostCmd_DS_802_11D_DOMAIN_INFO domain_info;
7889         /** Domain information response */
7890         HostCmd_DS_802_11D_DOMAIN_INFO_RSP domain_info_resp;
7891         HostCmd_DS_802_11_TPC_ADAPT_REQ tpc_req;
7892         HostCmd_DS_802_11_TPC_INFO tpc_info;
7893         HostCmd_DS_802_11_CHAN_SW_ANN chan_sw_ann;
7894         HostCmd_DS_CHAN_RPT_REQ chan_rpt_req;
7895         HostCmd_DS_MEASUREMENT_REQUEST meas_req;
7896         HostCmd_DS_MEASUREMENT_REPORT meas_rpt;
7897         /** Add BA request */
7898         HostCmd_DS_11N_ADDBA_REQ add_ba_req;
7899         /** Add BA response */
7900         HostCmd_DS_11N_ADDBA_RSP add_ba_rsp;
7901         /** Delete BA entry */
7902         HostCmd_DS_11N_DELBA del_ba;
7903         /** Tx buffer configuration */
7904         HostCmd_DS_TXBUF_CFG tx_buf;
7905         /** AMSDU Aggr Ctrl configuration */
7906         HostCmd_DS_AMSDU_AGGR_CTRL amsdu_aggr_ctrl;
7907         /** 11n configuration */
7908         HostCmd_DS_11N_CFG htcfg;
7909         /** HostCmd_DS_11AC_CFG */
7910         HostCmd_DS_11AC_CFG vhtcfg;
7911 #if CONFIG_11AX
7912         /** HostCmd_DS_11AX_CFG */
7913         HostCmd_DS_11AX_CFG axcfg;
7914 #if CONFIG_11AX_TWT
7915         /** HostCmd_DS_TWT_CFG */
7916         HostCmd_DS_TWT_CFG twtcfg;
7917 #endif /* CONFIG_11AX_TWT  */
7918 #if CONFIG_MMSF
7919         /* HostCmd_DS_MMSF_CFG*/
7920         HostCmd_DS_MMSF_CFG mmsf_cfg;
7921 #endif
7922 #endif /* CONFIG_11AX */
7923 #if CONFIG_WIFI_RECOVERY
7924         /* HostCmd_DS_TMRC_CFG*/
7925         HostCmd_DS_TMRC_CFG tmrc_cfg;
7926 #endif
7927         /** WMM status get */
7928         HostCmd_DS_WMM_GET_STATUS get_wmm_status;
7929         /** WMM ADDTS */
7930         HostCmd_DS_WMM_ADDTS_REQ add_ts;
7931         /** WMM DELTS */
7932         HostCmd_DS_WMM_DELTS_REQ del_ts;
7933         /** WMM set/get queue config */
7934         HostCmd_DS_WMM_QUEUE_CONFIG queue_config;
7935         /** WMM on/of/get queue statistics */
7936         HostCmd_DS_WMM_QUEUE_STATS queue_stats;
7937         /** WMM get traffic stream status */
7938         HostCmd_DS_WMM_TS_STATUS ts_status;
7939         /** WMM param config*/
7940         HostCmd_DS_WMM_PARAM_CONFIG param_config;
7941 #if defined(WPA) || defined(WAPI_AP) || defined(HOST_AUTHENTICATOR)
7942         /** Key material */
7943         HostCmd_DS_802_11_KEY_MATERIAL key_material;
7944 #endif /*WPA || WAPI_AP || HOST_AUTHENTICATOR*/
7945 #if CONFIG_GTK_REKEY_OFFLOAD
7946         /** GTK Rekey parameters */
7947         HostCmd_DS_GTK_REKEY_PARAMS gtk_rekey;
7948 #endif
7949         /** E-Supplicant PSK */
7950         HostCmd_DS_802_11_SUPPLICANT_PMK esupplicant_psk;
7951         /** E-Supplicant profile */
7952         HostCmd_DS_802_11_SUPPLICANT_PROFILE esupplicant_profile;
7953         /** Extended version */
7954         HostCmd_DS_VERSION_EXT verext;
7955         /** Adhoc Coalescing */
7956         HostCmd_DS_802_11_IBSS_STATUS ibss_coalescing;
7957         /** Mgmt IE list configuration */
7958         HostCmd_DS_MGMT_IE_LIST_CFG mgmt_ie_list;
7959         /** System clock configuration */
7960         HostCmd_DS_ECL_SYSTEM_CLOCK_CONFIG sys_clock_cfg;
7961         /** MAC register access */
7962         HostCmd_DS_MAC_REG_ACCESS mac_reg;
7963         /** BBP register access */
7964         HostCmd_DS_BBP_REG_ACCESS bbp_reg;
7965         /** RF register access */
7966         HostCmd_DS_RF_REG_ACCESS rf_reg;
7967         /** EEPROM register access */
7968         HostCmd_DS_802_11_EEPROM_ACCESS eeprom;
7969         /** Memory access */
7970         HostCmd_DS_MEM_ACCESS mem;
7971         /** Bridge mode */
7972         HostCmd_BRIDGE_MODE bridge_mode;
7973         /** Auto Reconnect */
7974         HostCmd_DS_AUTO_RECONNECT auto_reconnect;
7975         /** HS Wakeup Reason */
7976         HostCmd_DS_HS_WAKEUP_REASON hs_wakeup_reason;
7977         /** Inactivity timeout extend */
7978         HostCmd_DS_INACTIVITY_TIMEOUT_EXT inactivity_to;
7979 #if UAP_SUPPORT
7980         HostCmd_DS_SYS_CONFIG sys_config;
7981         HostCmd_DS_SYS_INFO sys_info;
7982         HostCmd_DS_STA_DEAUTH sta_deauth;
7983         HostCmd_DS_STA_LIST sta_list;
7984         HostCmd_DS_POWER_MGMT_EXT pm_cfg;
7985         HostCmd_DS_REPORT_MIC report_mic;
7986         HostCmd_DS_PMF_PARAMS pmf_params;
7987 #ifdef SD8801
7988         HostCmd_DS_ACS_CONFIG acs_scan;
7989 #else
7990         HostCMD_DS_APCMD_ACS_SCAN acs_scan;
7991 #endif
7992 #endif /* UAP_SUPPORT */
7993 #if UAP_HOST_MLME
7994         HostCmd_DS_ADD_STATION sta_info;
7995 #endif
7996         /** Sleep period command */
7997         HostCmd_DS_802_11_SLEEP_PERIOD sleep_pd;
7998         /** Sleep params command */
7999         HostCmd_DS_802_11_SLEEP_PARAMS sleep_param;
8000 
8001         /** SDIO GPIO interrupt config command */
8002         HostCmd_DS_SDIO_GPIO_INT_CONFIG sdio_gpio_int;
8003         HostCmd_DS_SDIO_PULL_CTRL sdio_pull_ctl;
8004         HostCmd_DS_SET_BSS_MODE bss_mode;
8005         HostCmd_DS_CMD_TX_DATA_PAUSE tx_data_pause;
8006         HostCmd_DS_REMAIN_ON_CHANNEL remain_on_chan;
8007 #ifdef WIFI_DIRECT_SUPPORT
8008         HostCmd_DS_WIFI_DIRECT_MODE wifi_direct_mode;
8009 #endif
8010 #ifdef WLAN_LOW_POWER_ENABLE
8011         HostCmd_CONFIG_LOW_PWR_MODE low_pwr_mode_cfg;
8012 #endif /* WLAN_LOW_POWER_ENABLE */
8013         HostCmd_CONFIG_ED_MAC_MODE ed_mac_mode_cfg;
8014         HostCmd_DS_CHAN_TRPC_CONFIG chan_trpc_cfg;
8015 #if CONFIG_EXTERNAL_BLE_COEX
8016         MrvlIETypes_ExtBLECoex_Config_t ext_ble_coex_cfg;
8017 #endif
8018         HostCmd_DS_TSF tsf_cfg;
8019 #if CONFIG_WIFI_CLOCKSYNC
8020         HostCmd_DS_GPIO_TSF_LATCH_PARAM_CONFIG gpio_tsf_latch;
8021 #endif /* CONFIG_WIFI_CLOCKSYNC */
8022         HostCmd_DS_TBTT_OFFSET tbtt_offset;
8023 #if CONFIG_RF_TEST_MODE
8024         HostCmd_DS_MFG_CMD_GENERIC_CFG mfg_generic_cfg;
8025         HostCmd_DS_MFG_CMD_TX_FRAME2 mfg_tx_frame2;
8026         HostCmd_DS_MFG_CMD_TX_CONT mfg_tx_cont;
8027         HostCmd_DS_MFG_CMD_HE_TBTX_T mfg_he_power;
8028         HostCmd_MFG_CMD_IEEETYPES_CTLBASICTRIGHDR_T mfg_tx_trigger_config;
8029         HostCmd_DS_MFG_CMD_OTP_MAC_ADD_T mfg_otp_mac_addr_rd_wr;
8030         HostCmd_DS_MFG_CMD_OTP_CAL_DATA_T mfg_otp_cal_data_rd_wr;
8031 #endif
8032 #if CONFIG_WIFI_TX_PER_TRACK
8033         HostCmd_DS_TX_RX_PKT_STATS pkt_stats;
8034 #endif
8035 #if CONFIG_TX_RX_HISTOGRAM
8036         HostCmd_DS_TX_RX_HISTOGRAM histogram;
8037 #endif
8038 #ifdef OTP_CHANINFO
8039         HostCmd_DS_CHAN_REGION_CFG reg_cfg;
8040 #endif
8041 #if CONFIG_11K_OFFLOAD
8042         /** OFFLOAD FEATURE CTRL */
8043         HostCmd_OFFLOAD_FEATURE_CTRL fctrl;
8044 #endif /* CONFIG_11K_OFFLOAD */
8045 #if CONFIG_WIFI_EU_CRYPTO
8046         HostCmd_DS_EU_AES_CRYPTO eu_aes_crypto;
8047         HostCmd_DS_EU_CRYPTO eu_crypto;
8048 #endif
8049 
8050 #if CONFIG_11AX
8051         HostCmd_DS_11AX_CMD_CFG axcmd;
8052 #endif
8053 #ifdef SD8801
8054         HostCmd_DS_ExtBLECoex_Config_t ext_ble_coex_cfg;
8055 #endif
8056 #if CONFIG_MULTI_CHAN
8057         HostCmd_DS_MULTI_CHAN_CFG multi_chan_cfg;
8058         HostCmd_DS_MULTI_CHAN_POLICY multi_chan_policy;
8059         HostCmd_DS_DRCS_CFG drcs_cfg;
8060 #endif
8061 #if CONFIG_1AS
8062         HostCmd_DS_HOST_CLOCK_CFG host_clock_cfg;
8063 #endif
8064 #if (CONFIG_11MC) || (CONFIG_11AZ)
8065         /** hostcmd for session_ctrl user command */
8066         HostCmd_FTM_SESSION_CTRL ftm_session_ctrl;
8067         /** hostcmd for session_cfg user command */
8068         HostCmd_FTM_SESSION_CFG ftm_session_cfg;
8069 #if CONFIG_WLS_CSI_PROC
8070         HostCmd_WLS_CSI_ACK wls_csi_ack;
8071 #endif
8072 #endif
8073 #if CONFIG_TX_AMPDU_PROT_MODE
8074         HostCmd_DS_CMD_TX_AMPDU_PROT_MODE tx_ampdu_prot_mode;
8075 #endif
8076 #if (CONFIG_IPS)
8077         HostCmd_DS_IPS_CONFIG ips_config;
8078 #endif
8079 #if CONFIG_CSI
8080         HostCmd_DS_CSI_CFG csi_params;
8081 #endif
8082 
8083         /** boot sleep configure */
8084         HostCmd_DS_BOOT_SLEEP boot_sleep;
8085 
8086 #if CONFIG_RX_ABORT_CFG
8087         HostCmd_DS_RX_ABORT_CFG rx_abort_cfg;
8088 #endif
8089 
8090 #if CONFIG_RX_ABORT_CFG_EXT
8091         HostCmd_DS_RX_ABORT_CFG_EXT rx_abort_cfg_ext;
8092 #endif
8093 
8094 #if CONFIG_CCK_DESENSE_CFG
8095         HostCmd_DS_CCK_DESENSE_CFG cck_desense_cfg;
8096 #endif
8097 
8098 #if CONFIG_FW_VDLL
8099         uint8_t *vdll_cmd_mem;
8100 #endif
8101 #if CONFIG_TSP
8102         HostCmd_DS_TSP_CFG tsp_cfg;
8103 #endif
8104 #if CONFIG_CLOUD_KEEP_ALIVE
8105         HostCmd_DS_AUTO_TX auto_tx;
8106 #endif
8107 #if CONFIG_COEX_DUTY_CYCLE
8108         HostCmd_SIGNLE_ANT_DUTY_CYCLE single_ant_duty_cycle;
8109         HostCmd_DUAL_ANT_DUTY_CYCLE dual_ant_duty_cycle;
8110 #endif
8111 #if CONFIG_EXTERNAL_COEX_PTA
8112         HostCmd_EXTERNAL_COEX_PTA external_coex_pta;
8113 #endif
8114 #if CONFIG_IMD3_CFG
8115         HostCmd_IMD3_CFG imd3_cfg;
8116 #endif
8117         HostCmd_DS_80211_TX_FRAME tx_frame;
8118     } params;
8119 } MLAN_PACK_END HostCmd_DS_COMMAND;
8120 
8121 /** PS_CMD_ConfirmSleep */
8122 typedef MLAN_PACK_START struct _OPT_Confirm_Sleep
8123 {
8124     /** Command */
8125     t_u16 command;
8126     /** Size */
8127     t_u16 size;
8128     /** Sequence number */
8129     t_u16 seq_num;
8130     /** Result */
8131     t_u16 result;
8132     /** Action */
8133     t_u16 action;
8134     /** Sleep comfirm param definition */
8135     sleep_confirm_param sleep_cfm;
8136 } MLAN_PACK_END OPT_Confirm_Sleep;
8137 
8138 typedef MLAN_PACK_START struct _opt_sleep_confirm_buffer
8139 {
8140     /** Header for interface */
8141     t_u8 hdr[4];
8142     /** New power save command used to send sleep confirmation to the firmware */
8143     OPT_Confirm_Sleep ps_cfm_sleep;
8144 } MLAN_PACK_END opt_sleep_confirm_buffer;
8145 
8146 #if (CONFIG_FW_VDLL) || (CONFIG_FW_VDLLV2)
8147 /** req host side download vdll block */
8148 #define VDLL_IND_TYPE_REQ 0
8149 /** notify vdll start offset in firmware image */
8150 #define VDLL_IND_TYPE_OFFSET 1
8151 /** notify vdll download error: signature error */
8152 #define VDLL_IND_TYPE_ERR_SIG 2
8153 /** notify vdll download error: ID error */
8154 #define VDLL_IND_TYPE_ERR_ID 3
8155 #if defined(SD9177)
8156 /** notify vdll download error: Secure error */
8157 #define VDLL_IND_TYPE_ERR_SECURE 4
8158 /** notify vdll download vdll complete */
8159 #define VDLL_IND_TYPE_COMPLETE 5
8160 #elif defined(SD8978) || defined(SD8987) || defined(SD8997) || defined(RW610)
8161 /** notify VDLL_V2 interface reset */
8162 #define VDLL_IND_TYPE_INTF_RESET 5
8163 #endif
8164 
8165 /** vdll indicate event structure */
8166 typedef MLAN_PACK_START struct _vdll_ind
8167 {
8168     /*VDLL ind type*/
8169     t_u16 type;
8170     /*reserved*/
8171     t_u16 reserved;
8172     /*indicate the offset downloaded so far*/
8173     t_u32 offset;
8174     /*VDLL block size*/
8175     t_u16 block_len;
8176 } MLAN_PACK_END vdll_ind, *pvdll_ind;
8177 
8178 /** mlan_event_vdllv2_indication data structure */
8179 typedef MLAN_PACK_START struct _mlan_event_vdll_indication
8180 {
8181     /** Event ID */
8182     t_u16 event_id;
8183     /** BSS index number for multiple BSS support */
8184     t_u8 bss_index;
8185     /** BSS type */
8186     t_u8 bss_type;
8187     /** vdll indicate event */
8188     vdll_ind vdllInd;
8189 } MLAN_PACK_END mlan_event_vdll_indication, *pmlan_event_vdll_indication;
8190 
8191 #endif /* CONFIG_FW_VDLL || CONFIG_FW_VDLLV2*/
8192 
8193 #ifdef PRAGMA_PACK
8194 #pragma pack(pop)
8195 #endif
8196 
8197 #endif /* !_MLAN_FW_H_ */
8198