xref: /wlan-dirver/fw-api/fw/wmi_unified.h (revision a3d361093121451b675ec138f8f2cbf4ec87ca79)
1 /*
2  * Copyright (c) 2010-2021 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
6  *
7  *
8  * Permission to use, copy, modify, and/or distribute this software for
9  * any purpose with or without fee is hereby granted, provided that the
10  * above copyright notice and this permission notice appear in all
11  * copies.
12  *
13  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
14  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
15  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
16  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
17  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
18  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20  * PERFORMANCE OF THIS SOFTWARE.
21  */
22 
23 /*
24  * This file was originally distributed by Qualcomm Atheros, Inc.
25  * under proprietary terms before Copyright ownership was assigned
26  * to the Linux Foundation.
27  */
28 
29 /**
30  * @addtogroup WMIAPI
31  *@{
32  */
33 
34 /** @file
35  * This file specifies the WMI interface for the  Software Architecture.
36  *
37  * It includes definitions of all the commands and events. Commands are messages
38  * from the host to the target. Events and Replies are messages from the target
39  * to the host.
40  *
41  * Ownership of correctness in regards to WMI commands
42  * belongs to the host driver and the target is not required to validate
43  * parameters for value, proper range, or any other checking.
44  *
45  * Guidelines for extending this interface are below.
46  *
47  * 1. Add new WMI commands ONLY within the specified range - 0x9000 - 0x9fff
48  * 2. Use ONLY A_UINT32 type for defining member variables within WMI command/event
49  *    structures. Do not use A_UINT8, A_UINT16, A_BOOL or enum types within these structures.
50  * 3. DO NOT define bit fields within structures. Implement bit fields using masks
51  *    if necessary. Do not use the programming language's bit field definition.
52  * 4. Define macros for encode/decode of A_UINT8, A_UINT16 fields within the A_UINT32
53  *    variables. Use these macros for set/get of these fields. Try to use this to
54  *    optimize the structure without bloating it with A_UINT32 variables for every lower
55  *    sized field.
56  * 5. Do not use PACK/UNPACK attributes for the structures as each member variable is
57  *    already 4-byte aligned by virtue of being a A_UINT32 type.
58  * 6. Comment each parameter part of the WMI command/event structure by using the
59  *    2 stars at the beginning of C comment instead of one star to enable HTML document
60  *    generation using Doxygen.
61  *
62  */
63 
64 #ifndef _WMI_UNIFIED_H_
65 #define _WMI_UNIFIED_H_
66 
67 
68 #ifdef __cplusplus
69 extern "C" {
70 #endif
71 
72 #include <wlan_defs.h>
73 #include <wmi_services.h>
74 /*
75  * Include the defs of vendor-specific messages (or possibly dummy defs
76  * if there are no actual vendor-specific message defs).
77  */
78 #include <wmi_unified_vendor.h>
79 
80 /* WMI_VAR_LEN_ARRAY1:
81  * This macro is for converting the definition of existing variable-length
82  * arrays within TLV structs of the form "type name[1];" to use the form
83  * "type name[];" while ensuring that the length of the TLV struct is
84  * unmodified by the conversion.
85  * In general, any new variable-length structs should simply use
86  * "type name[];" directly, rather than using WMI_VAR_LEN_ARRAY1.
87  * However, if there's a legitimate reason to make the new variable-length
88  * struct appear to not have a variable length, WMI_VAR_LEN_ARRAY1 can be
89  * used for this purpose.
90  */
91 #if !defined(__KERNEL__)
92     #define WMI_DUMMY_ZERO_LEN_FIELD A_UINT32 dummy_zero_len_field[0]
93 #else
94     /*
95      * Certain build settings of the Linux kernel don't allow zero-element
96      * arrays, and C++ doesn't allow zero-length empty structs.
97      * Confirm that there's no build that combines kernel with C++.
98      */
99     #ifdef __cplusplus
100     #error unsupported combination of kernel and C plus plus
101     #endif
102     #define WMI_DUMMY_ZERO_LEN_FIELD struct {} dummy_zero_len_field
103 #endif
104 
105 #if defined(__WINDOWS__)
106     #define WMI_VAR_LEN_ARRAY1(type, name) type name[1]
107 #else
108     #define WMI_VAR_LEN_ARRAY1(type, name) \
109         union { \
110             type name ## __first_elem; \
111             struct { \
112                 WMI_DUMMY_ZERO_LEN_FIELD; \
113                 type name[]; \
114             }; \
115         }
116 #endif
117 
118 #define ATH_MAC_LEN             6               /**< length of MAC in bytes */
119 #define WMI_EVENT_STATUS_SUCCESS 0 /* Success return status to host */
120 #define WMI_EVENT_STATUS_FAILURE 1 /* Failure return status to host */
121 
122 #define MAX_TX_RATE_VALUES      10 /*Max Tx Rates*/
123 #define MAX_RSSI_VALUES         10 /*Max Rssi values*/
124 #define WMI_MAX_CHAINS 8
125 #define WMI_MAX_CHAINS_FOR_AOA_RCC 2
126 #define WMI_MAX_ADDRESS_SPACE   10
127 
128 #define MAX_AOA_PHASEDELTA      31  /* 62 gain values */
129 
130 #define MAX_20MHZ_SEGMENTS 16  /* 320 MHz / 20 MHz = 16 (20 MHz subbands) */
131 
132 /* The WLAN_MAX_AC macro cannot be changed without breaking
133    WMI compatibility. */
134 /* The maximum value of access category */
135 #define WLAN_MAX_AC  4
136 
137 #define WMI_MAX_PN_LEN 8
138 
139 #define MAX_NUM_CQI_USERS_IN_STANDALONE_SND 3
140 
141 /*
142  * These don't necessarily belong here; but as the MS/SM macros require
143  * ar6000_internal.h to be included, it may not be defined as yet.
144  */
145 #define WMI_F_MS(_v, _f)                                            \
146             (((_v) & (_f)) >> (_f##_S))
147 
148 /*
149  * This breaks the "good macro practice" of only referencing each
150  * macro field once (to avoid things like field++ from causing issues.)
151  */
152 #define WMI_F_RMW(_var, _v, _f)                                     \
153             do {                                                    \
154                 (_var) &= ~(_f);                                    \
155                 (_var) |= (((_v) << (_f##_S)) & (_f));              \
156             } while (0)
157 
158 #define WMI_GET_BITS(_val,_index,_num_bits)                         \
159     (((_val) >> (_index)) & (((A_UINT32) 1 << (_num_bits)) - 1))
160 
161 #define WMI_SET_BITS(_var,_index,_num_bits,_val) do {                       \
162     (_var) &= ~((((A_UINT32) 1 << (_num_bits)) - 1) << (_index));           \
163     (_var) |= (((_val) & (((A_UINT32) 1 << (_num_bits)) - 1)) << (_index)); \
164     } while (0)
165 
166 #define WMI_APPEND_TWO_SET_BITS(var, lsb_index, lsb_num_bits, msb_index, msb_num_bits, val) \
167     do { \
168         WMI_SET_BITS(var, lsb_index, lsb_num_bits, val); \
169         WMI_SET_BITS(var, msb_index, msb_num_bits, (val >> lsb_num_bits)); \
170     } while(0)
171 
172 #define WMI_APPEND_TWO_GET_BITS(var, lsb_index, lsb_num_bits, msb_index, msb_num_bits, val) \
173     do { \
174         (var) = WMI_GET_BITS(val, lsb_index, lsb_num_bits); \
175         (var) |= (WMI_GET_BITS(val, msb_index, msb_num_bits) << lsb_num_bits); \
176     } while(0)
177 
178 /*
179  * Below GET/SET BITS_ARRAY_LEN32_BYTES macros can be used when
180  * reading/writing bits which are spread across array_len32 entries.
181  * These can be used to GET/SET maximum of 32 bits only,
182  * also array_len32 length should be limited to maximum of 32.
183  */
184 #define WMI_GET_BITS_ARRAY_LEN32_BYTES(var, _arrayp, _index, _num_bits) \
185     do { \
186         A_UINT8 i; \
187         for (i = 0; i < _num_bits; i++) { \
188             (var) |= (WMI_GET_BITS(_arrayp[(_index+i) / 32], ((_index+i) % 32), 1) << i); \
189         } \
190     } while(0)
191 
192 #define WMI_SET_BITS_ARRAY_LEN32_BYTES(_arrayp, _index, _num_bits, val) \
193     do { \
194         A_UINT8 i; \
195         for (i = 0; i < _num_bits; i++) { \
196             WMI_SET_BITS(_arrayp[(_index+i) / 32], ((_index+i) % 32), 1, (val >> i)); \
197         } \
198     } while(0)
199 
200 /**
201  * A packed array is an array where each entry in the array is less than
202  * or equal to 16 bits, and the entries are stuffed into an A_UINT32 array.
203  * For example, if each entry in the array is 11 bits, then you can stuff
204  * an array of 4 11-bit values into an array of 2 A_UINT32 values.
205  * The first 2 11-bit values will be stored in the first A_UINT32,
206  * and the last 2 11-bit values will be stored in the second A_UINT32.
207  */
208 #define WMI_PACKED_ARR_SIZE(num_entries,bits_per_entry) \
209     (((num_entries) / (32 / (bits_per_entry))) +            \
210     (((num_entries) % (32 / (bits_per_entry))) ? 1 : 0))
211 
212 #define WMI_RETURN_STRING(str) case ((str)): return (A_UINT8 *)(# str);
213 
214 static INLINE A_UINT32 wmi_packed_arr_get_bits(A_UINT32 *arr,
215     A_UINT32 entry_index, A_UINT32 bits_per_entry)
216 {
217     A_UINT32 entries_per_uint = (32 / bits_per_entry);
218     A_UINT32 uint_index = (entry_index / entries_per_uint);
219     A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint);
220     A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints);
221     A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry);
222     return (arr[uint_index] >> start_bit_in_uint) &
223             (((A_UINT32) 1 << bits_per_entry) - 1);
224 }
225 
226 static INLINE void wmi_packed_arr_set_bits(A_UINT32 *arr, A_UINT32 entry_index,
227     A_UINT32 bits_per_entry, A_UINT32 val)
228 {
229     A_UINT32 entries_per_uint = (32 / bits_per_entry);
230     A_UINT32 uint_index = (entry_index / entries_per_uint);
231     A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint);
232     A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints);
233     A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry);
234 
235     arr[uint_index] &=
236         ~((((A_UINT32) 1 << bits_per_entry) - 1) << start_bit_in_uint);
237     arr[uint_index] |=
238         ((val & (((A_UINT32) 1 << bits_per_entry) - 1)) << start_bit_in_uint);
239 }
240 
241 /** macro to convert MAC address from WMI word format to char array */
242 #define WMI_MAC_ADDR_TO_CHAR_ARRAY(pwmi_mac_addr,c_macaddr) do {        \
243      (c_macaddr)[0] = (((pwmi_mac_addr)->mac_addr31to0)  >>  0) & 0xff; \
244      (c_macaddr)[1] = (((pwmi_mac_addr)->mac_addr31to0)  >>  8) & 0xff; \
245      (c_macaddr)[2] = (((pwmi_mac_addr)->mac_addr31to0)  >> 16) & 0xff; \
246      (c_macaddr)[3] = (((pwmi_mac_addr)->mac_addr31to0)  >> 24) & 0xff; \
247      (c_macaddr)[4] = (((pwmi_mac_addr)->mac_addr47to32) >>  0) & 0xff; \
248      (c_macaddr)[5] = (((pwmi_mac_addr)->mac_addr47to32) >>  8) & 0xff; \
249    } while (0)
250 
251 /** macro to convert MAC address from char array to WMI word format */
252 #define WMI_CHAR_ARRAY_TO_MAC_ADDR(c_macaddr,pwmi_mac_addr)  do { \
253     (pwmi_mac_addr)->mac_addr31to0 = \
254        (((A_UINT32)(c_macaddr)[0] <<  0) | \
255         ((A_UINT32)(c_macaddr)[1] <<  8) | \
256         ((A_UINT32)(c_macaddr)[2] << 16) | \
257         ((A_UINT32)(c_macaddr)[3] << 24)); \
258     (pwmi_mac_addr)->mac_addr47to32 = ((c_macaddr)[4] | ((c_macaddr)[5] << 8));\
259    } while (0)
260 
261 /*
262  * The below function declarations are for implementations on some
263  * platforms of the above macros, but in function form, to save code
264  * memory by avoiding macro-inlining of a non-trivial amount of code.
265  * These function versions of the above macros may not be available
266  * on all host and target platforms.
267  */
268 void wmi_mac_addr_to_char_array(wmi_mac_addr *pwmi_mac_addr, A_UINT8 *c_macaddr);
269 void wmi_char_array_to_mac_addr(A_UINT8 *c_macaddr, wmi_mac_addr *pwmi_mac_addr);
270 
271 /*
272  * wmi command groups.
273  */
274 typedef enum {
275     /* 0 to 2 are reserved */
276     WMI_GRP_START = 0x3,
277     WMI_GRP_SCAN = WMI_GRP_START, /* 0x3 */
278     WMI_GRP_PDEV,           /* 0x4 */
279     WMI_GRP_VDEV,           /* 0x5 */
280     WMI_GRP_PEER,           /* 0x6 */
281     WMI_GRP_MGMT,           /* 0x7 */
282     WMI_GRP_BA_NEG,         /* 0x8 */
283     WMI_GRP_STA_PS,         /* 0x9 */
284     WMI_GRP_DFS,            /* 0xa */
285     WMI_GRP_ROAM,           /* 0xb */
286     WMI_GRP_OFL_SCAN,       /* 0xc */
287     WMI_GRP_P2P,            /* 0xd */
288     WMI_GRP_AP_PS,          /* 0xe */
289     WMI_GRP_RATE_CTRL,      /* 0xf */
290     WMI_GRP_PROFILE,        /* 0x10 */
291     WMI_GRP_SUSPEND,        /* 0x11 */
292     WMI_GRP_BCN_FILTER,     /* 0x12 */
293     WMI_GRP_WOW,            /* 0x13 */
294     WMI_GRP_RTT,            /* 0x14 */
295     WMI_GRP_SPECTRAL,       /* 0x15 */
296     WMI_GRP_STATS,          /* 0x16 */
297     WMI_GRP_ARP_NS_OFL,     /* 0x17 */
298     WMI_GRP_NLO_OFL,        /* 0x18 */
299     WMI_GRP_GTK_OFL,        /* 0x19 */
300     WMI_GRP_CSA_OFL,        /* 0x1a */
301     WMI_GRP_CHATTER,        /* 0x1b */
302     WMI_GRP_TID_ADDBA,      /* 0x1c */
303     WMI_GRP_MISC,           /* 0x1d */
304     WMI_GRP_GPIO,           /* 0x1e */
305     WMI_GRP_FWTEST,         /* 0x1f */
306     WMI_GRP_TDLS,           /* 0x20 */
307     WMI_GRP_RESMGR,         /* 0x21 */
308     WMI_GRP_STA_SMPS,       /* 0x22 */
309     WMI_GRP_WLAN_HB,        /* 0x23 */
310     WMI_GRP_RMC,            /* 0x24 */
311     WMI_GRP_MHF_OFL,        /* 0x25 */
312     WMI_GRP_LOCATION_SCAN,  /* 0x26 */
313     WMI_GRP_OEM,            /* 0x27 */
314     WMI_GRP_NAN,            /* 0x28 */
315     WMI_GRP_COEX,           /* 0x29 */
316     WMI_GRP_OBSS_OFL,       /* 0x2a */
317     WMI_GRP_LPI,            /* 0x2b */
318     WMI_GRP_EXTSCAN,        /* 0x2c */
319     WMI_GRP_DHCP_OFL,       /* 0x2d */
320     WMI_GRP_IPA,            /* 0x2e */
321     WMI_GRP_MDNS_OFL,       /* 0x2f */
322     WMI_GRP_SAP_OFL,        /* 0x30 */
323     WMI_GRP_OCB,            /* 0x31 */
324     WMI_GRP_SOC,            /* 0x32 */
325     WMI_GRP_PKT_FILTER,     /* 0x33 */
326     WMI_GRP_MAWC,           /* 0x34 */
327     WMI_GRP_PMF_OFFLOAD,    /* 0x35 */
328     WMI_GRP_BPF_OFFLOAD,    /* 0x36 Berkeley Packet Filter */
329     WMI_GRP_NAN_DATA,       /* 0x37 */
330     WMI_GRP_PROTOTYPE,      /* 0x38 */
331     WMI_GRP_MONITOR,        /* 0x39 */
332     WMI_GRP_REGULATORY,     /* 0x3a */
333     WMI_GRP_HW_DATA_FILTER, /* 0x3b */
334     WMI_GRP_WLM,            /* 0x3c WLAN Latency Manager */
335     WMI_GRP_11K_OFFLOAD,    /* 0x3d */
336     WMI_GRP_TWT,            /* 0x3e TWT (Target Wake Time) for STA and AP */
337     WMI_GRP_MOTION_DET,     /* 0x3f */
338     WMI_GRP_SPATIAL_REUSE,  /* 0x40 */
339     WMI_GRP_ESP,            /* 0x41 Estimate Service Parameters (802.11mc) */
340     WMI_GRP_HPCS_PULSE,     /* 0x42 */
341     WMI_GRP_AUDIO,          /* 0x43 */
342     WMI_GRP_CFR_CAPTURE,    /* 0x44 */
343     WMI_GRP_ATM,            /* 0x45 ATM (Air Time Management group) */
344     WMI_GRP_VENDOR,         /* 0x46 vendor specific group */
345     WMI_GRP_LATENCY,        /* 0x47 TID/AC level latency config */
346     WMI_GRP_MLO,            /* 0x48 MLO(Multiple Link Operation) management */
347     WMI_GRP_SAWF,           /* 0x49 SAWF (Service Aware WiFi) */
348     WMI_GRP_QUIET_OFL,      /* 0x4a Quiet offloads */
349     WMI_GRP_ODD,            /* 0x4b ODD */
350     WMI_GRP_TDMA,           /* 0x4c TDMA */
351     WMI_GRP_MANUAL_UL_TRIG  /* 0x4d Manual UL OFDMA Trigger */
352 } WMI_GRP_ID;
353 
354 #define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
355 #define WMI_EVT_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
356 
357 /**
358  * Command IDs and commange events
359  */
360 typedef enum {
361     /** initialize the wlan sub system */
362     WMI_INIT_CMDID = 0x1,
363 
364     /* Scan specific commands */
365 
366     /** start scan request to FW  */
367     WMI_START_SCAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SCAN),
368     /** stop scan request to FW  */
369     WMI_STOP_SCAN_CMDID,
370     /** full list of channels as defined by the regulatory that will be used by scanner   */
371     WMI_SCAN_CHAN_LIST_CMDID,
372     /** overwrite default priority table in scan scheduler   */
373     WMI_SCAN_SCH_PRIO_TBL_CMDID,
374     /** This command to adjust the priority and min.max_rest_time
375      * of an on ongoing scan request.
376      */
377     WMI_SCAN_UPDATE_REQUEST_CMDID,
378 
379     /** set OUI to be used in probe request if enabled */
380     WMI_SCAN_PROB_REQ_OUI_CMDID,
381     /** config adaptive dwell scan */
382     WMI_SCAN_ADAPTIVE_DWELL_CONFIG_CMDID,
383     /** Only applicable to DBS capable product */
384     WMI_SET_SCAN_DBS_DUTY_CYCLE_CMDID,
385 
386     /* PDEV(physical device) specific commands */
387     /** set regulatorty ctl id used by FW to determine the exact ctl power limits */
388     WMI_PDEV_SET_REGDOMAIN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PDEV),
389     /** set channel. mainly used for supporting monitor mode */
390     WMI_PDEV_SET_CHANNEL_CMDID,
391     /** set pdev specific parameters */
392     WMI_PDEV_SET_PARAM_CMDID,
393     /** enable packet log */
394     WMI_PDEV_PKTLOG_ENABLE_CMDID,
395     /** disable packet log*/
396     WMI_PDEV_PKTLOG_DISABLE_CMDID,
397     /** set wmm parameters */
398     WMI_PDEV_SET_WMM_PARAMS_CMDID,
399     /** set HT cap ie that needs to be carried probe requests HT/VHT channels */
400     WMI_PDEV_SET_HT_CAP_IE_CMDID,
401     /** set VHT cap ie that needs to be carried on probe requests on VHT channels */
402     WMI_PDEV_SET_VHT_CAP_IE_CMDID,
403 
404     /** Command to send the DSCP-to-TID map to the target */
405     WMI_PDEV_SET_DSCP_TID_MAP_CMDID,
406     /** set quiet ie parameters. primarily used in AP mode */
407     WMI_PDEV_SET_QUIET_MODE_CMDID,
408     /** Enable/Disable Green AP Power Save  */
409     WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID,
410     /** get TPC config for the current operating channel */
411     WMI_PDEV_GET_TPC_CONFIG_CMDID,
412 
413     /** set the base MAC address for the physical device before a VDEV is created.
414      *  For firmware that doesn't support this feature and this command, the pdev
415      *  MAC address will not be changed. */
416     WMI_PDEV_SET_BASE_MACADDR_CMDID,
417 
418     /* eeprom content dump , the same to bdboard data */
419     WMI_PDEV_DUMP_CMDID,
420     /* set LED configuration  */
421     WMI_PDEV_SET_LED_CONFIG_CMDID,
422     /* Get Current temperature of chip in Celcius degree*/
423     WMI_PDEV_GET_TEMPERATURE_CMDID,
424     /* Set LED flashing behavior  */
425     WMI_PDEV_SET_LED_FLASHING_CMDID,
426     /** Enable/Disable Smart Antenna */
427     WMI_PDEV_SMART_ANT_ENABLE_CMDID,
428     /** Set Smart Antenna RX antenna*/
429     WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID,
430     /** Override the antenna switch table */
431     WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID,
432     /** Override the CTL table */
433     WMI_PDEV_SET_CTL_TABLE_CMDID,
434     /** Override the array gain table */
435     WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID,
436     /** FIPS test mode command */
437     WMI_PDEV_FIPS_CMDID,
438     /** get CCK ANI level */
439     WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID,
440     /** get OFDM ANI level */
441     WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID,
442     /** NF Cal Power dBr/dBm */
443     WMI_PDEV_GET_NFCAL_POWER_CMDID,
444     /** TxPPDU TPC */
445     WMI_PDEV_GET_TPC_CMDID,
446     /** Set to enable MIB stats collection */
447     WMI_MIB_STATS_ENABLE_CMDID,
448     /** Set preferred channel list for DBS Mgr */
449     WMI_PDEV_SET_PCL_CMDID,
450     /** Set HW mode. Eg: single MAC, DBS & SBS, see soc_hw_mode_t for values */
451     WMI_PDEV_SET_HW_MODE_CMDID,
452     /** Set DFS, SCAN modes and other FW configurations */
453     WMI_PDEV_SET_MAC_CONFIG_CMDID,
454     /** Set per band and per pdev antenna chains */
455     WMI_PDEV_SET_ANTENNA_MODE_CMDID,
456     /** Periodic channel stats request command */
457     WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID,
458     /** WMI command for power debug framework */
459     WMI_PDEV_WAL_POWER_DEBUG_CMDID,
460     /** set per-AC rx reorder timeouts */
461     WMI_PDEV_SET_REORDER_TIMEOUT_VAL_CMDID,
462     /** WMI command for WOW gpio and type */
463     WMI_PDEV_SET_WAKEUP_CONFIG_CMDID,
464     /* Get current ANT's per chain's RSSI info */
465     WMI_PDEV_GET_ANTDIV_STATUS_CMDID,
466     /** WMI command for getting Chip Power Stats */
467     WMI_PDEV_GET_CHIP_POWER_STATS_CMDID,
468     /** set stats reporting thresholds - see WMI_REPORT_STATS_EVENTID */
469     WMI_PDEV_SET_STATS_THRESHOLD_CMDID,
470     /** vdev restart request for multiple vdevs */
471     WMI_PDEV_MULTIPLE_VDEV_RESTART_REQUEST_CMDID,
472     /** Pdev update packet routing command */
473     WMI_PDEV_UPDATE_PKT_ROUTING_CMDID,
474     /** Get Calibration data version details */
475     WMI_PDEV_CHECK_CAL_VERSION_CMDID,
476     /** Set Diversity Gain */
477     WMI_PDEV_SET_DIVERSITY_GAIN_CMDID,
478     /** Get chain RSSI and antena index command */
479     WMI_PDEV_DIV_GET_RSSI_ANTID_CMDID,
480     /** get bss chan info */
481     WMI_PDEV_BSS_CHAN_INFO_REQUEST_CMDID,
482     /** update pmk cache info */
483     WMI_PDEV_UPDATE_PMK_CACHE_CMDID,
484     /**  update fils HLP */
485     WMI_PDEV_UPDATE_FILS_HLP_PKT_CMDID,
486     /** update ctltable request **/
487     WMI_PDEV_UPDATE_CTLTABLE_REQUEST_CMDID,
488     /** Command to set beacon OUI **/
489     WMI_PDEV_CONFIG_VENDOR_OUI_ACTION_CMDID,
490     /** enable/disable per-AC tx queue optimizations */
491     WMI_PDEV_SET_AC_TX_QUEUE_OPTIMIZED_CMDID,
492     /** enable/disable rx promiscuous mode */
493     WMI_PDEV_SET_RX_FILTER_PROMISCUOUS_CMDID,
494     /* set a generic direct DMA ring config */
495     WMI_PDEV_DMA_RING_CFG_REQ_CMDID,
496     /* enable/disable Action frame response as HE TB PPDU */
497     WMI_PDEV_HE_TB_ACTION_FRM_CMDID,
498     /** filter packet log based on MAC address */
499     WMI_PDEV_PKTLOG_FILTER_CMDID,
500     /** wmi command for setting rogue ap configuration */
501     WMI_PDEV_SET_RAP_CONFIG_CMDID,
502     /** Specify DSM filters along with disallow bssid filters */
503     WMI_PDEV_DSM_FILTER_CMDID,
504     /** enable/disable periodic frame injection */
505     WMI_PDEV_FRAME_INJECT_CMDID,
506     /*
507      * Pdev level command to:
508      * a) solicit @WMI_TBTTOFFSET_EXT_UPDATE_EVENTID having TBTT in qtime
509      *    domain for all active vdevs or
510      * b) update one pdevs tbtt offset to another pdev for use in
511      *    RNR TBTT offset calculation.
512      */
513     WMI_PDEV_TBTT_OFFSET_SYNC_CMDID,
514     /** Bss color bitmap for SRG based spatial reuse feature */
515     WMI_PDEV_SET_SRG_BSS_COLOR_BITMAP_CMDID,
516     /** Partial BSSID bitmap for SRG based spatial reuse feature */
517     WMI_PDEV_SET_SRG_PARTIAL_BSSID_BITMAP_CMDID,
518     /** OBSS color enable bitmap for SRG based spatial reuse feature */
519     WMI_PDEV_SET_SRG_OBSS_COLOR_ENABLE_BITMAP_CMDID,
520     /** OBSS BSSID enable bitmap for SRG based spatial reuse feature */
521     WMI_PDEV_SET_SRG_OBSS_BSSID_ENABLE_BITMAP_CMDID,
522     /** OBSS color enable bitmap for NON_SRG based spatial reuse feature */
523     WMI_PDEV_SET_NON_SRG_OBSS_COLOR_ENABLE_BITMAP_CMDID,
524     /** OBSS BSSID enable bitmap for NON_SRG based spatial reuse feature */
525     WMI_PDEV_SET_NON_SRG_OBSS_BSSID_ENABLE_BITMAP_CMDID,
526     /** TPC stats display command */
527     WMI_PDEV_GET_TPC_STATS_CMDID,
528     /** ENABLE/DISABLE Duration based tx mode selection */
529     WMI_PDEV_ENABLE_DURATION_BASED_TX_MODE_SELECTION_CMDID,
530     /* Get DPD status from HALPHY */
531     WMI_PDEV_GET_DPD_STATUS_CMDID,
532     /* Set bios sar table */
533     WMI_PDEV_SET_BIOS_SAR_TABLE_CMDID,
534     /* Set bios geo table */
535     WMI_PDEV_SET_BIOS_GEO_TABLE_CMDID,
536     /* Get Calibration status from HALPHY */
537     WMI_PDEV_GET_HALPHY_CAL_STATUS_CMDID,
538     /* Set HALPHY CAL bitmap */
539     WMI_PDEV_SET_HALPHY_CAL_BMAP_CMDID,
540     /* WMI cmd to set a single vdev param for multiple vdevs */
541     WMI_PDEV_MULTIPLE_VDEV_SET_PARAM_CMDID,
542     /* Configure MEC AGING TIMER */
543     WMI_PDEV_MEC_AGING_TIMER_CONFIG_CMDID,
544     /* Set bios interface table */
545     WMI_PDEV_SET_BIOS_INTERFACE_CMDID,
546     WMI_PDEV_FIPS_EXTEND_CMDID,
547     WMI_PDEV_FIPS_MODE_SET_CMDID,
548     WMI_PDEV_FEATURESET_CMDID,
549     /** tag as Filter Pass category and the filters set for FP mode */
550     WMI_PDEV_MESH_RX_FILTER_ENABLE_CMDID,
551     /* WMI cmd to set Target rate to power table */
552     WMI_PDEV_SET_TGTR2P_TABLE_CMDID,
553     /* WMI cmd to set RF path for PHY */
554     WMI_PDEV_SET_RF_PATH_CMDID,
555     /** WSI stats info WMI command */
556     WMI_PDEV_WSI_STATS_INFO_CMDID,
557     /*
558      * WMI cmd to Enable LED blink based on Tx+Rx Data Rate
559      * and download LED ON/OFF Rate table
560      */
561     WMI_PDEV_ENABLE_LED_BLINK_DOWNLOAD_TABLE_CMDID,
562     /** WMI Command to enable wifi radar */
563     WMI_PDEV_ENABLE_WIFI_RADAR_CMDID,
564     /* WMI Command to enable xLNA */
565     WMI_PDEV_ENABLE_XLNA_CMDID,
566     /**
567      * WMI cmd to set custom TX power backoff value per band/chain/MCS to PHY.
568      */
569     WMI_PDEV_SET_CUSTOM_TX_POWER_PER_MCS_CMDID,
570 
571 
572     /* VDEV (virtual device) specific commands */
573     /** vdev create */
574     WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_VDEV),
575     /** vdev delete */
576     WMI_VDEV_DELETE_CMDID,
577     /** vdev start request */
578     WMI_VDEV_START_REQUEST_CMDID,
579     /** vdev restart request (RX only, NO TX, used for CAC period)*/
580     WMI_VDEV_RESTART_REQUEST_CMDID,
581     /** vdev up request */
582     WMI_VDEV_UP_CMDID,
583     /** vdev stop request */
584     WMI_VDEV_STOP_CMDID,
585     /** vdev down request */
586     WMI_VDEV_DOWN_CMDID,
587     /* set a vdev param */
588     WMI_VDEV_SET_PARAM_CMDID,
589     /* set a key (used for setting per peer unicast and per vdev multicast) */
590     WMI_VDEV_INSTALL_KEY_CMDID,
591 
592     /* wnm sleep mode command */
593     WMI_VDEV_WNM_SLEEPMODE_CMDID,
594     WMI_VDEV_WMM_ADDTS_CMDID,
595     WMI_VDEV_WMM_DELTS_CMDID,
596     WMI_VDEV_SET_WMM_PARAMS_CMDID,
597     WMI_VDEV_SET_GTX_PARAMS_CMDID,
598     WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID,
599 
600     WMI_VDEV_PLMREQ_START_CMDID,
601     WMI_VDEV_PLMREQ_STOP_CMDID,
602     /* TSF timestamp action for specified vdev */
603     WMI_VDEV_TSF_TSTAMP_ACTION_CMDID,
604     /** set the additional IEs in probe requests for scan or
605      *  assoc req etc for frames FW locally generates */
606     WMI_VDEV_SET_IE_CMDID,
607 
608     WMI_VDEV_RATEMASK_CMDID,
609     /** ATF VDEV REQUEST commands. */
610     WMI_VDEV_ATF_REQUEST_CMDID,
611     /** Command to send the DSCP-to-TID map to the target for VAP */
612     WMI_VDEV_SET_DSCP_TID_MAP_CMDID,
613     /* Configure filter for Neighbor Rx Pkt (smart mesh selective listening) */
614     WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID,
615     /** set quiet ie parameters. primarily used in AP mode */
616     WMI_VDEV_SET_QUIET_MODE_CMDID,
617     /** To set custom aggregation size for per vdev */
618     WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID,
619 
620     /* DISA feature: Encrypt-decrypt data request */
621     WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID,
622 
623     /** Command to enable mac randomizaton **/
624     WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_CMDID,
625 
626     /** WMI commands related to dbg arp stats */
627     WMI_VDEV_SET_ARP_STAT_CMDID,
628     WMI_VDEV_GET_ARP_STAT_CMDID,
629 
630     /** get tx power for the current vdev */
631     WMI_VDEV_GET_TX_POWER_CMDID,
632     /* limit STA offchannel activity */
633     WMI_VDEV_LIMIT_OFFCHAN_CMDID,
634     /** To set custom software retries per-AC for vdev */
635     WMI_VDEV_SET_CUSTOM_SW_RETRY_TH_CMDID,
636     /** To set chainmask configuration for vdev */
637     WMI_VDEV_CHAINMASK_CONFIG_CMDID,
638 
639     WMI_VDEV_GET_BCN_RECEPTION_STATS_CMDID,
640     /* request LTE-Coex info */
641     WMI_VDEV_GET_MWS_COEX_INFO_CMDID,
642     /** delete all peer (excluding bss peer) */
643     WMI_VDEV_DELETE_ALL_PEER_CMDID,
644     /* To set bss max idle time related parameters */
645     WMI_VDEV_BSS_MAX_IDLE_TIME_CMDID,
646     /** Indicates FW to trigger Audio sync  */
647     WMI_VDEV_AUDIO_SYNC_TRIGGER_CMDID,
648     /** Gives Qtimer value  to FW  */
649     WMI_VDEV_AUDIO_SYNC_QTIMER_CMDID,
650     /** Preferred channel list for each vdev */
651     WMI_VDEV_SET_PCL_CMDID,
652     /** VDEV_GET_BIG_DATA_CMD IS DEPRECATED - DO NOT USE */
653     WMI_VDEV_GET_BIG_DATA_CMDID,
654     /** Get per vdev BIG DATA stats phase 2 */
655     WMI_VDEV_GET_BIG_DATA_P2_CMDID,
656     /** set TPC PSD/non-PSD power */
657     WMI_VDEV_SET_TPC_POWER_CMDID,
658     /** IGMP OFFLOAD */
659     WMI_VDEV_IGMP_OFFLOAD_CMDID,
660     /** Enable/Disable Intra Bss for each vdev */
661     WMI_VDEV_ENABLE_DISABLE_INTRA_BSS_CMDID,
662     /* set vdev mu sniffer param */
663     WMI_VDEV_SET_MU_SNIF_CMDID,
664     /** ICMP OFFLOAD */
665     WMI_VDEV_ICMP_OFFLOAD_CMDID,
666     /** Update vdev mac address */
667     WMI_VDEV_UPDATE_MAC_ADDR_CMDID,
668     /* WMI cmd to perform operation on multiple peer based on subcmd type */
669     WMI_VDEV_MULTIPLE_PEER_GROUP_CMDID,
670     /** Set LTF key seed which will be further used to derive LTF keys */
671     WMI_VDEV_SET_LTF_KEY_SEED_CMDID,
672 
673     WMI_VDEV_PN_MGMT_RX_FILTER_CMDID,
674 
675     /** Enable SR prohibit feature for TIDs of vdev */
676     WMI_VDEV_PARAM_ENABLE_SR_PROHIBIT_CMDID,
677 
678     /** pause vdev's Tx, Rx, or both for a specific duration */
679     WMI_VDEV_PAUSE_CMDID,
680 
681     /** WMI Command to set status of CSA event from HOST */
682     WMI_CSA_EVENT_STATUS_INDICATION_CMDID,
683 
684     /** Request to firmware to probe scheduler modes */
685     WMI_VDEV_SCHED_MODE_PROBE_REQ_CMDID,
686 
687     /** Connect request on the vdev */
688     WMI_VDEV_OOB_CONNECTION_REQ_CMDID,
689 
690 
691     /* peer specific commands */
692 
693     /** create a peer */
694     WMI_PEER_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PEER),
695     /** delete a peer */
696     WMI_PEER_DELETE_CMDID,
697     /** flush specific  tid queues of a peer */
698     WMI_PEER_FLUSH_TIDS_CMDID,
699     /** set a parameter of a peer */
700     WMI_PEER_SET_PARAM_CMDID,
701     /** set peer to associated state. will cary all parameters determined during assocication time */
702     WMI_PEER_ASSOC_CMDID,
703     /**add a wds  (4 address) entry. used only for testing WDS feature on AP products */
704     WMI_PEER_ADD_WDS_ENTRY_CMDID,
705     /**remove wds  (4 address) entry. used only for testing WDS feature on AP products */
706     WMI_PEER_REMOVE_WDS_ENTRY_CMDID,
707     /** set up mcast group info for multicast to unicast conversion */
708     WMI_PEER_MCAST_GROUP_CMDID,
709     /** request peer info from FW. FW shall respond with PEER_INFO_EVENTID */
710     WMI_PEER_INFO_REQ_CMDID,
711     /** request the estimated link speed for the peer. FW shall respond with
712      *  WMI_PEER_ESTIMATED_LINKSPEED_EVENTID.
713      */
714     WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID,
715     /** Set the conditions to report peer justified rate to driver
716      * The justified rate means the user-rate is justified by PER.
717      */
718     WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID,
719 
720     /** update a wds (4 address) entry */
721     WMI_PEER_UPDATE_WDS_ENTRY_CMDID,
722     /** add a proxy sta entry */
723     WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID,
724     /** Set Smart Antenna TX antenna */
725     WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID,
726     /** Set Smart Antenna TX train info */
727     WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID,
728     /** Set SA node config options */
729     WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID,
730     /** ATF PEER REQUEST commands */
731     WMI_PEER_ATF_REQUEST_CMDID,
732     /** bandwidth fairness (BWF) peer configuration request command */
733     WMI_PEER_BWF_REQUEST_CMDID,
734     /** rx reorder queue setup for peer/tid */
735     WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
736     /** rx reorder queue remove for peer/tid */
737     WMI_PEER_REORDER_QUEUE_REMOVE_CMDID,
738     /** specify a limit for rx A-MPDU block size */
739     WMI_PEER_SET_RX_BLOCKSIZE_CMDID,
740     /** request peer antdiv info from FW. FW shall respond with PEER_ANTDIV_INFO_EVENTID */
741     WMI_PEER_ANTDIV_INFO_REQ_CMDID,
742     /*
743      * The WMI_PEER_OPER_MODE_CHANGE_EVENTID def was originally mistakenly
744      * placed here, amongst the CMDID defs.
745      * The WMI_PEER_OPER_MODE_CHANGE_EVENTID def has been moved to the
746      * EVENTID section, but to preserve backwards compatibility, the value
747      * here that had been used for WMI_PEER_OPER_MODE_CHANGE_EVENTID
748      * is kept reserved/deprecated.
749      *
750      * This WMI_PEER_RESERVED0_CMDID value can be replaced with an actual
751      * WMI peer event message ID, though it will be simpler to instead add
752      * new WMI_PEER CMDID defs at the end of the WMI_GRP_PEER WMI_CMD_GRP.
753      */
754     WMI_PEER_RESERVED0_CMDID,
755     /** Peer/Tid/Msduq threshold update */
756     WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID,
757     /** TID specific configurations per peer of type
758      * wmi_peer_tid_configurations_cmd_fixed_param
759      */
760     WMI_PEER_TID_CONFIGURATIONS_CMDID,
761 
762     /** Peer configuration for Channel Frequency Response (CFR) capture
763      * of type wmi_peer_cfr_capture_cmd.
764      *
765      * On targets that do not use the direct DMA framework,
766      * completion of the CFR capture is communicated through
767      * HTT_T2H_MSG_TYPE_CFR_DUMP_COMPL_IND.
768      * Such targets will set WMI_SERVICE_CFR_CAPTURE_IND_MSG_TYPE_1
769      * in WMI Service Ready.
770      *
771      * On targets that use direct DMA, completion of CFR capture is
772      * communicated through WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID
773      * using module ID WMI_DMA_RING_CONFIG_MODULE_RTT.
774      * Such targets will set WMI_SERVICE_CFR_CAPTURE_IND_EVT_TYPE_1
775      * in WMI Service Ready and enumerate WMI_DMA_RING_CONFIG_MODULE_RTT
776      * in the dma_ring_caps entry of WMI_SERVICE_READY_EXT_EVENTID.
777      * Additional MAC metadata is provided in WMI_PEER_CFR_CAPTURE_EVENTID.
778      */
779     WMI_PEER_CFR_CAPTURE_CMDID,
780 
781     /** WMI command related to AP channel width switching */
782     WMI_PEER_CHAN_WIDTH_SWITCH_CMDID,
783 
784     /** WMI command to fetch current tx PN for the peer */
785     WMI_PEER_TX_PN_REQUEST_CMDID,
786 
787     /** unmap response with peer ids */
788     WMI_PEER_UNMAP_RESPONSE_CMDID,
789 
790     /** WMI command for per-peer configuration of VLAN header operations
791      * during TX and RX
792      */
793     WMI_PEER_CONFIG_VLAN_CMDID,
794 
795     /** WMI command for per-peer configuration of PPE DS */
796     WMI_PEER_CONFIG_PPE_DS_CMDID,
797 
798     /** Enable/Disable Intra Bss for the peer */
799     WMI_PEER_ENABLE_DISABLE_INTRA_BSS_CMDID,
800 
801     WMI_PEER_RX_PN_REQUEST_CMDID,
802 
803     /* Mac addr based filtering*/
804     WMI_PEER_TX_FILTER_CMDID,
805 
806     /** flush specific tid queues of a peer */
807     WMI_PEER_FLUSH_POLICY_CMDID,
808 
809     /* Set disabled scheduler modes for one or more peers */
810     WMI_PEER_SCHED_MODE_DISABLE_CMDID,
811 
812     /* Group SET cmd for PEERS */
813     WMI_PEER_BULK_SET_CMDID,
814 
815     /* WMI command to setup reorder queue for multiple TIDs */
816     WMI_PEER_MULTIPLE_REORDER_QUEUE_SETUP_CMDID,
817 
818     /* beacon/management specific commands */
819 
820     /** transmit beacon by reference . used for transmitting beacon on low latency interface like pcie */
821     WMI_BCN_TX_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MGMT),
822     /** transmit beacon by value */
823     WMI_PDEV_SEND_BCN_CMDID,
824     /** set the beacon template. used in beacon offload mode to setup the
825      *  the common beacon template with the FW to be used by FW to generate beacons */
826     WMI_BCN_TMPL_CMDID,
827     /** set beacon filter with FW */
828     WMI_BCN_FILTER_RX_CMDID,
829     /* enable/disable filtering of probe requests in the firmware */
830     WMI_PRB_REQ_FILTER_RX_CMDID,
831     /** transmit management frame by value. will be deprecated */
832     WMI_MGMT_TX_CMDID,
833     /** set the probe response template. used in beacon offload mode to setup the
834      *  the common probe response template with the FW to be used by FW to generate
835      *  probe responses */
836     WMI_PRB_TMPL_CMDID,
837     /** Transmit Mgmt frame by reference */
838     WMI_MGMT_TX_SEND_CMDID,
839     /** Transmit data frame by reference */
840     WMI_OFFCHAN_DATA_TX_SEND_CMDID,
841     /** transmit FILS Discovery frame by value */
842     WMI_PDEV_SEND_FD_CMDID,
843     /** Cmd to enable/disable offloaded beacons */
844     WMI_BCN_OFFLOAD_CTRL_CMDID,
845     /** Cmd to enable FW handling BSS color change notification from AP. */
846     WMI_BSS_COLOR_CHANGE_ENABLE_CMDID,
847     /** To configure Beacon offload quiet-ie params */
848     WMI_VDEV_BCN_OFFLOAD_QUIET_CONFIG_CMDID,
849     /** set FILS Discovery frame template for FW to generate FD frames */
850     WMI_FD_TMPL_CMDID,
851     /** Transmit QoS null Frame over wmi interface */
852     WMI_QOS_NULL_FRAME_TX_SEND_CMDID,
853     /** WMI CMD to receive the management filter criteria from the host for RX REO */
854     WMI_MGMT_RX_REO_FILTER_CONFIGURATION_CMDID,
855 
856     /** commands to directly control ba negotiation directly from host. only used in test mode */
857 
858     /** turn off FW Auto addba mode and let host control addba */
859     WMI_ADDBA_CLEAR_RESP_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BA_NEG),
860     /** send add ba request */
861     WMI_ADDBA_SEND_CMDID,
862     WMI_ADDBA_STATUS_CMDID,
863     /** send del ba */
864     WMI_DELBA_SEND_CMDID,
865     /** set add ba response will be used by FW to generate addba response*/
866     WMI_ADDBA_SET_RESP_CMDID,
867     /** send single VHT MPDU with AMSDU */
868     WMI_SEND_SINGLEAMSDU_CMDID,
869 
870     /** Station power save specific config */
871     /** enable/disable station powersave */
872     WMI_STA_POWERSAVE_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STA_PS),
873     /** set station power save specific parameter */
874     WMI_STA_POWERSAVE_PARAM_CMDID,
875     /** set station mimo powersave mode */
876     WMI_STA_MIMO_PS_MODE_CMDID,
877     /** config station TX cycle percentage in a beacon interval */
878     WMI_STA_TDCC_CONFIG_CMDID,
879 
880 
881     /** DFS-specific commands */
882     /** enable DFS (radar detection)*/
883     WMI_PDEV_DFS_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DFS),
884     /** disable DFS (radar detection)*/
885     WMI_PDEV_DFS_DISABLE_CMDID,
886     /** enable DFS phyerr/parse filter offload */
887     WMI_DFS_PHYERR_FILTER_ENA_CMDID,
888     /** enable DFS phyerr/parse filter offload */
889     WMI_DFS_PHYERR_FILTER_DIS_CMDID,
890     /** enable DFS phyerr processing offload */
891     WMI_PDEV_DFS_PHYERR_OFFLOAD_ENABLE_CMDID,
892     /** disable DFS phyerr processing offload */
893     WMI_PDEV_DFS_PHYERR_OFFLOAD_DISABLE_CMDID,
894     /** set ADFS channel config */
895     WMI_VDEV_ADFS_CH_CFG_CMDID,
896     /** abort ADFS off-channel-availability-check currently in progress */
897     WMI_VDEV_ADFS_OCAC_ABORT_CMDID,
898 
899     /* Roaming specific commands */
900     /** set roam scan mode */
901     WMI_ROAM_SCAN_MODE = WMI_CMD_GRP_START_ID(WMI_GRP_ROAM),
902     /** set roam scan RSSI threshold below which roam scan is enabled  */
903     WMI_ROAM_SCAN_RSSI_THRESHOLD,
904     /** set roam scan period for periodic roam scan mode  */
905     WMI_ROAM_SCAN_PERIOD,
906     /** set roam scan trigger RSSI change threshold   */
907     WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
908     /** set roam AP profile   */
909     WMI_ROAM_AP_PROFILE,
910     /** set channel list for roam scans */
911     WMI_ROAM_CHAN_LIST,
912     /** Stop scan command */
913     WMI_ROAM_SCAN_CMD,
914     /** roaming sme offload sync complete */
915     WMI_ROAM_SYNCH_COMPLETE,
916     /** set ric request element for 11r roaming */
917     WMI_ROAM_SET_RIC_REQUEST_CMDID,
918     /** Invoke roaming forcefully */
919     WMI_ROAM_INVOKE_CMDID,
920     /** roaming filter cmd to allow further filtering of roaming candidate */
921     WMI_ROAM_FILTER_CMDID,
922     /** set gateway ip, mac and retries for subnet change detection */
923     WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID,
924     /** configure thresholds for MAWC */
925     WMI_ROAM_CONFIGURE_MAWC_CMDID,
926     /** configure MultiBand Operation(refer WFA MBO spec) parameter */
927     WMI_ROAM_SET_MBO_PARAM_CMDID, /* DEPRECATED */
928     /** configure packet error rate threshold for triggering roaming */
929     WMI_ROAM_PER_CONFIG_CMDID,
930     /** configure BSS Transition Management (BTM) offload for roaming */
931     WMI_ROAM_BTM_CONFIG_CMDID,
932     /** Enable or Disable Fast Initial Link Setup (FILS) feature */
933     WMI_ENABLE_FILS_CMDID,
934     /** Request for roam scan stats */
935     WMI_REQUEST_ROAM_SCAN_STATS_CMDID,
936     /** Configure BSS load parameters for roam trigger */
937     WMI_ROAM_BSS_LOAD_CONFIG_CMDID,
938     /** Configure deauth roam trigger parameters */
939     WMI_ROAM_DEAUTH_CONFIG_CMDID,
940     /** Configure idle roam trigger parameters */
941     WMI_ROAM_IDLE_CONFIG_CMDID,
942     /**
943      * WMI_ROAM_DSM_FILTER_CMDID is deprecated and should be unused,
944      * but leave it reserved just to be safe.
945      */
946     DEPRECATED__WMI_ROAM_DSM_FILTER_CMDID,
947     /** Enable or disable roaming triggers */
948     WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON_CMDID,
949     /** Pre-Authentication completion status command */
950     WMI_ROAM_PREAUTH_STATUS_CMDID,
951     /** Command to get roam scan channels list */
952     WMI_ROAM_GET_SCAN_CHANNEL_LIST_CMDID,
953     /** configure MLO parameters for roaming */
954     WMI_ROAM_MLO_CONFIG_CMDID,
955     /** set roam params **/
956     WMI_ROAM_SET_PARAM_CMDID,
957     /** Enable or Disable roam vendor control */
958     WMI_ROAM_ENABLE_VENDOR_CONTROL_CMDID,
959     /** Get firmware ini value */
960     WMI_ROAM_GET_VENDOR_CONTROL_PARAM_CMDID,
961 
962     /** offload scan specific commands */
963     /** set offload scan AP profile   */
964     WMI_OFL_SCAN_ADD_AP_PROFILE = WMI_CMD_GRP_START_ID(WMI_GRP_OFL_SCAN),
965     /** remove offload scan AP profile   */
966     WMI_OFL_SCAN_REMOVE_AP_PROFILE,
967     /** set offload scan period   */
968     WMI_OFL_SCAN_PERIOD,
969 
970     /* P2P specific commands */
971     /**set P2P device info. FW will used by FW to create P2P IE to be carried in probe response
972      * generated during p2p listen and for p2p discoverability  */
973     WMI_P2P_DEV_SET_DEVICE_INFO = WMI_CMD_GRP_START_ID(WMI_GRP_P2P),
974     /** enable/disable p2p discoverability on STA/AP VDEVs  */
975     WMI_P2P_DEV_SET_DISCOVERABILITY,
976     /** set p2p ie to be carried in beacons generated by FW for GO  */
977     WMI_P2P_GO_SET_BEACON_IE,
978     /** set p2p ie to be carried in probe response frames generated by FW for GO  */
979     WMI_P2P_GO_SET_PROBE_RESP_IE,
980     /** set the vendor specific p2p ie data. FW will use this to parse the P2P NoA
981      *  attribute in the beacons/probe responses received.
982      *  Note: This command is currently used only for Apple P2P implementation.
983      */
984     WMI_P2P_SET_VENDOR_IE_DATA_CMDID,
985     /** set the configure of p2p find offload */
986     WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID,
987     /** set the vendor specific p2p ie data for p2p find offload using */
988     WMI_P2P_DISC_OFFLOAD_APPIE_CMDID,
989     /** set the BSSID/device name pattern of p2p find offload */
990     WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID,
991     /** set OppPS related parameters **/
992     WMI_P2P_SET_OPPPS_PARAM_CMDID,
993     /** set listen offload start related parameters */
994     WMI_P2P_LISTEN_OFFLOAD_START_CMDID,
995     /** set listen offload stop related parameters */
996     WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID,
997 
998     /** AP power save specific config */
999     /** set AP power save specific param */
1000     WMI_AP_PS_PEER_PARAM_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_AP_PS),
1001     /** set AP UAPSD coex specific param */
1002     WMI_AP_PS_PEER_UAPSD_COEX_CMDID,
1003     /** set Enhanced Green AP param */
1004     WMI_AP_PS_EGAP_PARAM_CMDID,
1005 
1006     /** Rate-control specific commands */
1007     WMI_PEER_RATE_RETRY_SCHED_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RATE_CTRL),
1008 
1009     /** WLAN Profiling commands. */
1010     WMI_WLAN_PROFILE_TRIGGER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROFILE),
1011     WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
1012     WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
1013     WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
1014     WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
1015 
1016     /** Suspend resume command Ids */
1017     WMI_PDEV_SUSPEND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SUSPEND),
1018     WMI_PDEV_RESUME_CMDID,
1019 
1020     /* Beacon filter commands */
1021     /** add a beacon filter */
1022     WMI_ADD_BCN_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BCN_FILTER),
1023     /** remove a  beacon filter */
1024     WMI_RMV_BCN_FILTER_CMDID,
1025 
1026     /* WOW Specific WMI commands*/
1027     /** add pattern for awake */
1028     WMI_WOW_ADD_WAKE_PATTERN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WOW),
1029     /** deleta a wake pattern */
1030     WMI_WOW_DEL_WAKE_PATTERN_CMDID,
1031     /** enable/deisable wake event  */
1032     WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
1033     /** enable WOW  */
1034     WMI_WOW_ENABLE_CMDID,
1035     /** host woke up from sleep event to FW. Generated in response to WOW Hardware event */
1036     WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
1037     /* IOAC add keep alive cmd. */
1038     WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID,
1039     /* IOAC del keep alive cmd. */
1040     WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID,
1041     /* IOAC add pattern for awake */
1042     WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID,
1043     /* IOAC deleta a wake pattern */
1044     WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID,
1045     /* D0-WOW enable or disable cmd */
1046     WMI_D0_WOW_ENABLE_DISABLE_CMDID,
1047     /* enable extend WoW */
1048     WMI_EXTWOW_ENABLE_CMDID,
1049     /* Extend WoW command to configure app type1 parameter */
1050     WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID,
1051     /* Extend WoW command to configure app type2 parameter */
1052     WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID,
1053     /* enable ICMPv6 Network advertisement filtering */
1054     WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID,
1055     /*
1056      * Set a pattern to match UDP packet in WOW mode.
1057      * If match, construct a tx frame in a local buffer
1058      * to send through the peer AP to the entity in the
1059      * IP network that sent the UDP packet to this STA.
1060      */
1061     WMI_WOW_UDP_SVC_OFLD_CMDID,
1062     /* configure WOW host wakeup PIN pattern */
1063     WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID,
1064 
1065     /* Set which action category should wake the host from suspend */
1066     WMI_WOW_SET_ACTION_WAKE_UP_CMDID,
1067 
1068     /*
1069      * Set a pattern to match broadcast CoAP packet in WoW mode.
1070      * If match and verify pass, cache the packet and then reply
1071      * a unicast response in local with pre-configured packet.
1072      */
1073     WMI_WOW_COAP_ADD_PATTERN_CMDID,
1074 
1075     /* Delete a pattern match broadcast CoAP packet */
1076     WMI_WOW_COAP_DEL_PATTERN_CMDID,
1077 
1078     /*
1079      * Add a CoAP keepalive pattern to send a CoAP broadcast packet
1080      * when configured timeout occurred.
1081      */
1082     WMI_WOW_COAP_ADD_KEEPALIVE_PATTERN_CMDID,
1083 
1084     /* Delete a CoAP keepalive pattern */
1085     WMI_WOW_COAP_DEL_KEEPALIVE_PATTERN_CMDID,
1086 
1087     /* Host read the cached CoAP packets after resume */
1088     WMI_WOW_COAP_GET_BUF_INFO_CMDID,
1089 
1090 
1091     /* RTT measurement related cmd */
1092     /** request to make an RTT measurement */
1093     WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RTT),
1094     /** request to report a tsf measurement */
1095     WMI_RTT_TSF_CMDID,
1096     /** RTT 11az PASN authentication status */
1097     WMI_RTT_PASN_AUTH_STATUS_CMD,
1098     /** RTT 11az PASN deauthentication cmd */
1099     WMI_RTT_PASN_DEAUTH_CMD,
1100 
1101     /** spectral scan command */
1102     /** configure spectral scan */
1103     WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SPECTRAL),
1104     /** enable/disable spectral scan and trigger */
1105     WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
1106 
1107     /* F/W stats */
1108     /** one time request for stats */
1109     WMI_REQUEST_STATS_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STATS),
1110     /** Push MCC Adaptive Scheduler Stats to Firmware */
1111     WMI_MCC_SCHED_TRAFFIC_STATS_CMDID,
1112     /** one time request for txrx stats */
1113     WMI_REQUEST_STATS_EXT_CMDID,
1114     /* Link Layer stats */
1115     /** Request for link layer stats */
1116     WMI_REQUEST_LINK_STATS_CMDID,
1117     /** Request for setting params to link layer stats */
1118     WMI_START_LINK_STATS_CMDID,
1119     /** Request to clear stats*/
1120     WMI_CLEAR_LINK_STATS_CMDID,
1121 
1122     /** Request for getting the Firmware Memory Dump */
1123     WMI_GET_FW_MEM_DUMP_CMDID,
1124 
1125     /** Request to flush of the buffered debug messages */
1126     WMI_DEBUG_MESG_FLUSH_CMDID,
1127 
1128     /** Cmd to configure the verbose level */
1129     WMI_DIAG_EVENT_LOG_CONFIG_CMDID,
1130 
1131     /** One time request for wlan stats */
1132     WMI_REQUEST_WLAN_STATS_CMDID,
1133 
1134     /** Request for getting RCPI of peer */
1135     WMI_REQUEST_RCPI_CMDID,
1136 
1137     /** One time request for peer stats info */
1138     WMI_REQUEST_PEER_STATS_INFO_CMDID,
1139 
1140     /** One time request for radio channel stats */
1141     WMI_REQUEST_RADIO_CHAN_STATS_CMDID,
1142 
1143     /** request for WLM (wlan latency manager) stats */
1144     WMI_REQUEST_WLM_STATS_CMDID,
1145 
1146     /** request for control path stats */
1147     WMI_REQUEST_CTRL_PATH_STATS_CMDID,
1148 
1149     /** unified request for LL stats and get station cmds */
1150     WMI_REQUEST_UNIFIED_LL_GET_STA_CMDID,
1151 
1152     /** request for thermal stats */
1153     WMI_REQUEST_THERMAL_STATS_CMDID,
1154 
1155     /** request for HALPHY stats through ctrl path */
1156     WMI_REQUEST_HALPHY_CTRL_PATH_STATS_CMDID,
1157 
1158 
1159     /** ARP OFFLOAD REQUEST*/
1160     WMI_SET_ARP_NS_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_ARP_NS_OFL),
1161 
1162     /** Proactive ARP Response Add Pattern Command*/
1163     WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID,
1164 
1165     /** Proactive ARP Response Del Pattern Command*/
1166     WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID,
1167 
1168     /** NS offload confid*/
1169     WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NLO_OFL),
1170 
1171     /** APFIND Config */
1172     WMI_APFIND_CMDID,
1173 
1174     /** Passpoint list config  */
1175     WMI_PASSPOINT_LIST_CONFIG_CMDID,
1176 
1177     /** configure suppressing parameters for MAWC */
1178     WMI_NLO_CONFIGURE_MAWC_CMDID,
1179 
1180     /* GTK offload Specific WMI commands*/
1181     WMI_GTK_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GTK_OFL),
1182 
1183     /* CSA offload Specific WMI commands*/
1184     /** csa offload enable */
1185     WMI_CSA_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CSA_OFL),
1186     /** chan switch command */
1187     WMI_CSA_OFFLOAD_CHANSWITCH_CMDID,
1188 
1189     /* Chatter commands*/
1190     /* Change chatter mode of operation */
1191     WMI_CHATTER_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CHATTER),
1192     /** chatter add coalescing filter command */
1193     WMI_CHATTER_ADD_COALESCING_FILTER_CMDID,
1194     /** chatter delete coalescing filter command */
1195     WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID,
1196     /** chatter coalecing query command */
1197     WMI_CHATTER_COALESCING_QUERY_CMDID,
1198 
1199     /**addba specific commands */
1200     /** start the aggregation on this TID */
1201     WMI_PEER_TID_ADDBA_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TID_ADDBA),
1202     /** stop the aggregation on this TID */
1203     WMI_PEER_TID_DELBA_CMDID,
1204 
1205     /** set station mimo powersave method */
1206     WMI_STA_DTIM_PS_METHOD_CMDID,
1207     /** Configure the Station UAPSD AC Auto Trigger Parameters */
1208     WMI_STA_UAPSD_AUTO_TRIG_CMDID,
1209     /** Configure the Keep Alive Parameters */
1210     WMI_STA_KEEPALIVE_CMDID,
1211 
1212     /* Request ssn from target for a sta/tid pair */
1213     WMI_BA_REQ_SSN_CMDID,
1214 
1215 
1216     /* misc command group */
1217     /** echo command mainly used for testing */
1218     WMI_ECHO_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MISC),
1219 
1220     /* !!IMPORTANT!!
1221      * If you need to add a new WMI command to the WMI_GRP_MISC sub-group,
1222      * please make sure you add it BEHIND WMI_PDEV_UTF_CMDID,
1223      * as we MUST have a fixed value here to maintain compatibility between
1224      * UTF and the ART2 driver
1225      */
1226     /** UTF WMI commands */
1227     WMI_PDEV_UTF_CMDID,
1228 
1229     /** set debug log config */
1230     WMI_DBGLOG_CFG_CMDID,
1231     /* QVIT specific command id */
1232     WMI_PDEV_QVIT_CMDID,
1233     /* Factory Testing Mode request command
1234      * used for integrated chipsets */
1235     WMI_PDEV_FTM_INTG_CMDID,
1236     /* set and get keepalive parameters command */
1237     WMI_VDEV_SET_KEEPALIVE_CMDID,
1238     WMI_VDEV_GET_KEEPALIVE_CMDID,
1239     /* For fw recovery test command */
1240     WMI_FORCE_FW_HANG_CMDID,
1241     /* Set Mcast/Bdcast filter */
1242     WMI_SET_MCASTBCAST_FILTER_CMDID,
1243     /** set thermal management params **/
1244     WMI_THERMAL_MGMT_CMDID,
1245     /** set host auto shutdown params **/
1246     WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID,
1247     /** set tpc chainmask config command */
1248     WMI_TPC_CHAINMASK_CONFIG_CMDID,
1249     /** set Antenna diversity command */
1250     WMI_SET_ANTENNA_DIVERSITY_CMDID,
1251     /** Set OCB Sched Request, deprecated */
1252     WMI_OCB_SET_SCHED_CMDID,
1253     /** Set RSSI monitoring config command */
1254     WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID,
1255     /** Enable/disable Large Receive Offload processing; provide cfg params */
1256     WMI_LRO_CONFIG_CMDID,
1257     /** transfer data from host to firmware to write flash */
1258     WMI_TRANSFER_DATA_TO_FLASH_CMDID,
1259     /** Command to enable/disable filtering of multicast IP with unicast mac */
1260     WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID,
1261     /** Command to control WISA mode */
1262     WMI_VDEV_WISA_CMDID,
1263     /** set debug log time stamp sync up with host */
1264     WMI_DBGLOG_TIME_STAMP_SYNC_CMDID,
1265     /** Command for host to set/delete multiple mcast filters */
1266     WMI_SET_MULTIPLE_MCAST_FILTER_CMDID,
1267     /** upload a requested section of data from firmware flash to host */
1268     WMI_READ_DATA_FROM_FLASH_CMDID,
1269     /* Thermal Throttling SET CONF commands */
1270     WMI_THERM_THROT_SET_CONF_CMDID,
1271     /* set runtime dpd recalibration params */
1272     WMI_RUNTIME_DPD_RECAL_CMDID,
1273     /* get TX power for input HALPHY parameters */
1274     WMI_GET_TPC_POWER_CMDID,
1275     /* Specify when to start monitoring for idle state */
1276     WMI_IDLE_TRIGGER_MONITOR_CMDID,
1277     /** set ELNA BYPASS status */
1278     WMI_SET_ELNA_BYPASS_CMDID,
1279     /** get ELNA BYPASS status */
1280     WMI_GET_ELNA_BYPASS_CMDID,
1281     /** get ANI level of the channels */
1282     WMI_GET_CHANNEL_ANI_CMDID,
1283     /** set OCL (One Chain Listen) mode */
1284     WMI_SET_OCL_CMDID,
1285     /** Consolidated params for pdev/vdev:
1286      * Set multiple parameters at once for one pdev or vdev.
1287      */
1288     WMI_SET_MULTIPLE_PDEV_VDEV_PARAM_CMDID,
1289 
1290     /* WMI cmd used to allocate HW scratch registers */
1291     WMI_PMM_SCRATCH_REG_ALLOCATION_CMDID,
1292 
1293     /* WMI cmd used to start/stop XGAP (XPAN Green AP) */
1294     WMI_XGAP_ENABLE_CMDID,
1295 
1296     /* H2T HPA message */
1297     WMI_HPA_CMDID,
1298 
1299     /* WMI comamnd for standalone sounding */
1300     WMI_VDEV_STANDALONE_SOUND_CMDID,
1301 
1302     /* WMI cmd used by host to send the switch response status to FW */
1303     WMI_AUDIO_TRANSPORT_SWITCH_RESP_STATUS_CMDID,
1304 
1305     /*  Offload 11k related requests */
1306     WMI_11K_OFFLOAD_REPORT_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_11K_OFFLOAD),
1307     /* invoke neighbor report from FW */
1308     WMI_11K_INVOKE_NEIGHBOR_REPORT_CMDID,
1309 
1310     /* GPIO Configuration */
1311     WMI_GPIO_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GPIO),
1312     WMI_GPIO_OUTPUT_CMDID,
1313 
1314     /* Txbf configuration command */
1315     WMI_TXBF_CMDID,
1316 
1317     /* Antenna Controller, connected to wlan debug uart/GPIO. */
1318     WMI_ANT_CONTROLLER_CMDID,
1319 
1320     WMI_GPIO_STATE_REQ_CMDID,
1321 
1322     /* FWTEST Commands */
1323     WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_FWTEST),
1324     /** set NoA descs **/
1325     WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID,
1326     /* UNIT Tests  */
1327     WMI_UNIT_TEST_CMDID,
1328     /* set debug and tuning parameters */
1329     WMI_FWTEST_CMDID,
1330     /* Q-Boost configuration test commands */
1331     WMI_QBOOST_CFG_CMDID,
1332     /* Simulation Test command  */
1333     WMI_SIMULATION_TEST_CMDID,
1334     /* WFA test config command */
1335     WMI_WFA_CONFIG_CMDID,
1336 
1337     /** TDLS Configuration */
1338     /** enable/disable TDLS */
1339     WMI_TDLS_SET_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TDLS),
1340     /** set tdls peer state */
1341     WMI_TDLS_PEER_UPDATE_CMDID,
1342     /** TDLS Offchannel control */
1343     WMI_TDLS_SET_OFFCHAN_MODE_CMDID,
1344 
1345     /** Resmgr Configuration */
1346     /** Adaptive OCS is enabled by default in the FW. This command is used to
1347      * disable FW based adaptive OCS.
1348      */
1349     WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RESMGR),
1350     /** set the requested channel time quota for the home channels */
1351     WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID,
1352     /** set the requested latency for the home channels */
1353     WMI_RESMGR_SET_CHAN_LATENCY_CMDID,
1354 
1355     /** STA SMPS Configuration */
1356     /** force SMPS mode */
1357     WMI_STA_SMPS_FORCE_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STA_SMPS),
1358     /** set SMPS parameters */
1359     WMI_STA_SMPS_PARAM_CMDID,
1360 
1361     /* Wlan HB commands*/
1362     /* enable/disable wlan HB */
1363     WMI_HB_SET_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLAN_HB),
1364     /* set tcp parameters for wlan HB */
1365     WMI_HB_SET_TCP_PARAMS_CMDID,
1366     /* set tcp pkt filter for wlan HB */
1367     WMI_HB_SET_TCP_PKT_FILTER_CMDID,
1368     /* set udp parameters for wlan HB */
1369     WMI_HB_SET_UDP_PARAMS_CMDID,
1370     /* set udp pkt filter for wlan HB */
1371     WMI_HB_SET_UDP_PKT_FILTER_CMDID,
1372 
1373     /* OIC ping keep alive */
1374     WMI_HB_OIC_PING_OFFLOAD_PARAM_CMDID,
1375     WMI_HB_OIC_PING_OFFLOAD_SET_ENABLE_CMDID,
1376 
1377     /* WMI commands related to DHCP Lease Renew Offload **/
1378     WMI_HB_DHCP_LEASE_RENEW_OFFLOAD_CMDID,
1379 
1380     /** Wlan RMC commands*/
1381     /** enable/disable RMC */
1382     WMI_RMC_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RMC),
1383     /** configure action frame period */
1384     WMI_RMC_SET_ACTION_PERIOD_CMDID,
1385     /** For debug/future enhancement purposes only,
1386      *  configures/finetunes RMC algorithms */
1387     WMI_RMC_CONFIG_CMDID,
1388     /** select manual leader */
1389     WMI_RMC_SET_MANUAL_LEADER_CMDID,
1390 
1391     /** WLAN MHF offload commands */
1392     /** enable/disable MHF offload */
1393     WMI_MHF_OFFLOAD_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MHF_OFL),
1394     /** Plumb routing table for MHF offload */
1395     WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID,
1396 
1397     /*location scan commands*/
1398     /*start batch scan*/
1399     WMI_BATCH_SCAN_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
1400     /*stop batch scan*/
1401     WMI_BATCH_SCAN_DISABLE_CMDID,
1402     /*get batch scan result*/
1403     WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID,
1404 
1405 
1406     /* OEM related cmd */
1407     WMI_OEM_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OEM),
1408     WMI_OEM_REQUEST_CMDID, /* UNUSED */
1409     /* OEM related cmd used for Low Power ranging */
1410     WMI_LPI_OEM_REQ_CMDID,
1411     WMI_OEM_DMA_RING_CFG_REQ_CMDID,
1412     /** Command to handle OEM's opaque data */
1413     WMI_OEM_DATA_CMDID,
1414 
1415 
1416     /** Nan Request */
1417     WMI_NAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NAN),
1418     /** Command to handle OEM's NAN specific opaque data */
1419     WMI_NAN_OEM_DATA_CMDID,
1420 
1421     /** Modem power state command */
1422     WMI_MODEM_POWER_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_COEX),
1423     WMI_CHAN_AVOID_UPDATE_CMDID,
1424     WMI_COEX_CONFIG_CMDID,
1425     WMI_CHAN_AVOID_RPT_ALLOW_CMDID,
1426     WMI_COEX_GET_ANTENNA_ISOLATION_CMDID,
1427     WMI_SAR_LIMITS_CMDID,
1428     WMI_SAR_GET_LIMITS_CMDID,
1429     /** Dedicated BT Antenna Mode (DBAM) command */
1430     WMI_COEX_DBAM_CMDID,
1431     WMI_TAS_POWER_HISTORY_CMDID,
1432     WMI_ESL_EGID_CMDID,
1433     WMI_COEX_MULTIPLE_CONFIG_CMDID,
1434 
1435     /**
1436      *  OBSS scan offload enable/disable commands
1437      *  OBSS scan enable CMD will send to FW after VDEV UP, if these conditions are true:
1438      *  1.  WMI_SERVICE_OBSS_SCAN is reported by FW in service ready,
1439      *  2.  STA connect to a 2.4 GHz ht20/ht40 AP,
1440      *  3.  AP enable 20/40 coexistence (OBSS_IE-74 can be found in beacon or association response)
1441      *  If OBSS parameters from beacon changed, also use enable CMD to update parameters.
1442      *  OBSS scan disable CMD will send to FW if have enabled when tearing down connection.
1443      */
1444     WMI_OBSS_SCAN_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OBSS_OFL),
1445     WMI_OBSS_SCAN_DISABLE_CMDID,
1446     WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID,
1447 
1448     /** LPI commands */
1449     /** LPI mgmt snooping config command */
1450     WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LPI),
1451     /** LPI scan start command */
1452     WMI_LPI_START_SCAN_CMDID,
1453     /** LPI scan stop command */
1454     WMI_LPI_STOP_SCAN_CMDID,
1455 
1456     /** ExtScan commands */
1457     WMI_EXTSCAN_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_EXTSCAN),
1458     WMI_EXTSCAN_STOP_CMDID,
1459     WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID,
1460     WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID,
1461     WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID,
1462     WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID,
1463     WMI_EXTSCAN_SET_CAPABILITIES_CMDID,
1464     WMI_EXTSCAN_GET_CAPABILITIES_CMDID,
1465     WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID,
1466     WMI_EXTSCAN_CONFIGURE_MAWC_CMDID,
1467 
1468     /** DHCP server offload commands */
1469     WMI_SET_DHCP_SERVER_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DHCP_OFL),
1470 
1471     /** IPA Offload features related commands */
1472     WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_IPA),
1473 
1474     /** mDNS responder offload commands */
1475     WMI_MDNS_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MDNS_OFL),
1476     WMI_MDNS_SET_FQDN_CMDID,
1477     WMI_MDNS_SET_RESPONSE_CMDID,
1478     WMI_MDNS_GET_STATS_CMDID,
1479     WMI_MDNS_SET_STAIP_CMDID,
1480 
1481     /* enable/disable AP Authentication offload */
1482     WMI_SAP_OFL_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SAP_OFL),
1483     WMI_SAP_SET_BLACKLIST_PARAM_CMDID,
1484     WMI_SAP_OBSS_DETECTION_CFG_CMDID,
1485 
1486     /** Out-of-context-of-BSS (OCB) commands */
1487     WMI_OCB_SET_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OCB),
1488     WMI_OCB_SET_UTC_TIME_CMDID,
1489     WMI_OCB_START_TIMING_ADVERT_CMDID,
1490     WMI_OCB_STOP_TIMING_ADVERT_CMDID,
1491     WMI_OCB_GET_TSF_TIMER_CMDID,
1492     WMI_DCC_GET_STATS_CMDID,
1493     WMI_DCC_CLEAR_STATS_CMDID,
1494     WMI_DCC_UPDATE_NDL_CMDID,
1495 
1496     /* System-On-Chip commands */
1497     WMI_SOC_SET_PCL_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SOC),
1498     WMI_SOC_SET_HW_MODE_CMDID,
1499     WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID,
1500     WMI_SOC_SET_ANTENNA_MODE_CMDID,
1501     /** enable/disable TQM reset (SOC level) feature */
1502     WMI_SOC_TQM_RESET_ENABLE_DISABLE_CMDID,
1503 
1504     /* packet filter commands */
1505     WMI_PACKET_FILTER_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PKT_FILTER),
1506     WMI_PACKET_FILTER_ENABLE_CMDID,
1507 
1508     /** Motion Aided WiFi Connectivity (MAWC) commands */
1509     WMI_MAWC_SENSOR_REPORT_IND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MAWC),
1510 
1511     /** WMI commands related to PMF 11w Offload */
1512     WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PMF_OFFLOAD),
1513 
1514     /** WMI commands related to pkt filter (BPF) offload */
1515     WMI_BPF_GET_CAPABILITY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
1516     WMI_BPF_GET_VDEV_STATS_CMDID,
1517     WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID,
1518     WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID,
1519     WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID,
1520     WMI_BPF_SET_VDEV_ENABLE_CMDID,
1521     WMI_BPF_SET_VDEV_WORK_MEMORY_CMDID,
1522     WMI_BPF_GET_VDEV_WORK_MEMORY_CMDID,
1523 
1524     /** WMI commands related to monitor mode. */
1525     WMI_MNT_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MONITOR),
1526 
1527     /** WMI commands related to regulatory offload */
1528     WMI_SET_CURRENT_COUNTRY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_REGULATORY),
1529     WMI_11D_SCAN_START_CMDID,
1530     WMI_11D_SCAN_STOP_CMDID,
1531     WMI_SET_INIT_COUNTRY_CMDID,
1532     WMI_AFC_CMDID,
1533 
1534     /**
1535      * Nan Data commands
1536      * NDI - NAN Data Interface
1537      * NDP - NAN Data Path
1538      */
1539     /* Commands in prototyping phase */
1540     WMI_NDI_GET_CAP_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROTOTYPE),
1541     WMI_NDP_INITIATOR_REQ_CMDID,
1542     WMI_NDP_RESPONDER_REQ_CMDID,
1543     WMI_NDP_END_REQ_CMDID,
1544     WMI_NDP_CMDID,
1545 
1546     /** WMI commands related to HW data filtering **/
1547     WMI_HW_DATA_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_HW_DATA_FILTER),
1548 
1549     /** WMI commands related to WLAN latency module **/
1550     WMI_WLM_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLM),
1551 
1552     /** WMI commands related to STA & AP TWT module **/
1553     WMI_TWT_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TWT),
1554     WMI_TWT_DISABLE_CMDID,
1555     WMI_TWT_ADD_DIALOG_CMDID,
1556     WMI_TWT_DEL_DIALOG_CMDID,
1557     WMI_TWT_PAUSE_DIALOG_CMDID,
1558     WMI_TWT_RESUME_DIALOG_CMDID,
1559     WMI_TWT_BTWT_INVITE_STA_CMDID,
1560     WMI_TWT_BTWT_REMOVE_STA_CMDID,
1561     WMI_TWT_NUDGE_DIALOG_CMDID,
1562     WMI_VDEV_SET_TWT_EDCA_PARAMS_CMDID, /* XPAN TWT */
1563     WMI_VDEV_GET_TWT_SESSION_STATS_INFO_CMDID,
1564 
1565     /** WMI commands related to motion detection **/
1566     WMI_MOTION_DET_CONFIG_PARAM_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MOTION_DET),
1567     WMI_MOTION_DET_BASE_LINE_CONFIG_PARAM_CMDID,
1568     WMI_MOTION_DET_START_STOP_CMDID,
1569     WMI_MOTION_DET_BASE_LINE_START_STOP_CMDID,
1570 
1571     /** WMI commands related to OBSS PD Spatial Reuse **/
1572     WMI_PDEV_OBSS_PD_SPATIAL_REUSE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SPATIAL_REUSE),
1573     WMI_PDEV_OBSS_PD_SPATIAL_REUSE_SET_DEF_OBSS_THRESH_CMDID,
1574 
1575     /** WMI commands related to High Precision Clock Synchronization feature **/
1576     WMI_HPCS_PULSE_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_HPCS_PULSE),
1577 
1578     /** WMI commands related to Audio Frame aggregation feature **/
1579     WMI_AUDIO_AGGR_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_AUDIO),
1580     WMI_AUDIO_AGGR_ADD_GROUP_CMDID,
1581     WMI_AUDIO_AGGR_DEL_GROUP_CMDID,
1582     WMI_AUDIO_AGGR_SET_GROUP_RATE_CMDID,
1583     WMI_AUDIO_AGGR_SET_GROUP_RETRY_CMDID,
1584     WMI_AUDIO_AGGR_SET_GROUP_AUTO_RATE_CMDID,
1585     WMI_AUDIO_AGGR_SET_GROUP_PROBE_CMDID,
1586     WMI_AUDIO_AGGR_UPDATE_STA_GROUP_INFO_CMDID,
1587     WMI_AUDIO_AGGR_GET_STATISTICS_CMDID,
1588     WMI_AUDIO_AGGR_RESET_STATISTICS_CMDID,
1589     WMI_AUDIO_AGGR_SET_RTSCTS_CONFIG_CMDID,
1590     WMI_AUDIO_AGGR_SET_SCHED_METHOD_CMDID,
1591     WMI_AUDIO_AGGR_GET_SCHED_METHOD_CMDID,
1592 
1593     /** WMI commands related to Channel Frequency Response Capture **/
1594     WMI_CFR_CAPTURE_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CFR_CAPTURE),
1595 
1596     /** WMI commands related to Air Time Management feature **/
1597     /** ATF SSID GROUPING REQUEST command */
1598     WMI_ATF_SSID_GROUPING_REQUEST_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_ATM),
1599     /** WMM ATF Configuration for groups */
1600     WMI_ATF_GROUP_WMM_AC_CONFIG_REQUEST_CMDID,
1601     /** ATF Peer Extended Request command */
1602     WMI_PEER_ATF_EXT_REQUEST_CMDID,
1603 
1604     /** Vendor Defined WMI commands **/
1605     WMI_VENDOR_PDEV_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_VENDOR),
1606     WMI_VENDOR_VDEV_CMDID,
1607     WMI_VENDOR_PEER_CMDID,
1608     /** Further vendor cmd IDs can be added below **/
1609 
1610     /** WMI commands specific to Tid level Latency config **/
1611     /** VDEV Latency Config command */
1612     WMI_VDEV_TID_LATENCY_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LATENCY),
1613     /** TID Latency Request command */
1614     WMI_PEER_TID_LATENCY_CONFIG_CMDID,
1615 
1616     /** WMI commands specific to MLO **/
1617     /** MLO link active / inactive Request command */
1618     WMI_MLO_LINK_SET_ACTIVE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MLO),
1619     /** WMI cmd used to indicate hw_links part of MLO */
1620     WMI_MLO_SETUP_CMDID,
1621     /** WMI cmd used for init synchronization of hw_links part of MLO */
1622     WMI_MLO_READY_CMDID,
1623     /** WMI cmd used for tearing down a hw_link part of MLO */
1624     WMI_MLO_TEARDOWN_CMDID,
1625     /** WMI cmd used to setup Tid to Link Mapping for a MLO Peer */
1626     WMI_MLO_PEER_TID_TO_LINK_MAP_CMDID,
1627     /** WMI cmd for dynamically deleting a link from a MLD VAP */
1628     WMI_MLO_LINK_REMOVAL_CMDID,
1629     /** WMI cmd used to setup Tid to Link Mapping for a MLO VAP */
1630     WMI_MLO_AP_VDEV_TID_TO_LINK_MAP_CMDID,
1631     /** WMI cmd used to get mlo link information */
1632     WMI_MLO_VDEV_GET_LINK_INFO_CMDID,
1633     /** WMI cmd used to set link BSS parameters */
1634     WMI_MLO_LINK_SET_BSS_PARAMS_CMDID,
1635     /** WMI cmd to confirm the status of link switch request handling */
1636     WMI_MLO_LINK_SWITCH_CONF_CMDID,
1637     /** WMI cmd to migrate the primary link peer */
1638     WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_CMDID,
1639     /** WMI cmd to recommand preferred link */
1640     WMI_MLO_LINK_RECOMMENDATION_CMDID,
1641 
1642     /** WMI commands specific to Service Aware WiFi (SAWF) */
1643     /** configure or reconfigure the parameters for a service class */
1644     WMI_SAWF_SVC_CLASS_CFG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SAWF),
1645     /** disable a service class */
1646     WMI_SAWF_SVC_CLASS_DISABLE_CMDID,
1647 
1648     /* WMI commands specific to ODD */
1649     WMI_ODD_LIVEDUMP_REQUEST_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_ODD),
1650 
1651     /* WMI commands specific to TDMA */
1652     WMI_TDMA_SCHEDULE_REQUEST_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TDMA),
1653 
1654     /* WMI commands specific to manually-triggered UL */
1655     /** WMI Command to set Manual SU UL OFDMA trigger parameters */
1656     WMI_VDEV_SET_ULOFDMA_MANUAL_SU_TRIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MANUAL_UL_TRIG),
1657 
1658     /** WMI Command to set Manual MU UL OFDMA trigger parameters */
1659     WMI_VDEV_SET_ULOFDMA_MANUAL_MU_TRIG_CMDID,
1660 } WMI_CMD_ID;
1661 
1662 typedef enum {
1663     /** WMI service is ready; after this event WMI messages can be sent/received  */
1664     WMI_SERVICE_READY_EVENTID = 0x1,
1665     /** WMI is ready; after this event the wlan subsystem is initialized and can process commands. */
1666     WMI_READY_EVENTID,
1667 
1668     /** Specify what WMI services the target supports (for services beyond
1669      * what fits in the WMI_SERVICE_READY_EVENT message's wmi_service_bitmap)
1670      */
1671     WMI_SERVICE_AVAILABLE_EVENTID,
1672 
1673     /** Specify what numbers and kinds of interfaces (a.k.a. vdevs)
1674      * the target supports
1675      */
1676     WMI_IFACE_COMBINATION_IND_EVENTID,
1677 
1678     /** Scan specific events */
1679     WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN),
1680 
1681     /** Spectral scan FW params to host */
1682     WMI_PDEV_SSCAN_FW_PARAM_EVENTID,
1683 
1684     /** Spectral scan related event start/stop trigger to host  */
1685     WMI_SSCAN_EVT_MESSAGE_EVENTID,
1686 
1687     /** Spectral scan capabilities advertisement */
1688     WMI_SPECTRAL_CAPABILITIES_EVENTID,
1689 
1690 
1691     /* PDEV specific events */
1692     /** TPC config for the current operating channel */
1693     WMI_PDEV_TPC_CONFIG_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PDEV),
1694     /** Channel stats event    */
1695     WMI_CHAN_INFO_EVENTID,
1696 
1697     /** PHY Error specific WMI event */
1698     WMI_PHYERR_EVENTID,
1699 
1700     /** eeprom dump event  */
1701     WMI_PDEV_DUMP_EVENTID,
1702 
1703     /** traffic pause event */
1704     WMI_TX_PAUSE_EVENTID,
1705 
1706     /** DFS radar event  */
1707     WMI_DFS_RADAR_EVENTID,
1708 
1709     /** track L1SS entry and residency event */
1710     WMI_PDEV_L1SS_TRACK_EVENTID,
1711 
1712     /** Report current temperature of the chip in Celcius degree */
1713     WMI_PDEV_TEMPERATURE_EVENTID,
1714 
1715     /** Extension of WMI_SERVICE_READY msg with extra target capability info */
1716     WMI_SERVICE_READY_EXT_EVENTID,
1717 
1718     /** FIPS test mode event */
1719     WMI_PDEV_FIPS_EVENTID,
1720 
1721     /** Channel hopping avoidance */
1722     WMI_PDEV_CHANNEL_HOPPING_EVENTID,
1723 
1724     /** CCK ANI level event */
1725     WMI_PDEV_ANI_CCK_LEVEL_EVENTID,
1726 
1727     /** OFDM ANI level event */
1728     WMI_PDEV_ANI_OFDM_LEVEL_EVENTID,
1729 
1730     /** Tx PPDU params */
1731     WMI_PDEV_TPC_EVENTID,
1732 
1733     /** NF Cal Power in DBR/DBM for all channels */
1734     WMI_PDEV_NFCAL_POWER_ALL_CHANNELS_EVENTID,
1735 
1736     /** SOC/PDEV events */
1737     WMI_PDEV_SET_HW_MODE_RESP_EVENTID,
1738     WMI_PDEV_HW_MODE_TRANSITION_EVENTID,
1739     WMI_PDEV_SET_MAC_CONFIG_RESP_EVENTID,
1740     /** Report ANT DIV feature's status */
1741     WMI_PDEV_ANTDIV_STATUS_EVENTID,
1742     /** Chip level Power stats */
1743     WMI_PDEV_CHIP_POWER_STATS_EVENTID,
1744     /** Power Save Failure Detected */
1745     WMI_PDEV_CHIP_POWER_SAVE_FAILURE_DETECTED_EVENTID,
1746 
1747     /* Event to report the switch count in csa of one or more VDEVs */
1748     WMI_PDEV_CSA_SWITCH_COUNT_STATUS_EVENTID,
1749 
1750     /** Report the caldata version to host */
1751     WMI_PDEV_CHECK_CAL_VERSION_EVENTID,
1752 
1753     /** Report chain RSSI and antenna index to host */
1754     WMI_PDEV_DIV_RSSI_ANTID_EVENTID,
1755 
1756     /** provide noise floor and cycle counts for a channel */
1757     WMI_PDEV_BSS_CHAN_INFO_EVENTID,
1758 
1759     /** Response received the ctl table to host */
1760     WMI_PDEV_UPDATE_CTLTABLE_EVENTID,
1761 
1762     WMI_PDEV_DMA_RING_CFG_RSP_EVENTID,
1763 
1764     WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID,
1765 
1766     /** WMI Event to deliver CTL Failsafe application */
1767     WMI_PDEV_CTL_FAILSAFE_CHECK_EVENTID,
1768 
1769     /* Event to report the switch count in BSS color of one or more VDEVs */
1770     WMI_PDEV_CSC_SWITCH_COUNT_STATUS_EVENTID,
1771 
1772     /* Event to send cold boot calibration data */
1773     WMI_PDEV_COLD_BOOT_CAL_DATA_EVENTID,
1774 
1775     /* Event to report a rogue ap info that is detected in fw */
1776     WMI_PDEV_RAP_INFO_EVENTID,
1777 
1778     WMI_CHAN_RF_CHARACTERIZATION_INFO_EVENTID,
1779 
1780     /** 2nd extension of SERVICE_READY msg with extra target capability info */
1781     WMI_SERVICE_READY_EXT2_EVENTID,
1782 
1783     /**
1784      * vdev restart response for multiple vdevs in response to
1785      * MULTIPLE_VDEV_RESTART_REQUEST
1786      */
1787     WMI_PDEV_MULTIPLE_VDEV_RESTART_RESP_EVENTID,
1788 
1789     /** WMI event in response to TPC STATS command */
1790     WMI_PDEV_GET_TPC_STATS_EVENTID,
1791 
1792     /* Event to get DPD status from HALPHY */
1793     WMI_PDEV_GET_DPD_STATUS_EVENTID,
1794 
1795     /* Event to get Calibration status from HALPHY */
1796     WMI_PDEV_GET_HALPHY_CAL_STATUS_EVENTID,
1797 
1798     /* Event to set halphy cal bitmap */
1799     WMI_PDEV_SET_HALPHY_CAL_BMAP_EVENTID,
1800 
1801     /* Event to get AOA phasedelta values from HALPHY */
1802     WMI_PDEV_AOA_PHASEDELTA_EVENTID,
1803 
1804     WMI_PDEV_FIPS_EXTEND_EVENTID,
1805 
1806     /* Event to send packet log decode information */
1807     WMI_PDEV_PKTLOG_DECODE_INFO_EVENTID,
1808 
1809     /**
1810      * RSSI dB to dBm conversion params info event
1811      * sent to host after channel/bw/chainmask change per pdev.
1812      */
1813     WMI_PDEV_RSSI_DBM_CONVERSION_PARAMS_INFO_EVENTID,
1814 
1815     /* Event to indicate Schedule tid queue suspended info */
1816     WMI_PDEV_SCHED_TIDQ_SUSP_INFO_EVENTID,
1817 
1818     /* Event to send target rate to power table update status */
1819     WMI_PDEV_SET_TGTR2P_TABLE_EVENTID,
1820 
1821     /* Event to indicate completion on RF path */
1822     WMI_PDEV_SET_RF_PATH_RESP_EVENTID,
1823 
1824     /* Event to get AOA phasedelta values for all gain tables from HALPHY */
1825     WMI_PDEV_ENHANCED_AOA_PHASEDELTA_EVENTID,
1826 
1827     /* Event to indicate the status of WiFi Radar calibration */
1828     WMI_PDEV_WIFI_RADAR_CAL_COMPLETION_STATUS_EVENTID,
1829 
1830     /* Event to indicate xLNA is enabled */
1831     WMI_PDEV_ENABLE_XLNA_EVENTID,
1832 
1833     /* VDEV specific events */
1834     /** VDEV started event in response to VDEV_START request */
1835     WMI_VDEV_START_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_VDEV),
1836     /** vdev stopped event , generated in response to VDEV_STOP request */
1837     WMI_VDEV_STOPPED_EVENTID,
1838     /* Indicate the set key (used for setting per
1839      * peer unicast and per vdev multicast)
1840      * operation has completed */
1841     WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID,
1842     /* NOTE: WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID would be deprecated. Please
1843      don't use this for any new implementations */
1844     /* Firmware requests dynamic change to a specific beacon interval for a specific vdev ID in MCC scenario.
1845      This request is valid only for vdevs operating in soft AP or P2P GO mode */
1846     WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID,
1847 
1848     /* Return the TSF timestamp of specified vdev */
1849     WMI_VDEV_TSF_REPORT_EVENTID,
1850 
1851     /* FW response to Host for vdev delete cmdid */
1852     WMI_VDEV_DELETE_RESP_EVENTID,
1853 
1854     /* DISA feature: FW response to Host with encrypted/decrypted 802.11 DISA frame */
1855     WMI_VDEV_ENCRYPT_DECRYPT_DATA_RESP_EVENTID,
1856 
1857     /** event to report mac randomization success **/
1858     WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_STATUS_EVENTID,
1859 
1860     /* event for ARP stats collection */
1861     WMI_VDEV_GET_ARP_STAT_EVENTID,
1862 
1863     /** get tx power event in response to VDEV_GET_TX_POWER request */
1864     WMI_VDEV_GET_TX_POWER_EVENTID,
1865 
1866     WMI_VDEV_BCN_RECEPTION_STATS_EVENTID,
1867 
1868     /* provide LTE-Coex state */
1869     WMI_VDEV_GET_MWS_COEX_STATE_EVENTID,
1870 
1871     /* provide LTE-Coex Dynamic Power Back-off info */
1872     WMI_VDEV_GET_MWS_COEX_DPWB_STATE_EVENTID,
1873 
1874     /* provide LTE-Coex TDM info */
1875     WMI_VDEV_GET_MWS_COEX_TDM_STATE_EVENTID,
1876 
1877     /* provide LTE-Coex IDRx info */
1878     WMI_VDEV_GET_MWS_COEX_IDRX_STATE_EVENTID,
1879 
1880     /* provide LTE-Coex antenna sharing info */
1881     WMI_VDEV_GET_MWS_COEX_ANTENNA_SHARING_STATE_EVENTID,
1882 
1883     /* Event to handle FW offloaded mgmt packets */
1884     WMI_VDEV_MGMT_OFFLOAD_EVENTID,
1885 
1886     /* FW response to Host for delete all peer cmdid */
1887     WMI_VDEV_DELETE_ALL_PEER_RESP_EVENTID,
1888 
1889     /** Indicates host to start/stop strobing for QTIMER periodically */
1890     WMI_VDEV_AUDIO_SYNC_START_STOP_EVENTID,
1891     /** Sends the final offset in the QTIMERs of both master and slave */
1892     WMI_VDEV_AUDIO_SYNC_Q_MASTER_SLAVE_OFFSET_EVENTID,
1893     /** VDEV_SEND_BIG_DATA_EVENT IS DEPRECATED - DO NOT USE */
1894     WMI_VDEV_SEND_BIG_DATA_EVENTID,
1895     /** send BIG DATA stats to host phase 2 */
1896     WMI_VDEV_SEND_BIG_DATA_P2_EVENTID,
1897     /** Latency related information received from beacon IE */
1898     WMI_VDEV_BCN_LATENCY_EVENTID,
1899     /** Disconnect request from FW */
1900     WMI_VDEV_DISCONNECT_EVENTID,
1901     /** Send Smart Monitor related params to host */
1902     WMI_VDEV_SMART_MONITOR_EVENTID,
1903     /** Send status of vdev mac address update request to host */
1904     WMI_VDEV_UPDATE_MAC_ADDR_CONF_EVENTID,
1905     /** event to report latency level honored by FW */
1906     WMI_VDEV_LATENCY_LEVEL_EVENTID,
1907     /** Result from firmware about completed scheduler probing */
1908     WMI_VDEV_SCHED_MODE_PROBE_RESP_EVENTID,
1909     /** Connect response */
1910     WMI_VDEV_OOB_CONNECTION_RESP_EVENTID,
1911 
1912     /* peer specific events */
1913     /** FW reauet to kick out the station for reasons like inactivity,lack of response ..etc */
1914     WMI_PEER_STA_KICKOUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PEER),
1915 
1916     /** Peer Info Event with data_rate, RSSI, tx_fail_cnt etc */
1917     WMI_PEER_INFO_EVENTID,
1918 
1919     /** Event indicating that TX fail count reaching threshold */
1920     WMI_PEER_TX_FAIL_CNT_THR_EVENTID,
1921 
1922     /* Return the estimate link speed for the Peer specified in the
1923      * WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID command.
1924      */
1925     WMI_PEER_ESTIMATED_LINKSPEED_EVENTID,
1926     /* Return the peer state
1927      * WMI_PEER_SET_PARAM_CMDID, WMI_PEER_AUTHORIZE
1928      */
1929     WMI_PEER_STATE_EVENTID,
1930 
1931     /* Peer Assoc Conf event to confirm fw had received PEER_ASSOC_CMD.
1932      * After that, host will send Mx message.
1933      * Otherwise, host will pause any Mx(STA:M2/M4) message
1934      */
1935     WMI_PEER_ASSOC_CONF_EVENTID,
1936 
1937     /* FW response to Host for peer delete cmdid */
1938     WMI_PEER_DELETE_RESP_EVENTID,
1939 
1940     /** Valid rate code list for peer  */
1941     WMI_PEER_RATECODE_LIST_EVENTID,
1942     WMI_WDS_PEER_EVENTID,
1943     WMI_PEER_STA_PS_STATECHG_EVENTID,
1944     /** Peer Ant Div Info Event with RSSI per chain, etc */
1945     WMI_PEER_ANTDIV_INFO_EVENTID,
1946 
1947     /*
1948      * WMI_PEER_RESERVED_EVENTID
1949      * These values are used for placeholders, to allow the subsequent
1950      * WMI_PEER_OPER_MODE_CHANGE_EVENTID constant to have the same value
1951      * as it had in its original location, when it was mistakenly placed
1952      * amongst the WMI_PEER CMDID defs.
1953      *
1954      * These WMI_PEER_RESERVED values can be replaced with actual WMI peer
1955      * event message IDs, though it will be simpler to instead add new
1956      * WMI_PEER EVENTID defs at the end of the WMI_GRP_PEER WMI_EVT_GRP.
1957      */
1958     WMI_PEER_RESERVED0_EVENTID,
1959     WMI_PEER_RESERVED1_EVENTID,
1960     WMI_PEER_RESERVED2_EVENTID,
1961     WMI_PEER_RESERVED3_EVENTID,
1962     WMI_PEER_RESERVED4_EVENTID,
1963     WMI_PEER_RESERVED5_EVENTID,
1964     WMI_PEER_RESERVED6_EVENTID,
1965     WMI_PEER_RESERVED7_EVENTID,
1966     WMI_PEER_RESERVED8_EVENTID,
1967     WMI_PEER_RESERVED9_EVENTID,
1968     WMI_PEER_RESERVED10_EVENTID,
1969     /** Peer operating mode change indication sent to host to update stats */
1970     WMI_PEER_OPER_MODE_CHANGE_EVENTID,
1971 
1972     /** report the current tx PN for the peer */
1973     WMI_PEER_TX_PN_RESPONSE_EVENTID,
1974 
1975     WMI_PEER_CFR_CAPTURE_EVENTID,
1976 
1977     /* Peer Create Conf event to confirm fw had received WMI_PEER_CREATE_CMDID
1978      * and status of WMI_PEER_CREATE_CMDID.
1979      */
1980     WMI_PEER_CREATE_CONF_EVENTID,
1981 
1982     WMI_PEER_RX_PN_RESPONSE_EVENTID,
1983 
1984 
1985     /* beacon/mgmt specific events */
1986     /** RX management frame. the entire frame is carried along with the event.  */
1987     WMI_MGMT_RX_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MGMT),
1988     /** software beacon alert event to Host requesting host to Queue a beacon for transmission
1989      use only in host beacon mode */
1990     WMI_HOST_SWBA_EVENTID,
1991     /** beacon tbtt offset event indicating the tsf offset of the tbtt from the theoretical value.
1992      tbtt offset is normally 0 and will be non zero if there are multiple VDEVs operating in
1993      staggered beacon transmission mode */
1994     WMI_TBTTOFFSET_UPDATE_EVENTID,
1995 
1996     /** event after the first beacon is transmitted following
1997              a change in the template.*/
1998     WMI_OFFLOAD_BCN_TX_STATUS_EVENTID,
1999     /** event after the first probe response is transmitted following
2000              a change in the template.*/
2001     WMI_OFFLOAD_PROB_RESP_TX_STATUS_EVENTID,
2002     /** Event for Mgmt TX completion event */
2003     WMI_MGMT_TX_COMPLETION_EVENTID,
2004     /** Event for Mgmt TX bundle completion event */
2005     WMI_MGMT_TX_BUNDLE_COMPLETION_EVENTID,
2006     /** vdev_map used in WMI_TBTTOFFSET_UPDATE_EVENTID supports max 32 vdevs.
2007      *   Use this event if number of vdevs > 32.
2008      */
2009     WMI_TBTTOFFSET_EXT_UPDATE_EVENTID,
2010     /** Event for offchan data TX completion event */
2011     WMI_OFFCHAN_DATA_TX_COMPLETION_EVENTID,
2012 
2013     /** software FILS Discovery Frame alert event to Host, requesting host to Queue an FD frame for transmission */
2014     WMI_HOST_SWFDA_EVENTID,
2015 
2016     /** software beacon alert event to Host requesting host to Queue a beacon for transmission.
2017      *   Used only in host beacon mode. */
2018     WMI_HOST_SWBA_V2_EVENTID,
2019 
2020     /** Event for QoS null frame TX completion  */
2021     WMI_QOS_NULL_FRAME_TX_COMPLETION_EVENTID,
2022 
2023     /** WMI event for Firmware Consumed/Dropped Rx management frames indication */
2024     WMI_MGMT_RX_FW_CONSUMED_EVENTID,
2025 
2026 
2027     /* ADDBA Related WMI Events*/
2028     /** Indication the completion of the prior
2029      WMI_PEER_TID_DELBA_CMDID(initiator) */
2030     WMI_TX_DELBA_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BA_NEG),
2031     /** Indication the completion of the prior
2032      *WMI_PEER_TID_ADDBA_CMDID(initiator) */
2033     WMI_TX_ADDBA_COMPLETE_EVENTID,
2034 
2035     /* Seq num returned from hw for a sta/tid pair */
2036     WMI_BA_RSP_SSN_EVENTID,
2037 
2038     /* Aggregation state requested by BTC */
2039     WMI_AGGR_STATE_TRIG_EVENTID,
2040 
2041     /** Roam event to trigger roaming on host */
2042     WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM),
2043 
2044     /** matching AP found from list of profiles */
2045     WMI_PROFILE_MATCH,
2046     /** roam synch event */
2047     WMI_ROAM_SYNCH_EVENTID,
2048     /** roam synch frame event */
2049     WMI_ROAM_SYNCH_FRAME_EVENTID,
2050     /** various roam scan stats */
2051     WMI_ROAM_SCAN_STATS_EVENTID,
2052     /** Blacklisted AP information event */
2053     WMI_ROAM_BLACKLIST_EVENTID,
2054     /** Roam Pre-Authentication start event */
2055     WMI_ROAM_PREAUTH_START_EVENTID,
2056     /** Roaming PMKID request event */
2057     WMI_ROAM_PMKID_REQUEST_EVENTID,
2058     /** roam stats */
2059     WMI_ROAM_STATS_EVENTID,
2060     /** Roam scan channels list */
2061     WMI_ROAM_SCAN_CHANNEL_LIST_EVENTID,
2062     /** Firmware roam capability information */
2063     WMI_ROAM_CAPABILITY_REPORT_EVENTID,
2064     /** Send AP frame content like beacon/probe resp etc.. */
2065     WMI_ROAM_FRAME_EVENTID,
2066     /** Send firmware ini value corresponding to param_id */
2067     WMI_ROAM_GET_VENDOR_CONTROL_PARAM_EVENTID,
2068     /** roam synch key event */
2069     WMI_ROAM_SYNCH_KEY_EVENTID,
2070 
2071     /** P2P disc found */
2072     WMI_P2P_DISC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_P2P),
2073     /** send noa info to host when noa is changed for beacon tx offload enable */
2074     WMI_P2P_NOA_EVENTID,
2075     /** send p2p listen offload stopped event with different reason */
2076     WMI_P2P_LISTEN_OFFLOAD_STOPPED_EVENTID,
2077 
2078     /** Send EGAP Info to host */
2079     WMI_AP_PS_EGAP_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_AP_PS),
2080 
2081     /* send pdev resume event to host after pdev resume. */
2082     WMI_PDEV_RESUME_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SUSPEND),
2083 
2084     /** WOW wake up host event.generated in response to WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID.
2085      will cary wake reason */
2086     WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW),
2087     WMI_D0_WOW_DISABLE_ACK_EVENTID,
2088     WMI_WOW_INITIAL_WAKEUP_EVENTID,
2089     WMI_WOW_COAP_BUF_INFO_EVENTID,
2090 
2091     /* RTT related event ID */
2092     /** RTT measurement report */
2093     WMI_RTT_MEASUREMENT_REPORT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RTT),
2094     /** TSF measurement report */
2095     WMI_TSF_MEASUREMENT_REPORT_EVENTID,
2096     /** RTT error report */
2097     WMI_RTT_ERROR_REPORT_EVENTID,
2098     /** RTT 11az PASN peer create request */
2099     WMI_RTT_PASN_PEER_CREATE_REQ_EVENTID,
2100     /** RTT 11az PASN peer delete event */
2101     WMI_RTT_PASN_PEER_DELETE_EVENTID,
2102 
2103     /*STATS specific events*/
2104     /** txrx stats event requested by host */
2105     WMI_STATS_EXT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STATS),
2106     /** FW iface link stats Event  */
2107     WMI_IFACE_LINK_STATS_EVENTID,
2108     /** FW iface peer link stats Event  */
2109     WMI_PEER_LINK_STATS_EVENTID,
2110     /** FW Update radio stats Event  */
2111     WMI_RADIO_LINK_STATS_EVENTID,
2112 
2113     /**  Firmware memory dump Complete event*/
2114     WMI_UPDATE_FW_MEM_DUMP_EVENTID,
2115 
2116     /** Event indicating the DIAG logs/events supported by FW */
2117     WMI_DIAG_EVENT_LOG_SUPPORTED_EVENTID,
2118 
2119     /** Instantaneous RSSI event */
2120     WMI_INST_RSSI_STATS_EVENTID,
2121 
2122     /** FW update tx power levels event */
2123     WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID,
2124 
2125     /** This event is used to report wlan stats to host.
2126      * It is triggered under 3 conditions:
2127      * (a) Periodic timer timed out, based on the period specified
2128      *     by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
2129      * (b) Whenever any of the (enabled) stats thresholds specified
2130      *     in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
2131      *     within the current stats period.
2132      * (c) In response to the one-time wlan stats request of
2133      *     WMI_REQUEST_WLAN_STATS_CMDID from host.
2134      *
2135      *  If this event is triggered by condition a or b,
2136      *  the stats counters are cleared at the start of each period.
2137      *  But if it is triggered by condition c, stats counters won't be cleared.
2138      */
2139     WMI_REPORT_STATS_EVENTID,
2140 
2141     /** Event indicating RCPI of the peer requested by host in the WMI_REQUEST_RCPI_CMDID */
2142     WMI_UPDATE_RCPI_EVENTID,
2143 
2144     /** This event is used to respond to WMI_REQUEST_PEER_STATS_INFO_CMDID
2145      *  and report peer stats info to host */
2146     WMI_PEER_STATS_INFO_EVENTID,
2147 
2148     /** This event is used to respond to WMI_REQUEST_RADIO_CHAN_STATS_CMDID
2149      *  and report radio channel stats to host */
2150     WMI_RADIO_CHAN_STATS_EVENTID,
2151 
2152     /** This event is used to respond to WMI_REQUEST_WLM_STATS_CMDID
2153      *  and report WLM (WLAN latency manager) stats info to host */
2154     WMI_WLM_STATS_EVENTID,
2155 
2156     /** This event is used to respond to WMI_REQUEST_CTRL_PATH_STATS_CMDID
2157      *  and report stats info to host */
2158     WMI_CTRL_PATH_STATS_EVENTID,
2159 
2160     /** This event is used to respond to
2161      * WMI_REQUEST_HALPHY_CTRL_PATH_STATS_CMDID and report stats info to host
2162      */
2163     WMI_HALPHY_CTRL_PATH_STATS_EVENTID,
2164 
2165     /** FW IPA link stats Event */
2166     WMI_IPA_LINK_STATS_EVENTID,
2167 
2168 
2169     /* NLO specific events */
2170     /** NLO match event after the first match */
2171     WMI_NLO_MATCH_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NLO_OFL),
2172 
2173     /** NLO scan complete event */
2174     WMI_NLO_SCAN_COMPLETE_EVENTID,
2175 
2176     /** APFIND specific events */
2177     WMI_APFIND_EVENTID,
2178 
2179     /** passpoint network match event */
2180     WMI_PASSPOINT_MATCH_EVENTID,
2181 
2182     /** GTK offload stautus event requested by host */
2183     WMI_GTK_OFFLOAD_STATUS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL),
2184 
2185     /** GTK offload failed to rekey event */
2186     WMI_GTK_REKEY_FAIL_EVENTID,
2187 
2188     /* CSA handling event */
2189     WMI_CSA_HANDLING_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CSA_OFL),
2190     /* CSA IE received event */
2191     WMI_CSA_IE_RECEIVED_EVENTID,
2192 
2193     /*chatter query reply event*/
2194     WMI_CHATTER_PC_QUERY_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CHATTER),
2195 
2196     /** DFS related events */
2197     WMI_PDEV_DFS_RADAR_DETECTION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_DFS),
2198     /** Indicate channel-availability-check completion event to host */
2199     WMI_VDEV_DFS_CAC_COMPLETE_EVENTID,
2200     /** Indicate off-channel-availability-check completion event to host */
2201     WMI_VDEV_ADFS_OCAC_COMPLETE_EVENTID,
2202 
2203     /** echo event in response to echo command */
2204     WMI_ECHO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MISC),
2205 
2206     /* !!IMPORTANT!!
2207      * If you need to add a new WMI event ID to the WMI_GRP_MISC sub-group,
2208      * please make sure you add it BEHIND WMI_PDEV_UTF_EVENTID,
2209      * as we MUST have a fixed value here to maintain compatibility between
2210      * UTF and the ART2 driver
2211      */
2212     /** UTF specific WMI event */
2213     WMI_PDEV_UTF_EVENTID,
2214 
2215     /** event carries buffered debug messages  */
2216     WMI_DEBUG_MESG_EVENTID,
2217     /** FW stats(periodic or on shot)  */
2218     WMI_UPDATE_STATS_EVENTID,
2219     /** debug print message used for tracing FW code while debugging  */
2220     WMI_DEBUG_PRINT_EVENTID,
2221     /** DCS wlan or non-wlan interference event
2222      */
2223     WMI_DCS_INTERFERENCE_EVENTID,
2224     /** VI spoecific event  */
2225     WMI_PDEV_QVIT_EVENTID,
2226     /** FW code profile data in response to profile request  */
2227     WMI_WLAN_PROFILE_DATA_EVENTID,
2228     /* Factory Testing Mode request event
2229      * used for integrated chipsets */
2230     WMI_PDEV_FTM_INTG_EVENTID,
2231     /* avoid list of frequencies .
2232      */
2233     WMI_WLAN_FREQ_AVOID_EVENTID,
2234     /* Indicate the keepalive parameters */
2235     WMI_VDEV_GET_KEEPALIVE_EVENTID,
2236     /*Thermal Management event*/
2237     WMI_THERMAL_MGMT_EVENTID,
2238 
2239     /* Container for DIAG event and log data */
2240     WMI_DIAG_DATA_CONTAINER_EVENTID,
2241 
2242     /* host auto shutdown event */
2243     WMI_HOST_AUTO_SHUTDOWN_EVENTID,
2244 
2245     /*update mib counters together with WMI_UPDATE_STATS_EVENTID*/
2246     WMI_UPDATE_WHAL_MIB_STATS_EVENTID,
2247 
2248     /*update ht/vht info based on vdev (rx and tx NSS and preamble)*/
2249     WMI_UPDATE_VDEV_RATE_STATS_EVENTID,
2250 
2251     WMI_DIAG_EVENTID,
2252 
2253     /** Set OCB Sched Response, deprecated */
2254     WMI_OCB_SET_SCHED_EVENTID,
2255 
2256     /** event to indicate the flush of the buffered debug messages is complete*/
2257     WMI_DEBUG_MESG_FLUSH_COMPLETE_EVENTID,
2258 
2259     /** event to report mix/max RSSI breach events */
2260     WMI_RSSI_BREACH_EVENTID,
2261 
2262     /** event to report completion of data storage into flash memory */
2263     WMI_TRANSFER_DATA_TO_FLASH_COMPLETE_EVENTID,
2264 
2265     /** event to report SCPC calibrated data to host */
2266     WMI_PDEV_UTF_SCPC_EVENTID,
2267 
2268     /** event to provide requested data from the target's flash memory */
2269     WMI_READ_DATA_FROM_FLASH_EVENTID,
2270 
2271     /** event to report rx aggregation failure frame information */
2272     WMI_REPORT_RX_AGGR_FAILURE_EVENTID,
2273 
2274     /** event to upload a PKGID to host to identify chip for various products */
2275     WMI_PKGID_EVENTID,
2276 
2277     /* Thermal Throttling stats event id for every pdev and zones, etc */
2278     WMI_THERM_THROT_STATS_EVENTID,
2279 
2280     /* WMI UNIT TEST event */
2281     WMI_UNIT_TEST_EVENTID,
2282 
2283     /** event to report result of host configure SAR2 */
2284     WMI_SAR2_RESULT_EVENTID,
2285 
2286     /** event to get TX power per input HALPHY parameters */
2287     WMI_GET_TPC_POWER_EVENTID,
2288 
2289     /** event to provide MU-EDCA Parameters (to update host's beacon config) */
2290     WMI_MUEDCA_PARAMS_CONFIG_EVENTID,
2291 
2292     /** event to get ELNA BYPASS status */
2293     WMI_GET_ELNA_BYPASS_EVENTID,
2294 
2295     /** event to report ANI level of the channels */
2296     WMI_GET_CHANNEL_ANI_EVENTID,
2297 
2298     /* WMI event to available scratch registers */
2299     WMI_PMM_AVAILABLE_SCRATCH_REG_EVENTID,
2300 
2301     /* WMI event to scratch registers allocation */
2302     WMI_PMM_SCRATCH_REG_ALLOCATION_COMPLETE_EVENTID,
2303 
2304     /* WMI event to indicate Helath Monitor Infra init done */
2305     WMI_HEALTH_MON_INIT_DONE_EVENTID,
2306 
2307     /* WMI XGAP enable command response event ID */
2308     WMI_XGAP_ENABLE_COMPLETE_EVENTID,
2309 
2310     /* T2H HPA message */
2311     WMI_HPA_EVENTID,
2312 
2313     /* WMI standalone command complete Event */
2314     WMI_VDEV_STANDALONE_SOUND_COMPLETE_EVENTID,
2315 
2316     /* WMI evt to indicate switch type either to WLAN(XPAN) or non_WLAN(BLE) */
2317     WMI_AUDIO_TRANSPORT_SWITCH_TYPE_EVENTID,
2318 
2319 
2320     /* GPIO Event */
2321     WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO),
2322     /** upload H_CV info WMI event
2323      * to indicate uploaded H_CV info to host
2324      */
2325     WMI_UPLOADH_EVENTID,
2326 
2327     /** capture H info WMI event
2328      * to indicate captured H info to host
2329      */
2330     WMI_CAPTUREH_EVENTID,
2331     /* hw RFkill */
2332     WMI_RFKILL_STATE_CHANGE_EVENTID,
2333 
2334     /* Smart Antenna Controller status */
2335     WMI_SMARTANT_STATE_CHANGE_EVENTID,
2336 
2337     WMI_GPIO_STATE_RES_EVENTID,
2338 
2339     /* TDLS Event */
2340     WMI_TDLS_PEER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TDLS),
2341 
2342     /* Resmgr Event */
2343     /* deliver the new channel time quota for home channels */
2344     WMI_RESMGR_CHAN_TIME_QUOTA_CHANGED_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RESMGR),
2345 
2346     /** STA SMPS Event */
2347     /** force SMPS mode */
2348     WMI_STA_SMPS_FORCE_MODE_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STA_SMPS),
2349 
2350     /*location scan event*/
2351     /*report the firmware's capability of batch scan*/
2352     WMI_BATCH_SCAN_ENABLED_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
2353     /*batch scan result*/
2354     WMI_BATCH_SCAN_RESULT_EVENTID,
2355     /* OEM Event */
2356     WMI_OEM_CAPABILITY_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OEM), /*DEPRECATED*/
2357     WMI_OEM_MEASUREMENT_REPORT_EVENTID, /* DEPRECATED */
2358     WMI_OEM_ERROR_REPORT_EVENTID, /* DEPRECATED */
2359     WMI_OEM_RESPONSE_EVENTID,
2360     WMI_OEM_DMA_RING_CFG_RSP_EVENTID,
2361     WMI_OEM_DMA_BUF_RELEASE_EVENTID,
2362     WMI_OEM_DATA_EVENTID,
2363 
2364     /* NAN Event */
2365     WMI_NAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NAN),
2366     WMI_NAN_DISC_IFACE_CREATED_EVENTID,
2367     WMI_NAN_DISC_IFACE_DELETED_EVENTID,
2368     WMI_NAN_STARTED_CLUSTER_EVENTID,
2369     WMI_NAN_JOINED_CLUSTER_EVENTID,
2370     WMI_NAN_DMESG_EVENTID,
2371     /** Event to deliver OEM's NAN specific opaque data */
2372     WMI_NAN_OEM_DATA_EVENTID,
2373 
2374     /* Coex Event */
2375     WMI_COEX_REPORT_ANTENNA_ISOLATION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_COEX),
2376     WMI_SAR_GET_LIMITS_EVENTID,
2377     /** Dedicated BT Antenna Mode (DBAM) complete event */
2378     WMI_COEX_DBAM_COMPLETE_EVENTID,
2379     WMI_TAS_POWER_HISTORY_EVENTID,
2380 
2381     /* LPI Event */
2382     WMI_LPI_RESULT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LPI),
2383     WMI_LPI_STATUS_EVENTID,
2384     WMI_LPI_HANDOFF_EVENTID,
2385 
2386     /* ExtScan events */
2387     WMI_EXTSCAN_START_STOP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_EXTSCAN),
2388     WMI_EXTSCAN_OPERATION_EVENTID,
2389     WMI_EXTSCAN_TABLE_USAGE_EVENTID,
2390     WMI_EXTSCAN_CACHED_RESULTS_EVENTID,
2391     WMI_EXTSCAN_WLAN_CHANGE_RESULTS_EVENTID,
2392     WMI_EXTSCAN_HOTLIST_MATCH_EVENTID,
2393     WMI_EXTSCAN_CAPABILITIES_EVENTID,
2394     WMI_EXTSCAN_HOTLIST_SSID_MATCH_EVENTID,
2395 
2396     /* mDNS offload events */
2397     WMI_MDNS_STATS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MDNS_OFL),
2398 
2399     /* SAP Authentication offload events */
2400     WMI_SAP_OFL_ADD_STA_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SAP_OFL),
2401     WMI_SAP_OFL_DEL_STA_EVENTID,
2402     WMI_SAP_OBSS_DETECTION_REPORT_EVENTID,
2403 
2404     /* OBSS Offloads events */
2405     WMI_OBSS_COLOR_COLLISION_DETECTION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OBSS_OFL),
2406 
2407     /** Out-of-context-of-bss (OCB) events */
2408     WMI_OCB_SET_CONFIG_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OCB),
2409     WMI_OCB_GET_TSF_TIMER_RESP_EVENTID,
2410     WMI_DCC_GET_STATS_RESP_EVENTID,
2411     WMI_DCC_UPDATE_NDL_RESP_EVENTID,
2412     WMI_DCC_STATS_EVENTID,
2413 
2414     /* System-On-Chip events */
2415     WMI_SOC_SET_HW_MODE_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SOC),
2416     WMI_SOC_HW_MODE_TRANSITION_EVENTID,
2417     WMI_SOC_SET_DUAL_MAC_CONFIG_RESP_EVENTID,
2418 
2419     /** Motion Aided WiFi Connectivity (MAWC) events */
2420     WMI_MAWC_ENABLE_SENSOR_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MAWC),
2421 
2422     /** pkt filter (BPF) offload relevant events */
2423     WMI_BPF_CAPABILIY_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
2424     WMI_BPF_VDEV_STATS_INFO_EVENTID,
2425     WMI_BPF_GET_VDEV_WORK_MEMORY_RESP_EVENTID,
2426 
2427     /* RMC specific event */
2428     /* RMC manual leader selected event */
2429     WMI_RMC_NEW_LEADER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RMC),
2430 
2431     /** WMI events related to regulatory offload */
2432     WMI_REG_CHAN_LIST_CC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_REGULATORY),
2433     WMI_11D_NEW_COUNTRY_EVENTID,
2434     WMI_REG_CHAN_LIST_CC_EXT_EVENTID,
2435     WMI_AFC_EVENTID,
2436     WMI_REG_CHAN_LIST_CC_EXT2_EVENTID,
2437 
2438     /** Events for TWT(Target Wake Time) of STA and AP  */
2439     WMI_TWT_ENABLE_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TWT),
2440     WMI_TWT_DISABLE_COMPLETE_EVENTID,
2441     WMI_TWT_ADD_DIALOG_COMPLETE_EVENTID,
2442     WMI_TWT_DEL_DIALOG_COMPLETE_EVENTID,
2443     WMI_TWT_PAUSE_DIALOG_COMPLETE_EVENTID,
2444     WMI_TWT_RESUME_DIALOG_COMPLETE_EVENTID,
2445     WMI_TWT_BTWT_INVITE_STA_COMPLETE_EVENTID,
2446     WMI_TWT_BTWT_REMOVE_STA_COMPLETE_EVENTID,
2447     WMI_TWT_SESSION_STATS_EVENTID,
2448     WMI_TWT_NUDGE_DIALOG_COMPLETE_EVENTID,
2449     WMI_TWT_NOTIFY_EVENTID,
2450     WMI_TWT_ACK_EVENTID,
2451 
2452     /** Events in Prototyping phase */
2453     WMI_NDI_CAP_RSP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PROTOTYPE),
2454     WMI_NDP_INITIATOR_RSP_EVENTID,
2455     WMI_NDP_RESPONDER_RSP_EVENTID,
2456     WMI_NDP_END_RSP_EVENTID,
2457     WMI_NDP_INDICATION_EVENTID,
2458     WMI_NDP_CONFIRM_EVENTID,
2459     WMI_NDP_END_INDICATION_EVENTID,
2460     WMI_WLAN_COEX_BT_ACTIVITY_EVENTID,
2461     WMI_NDL_SCHEDULE_UPDATE_EVENTID,
2462     WMI_NDP_EVENTID,
2463 
2464     /** WMI events related to motion detection */
2465     WMI_MOTION_DET_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MOTION_DET),
2466     WMI_MOTION_DET_BASE_LINE_HOST_EVENTID,
2467 
2468     /** WMI events related to Estimation of Service Parameters (802.11mc) */
2469     WMI_ESP_ESTIMATE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ESP),
2470 
2471     /** WMI events related to Audio Frame aggregation feature **/
2472     WMI_AUDIO_AGGR_REPORT_STATISTICS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_AUDIO),
2473     WMI_AUDIO_AGGR_SCHED_METHOD_EVENTID,
2474 
2475     /** Vendor defined WMI events **/
2476     WMI_VENDOR_PDEV_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_VENDOR),
2477     WMI_VENDOR_VDEV_EVENTID,
2478     WMI_VENDOR_PEER_EVENTID,
2479     /** Further vendor event IDs can be added below **/
2480 
2481     /** WMI event specific to MLO **/
2482     /** MLO link active / inactive response event */
2483     WMI_MLO_LINK_SET_ACTIVE_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MLO),
2484     /* Response event for MLO setup cmd */
2485     WMI_MLO_SETUP_COMPLETE_EVENTID,
2486     /* Response event for MLO teardown cmd */
2487     WMI_MLO_TEARDOWN_COMPLETE_EVENTID,
2488     /* Response event for Link Removal Cmd */
2489     WMI_MLO_LINK_REMOVAL_EVENTID,
2490     /* Response event for WMI_MLO_AP_VDEV_TID_TO_LINK_MAP_CMDID */
2491     WMI_MLO_AP_VDEV_TID_TO_LINK_MAP_EVENTID,
2492     /* Response event for WMI_MLO_VDEV_GET_LINK_INFO_CMDID */
2493     WMI_MLO_VDEV_LINK_INFO_EVENTID,
2494     /** request host to do T2LM neg to the un-disabled link */
2495     WMI_MLO_LINK_DISABLE_REQUEST_EVENTID,
2496     /** request host to switch to new link for specified vdev */
2497     WMI_MLO_LINK_SWITCH_REQUEST_EVENTID,
2498     /** Response event for WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_CMDID */
2499     WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_EVENTID,
2500     /** WMI Event to spcify reason for link state switch */
2501     WMI_MLO_LINK_STATE_SWITCH_EVENTID,
2502     /** WMI Event to sync link info to host */
2503     WMI_MLO_LINK_INFO_SYNC_EVENTID,
2504 
2505     /* WMI event specific to Quiet handling */
2506     WMI_QUIET_HANDLING_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_QUIET_OFL),
2507 
2508     /* ODD events */
2509     WMI_ODD_LIVEDUMP_RESPONSE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ODD),
2510 
2511     /** WMI events specific to manually-triggered UL */
2512     /**
2513      * WMI Event to send Manual UL OFDMA Trigger frame status feedback to Host
2514      */
2515     WMI_MANUAL_UL_OFDMA_TRIG_FEEDBACK_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MANUAL_UL_TRIG),
2516     /**
2517      * WMI Event to send Manual UL OFDMA Trigger frame RX PPDU info to Host
2518      */
2519     WMI_MANUAL_UL_OFDMA_TRIG_RX_PEER_USERINFO_EVENTID,
2520 } WMI_EVT_ID;
2521 
2522 /* defines for OEM message sub-types */
2523 #define WMI_OEM_CAPABILITY_REQ     0x01
2524 #define WMI_OEM_CAPABILITY_RSP     0x02
2525 #define WMI_OEM_MEASUREMENT_REQ    0x03
2526 #define WMI_OEM_MEASUREMENT_RSP    0x04
2527 #define WMI_OEM_ERROR_REPORT_RSP   0x05
2528 #define WMI_OEM_NAN_MEAS_REQ       0x06
2529 #define WMI_OEM_NAN_MEAS_RSP       0x07
2530 #define WMI_OEM_NAN_PEER_INFO      0x08
2531 #define WMI_OEM_CONFIGURE_LCR      0x09
2532 #define WMI_OEM_CONFIGURE_LCI      0x0A
2533 
2534 
2535 #define WMI_CHAN_LIST_TAG                0x1
2536 #define WMI_SSID_LIST_TAG                0x2
2537 #define WMI_BSSID_LIST_TAG               0x3
2538 #define WMI_IE_TAG                       0x4
2539 #define WMI_SCAN_START_OFFSET_TAG        0x5
2540 
2541 typedef struct {
2542     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel */
2543     /** primary 20 MHz channel frequency in mhz */
2544     A_UINT32 mhz;
2545     /** Center frequency 1 in MHz*/
2546     A_UINT32 band_center_freq1;
2547     /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
2548     A_UINT32 band_center_freq2;
2549     /** channel info described below */
2550     A_UINT32 info;
2551     /** contains min power, max power, reg power and reg class id.  */
2552     A_UINT32 reg_info_1;
2553     /** contains antennamax, max bandwidth */
2554     A_UINT32 reg_info_2;
2555 } wmi_channel;
2556 
2557 typedef enum {
2558     WMI_CHANNEL_CHANGE_CAUSE_NONE = 0,
2559     WMI_CHANNEL_CHANGE_CAUSE_CSA,
2560 } wmi_channel_change_cause;
2561 
2562 /** channel info consists of 6 bits of channel mode */
2563 
2564 #define WMI_SET_CHANNEL_MODE(pwmi_channel,val) do { \
2565      (pwmi_channel)->info &= 0xffffffc0;            \
2566      (pwmi_channel)->info |= (val);                 \
2567      } while (0)
2568 
2569 #define WMI_GET_CHANNEL_MODE(pwmi_channel) ((pwmi_channel)->info & 0x0000003f)
2570 
2571 #define WMI_CHAN_FLAG_HT40_PLUS   6
2572 #define WMI_CHAN_FLAG_PASSIVE     7
2573 #define WMI_CHAN_ADHOC_ALLOWED    8
2574 #define WMI_CHAN_AP_DISABLED      9
2575 #define WMI_CHAN_FLAG_DFS         10
2576 #define WMI_CHAN_FLAG_ALLOW_HT    11  /* HT is allowed on this channel */
2577 #define WMI_CHAN_FLAG_ALLOW_VHT   12  /* VHT is allowed on this channel */
2578 #define WMI_CHANNEL_CHANGE_CAUSE_CSA 13 /*Indicate reason for channel switch */
2579 #define WMI_CHAN_FLAG_HALF_RATE     14  /* Indicates half rate channel */
2580 #define WMI_CHAN_FLAG_QUARTER_RATE  15  /* Indicates quarter rate channel */
2581 #define WMI_CHAN_FLAG_DFS_CFREQ2  16 /* Enable radar event reporting for sec80 in VHT80p80 */
2582 #define WMI_CHAN_FLAG_ALLOW_HE    17 /* HE (11ax) is allowed on this channel */
2583 #define WMI_CHAN_FLAG_PSC         18 /* Indicate it is a PSC (preferred scanning channel) */
2584 #define WMI_CHAN_FLAG_NAN_DISABLED 19 /* Indicates that NAN operations are disabled on this channel */
2585 #define WMI_CHAN_FLAG_STA_DFS     20 /* Indicates if STA should process radar signals */
2586 #define WMI_CHAN_FLAG_ALLOW_EHT   21 /* EHT (11be) is allowed on this channel */
2587 
2588 #define WMI_SET_CHANNEL_FLAG(pwmi_channel,flag) do { \
2589         (pwmi_channel)->info |=  ((A_UINT32) 1 << flag);      \
2590      } while (0)
2591 
2592 #define WMI_GET_CHANNEL_FLAG(pwmi_channel,flag)   \
2593         (((pwmi_channel)->info & ((A_UINT32) 1 << flag)) >> flag)
2594 
2595 #define WMI_SET_CHANNEL_MIN_POWER(pwmi_channel,val) do { \
2596      (pwmi_channel)->reg_info_1 &= 0xffffff00;           \
2597      (pwmi_channel)->reg_info_1 |= (val & 0xff);         \
2598      } while (0)
2599 #define WMI_GET_CHANNEL_MIN_POWER(pwmi_channel) ((pwmi_channel)->reg_info_1 & 0xff)
2600 
2601 #define WMI_SET_CHANNEL_MAX_POWER(pwmi_channel,val) do { \
2602      (pwmi_channel)->reg_info_1 &= 0xffff00ff;           \
2603      (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 8);  \
2604      } while (0)
2605 #define WMI_GET_CHANNEL_MAX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 8) & 0xff)
2606 
2607 #define WMI_SET_CHANNEL_REG_POWER(pwmi_channel,val) do { \
2608      (pwmi_channel)->reg_info_1 &= 0xff00ffff;           \
2609      (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 16); \
2610      } while (0)
2611 #define WMI_GET_CHANNEL_REG_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 16) & 0xff)
2612 #define WMI_SET_CHANNEL_REG_CLASSID(pwmi_channel,val) do { \
2613      (pwmi_channel)->reg_info_1 &= 0x00ffffff;             \
2614      (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 24);   \
2615      } while (0)
2616 #define WMI_GET_CHANNEL_REG_CLASSID(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 24) & 0xff)
2617 
2618 #define WMI_SET_CHANNEL_ANTENNA_MAX(pwmi_channel,val) do { \
2619      (pwmi_channel)->reg_info_2 &= 0xffffff00;             \
2620      (pwmi_channel)->reg_info_2 |= (val & 0xff);           \
2621      } while (0)
2622 #define WMI_GET_CHANNEL_ANTENNA_MAX(pwmi_channel) ((pwmi_channel)->reg_info_2 & 0xff)
2623 
2624 /* max tx power is in 1 dBm units */
2625 #define WMI_SET_CHANNEL_MAX_TX_POWER(pwmi_channel,val) do { \
2626      (pwmi_channel)->reg_info_2 &= 0xffff00ff;              \
2627      (pwmi_channel)->reg_info_2 |= ((val & 0xff) << 8);     \
2628      } while (0)
2629 #define WMI_GET_CHANNEL_MAX_TX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_2)>>8) & 0xff)
2630 
2631 /* max bw supported for each channel, enum wmi_channel_width as value */
2632 #define WMI_SET_CHANNEL_MAX_BANDWIDTH(pwmi_channel,val) do { \
2633      (pwmi_channel)->reg_info_2 &= 0xff00ffff;              \
2634      (pwmi_channel)->reg_info_2 |= ((val & 0xff) << 16);     \
2635      } while (0)
2636 #define WMI_GET_CHANNEL_MAX_BANDWIDTH(pwmi_channel) ((((pwmi_channel)->reg_info_2) >> 16) & 0xff)
2637 
2638 /** HT Capabilities*/
2639 #define WMI_HT_CAP_ENABLED                0x0001   /* HT Enabled/ disabled */
2640 #define WMI_HT_CAP_HT20_SGI               0x0002   /* Short Guard Interval with HT20 */
2641 #define WMI_HT_CAP_DYNAMIC_SMPS           0x0004   /* Dynamic MIMO powersave */
2642 #define WMI_HT_CAP_TX_STBC                0x0008   /* B3 TX STBC */
2643 #define WMI_HT_CAP_TX_STBC_MASK_SHIFT     3
2644 #define WMI_HT_CAP_RX_STBC                0x0030   /* B4-B5 RX STBC */
2645 #define WMI_HT_CAP_RX_STBC_MASK_SHIFT     4
2646 #define WMI_HT_CAP_LDPC                   0x0040   /* LDPC supported */
2647 #define WMI_HT_CAP_L_SIG_TXOP_PROT        0x0080   /* L-SIG TXOP Protection */
2648 #define WMI_HT_CAP_MPDU_DENSITY           0x0700   /* MPDU Density */
2649 #define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
2650 #define WMI_HT_CAP_HT40_SGI               0x0800
2651 #define WMI_HT_CAP_RX_LDPC                0x1000   /* LDPC RX support */
2652 #define WMI_HT_CAP_TX_LDPC                0x2000   /* LDPC TX support */
2653 
2654 
2655 /* These macros should be used when we wish to advertise STBC support for
2656  * only 1SS or 2SS or 3SS. */
2657 #define WMI_HT_CAP_RX_STBC_1SS            0x0010   /* B4-B5 RX STBC */
2658 #define WMI_HT_CAP_RX_STBC_2SS            0x0020   /* B4-B5 RX STBC */
2659 #define WMI_HT_CAP_RX_STBC_3SS            0x0030   /* B4-B5 RX STBC */
2660 
2661 
2662 #define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED       | \
2663                                 WMI_HT_CAP_HT20_SGI      | \
2664                                 WMI_HT_CAP_HT40_SGI      | \
2665                                 WMI_HT_CAP_TX_STBC       | \
2666                                 WMI_HT_CAP_RX_STBC       | \
2667                                 WMI_HT_CAP_LDPC          | \
2668                                 WMI_HT_CAP_TX_LDPC       | \
2669                                 WMI_HT_CAP_RX_LDPC)
2670 
2671 /* WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information
2672  field. The fields not defined here are not supported, or reserved.
2673  Do not change these masks and if you have to add new one follow the
2674  bitmask as specified by 802.11ac draft.
2675  */
2676 
2677 
2678 #define WMI_VHT_CAP_MAX_MPDU_LEN_7935            0x00000001
2679 #define WMI_VHT_CAP_MAX_MPDU_LEN_11454           0x00000002
2680 #define WMI_VHT_CAP_MAX_MPDU_LEN_MASK            0x00000003
2681 #define WMI_VHT_CAP_CH_WIDTH_160MHZ              0x00000004
2682 #define WMI_VHT_CAP_CH_WIDTH_80P80_160MHZ        0x00000008
2683 #define WMI_VHT_CAP_RX_LDPC                      0x00000010
2684 #define WMI_VHT_CAP_SGI_80MHZ                    0x00000020
2685 #define WMI_VHT_CAP_SGI_160MHZ                   0x00000040
2686 #define WMI_VHT_CAP_TX_STBC                      0x00000080
2687 #define WMI_VHT_CAP_RX_STBC_MASK                 0x00000300
2688 #define WMI_VHT_CAP_RX_STBC_MASK_SHIFT           8
2689 #define WMI_VHT_CAP_SU_BFORMER                   0x00000800
2690 #define WMI_VHT_CAP_SU_BFORMEE                   0x00001000
2691 #define WMI_VHT_CAP_MAX_CS_ANT_MASK              0x0000E000
2692 #define WMI_VHT_CAP_MAX_CS_ANT_MASK_SHIFT        13
2693 #define WMI_VHT_CAP_MAX_SND_DIM_MASK             0x00070000
2694 #define WMI_VHT_CAP_MAX_SND_DIM_MASK_SHIFT       16
2695 #define WMI_VHT_CAP_MU_BFORMER                   0x00080000
2696 #define WMI_VHT_CAP_MU_BFORMEE                   0x00100000
2697 #define WMI_VHT_CAP_TXOP_PS                      0x00200000
2698 #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP            0x03800000
2699 #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT      23
2700 #define WMI_VHT_CAP_RX_FIXED_ANT                 0x10000000
2701 #define WMI_VHT_CAP_TX_FIXED_ANT                 0x20000000
2702 #define WMI_VHT_EXTENDED_NSS_BW_MASK             0xC0000000
2703 #define WMI_VHT_EXTENDED_NSS_BW_MASK_SHIFT       30
2704 
2705 /* TEMPORARY:
2706  * Preserve the incorrect old name as an alias for the correct new name
2707  * until all references to the old name have been removed from all hosts
2708  * and targets.
2709  */
2710 #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT
2711 
2712 
2713 /* These macros should be used when we wish to advertise STBC support for
2714  * only 1SS or 2SS or 3SS. */
2715 #define WMI_VHT_CAP_RX_STBC_1SS 0x00000100
2716 #define WMI_VHT_CAP_RX_STBC_2SS 0x00000200
2717 #define WMI_VHT_CAP_RX_STBC_3SS 0x00000300
2718 
2719 /* TEMPORARY:
2720  * Preserve the incorrect old name as an alias for the correct new name
2721  * until all references to the old name have been removed from all hosts
2722  * and targets.
2723  */
2724 #define WMI_vHT_CAP_RX_STBC_3SS WMI_VHT_CAP_RX_STBC_3SS
2725 
2726 /* TEMPORARY:
2727  * Spec does not have VHT TX LDPC capability bit. To Maintain backward
2728  * compatibility due to previous incorrect definition, the value is moved
2729  * from 0x4 to 0x0. No new use of WMI_VHT_CAP_TX_LDPC should be added.
2730  */
2731 #define WMI_VHT_CAP_TX_LDPC 0x0
2732 
2733 
2734 #define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454  |      \
2735                                  WMI_VHT_CAP_SGI_80MHZ           |      \
2736                                  WMI_VHT_CAP_TX_STBC             |      \
2737                                  WMI_VHT_CAP_RX_STBC_MASK        |      \
2738                                  WMI_VHT_CAP_RX_LDPC             |      \
2739                                  WMI_VHT_CAP_TX_LDPC             |      \
2740                                  WMI_VHT_CAP_MAX_AMPDU_LEN_EXP   |      \
2741                                  WMI_VHT_CAP_RX_FIXED_ANT        |      \
2742                                  WMI_VHT_CAP_TX_FIXED_ANT)
2743 
2744 /* Interested readers refer to Rx/Tx MCS Map definition as defined in
2745  802.11ac
2746  */
2747 #define WMI_VHT_MAX_MCS_EXT_SS_GET(vht_mcs_map, index) WMI_GET_BITS(vht_mcs_map, 16 + index, 1)
2748 #define WMI_VHT_MAX_MCS_EXT_SS_SET(vht_mcs_map, index, value) WMI_SET_BITS(vht_mcs_map, 16 + index, 1, value)
2749 
2750 /* Notification bit for Ext MCS 10/11 support */
2751 #define WMI_VHT_MCS_NOTIFY_EXT_SS_GET(vht_mcs_map) WMI_GET_BITS(vht_mcs_map, 24, 1)
2752 #define WMI_VHT_MCS_NOTIFY_EXT_SS_SET(vht_mcs_map, value) WMI_SET_BITS(vht_mcs_map, 24, 1, value)
2753 
2754 #define WMI_VHT_MAX_MCS_4_SS_MASK(r,ss)      ((3 & (r)) << (((ss) - 1) << 1))
2755 #define WMI_VHT_MAX_SUPP_RATE_MASK           0x1fff0000
2756 #define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT     16
2757 
2758 /** 11ax capabilities */
2759 #define WMI_HE_CAP_PPE_PRESENT            0x00000001
2760 #define WMI_HE_CAP_TWT_RESPONDER_SUPPORT  0x00000002
2761 #define WMI_HE_CAP_TWT_REQUESTER_SUPPORT  0x00000004
2762 #define WMI_HE_FRAG_SUPPORT_MASK          0x00000018
2763 #define WMI_HE_FRAG_SUPPORT_SHIFT         3
2764 
2765 #define WMI_HE_CAP_1X_LTF_400NS_GI_SUPPORT      0x00000001
2766 #define WMI_HE_CAP_2X_LTF_400NS_GI_SUPPORT      0x00000002
2767 #define WMI_HE_CAP_2X_LTF_160_80_80_SUPPORT     0x00000004
2768 #define WMI_HE_CAP_RX_DL_OFDMA_SUPPORT          0x00000018
2769 #define WMI_HE_CAP_RX_DL_MUMIMO_SUPPORT         0x00000030
2770 
2771 #define WMI_HE_CAP_1X_LTF_400NS_GI_SUPPORT_GET(he_cap_info_dword1) \
2772     WMI_GET_BITS(he_cap_info_dword1, 0, 1)
2773 #define WMI_HE_CAP_1X_LTF_400NS_GI_SUPPORT_SET(he_cap_info_dword1, value) \
2774     WMI_SET_BITS(he_cap_info_dword1, 0, 1, value)
2775 
2776 #define WMI_HE_CAP_2X_LTF_400NS_GI_SUPPORT_GET(he_cap_info_dword1) \
2777     WMI_GET_BITS(he_cap_info_dword1, 1, 1)
2778 #define WMI_HE_CAP_2X_LTF_400NS_GI_SUPPORT_SET(he_cap_info_dword1, value) \
2779     WMI_SET_BITS(he_cap_info_dword1, 1, 1, value)
2780 
2781 #define WMI_HE_CAP_2X_LTF_160_80_80_SUPPORT_GET(he_cap_info_dword1) \
2782     WMI_GET_BITS(he_cap_info_dword1, 2, 1)
2783 #define WMI_HE_CAP_2X_LTF_160_80_80_SUPPORT_SET(he_cap_info_dword1, value) \
2784     WMI_SET_BITS(he_cap_info_dword1, 2, 1, value)
2785 
2786 #define WMI_HE_CAP_RX_DL_OFDMA_SUPPORT_GET(he_cap_info_dword1) \
2787     WMI_GET_BITS(he_cap_info_dword1, 3, 2)
2788 #define WMI_HE_CAP_RX_DL_OFDMA_SUPPORT_SET(he_cap_info_dword1, value) \
2789     WMI_SET_BITS(he_cap_info_dword1, 3, 2, value)
2790 
2791 #define WMI_HE_CAP_RX_DL_MUMIMO_SUPPORT_GET(he_cap_info_dword1) \
2792     WMI_GET_BITS(he_cap_info_dword1, 5, 2)
2793 #define WMI_HE_CAP_RX_DL_MUMIMO_SUPPORT_SET(he_cap_info_dword1, value) \
2794     WMI_SET_BITS(he_cap_info_dword1, 5, 2, value)
2795 
2796 /* Interested readers refer to Rx/Tx MCS Map definition as defined in 802.11ax
2797  */
2798 #define WMI_HE_MAX_MCS_4_SS_MASK(r,ss)      ((3 & (r)) << (((ss) - 1) << 1))
2799 
2800 /*
2801  * index ranges from 0 to 15, and is used for checking if MCS 12/13 is enabled
2802  * for a particular NSS.
2803  * The lower 8 bits (indices 0-7) within the 16 bits indicate MCS 12/13
2804  * enablement for BW <= 80MHz; the upper 8 bits (indices 8-15) within
2805  * the 16 bits indicate MCS 12/13 enablement for BW > 80MHz.
2806  * The 16 bits for the index values are within the upper bits (bits 31:16)
2807  * of a 32-bit word.
2808  */
2809 #define WMI_HE_EXTRA_MCS_SS_GET(he_mcs_map_ext, index) \
2810     WMI_GET_BITS(he_mcs_map_ext, 16 + index, 1)
2811 #define WMI_HE_EXTRA_MCS_SS_SET(he_mcs_map_ext, index, value) \
2812     WMI_SET_BITS(he_mcs_map_ext, 16 + index, 1, value)
2813 
2814 /* fragmentation support field value */
2815 enum {
2816     WMI_HE_FRAG_SUPPORT_LEVEL0, /* No Fragmentation support */
2817     WMI_HE_FRAG_SUPPORT_LEVEL1, /* support for fragments within a VHT single MPDU, no support for fragments within AMPDU */
2818     WMI_HE_FRAG_SUPPORT_LEVEL2, /* support for up to 1 fragment per MSDU within a single A-MPDU */
2819     WMI_HE_FRAG_SUPPORT_LEVEL3, /* support for multiple fragments per MSDU within an A-MPDU */
2820 };
2821 
2822 enum {
2823     WMI_HE_RX_DL_OFDMA_SUPPORT_DEFAULT, /* Default */
2824     WMI_HE_RX_DL_OFDMA_SUPPORT_DISABLE, /* RX DL OFDMA Support Disabled */
2825     WMI_HE_RX_DL_OFDMA_SUPPORT_ENABLE,  /* RX DL OFDMA Support Enabled */
2826     WMI_HE_RX_DL_OFDMA_SUPPORT_INVALID, /* INVALID  */
2827 };
2828 
2829 enum {
2830     WMI_HE_RX_DL_MUMIMO_SUPPORT_DEFAULT, /* Default */
2831     WMI_HE_RX_DL_MUMIMO_SUPPORT_DISABLE, /* RX DL MU-MIMO Support Disabled */
2832     WMI_HE_RX_DL_MUMIMO_SUPPORT_ENABLE,  /* RX DL MU-MIMO Support Enabled */
2833     WMI_HE_RX_DL_MUMIMO_SUPPORT_INVALID, /* INVALID  */
2834 };
2835 
2836 /** NOTE: This defs cannot be changed in the future without breaking WMI compatibility */
2837 #define WMI_MAX_NUM_SS                    MAX_HE_NSS
2838 #define WMI_MAX_NUM_RU                    MAX_HE_RU
2839 
2840 /*
2841  * Figure 8 554ae: -PPE Threshold Info field format
2842  * we pack PPET16 and PPT8 for four RU's in one element of array.
2843  *
2844  * ppet16_ppet8_ru3_ru0 array element 0 holds:
2845  *     |  PPET8 | PPET16 | PPET8  | PPET16 | PPET8  | PPET16 | PPET8  | PPET16 |
2846  *rsvd |NSS1,RU4|NSS1,RU4|NSS1,RU3|NSS1,RU3|NSS1,RU2|NSS1,RU2|NSS1,RU1|NSS1,RU1|
2847  *31:23|  22:20 |  19:17 |  17:15 |  14:12 |  11:9  |   8:6  |   5:3  |   2:0  |
2848  *
2849  * ppet16_ppet8_ru3_ru0 array element 1 holds:
2850  *     | PPET8  | PPET16 | PPET8  | PPET16 | PPET8  | PPET16 | PPET8  | PPET16 |
2851  *rsvd |NSS2,RU4|NSS2,RU4|NSS2,RU3|NSS2,RU3|NSS2,RU2|NSS2,RU2|NSS2,RU1|NSS2,RU1|
2852  *31:23|  22:20 |  19:17 |  17:15 |  14:12 |  11:9  |   8:6  |   5:3  |   2:0  |
2853  *
2854  * etc.
2855  */
2856 
2857 /*
2858  * Note that in these macros, "ru" is one-based, not zero-based, while
2859  * nssm1 is zero-based.
2860  */
2861 #define WMI_SET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1, ppet) \
2862     do { \
2863         ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1) & 3) * 6)); \
2864         ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet & 7) << (((ru-1) & 3) * 6)); \
2865     } while (0)
2866 
2867 #define WMI_GET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1) \
2868     ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1) & 3) * 6)) & 7)
2869 
2870 #define WMI_SET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1, ppet) \
2871     do { \
2872         ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1) & 3) * 6 + 3)); \
2873         ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet&7) << (((ru-1) & 3) * 6 + 3)); \
2874     } while (0)
2875 
2876 #define WMI_GET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1) \
2877     ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1) & 3) * 6 + 3)) & 7)
2878 
2879 typedef struct _wmi_ppe_threshold {
2880     A_UINT32 numss_m1; /** NSS - 1*/
2881     union {
2882         A_UINT32 ru_count; /** RU COUNT OBSOLETE to be removed after few versions */
2883         A_UINT32 ru_mask; /** RU index mask */
2884     };
2885     A_UINT32 ppet16_ppet8_ru3_ru0[WMI_MAX_NUM_SS]; /** ppet8 and ppet16 for max num ss */
2886     /**************************************************
2887      * As this struct is embedded inside other structs,
2888      * it cannot be expanded without breaking backwards
2889      * compatibility.  Do not add new fields here.
2890      **************************************************/
2891 } wmi_ppe_threshold;
2892 
2893 #define WMI_MAX_EHTCAP_MAC_SIZE  2
2894 #define WMI_MAX_EHTCAP_PHY_SIZE  3
2895 
2896 /*
2897  * 0 – index indicated EHT-MCS map for 20Mhz only sta (4 bytes valid)
2898  * 1 – index for <= 80MHz bw  (only 3 bytes are valid and other is reserved)
2899  * 2 – index for == 160Mhz bw (only 3 bytes are valid and other is reserved)
2900  * 3 – index for == 320Mhz bw (only 3 bytes are valid and other is reserved)
2901  */
2902 enum {
2903     WMI_EHT_SUPP_MCS_20MHZ_ONLY,
2904     WMI_EHT_SUPP_MCS_LE_80MHZ,
2905     WMI_EHT_SUPP_MCS_160MHZ,
2906     WMI_EHT_SUPP_MCS_320MHZ,
2907 };
2908 #define WMI_MAX_EHT_SUPP_MCS_2G_SIZE  2
2909 #define WMI_MAX_EHT_SUPP_MCS_5G_SIZE  4
2910 
2911 /* WMI_SYS_CAPS_* refer to the capabilities that system support
2912  */
2913 #define WMI_SYS_CAP_ENABLE                       0x00000001
2914 #define WMI_SYS_CAP_TXPOWER                      0x00000002
2915 
2916 /*
2917  * WMI Dual Band Simultaneous (DBS) hardware mode list bit-mask definitions.
2918  * Bits 5:0 are reserved
2919  */
2920 #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS  (28)
2921 #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS  (24)
2922 #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS  (20)
2923 #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS  (16)
2924 #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS   (12)
2925 #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS   (8)
2926 #define WMI_DBS_HW_MODE_DBS_MODE_BITPOS         (7)
2927 #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS   (6)
2928 
2929 #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK    (0xf << WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
2930 #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK    (0xf << WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
2931 #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK    (0xf << WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
2932 #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK    (0xf << WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
2933 #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK     (0xf << WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
2934 #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK     (0xf << WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
2935 #define WMI_DBS_HW_MODE_DBS_MODE_MASK           (0x1 << WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
2936 #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK     (0x1 << WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
2937 
2938 #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_SET(hw_mode, value) \
2939     WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS, 4, value)
2940 #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_SET(hw_mode, value) \
2941     WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS, 4, value)
2942 #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_SET(hw_mode, value) \
2943     WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS, 4, value)
2944 #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_SET(hw_mode, value) \
2945     WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS, 4, value)
2946 #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_SET(hw_mode, value)  \
2947     WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS, 4, value)
2948 #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_SET(hw_mode, value)  \
2949     WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS, 4, value)
2950 #define WMI_DBS_HW_MODE_DBS_MODE_SET(hw_mode, value)        \
2951     WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_DBS_MODE_BITPOS, 1, value)
2952 #define WMI_DBS_HW_MODE_AGILE_DFS_SET(hw_mode, value)       \
2953     WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS, 1, value)
2954 
2955 #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_GET(hw_mode)    \
2956     ((hw_mode & WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
2957 #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_GET(hw_mode)    \
2958     ((hw_mode & WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
2959 #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_GET(hw_mode)    \
2960     ((hw_mode & WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
2961 #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_GET(hw_mode)    \
2962     ((hw_mode & WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
2963 #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_GET(hw_mode)     \
2964     ((hw_mode & WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
2965 #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_GET(hw_mode)     \
2966     ((hw_mode & WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
2967 #define WMI_DBS_HW_MODE_DBS_MODE_GET(hw_mode)           \
2968     ((hw_mode & WMI_DBS_HW_MODE_DBS_MODE_MASK) >> WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
2969 #define WMI_DBS_HW_MODE_AGILE_DFS_GET(hw_mode)          \
2970     ((hw_mode & WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK) >> WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
2971 
2972 #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS        (31)
2973 #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS      (30)
2974 #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS  (29)
2975 #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS  (28)
2976 #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS   (27)
2977 
2978 #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK         ((A_UINT32) 0x1 << WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
2979 #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK       ((A_UINT32) 0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
2980 #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK   ((A_UINT32) 0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
2981 #define WMI_DBS_CONC_SCAN_CFG_ASYC_DBS_SCAN_MASK    ((A_UINT32) 0x1 << WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS)
2982 #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_MASK    ((A_UINT32) 0x1 << WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS)
2983 
2984 #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_SET(scan_cfg, value) \
2985     WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS, 1, value)
2986 #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_SET(scan_cfg, value) \
2987     WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS, 1, value)
2988 #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_SET(scan_cfg, value) \
2989     WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS, 1, value)
2990 #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_SET(scan_cfg, value) \
2991     WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS, 1, value)
2992 #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_SET(scan_cfg, value) \
2993     WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS, 1, value)
2994 
2995 #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_GET(scan_cfg)    \
2996     ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
2997 #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_GET(scan_cfg)    \
2998     ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
2999 #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_GET(scan_cfg)    \
3000     ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
3001 #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_GET(scan_cfg)    \
3002     ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_ASYC_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS)
3003 #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_GET(scan_cfg)    \
3004     ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS)
3005 
3006 #define WMI_DBS_FW_MODE_CFG_DBS_BITPOS                  (31)
3007 #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS            (30)
3008 #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS          (29)
3009 #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS (28)
3010 #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS (27)
3011 #define WMI_DBS_FW_MODE_CFG_ASYNC_SBS_BITPOS            (26)
3012 
3013 #define WMI_DBS_FW_MODE_CFG_DBS_MASK                    ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
3014 #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK              ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
3015 #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_DFS_MASK        ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS)
3016 #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_MASK   ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS)
3017 #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_MASK   ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS)
3018 #define WMI_DBS_FW_MODE_CFG_ASYNC_SBS_MASK              ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_ASYNC_SBS_BITPOS)
3019 
3020 #define WMI_DBS_FW_MODE_CFG_DBS_SET(fw_mode, value) \
3021     WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_BITPOS, 1, value)
3022 #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_SET(fw_mode, value) \
3023     WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS, 1, value)
3024 #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_SET(fw_mode, value) \
3025     WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS, 1, value)
3026 #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_SET(fw_mode, value) \
3027     WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS, 1, value)
3028 #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_SET(fw_mode, value) \
3029     WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS, 1, value)
3030 #define WMI_DBS_FW_MODE_CFG_ASYNC_SBS_SET(fw_mode, value) \
3031     WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_ASYNC_SBS_BITPOS, 1, value)
3032 
3033 #define WMI_DBS_FW_MODE_CFG_DBS_GET(fw_mode)    \
3034     ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
3035 #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_GET(fw_mode)    \
3036     ((fw_mode & WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
3037 #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_GET(fw_mode)    \
3038     ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS)
3039 #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_GET(fw_mode)    \
3040     ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS)
3041 #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_GET(fw_mode)    \
3042     ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS)
3043 #define WMI_DBS_FW_MODE_CFG_ASYNC_SBS_GET(fw_mode)    \
3044     ((fw_mode & WMI_DBS_FW_MODE_CFG_ASYNC_SBS_MASK) >> WMI_DBS_FW_MODE_CFG_ASYNC_SBS_BITPOS)
3045 
3046 /** NOTE: This structure cannot be extended in the future without breaking WMI compatibility */
3047 typedef struct _wmi_abi_version {
3048     A_UINT32 abi_version_0; /** WMI Major and Minor versions */
3049     A_UINT32 abi_version_1; /** WMI change revision */
3050     A_UINT32 abi_version_ns_0; /** ABI version namespace first four dwords */
3051     A_UINT32 abi_version_ns_1; /** ABI version namespace second four dwords */
3052     A_UINT32 abi_version_ns_2; /** ABI version namespace third four dwords */
3053     A_UINT32 abi_version_ns_3; /** ABI version namespace fourth four dwords */
3054 } wmi_abi_version;
3055 
3056 /*
3057  * maximum number of memory requests allowed from FW.
3058  */
3059 #define WMI_MAX_MEM_REQS 16
3060 
3061 /* !!NOTE!!:
3062  * This HW_BD_INFO_SIZE cannot be changed without breaking compatibility.
3063  * Please don't change it.
3064  */
3065 #define HW_BD_INFO_SIZE       5
3066 
3067 /**
3068  * PDEV ID to identify the physical device,
3069  * value 0 reserved for SOC level commands/event
3070  */
3071 #define WMI_PDEV_ID_SOC         0 /* SOC level, applicable to all PDEVs */
3072 #define WMI_PDEV_ID_1ST         1 /* first pdev  (pdev 0) */
3073 #define WMI_PDEV_ID_2ND         2 /* second pdev (pdev 1) */
3074 #define WMI_PDEV_ID_3RD         3 /* third pdev  (pdev 2) */
3075 
3076 /*
3077  * Enum regarding which BDF elements are provided in which elements of the
3078  * wmi_service_ready_event_fixed_param.hw_bd_info[] array
3079  */
3080 typedef enum {
3081     BDF_VERSION = 0,
3082     REF_DESIGN_ID = 1,
3083     CUSTOMER_ID = 2,
3084     PROJECT_ID = 3,
3085     BOARD_DATA_REV = 4,
3086 } wmi_hw_bd_info_e;
3087 
3088 /*
3089  * Macros to get/set BDF details within the
3090  * wmi_service_ready_event_fixed_param.hw_bd_info[] array
3091  */
3092 #define WMI_GET_BDF_VERSION(hw_bd_info)         ((hw_bd_info)[BDF_VERSION])
3093 #define WMI_GET_REF_DESIGN(hw_bd_info)          ((hw_bd_info)[REF_DESIGN_ID])
3094 #define WMI_GET_CUSTOMER_ID(hw_bd_info)         ((hw_bd_info)[CUSTOMER_ID])
3095 #define WMI_GET_PROJECT_ID(hw_bd_info)          ((hw_bd_info)[PROJECT_ID])
3096 #define WMI_GET_BOARD_DATA_REV(hw_bd_info)      ((hw_bd_info)[BOARD_DATA_REV])
3097 
3098 #define WMI_SET_BDF_VERSION(hw_bd_info, val)    ((hw_bd_info)[BDF_VERSION]    = (val))
3099 #define WMI_SET_REF_DESIGN(hw_bd_info, val)     ((hw_bd_info)[REF_DESIGN_ID]  = (val))
3100 #define WMI_SET_CUSTOMER_ID(hw_bd_info, val)    ((hw_bd_info)[CUSTOMER_ID]    = (val))
3101 #define WMI_SET_PROJECT_ID(hw_bd_info, val)     ((hw_bd_info)[PROJECT_ID]     = (val))
3102 #define WMI_SET_BOARD_DATA_REV(hw_bd_info, val) ((hw_bd_info)[BOARD_DATA_REV] = (val))
3103 
3104 /*
3105  * Enum to indicate which Tx power capability is provided in which element of
3106  * hw_tx_power_signed
3107  */
3108 typedef enum {
3109     WMI_HW_MIN_TX_POWER_SIGNED = 0,
3110     WMI_HW_MAX_TX_POWER_SIGNED = 1,
3111     WMI_HW_TX_POWER_CAPS_MAX,
3112 } wmi_hw_tx_power_caps;
3113 
3114 /**
3115  * The following struct holds optional payload for
3116  * wmi_service_ready_event_fixed_param,e.g., 11ac pass some of the
3117  * device capability to the host.
3118  */
3119 typedef struct {
3120     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_READY_EVENT */
3121     A_UINT32 fw_build_vers; /* firmware build number */
3122     wmi_abi_version fw_abi_vers;
3123     A_UINT32 phy_capability; /* WMI_PHY_CAPABILITY */
3124     A_UINT32 max_frag_entry; /* Maximum number of frag table entries that SW will populate less 1 */
3125     A_UINT32 num_rf_chains;
3126     /* The following field is only valid for service type WMI_SERVICE_11AC */
3127     A_UINT32 ht_cap_info; /* WMI HT Capability */
3128     A_UINT32 vht_cap_info; /* VHT capability info field of 802.11ac */
3129     A_UINT32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
3130     A_UINT32 hw_min_tx_power;
3131     A_UINT32 hw_max_tx_power;
3132     /* sys_cap_info:
3133      * bits  1:0  - RXTX LED + RFKILL enable flags (see WMI_LEDRFKILL_FLAGS)
3134      * bits 31:2  - reserved (must be set to zero)
3135      */
3136     A_UINT32 sys_cap_info;
3137     A_UINT32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
3138     /** Max beacon and Probe Response IE offload size (includes
3139      *  optional P2P IEs) */
3140     A_UINT32 max_bcn_ie_size;
3141     /*
3142      * request to host to allocate a chuck of memory and pss it down to FW via WM_INIT.
3143      * FW uses this as FW extesnsion memory for saving its data structures. Only valid
3144      * for low latency interfaces like PCIE where FW can access this memory directly (or)
3145      * by DMA.
3146      */
3147     A_UINT32 num_mem_reqs;
3148     /* Max No. scan channels target can support
3149      * If FW is too old and doesn't indicate this number, host side value will default to
3150      * 0, and host will take the original compatible value (62) for future scan channel
3151      * setup.
3152      */
3153     A_UINT32 max_num_scan_channels;
3154 
3155     /* Hardware board specific ID. Values defined in enum WMI_HWBOARD_ID.
3156      * Default 0 means that hw_bd_info[] is invalid (legacy board).
3157      */
3158     A_UINT32 hw_bd_id;
3159     A_UINT32 hw_bd_info[HW_BD_INFO_SIZE]; /* Board specific information. Invalid if hw_hd_id is zero. */
3160 
3161     /*
3162      * Number of MACs supported, i.e. a DBS-capable device will return 2
3163      */
3164     A_UINT32 max_supported_macs;
3165 
3166     /*
3167      * FW sub-feature capabilities to be used in concurrence with wmi_service_bitmap
3168      */
3169     A_UINT32 wmi_fw_sub_feat_caps; /* values from enum WMI_FW_SUB_FEAT_CAPS */
3170 
3171     /*
3172      * Number of Dual Band Simultaneous (DBS) hardware modes
3173      */
3174     A_UINT32 num_dbs_hw_modes;
3175 
3176     /*
3177      * txrx_chainmask
3178      *    [7:0]   - 2G band tx chain mask
3179      *    [15:8]  - 2G band rx chain mask
3180      *    [23:16] - 5G band tx chain mask
3181      *    [31:24] - 5G band rx chain mask
3182      *
3183      */
3184     A_UINT32 txrx_chainmask;
3185 
3186     /*
3187      * default Dual Band Simultaneous (DBS) hardware mode
3188      */
3189     A_UINT32 default_dbs_hw_mode_index;
3190 
3191     /*
3192      * Number of msdu descriptors target would use
3193      */
3194     A_UINT32 num_msdu_desc;
3195 
3196 /* This ready_event_fixed_param TLV is followed by the below TLVs:
3197  *     HAL_REG_CAPABILITIES   hal_reg_capabilities;
3198  *     A_UINT32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
3199  *     wlan_host_mem_req mem_reqs[];
3200  *     A_UINT32 wlan_dbs_hw_mode_list[];
3201  */
3202 } wmi_service_ready_event_fixed_param;
3203 
3204 typedef enum {
3205     WMI_RXTX_LED_ENABLE         = 0x00000001,
3206     WMI_RFKILL_ENABLE           = 0x00000002,
3207 } WMI_LEDRFKILL_FLAGS;
3208 
3209 #define WMI_SERVICE_SEGMENT_BM_SIZE32 4 /* 4x A_UINT32 = 128 bits */
3210 typedef struct {
3211     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_service_available_event_fixed_param */
3212     /*
3213      * The wmi_service_segment offset field specifies the position within the
3214      * logical bitmap of WMI service flags at which the WMI service flags
3215      * specified within this message begin.
3216      * Since the first 128 WMI service flags are specified within the
3217      * wmi_service_bitmap field of the WMI_SERVICE_READY_EVENT message,
3218      * the wmi_service_segment_offset value is expected to be 128 or more.
3219      */
3220     A_UINT32 wmi_service_segment_offset;
3221     A_UINT32 wmi_service_segment_bitmap[WMI_SERVICE_SEGMENT_BM_SIZE32];
3222 /*
3223  * This TLV is followed by the below TLVs:
3224  * A_UINT32 wmi_service_ext_bitmap[]
3225  *     The wmi_service_ext_bitmap covers WMI service flags at the offset where
3226  *     wmi_service_available_event_fixed_param.wmi_service_segment_bitmap
3227  *     leaves off.
3228  *     For example, if
3229  *         wmi_service_available_event_fixed_param.wmi_service_segment_offset
3230  *     is 128, then
3231  *         wmi_service_available_event_fixed_param.wmi_service_segment_bitmap
3232  *     will cover WMI service flags
3233  *         128 to (128 + WMI_SERVICE_SEGMENT_BM_SIZE32 * 32) = 128 to 256
3234  *     and wmi_service_ext_bitmap will cover WMI service flags starting at 256.
3235  */
3236 } wmi_service_available_event_fixed_param;
3237 
3238 /*
3239  * HDL version GET/SET APIs
3240  */
3241 #define WMI_HDL_VERSION_BITPOS    0
3242 #define WMI_HDL_VERSION_NUM_BITS 10
3243 
3244 #define WMI_HDL_VERSION_GET(dword) WMI_GET_BITS(dword, WMI_HDL_VERSION_BITPOS, WMI_HDL_VERSION_NUM_BITS)
3245 #define WMI_HDL_VERSION_SET(dword, value) WMI_SET_BITS(dword, WMI_HDL_VERSION_BITPOS, WMI_HDL_VERSION_NUM_BITS, value)
3246 
3247 typedef struct {
3248     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_EXT_READY_EVENT */
3249     /* which WMI_DBS_CONC_SCAN_CFG setting the FW is initialized with */
3250     A_UINT32 default_conc_scan_config_bits;
3251     /* which WMI_DBS_FW_MODE_CFG setting the FW is initialized with */
3252     A_UINT32 default_fw_config_bits;
3253     wmi_ppe_threshold ppet;
3254     A_UINT32 he_cap_info; /* see section 8.4.2.213 from draft r8 of 802.11ax; see WMI_HE_FRAG_SUPPORT enum */
3255     /*
3256      * An HT STA shall not allow transmission of more than one MPDU start
3257      * within the time limit described in the MPDU maximum density field.
3258      */
3259     A_UINT32 mpdu_density; /* units are microseconds */
3260     /*
3261      * Maximum no of BSSID based RX filters host can program
3262      * Value 0 means FW hasn't given any limit to host.
3263      */
3264     A_UINT32 max_bssid_rx_filters;
3265     /*
3266      * Extended FW build version information:
3267      * bits  9:0  -> HDL version info
3268      * bits 12:10 -> CRM sub ID MSbs (refer to WMI_SVC_RDY_CRM_SUB_ID_GET/SET)
3269      * bits 27:13 -> reserved
3270      * bits 31:28 -> CRM sub ID LSbs (refer to WMI_SVC_RDY_CRM_SUB_ID_GET/SET)
3271      */
3272     A_UINT32 fw_build_vers_ext;
3273     /* max_nlo_ssids - dynamically negotiated maximum number of SSIDS for NLO
3274      * This limit is the maximum number of SSIDs that can be configured in the
3275      * target for Network List Offload (i.e. scanning for a preferred network).
3276      * If this value is 0x0, the target supports WMI_NLO_MAX_SSIDS (16).
3277      * If this value is non-zero, the host should send back in the
3278      * WMI_INIT message's wmi_resource_config.max_nlo_ssids a value that
3279      * is equal to or less than the target capability limit reported here.
3280      */
3281     A_UINT32 max_nlo_ssids;
3282     /* ref to section 8.4.2.48 Multiple BSSID element
3283      * The Max BSSID Indicator field contains a value assigned to n,
3284      * where 2^n is the maximum number of BSSIDs
3285      */
3286     A_UINT32 max_bssid_indicator;
3287 
3288     /* 2nd DWORD of HE MAC Capabilities */
3289     A_UINT32 he_cap_info_ext;
3290 
3291     /**************************************************************************
3292      * DON'T ADD ANY FURTHER FIELDS HERE -
3293      * It would cause the size of the READY_EXT message within some targets
3294      * to exceed the size of the buffer used for the message.
3295      **************************************************************************/
3296 
3297     /*
3298      * A variable-length TLV array of wmi_chan_rf_characterization_info will
3299      * follow this fixed_param TLV, containing rx characterization info for
3300      * primary channels.
3301      *   WMI_CHAN_RF_CHARACTERIZATION_INFO wmi_chan_rf_characterization_info[];
3302      */
3303 } wmi_service_ready_ext_event_fixed_param;
3304 
3305 #define WMI_SVC_RDY_CRM_SUB_ID_LSBS_INDEX    28
3306 #define WMI_SVC_RDY_CRM_SUB_ID_LSBS_NUM_BITS 4
3307 #define WMI_SVC_RDY_CRM_SUB_ID_MSBS_INDEX    10
3308 #define WMI_SVC_RDY_CRM_SUB_ID_MSBS_NUM_BITS 3
3309 #define WMI_SVC_RDY_CRM_SUB_ID_GET(var, val) \
3310     WMI_APPEND_TWO_GET_BITS( \
3311         var, \
3312         WMI_SVC_RDY_CRM_SUB_ID_LSBS_INDEX, \
3313         WMI_SVC_RDY_CRM_SUB_ID_LSBS_NUM_BITS, \
3314         WMI_SVC_RDY_CRM_SUB_ID_MSBS_INDEX, \
3315         WMI_SVC_RDY_CRM_SUB_ID_MSBS_NUM_BITS, \
3316         val)
3317 #define WMI_SVC_RDY_CRM_SUB_ID_SET(var, val) \
3318     WMI_APPEND_TWO_SET_BITS( \
3319         var, \
3320         WMI_SVC_RDY_CRM_SUB_ID_LSBS_INDEX, \
3321         WMI_SVC_RDY_CRM_SUB_ID_LSBS_NUM_BITS, \
3322         WMI_SVC_RDY_CRM_SUB_ID_MSBS_INDEX, \
3323         WMI_SVC_RDY_CRM_SUB_ID_MSBS_NUM_BITS, \
3324         val)
3325 
3326 /*
3327  * regdb version GET/SET APIs
3328  */
3329 #define WMI_REG_DB_VERSION_MAJOR_BITPOS 0
3330 #define WMI_REG_DB_VERSION_MINOR_BITPOS 8
3331 #define WMI_BDF_REG_DB_VERSION_MAJOR_BITPOS 16
3332 #define WMI_BDF_REG_DB_VERSION_MINOR_BITPOS 24
3333 #define WMI_REG_DB_VERSION_NUM_BITS 8
3334 
3335 #define WMI_REG_DB_VERSION_MAJOR_GET(dword) \
3336     WMI_GET_BITS(dword, WMI_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
3337 #define WMI_REG_DB_VERSION_MAJOR_SET(dword, value) \
3338     WMI_SET_BITS(dword, WMI_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
3339 
3340 #define WMI_REG_DB_VERSION_MINOR_GET(dword) \
3341     WMI_GET_BITS(dword, WMI_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
3342 #define WMI_REG_DB_VERSION_MINOR_SET(dword, value) \
3343     WMI_SET_BITS(dword, WMI_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
3344 
3345 #define WMI_BDF_REG_DB_VERSION_MAJOR_GET(dword) \
3346     WMI_GET_BITS(dword, WMI_BDF_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
3347 #define WMI_BDF_REG_DB_VERSION_MAJOR_SET(dword, value) \
3348     WMI_SET_BITS(dword, WMI_BDF_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
3349 
3350 #define WMI_BDF_REG_DB_VERSION_MINOR_GET(dword) \
3351     WMI_GET_BITS(dword, WMI_BDF_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
3352 #define WMI_BDF_REG_DB_VERSION_MINOR_SET(dword, value) \
3353     WMI_SET_BITS(dword, WMI_BDF_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
3354 
3355 #define WMI_REG_DB_VERSION_SET(dword, reg_db_ver_major, reg_db_ver_minor, bdf_reg_db_ver_major, bdf_reg_db_ver_minor) \
3356     do { \
3357         WMI_REG_DB_VERSION_MAJOR_SET(dword, reg_db_ver_major); \
3358         WMI_REG_DB_VERSION_MINOR_SET(dword, reg_db_ver_minor); \
3359         WMI_BDF_REG_DB_VERSION_MAJOR_SET(dword, bdf_reg_db_ver_major); \
3360         WMI_BDF_REG_DB_VERSION_MINOR_SET(dword, bdf_reg_db_ver_minor); \
3361     } while (0)
3362 
3363 #define WMI_HW_MIN_TX_POWER_BITPOS  0
3364 #define WMI_HW_MAX_TX_POWER_BITPOS  16
3365 
3366 #define WMI_HW_MIN_TX_POWER_GET(dword) \
3367     ((A_INT16) WMI_GET_BITS(dword, WMI_HW_MIN_TX_POWER_BITPOS, 16))
3368 #define WMI_HW_MIN_TX_POWER_SET(dword, value) \
3369     WMI_SET_BITS(dword, WMI_HW_MIN_TX_POWER_BITPOS, 16, value)
3370 #define WMI_HW_MAX_TX_POWER_GET(dword) \
3371     ((A_INT16) WMI_GET_BITS(dword, WMI_HW_MAX_TX_POWER_BITPOS, 16))
3372 #define WMI_HW_MAX_TX_POWER_SET(dword, value) \
3373     WMI_SET_BITS(dword, WMI_HW_MAX_TX_POWER_BITPOS, 16, value)
3374 
3375 #define WMI_MAX_USER_PER_PPDU_UL_OFDMA_GET(dword) \
3376         WMI_GET_BITS(dword, 0, 16)
3377 
3378 #define WMI_MAX_USER_PER_PPDU_UL_OFDMA_SET(dword, value) \
3379         WMI_SET_BITS(dword, 0, 16, value)
3380 
3381 #define WMI_MAX_USER_PER_PPDU_DL_OFDMA_GET(dword) \
3382         WMI_GET_BITS(dword, 16, 16)
3383 
3384 #define WMI_MAX_USER_PER_PPDU_DL_OFDMA_SET(dword, value) \
3385         WMI_SET_BITS(dword, 16, 16, value)
3386 
3387 #define WMI_MAX_USER_PER_PPDU_UL_MUMIMO_GET(dword) \
3388         WMI_GET_BITS(dword, 0, 16)
3389 
3390 #define WMI_MAX_USER_PER_PPDU_UL_MUMIMO_SET(dword, value) \
3391         WMI_SET_BITS(dword, 0, 16, value)
3392 
3393 #define WMI_MAX_USER_PER_PPDU_DL_MUMIMO_GET(dword) \
3394         WMI_GET_BITS(dword, 16, 16)
3395 
3396 #define WMI_MAX_USER_PER_PPDU_DL_MUMIMO_SET(dword, value) \
3397         WMI_SET_BITS(dword, 16, 16, value)
3398 
3399 #define WMI_TARGET_CAP_FLAGS_RX_PEER_METADATA_VERSION_GET(target_cap_flags) \
3400         WMI_GET_BITS(target_cap_flags, 0, 2)
3401 #define WMI_TARGET_CAP_FLAGS_RX_PEER_METADATA_VERSION_SET(target_cap_flags, value) \
3402         WMI_SET_BITS(target_cap_flags, 0, 2, value)
3403 
3404 #define WMI_TARGET_CAP_UL_MU_MIMO_RX_SUPPORT_2GHZ_GET(target_cap_flags) \
3405     WMI_GET_BITS(target_cap_flags, 2, 1)
3406 #define WMI_TARGET_CAP_UL_MU_MIMO_RX_SUPPORT_2GHZ_SET(target_cap_flags, value) \
3407     WMI_SET_BITS(target_cap_flags, 2, 1, value)
3408 
3409 #define WMI_TARGET_CAP_UL_MU_MIMO_TX_SUPPORT_2GHZ_GET(target_cap_flags) \
3410     WMI_GET_BITS(target_cap_flags, 3, 1)
3411 #define WMI_TARGET_CAP_UL_MU_MIMO_TX_SUPPORT_2GHZ_SET(target_cap_flags, value) \
3412     WMI_SET_BITS(target_cap_flags, 3, 1, value)
3413 
3414 #define WMI_TARGET_CAP_UL_MU_MIMO_RX_SUPPORT_5GHZ_GET(target_cap_flags) \
3415     WMI_GET_BITS(target_cap_flags, 4, 1)
3416 #define WMI_TARGET_CAP_UL_MU_MIMO_RX_SUPPORT_5GHZ_SET(target_cap_flags, value) \
3417     WMI_SET_BITS(target_cap_flags, 4, 1, value)
3418 
3419 #define WMI_TARGET_CAP_UL_MU_MIMO_TX_SUPPORT_5GHZ_GET(target_cap_flags) \
3420     WMI_GET_BITS(target_cap_flags, 5, 1)
3421 #define WMI_TARGET_CAP_UL_MU_MIMO_TX_SUPPORT_5GHZ_SET(target_cap_flags, value) \
3422     WMI_SET_BITS(target_cap_flags, 5, 1, value)
3423 
3424 #define WMI_TARGET_CAP_UL_MU_MIMO_RX_SUPPORT_6GHZ_GET(target_cap_flags) \
3425     WMI_GET_BITS(target_cap_flags, 6, 1)
3426 #define WMI_TARGET_CAP_UL_MU_MIMO_RX_SUPPORT_6GHZ_SET(target_cap_flags, value) \
3427     WMI_SET_BITS(target_cap_flags, 6, 1, value)
3428 
3429 #define WMI_TARGET_CAP_UL_MU_MIMO_TX_SUPPORT_6GHZ_GET(target_cap_flags) \
3430     WMI_GET_BITS(target_cap_flags, 7, 1)
3431 #define WMI_TARGET_CAP_UL_MU_MIMO_TX_SUPPORT_6GHZ_SET(target_cap_flags, value) \
3432     WMI_SET_BITS(target_cap_flags, 7, 1, value)
3433 
3434 #define WMI_TARGET_CAP_MAX_ML_BSS_NUM_GET(target_cap_flags) \
3435     WMI_GET_BITS(target_cap_flags, 8, 3)
3436 #define WMI_TARGET_CAP_MAX_ML_BSS_NUM_SET(target_cap_flags, value) \
3437     WMI_SET_BITS(target_cap_flags, 8, 3, value)
3438 
3439 #define WMI_TARGET_CAP_CONCURRENCE_SUPPORT_GET(target_cap_flags) \
3440     WMI_GET_BITS(target_cap_flags, 11, 2)
3441 #define WMI_TARGET_CAP_CONCURRENCE_SUPPORT_SET(target_cap_flags, value) \
3442     WMI_SET_BITS(target_cap_flags, 11, 2, value)
3443 
3444 #define WMI_TARGET_CAP_MULTIPASS_SAP_SUPPORT_GET(target_cap_flags) \
3445     WMI_GET_BITS(target_cap_flags, 13, 1)
3446 #define WMI_TARGET_CAP_MULTIPASS_SAP_SUPPORT_SET(target_cap_flags, value) \
3447     WMI_SET_BITS(target_cap_flags, 13, 1, value)
3448 
3449 /* ML FULL monitor mode */
3450 #define WMI_TARGET_CAP_ML_MONITOR_MODE_SUPPORT_GET(target_cap_flags) \
3451     WMI_GET_BITS(target_cap_flags, 14, 1)
3452 #define WMI_TARGET_CAP_ML_MONITOR_MODE_SUPPORT_SET(target_cap_flags, value) \
3453     WMI_SET_BITS(target_cap_flags, 14, 1, value)
3454 
3455 
3456 /*
3457  * wmi_htt_msdu_idx_to_htt_msdu_qtype GET/SET APIs
3458  */
3459 #define WMI_HTT_MSDUQ_IDX_TO_MSDUQ_QTYPE_INDEX_GET(index_and_type) \
3460     WMI_GET_BITS(index_and_type, 0, 8)
3461 #define WMI_HTT_MSDUQ_IDX_TO_MSDUQ_QTYPE_INDEX_SET(index_and_type, value) \
3462     WMI_SET_BITS(index_and_type, 0, 8, value)
3463 
3464 #define WMI_HTT_MSDUQ_IDX_TO_MSDUQ_QTYPE_TYPE_GET(index_and_type) \
3465     WMI_GET_BITS(index_and_type, 8, 8)
3466 #define WMI_HTT_MSDUQ_IDX_TO_MSDUQ_QTYPE_TYPE_SET(index_and_type, value) \
3467     WMI_SET_BITS(index_and_type, 8, 8, value)
3468 
3469 typedef struct {
3470     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_htt_msdu_idx_to_htt_msdu_qtype.*/
3471     /**
3472      * index_and_type
3473      *
3474      * [7:0]   : htt_msduq_index
3475      * [15:8]  : htt_msduq_type
3476      * [31:16] : reserved
3477      */
3478     A_UINT32 index_and_type;
3479 } wmi_htt_msdu_idx_to_htt_msdu_qtype;
3480 
3481 typedef enum {
3482     WMI_AFC_FEATURE_6G_DEPLOYMENT_UNSPECIFIED = 0,
3483     WMI_AFC_FEATURE_6G_DEPLOYMENT_INDOOR_ONLY =  1,
3484     WMI_AFC_FEATURE_6G_DEPLOYMENT_OUTDOOR_ONLY = 2,
3485 } WMI_AFC_FEATURE_6G_DEPLOYMENT_TYPE;
3486 
3487 typedef enum {
3488     WMI_BDF_VERSION_CHECK_DISABLED = 0,
3489 
3490     /* WMI_BDF_VERSION_CHECK_GOOD:
3491      * BDF version is matched with FW.
3492      */
3493     WMI_BDF_VERSION_CHECK_GOOD = 1,
3494 
3495     /* WMI_BDF_VERSION_TEMPLATE_TOO_OLD:
3496      * BDF template version is older than the oldest version supported by FW.
3497      */
3498     WMI_BDF_VERSION_TEMPLATE_TOO_OLD = 2,
3499 
3500     /* WMI_BDF_VERSION_TEMPLATE_TOO_NEW:
3501      * BDF template version is newer than the newest version supported by FW.
3502      */
3503     WMI_BDF_VERSION_TEMPLATE_TOO_NEW = 3,
3504 
3505     /* WMI_BDF_VERSION_FW_TOO_OLD:
3506      * FW version is older than the major version supported by BDF.
3507      */
3508     WMI_BDF_VERSION_FW_TOO_OLD = 4,
3509 
3510     /* WMI_BDF_VERSION_FW_TOO_NEW:
3511      * FW version is newer than the minor version supported by BDF.
3512      */
3513     WMI_BDF_VERSION_FW_TOO_NEW = 5,
3514 } wmi_bdf_version_status_type;
3515 
3516 typedef struct {
3517     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_service_ready_ext2_event_fixed_param.*/
3518 
3519     /*
3520      * regDB Version to be sent to Host on WMI service ready ext2 event.
3521      *    [7:0]   - regDbVersionMajor
3522      *    [15:8]  - regDbVersionMinor
3523      *    [23:16] - bdfRegDbVersionMajor
3524      *    [31:24] - bdfRegDbVersionMinor
3525      * The WMI_*REG_DB_VERSION_[MAJOR,MINOR]_[SET,GET] macros are used to
3526      * access these bitfields.
3527      */
3528     A_UINT32 reg_db_version;
3529 
3530     /* Min & Max Tx power (in dBm) supported in 2.4 GHz band
3531      *  [15:0]   - Min Tx Power in 2.4 GHz band
3532      *  [31:16]  - Max Tx Power in 2.4 GHz band
3533      * WMI_HW_[MIN,MAX]_TX_POWER_[GET,SET] macros are used to access
3534      * these bitfields.
3535      * If Min Tx Power = Max Tx Power = 0 means Min Tx Power & Max Tx Power
3536      * are not specified.
3537      */
3538     A_UINT32 hw_min_max_tx_power_2g;
3539 
3540     /* Min & Max Tx power (in dBm) supported in 5 GHz band
3541      *  [15:0]   - Min Tx Power in 5 GHz band
3542      *  [31:16]  - Max Tx Power in 5 GHz band
3543      * WMI_HW_[MIN,MAX]_TX_POWER_[GET,SET] macros are used to access
3544      * these bitfields.
3545      * If Min Tx Power = Max Tx Power = 0 means Min Tx Power & Max Tx Power
3546      * are not specified.
3547      */
3548     A_UINT32 hw_min_max_tx_power_5g;
3549 
3550     /*
3551      * Number of peers supported per WMI_PEER_CHAN_WIDTH_SWITCH_CMDID
3552      * 0 - not enabled
3553      */
3554     A_UINT32 chwidth_num_peer_caps;
3555 
3556     /*
3557      * Whether preamble puncturing is supported by FW, and if so, for which
3558      * bandwidths.  The possible values for this field are listed below.
3559      *   0: preamble puncturing is not supported
3560      *  80: puncturing supported within channels of at least 80 MHz bandwidth
3561      * 160: puncturing supported within channels of at least 160 MHz bandwidth
3562      * 320: puncturing supported within 320 MHz channels
3563      */
3564     A_UINT32 preamble_puncture_bw;
3565 
3566     /*
3567      * [15:0]  - ULOFDMA Refer WMI_MAX_USER_PER_PPDU_UL_OFDMA_GET & SET
3568      * [31:16] - DLOFDMA Refer WMI_MAX_USER_PER_PPDU_DL_OFDMA_GET & SET
3569      * If max_user_per_ppdu_ofdma == 0 the UL/DL max users are unspecified.
3570      */
3571     A_UINT32 max_user_per_ppdu_ofdma;
3572 
3573     /*
3574      * [15:0]  - ULMUMIMO Refer WMI_MAX_USER_PER_PPDU_UL_MUMIMO_GET & SET
3575      * [31:16] - DLMUMIMO Refer WMI_MAX_USER_PER_PPDU_DL_MUMIMO_GET & SET
3576      * If max_user_per_ppdu_mumimo == 0 the UL/DL max users are unspecified.
3577      */
3578     A_UINT32 max_user_per_ppdu_mumimo;
3579 
3580     /**
3581      * @brief target_cap_flags - flags containing information about target capabilities.
3582      * Bits 1:0
3583      *    Rx peer metadata version number used by target
3584      *    0-> legacy case
3585      *    1-> MLO support
3586      *    2,3-> reserved
3587      *    Refer to WMI_TARGET_CAP_FLAGS_PEER_METADATA_VERSION macros.
3588      * Bit 2 - UL MUMIMO Rx support on 2.4 GHz (AP Mode)
3589      * Bit 3 - UL MUMIMO Tx support on 2.4 GHz (STA Mode)
3590      * Bit 4 - UL MUMIMO Rx support on 5 GHz (AP Mode)
3591      * Bit 5 - UL MUMIMO Tx support on 5 GHz (STA Mode)
3592      * Bit 6 - UL MUMIMO Rx support on 6 GHz (AP Mode)
3593      * Bit 7 - UL MUMIMO Tx support on 6 GHz (STA Mode)
3594      * Bits 10:8 - max ML BSS number supported, range [0-7]
3595      * Bits 12:11  concurrence support capability
3596      *      Bit11 - [ML-STA + SL-STA]  0: not supported; 1:supported
3597      *      Bit12 - [ML-STA + SL-SAP]  0: not supported; 1:supported
3598      * Bit 13 - Support for multipass SAP
3599      * Bit 14 - Support for ML monitor mode
3600      * Bits 31:15 - Reserved
3601      */
3602     A_UINT32 target_cap_flags;
3603 
3604     /* EHT MAC Capabilities: total WMI_MAX_EHTCAP_MAC_SIZE*A_UINT32 bits
3605      * those bits actually are max mac capabilities = cap_mac_2g | cap_mac_5g
3606      * The actual cap mac info per mac (2g/5g) in the TLV -- WMI_MAC_PHY_CAPABILITIES_EXT
3607      */
3608     A_UINT32 eht_cap_mac_info[WMI_MAX_EHTCAP_MAC_SIZE];
3609 
3610     /* Following this struct are the TLV's:
3611      *     WMI_DMA_RING_CAPABILITIES;
3612      *     wmi_spectral_bin_scaling_params;
3613      *     WMI_MAC_PHY_CAPABILITIES_EXT;  <-- EHT mac capabilities and phy capabilities info
3614      *     WMI_HAL_REG_CAPABILITIES_EXT2;
3615      *     wmi_nan_capabilities;
3616      *     WMI_SCAN_RADIO_CAPABILITIES_EXT2;
3617      */
3618 
3619     /*
3620      * Max number of LinkView peers supported by target
3621      */
3622     A_UINT32 max_num_linkview_peers;
3623 
3624     /*
3625      * Max number of msduq's per TID per peer supported by target,
3626      * defines LinkView peers number
3627      */
3628     A_UINT32 max_num_msduq_supported_per_tid;
3629 
3630     /*
3631      * Number of peers support default flowqs
3632      */
3633     A_UINT32 default_num_msduq_supported_per_tid;
3634 
3635     /*
3636      * Indoor/Outdoor specification for AFC support -
3637      * refer to WMI_AFC_FEATURE_6G_DEPLOYMENT_TYPE enum
3638      */
3639     A_UINT32 afc_deployment_type;
3640 
3641     /*
3642      * Board data check report. Please see wmi_hw_bd_status_type enum values.
3643      */
3644     A_UINT32 hw_bd_status;
3645 
3646     /*
3647      * max block ack window size FW supports for tx.
3648      */
3649     A_UINT32 tx_aggr_ba_win_size_max;
3650 
3651     /*
3652      * max block ack window size FW supports for rx.
3653      */
3654     A_UINT32 rx_aggr_ba_win_size_max;
3655 
3656     /*
3657      * max link number per STA MLD FW supports.
3658      */
3659     A_UINT32 num_max_mlo_link_per_ml_bss_supp;
3660 
3661     /*
3662      * max link number per SAP MLD FW supports.
3663      */
3664     A_UINT32 num_max_mlo_link_per_ml_sap_supp;
3665 
3666     /* Followed by next TLVs:
3667      *     WMI_DMA_RING_CAPABILITIES          dma_ring_caps[];
3668      *     wmi_spectral_bin_scaling_params    wmi_bin_scaling_params[];
3669      *     WMI_MAC_PHY_CAPABILITIES_EXT       mac_phy_caps[];
3670      *     WMI_HAL_REG_CAPABILITIES_EXT2      hal_reg_caps[];
3671      *     wmi_nan_capabilities               nan_cap;
3672      *     WMI_SCAN_RADIO_CAPABILITIES_EXT2   wmi_scan_radio_caps[];
3673      *     wmi_htt_msdu_idx_to_htt_msdu_qtype htt_msdu_idx_to_qtype_map[];
3674      *     wmi_dbs_or_sbs_cap_ext             dbs_or_sbs_cap_ext;
3675      *     A_INT32 hw_tx_power_signed[WMI_HW_TX_POWER_CAPS_MAX];
3676      *     wmi_aux_dev_capabilities           aux_dev_caps[];
3677      */
3678 } wmi_service_ready_ext2_event_fixed_param;
3679 
3680 typedef struct {
3681     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_rf_characterization_info_event_fixed_param */
3682     /*
3683      * A variable-length TLV array of wmi_chan_rf_characterization_info will
3684      * follow this fixed_param TLV, containing rx characterization info for
3685      * primary channels.
3686      * WMI_CHAN_RF_CHARACTERIZATION_INFO wmi_chan_rf_characterization_info[];
3687      */
3688 } wmi_chan_rf_characterization_info_event_fixed_param;
3689 
3690 typedef enum {
3691     WMI_FW_STA_RTT_INITR =     0x00000001,
3692     WMI_FW_STA_RTT_RESPR =     0x00000002,
3693     WMI_FW_P2P_CLI_RTT_INITR = 0x00000004,
3694     WMI_FW_P2P_CLI_RTT_RESPR = 0x00000008,
3695     WMI_FW_P2P_GO_RTT_INITR =  0x00000010,
3696     WMI_FW_P2P_GO_RTT_RESPR =  0x00000020,
3697     WMI_FW_AP_RTT_INITR =      0x00000040,
3698     WMI_FW_AP_RTT_RESPR =      0x00000080,
3699     WMI_FW_NAN_RTT_INITR =     0x00000100,
3700     WMI_FW_NAN_RTT_RESPR =     0x00000200,
3701     WMI_FW_SCAN_DBS_POLICY =   0x00000400,
3702     /*
3703      * New fw sub feature capabilities before
3704      * WMI_FW_MAX_SUB_FEAT_CAP
3705      */
3706     WMI_FW_MAX_SUB_FEAT_CAP =  0x80000000,
3707 } WMI_FW_SUB_FEAT_CAPS;
3708 
3709 typedef enum {
3710     WMI_HWBD_NONE       = 0,            /* No hw board information is given */
3711     WMI_HWBD_QCA6174    = 1,            /* Rome(AR6320) */
3712     WMI_HWBD_QCA2582    = 2,            /* Killer 1525*/
3713 } WMI_HWBD_ID;
3714 
3715 #define ATH_BD_DATA_REV_MASK            0x000000FF
3716 #define ATH_BD_DATA_REV_SHIFT           0
3717 
3718 #define ATH_BD_DATA_PROJ_ID_MASK        0x0000FF00
3719 #define ATH_BD_DATA_PROJ_ID_SHIFT       8
3720 
3721 #define ATH_BD_DATA_CUST_ID_MASK        0x00FF0000
3722 #define ATH_BD_DATA_CUST_ID_SHIFT       16
3723 
3724 #define ATH_BD_DATA_REF_DESIGN_ID_MASK  0xFF000000
3725 #define ATH_BD_DATA_REF_DESIGN_ID_SHIFT 24
3726 
3727 #define SET_BD_DATA_REV(bd_data_ver, value)     \
3728     ((bd_data_ver) &= ~ATH_BD_DATA_REV_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REV_SHIFT))
3729 
3730 #define GET_BD_DATA_REV(bd_data_ver)            \
3731     (((bd_data_ver) & ATH_BD_DATA_REV_MASK) >> ATH_BD_DATA_REV_SHIFT)
3732 
3733 #define SET_BD_DATA_PROJ_ID(bd_data_ver, value) \
3734     ((bd_data_ver) &= ~ATH_BD_DATA_PROJ_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_PROJ_ID_SHIFT))
3735 
3736 #define GET_BD_DATA_PROJ_ID(bd_data_ver)        \
3737     (((bd_data_ver) & ATH_BD_DATA_PROJ_ID_MASK) >> ATH_BD_DATA_PROJ_ID_SHIFT)
3738 
3739 #define SET_BD_DATA_CUST_ID(bd_data_ver, value) \
3740     ((bd_data_ver) &= ~ATH_BD_DATA_CUST_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_CUST_ID_SHIFT))
3741 
3742 #define GET_BD_DATA_CUST_ID(bd_data_ver)        \
3743     (((bd_data_ver) & ATH_BD_DATA_CUST_ID_MASK) >> ATH_BD_DATA_CUST_ID_SHIFT)
3744 
3745 #define SET_BD_DATA_REF_DESIGN_ID(bd_data_ver, value)   \
3746     ((bd_data_ver) &= ~ATH_BD_DATA_REF_DESIGN_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REF_DESIGN_ID_SHIFT))
3747 
3748 #define GET_BD_DATA_REF_DESIGN_ID(bd_data_ver)          \
3749     (((bd_data_ver) & ATH_BD_DATA_REF_DESIGN_ID_MASK) >> ATH_BD_DATA_REF_DESIGN_ID_SHIFT)
3750 
3751 
3752 #ifdef ROME_LTE_COEX_FREQ_AVOID
3753 typedef struct {
3754     A_UINT32 start_freq; /* start frequency, not channel center freq */
3755     A_UINT32 end_freq; /* end frequency */
3756 } avoid_freq_range_desc;
3757 
3758 typedef struct {
3759     /* bad channel range count, multi range is allowed, 0 means all channel clear */
3760     A_UINT32 num_freq_ranges;
3761     /* multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc */
3762     avoid_freq_range_desc avd_freq_range[];
3763 } wmi_wlan_avoid_freq_ranges_event;
3764 #endif
3765 
3766 /** status consists of  upper 16 bits fo A_STATUS status and lower 16 bits of module ID that returned status */
3767 #define WLAN_INIT_STATUS_SUCCESS   0x0
3768 #define WLAN_INIT_STATUS_GEN_FAILED   0x1
3769 #define WLAN_GET_INIT_STATUS_REASON(status)    ((status) & 0xffff)
3770 #define WLAN_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff)
3771 
3772 typedef A_UINT32 WLAN_INIT_STATUS;
3773 
3774 typedef struct {
3775     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ready_event_fixed_param */
3776     wmi_abi_version fw_abi_vers;
3777     /*
3778      * mac_addr is always filled; in addition, there can be a mac_addr_list
3779      * TLV following this fixed_param TLV to specify additional MAC addresses,
3780      * for cases where the target specifies one MAC address per pdev
3781      * (so the host can treat the pdevs within the target as separately
3782      * as possible) rather than one MAC address for the whole SOC.
3783      */
3784     wmi_mac_addr mac_addr;
3785     A_UINT32 status;
3786     A_UINT32 num_dscp_table;
3787     /* num_extra_mac_addr -
3788      * how many additional MAC addresses besides the above mac_addr
3789      * are provided in the subsequent mac_addr_list TLV
3790      */
3791     A_UINT32 num_extra_mac_addr;
3792     /*
3793      * Total number of "real" peers (remote peers of an AP vdev,
3794      * BSS peer of a STA vdev, TDLS peer of a STA vdev) that FW supports.
3795      * If 0, then Host can use param_tlv->resource_config->num_peers as
3796      * total number of peers.
3797      */
3798     A_UINT32 num_total_peers;
3799     /*
3800      * Number of extra peers that Firmware adds.
3801      * These are self peers and/or other FW only peers that don't represent
3802      * a 802.11 transceiver, but instead are used for convenience, e.g. to
3803      * provide a pseudo-peer object for an AP vdev's bcast/mcast tx queues,
3804      * to allow each tx queue to belong to a peer object.
3805      * Peer ID can be up to num_total_peers + num_extra_peers.
3806      */
3807     A_UINT32 num_extra_peers;
3808     /*
3809      * max_ast_index - max AST index that Firmware can generate
3810      * max_ast_index = (ast_table_size-1), ast_table_size is dynamically chosen
3811      * based on num_peers configuration from Host. Hence Host needs to know the
3812      * max_ast_index that Firmware can generate.
3813      * A 0x0 value for max_ast_index means the target has not specified a limit.
3814      */
3815     A_UINT32 max_ast_index;
3816     /* pktlog_defs_checksum:
3817      * checksum computed from the definitions of the enums and structs
3818      * used within pktlog traces.
3819      * This pktlog defs checksum needs to be embedded into pktlog trace files
3820      * (specifically in ath_pktlog_bufhdr.version).
3821      *
3822      * If pktlog_defs_checksum is zero then it is invalid; it should be ignored
3823      * and ath_pktlog_bufhdr.magic_num needs to be PKTLOG_MAGIC_NUM_LEGACY
3824      * (i.e. 7735225).
3825      *
3826      * If pktlog_defs_checksum is non-zero then it is valid, and the host
3827      * should put it into the pktlog trace file header and set
3828      * ath_pktlog_bufhdr.magic_num as PKTLOG_MAGIC_NUM_VERSION_IS_CHECKSUM
3829      * (i.e. 2453506), to indicate that the file header version field contains
3830      * a checksum.
3831      */
3832     A_UINT32 pktlog_defs_checksum;
3833 
3834     /*
3835      * max_onchip_ast_index - max AST index that Firmware can generate
3836      * max_onchip_ast_index = (ast_table_size-1), where ast_table_size is
3837      * dynamically chosen based on num_peers configuration from Host.
3838      * Hence Host needs to know the max_onchip_ast_index that Firmware can
3839      * generate.
3840      * A 0x0 value for max_onchip_ast_index means the target has not specified
3841      * a limit.
3842      */
3843     A_UINT32 max_onchip_ast_index;
3844 
3845     /*
3846      * The maximum number of LinkView peers can be supported onsite of target,
3847      * based on proposed by the host configuration,
3848      * total number of available resources, configured peers number,
3849      * number of MSDUQs per LinkView peer's TID.
3850      * Target can reduce proposed by WMI_INIT_CMDID number, depending on
3851      * the target's resources availability.
3852      */
3853     A_UINT32 num_of_linkview_peers;
3854 
3855     /* Total number of "real" max_active_vdevs that FW supports. */
3856     A_UINT32 num_max_active_vdevs;
3857 
3858 /*
3859  * This fixed_param TLV is followed by these additional TLVs:
3860  * mac_addr_list[num_extra_mac_addr];
3861  */
3862 } wmi_ready_event_fixed_param;
3863 
3864 typedef struct {
3865     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resource_config */
3866     /**
3867      * @brief num_vdev - number of virtual devices (VAPs) to support
3868      */
3869     A_UINT32 num_vdevs;
3870     /**
3871      * @brief num_peers - number of peer nodes to support
3872      */
3873     A_UINT32 num_peers;
3874     /*
3875      * @brief In offload mode target supports features like WOW, chatter and other
3876      * protocol offloads. In order to support them some functionalities like
3877      * reorder buffering, PN checking need to be done in target. This determines
3878      * maximum number of peers supported by target in offload mode
3879      */
3880     A_UINT32 num_offload_peers;
3881     /* @brief Number of reorder buffers available for doing target based reorder
3882      * Rx reorder buffering
3883      */
3884     A_UINT32 num_offload_reorder_buffs;
3885     /**
3886      * @brief num_peer_keys - number of keys per peer
3887      */
3888     A_UINT32 num_peer_keys;
3889     /**
3890      * @brief num_peer_tids - number of TIDs to provide storage for per peer.
3891      */
3892     A_UINT32 num_tids;
3893     /**
3894      * @brief ast_skid_limit - max skid for resolving hash collisions
3895      * @details
3896      *     The address search table is sparse, so that if two MAC addresses
3897      *     result in the same hash value, the second of these conflicting
3898      *     entries can slide to the next index in the address search table,
3899      *     and use it, if it is unoccupied.  This ast_skid_limit parameter
3900      *     specifies the upper bound on how many subsequent indices to search
3901      *     over to find an unoccupied space.
3902      */
3903     A_UINT32 ast_skid_limit;
3904     /**
3905      * @brief tx_chain_mask - the nominal chain mask for transmit
3906      * @details
3907      *     The chain mask may be modified dynamically, e.g. to operate AP tx with
3908      *     a reduced number of chains if no clients are associated.
3909      *     This configuration parameter specifies the nominal chain-mask that
3910      *     should be used when not operating with a reduced set of tx chains.
3911      */
3912     A_UINT32 tx_chain_mask;
3913     /**
3914      * @brief rx_chain_mask - the nominal chain mask for receive
3915      * @details
3916      *     The chain mask may be modified dynamically, e.g. for a client to use
3917      *     a reduced number of chains for receive if the traffic to the client
3918      *     is low enough that it doesn't require downlink MIMO or antenna
3919      *     diversity.
3920      *     This configuration parameter specifies the nominal chain-mask that
3921      *     should be used when not operating with a reduced set of rx chains.
3922      */
3923     A_UINT32 rx_chain_mask;
3924     /**
3925      * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
3926      * @details
3927      *     Each WMM access class (voice, video, best-effort, background) will
3928      *     have its own timeout value to dictate how long to wait for missing
3929      *     rx MPDUs to arrive before flushing subsequent MPDUs that have already
3930      *     been received.
3931      *     This parameter specifies the timeout in milliseconds for each class .
3932      *     NOTE: the number of class (defined as 4) cannot be
3933      *     changed in the future without breaking WMI compatibility.
3934      */
3935     A_UINT32 rx_timeout_pri[4];
3936     /**
3937      * @brief rx_decap mode - what mode the rx should decap packets to
3938      * @details
3939      *     MAC can decap to RAW (no decap), native wifi or Ethernet types
3940      *     THis setting also determines the default TX behavior, however TX
3941      *     behavior can be modified on a per VAP basis during VAP init
3942      */
3943     A_UINT32 rx_decap_mode;
3944     /**
3945      * @brief  scan_max_pending_req - what is the maximum scan requests than can be queued
3946      */
3947     A_UINT32 scan_max_pending_req;
3948 
3949     /**
3950      * @brief maximum VDEV that could use BMISS offload
3951      */
3952     A_UINT32 bmiss_offload_max_vdev;
3953 
3954     /**
3955      * @brief maximum VDEV that could use offload roaming
3956      */
3957     A_UINT32 roam_offload_max_vdev;
3958 
3959     /**
3960      * @brief maximum AP profiles that would push to offload roaming
3961      */
3962     A_UINT32 roam_offload_max_ap_profiles;
3963 
3964     /**
3965      * @brief num_mcast_groups - how many groups to use for mcast->ucast conversion
3966      * @details
3967      *     The target's WAL maintains a table to hold information regarding which
3968      *     peers belong to a given multicast group, so that if multicast->unicast
3969      *     conversion is enabled, the target can convert multicast tx frames to a
3970      *     series of unicast tx frames, to each peer within the multicast group.
3971      *     This num_mcast_groups configuration parameter tells the target how
3972      *     many multicast groups to provide storage for within its multicast
3973      *     group membership table.
3974      */
3975     A_UINT32 num_mcast_groups;
3976 
3977     /**
3978      * @brief num_mcast_table_elems - size to alloc for the mcast membership table
3979      * @details
3980      *     This num_mcast_table_elems configuration parameter tells the target
3981      *     how many peer elements it needs to provide storage for in its
3982      *     multicast group membership table.
3983      *     These multicast group membership table elements are shared by the
3984      *     multicast groups stored within the table.
3985      */
3986     A_UINT32 num_mcast_table_elems;
3987 
3988     /**
3989      * @brief mcast2ucast_mode - whether/how to do multicast->unicast conversion
3990      * @details
3991      *     This configuration parameter specifies whether the target should
3992      *     perform multicast --> unicast conversion on transmit, and if so,
3993      *     what to do if it finds no entries in its multicast group membership
3994      *     table for the multicast IP address in the tx frame.
3995      *     Configuration value:
3996      *     0 -> Do not perform multicast to unicast conversion.
3997      *     1 -> Convert multicast frames to unicast, if the IP multicast address
3998      *          from the tx frame is found in the multicast group membership
3999      *          table.  If the IP multicast address is not found, drop the frame.
4000      *     2 -> Convert multicast frames to unicast, if the IP multicast address
4001      *          from the tx frame is found in the multicast group membership
4002      *          table.  If the IP multicast address is not found, transmit the
4003      *          frame as multicast.
4004      */
4005     A_UINT32 mcast2ucast_mode;
4006 
4007 
4008     /**
4009      * @brief tx_dbg_log_size - how much memory to allocate for a tx PPDU dbg log
4010      * @details
4011      *     This parameter controls how much memory the target will allocate to
4012      *     store a log of tx PPDU meta-information (how large the PPDU was,
4013      *     when it was sent, whether it was successful, etc.)
4014      */
4015     A_UINT32 tx_dbg_log_size;
4016 
4017     /**
4018      * @brief num_wds_entries - how many AST entries to be allocated for WDS
4019      */
4020     A_UINT32 num_wds_entries;
4021 
4022     /**
4023      * @brief dma_burst_size - MAC DMA burst size, e.g., on Peregrine on PCI
4024      * this limit can be 0 -default, 1 256B
4025      */
4026     A_UINT32 dma_burst_size;
4027 
4028     /**
4029      * @brief mac_aggr_delim - Fixed delimiters to be inserted after every MPDU
4030      * to account for interface latency to avoid underrun.
4031      */
4032     A_UINT32 mac_aggr_delim;
4033     /**
4034      * @brief rx_skip_defrag_timeout_dup_detection_check
4035      * @details
4036      *  determine whether target is responsible for detecting duplicate
4037      *  non-aggregate MPDU and timing out stale fragments.
4038      *
4039      *  A-MPDU reordering is always performed on the target.
4040      *
4041      *  0: target responsible for frag timeout and dup checking
4042      *  1: host responsible for frag timeout and dup checking
4043      */
4044     A_UINT32 rx_skip_defrag_timeout_dup_detection_check;
4045 
4046     /**
4047      * @brief vow_config - Configuration for VoW : No of Video Nodes to be supported
4048      * and Max no of descriptors for each Video link (node).
4049      */
4050     A_UINT32 vow_config;
4051 
4052     /**
4053      * @brief maximum VDEV that could use GTK offload
4054      */
4055     A_UINT32 gtk_offload_max_vdev;
4056 
4057     /**
4058      * @brief num_msdu_desc - Number of msdu descriptors target should use
4059      */
4060     A_UINT32 num_msdu_desc; /* Number of msdu desc */
4061     /**
4062      * @brief max_frag_entry - Max. number of Tx fragments per MSDU
4063      * @details
4064      *     This parameter controls the max number of Tx fragments per MSDU.
4065      *     This is sent by the target as part of the WMI_SERVICE_READY event
4066      *     and is overridden by the OS shim as required.
4067      */
4068     A_UINT32 max_frag_entries;
4069 
4070     /**
4071      * @brief num_tdls_vdevs - Max. number of vdevs that can support TDLS
4072      * @brief num_msdu_desc - Number of vdev that can support beacon offload
4073      */
4074 
4075     A_UINT32 num_tdls_vdevs; /* number of vdevs allowed to do tdls */
4076 
4077     /**
4078      * @brief num_tdls_conn_table_entries - Number of peers tracked by tdls vdev
4079      * @details
4080      *      Each TDLS enabled vdev can track outgoing transmits/RSSI/rates to/of
4081      *      peers in a connection tracking table for possible TDLS link creation
4082      *      or deletion. This controls the number of tracked peers per vdev.
4083      */
4084     A_UINT32  num_tdls_conn_table_entries; /* number of peers to track per TDLS vdev */
4085     /**
4086      * @brief beacon_tx_offload_max_vdev - Number of maximum beaconing vaps at any time.
4087      */
4088      A_UINT32 beacon_tx_offload_max_vdev;
4089      A_UINT32 num_multicast_filter_entries;
4090      A_UINT32 num_wow_filters; /*host can configure the number of wow filters*/
4091 
4092      /**
4093      * @brief num_keep_alive_pattern - Num of keep alive patterns configured
4094      * from host.
4095      */
4096      A_UINT32 num_keep_alive_pattern;
4097     /**
4098      * @brief keep_alive_pattern_size - keep alive pattern size.
4099      */
4100      A_UINT32 keep_alive_pattern_size;
4101     /**
4102      * @brief max_tdls_concurrent_sleep_sta - Number of tdls sleep sta supported
4103      * @details
4104      *      Each TDLS STA can become a sleep STA independently. This parameter
4105      *      mentions how many such sleep STAs can be supported concurrently.
4106      */
4107     A_UINT32 max_tdls_concurrent_sleep_sta;
4108 
4109     /**
4110      * @brief max_tdls_concurrent_buffer_sta - Number of tdls buffer sta supported
4111      * @details
4112      *      Each TDLS STA can become a buffer STA independently. This parameter
4113      *      mentions how many such buffer STAs can be supported concurrently.
4114      */
4115     A_UINT32 max_tdls_concurrent_buffer_sta;
4116 
4117     /**
4118      * @brief wmi_send_separate - host configures fw to send the wmi separately
4119      */
4120     A_UINT32 wmi_send_separate;
4121 
4122     /**
4123      * @brief num_ocb_vdevs - Number of vdevs used for OCB support
4124      */
4125     A_UINT32 num_ocb_vdevs;
4126 
4127     /**
4128      * @brief num_ocb_channels - The supported number of simultaneous OCB channels
4129      */
4130     A_UINT32 num_ocb_channels;
4131 
4132     /**
4133      * @brief num_ocb_schedules - The supported number of OCB schedule segments
4134      */
4135     A_UINT32 num_ocb_schedules;
4136 
4137     /**
4138      * @brief specific configuration from host, such as per platform configuration
4139      */
4140     #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_S 0
4141     #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_M 0x1
4142 
4143     #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_S 1
4144     #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_M 0x2
4145 
4146     #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_S 2
4147     #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_M 0x4
4148 
4149     #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_S 3
4150     #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_M 0x8
4151 
4152     #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_S 4
4153     #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_M 0x10
4154 
4155     #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_S 5
4156     #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_M 0x20
4157 
4158     #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_S 6
4159     #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_M 0x40
4160 
4161     #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_S 7
4162     #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_M 0x80
4163 
4164     #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_S 8
4165     #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_M 0x100
4166 
4167     #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_S 9
4168     #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_M 0x200
4169 
4170     #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_S 10
4171     #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_M 0x400
4172 
4173     #define WMI_RSRC_CFG_FLAG_TX_PPDU_STATS_ENABLE_S 11
4174     #define WMI_RSRC_CFG_FLAG_TX_PPDU_STATS_ENABLE_M 0x800
4175 
4176     #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_S 12
4177     #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_M 0x1000
4178 
4179     #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_S 13
4180     #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_M 0x2000
4181 
4182     #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_S 14
4183     #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_M 0x4000
4184 
4185     #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_S 15
4186     #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_M 0x8000
4187 
4188     /*
4189      * If the AC override valid bit is set then this field will specify the
4190      * access category to use for EAPOL frames
4191      * 0 - WMM_AC_BE
4192      * 1 - WMM_AC_BK
4193      * 2 - WMM_AC_VI
4194      * 3 - WMM_AC_VO
4195      */
4196     #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_S 16
4197     #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_M 0x30000
4198 
4199     /*
4200      * If TX_ACK_RSSI is set, then the target should populate the ack_rssi
4201      * field within the WMI_MGMT_TX_COMPLETION_EVENT message, the ack_rssi
4202      * TLV within the WMI_MGMT_TX_BUNDLE_COMPLETION_EVENT message, and the
4203      * "MSDU ACK RSSI" array within the HTT_T2H TX_COMPL_IND message.
4204      */
4205     #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_S 18
4206     #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_M 0x40000
4207 
4208     /*
4209      * If HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN is set, the host will not
4210      * include the HTC header length in the payload length for all HTT_H2T
4211      * messages.
4212      * Otherwise, only when sending HTT_H2T_MSG_TYPE_TX_FRM message,
4213      * payload length includes HTC header length. Other HTT_H2T messages'
4214      * payload length does not include HTC header length.
4215      * The host will only set this HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN flag
4216      * if the target has set the WMI_SERVICE_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN
4217      * flag to indicate its support for this option.
4218      */
4219     #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_S 19
4220     #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_M 0x80000
4221 
4222     #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_S 20
4223     #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_M 0x100000
4224 
4225     /*
4226      * If this HTT_PEER_STATS is set, then the target should use the
4227      * the HTT_T2H_MSG_TYPE_PEER_STATS_IND message to upload peer stats;
4228      * else the target should avoid sending the PEER_STATS_IND message.
4229      */
4230     #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_S 21
4231     #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_M 0x200000
4232 
4233     /*
4234      * If this BIT is set, then the target should use peer_tid_ext to analyze
4235      * per peer per tid extended configurations
4236      */
4237     #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_S 22
4238     #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_M 0x400000
4239 
4240     /*
4241      * If the VIDEO_OVER_WIFI_ENABLE flag is set, the target will use a
4242      * series of algorithmic adjustments to optimize Video performance
4243      * by reducing latency, reducing latency jitter, and minimizing
4244      * dropped packets.
4245      */
4246     #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_S 23
4247     #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_M 0x800000
4248 
4249     /*
4250      * If the THREE_WAY_COEX_CONFIG_LEGACY flag is set, the target will use
4251      * the configuration parameters given by Host driver to WLAN FW and
4252      * apply them along with the existing CoEx Weights Override logic to
4253      * prioritize the WLAN-BT-Zigbee packets accordingly.
4254      *
4255      * The host shall only set the THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT
4256      * RSRC_CFG flag if the target has set the WMI_SERVICE
4257      * THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT flag.
4258      *
4259      * The logic to send GPM to BT-SOC with BT-ZB priorities remains the same.
4260      */
4261     #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_S 24
4262     #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_M 0x1000000
4263 
4264     /*
4265      * If the THREE_WAY_COEX_CONFIG_OVERRIDE flag is set, the target will use
4266      * the configuration parameters given by Host driver to WLAN FW and
4267      * apply them by OVERRIDing the existing CoEx Weights Override logic to
4268      * prioritize the WLAN-BT-Zigbee packets accordingly.
4269      *
4270      * The host shall only set the THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT
4271      * RSRC_CFG flag if the target has set the WMI_SERVICE
4272      * THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT flag.
4273      *
4274      * The logic to send GPM to BT-SOC with BT-ZB priorities remains the same.
4275      */
4276     #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_S 25
4277     #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_M 0x2000000
4278 
4279     /*
4280      * If the TX_COMPLETION_TX_TSF64 flag is set, the target should
4281      * populate the htt_tx_compl_ind_append_tx_tsf64 array within the
4282      * HTT_T2H TX_COMPL_IND message.
4283      */
4284     #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_S 26
4285     #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_M 0x4000000
4286 
4287     /*
4288      * If this BIT is set, then the target should support Packet capture(SMART MU FR)
4289      */
4290     #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_S 27
4291     #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_M 0x8000000
4292 
4293     /*
4294      * If this BIT is set, then target should support BSS Max Idle period.
4295      */
4296     #define WMI_RSRC_CFG_FLAG_BSS_MAX_IDLE_TIME_SUPPORT_S 28
4297     #define WMI_RSRC_CFG_FLAG_BSS_MAX_IDLE_TIME_SUPPORT_M 0x10000000
4298 
4299     /*
4300      * If this bit is set, then target should use the audio sync feature.
4301      * Host should only set this bit if the target has indicated via the
4302      * WMI_SERVICE_AUDIO_SYNC_SUPPORT flag that it supports audio sync.
4303      */
4304     #define WMI_RSRC_CFG_FLAG_AUDIO_SYNC_SUPPORT_S  29
4305     #define WMI_RSRC_CFG_FLAG_AUDIO_SYNC_SUPPORT_M 0x20000000
4306 
4307     /*
4308      * If this BIT is set, then the target should disable IPA
4309      */
4310     #define WMI_RSRC_CFG_FLAG_IPA_DISABLE_S 30
4311     #define WMI_RSRC_CFG_FLAG_IPA_DISABLE_M 0x40000000
4312 
4313     /*
4314      * If this bit is set, target should use the PCIe GEN switching feature.
4315      */
4316     #define WMI_RSRC_CFG_FLAG_PCIE_GEN_SWITCH_CAPABLITY_S 31
4317     #define WMI_RSRC_CFG_FLAG_PCIE_GEN_SWITCH_CAPABLITY_M 0x80000000
4318 
4319     A_UINT32 flag1;
4320 
4321     /** @brief smart_ant_cap - Smart Antenna capabilities information
4322      * @details
4323      *        1 - Smart antenna is enabled.
4324      *        0 - Smart antenna is disabled.
4325      * In future this can contain smart antenna specific capabilities.
4326      */
4327     A_UINT32 smart_ant_cap;
4328 
4329     /**
4330      * User can configure the buffers allocated for each AC (BE, BK, VI, VO)
4331      * during init
4332      */
4333     A_UINT32 BK_Minfree;
4334     A_UINT32 BE_Minfree;
4335     A_UINT32 VI_Minfree;
4336     A_UINT32 VO_Minfree;
4337 
4338     /**
4339      * @brief alloc_frag_desc_for_data_pkt . Controls data packet fragment
4340      * descriptor memory allocation.
4341      *   1 - Allocate fragment descriptor memory for data packet in firmware.
4342      *       If host wants to transmit data packet at its desired rate,
4343      *       this field must be set.
4344      *   0 - Don't allocate fragment descriptor for data packet.
4345      */
4346     A_UINT32 alloc_frag_desc_for_data_pkt;
4347 
4348     /** how much space to allocate for NDP NS (neighbor solicitation) specs */
4349     A_UINT32 num_ns_ext_tuples_cfg;
4350 
4351     /**
4352      * size (in bytes) of the buffer the FW shall allocate per vdev
4353      * firmware can dynamic allocate memory (or disable)
4354      * packet filtering feature.
4355      * 0 - fw chooses its default value
4356      * -1 (0XFFFFFFFF) - disable APF
4357      */
4358     A_UINT32 bpf_instruction_size;
4359 
4360     /**
4361      * Maximum no of BSSID based RX filters host would program
4362      * Value 0 means host doesn't given any limit to FW.
4363      */
4364     A_UINT32 max_bssid_rx_filters;
4365     /**
4366      * Use PDEV ID instead of MAC ID, added for backward compatibility with older host
4367      * which is using MAC ID. 1 means PDEV ID, 0 means MAC ID.
4368      */
4369     A_UINT32 use_pdev_id;
4370 
4371     /** Maximum number of scan clients whose DBS scan duty cycle can be configured */
4372     A_UINT32 max_num_dbs_scan_duty_cycle;
4373 
4374     /** Maximum number of Multi group key to support */
4375     A_UINT32 max_num_group_keys;
4376 
4377     union {
4378         A_UINT32 peer_map_unmap_v2_support; /* old name */
4379         /**
4380          * HTT peer map/unmap format support (map 4bits and unmap 4bits)
4381          * 0x00 -> host use default map/unmap only.
4382          * 0x01 -> legacy value that is interpreted the same as 0x22.
4383          * 0x22 -> host supports HTT peer map/unmap v2 format; the target is
4384          *         allowed but not required to use peer map/unmap v2 format.
4385          * 0x32 -> host supports HTT peer map v3 format; the target is
4386          *         allowed but not required to use peer map v3 format and
4387          *         peer unmap v2 format.
4388          */
4389         A_UINT32 peer_map_unmap_versions;
4390     };
4391 
4392     /** Sched config params for all pdevs
4393      * These tx scheduling configuration parameters are currently only
4394      * used for internal testing purposes; therefore the non-default
4395      * values for this field are not currently documented.
4396      * For regular use, this field should be set to 0x0.
4397      */
4398     A_UINT32 sched_params;
4399 
4400     /* Number of MAC on which AP TWT feature is supported */
4401     A_UINT32 twt_ap_pdev_count;
4402 
4403     /* Max no of STA with which TWT sessions can be formed by the AP */
4404     A_UINT32 twt_ap_sta_count;
4405 
4406     /* max_nlo_ssids - dynamically negotiated maximum number of SSIDS for NLO
4407      * This parameter provides the final specification for the maximum number
4408      * of SSIDs for the target to support for Network List Offload's scanning
4409      * for preferred networks.
4410      * This wmi_resource_config.max_nlo_ssids must be <= the max_nlo_ssids
4411      * field from the target's WMI_SERVICE_READY_EXT_EVENT message.
4412      * (If the target didn't provide a max_nlo_ssids field in the
4413      * WMI_SERVICE_READY_EXT message, or if the SERVICE_READY_EXT msg's
4414      * max_nlo_ssids value was 0x0, the target doesn't support dynamic
4415      * negotiation of max NLO SSIDs, and WMI_NLO_MAX_SSIDS (=16) applies.)
4416      * If this wmi_resource_config.max_nlo_ssids field is absent or 0x0,
4417      * the host does not support dynamic negotiation of max NLO SSIDs.
4418      * In such a case, the target will respond as follows:
4419      * If the target supports at least WMI_NLO_MAX_SSIDS, the target will
4420      * use the statically-configured WMI_NLO_MAX_SSIDS value.
4421      * If the target supports less than WMI_NLO_MAX_SSIDS, the target will
4422      * abort its boot-up, due to receiving an invalid/unsupported
4423      * configuration specification.
4424      */
4425     A_UINT32 max_nlo_ssids;
4426 
4427     /**
4428      * num_packet_filters: the num that host requests fw to support for
4429      * pktfilter in total, then firmware can dynamic allocate
4430      * memory(or disable) pktfilter feature.
4431      *
4432      * 0 -  fw chooses its default value.
4433      * -1(0XFFFFFFFF)- disable pktfilter.
4434      */
4435     A_UINT32 num_packet_filters;
4436 
4437     /**
4438      * num_max_sta_vdevs: the max num for the sta vdevs
4439      * fw will use it to config the memory of offload features that
4440      * are only for sta vdevs.
4441      * p2p client should be included.
4442      *
4443      *  0 - fw chooses its default value: 'num_vdevs' of this structure.
4444      */
4445     A_UINT32 num_max_sta_vdevs;
4446 
4447     /* ref to section 8.4.2.48 Multiple BSSID element
4448      * The Max BSSID Indicator field contains a value assigned to n,
4449      * where 2^n is the maximum number of BSSIDs
4450      */
4451     A_UINT32 max_bssid_indicator;
4452 
4453     /** @brief ul_resp_config - Configures the 11ax uplink ofdma feature on STA.
4454      *         I.e. sending uplink response to a trigger frame sent by AP.
4455      *  @details
4456      *        0 - fw default behavior, based on chipset
4457      *        1 - UL_RESP is disabled.
4458      *        2 - UL_RESP is enabled.
4459      *        other - reserved.
4460      */
4461     A_UINT32 ul_resp_config;
4462 
4463     /* msdu_flow_override_config0 - contains AST enable bitmask
4464      * AST0 is unconditionally enabled, unless the MSDU flow override feature
4465      * is entirely disabled.
4466      * AST1 through AST3 are conditionally enabled, based on bits 0-2 in
4467      * msdu_flow_override_config0.
4468      * If all three bits are 0, no msdu flow override feature at all in FW.
4469      *
4470      * The WMI_MSDU_FLOW_AST_ENABLE_GET and WMI_MSDU_FLOW_AST_ENABLE_SET
4471      * macros are used to read and write these bitfields.
4472      */
4473     A_UINT32 msdu_flow_override_config0;
4474 
4475      /* msdu_flow_override_config1:
4476       * Bits 3:0   - AST0_FLOW_MASK(4)
4477       * Bits 7:4   - AST1_FLOW_MASK(4)
4478       * Bits 11:8  - AST2_FLOW_MASK(4)
4479       * Bits 15:12 - AST3_FLOW_MASK(4)
4480       * Bits 23:16 - TID_VALID_HI_PRI (8)
4481       * Bits 31:24 - TID_VALID_LOW_PRI (8)
4482       *
4483       * The macros
4484       * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_GET
4485       * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_SET
4486       * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_GET
4487       * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_SET
4488       * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_GET
4489       * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_SET
4490       * are used to read and write these bitfields.
4491       */
4492     A_UINT32 msdu_flow_override_config1;
4493 
4494     /** @brief flags2 - contains flags used for the following purposes:
4495      *  Configure 11ax uplink ofdma/MU-MIMO feature in FW, when chipsets
4496      *  are brought up in Repeater/STA mode.
4497      *
4498      *  @details
4499      *  Bits  3:0
4500      *      Enable UL MU-OFDMA/MIMO for PDEVs WIFI0, WIFI1, WIFI2
4501      *      This flags should only be set when a pdev has STA VAP
4502      *      in repeater/self-organizing-network modes.
4503      *      E.g. to enable UL RESP for 5G and 2G radios, value shall be
4504      *      0b00000000000000000000000000000011 = 0x3.
4505      *      Host shall use UCI config for a radio to populate this value,
4506      *      each radio entry shall have "config re_ul_resp 1" value set.
4507      *      Hence this can be configured dynamically.
4508      *
4509      *      Refer to the below WMI_RSRC_CFG_FLAGS2_RE_ULRESP_PDEV_CFG_GET/SET
4510      *      macros.
4511      *  Bits 5:4
4512      *      HTT rx peer metadata version number that host supports.
4513      *      Firmware initially sends the target supported version number
4514      *      as part of service_ready_ext2 message.
4515      *      Host can ack the version number that it is using as part of
4516      *      this message.
4517      *      0-> legacy case
4518      *      1-> MLO support
4519      *      2-3-> Reserved
4520      *      Refer to the WMI_RSRC_CFG_FLAGS2_RX_PEER_METADATA_VERSION macros.
4521      *  Bit 6 - is_sap_connected_d3wow_enabled
4522      *      Enable D3WoW for SAP w/ clients connected
4523      *      0-> disable the feature
4524      *      1-> enable the feature
4525      *      Refer to the WMI_RSRC_CFG_FLAGS2_IS_SAP_CONNECTED_D3WOW_ENABLED
4526      *      GET/SET macros.
4527      *  Bit 7 - is_go_connected_d3wow_enabled
4528      *      Enable D3WoW for GO w/ clients connected
4529      *      0-> disable the feature
4530      *      1-> enable the feature
4531      *      Refer to the WMI_RSRC_CFG_FLAGS2_IS_GO_CONNECTED_D3WOW_ENABLED
4532      *      GET/SET macros.
4533      *  Bit 8 - enable_dynamic_pcie_gen_speed_switch
4534      *      enable dynamic pcie gen speed switch
4535      *      0-> disable the feature
4536      *      1-> enable the feature
4537      *      Refer to the WMI_RSRC_CFG_FLAGS2_IS_DYNAMIC_PCIE_GEN_SPEED_SWITCH_ENABLED
4538      *      GET/SET macros.
4539      *  Bit 9 - calc_next_dtim_count
4540      *      0 -> disable calculation of DTIM count for MBSSID_NON_TX_VAP
4541      *      1 -> Used by some hosts to indicate calculation of DTIM count
4542      *           for MBSSID_NON_TX_VAP
4543      *      Refer to WMI_RSRC_CFG_FLAGS2_CALC_NEXT_DTIM_COUNT_GET/SET macros.
4544      *
4545      * Bit 10 - arp_ac_override_valid
4546      *      0 -> arp_ac_override field is invalid
4547      *      1 -> arp_ac_override field is valid
4548      *      Refer to WMI_RSRC_CFG_FLAGS2_ARP_AC_OVERRIDE_VALID_GET/SET macros.
4549      * Bit 12:11 - arp_ac_override
4550      *      If the AC override valid bit is set then this field will specify the
4551      *      access category to use for ARP frames
4552      *      0 - WMM_AC_BE
4553      *      1 - WMM_AC_BK
4554      *      2 - WMM_AC_VI
4555      *      3 - WMM_AC_VO
4556      *      Refer to WMI_RSRC_CFG_FLAGS2_ARP_AC_OVERRIDE_GET/SET macros.
4557      * Bit 13 - sawf_sched
4558      *      SAWF feature flag for scheduler
4559      *      0  -> disable SAWF based scheduling
4560      *      1  -> enable SAWF based scheduling
4561      *      Refer to WMI_RSRC_CFG_FLAGS2_SAWF_CONFIG_ENABLE_GET/SET macros.
4562      * Bit 14 - notify_frame_support
4563      *      Flag to enable notify_frame_support from host.
4564      *      0  -> disable notify_frame_support feature
4565      *      1  -> enable_notify_frame_support feature
4566      *      Refer to WMI_RSRC_CFG_FLAGS2_NOTIFY_FRAME_CONFIG_ENABLE_GET/SET
4567      *      macros.
4568      * Bit 15 - disable_wds_mec_intrabss
4569      *      Flag to disable wds learning, MEC, intrabss offload.
4570      *      By default, it is enabled.
4571      *      0  -> enable wds_mec_intrabss offload
4572      *      1  -> disable wds_mec_intrabss offload
4573      *      Refer to WMI_RSRC_CFG_FLAGS2_DISABLE_WDS_MEC_INTRABSS_OFFLOAD_GET /
4574      *      SET macros.
4575      * Bit 16 - latency_flowq_support
4576      *      Flag to indicate whether host supports latency tolerant queue.
4577      *      By default, it is disabled.
4578      *      0  -> disable latency_flowq_support
4579      *      1  -> enable latency_flowq_support
4580      *      Refer to WMI_RSRC_CFG_FLAGS2_LATENCY_FLOWQ_SUPPORT_GET/SET macros.
4581      * Bit 17 - rf_path_mode
4582      *      Flag to indicate overlapping_freq_mode
4583      *      By default, it will be primary mode (0)
4584      *      0 - Primary
4585      *      1 - Secondary
4586      *      Refer to WMI_RSRC_CFG_FLAGS2_RF_PATH_MODE_GET/SET macros.
4587      * Bit 18 - disable_wds_peer_map_unmap_event
4588      *      Flag to indicate whether the WDS peer map/unmap event should be
4589      *      processed or ignored.
4590      *      0 - leave the WDS peer map/unmap event enabled
4591      *      1 - disable the WDS peer map/unmap event
4592      *      This flag shall only be set if the target has set the
4593      *      WMI_SERVICE_DISABLE_WDS_PEER_MAP_UNMAP_EVENT_SUPPORT flag.
4594      *      Refer to WMI_RSRC_CFG_FLAGS2_DISABLE_WDS_PEER_MAP_UNMAP_EVENT_GET
4595      *      and _SET macros.
4596      *
4597      *  Bits 31:19 - Reserved
4598      */
4599     A_UINT32 flags2;
4600     /** @brief host_service_flags - can be used by Host to indicate
4601      * services that host can support.
4602      *
4603      *  @details
4604      *  Bit 0
4605      *      The bit will be set when Host HDD supports separate iface creation
4606      *      for NAN.  More specifically Host can support creation of NAN vdev
4607      *      in firmware.
4608      *
4609      *      Refer to WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_IFACE_SUPPORT_GET/SET
4610      *      macros defined below.
4611      *  Bit 1
4612      *      The bit will be set when HOST is capable of processing multiple
4613      *      radio events per radio. More specifically whenever Firmware is
4614      *      sending multiple radio events (WMI_RADIO_LINK_STATS_EVENTID
4615      *      = 0x16004) for a single radio,
4616      *      Through this flag Firmware will know that HOST is able to support
4617      *      delivery of RADIO_LINK_STATS across multiple event messages,
4618      *      and Firmware can send multiple radio events.
4619      *
4620      *      Refer to WMI_RSRC_CFG_HOST_SERVICE_FLAG_HOST_SUPPORT_MULTI_RADIO_EVTS_PER_RADIO_GET/SET
4621      *      macros defined below.
4622      *  Bit 2
4623      *      This bit will be set when host is able to handle split AST feature.
4624      *      Refer to the below definitions of the
4625      *      WMI_RSRC_CFG_HOST_SERVICE_FLAG_SPLIT_AST_FEATURE_HOST_SUPPORT_GET
4626      *      and _SET macros.
4627      *  Bit 3
4628      *      This bit will be set when host is able to enable EAPOL offload to
4629      *      FW for SAE roaming feature.
4630      *      Refer to the below definitions of the
4631      *      WMI_RSRC_CFG_HOST_SERVICE_FLAG_SAE_EAPOL_OFFLOAD_SUPPORT_GET
4632      *      and _SET macros.
4633      *  Bit 4
4634      *      This bit will be set when host is able to process the
4635      *      WMI_REG_CC_EXT_EVENT.
4636      *      Refer to the below definitions of the
4637      *      WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_CC_EXT_SUPPORT_GET
4638      *      and _SET macros.
4639      *  Bit 5
4640      *      This bit will be set when the host supports NAN channels.
4641      *      Refer to WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_CHANNEL_SUPPORT_GET/SET
4642      *  Bit 6
4643      *      This bit will be set when the host supports synchronous TWT events.
4644      *      Refer to WMI_RSRC_CFG_HOST_SERVICE_FLAG_STA_TWT_SYNC_EVT_SUPPORT_GET
4645      *      and _SET.
4646      *  Bit 7
4647      *      This bit will be set when host supports both LPI and SP mode.
4648      *      when this bit is set to 0 - Indicate LPI only mode
4649      *                  when set to 1 - Indicate both SP mode and LPI mode
4650      *                                  both are supported
4651      *      Refer to the below definitions of the
4652      *      WMI_RSRC_CFG_HOST_SERVICE_FLAG_LPI_SP_MODE_SUPPORT_GET
4653      *      and _SET macros.
4654      *  Bit 8
4655      *      This bit will be set when host wants to disable timer check in
4656      *      reg for AFC.
4657      *      when set to 1 - Disable timer check
4658      *      Refer to the below definitions of the
4659      *      WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_TIMER_CHECK_GET
4660      *      and _SET macros.
4661      *  Bit 9
4662      *      This bit will be set when host host wants to disable request id
4663      *      check in reg for AFC.
4664      *      when set to 1 - Disable Request ID check
4665      *      Refer to the below definitions of the
4666      *      WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_REQ_ID_CHECK_GET
4667      *      and _SET macros.
4668      *  Bit 10
4669      *      This bit will be set when host wants to enable indoor for AFC
4670      *      when this bit is set to 0 indoor mode not enabled
4671      *      when this bit is set to 1 indoor mode is enabled
4672      *      WMI_RSRC_CFG_HOST_SERVICE_FLAG_AFC_INDOOR_SUPPORT_CHECK_GET
4673      *      and SET macros
4674      *  Bit 11
4675      *      This bit will be set when host wants to enable outdoor for AFC
4676      *      when this bit is set to 0 outdoor mode not enabled
4677      *      when this bit is set to 1 outdoor mode is enabled
4678      *      WMI_RSRC_CFG_HOST_SERVICE_FLAG_AFC_OUTDOOR_SUPPORT_CHECK_GET
4679      *      and SET macros.
4680      *  Bit 12
4681      *      This bit will be set when host host wants to enable/disable
4682      *      REO QREF feature
4683      *      when set to 1 - Enable the REO QREF feature
4684      *      when set to 0 - Disable the REO QREF feature
4685      *      Refer to the below definitions of the
4686      *      WMI_RSRC_CFG_HOST_SERVICE_FLAG_REO_QREF_FEATURE_SUPPORT_GET
4687      *      and _SET macros.
4688      *  Bit 13
4689      *      This bit will be set when host host wants to enable/disable
4690      *      bang radar 320M support feature
4691      *      when set to 1 - Enable the bang radar 320M support
4692      *      when set to 0 - Disable the bang radar 320M support
4693      *      Refer to the below definitions of the
4694      *      WMI_RSRC_CFG_HOST_SERVICE_FLAG_BANG_RADAR_320M_SUPPORT_GET
4695      *      and _SET macros.
4696      *  Bit 14
4697      *      This bit will be set when host wants to enable/disable
4698      *      full BW NOL feature.
4699      *      When set to 1: Enable full BW NOL feature.
4700      *      When set to 0: Disable the full BW NOL feature.
4701      *      Refer to the below definitions of the
4702      *      WMI_RSRC_CFG_HOST_SERVICE_FLAG_RADAR_FLAGS_FULL_BW_NOL_GET
4703      *      and _SET macros.
4704      *  Bit 15
4705      *      This bit will be set if the host has smem_mailbox support enabled.
4706      *      Refer to the below definitions of the
4707      *      WMI_RSRC_CFG_HOST_SERVICE_FLAG_SMEM_MAILBOX_SUPPORT_GET
4708      *      and _SET macros.
4709      *  Bit 16
4710      *      ML FULL monitor mode
4711      *      This bit will be set by host to enable ML_FULL_MONITOR_MODE
4712      *      Refer to the below definitions of the
4713      *      WMI_RSRC_CFG_HOST_SERVICE_FLAG_ML_FULL_MONITOR_MODE_SUPPORT_GET
4714      *      and _SET macros
4715      *  Bits 31:17 - Reserved
4716      */
4717     A_UINT32 host_service_flags;
4718 
4719     /** @brief max_rnr_neighbours -
4720      * The Maximum number of neighbour RNR's from other SoC.
4721      * This limits the field @num_bss in @wmi_pdev_tbtt_offset_sync_cmd_fixed_param.
4722      * Value of 0 means cross SoC TBTT offset synchronization not required and
4723      * @PDEV_TBTT_OFFSET_SYNC_CMD wouldn't be used.
4724      */
4725     A_UINT32 max_rnr_neighbours;
4726 
4727     /** @brief ema_max_vap_cnt - number of maximum EMA Tx vaps (VAPs having both
4728      *  VDEV_FLAGS_EMA_MODE and VDEV_FLAGS_TRANSMIT_AP set) at any instance
4729      * of time across SOC. Legacy MBSS Vaps are not accounted in this field.
4730      */
4731     A_UINT32 ema_max_vap_cnt;
4732 
4733     /** @brief ema_max_profile_period - maximum profile periodicity
4734      * (maximum number of beacons after which VAP profiles repeat)
4735      * for any EMA VAP on any pdev.
4736      */
4737 
4738     A_UINT32 ema_max_profile_period;
4739     /** @brief max_ndp_sessions
4740      * This is the max ndp sessions sent by the host which is the minimum
4741      * of the value requested within the host's ini configurations and
4742      * the max ndp sessions supported by the firmware (as reported in the
4743      * SERVICE_READY_EXT2_EVENT message).
4744      */
4745     A_UINT32 max_ndp_sessions;
4746 
4747     /** @brief max_ndi_supported
4748      * This is the max ndi interfaces sent by the host based on the value
4749      * specified by the host's ini configuration.
4750      */
4751     A_UINT32 max_ndi_interfaces;
4752 
4753     /** @brief max_ap_vaps
4754      * Maximum number of AP mode vdevs created at any time.
4755      * This value is minimum of the number of AP vdevs supported by
4756      * the target and host.
4757      */
4758     A_UINT32 max_ap_vaps;
4759 
4760     /** @brief cbc_flow_ena
4761      * When cbc_flow_ena is se, halphy will do Cold Boot Calibration flow.
4762      * Otherwise, halphy will do normal flow.
4763      */
4764     A_UINT32 cbc_flow_ena;
4765 
4766     /** @brief ema_init_config - can be used by Host to indicate beacon size
4767      *  @details
4768      *  Bit   0 : 15 - Size of beacon, currently it can be sent as
4769      *                 1500 or 2500 or 4000 bytes
4770      *  Bit  16 : 31 - Reserved
4771      *  In case of Backward compatibility, if this variable is 0 then
4772      *  default beacon size (1500) is used.
4773      */
4774     A_UINT32 ema_init_config;
4775 
4776     /** @brief carrier_config
4777      * Carrier profile configuration
4778      * BIT 0 -> enable/disable charter configurations
4779      * BIT 1 : 31 Reserved
4780      */
4781     A_UINT32 carrier_config;
4782 
4783     /** @brief num_of_linkview_peers - proposed by the host value of
4784      *      the peers with the num_of_linkview_msduqs_per_tid allocation
4785      *  @details
4786      *  Host can request what the number of 'num_peers' should use
4787      *  num_of_linkview_msduqs_per_tid. All other peers will use
4788      *  default number of MSDUQs allocated.
4789      */
4790     A_UINT32 num_of_linkview_peers;
4791 
4792     /** @brief num_of_linkview_msduqs_per_tid - proposed by the host value of
4793      *      MSDUQs per each LinkView peer's TID
4794      *  @details
4795      *  Host sends the number of MSDUQs per each LinkView peer's TID.
4796      *  This number will be used during resources allocation for
4797      * LinkView peer in the target.
4798      */
4799     A_UINT32 num_of_linkview_msduqs_per_tid;
4800 
4801     /**
4802      * @brief num_max_active_vdevs -
4803      * number of max active virtual devices (VAPs) to support
4804      */
4805     A_UINT32 num_max_active_vdevs;
4806 
4807     /**
4808      * @brief num_max_mlo_link_per_ml_bss
4809      * number of max partner links of a ML BSS
4810      */
4811     A_UINT32 num_max_mlo_link_per_ml_bss;
4812 
4813     /**
4814      * @brief num_max_active_mlo_link_per_ml_bss
4815      * number of max active partner links of a ML BSS
4816      */
4817     A_UINT32 num_max_active_mlo_link_per_ml_bss;
4818 } wmi_resource_config;
4819 
4820 #define WMI_MSDU_FLOW_AST_ENABLE_GET(msdu_flow_config0, ast_x) \
4821     (((ast_x) == 0) ? 1 : ((msdu_flow_config0) & (1 << ((ast_x) - 1))))
4822 #define WMI_MSDU_FLOW_AST_ENABLE_SET(msdu_flow_config0, ast_x, enable) \
4823     do { \
4824         if ((ast_x) == 0) break;  \
4825         if ((enable)) { \
4826             (msdu_flow_config0) |= (1 << ((ast_x) - 1)); \
4827         } else { \
4828             (msdu_flow_config0) &= ~(1 << ((ast_x) - 1)); \
4829         } \
4830     } while(0)
4831 
4832 #define WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_GET(msdu_flow_config1, ast_x) \
4833     (((msdu_flow_config1) & (0x0f << ((ast_x) * 4))) >> ((ast_x) * 4))
4834 #define WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_SET( \
4835     msdu_flow_config1, ast_x, mask) \
4836     do { \
4837         (msdu_flow_config1) &= ~(0xF << ((ast_x) * 4)); \
4838         (msdu_flow_config1) |= ((mask) << ((ast_x) * 4)); \
4839     } while(0)
4840 
4841 #define WMI_MSDU_FLOW_TID_VALID_HI_MASKS_GET(msdu_flow_config1) \
4842     (((msdu_flow_config1) & 0xff0000) >> 16)
4843 #define WMI_MSDU_FLOW_TID_VALID_HI_MASKS_SET(msdu_flow_config1, mask) \
4844     do { \
4845         (msdu_flow_config1) &= ~0xff0000; \
4846         (msdu_flow_config1) |= ((mask) << 16); \
4847     } while(0)
4848 
4849 #define WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_GET(msdu_flow_config1) \
4850     ((msdu_flow_config1 & 0xff000000) >> 24)
4851 #define WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_SET(msdu_flow_config1, mask) \
4852     do { \
4853         (msdu_flow_config1) &= ~0xff000000; \
4854         (msdu_flow_config1) |= ((mask) << 24); \
4855     } while(0)
4856 
4857 #define WMI_RSRC_CFG_FLAG_SET(word32, flag, value) \
4858     do { \
4859         (word32) &= ~WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
4860         (word32) |= ((value) << WMI_RSRC_CFG_FLAG_ ## flag ## _S) & \
4861             WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
4862     } while (0)
4863 #define WMI_RSRC_CFG_FLAG_GET(word32, flag) \
4864     (((word32) & WMI_RSRC_CFG_FLAG_ ## flag ## _M) >> \
4865     WMI_RSRC_CFG_FLAG_ ## flag ## _S)
4866 
4867 #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_SET(word32, value) \
4868     WMI_RSRC_CFG_FLAG_SET((word32), WOW_IGN_PCIE_RST, (value))
4869 #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_GET(word32) \
4870     WMI_RSRC_CFG_FLAG_GET((word32), WOW_IGN_PCIE_RST)
4871 
4872 #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_SET(word32, value) \
4873     WMI_RSRC_CFG_FLAG_SET((word32), LTEU_SUPPORT, (value))
4874 #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_GET(word32) \
4875     WMI_RSRC_CFG_FLAG_GET((word32), LTEU_SUPPORT)
4876 
4877 #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_SET(word32, value) \
4878     WMI_RSRC_CFG_FLAG_SET((word32), COEX_GPIO_SUPPORT, (value))
4879 #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_GET(word32) \
4880     WMI_RSRC_CFG_FLAG_GET((word32), COEX_GPIO_SUPPORT)
4881 
4882 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_SET(word32, value) \
4883     WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_SPECTRAL_INTF, (value))
4884 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_GET(word32) \
4885     WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_SPECTRAL_INTF)
4886 
4887 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_SET(word32, value) \
4888     WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_CHAN_LOAD_INTF, (value))
4889 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_GET(word32) \
4890     WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_CHAN_LOAD_INTF)
4891 
4892 #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_SET(word32, value) \
4893     WMI_RSRC_CFG_FLAG_SET((word32), BSS_CHANNEL_INFO_64, (value))
4894 #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_GET(word32) \
4895     WMI_RSRC_CFG_FLAG_GET((word32), BSS_CHANNEL_INFO_64)
4896 
4897 #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_SET(word32, value) \
4898     WMI_RSRC_CFG_FLAG_SET((word32), ATF_CONFIG_ENABLE, (value))
4899 #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_GET(word32) \
4900     WMI_RSRC_CFG_FLAG_GET((word32), ATF_CONFIG_ENABLE)
4901 
4902 #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_SET(word32, value) \
4903     WMI_RSRC_CFG_FLAG_SET((word32), IPHR_PAD_CONFIG_ENABLE, (value))
4904 #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_GET(word32) \
4905     WMI_RSRC_CFG_FLAG_GET((word32), IPHR_PAD_CONFIG_ENABLE)
4906 
4907 #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_SET(word32, value) \
4908     WMI_RSRC_CFG_FLAG_SET((word32), QWRAP_MODE_ENABLE, (value))
4909 #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_GET(word32) \
4910     WMI_RSRC_CFG_FLAG_GET((word32), QWRAP_MODE_ENABLE)
4911 
4912 #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_SET(word32, value) \
4913     WMI_RSRC_CFG_FLAG_SET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT, (value))
4914 #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_GET(word32) \
4915     WMI_RSRC_CFG_FLAG_GET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT)
4916 
4917 #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_SET(word32, value) \
4918     WMI_RSRC_CFG_FLAG_SET((word32), TX_MSDU_ID_NEW_PARTITION_SUPPORT, (value))
4919 #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_GET(word32) \
4920     WMI_RSRC_CFG_FLAG_GET((word32), TX_MSDU_ID_NEW_PARTITION_SUPPORT)
4921 
4922 #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_SET(word32, value) \
4923     WMI_RSRC_CFG_FLAG_SET((word32), TCL_CCE_DISABLE, (value))
4924 #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_GET(word32) \
4925     WMI_RSRC_CFG_FLAG_GET((word32), TCL_CCE_DISABLE)
4926 
4927 #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_SET(word32, value) \
4928     WMI_RSRC_CFG_FLAG_SET((word32), TIM_V2_SUPPORT_ENABLE, (value))
4929 #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_GET(word32) \
4930     WMI_RSRC_CFG_FLAG_GET((word32), TIM_V2_SUPPORT_ENABLE)
4931 
4932 #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_SET(word32, value) \
4933     WMI_RSRC_CFG_FLAG_SET((word32), EAPOL_REKEY_MINRATE_SUPPORT_ENABLE, (value))
4934 #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_GET(word32) \
4935     WMI_RSRC_CFG_FLAG_GET((word32), EAPOL_REKEY_MINRATE_SUPPORT_ENABLE)
4936 
4937 #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_SET(word32, value) \
4938     WMI_RSRC_CFG_FLAG_SET((word32), EAPOL_AC_OVERRIDE_VALID, (value))
4939 #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_GET(word32) \
4940     WMI_RSRC_CFG_FLAG_GET((word32), EAPOL_AC_OVERRIDE_VALID)
4941 
4942 #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_SET(word32, value) \
4943     WMI_RSRC_CFG_FLAG_SET((word32), EAPOL_AC_OVERRIDE, (value))
4944 #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_GET(word32) \
4945     WMI_RSRC_CFG_FLAG_GET((word32), EAPOL_AC_OVERRIDE)
4946 
4947 #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_SET(word32, value) \
4948     WMI_RSRC_CFG_FLAG_SET((word32), TX_ACK_RSSI, (value))
4949 #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_GET(word32) \
4950     WMI_RSRC_CFG_FLAG_GET((word32), TX_ACK_RSSI)
4951 
4952 #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_SET(word32, value) \
4953     WMI_RSRC_CFG_FLAG_SET((word32), HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN, (value))
4954 #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_GET(word32) \
4955     WMI_RSRC_CFG_FLAG_GET((word32), HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN)
4956 
4957 #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_SET(word32, value) \
4958     WMI_RSRC_CFG_FLAG_SET((word32), PEER_UNMAP_RESPONSE_SUPPORT, (value))
4959 #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_GET(word32) \
4960     WMI_RSRC_CFG_FLAG_GET((word32), PEER_UNMAP_RESPONSE_SUPPORT)
4961 
4962 #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_SET(word32, value) \
4963     WMI_RSRC_CFG_FLAG_SET((word32), HTT_PEER_STATS, (value))
4964 #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_GET(word32) \
4965     WMI_RSRC_CFG_FLAG_GET((word32), HTT_PEER_STATS)
4966 
4967 #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_SET(word32, value) \
4968     WMI_RSRC_CFG_FLAG_SET((word32), PEER_TID_EXT, (value))
4969 #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_GET(word32) \
4970     WMI_RSRC_CFG_FLAG_GET((word32), PEER_TID_EXT)
4971 
4972 #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_SET(word32, value) \
4973     WMI_RSRC_CFG_FLAG_SET((word32), VIDEO_OVER_WIFI_ENABLE, (value))
4974 #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_GET(word32) \
4975     WMI_RSRC_CFG_FLAG_GET((word32), VIDEO_OVER_WIFI_ENABLE)
4976 
4977 #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_SET(word32, value) \
4978     WMI_RSRC_CFG_FLAG_SET((word32), THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT, (value))
4979 #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_GET(word32) \
4980     WMI_RSRC_CFG_FLAG_GET((word32), THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT)
4981 
4982 #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_SET(word32, value) \
4983     WMI_RSRC_CFG_FLAG_SET((word32), THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT, (value))
4984 #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_GET(word32) \
4985     WMI_RSRC_CFG_FLAG_GET((word32), THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT)
4986 
4987 #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_SET(word32, value) \
4988     WMI_RSRC_CFG_FLAG_SET((word32), TX_COMPLETION_TX_TSF64_ENABLE, (value))
4989 #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_GET(word32) \
4990     WMI_RSRC_CFG_FLAG_GET((word32), TX_COMPLETION_TX_TSF64_ENABLE)
4991 
4992 #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_SET(word32, value) \
4993     WMI_RSRC_CFG_FLAG_SET((word32), PACKET_CAPTURE_SUPPORT, (value))
4994 #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_GET(word32) \
4995     WMI_RSRC_CFG_FLAG_GET((word32), PACKET_CAPTURE_SUPPORT)
4996 
4997 #define WMI_RSRC_CFG_FLAG_BSS_MAX_IDLE_TIME_SUPPORT_SET(word32, value) \
4998     WMI_RSRC_CFG_FLAG_SET((word32), BSS_MAX_IDLE_TIME_SUPPORT, (value))
4999 #define WMI_RSRC_CFG_FLAG_BSS_MAX_IDLE_TIME_SUPPORT_GET(word32) \
5000     WMI_RSRC_CFG_FLAG_GET((word32), BSS_MAX_IDLE_TIME_SUPPORT)
5001 
5002 #define WMI_RSRC_CFG_FLAG_AUDIO_SYNC_SUPPORT_SET(word32, value) \
5003     WMI_RSRC_CFG_FLAG_SET((word32), AUDIO_SYNC_SUPPORT, (value))
5004 #define WMI_RSRC_CFG_FLAG_AUDIO_SYNC_SUPPORT_GET(word32) \
5005     WMI_RSRC_CFG_FLAG_GET((word32), AUDIO_SYNC_SUPPORT)
5006 
5007 #define WMI_RSRC_CFG_FLAG_IPA_DISABLE_SET(word32, value) \
5008     WMI_RSRC_CFG_FLAG_SET((word32), IPA_DISABLE, (value))
5009 #define WMI_RSRC_CFG_FLAG_IPA_DISABLE_GET(word32) \
5010     WMI_RSRC_CFG_FLAG_GET((word32), IPA_DISABLE)
5011 
5012 #define WMI_RSRC_CFG_FLAG_PCIE_GEN_SWITCH_CAPABLITY_SET(word32, value) \
5013     WMI_RSRC_CFG_FLAG_SET((word32), PCIE_GEN_SWITCH_CAPABLITY, (value))
5014 #define WMI_RSRC_CFG_FLAG_PCIE_GEN_SWITCH_CAPABLITY_GET(word32) \
5015     WMI_RSRC_CFG_FLAG_GET((word32), PCIE_GEN_SWITCH_CAPABLITY)
5016 
5017 #define WMI_RSRC_CFG_FLAGS2_RE_ULRESP_PDEV_CFG_GET(flags2, pdev_id) \
5018     WMI_GET_BITS(flags2, pdev_id, 1)
5019 #define WMI_RSRC_CFG_FLAGS2_RE_ULRESP_PDEV_CFG_SET(flags2, pdev_id, value) \
5020     WMI_SET_BITS(flags2, pdev_id, 1, value)
5021 
5022 #define WMI_RSRC_CFG_FLAGS2_RX_PEER_METADATA_VERSION_GET(flags2) \
5023     WMI_GET_BITS(flags2, 4, 2)
5024 #define WMI_RSRC_CFG_FLAGS2_RX_PEER_METADATA_VERSION_SET(flags2, value) \
5025     WMI_SET_BITS(flags2, 4, 2, value)
5026 
5027 #define WMI_RSRC_CFG_FLAGS2_IS_SAP_CONNECTED_D3WOW_ENABLED_GET(flags2) \
5028     WMI_GET_BITS(flags2, 6, 1)
5029 #define WMI_RSRC_CFG_FLAGS2_IS_SAP_CONNECTED_D3WOW_ENABLED_SET(flags2, value) \
5030     WMI_SET_BITS(flags2, 6, 1, value)
5031 
5032 #define WMI_RSRC_CFG_FLAGS2_IS_GO_CONNECTED_D3WOW_ENABLED_GET(flags2) \
5033     WMI_GET_BITS(flags2, 7, 1)
5034 #define WMI_RSRC_CFG_FLAGS2_IS_GO_CONNECTED_D3WOW_ENABLED_SET(flags2, value) \
5035     WMI_SET_BITS(flags2, 7, 1, value)
5036 
5037 #define WMI_RSRC_CFG_FLAGS2_IS_DYNAMIC_PCIE_GEN_SPEED_SWITCH_ENABLED_GET(flags2) \
5038     WMI_GET_BITS(flags2, 8, 1)
5039 #define WMI_RSRC_CFG_FLAGS2_IS_DYNAMIC_PCIE_GEN_SPEED_SWITCH_ENABLED_SET(flags2, value) \
5040     WMI_SET_BITS(flags2, 8, 1, value)
5041 
5042 #define WMI_RSRC_CFG_FLAGS2_CALC_NEXT_DTIM_COUNT_GET(flags2) \
5043     WMI_GET_BITS(flags2, 9, 1)
5044 #define WMI_RSRC_CFG_FLAGS2_CALC_NEXT_DTIM_COUNT_SET(flags2, value) \
5045     WMI_SET_BITS(flags2, 9, 1, value)
5046 
5047 #define WMI_RSRC_CFG_FLAGS2_ARP_AC_OVERRIDE_VALID_GET(flags2) \
5048     WMI_GET_BITS(flags2, 10, 1)
5049 #define WMI_RSRC_CFG_FLAGS2_ARP_AC_OVERRIDE_VALID_SET(flags2, value) \
5050     WMI_SET_BITS(flags2, 10, 1, value)
5051 
5052 #define WMI_RSRC_CFG_FLAGS2_ARP_AC_OVERRIDE_GET(flags2) \
5053     WMI_GET_BITS(flags2, 11, 2)
5054 #define WMI_RSRC_CFG_FLAGS2_ARP_AC_OVERRIDE_SET(flags2, value) \
5055     WMI_SET_BITS(flags2, 11, 2, value)
5056 
5057 #define WMI_RSRC_CFG_FLAGS2_SAWF_CONFIG_ENABLE_GET(flags2) \
5058     WMI_GET_BITS(flags2, 13, 1)
5059 #define WMI_RSRC_CFG_FLAGS2_SAWF_CONFIG_ENABLE_SET(flags2, value) \
5060     WMI_SET_BITS(flags2, 13, 1, value)
5061 
5062 #define WMI_RSRC_CFG_FLAGS2_NOTIFY_FRAME_CONFIG_ENABLE_GET(flags2) \
5063     WMI_GET_BITS(flags2, 14, 1)
5064 #define WMI_RSRC_CFG_FLAGS2_NOTIFY_FRAME_CONFIG_ENABLE_SET(flags2, value) \
5065     WMI_SET_BITS(flags2, 14, 1, value)
5066 
5067 #define WMI_RSRC_CFG_FLAGS2_DISABLE_WDS_MEC_INTRABSS_OFFLOAD_GET(flags2) \
5068     WMI_GET_BITS(flags2, 15, 1)
5069 #define WMI_RSRC_CFG_FLAGS2_DISABLE_WDS_MEC_INTRABSS_OFFLOAD_SET(flags2, value) \
5070     WMI_SET_BITS(flags2, 15, 1, value)
5071 
5072 #define WMI_RSRC_CFG_FLAGS2_LATENCY_FLOWQ_SUPPORT_GET(flags2) \
5073     WMI_GET_BITS(flags2, 16, 1)
5074 #define WMI_RSRC_CFG_FLAGS2_LATENCY_FLOWQ_SUPPORT_SET(flags2, value) \
5075     WMI_SET_BITS(flags2, 16, 1, value)
5076 
5077 #define WMI_RSRC_CFG_FLAGS2_RF_PATH_MODE_GET(flags2) \
5078     WMI_GET_BITS(flags2, 17, 1)
5079 #define WMI_RSRC_CFG_FLAGS2_RF_PATH_MODE_SET(flags2, value) \
5080     WMI_SET_BITS(flags2, 17, 1, value)
5081 
5082 #define WMI_RSRC_CFG_FLAGS2_DISABLE_WDS_PEER_MAP_UNMAP_EVENT_GET(flags2) \
5083     WMI_GET_BITS(flags2, 18, 1)
5084 #define WMI_RSRC_CFG_FLAGS2_DISABLE_WDS_PEER_MAP_UNMAP_EVENT_SET(flags2, value) \
5085     WMI_SET_BITS(flags2, 18, 1, value)
5086 
5087 
5088 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_IFACE_SUPPORT_GET(host_service_flags) \
5089     WMI_GET_BITS(host_service_flags, 0, 1)
5090 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_IFACE_SUPPORT_SET(host_service_flags, val) \
5091     WMI_SET_BITS(host_service_flags, 0, 1, val)
5092 
5093 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_HOST_SUPPORT_MULTI_RADIO_EVTS_PER_RADIO_GET(host_service_flags) \
5094     WMI_GET_BITS(host_service_flags, 1, 1)
5095 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_HOST_SUPPORT_MULTI_RADIO_EVTS_PER_RADIO_SET(host_service_flags, val) \
5096     WMI_SET_BITS(host_service_flags, 1, 1, val)
5097 
5098 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SPLIT_AST_FEATURE_HOST_SUPPORT_GET(host_service_flags) \
5099     WMI_GET_BITS(host_service_flags, 2, 1)
5100 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SPLIT_AST_FEATURE_HOST_SUPPORT_SET(host_service_flags, val) \
5101     WMI_SET_BITS(host_service_flags, 2, 1, val)
5102 
5103 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SAE_EAPOL_OFFLOAD_SUPPORT_GET(host_service_flags) \
5104     WMI_GET_BITS(host_service_flags, 3, 1)
5105 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SAE_EAPOL_OFFLOAD_SUPPORT_SET(host_service_flags, val) \
5106     WMI_SET_BITS(host_service_flags, 3, 1, val)
5107 
5108 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_CC_EXT_SUPPORT_GET(host_service_flags) \
5109     WMI_GET_BITS(host_service_flags, 4, 1)
5110 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_CC_EXT_SUPPORT_SET(host_service_flags, val) \
5111     WMI_SET_BITS(host_service_flags, 4, 1, val)
5112 
5113 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_CHANNEL_SUPPORT_GET(host_service_flags) \
5114     WMI_GET_BITS(host_service_flags, 5, 1)
5115 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_CHANNEL_SUPPORT_SET(host_service_flags, val) \
5116     WMI_SET_BITS(host_service_flags, 5, 1, val)
5117 
5118 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_STA_TWT_SYNC_EVT_SUPPORT_GET(host_service_flags) \
5119     WMI_GET_BITS(host_service_flags, 6, 1)
5120 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_STA_TWT_SYNC_EVT_SUPPORT_SET(host_service_flags, val) \
5121     WMI_SET_BITS(host_service_flags, 6, 1, val)
5122 
5123 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_LPI_SP_MODE_SUPPORT_GET(host_service_flags) \
5124     WMI_GET_BITS(host_service_flags, 7, 1)
5125 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_LPI_SP_MODE_SUPPORT_SET(host_service_flags, val) \
5126     WMI_SET_BITS(host_service_flags, 7, 1, val)
5127 
5128 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_AFC_TIMER_CHECK_GET(host_service_flags) \
5129     WMI_GET_BITS(host_service_flags, 8, 1)
5130 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_AFC_TIMER_CHECK_SET(host_service_flags, val) \
5131     WMI_SET_BITS(host_service_flags, 8, 1, val)
5132 
5133 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_AFC_REQ_ID_CHECK_GET(host_service_flags) \
5134     WMI_GET_BITS(host_service_flags, 9, 1)
5135 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_AFC_REQ_ID_CHECK_SET(host_service_flags, val) \
5136     WMI_SET_BITS(host_service_flags, 9, 1, val)
5137 
5138 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_AFC_INDOOR_SUPPORT_CHECK_GET(host_service_flags) \
5139     WMI_GET_BITS(host_service_flags, 10, 1)
5140 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_AFC_INDOOR_SUPPORT_CHECK_SET(host_service_flags, val) \
5141     WMI_SET_BITS(host_service_flags, 10, 1, val)
5142 
5143 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_AFC_OUTDOOR_SUPPORT_CHECK_GET(host_service_flags) \
5144     WMI_GET_BITS(host_service_flags, 11, 1)
5145 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_AFC_OUTDOOR_SUPPORT_CHECK_SET(host_service_flags, val) \
5146     WMI_SET_BITS(host_service_flags, 11, 1, val)
5147 
5148 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REO_QREF_FEATURE_SUPPORT_GET(host_service_flags) \
5149     WMI_GET_BITS(host_service_flags, 12, 1)
5150 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REO_QREF_FEATURE_SUPPORT_SET(host_service_flags, val) \
5151     WMI_SET_BITS(host_service_flags, 12, 1, val)
5152 
5153 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_BANG_RADAR_320M_SUPPORT_GET(host_service_flags) \
5154     WMI_GET_BITS(host_service_flags, 13, 1)
5155 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_BANG_RADAR_320M_SUPPORT_SET(host_service_flags, val) \
5156     WMI_SET_BITS(host_service_flags, 13, 1, val)
5157 
5158 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_RADAR_FLAGS_FULL_BW_NOL_GET(host_service_flags) \
5159     WMI_GET_BITS(host_service_flags, 14, 1)
5160 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_RADAR_FLAGS_FULL_BW_NOL_SET(host_service_flags, val) \
5161     WMI_SET_BITS(host_service_flags, 14, 1, val)
5162 
5163 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SMEM_MAILBOX_SUPPORT_GET(host_service_flags) \
5164     WMI_GET_BITS(host_service_flags, 15, 1)
5165 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SMEM_MAILBOX_SUPPORT_SET(host_service_flags, val) \
5166     WMI_SET_BITS(host_service_flags, 15, 1, val)
5167 /*
5168  * Temporarily retain deprecated old "QMS_DLKM" macro names as aliases
5169  * for the new "SMEM_MAILBOX" macro names.
5170  */
5171 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_QMS_DLKM_SUPPORT_GET(host_service_flags) /* DEPRECATED */ \
5172     WMI_RSRC_CFG_HOST_SERVICE_FLAG_SMEM_MAILBOX_SUPPORT_GET(host_service_flags)
5173 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_QMS_DLKM_SUPPORT_SET(host_service_flags, val) /* DEPRECATED */ \
5174     WMI_RSRC_CFG_HOST_SERVICE_FLAG_SMEM_MAILBOX_SUPPORT_SET(host_service_flags, val)
5175 
5176 /* ML FULL monitor mode */
5177 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_ML_FULL_MONITOR_MODE_SUPPORT_GET(host_service_flags) \
5178         WMI_GET_BITS(host_service_flags, 16, 1)
5179 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_ML_FULL_MONITOR_MODE_SUPPORT_SET(host_service_flags, val) \
5180         WMI_SET_BITS(host_service_flags, 16, 1, val)
5181 
5182 
5183 #define WMI_RSRC_CFG_CARRIER_CFG_CHARTER_ENABLE_GET(carrier_config) \
5184     WMI_GET_BITS(carrier_config, 0, 1)
5185 #define WMI_RSRC_CFG_CARRIER_CFG_CHARTER_ENABLE_SET(carrier_config, val) \
5186     WMI_SET_BITS(carrier_config, 0, 1, val)
5187 
5188 /** Top nibble can be used to diff between HE and EHT: 0xVXXXXXXX
5189  *  If V == 0b0000: format is HE.
5190  *  If V == 0b0001: format is EHT.
5191  */
5192 #define WMI_RSRC_CFG_IS_EHT_GET(param_value) \
5193     WMI_GET_BITS(param_value, 28, 4)
5194 #define WMI_RSRC_CFG_IS_EHT_SET(param_value, val) \
5195     WMI_SET_BITS(param_value, 28, 4, val)
5196 
5197 /* Used along with the above macro to set the value. */
5198 #define WMI_RSRC_CFG_PARAM_VALUE_GET(param_value) \
5199     WMI_GET_BITS(param_value, 0, 28)
5200 #define WMI_RSRC_CFG_PARAM_VALUE_SET(param_value, val) \
5201     WMI_SET_BITS(param_value, 0, 28, val)
5202 
5203 typedef struct {
5204     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_init_cmd_fixed_param */
5205 
5206     /** The following indicate the WMI versions to be supported by
5207      *  the host driver. Note that the host driver decide to
5208      *  "downgrade" its WMI version support and this may not be the
5209      *  native version of the host driver. */
5210     wmi_abi_version host_abi_vers;
5211 
5212     A_UINT32 num_host_mem_chunks; /** size of array host_mem_chunks[] */
5213 /* This init_cmd_fixed_param TLV is followed by the below TLVs:
5214  *     wmi_resource_config   resource_config;
5215  *     wlan_host_memory_chunk host_mem_chunks[];
5216  *     wmi_pdev_set_hw_mode_cmd_fixed_param hw_mode_config;
5217  *         Note that the hw_mode_config, in spite of its "pdev" name,
5218  *         applies to the entire target rather than for a single pdev
5219  *         within the target.
5220  *         To avoid specifying a HW mode for the target, the host should
5221  *         fill hw_mode_config's fields with 0x0.
5222  *     wmi_pdev_band_to_mac                 band_to_mac[];
5223  *     wmi_htt_msdu_idx_to_htt_msdu_qtype   htt_msdu_idx_to_qtype_map[];
5224  */
5225 } wmi_init_cmd_fixed_param;
5226 
5227 typedef enum {
5228     WMI_WIFI_STANDARD_4     = 0,
5229     WMI_WIFI_STANDARD_5     = 1,
5230     WMI_WIFI_STANDARD_6     = 2,
5231     WMI_WIFI_STANDARD_6E    = 3,
5232     WMI_WIFI_STANDARD_7     = 4,
5233 } WMI_WIFI_STANDARD;
5234 
5235 typedef enum {
5236     WMI_HOST_NONE       = 0, /* No concurrency mode supported */
5237     WMI_HOST_DBS        = 1, /* When 2.4G + 5G & 2.4G + 6G if 6G is supported */
5238     WMI_HOST_DBS_SBS    = 2, /* When 2.4G + 5G, 2.4G + 6G, 5G + 6G & 5G + 5G is supported */
5239 } WMI_BAND_CONCURRENCY;
5240 
5241 typedef enum {
5242     WMI_SISO        = 1, /* When 1x1 is supported */
5243     WMI_MIMO_2X2    = 2, /* When 2x2 MIMO is supported */
5244 } WMI_NUM_ANTENNAS;
5245 
5246 typedef enum {
5247     WMI_VENDOR1_REQ1_VERSION_3_00   = 0,
5248     WMI_VENDOR1_REQ1_VERSION_3_01   = 1,
5249     WMI_VENDOR1_REQ1_VERSION_3_20   = 2,
5250     WMI_VENDOR1_REQ1_VERSION_3_30   = 3,
5251     WMI_VENDOR1_REQ1_VERSION_3_40   = 4,
5252     WMI_VENDOR1_REQ1_VERSION_4_00   = 5,
5253 } WMI_VENDOR1_REQ1_VERSION;
5254 
5255 typedef enum {
5256     WMI_VENDOR1_REQ2_VERSION_3_00   = 0,
5257     WMI_VENDOR1_REQ2_VERSION_3_01   = 1,
5258     WMI_VENDOR1_REQ2_VERSION_3_20   = 2,
5259     WMI_VENDOR1_REQ2_VERSION_3_50   = 3,
5260 } WMI_VENDOR1_REQ2_VERSION;
5261 
5262 typedef enum {
5263     WMI_HOST_BAND_CAP_2GHZ = 0x01,
5264     WMI_HOST_BAND_CAP_5GHZ = 0x02,
5265     WMI_HOST_BAND_CAP_6GHZ = 0x04,
5266 } WMI_HOST_BAND_CAP;
5267 
5268 /* HW features supported info */
5269 /* enum WMI_WIFI_STANDARD are possible values for WiFi standard bitfield */
5270 #define WMI_GET_WIFI_STANDARD(var, feature_bitmap)              \
5271         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 0, 4)
5272 #define WMI_SET_WIFI_STANDARD(feature_bitmap, val)              \
5273         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 0, 4, val)
5274 /* enum WMI_BAND_CONCURRENCY are possible values for band concurrency support bitfield */
5275 #define WMI_GET_BAND_CONCURRENCY_SUPPORT(var, feature_bitmap)   \
5276         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 4, 3)
5277 #define WMI_SET_BAND_CONCURRENCY_SUPPORT(feature_bitmap, val)   \
5278         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 4, 3, val)
5279 
5280 /* PNO feature supported info */
5281 #define WMI_GET_PNO_SCAN_IN_UNASSOC_STATE(var, feature_bitmap)          \
5282         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 7, 1)
5283 #define WMI_SET_PNO_SCAN_IN_UNASSOC_STATE(feature_bitmap, val)          \
5284         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 7, 1, val)
5285 #define WMI_GET_PNO_SCAN_IN_ASSOC_STATE(var, feature_bitmap)            \
5286         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 8, 1)
5287 #define WMI_SET_PNO_SCAN_IN_ASSOC_STATE(feature_bitmap, val)            \
5288         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 8, 1, val)
5289 
5290 /* TWT feature supported info */
5291 #define WMI_GET_TWT_FEATURE_SUPPORT(var, feature_bitmap)           \
5292         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 9, 1)
5293 #define WMI_SET_TWT_FEATURE_SUPPORT(feature_bitmap, val)           \
5294         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 9, 1, val)
5295 #define WMI_GET_TWT_REQUESTOR(var, feature_bitmap)                 \
5296         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 10, 1)
5297 #define WMI_SET_TWT_REQUESTER(feature_bitmap, val)                 \
5298         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 10, 1, val)
5299 #define WMI_GET_TWT_BROADCAST(var, feature_bitmap)                 \
5300         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 11, 1)
5301 #define WMI_SET_TWT_BROADCAST(feature_bitmap, val)                 \
5302         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 11, 1, val)
5303 #define WMI_GET_TWT_FLEXIBLE(var, feature_bitmap)                  \
5304         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 12, 1)
5305 #define WMI_SET_TWT_FLEXIBLE(feature_bitmap, val)                  \
5306         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 12, 1, val)
5307 
5308 /* WIFI optimizer feature supported info */
5309 #define WMI_GET_WIFI_OPT_FEATURE_SUPPORT(var, feature_bitmap)                   \
5310         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 13, 1)
5311 #define WMI_SET_WIFI_OPT_FEATURE_SUPPORT(feature_bitmap, val)         \
5312         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 13, 1, val)
5313 
5314 /* RFC8325 feature supported info */
5315 #define WMI_GET_RFC8325_FEATURE_SUPPORT(var, feature_bitmap)                \
5316         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 14, 1)
5317 #define WMI_SET_RFC8325_FEATURE_SUPPORT(feature_bitmap, val)                \
5318         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 14, 1, val)
5319 
5320 /* MHS feature supported info */
5321 #define WMI_GET_MHS_5G_SUPPORT(var, feature_bitmap)                     \
5322         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 15, 1)
5323 #define WMI_SET_MHS_5G_SUPPORT(feature_bitmap, val)                     \
5324         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 15, 1, val)
5325 #define WMI_GET_MHS_6G_SUPPORT(var, feature_bitmap)                     \
5326         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 16, 1)
5327 #define WMI_SET_MHS_6G_SUPPORT(feature_bitmap, val)                     \
5328         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 16, 1, val)
5329 #define WMI_GET_MHS_MAX_CLIENTS_SUPPORT(var, feature_bitmap)            \
5330         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 17, 8)
5331 #define WMI_SET_MHS_MAX_CLIENTS_SUPPORT(feature_bitmap, val)            \
5332         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 17, 8, val)
5333 #define WMI_GET_MHS_SET_COUNTRY_CODE_HAL_SUPPORT(var, feature_bitmap)   \
5334         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 25, 1)
5335 #define WMI_SET_MHS_SET_COUNTRY_CODE_HAL_SUPPORT(feature_bitmap, val)   \
5336         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 25, 1, val)
5337 #define WMI_GET_MHS_GETVALID_CHANNELS_SUPPORT(var, feature_bitmap)      \
5338         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 26, 1)
5339 #define WMI_SET_MHS_GETVALID_CHANNELS_SUPPORT(feature_bitmap, val)      \
5340         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 26, 1, val)
5341 /* enum WMI_WIFI_STANDARD are possible values for MHS DOT11 mode support bitfield */
5342 #define WMI_GET_MHS_DOT11_MODE_SUPPORT(var, feature_bitmap)             \
5343         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 27, 4)
5344 #define WMI_SET_MHS_DOT11_MODE_SUPPORT(feature_bitmap, val)             \
5345         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 27, 4, val)
5346 #define WMI_GET_MHS_WPA3_SUPPORT(var, feature_bitmap)                   \
5347         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 31, 1)
5348 #define WMI_SET_MHS_WPA3_SUPPORT(feature_bitmap, val)                   \
5349         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 31, 1, val)
5350 
5351 /* Vendor requirement1 supported version info */
5352 /* enum's WMI_VENDORxx_REQxx_VERSION are the possible vaues for below bitfield*/
5353 #define WMI_GET_VENDOR_REQ_1_VERSION(var, feature_bitmap)          \
5354         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 32, 8)
5355 #define WMI_SET_VENDOR_REQ_1_VERSION(feature_bitmap, val)          \
5356         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 32, 8, val)
5357 
5358 /* Roaming feature supported info */
5359 #define WMI_GET_ROAMING_HIGH_CU_ROAM_TRIGGER(var, feature_bitmap)          \
5360         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 40, 1)
5361 #define WMI_SET_ROAMING_HIGH_CU_ROAM_TRIGGER(feature_bitmap, val)          \
5362         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 40, 1, val)
5363 #define WMI_GET_ROAMING_EMERGENCY_TRIGGER(var, feature_bitmap)             \
5364         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 41, 1)
5365 #define WMI_SET_ROAMING_EMERGENCY_TRIGGER(feature_bitmap, val)             \
5366         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 41, 1, val)
5367 #define WMI_GET_ROAMING_BTM_TRIGGER(var, feature_bitmap)                   \
5368         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 42, 1)
5369 #define WMI_SET_ROAMING_BTM_TRIGGER(feature_bitmap, val)                   \
5370         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 42, 1, val)
5371 #define WMI_GET_ROAMING_IDLE_TRIGGER(var, feature_bitmap)                  \
5372         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 43, 1)
5373 #define WMI_SET_ROAMING_IDLE_TRIGGER(feature_bitmap, val)                  \
5374         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 43, 1, val)
5375 #define WMI_GET_ROAMING_WTC_TRIGGER(var, feature_bitmap)                   \
5376         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 44, 1)
5377 #define WMI_SET_ROAMING_WTC_TRIGGER(feature_bitmap, val)                   \
5378         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 44, 1, val)
5379 #define WMI_GET_ROAMING_BTCOEX_TRIGGER(var, feature_bitmap)                \
5380         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 45, 1)
5381 #define WMI_SET_ROAMING_BTCOEX_TRIGGER(feature_bitmap, val)                \
5382         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 45, 1, val)
5383 #define WMI_GET_ROAMING_BTW_WPA_WPA2(var, feature_bitmap)                  \
5384         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 46, 1)
5385 #define WMI_SET_ROAMING_BTW_WPA_WPA2(feature_bitmap, val)                  \
5386         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 46, 1, val)
5387 #define WMI_GET_ROAMING_MANAGE_CHAN_LIST_API(var, feature_bitmap)          \
5388         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 47, 1)
5389 #define WMI_SET_ROAMING_MANAGE_CHAN_LIST_API(feature_bitmap, val)          \
5390         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 47, 1, val)
5391 #define WMI_GET_ROAMING_ADAPTIVE_11R(var, feature_bitmap)                  \
5392         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 48, 1)
5393 #define WMI_SET_ROAMING_ADAPTIVE_11R(feature_bitmap, val)                  \
5394         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 48, 1, val)
5395 #define WMI_GET_ROAMING_CTRL_API_GET_SET(var, feature_bitmap)              \
5396         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 49, 1)
5397 #define WMI_SET_ROAMING_CTRL_API_GET_SET(feature_bitmap, val)              \
5398         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 49, 1, val)
5399 #define WMI_GET_ROAMING_CTRL_API_REASSOC(var, feature_bitmap)              \
5400         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 50, 1)
5401 #define WMI_SET_ROAMING_CTRL_API_REASSOC(feature_bitmap, val)              \
5402         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 50, 1, val)
5403 #define WMI_GET_ROAMING_CTRL_GET_CU(var, feature_bitmap)                   \
5404         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 51, 1)
5405 #define WMI_SET_ROAMING_CTRL_GET_CU(feature_bitmap, val)                   \
5406         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 51, 1, val)
5407 
5408 /* Vendor requirement2 supported version info */
5409 /* enum's WMI_VENDORxx_REQxx_VERSION are the possible vaues for below bitfield*/
5410 #define WMI_GET_VENDOR_REQ_2_VERSION(var, feature_bitmap)          \
5411         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 52, 8)
5412 #define WMI_SET_VENDOR_REQ_2_VERSION(feature_bitmap, val)          \
5413         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 52, 8, val)
5414 
5415 #define WMI_GET_ASSURANCE_DISCONNECT_REASON_API(var, feature_bitmap)       \
5416         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 60, 1)
5417 #define WMI_SET_ASSURANCE_DISCONNECT_REASON_API(feature_bitmap, val)       \
5418         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 60, 1, val)
5419 
5420 /* Frame pcap logging */
5421 #define WMI_GET_FRAME_PCAP_LOG_MGMT(var, feature_bitmap)          \
5422         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 61, 1)
5423 #define WMI_SET_FRAME_PCAP_LOG_MGMT(feature_bitmap, val)          \
5424         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 61, 1, val)
5425 #define WMI_GET_FRAME_PCAP_LOG_CTRL(var, feature_bitmap)          \
5426         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 62, 1)
5427 #define WMI_SET_FRAME_PCAP_LOG_CTRL(feature_bitmap, val)          \
5428         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 62, 1, val)
5429 #define WMI_GET_FRAME_PCAP_LOG_DATA(var, feature_bitmap)          \
5430         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 63, 1)
5431 #define WMI_SET_FRAME_PCAP_LOG_DATA(feature_bitmap, val)          \
5432         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 63, 1, val)
5433 
5434 /* Security features supported info */
5435 #define WMI_GET_SECURITY_WPA3_SAE_H2E(var, feature_bitmap)                \
5436         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 64, 1)
5437 #define WMI_SET_SECURITY_WPA3_SAE_H2E(feature_bitmap, val)                \
5438         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 64, 1, val)
5439 #define WMI_GET_SECURITY_WPA3_SAE_FT(var, feature_bitmap)                 \
5440         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 65, 1)
5441 #define WMI_SET_SECURITY_WPA3_SAE_FT(feature_bitmap, val)                 \
5442         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 65, 1, val)
5443 #define WMI_GET_SECURITY_WPA3_ENTERP_SUITEB(var, feature_bitmap)          \
5444         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 66, 1)
5445 #define WMI_SET_SECURITY_WPA3_ENTERP_SUITEB(feature_bitmap, val)          \
5446         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 66, 1, val)
5447 #define WMI_GET_SECURITY_WPA3_ENTERP_SUITEB_192bit(var, feature_bitmap)   \
5448         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 67, 1)
5449 #define WMI_SET_SECURITY_WPA3_ENTERP_SUITEB_192bit(feature_bitmap, val)   \
5450         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 67, 1, val)
5451 #define WMI_GET_SECURITY_FILS_SHA256(var, feature_bitmap)                 \
5452         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 68, 1)
5453 #define WMI_SET_SECURITY_FILS_SHA256(feature_bitmap, val)                 \
5454         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 68, 1, val)
5455 #define WMI_GET_SECURITY_FILS_SHA384(var, feature_bitmap)                 \
5456         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 69, 1)
5457 #define WMI_SET_SECURITY_FILS_SHA384(feature_bitmap, val)                 \
5458         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 69, 1, val)
5459 #define WMI_GET_SECURITY_FILS_SHA256_FT(var, feature_bitmap)              \
5460         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 70, 1)
5461 #define WMI_SET_SECURITY_FILS_SHA256_FT(feature_bitmap, val)              \
5462         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 70, 1, val)
5463 #define WMI_GET_SECURITY_FILS_SHA384_FT(var, feature_bitmap)              \
5464         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 71, 1)
5465 #define WMI_SET_SECURITY_FILS_SHA384_FT(feature_bitmap, val)              \
5466         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 71, 1, val)
5467 #define WMI_GET_SECURITY_ENCHANCED_OPEN(var, feature_bitmap)              \
5468         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 72, 1)
5469 #define WMI_SET_SECURITY_ENCHANCED_OPEN(feature_bitmap, val)              \
5470         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 72, 1, val)
5471 
5472 /* Peer protocol features supported info */
5473 #define WMI_GET_NAN_SUPPORT(var, feature_bitmap)            \
5474         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 73, 1)
5475 #define WMI_SET_NAN_SUPPORT(feature_bitmap, val)            \
5476         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 73, 1, val)
5477 #define WMI_GET_TDLS_SUPPORT(var, feature_bitmap)           \
5478         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 74, 1)
5479 #define WMI_SET_TDLS_SUPPORT(feature_bitmap, val)           \
5480         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 74, 1, val)
5481 #define WMI_GET_P2P6E_SUPPORT(var, feature_bitmap)          \
5482         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 75, 1)
5483 #define WMI_SET_P2P6E_SUPPORT(feature_bitmap, val)          \
5484         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 75, 1, val)
5485 #define WMI_GET_TDLS_OFFCHAN_SUPPORT(var, feature_bitmap)   \
5486         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 76, 1)
5487 #define WMI_SET_TDLS_OFFCHAN_SUPPORT(feature_bitmap, val)   \
5488         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 76, 1, val)
5489 #define WMI_GET_TDLS_CAP_ENHANCE(var, feature_bitmap)       \
5490         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 77, 1)
5491 #define WMI_SET_TDLS_CAP_ENHANCE(feature_bitmap, val)       \
5492         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 77, 1, val)
5493 #define WMI_GET_MAX_TDLS_PEERS_SUPPORT(var, feature_bitmap) \
5494         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 78, 4)
5495 #define WMI_SET_MAX_TDLS_PEERS_SUPPORT(feature_bitmap, val) \
5496         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 78, 4, val)
5497 #define WMI_GET_STA_DUAL_P2P_SUPPORT(var, feature_bitmap)   \
5498         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 82, 1)
5499 #define WMI_SET_STA_DUAL_P2P_SUPPORT(feature_bitmap, val)   \
5500         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 82, 1, val)
5501 
5502 /* Big data feature supported info */
5503 #define WMI_GET_PEER_BIGDATA_GETBSSINFO_API_SUPPORT(var, feature_bitmap)            \
5504         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 83, 1)
5505 #define WMI_SET_PEER_BIGDATA_GETBSSINFO_API_SUPPORT(feature_bitmap, val)            \
5506         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 83, 1, val)
5507 #define WMI_GET_PEER_BIGDATA_GETASSOCREJECTINFO_API_SUPPORT(var, feature_bitmap)    \
5508         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 84, 1)
5509 #define WMI_SET_PEER_BIGDATA_GETASSOCREJECTINFO_API_SUPPORT(feature_bitmap, val)    \
5510         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 84, 1, val)
5511 #define WMI_GET_PEER_BIGDATA_GETSTAINFO_API_SUPPORT(var, feature_bitmap)            \
5512         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 85, 1)
5513 #define WMI_SET_PEER_BIGDATA_GETSTAINFO_API_SUPPORT(feature_bitmap, val)            \
5514         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 85, 1, val)
5515 
5516 /* Feature set requirement supported version info */
5517 #define WMI_GET_FEATURE_SET_VERSION(var, feature_bitmap)                 \
5518         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 86, 16)
5519 #define WMI_SET_FEATURE_SET_VERSION(feature_bitmap, val)                 \
5520         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 86, 16, val)
5521 
5522 /*
5523  * enum WMI_NUM_ANTENNAS are possible values for number of antennas supported bitfield.
5524  * Bitfield value 0 means invalid, 1 means SISO, 2 means MIMO, and values 3+ are reserved.
5525  */
5526 #define WMI_GET_NUM_ANTENNAS(var, feature_bitmap)   \
5527         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 102, 4)
5528 #define WMI_SET_NUM_ANTENNAS(feature_bitmap, val)   \
5529         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 102, 4, val)
5530 
5531 /* enum WMI_HOST_BAND_CAP are possible values for below bitfield */
5532 #define WMI_GET_HOST_BAND_CAP(var, feature_bitmap)   \
5533         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 106, 6)
5534 #define WMI_SET_HOST_BAND_CAP(feature_bitmap, val)   \
5535         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 106, 6, val)
5536 
5537 #define WMI_GET_STA_DUMP_SUPPORT(var, feature_bitmap)   \
5538         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 112, 1)
5539 #define WMI_SET_STA_DUMP_SUPPORT(feature_bitmap, val)   \
5540         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 112, 1, val)
5541 
5542 /* Peer protocol features supported info (contd) */
5543 #define WMI_GET_STA_P2P_SUPPORT(var, feature_bitmap)   \
5544         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 113, 1)
5545 #define WMI_SET_STA_P2P_SUPPORT(feature_bitmap, val)   \
5546         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 113, 1, val)
5547 #define WMI_GET_STA_SAP_SUPPORT(var, feature_bitmap)   \
5548         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 114, 1)
5549 #define WMI_SET_STA_SAP_SUPPORT(feature_bitmap, val)   \
5550         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 114, 1, val)
5551 #define WMI_GET_STA_NAN_SUPPORT(var, feature_bitmap)   \
5552         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 115, 1)
5553 #define WMI_SET_STA_NAN_SUPPORT(feature_bitmap, val)   \
5554         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 115, 1, val)
5555 #define WMI_GET_STA_TDLS_SUPPORT(var, feature_bitmap)   \
5556         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 116, 1)
5557 #define WMI_SET_STA_TDLS_SUPPORT(feature_bitmap, val)   \
5558         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 116, 1, val)
5559 /* Reserving 16 bits for accomodating other 2 port concurrencies later */
5560 
5561 #define WMI_GET_STA_SAP_P2P_SUPPORT(var, feature_bitmap)   \
5562         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 133, 1)
5563 #define WMI_SET_STA_SAP_P2P_SUPPORT(feature_bitmap, val)   \
5564         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 133, 1, val)
5565 #define WMI_GET_STA_SAP_NAN_SUPPORT(var, feature_bitmap)   \
5566         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 134, 1)
5567 #define WMI_SET_STA_SAP_NAN_SUPPORT(feature_bitmap, val)   \
5568         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 134, 1, val)
5569 #define WMI_GET_STA_P2P_NAN_SUPPORT(var, feature_bitmap)   \
5570         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 135, 1)
5571 #define WMI_SET_STA_P2P_NAN_SUPPORT(feature_bitmap, val)   \
5572         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 135, 1, val)
5573 #define WMI_GET_STA_P2P_TDLS_SUPPORT(var, feature_bitmap)   \
5574         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 136, 1)
5575 #define WMI_SET_STA_P2P_TDLS_SUPPORT(feature_bitmap, val)   \
5576         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 136, 1, val)
5577 #define WMI_GET_STA_SAP_TDLS_SUPPORT(var, feature_bitmap)   \
5578         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 137, 1)
5579 #define WMI_SET_STA_SAP_TDLS_SUPPORT(feature_bitmap, val)   \
5580         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 137, 1, val)
5581 #define WMI_GET_STA_NAN_TDLS_SUPPORT(var, feature_bitmap)   \
5582         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 138, 1)
5583 #define WMI_SET_STA_NAN_TDLS_SUPPORT(feature_bitmap, val)   \
5584         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 138, 1, val)
5585 /* Reserving 16 bits for accomodating other 3 port concurrencies later */
5586 
5587 #define WMI_GET_STA_SAP_P2P_TDLS_SUPPORT(var, feature_bitmap)   \
5588         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 155, 1)
5589 #define WMI_SET_STA_SAP_P2P_TDLS_SUPPORT(feature_bitmap, val)   \
5590         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 155, 1, val)
5591 #define WMI_GET_STA_SAP_NAN_TDLS_SUPPORT(var, feature_bitmap)   \
5592         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 156, 1)
5593 #define WMI_SET_STA_SAP_NAN_TDLS_SUPPORT(feature_bitmap, val)   \
5594         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 156, 1, val)
5595 #define WMI_GET_STA_P2P_P2P_TDLS_SUPPORT(var, feature_bitmap)   \
5596         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 157, 1)
5597 #define WMI_SET_STA_P2P_P2P_TDLS_SUPPORT(feature_bitmap, val)   \
5598         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 157, 1, val)
5599 #define WMI_GET_STA_P2P_NAN_TDLS_SUPPORT(var, feature_bitmap)   \
5600         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 158, 1)
5601 #define WMI_SET_STA_P2P_NAN_TDLS_SUPPORT(feature_bitmap, val)   \
5602         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 158, 1, val)
5603 
5604 /*
5605  * Specify how many A_UINT32 words are needed to hold the feature bitmap flags.
5606  * This value may change over time.
5607  * It is not directly used in any WMI message definition.
5608  * It is provided simply as a convenience for the feature_set_bitmap sender to
5609  * know how many 32-bit words to allocate for the bitmap.
5610  */
5611 #define WMI_FEATURE_SET_BITMAP_ARRAY_LEN32 6
5612 
5613 /**
5614  * TLV for channel list
5615  */
5616 typedef struct {
5617     /** WMI_CHAN_LIST_TAG */
5618     A_UINT32 tag;
5619     /** # of channels to scan */
5620     A_UINT32 num_chan;
5621     /** channels in Mhz */
5622     WMI_VAR_LEN_ARRAY1(A_UINT32, channel_list);
5623 } wmi_chan_list;
5624 
5625 /**
5626  * TLV for bssid list
5627  */
5628 typedef struct {
5629     /** WMI_BSSID_LIST_TAG */
5630     A_UINT32 tag;
5631     /** number of bssids   */
5632     A_UINT32 num_bssid;
5633     /** bssid list         */
5634     WMI_VAR_LEN_ARRAY1(wmi_mac_addr, bssid_list);
5635 } wmi_bssid_list;
5636 
5637 /**
5638  * TLV for  ie data.
5639  */
5640 typedef struct {
5641     /** WMI_IE_TAG */
5642     A_UINT32 tag;
5643     /** number of bytes in ie data   */
5644     A_UINT32 ie_len;
5645     /** ie data array  (ie_len adjusted to  number of words  (ie_len + 4)/4)  */
5646     WMI_VAR_LEN_ARRAY1(A_UINT32, ie_data);
5647 } wmi_ie_data;
5648 
5649 /**
5650  * TLV used for length/buffer
5651  */
5652 typedef struct {
5653     A_UINT32 tlv_header;    /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tlv_buf_len_param */
5654     A_UINT32 buf_len;       /** Length of buf */
5655     /**
5656      * Following this structure is the TLV byte stream of buf of length buf_len:
5657      * A_UINT8 buf[];
5658      *
5659      */
5660 } wmi_tlv_buf_len_param;
5661 
5662 /**
5663  * TLV used for specifying the dimensions of a multi-dimensional array
5664  * that has been stored in a flat buffer
5665  */
5666 typedef struct {
5667     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tlv_arrays_len_param */
5668     /**
5669      * d1_len, d2_len, d3_len, and d4_len are the lengths of each dimension
5670      * for a multi-dimensional array.
5671      * If the length of outer dimension is not 1, the inner dimension
5672      * shouldn't be 1.
5673      * If the multi-dimensional array has less than 4 dimensions, the outer
5674      * dimensions' lengths should be 1.  For example, a buf[3][4] array
5675      * would have d1_len = 4, d2_len = 3, d3_len = 1, d4_len = 1.
5676      * The outermost dimension of the array can be inferred from the array
5677      * length; thus, this struct supports up to 5-D arrays.  For a 5-D array,
5678      * the outermost (5th) dimension would be
5679      *     array length / (d1_len * d2_len * d3_len * d4_len)
5680      *
5681      * For security (to ensure no out-of-bounds memory access),
5682      * the receiver shall validate that the product of all dimensions
5683      * is equal to (or less than) the array length.
5684      */
5685     A_UINT32 d1_len;  /* the length of 1st (innermost) dimension array */
5686     A_UINT32 d2_len;  /* the length of 2nd dimension array */
5687     A_UINT32 d3_len;  /* the length of 3rd dimension array */
5688     A_UINT32 d4_len;  /* the length of 4th dimension array */
5689     /**
5690      * Following this structure is the TLV multi-dimension array buffer:
5691      * <type> buf[L1*L2*L3*L4];
5692      * where, L1, L2, L3, and L4 are the values of
5693      * d1_len, d2_len, d3_len and d4_len.
5694      * To access the 4-D element a[i][j][k][l], the buf[] array would be
5695      * indexed as buf[i*L3*L2*L1 + j*L2*L1 + k*L1 + l].
5696      */
5697 } wmi_tlv_arrays_len_param;
5698 
5699 typedef struct {
5700     /** Len of the SSID */
5701     A_UINT32 ssid_len;
5702     /** SSID */
5703     A_UINT32 ssid[8];
5704 } wmi_ssid;
5705 
5706 typedef struct {
5707     /** WMI_SSID_LIST_TAG */
5708     A_UINT32 tag;
5709     A_UINT32 num_ssids;
5710     WMI_VAR_LEN_ARRAY1(wmi_ssid, ssids);
5711 } wmi_ssid_list;
5712 
5713 typedef struct {
5714     /** WMI_SCAN_START_OFFSET_TAG */
5715     A_UINT32     tag;
5716     /** Number of start TSF offsets */
5717     A_UINT32     num_offset;
5718     /** Array of start TSF offsets provided in milliseconds */
5719     WMI_VAR_LEN_ARRAY1(A_UINT32, start_tsf_offset);
5720 } wmi_scan_start_offset;
5721 
5722 /**
5723  * WLAN_SCAN_CHAN_MODE Macros defined for A_UINT8 phymode_list[]
5724  */
5725 /** enum WLAN_PHY_MODE _mode starts from 0, but the WMI message requires
5726  * 0 to be used to represent unspecified / don't care / default values.
5727  * Therefore, WMI phy mode = WLAN phy mode + 1.
5728  */
5729 /** If the received WMI phy mode is 0 then it is ignored by the FW,
5730  * and the FW will use any mode as long as the frequency matches.
5731  */
5732 /** The number of phy_mode's (BW+mode) passed in the TLV phymode_list[] must
5733  * be equal to num_chan.  (Unless the host does not specify phymode_list values
5734  * at all, in which case the number of phymode_list elements will be zero.)
5735  * The indexing of the phymode_list[] array corresponds to same index of
5736  * the chan_list[] array.
5737  */
5738 #define WMI_SCAN_CHAN_SET_MODE(_c) ((_c) + 1)
5739 #define WMI_SCAN_CHAN_GET_MODE(_c) ((_c) - 1)
5740 #define WMI_SCAN_CHAN_MODE_IS_SET(_c) (_c)
5741 
5742 typedef struct {
5743     /*
5744      * freq unit: MHz (upper 16bits -- value)
5745      * flags (lower 16bits -- bitfield): valid for the freq short ssid
5746      *     The flags bitfield contains a bitmask of WMI_SCAN_HINT_FLAG_ values.
5747      */
5748     A_UINT32 freq_flags;
5749     /* per spec, only 4 bytes*/
5750     A_UINT32 short_ssid;
5751 } wmi_hint_freq_short_ssid;
5752 
5753 /** following bssid mac address same as wmi_mac_addr
5754  *  one example: freq -- 5980(0x175c), flags -- 0x1, mac -- 00:03:7f:12:34:56
5755  *  freq_flags     will be: 0x175c0001
5756  *  macaddr31to00 will be: 0x127f0300
5757  *  macaddr47to32 will be: 0x00005634
5758  */
5759 typedef struct {
5760     /*
5761      * freq unit: MHz (upper 16bits -- value)
5762      * flags (lower 16bits -- bitfield): valid for the freq bssid
5763      *     The flags bitfield contains a bitmask of WMI_SCAN_HINT_FLAG_ values.
5764      */
5765     A_UINT32 freq_flags;
5766     /* legacy bssid addr, use same macro to convert: WMI_MAC_ADDR_TO_CHAR_ARRAY, WMI_CHAR_ARRAY_TO_MAC_ADDR */
5767     wmi_mac_addr bssid;
5768 } wmi_hint_freq_bssid;
5769 
5770 /** macro to get freq and corresponding flags from wmi_hint_freq_short_ssid */
5771 #define WMI_GET_FREQ_FROM_HINT_FREQ_SHORT_SSID(pwmi_hint_freq_short_ssid_addr) ((((pwmi_hint_freq_short_ssid_addr)->freq_flags) >> 16) & 0xffff)
5772 #define WMI_GET_FLAGS_FROM_HINT_FREQ_SHORT_SSID(pwmi_hint_freq_short_ssid_addr) (((pwmi_hint_freq_short_ssid_addr)->freq_flags) & 0xffff)
5773 
5774 /** macro to set freq and corresponding flags in wmi_hint_freq_short_ssid */
5775 #define WMI_SET_FREQ_IN_HINT_FREQ_SHORT_SSID(freq, pwmi_hint_freq_short_ssid_addr) (((pwmi_hint_freq_short_ssid_addr)->freq_flags) |= ((freq) << 16))
5776 #define WMI_SET_FLAGS_IN_HINT_FREQ_SHORT_SSID(flags, pwmi_hint_freq_short_ssid_addr) (((pwmi_hint_freq_short_ssid_addr)->freq_flags) |= (flags))
5777 
5778 /** macro to get freq and corresponding flags from wmi_hint_freq_bssid */
5779 #define WMI_GET_FREQ_FROM_HINT_FREQ_BSSID(pwmi_hint_freq_bssid_addr) ((((pwmi_hint_freq_bssid_addr)->freq_flags) >> 16) & 0xffff)
5780 #define WMI_GET_FLAGS_FROM_HINT_FREQ_BSSID(pwmi_hint_freq_bssid_addr) (((pwmi_hint_freq_bssid_addr)->freq_flags) & 0xffff)
5781 
5782 /** macro to set freq and corresponding flags in wmi_hint_freq_bssid */
5783 #define WMI_SET_FREQ_IN_HINT_FREQ_BSSID(freq, pwmi_hint_freq_bssid_addr) (((pwmi_hint_freq_bssid_addr)->freq_flags) |= ((freq) << 16))
5784 #define WMI_SET_FLAGS_IN_HINT_FREQ_BSSID(flags, pwmi_hint_freq_bssid_addr) (((pwmi_hint_freq_bssid_addr)->freq_flags) |= (flags))
5785 
5786 /** other macro for 6 GHZ, TU (time unit), 20TU normally it is 20ms */
5787 #define MAX_NUM_20TU_EACH_CH      6
5788 #define MAX_NUM_S_SSID_EACH_20TU  1
5789 #define MAX_NUM_BSSID_EACH_20TU   3
5790 
5791 /* prefix used by scan requestor ids on the host */
5792 #define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
5793 /* prefix used by scan request ids generated on the host */
5794 /* host cycles through the lower 12 bits to generate ids */
5795 #define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
5796 
5797 #define WLAN_SCAN_PARAMS_MAX_SSID    16
5798 #define WLAN_SCAN_PARAMS_MAX_BSSID   4
5799 #define WLAN_SCAN_PARAMS_MAX_IE_LEN  512
5800 
5801 /* NOTE: This constant cannot be changed without breaking WMI compatibility */
5802 #define WMI_IE_BITMAP_SIZE             8
5803 
5804 #define WMI_SCAN_MLD_PARAM_MLD_ID_GET(mld_param) WMI_GET_BITS(mld_param, 0, 8)
5805 #define WMI_SCAN_MLD_PARAM_MLD_ID_SET(mld_param, val) WMI_SET_BITS(mld_param, 0, 8, val)
5806 
5807 typedef struct {
5808     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
5809     /** Scan ID (lower 16 bits) MSB 4 bits is used to identify scan client based on enum WMI_SCAN_CLIENT_ID */
5810     A_UINT32 scan_id;
5811     /** Scan requestor ID (lower 16 bits) is used by scan client to classify the scan source, reason, ...etc */
5812     A_UINT32 scan_req_id;
5813     /** VDEV id(interface) that is requesting scan */
5814     A_UINT32 vdev_id;
5815     /** Scan Priority, input to scan scheduler */
5816     A_UINT32 scan_priority;
5817     /** Scan events subscription */
5818     A_UINT32 notify_scan_events;
5819     /** dwell time in msec on active channels */
5820     A_UINT32 dwell_time_active;
5821     /** dwell time in msec on passive channels */
5822     A_UINT32 dwell_time_passive;
5823     /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
5824     A_UINT32 min_rest_time;
5825     /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
5826     /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
5827      *  will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
5828      *  switch to off channel. if there is activity the scanner will let the radio on the bss channel
5829      *  until max_rest_time expires.at max_rest_time scanner will switch to off channel
5830      *  irrespective of activity. activity is determined by the idle_time parameter.
5831      */
5832     A_UINT32 max_rest_time;
5833     /** time before sending next set of probe requests.
5834      *   The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
5835      *   The number of probe requests specified depends on the ssid_list and bssid_list
5836      */
5837     A_UINT32 repeat_probe_time;
5838     /** time in msec between 2 consecutive probe requests with in a set. */
5839     A_UINT32 probe_spacing_time;
5840     /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity  */
5841     A_UINT32 idle_time;
5842     /** maximum time in msec allowed for scan  */
5843     A_UINT32 max_scan_time;
5844     /** delay in msec before sending first probe request after switching to a channel */
5845     A_UINT32 probe_delay;
5846     /** Scan control flags */
5847     A_UINT32 scan_ctrl_flags;
5848     /** Burst duration time in msec*/
5849     A_UINT32 burst_duration;
5850 
5851     /** # if channels to scan. In the TLV channel_list[] */
5852     A_UINT32 num_chan;
5853     /** number of bssids. In the TLV bssid_list[] */
5854     A_UINT32 num_bssid;
5855     /** number of ssid. In the TLV ssid_list[] */
5856     A_UINT32 num_ssids;
5857     /** number of bytes in ie data. In the TLV ie_data[]. Max len is defined by WLAN_SCAN_PARAMS_MAX_IE_LEN */
5858     A_UINT32 ie_len;
5859     /** Max number of probes to be sent */
5860     A_UINT32 n_probes;
5861     /** MAC Address to use in Probe Req as SA **/
5862     wmi_mac_addr mac_addr;
5863     /** Mask on which MAC has to be randomized **/
5864     wmi_mac_addr mac_mask;
5865     /**  ie bitmap to use in probe req **/
5866     A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
5867     /** Number of vendor OUIs. In the TLV vendor_oui[] **/
5868     A_UINT32 num_vendor_oui;
5869     /** Scan control flags extended **/
5870     A_UINT32 scan_ctrl_flags_ext;
5871     /** dwell time in msec on active 2G channels, if it's not zero */
5872     A_UINT32 dwell_time_active_2g;
5873     /**
5874      * dwell time in msec when 6 GHz channel (PSC or non-PSC) is marked
5875      * as an active channel
5876      */
5877     A_UINT32 dwell_time_active_6ghz;
5878     /**
5879      * dwell time in msec when 6 GHz channel (PSC or non-PSC) is marked
5880      * as a passive channel
5881      */
5882     A_UINT32 dwell_time_passive_6ghz;
5883     /**
5884      * Offset time is in milliseconds per channel.
5885      */
5886     A_UINT32 scan_start_offset;
5887     /**
5888      * minimum dwell time in msec for 6 GHz channel
5889      * We'll listen for this time on the channel; if no beacon /
5890      * probe response / FILS frame are received during this time
5891      * we'll move to next channel.
5892      */
5893     A_UINT32 min_dwell_time_6ghz;
5894     /**
5895      * dwell time in msec for 6 GHz channel of spectral scan channel list
5896      */
5897     A_UINT32 dwell_time_spectral_ch;
5898     /**
5899      * B0-B7: mld id to be inserted in ML probe request
5900      * B8-B31: reserved
5901      */
5902     A_UINT32 mld_parameter;
5903 
5904 /**
5905  * TLV (tag length value) parameters follow the scan_cmd
5906  * structure. The TLV's are:
5907  *     channel_list:
5908  *         If FW supports WMI_SERVICE_SCAN_CONFIG_PER_CHANNEL,
5909  *             then channel_list may fill the upper 12 bits with channel flags,
5910  *             while using only the lower 20 bits for channel frequency.
5911  *             Check WMI_SCAN_CHANNEL_FLAG macros for the channel flags
5912  *         If FW doesn't support WMI_SERVICE_SCAN_CONFIG_PER_CHANNEL,
5913  *             then channel_list only holds the frequency value
5914  *         Use WMI_SCAN_CHANNEL_FREQ_MASK & WMI_SCAN_CHANNEL_FLAGS_MASK
5915  *     A_UINT32 channel_list[num_chan]; // in MHz
5916  *     wmi_ssid ssid_list[num_ssids];
5917  *     wmi_mac_addr bssid_list[num_bssid];
5918  *     A_UINT8 ie_data[ie_len];
5919  *     wmi_vendor_oui vendor_oui[num_vendor_oui];
5920  *     A_UINT8 phymode_list[0 or num_chan]; // see WMI_SCAN_CHAN_MODE macros
5921  *     wmi_hint_freq_short_ssid hint_freq_short_ssid[num]; // the num can be calculated by TLV len
5922  *     wmi_hint_freq_bssid hint_freq_bssid[num]; // the num can be calculated by TLV len
5923  *     A_UINT32 spectral_chan_list[num]; // in MHz, the num can be calculated by TLV len
5924  *     *** NOTE:
5925  *     *** Use caution when using further TLVs, in case the additional
5926  *     *** TLVs cause the message size to exceed the of the buffer to
5927  *     *** hold the message.
5928  */
5929 } wmi_start_scan_cmd_fixed_param;
5930 
5931 /**
5932  * scan control flags.
5933  */
5934 
5935 /** passively scan all channels including active channels */
5936 #define WMI_SCAN_FLAG_PASSIVE        0x1
5937 /** add wild card ssid probe request even though ssid_list is specified. */
5938 #define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2
5939 /** add cck rates to rates/xrate ie for the generated probe request */
5940 #define WMI_SCAN_ADD_CCK_RATES       0x4
5941 /** add ofdm rates to rates/xrate ie for the generated probe request */
5942 #define WMI_SCAN_ADD_OFDM_RATES      0x8
5943 /** To enable indication of Chan load and Noise floor to host */
5944 #define WMI_SCAN_CHAN_STAT_EVENT     0x10
5945 /** Filter Probe request frames  */
5946 #define WMI_SCAN_FILTER_PROBE_REQ    0x20
5947 /**When set, not to scan DFS channels*/
5948 #define WMI_SCAN_BYPASS_DFS_CHN      0x40
5949 /**When set, certain errors are ignored and scan continues.
5950  * Different FW scan engine may use its own logic to decide what errors to ignore*/
5951 #define WMI_SCAN_CONTINUE_ON_ERROR   0x80
5952 /** Enable promiscuous mode for CCXv4 */
5953 #define WMI_SCAN_FILTER_PROMISCOUS   0x100
5954 /** allow to send probe req on DFS channel */
5955 #define WMI_SCAN_FLAG_FORCE_ACTIVE_ON_DFS 0x200
5956 /** add TPC content in probe req frame */
5957 #define WMI_SCAN_ADD_TPC_IE_IN_PROBE_REQ  0x400
5958 /** add DS content in probe req frame */
5959 #define WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ   0x800
5960 /** use random mac address for TA for probe request frame and add
5961  * oui specified by WMI_SCAN_PROB_REQ_OUI_CMDID to the probe req frame.
5962  * if oui is not set by WMI_SCAN_PROB_REQ_OUI_CMDID  then the flag is ignored*/
5963 #define WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ   0x1000
5964 /** allow mgmt transmission during off channel scan */
5965 #define WMI_SCAN_OFFCHAN_MGMT_TX    0x2000
5966 /** allow data transmission during off channel scan */
5967 #define WMI_SCAN_OFFCHAN_DATA_TX    0x4000
5968 /** allow capture ppdu with phy errors */
5969 #define WMI_SCAN_CAPTURE_PHY_ERROR  0x8000
5970 /** always do passive scan on passive channels */
5971 #define WMI_SCAN_FLAG_STRICT_PASSIVE_ON_PCHN 0x10000
5972 /** set HALF (10MHz) rate support */
5973 #define WMI_SCAN_FLAG_HALF_RATE_SUPPORT      0x20000
5974 /** set Quarter (5MHz) rate support */
5975 #define WMI_SCAN_FLAG_QUARTER_RATE_SUPPORT   0x40000
5976 #define WMI_SCAN_RANDOM_SEQ_NO_IN_PROBE_REQ 0x80000
5977 #define WMI_SCAN_ENABLE_IE_WHTELIST_IN_PROBE_REQ 0x100000
5978 /** pause home channel when scan channel is same as home channel */
5979 #define WMI_SCAN_FLAG_PAUSE_HOME_CHANNEL            0x200000
5980 /**
5981  * report CCA busy for each possible 20Mhz subbands of the wideband scan channel
5982  */
5983 #define WMI_SCAN_FLAG_REPORT_CCA_BUSY_FOREACH_20MHZ 0x400000
5984 
5985 /** for adaptive scan mode using 3 bits (21 - 23 bits) */
5986 #define WMI_SCAN_DWELL_MODE_MASK 0x00E00000
5987 #define WMI_SCAN_DWELL_MODE_SHIFT        21
5988 
5989 typedef enum {
5990     WMI_SCAN_DWELL_MODE_DEFAULT      = 0,
5991     WMI_SCAN_DWELL_MODE_CONSERVATIVE = 1,
5992     WMI_SCAN_DWELL_MODE_MODERATE     = 2,
5993     WMI_SCAN_DWELL_MODE_AGGRESSIVE   = 3,
5994     WMI_SCAN_DWELL_MODE_STATIC       = 4,
5995 } WMI_SCAN_DWELL_MODE;
5996 
5997 #define WMI_SCAN_SET_DWELL_MODE(flag, mode) \
5998     do { \
5999         (flag) |= (((mode) << WMI_SCAN_DWELL_MODE_SHIFT) & \
6000             WMI_SCAN_DWELL_MODE_MASK); \
6001     } while (0)
6002 
6003 #define WMI_SCAN_GET_DWELL_MODE(flag) \
6004     (((flag) & WMI_SCAN_DWELL_MODE_MASK) >> WMI_SCAN_DWELL_MODE_SHIFT)
6005 
6006 /** WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */
6007 #define WMI_SCAN_CLASS_MASK 0xFF000000
6008 
6009 /*
6010  * Masks identifying types/ID of scans
6011  * Scan_Stop macros should be the same value as below defined in UMAC
6012  * #define IEEE80211_SPECIFIC_SCAN       0x00000000
6013  * #define IEEE80211_VAP_SCAN            0x01000000
6014  * #define IEEE80211_ALL_SCANS           0x04000000
6015  */
6016 /* WMI_SCAN_STOP_ONE:
6017  * Stop one scan which matches with scan_id provided in scan stop command.
6018  */
6019 #define WMI_SCAN_STOP_ONE         0x00000000
6020 /* WMI_SCN_STOP_VAP_ALL:
6021  * Stop all scans (host scans and FW internal scans) on provided vdev.
6022  */
6023 #define WMI_SCN_STOP_VAP_ALL      0x01000000
6024 /* WMI_SCN_STOP_HOST_VAP_ALL:
6025  * Stop all host scans on provided vdev.
6026  */
6027 #define WMI_SCN_STOP_HOST_VAP_ALL 0x02000000
6028 /* WMI_SCAN_STOP_ALL:
6029  * Stop all scans (host scans and FW internal scans) on all vdevs.
6030  */
6031 #define WMI_SCAN_STOP_ALL         0x04000000
6032 
6033 /** extended Scan ctrl flags **/
6034 #define WMI_SCAN_FLAG_EXT_DBS_SCAN_POLICY_MASK 0x00000003 /* Bit 0-1 reserved for DBS scan selection policy.*/
6035 
6036 #define WMI_SCAN_DBS_POLICY_DEFAULT             0x0 /** Select duty cycle if configured, else fall back to whatever
6037                                                         policy scan manager computes */
6038 #define WMI_SCAN_DBS_POLICY_FORCE_NONDBS        0x1 /** Force to select Non-DBS scan */
6039 #define WMI_SCAN_DBS_POLICY_IGNORE_DUTY         0x2 /** Ignore duty cycle even if configured and fall back to whatever
6040                                                         policy scan manager computes*/
6041 #define WMI_SCAN_DBS_POLICY_RESERVED            0x3
6042 #define WMI_SCAN_DBS_POLICY_MAX                 0x3
6043 
6044 /* Enable Reception of Public Action frame with this flag */
6045 #define WMI_SCAN_FLAG_EXT_FILTER_PUBLIC_ACTION_FRAME  0x00000004
6046 
6047 /* Indicate to scan all PSC channel */
6048 #define WMI_SCAN_FLAG_EXT_6GHZ_SCAN_ALL_PSC_CH        0x00000008
6049 
6050 /* Indicate to scan all NON-PSC channel */
6051 #define WMI_SCAN_FLAG_EXT_6GHZ_SCAN_ALL_NON_PSC_CH    0x00000010
6052 
6053 /* Indicate to save scan result matching hint from scan client */
6054 #define WMI_SCAN_FLAG_EXT_6GHZ_MATCH_HINT             0x00000020
6055 
6056 /* Skip any ch on which no any RNR had been received */
6057 #define WMI_SCAN_FLAG_EXT_6GHZ_SKIP_NON_RNR_CH        0x00000040
6058 
6059 /* Indicate client hint req is high priority than fw rnr or FILS disc */
6060 #define WMI_SCAN_FLAG_EXT_6GHZ_CLIENT_HIGH_PRIORITY   0x00000080
6061 
6062 /* Force all 6 GHz scan channels to active channel */
6063 #define WMI_SCAN_FLAG_EXT_6GHZ_FORCE_CHAN_ACTIVE      0x00000100
6064 
6065 /* Force broadcast address in RA even though specified bssid */
6066 #define WMI_SCAN_FLAG_EXT_FORCE_BRCAST_RA             0x00000200
6067 
6068 /* Extend 6 GHz channel measure time */
6069 #define WMI_SCAN_FLAG_EXT_6GHZ_EXTEND_MEASURE_TIME    0x00000400
6070 
6071 /**
6072  * Currently passive scan has higher priority than beacon and
6073  * beacon miss would happen irrespective of dwell time.
6074  * Below flag ensures there would not be beacon miss if the dwell
6075  * time is lesser than beacon interval - channel switch time combined.
6076  * For dwell time greater than beacon interval, bmiss is expected.
6077  */
6078 #define WMI_SCAN_FLAG_EXT_PASSIVE_SCAN_START_TIME_ENHANCE   0x00000800
6079 
6080 /* Force unicast address in RA */
6081 #define WMI_SCAN_FLAG_EXT_FORCE_UNICAST_RA            0x00001000
6082 
6083 /**
6084  * Indicate to add 10 Mhz offset to spectral scan center frequencies
6085  * sent by Host when checking against support channel list in FW
6086  */
6087 #define WMI_SCAN_FLAG_EXT_SPECTRAL_CFREQ_PLUS_10MHZ_IN_SUPP_CH_LIST 0x00002000
6088 
6089 /* Include MLO IE in Probe req */
6090 #define WMI_SCAN_FLAG_EXT_INCL_MLIE_PRB_REQ           0x00004000
6091 
6092 #define WMI_SCAN_FLAG_EXT_LOW_LATENCY_SCAN    0x00008000
6093 #define WMI_SCAN_FLAG_EXT_RELIABLE_SCAN       0x00010000
6094 #define WMI_SCAN_FLAG_EXT_FAST_SCAN           0x00020000
6095 #define WMI_SCAN_FLAG_EXT_LOW_POWER_SCAN      0x00040000
6096 #define WMI_SCAN_FLAG_EXT_STOP_IF_BSSID_FOUND 0x00080000
6097 
6098 
6099 /**
6100  * new 6 GHz flags per chan (short ssid or bssid) in struct
6101  * wmi_hint_freq_short_ssid or wmi_hint_freq_bssid
6102  */
6103 /* Indicate not to send probe req for short_ssid or bssid on that channel */
6104 #define WMI_SCAN_HINT_FLAG_SKIP_TX_PROBE_REQ    0x00000001
6105 
6106 /* Force channel in WMI hint to active channel */
6107 #define WMI_SCAN_HINT_FLAG_FORCE_CHAN_ACTIVE    0x00000002
6108 
6109 /* Combine short SSID with legacy bssid list */
6110 #define WMI_SCAN_HINT_FLAG_COMBINE_BSSID_LIST   0x00000004
6111 
6112 
6113 #define WMI_SCAN_CHANNEL_FREQ_MASK  0x000FFFFF
6114 #define WMI_SCAN_CHANNEL_FLAGS_MASK 0xFFF00000
6115 
6116 /**
6117  * Per channel configuration flags
6118  */
6119 
6120 /**
6121  * WMI_SCAN_CHANNEL_FLAG_SCAN_ONLY_IF_RNR_FOUND:
6122  *     If this flag is set, then scan only if the corresponding channel
6123  *     is found via RNR IE during 2g/5g scan.
6124  *     If this flag is not set, then FW always scans the channel
6125  *     irrespective of RNR and also FW ignores
6126  *     WMI_SCAN_FLAG_EXT_6GHZ_SKIP_NON_RNR_CH flag
6127  */
6128 #define WMI_SCAN_CHANNEL_FLAG_SCAN_ONLY_IF_RNR_FOUND 0x001
6129 
6130 typedef struct {
6131     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
6132     /** requestor requesting cancel  */
6133     A_UINT32 requestor;
6134     /** Scan ID */
6135     A_UINT32 scan_id;
6136     /**
6137      * Req Type
6138      * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
6139      * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id (on a specific pdev in DBDC)
6140      * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
6141      * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine (on a specific pdev in DBDC)
6142      */
6143     A_UINT32 req_type;
6144     /**
6145      * vDev ID
6146      * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
6147      */
6148     A_UINT32 vdev_id;
6149     /** pdev_id for identifying the MAC
6150      * See macros starting with WMI_PDEV_ID_ for values.
6151      * In non-DBDC case host should set it to 0
6152      */
6153     A_UINT32 pdev_id;
6154 } wmi_stop_scan_cmd_fixed_param;
6155 
6156 
6157 #define MAX_NUM_CHAN_PER_WMI_CMD     58    /* each WMI cmd can hold 58 channel entries at most */
6158 #define APPEND_TO_EXISTING_CHAN_LIST 1
6159 #define CHANNEL_MAX_BANDWIDTH_VALID  2
6160 
6161 typedef struct {
6162     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_chan_list_cmd_fixed_param */
6163     A_UINT32 num_scan_chans; /** no of elements in chan_info[] */
6164     A_UINT32 flags; /* Flags used to control the behavior of channel list update on target side */
6165     A_UINT32 pdev_id; /** pdev_id for identifying the MAC.  See macros starting with WMI_PDEV_ID_ for values. In non-DBDC case host should set it to 0. */
6166 /** Followed by the variable length TLV chan_info:
6167  *  wmi_channel chan_info[] */
6168 } wmi_scan_chan_list_cmd_fixed_param;
6169 
6170 /*
6171  * Priority numbers must be sequential, starting with 0.
6172  */
6173 /* NOTE: WLAN SCAN_PRIORITY_COUNT can't be changed without breaking the compatibility */
6174 typedef enum {
6175     WMI_SCAN_PRIORITY_VERY_LOW = 0,
6176     WMI_SCAN_PRIORITY_LOW,
6177     WMI_SCAN_PRIORITY_MEDIUM,
6178     WMI_SCAN_PRIORITY_HIGH,
6179     WMI_SCAN_PRIORITY_VERY_HIGH,
6180 
6181     WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */
6182 } wmi_scan_priority;
6183 
6184 /* Five Levels for Requested Priority */
6185 /* VERY_LOW LOW  MEDIUM   HIGH  VERY_HIGH */
6186 typedef A_UINT32 WLAN_PRIORITY_MAPPING[WMI_SCAN_PRIORITY_COUNT];
6187 
6188 /**
6189  * to keep align with UMAC implementation, we pass only vdev_type but not vdev_subtype when we overwrite an entry for a specific vdev_subtype
6190  * ex. if we need overwrite P2P Client prority entry, we will overwrite the whole table for WLAN_M_STA
6191  * we will generate the new WLAN_M_STA table with modified P2P Client Entry but keep STA entry intact
6192  */
6193 typedef struct {
6194     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_sch_priority_table_cmd_fixed_param */
6195     /**
6196      * used as an index to find the proper table for a specific vdev type in default_scan_priority_mapping_table
6197      * vdev_type should be one of enum in WLAN_OPMODE which inculdes WLAN_M_IBSS, WLAN_M_STA, WLAN_M_AP and WLAN_M_MONITOR currently
6198      */
6199     A_UINT32 vdev_type;
6200     /**
6201      * number of rows in mapping_table for a specific vdev
6202      * for WLAN_M_STA type, there are 3 entries in the table (refer to default_scan_priority_mapping_table definition)
6203      */
6204     A_UINT32 number_rows;
6205     /**
6206      * pdev_id for identifying the MAC.  See macros starting with WMI_PDEV_ID_ for values.
6207      * In non-DBDC case host should set it to 0
6208      */
6209     A_UINT32 pdev_id;
6210 /**  mapping_table for a specific vdev follows this TLV
6211  *   WLAN_PRIORITY_MAPPING mapping_table[]; */
6212 } wmi_scan_sch_priority_table_cmd_fixed_param;
6213 
6214 /** update flags */
6215 #define WMI_SCAN_UPDATE_SCAN_PRIORITY           0x1
6216 #define WMI_SCAN_UPDATE_SCAN_MIN_REST_TIME      0x2
6217 #define WMI_SCAN_UPDATE_SCAN_MAX_REST_TIME      0x4
6218 
6219 typedef struct {
6220     A_UINT32 tlv_header;
6221     /** requestor requesting update scan request  */
6222     A_UINT32 requestor;
6223     /** Scan ID of the scan request that need to be update */
6224     A_UINT32 scan_id;
6225     /** update flags, indicating which of the following fields are valid and need to be updated*/
6226     A_UINT32 scan_update_flags;
6227     /** scan priority. Only valid if WMI_SCAN_UPDATE_SCAN_PRIORITY flag is set in scan_update_flag */
6228     A_UINT32 scan_priority;
6229     /** min rest time. Only valid if WMI_SCAN_UPDATE_MIN_REST_TIME flag is set in scan_update_flag */
6230     A_UINT32 min_rest_time;
6231     /** min rest time. Only valid if WMI_SCAN_UPDATE_MAX_REST_TIME flag is set in scan_update_flag */
6232     A_UINT32 max_rest_time;
6233     /** pdev_id for identifying the MAC.  See macros starting with WMI_PDEV_ID_ for values. In non-DBDC case host should set it to 0 */
6234     A_UINT32 pdev_id;
6235 } wmi_scan_update_request_cmd_fixed_param;
6236 
6237 #define WMI_SCAN_PROBE_OUI_SPOOFED_MAC_IN_PROBE_REQ 0x1
6238 #define WMI_SCAN_PROBE_OUI_RANDOM_SEQ_NO_IN_PROBE_REQ 0x2
6239 #define WMI_SCAN_PROBE_OUI_ENABLE_IE_WHITELIST_IN_PROBE_REQ 0x4
6240 
6241 typedef struct _wmi_vendor_oui {
6242     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vendor_oui */
6243     A_UINT32 oui_type_subtype; /** Vendor OUI type and subtype, lower 3 bytes is type and highest byte is subtype**/
6244 }wmi_vendor_oui;
6245 
6246 typedef struct {
6247     A_UINT32 tlv_header;
6248     /** oui to be used in probe request frame when  random mac addresss is
6249      * requested part of scan parameters. this is applied to both FW internal scans and
6250      * host initated scans. host can request for random mac address with
6251      * WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ flag.     */
6252     A_UINT32 prob_req_oui;
6253     A_UINT32 vdev_id;
6254     /** Control Flags **/
6255     A_UINT32 flags;
6256     /**  ie bitmap to use in probe req **/
6257     A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
6258     /** Number of vendor OUIs. In the TLV vendor_oui[] **/
6259     A_UINT32 num_vendor_oui;
6260     /** pdev_id for identifying the MAC.  See macros starting with WMI_PDEV_ID_ for values. In non-DBDC case host should set it to 0 */
6261     A_UINT32 pdev_id;
6262     /* Following this tlv, there comes an array of structure of type wmi_vendor_oui
6263  wmi_vendor_oui vendor_oui[];*/
6264 } wmi_scan_prob_req_oui_cmd_fixed_param;
6265 
6266 
6267 enum wmi_scan_event_type {
6268     WMI_SCAN_EVENT_STARTED = 0x1,
6269     WMI_SCAN_EVENT_COMPLETED = 0x2,
6270     WMI_SCAN_EVENT_BSS_CHANNEL = 0x4,
6271     WMI_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
6272     WMI_SCAN_EVENT_DEQUEUED = 0x10, /* scan request got dequeued */
6273     WMI_SCAN_EVENT_PREEMPTED = 0x20, /* preempted by other high priority scan */
6274     WMI_SCAN_EVENT_START_FAILED = 0x40, /* scan start failed */
6275     WMI_SCAN_EVENT_RESTARTED = 0x80, /* scan restarted */
6276     WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100,
6277     WMI_SCAN_EVENT_SUSPENDED = 0x200, /* scan request is suspended */
6278     WMI_SCAN_EVENT_RESUMED = 0x400,   /* scan request is resumed */
6279     WMI_SCAN_EVENT_MAX = 0x8000
6280 };
6281 
6282 enum wmi_scan_completion_reason {
6283     /** scan related events */
6284     WMI_SCAN_REASON_NONE = 0xFF,
6285     WMI_SCAN_REASON_COMPLETED = 0,
6286     WMI_SCAN_REASON_CANCELLED = 1,
6287     WMI_SCAN_REASON_PREEMPTED = 2,
6288     WMI_SCAN_REASON_TIMEDOUT = 3,
6289     WMI_SCAN_REASON_INTERNAL_FAILURE = 4, /* This reason indication failures when performaing scan */
6290     WMI_SCAN_REASON_SUSPENDED = 5,
6291     WMI_SCAN_REASON_DFS_VIOLATION = 6, /* Failure when tried to SCAN channel in NOL list */
6292     WMI_SCAN_REASON_MAX,
6293 };
6294 
6295 typedef struct {
6296     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_event_fixed_param */
6297     /** scan event (wmi_scan_event_type) */
6298     A_UINT32 event;
6299     /** status of the scan completion event */
6300     A_UINT32 reason;
6301     /** channel freq , only valid for FOREIGN channel event*/
6302     A_UINT32 channel_freq;
6303     /**id of the requestor whose scan is in progress */
6304     A_UINT32 requestor;
6305     /**id of the scan that is in progress */
6306     A_UINT32 scan_id;
6307     /**id of VDEV that requested the scan */
6308     A_UINT32 vdev_id;
6309     /** TSF Timestamp when the scan event (wmi_scan_event_type) is completed
6310      * In case of AP it is TSF of the AP vdev
6311      * In case of STA connected state this is the TSF of the AP
6312      * In case of STA not connected it will be the free running HW timer
6313      */
6314     A_UINT32 tsf_timestamp;
6315 } wmi_scan_event_fixed_param;
6316 
6317 /* WMI Diag event */
6318 typedef struct {
6319     A_UINT32 tlv_header; /* TLV tag and len; tag is WMITLV_TAG_STRUC_wmi_diag_event_fixed_param */
6320     A_UINT32 time_stamp; /* Reference timestamp. diag frame contains diff value */
6321     A_UINT32 count;   /* Number of diag frames added to current event */
6322     A_UINT32 dropped;
6323     /* followed by WMITLV_TAG_ARRAY_BYTE */
6324 } wmi_diag_event_fixed_param;
6325 
6326 #define WMI_11K_OFFLOAD_BITMAP_NEIGHBOR_REPORT_REQ  0x1
6327 
6328 typedef struct {
6329     A_UINT32 time_offset;                   /* positive offset in secs from the time 11k offload command has been received, 0xFFFFFFFF if offset is not valid */
6330     A_UINT32 low_rssi_offset;               /* positive offset in dB from current low RSSI roaming trigger to send neighbor req, 0xFFFFFFFF if offset is not valid */
6331     A_UINT32 bmiss_count_trigger;           /* value 1 is to send neighbor report at 1st BMISS, 0xFFFFFFFF if input is not valid */
6332     A_UINT32 per_threshold_offset;          /* percentage offset from the current per_threshold, 0xFFFFFFFF if input is not valid */
6333     A_UINT32 neighbor_report_cache_timeout; /* cache timeout in secs after which neighbor cache is not valid in FW, 0xFFFFFFFF if input is not valid */
6334     A_UINT32 max_neighbor_report_req_cap;   /* 0xFFFFFFFF if input is not valid, else positive number per every roam, these are the maximum number of
6335                                              * neighbor report requests that will be sent by FW after every roam */
6336     wmi_ssid ssid;                          /* ssid of current connected AP FW might choose to use this SSID in the neighbor report req frame if it is
6337                                              * interested in candidate of the same SSID */
6338 } wmi_neighbor_report_offload;
6339 
6340 typedef struct {
6341     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_11k_report_fixed_param */
6342     A_UINT32 vdev_id;
6343     A_UINT32 offload_11k; /* bitmask to indicate to FW what all 11k features are offloaded */
6344 } wmi_11k_offload_report_fixed_param;
6345 
6346 typedef struct {
6347     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_neighbor_report_offload_tlv_param */
6348     wmi_neighbor_report_offload neighbor_rep_ofld_params;
6349 } wmi_neighbor_report_11k_offload_tlv_param;
6350 
6351 #define WMI_INVOKE_NEIGHBOR_REPORT_FLAGS_SEND_RESP_TO_HOST 0x1
6352 
6353 typedef struct {
6354     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_invoke_neighbor_report_fixed_param */
6355     A_UINT32 vdev_id;
6356     A_UINT32 flags;
6357     wmi_ssid ssid; /* if ssid.len == 0, firmware doesn't include ssid sub-element.
6358                     * In that case AP gives all the candidates in ESS without SSID filter
6359                     * If host wants to insert ssid subelement in the neighbor report request frame, then it can specify the ssid here */
6360 } wmi_11k_offload_invoke_neighbor_report_fixed_param;
6361 
6362 #define WMI_MAX_PMKID_LEN   16
6363 #define WMI_MAX_PMK_LEN     64
6364 
6365 #define WMI_PMK_CACHE_CAT_FLAG_BSSID              0x1
6366 #define WMI_PMK_CACHE_CAT_FLAG_SSID_CACHE_ID      0x2
6367 
6368 #define WMI_PMK_CACHE_ACTION_FLAG_ADD_ENTRY       0x1
6369 #define WMI_PMK_CACHE_ACTION_FLAG_DEL_ENTRY       0x2
6370 
6371 typedef struct {
6372     A_UINT32       tlv_header;
6373     A_UINT32       pmk_len;
6374     A_UINT8        pmk[WMI_MAX_PMK_LEN];/* for big-endian hosts, manual endian conversion will be needed to keep the array values in their original order,
6375                                         in spite of the automatic byte-swap applied to WMI messages during download*/
6376     A_UINT32       pmkid_len;
6377     A_UINT8        pmkid[WMI_MAX_PMKID_LEN];
6378     wmi_mac_addr   bssid;
6379     wmi_ssid       ssid;
6380     A_UINT32       cache_id;
6381     A_UINT32       cat_flag;  // whether (bssid) or (ssid,cache_id) is valid
6382     A_UINT32       action_flag;  // add/delete the entry
6383 } wmi_pmk_cache;
6384 
6385 #define WMI_PMK_CACHE_OP_FLAG_FLUSH_ALL       0x1
6386 
6387 typedef struct {
6388     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_update_pmk_cache_cmd_fixed_param */
6389     A_UINT32 op_flag;   //option to flush all the cache at once
6390     A_UINT32 vdev_id;
6391     A_UINT32 num_cache;
6392     /**
6393     * TLV (tag length value) parameters follow the update_pmk_cache cmd
6394     * structure. The TLV's are:
6395      * wmi_pmk_cache cache_list[];
6396     */
6397 } wmi_pdev_update_pmk_cache_cmd_fixed_param;
6398 
6399 #define WMI_FILS_MAX_USERNAME_LEN 16
6400 #define WMI_FILS_MAX_REALM_LEN 256
6401 #define WMI_FILS_MAX_RRK_LEN 64
6402 #define WMI_FILS_MAX_RIK_LEN 64
6403 
6404 /* for big-endian hosts, manual endian conversion will be needed to keep the array values in their original order,
6405 in spite of the automatic byte-swap applied to WMI messages during download*/
6406 
6407 typedef struct {
6408     A_UINT8     username[WMI_FILS_MAX_USERNAME_LEN];
6409     A_UINT32    username_length;
6410     A_UINT32    next_erp_seq_num;
6411     A_UINT8     rRk[WMI_FILS_MAX_RRK_LEN];
6412     A_UINT32    rRk_length;
6413     A_UINT8     rIk[WMI_FILS_MAX_RIK_LEN];
6414     A_UINT32    rIk_length;
6415     A_UINT8     realm[WMI_FILS_MAX_REALM_LEN];
6416     A_UINT32    realm_len;
6417 } wmi_erp_info;
6418 
6419 enum wmi_fils_hlp_pkt_type {
6420     WMI_FILS_HLP_PKT_TYPE_DHCP_DISCOVER = 1,
6421 };
6422 
6423 typedef struct {
6424     A_UINT32      tlv_header;  /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_fils_offload_tlv_param */
6425     A_UINT32      flags;
6426     wmi_erp_info  vdev_erp_info;
6427 } wmi_roam_fils_offload_tlv_param;
6428 
6429 typedef struct {
6430     A_UINT32  tlv_header; /** tag WMITLV_TAG_STRUC_wmi_pdev_update_fils_hlp_pkt_cmd_fixed_param**/
6431     A_UINT32  flags;
6432     A_UINT32  vdev_id;
6433     A_UINT32  size;
6434     A_UINT32  pkt_type; // filled using enum wmi_fils_hlp_pkt_type
6435  // A_UINT8          fils_hlp_pkt[];
6436 } wmi_pdev_update_fils_hlp_pkt_cmd_fixed_param;
6437 
6438 #define WMI_MAX_KEK_LEN 64
6439 #define GTK_OFFLOAD_KEK_EXTENDED_BYTES WMI_MAX_KEK_LEN /*KEK len has been increased to 64 to support FILS security.
6440                                           To not break backward compatibility, new GTK_OFFLOAD_KEK_EXTENDED_BYTES has been defined without modifying old GTK_OFFLOAD_KEK_BYTES */
6441 
6442 typedef struct {
6443     A_UINT32   tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_fils_synch_tlv_param */
6444     A_UINT32   update_erp_next_seq_num;// Boolean denoting whether next erp_seq_num changed or not.
6445     A_UINT32   next_erp_seq_num;
6446     A_UINT32   kek_len;
6447     A_UINT8    kek[WMI_MAX_KEK_LEN];
6448     A_UINT32   pmk_len;
6449     A_UINT8    pmk[WMI_MAX_PMK_LEN];
6450     A_UINT8    pmkid[WMI_MAX_PMKID_LEN];
6451     A_UINT8    realm[WMI_FILS_MAX_REALM_LEN];
6452     A_UINT32   realm_len;
6453 } wmi_roam_fils_synch_tlv_param;
6454 
6455 /*
6456  * FW sends PMK cache of roamed candidate to host to sync pmk cache with host
6457  */
6458 typedef struct {
6459     A_UINT32  tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_pmk_cache_synch_tlv_param */
6460     A_UINT32  pmk_len;
6461     A_UINT8  pmk[WMI_MAX_PMK_LEN];
6462     A_UINT8  pmkid[WMI_MAX_PMKID_LEN];
6463 } wmi_roam_pmk_cache_synch_tlv_param;
6464 
6465 /**
6466  * WMI_ROAM_LINK_FLAG_XXX definition:
6467  */
6468 #define WMI_ROAM_LINK_FLAG_DISABLE    0x1   /* link is disabled, host can overwrite it later. */
6469 
6470 typedef struct {
6471     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ml_setup_links_param */
6472     A_UINT32 vdev_id; /* when vdev_id is 0xffffffff, means the link_id hasn't attached to vdev */
6473     A_UINT32 link_id; /* link id defined as in 802.11 BE spec. */
6474     wmi_channel channel; /* link primary channel */
6475     /**
6476      * link flags: refer WMI_ROAM_LINK_FLAG_XXX.
6477      */
6478     A_UINT32 flags;
6479     wmi_mac_addr link_addr; /* link address */
6480     wmi_mac_addr self_link_addr; /* self-link address */
6481 } wmi_roam_ml_setup_links_param;
6482 
6483 /*
6484  * If FW has multiple active channels due to MCC(multi channel concurrency),
6485  * then these stats are combined stats for all the active channels.
6486  */
6487 typedef struct {
6488     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_whal_mib_stats_event_fixed_param */
6489     /** ack count, it is an incremental number, not accumulated number */
6490     A_UINT32 ackRcvBad;
6491     /** bad rts count, it is an incremental number, not accumulated number */
6492     A_UINT32 rtsBad;
6493     /** good rts, it is an incremental number, not accumulated number */
6494     A_UINT32 rtsGood;
6495     /** fcs count, it is an incremental number, not accumulated number */
6496     A_UINT32 fcsBad;
6497     /** beacon count, it is an incremental number, not accumulated number */
6498     A_UINT32 noBeacons;
6499 } wmi_update_whal_mib_stats_event_fixed_param;
6500 
6501 /*
6502  * This defines how much headroom is kept in the
6503  * receive frame between the descriptor and the
6504  * payload, in order for the WMI PHY error and
6505  * management handler to insert header contents.
6506  *
6507  * This is in bytes.
6508  */
6509 #define WMI_MGMT_RX_HDR_HEADROOM (sizeof(wmi_comb_phyerr_rx_hdr) + WMI_TLV_HDR_SIZE + sizeof(wmi_single_phyerr_rx_hdr))
6510 
6511 /** This event will be used for sending scan results
6512  * as well as rx mgmt frames to the host. The rx buffer
6513  * will be sent as part of this WMI event. It would be a
6514  * good idea to pass all the fields in the RX status
6515  * descriptor up to the host.
6516  */
6517 /* ATH_MAX_ANTENNA value (4) can't be changed without breaking the compatibility */
6518 #define ATH_MAX_ANTENNA 4 /* To support beelinear, which is up to 4 chains */
6519 
6520 /** flag indicating that the mgmt frame (probe req/beacon) is received in the context of extscan performed by FW */
6521 #define WMI_MGMT_RX_HDR_EXTSCAN     0x01
6522 /** flag indicating that the mgmt frame (probe req/beacon) is received in the context of matched network by FW ENLO */
6523 #define WMI_MGMT_RX_HDR_ENLO     0x02
6524 
6525 #define MAX_ANTENNA_EIGHT 8
6526 
6527 
6528 /** Helper macro for params GET/SET of MGMT_RX_FW_CONSUMED_EVENTID */
6529 #define WMI_MGMT_RX_FW_CONSUMED_PARAM_PEER_ID_GET(peer_info_subtype) WMI_GET_BITS(peer_info_subtype, 0, 16)
6530 #define WMI_MGMT_RX_FW_CONSUMED_PARAM_PEER_ID_SET(peer_info_subtype, value) WMI_SET_BITS(peer_info_subtype, 0, 16, value)
6531 
6532 #define WMI_MGMT_RX_FW_CONSUMED_PARAM_IEEE_LINK_ID_GET(peer_info_subtype) WMI_GET_BITS(peer_info_subtype, 16, 3)
6533 #define WMI_MGMT_RX_FW_CONSUMED_PARAM_IEEE_LINK_ID_SET(peer_info_subtype, value) WMI_SET_BITS(peer_info_subtype, 16, 3, value)
6534 
6535 #define WMI_MGMT_RX_FW_CONSUMED_PARAM_SUBTYPE_GET(peer_info_subtype) WMI_GET_BITS(peer_info_subtype, 28, 4)
6536 #define WMI_MGMT_RX_FW_CONSUMED_PARAM_SUBTYPE_SET(peer_info_subtype, value) WMI_SET_BITS(peer_info_subtype, 28, 4, value)
6537 
6538 #define WMI_MGMT_RX_FW_CONSUMED_PARAM_MGMT_PKT_CTR_VALID_GET(mgmt_pkt_ctr_info) WMI_GET_BITS(mgmt_pkt_ctr_info, 15, 1)
6539 #define WMI_MGMT_RX_FW_CONSUMED_PARAM_MGMT_PKT_CTR_VALID_SET(mgmt_pkt_ctr_info, value) WMI_SET_BITS(mgmt_pkt_ctr_info, 15, 1, value)
6540 
6541 #define WMI_MGMT_RX_FW_CONSUMED_PARAM_MGMT_PKT_CTR_GET(mgmt_pkt_ctr_info) WMI_GET_BITS(mgmt_pkt_ctr_info, 16, 16)
6542 #define WMI_MGMT_RX_FW_CONSUMED_PARAM_MGMT_PKT_CTR_SET(mgmt_pkt_ctr_info, value) WMI_SET_BITS(mgmt_pkt_ctr_info, 16, 16, value)
6543 
6544 typedef struct {
6545     A_UINT32 tlv_header; /* WMITLV_TAG_STRUCT_wmi_mgmt_rx_fw_consumed_hdr */
6546     A_UINT32 rx_tsf_l32; /* h/w assigned timestamp of the rx frame in micro sec */
6547     A_UINT32 rx_tsf_u32 ;/* h/w assigned timestamp of the rx frame in micro sec */
6548     A_UINT32 pdev_id; /* pdev_id for identifying the MAC the rx mgmt frame was received by */
6549     /**
6550      * peer_info_subtype
6551      *
6552      * [15:0]:  ml_peer_id, ML peer_id unique across chips
6553      * [18:16]: ieee_link_id, protocol link id on which the rx frame is received
6554      * [27:19]: reserved
6555      * [31:28]: subtype, subtype of the received MGMT frame
6556      */
6557     A_UINT32 peer_info_subtype;
6558     A_UINT32 chan_freq; /* frequency in MHz of the channel on which this frame was received */
6559     /* Timestamp (in micro sec) of the last fw consumed/dropped mgmt. frame, same across chips */
6560     A_UINT32 global_timestamp;
6561     /**
6562      * mgmt_pkt_ctr_info
6563      *
6564      * [14:0]:  reserved
6565      * [15]:    mgmt_pkt_ctr_valid
6566      * [31:16]: mgmt_pkt_ctr, Sequence number of the last fw consumed mgmt frame
6567      */
6568     A_UINT32 mgmt_pkt_ctr_info;
6569     A_UINT32 rx_ppdu_duration_us; /* receive duration in us */
6570     A_UINT32 mpdu_end_timestamp; /* mpdu end timestamp in us (based on HWMLO timer) */
6571 } wmi_mgmt_rx_fw_consumed_hdr;
6572 
6573 /** Helper macro for param GET/SET of mgmt_rx_reo_params */
6574 #define WMI_MGMT_RX_REO_PARAM_IEEE_LINK_ID_GET(mgmt_pkt_ctr_link_info) WMI_GET_BITS(mgmt_pkt_ctr_link_info, 12, 3)
6575 #define WMI_MGMT_RX_REO_PARAM_IEEE_LINK_ID_SET(mgmt_pkt_ctr_link_info, value) WMI_SET_BITS(mgmt_pkt_ctr_link_info, 12, 3, value)
6576 
6577 #define WMI_MGMT_RX_REO_PARAM_MGMT_PKT_CTR_VALID_GET(mgmt_pkt_ctr_link_info) WMI_GET_BITS(mgmt_pkt_ctr_link_info, 15, 1)
6578 #define WMI_MGMT_RX_REO_PARAM_MGMT_PKT_CTR_VALID_SET(mgmt_pkt_ctr_link_info, value) WMI_SET_BITS(mgmt_pkt_ctr_link_info, 15, 1, value)
6579 
6580 #define WMI_MGMT_RX_REO_PARAM_MGMT_PKT_CTR_GET(mgmt_pkt_ctr_link_info) WMI_GET_BITS(mgmt_pkt_ctr_link_info, 16, 16)
6581 #define WMI_MGMT_RX_REO_PARAM_MGMT_PKT_CTR_SET(mgmt_pkt_ctr_link_info, value) WMI_SET_BITS(mgmt_pkt_ctr_link_info, 16, 16, value)
6582 
6583 /** Data structure of the TLV to add in RX EVENTID for providing REO params
6584  *  like global_timestamp and mgmt_pkt_ctr
6585  */
6586 typedef struct {
6587     A_UINT32 tlv_header; /*TLV WMITLV_TAG_STRUC_wmi_mgmt_rx_reo_params*/
6588     /* Timestamp (in micro sec) of the last fw forwarded mgmt. frame, same across chips */
6589     A_UINT32 global_timestamp;
6590     /**
6591      * mgmt_pkt_ctr_link_info
6592      *
6593      * [11:0]:  reserved
6594      * [14:12]: ieee_link_id, protocol link id on which the rx frame is received
6595      * [15]:    mgmt_pkt_ctr_valid
6596      * [31:16]: mgmt_pkt_ctr, Sequence number of the last fw forwarded mgmt frame
6597      */
6598 
6599     A_UINT32 mgmt_pkt_ctr_link_info;
6600     A_UINT32 rx_ppdu_duration_us; /* receive duration in us */
6601     A_UINT32 mpdu_end_timestamp; /* mpdu end timestamp in us (based on HWMLO timer) */
6602 } wmi_mgmt_rx_reo_params;
6603 
6604 /** Helper macro for param GET/SET */
6605 #define WMI_RX_PARAM_EXT_META_ID_GET(mgmt_rx_params_ext_dword0) WMI_GET_BITS(mgmt_rx_params_ext_dword0, 0, 3)
6606 #define WMI_RX_PARAM_EXT_META_ID_SET(mgmt_rx_params_ext_dword0, value) WMI_SET_BITS(mgmt_rx_params_ext_dword0, 0, 3, value)
6607 
6608 #define WMI_RX_PARAM_EXT_BA_WIN_SIZE_GET(mgmt_rx_params_ext_dword1) WMI_GET_BITS(mgmt_rx_params_ext_dword1, 0, 16)
6609 #define WMI_RX_PARAM_EXT_BA_WIN_SIZE_SET(mgmt_rx_params_ext_dword1, value) WMI_SET_BITS(mgmt_rx_params_ext_dword1, 0, 16, value)
6610 
6611 #define WMI_RX_PARAM_EXT_REO_WIN_SIZE_GET(mgmt_rx_params_ext_dword1) WMI_GET_BITS(mgmt_rx_params_ext_dword1, 16, 16)
6612 #define WMI_RX_PARAM_EXT_REO_WIN_SIZE_SET(mgmt_rx_params_ext_dword1, value) WMI_SET_BITS(mgmt_rx_params_ext_dword1, 16, 16, value)
6613 
6614 typedef enum {
6615     WMI_RX_PARAMS_EXT_META_ADDBA = 0x0,
6616     WMI_RX_PARAMS_EXT_META_TWT = 0x1,
6617 } wmi_mgmt_rx_params_ext_meta_t;
6618 
6619 typedef struct {
6620     A_UINT32 tlv_header; /* TLV tag (WMITLV_TAG_STRUC_wmi_mgmt_rx_params_ext) and len */
6621     union {
6622         struct {
6623             A_UINT32
6624                 /* Describes the representation of the data in rx_param_ext_dword1
6625                  * Full set shown in wmi_mgmt_rx_params_ext_meta_t */
6626                 meta_id     : 3,
6627                 /* Dedicated for commonly used parameters only */
6628                 reserved_0  : 29;
6629         };
6630         A_UINT32 mgmt_rx_params_ext_dword0;
6631     };
6632     union {
6633         struct {
6634             /* WMI_RX_PARAMS_EXT_META_ADDBA */
6635             A_UINT32
6636                 ba_win_size :16,  /* negotiated BA window size */
6637                 reo_win_size :16; /* 2x the negotiated BA window size to handle any latency across MLO */
6638         };
6639         A_UINT32 mgmt_rx_params_ext_dword1;
6640     };
6641     union {
6642         struct {
6643             /* WMI_RX_PARAMS_EXT_META_TWT */
6644             A_UINT32 twt_ie_buf_len; /* IE length */
6645             /* Following this structure is the TLV byte stream of IE data
6646              * of length twt_ie_buf_len:
6647              *     A_UINT8 ie_data[]; <-- length in bytes given by field
6648              *                            twt_ie_buf_len.
6649              *     This ie_data[] would contain only the TWT IE information
6650              *     when twt_ie_buf_len is non zero.
6651              */
6652         };
6653         A_UINT32 mgmt_rx_params_ext_dword2;
6654     };
6655 } wmi_mgmt_rx_params_ext;
6656 
6657 typedef struct {
6658     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_rx_hdr */
6659     /** channel on which this frame is received (channel number) */
6660     A_UINT32 channel;
6661     /** snr information used to cal RSSI */
6662     A_UINT32 snr;
6663     /** Rate kbps */
6664     A_UINT32 rate;
6665     /** rx phy mode WLAN_PHY_MODE */
6666     A_UINT32 phy_mode;
6667     /** length of the frame */
6668     A_UINT32 buf_len;
6669     /** rx status */
6670     A_UINT32 status; /* capture mode indication */
6671     /** RSSI of PRI 20MHz for each chain. */
6672     A_UINT32 rssi_ctl[ATH_MAX_ANTENNA];
6673     /** information about the management frame e.g. can give a scan source for a scan result mgmt frame */
6674     A_UINT32 flags;
6675     /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */
6676     A_INT32 rssi;
6677     /** delta between local TSF(TSF timestamp when frame was RXd)
6678      *  and remote TSF(TSF timestamp in the IE for mgmt frame -
6679      *  beacon,proberesp for e.g). If remote TSF is not available,
6680      *  delta set to 0.
6681      *  Although tsf_delta is stored as A_UINT32, it can be negative,
6682      *  and thus would need to be sign-extended if added to a value
6683      *  larger than 32 bits.
6684      */
6685     A_UINT32 tsf_delta;
6686 
6687     /* The lower 32 bits of the TSF (rx_tsf_l32) is copied by FW from
6688      * TSF timestamp in the RX MAC descriptor provided by HW.
6689      */
6690     A_UINT32 rx_tsf_l32;
6691 
6692     /* The Upper 32 bits (rx_tsf_u32) is filled by reading the TSF register
6693      * after the packet is received.
6694      */
6695     A_UINT32 rx_tsf_u32;
6696 
6697     /** pdev_id for identifying the MAC the rx mgmt frame was received by
6698      * See macros starting with WMI_PDEV_ID_ for values.
6699      */
6700     A_UINT32 pdev_id;
6701 
6702     /** freq in MHz of the channel on which this frame was received */
6703     A_UINT32 chan_freq;
6704 
6705 /* This TLV is followed by array of bytes:
6706  *   A_UINT8 bufp[]; <-- management frame buffer
6707  */
6708 /* This TLV is optionally followed by array of struct:
6709  *  wmi_rssi_ctl_ext rssi_ctl_ext;
6710  */
6711 /*
6712  * This TLV is followed by struct:
6713  * wmi_mgmt_rx_reo_params reo_params;// MGMT rx REO params
6714  */
6715 /*
6716  * This TLV is optionally followed by struct:
6717  * wmi_mgmt_rx_params_ext mgmt_rx_params_ext[0 or 1];
6718  */
6719 } wmi_mgmt_rx_hdr;
6720 
6721 /* WMI CMD to receive the management filter criteria from the host */
6722 typedef struct {
6723     A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_mgmt_reo_filter_cmd_fixed_param */
6724     A_UINT32 pdev_id; /* pdev_id for identifying the MAC */
6725     /* filter:
6726      * Each bit represents the possible combination of frame type (2 bits)
6727      * and subtype (4 bits)
6728      * There would be 64 such combinations as per the 802.11 standard
6729      * For Exp : We have beacon frame, we will take the type and subtype
6730      *           of this frame and concatenate the bits, it will give 6 bits
6731      *           number. We need to go to that bit position in the below
6732      *           2 filter_low and filter_high bitmap and set the bit.
6733      */
6734     A_UINT32 filter_low;
6735     A_UINT32 filter_high;
6736 } wmi_mgmt_rx_reo_filter_configuration_cmd_fixed_param;
6737 
6738 typedef struct {
6739     A_UINT32 tlv_header; /* TLV tag (WMITLV_TAG_STRUC_wmi_frame_pn_params) and len */
6740     A_UINT8 cur_pn[WMI_MAX_PN_LEN];
6741     A_UINT8 prev_pn[WMI_MAX_PN_LEN];
6742 } wmi_frame_pn_params;
6743 
6744 typedef struct {
6745     A_UINT32 tlv_header; /* TLV tag (WMITLV_TAG_STRUC_wmi_is_my_frame) */
6746     A_UINT32 mgmt_frm_sub_type; /* to indicate which sub-type of MGMT frame */
6747     A_UINT32 is_my_frame; /* to indicate frame is sent to this BSSID */
6748 } wmi_is_my_mgmt_frame;
6749 
6750 typedef struct {
6751     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_ml_info */
6752     /**
6753      * CU vdev map to initmate about the on-going Critical update
6754      * per-link contains 16 VAPs at max.
6755      */
6756 
6757     /*
6758      *  bits    : 0-15 | 16-31
6759      *  link-id :  0   |   1
6760      */
6761     A_UINT32 cu_vdev_map_1;
6762     /*
6763      *  bits    : 0-15 | 16-31
6764      *  link-id :  2   |   3
6765      */
6766     A_UINT32 cu_vdev_map_2;
6767     /*
6768      *  bits    : 0-15 | 16-31
6769      *  link-id :  4   |   5
6770      */
6771     A_UINT32 cu_vdev_map_3;
6772     /*
6773      *  bits    : 0-15 | 16-31
6774      *  link-id :  6   |   7
6775      */
6776     A_UINT32 cu_vdev_map_4; /* bits 63:32 */
6777     /**
6778      * This is followed by byte array that contains BPCC value per MLO VAP.
6779      * There will be 16 byte entries for each link corresponding to VAP-ID.
6780      * So number of byte entries will be (num of max links supported by AP * 16)
6781      * Note: num of max links supported = 8
6782      */
6783 } wmi_mgmt_ml_info;
6784 
6785 #define WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_VDEV_ID_GET(_var)       WMI_GET_BITS(_var, 0, 8)
6786 #define WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_VDEV_ID_SET(_var, _val) WMI_SET_BITS(_var, 0, 8, _val)
6787 
6788 #define WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_EXP_DUR_GET(_var)       WMI_GET_BITS(_var, 8, 24)
6789 #define WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_EXP_DUR_SET(_var, _val) WMI_SET_BITS(_var, 8, 24, _val)
6790 
6791 typedef struct {
6792     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_bcast_t2lm_info */
6793     /*
6794      * Vdev_id for MLO vap
6795      * WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_VDEV_ID_GET /
6796      * WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_VDEV_ID_SET
6797      * vdev_id :8
6798      *
6799      * Duration time for MLO Vap
6800      * WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_VDEV_ID_GET /
6801      * WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_VDEV_ID_SET
6802      * expected_duration :24
6803      */
6804     A_UINT32 vdev_id_expec_dur;
6805 } wmi_mlo_bcast_t2lm_info;
6806 
6807 typedef enum {
6808     PKT_CAPTURE_MODE_DISABLE = 0,
6809     PKT_CAPTURE_MODE_MGMT_ONLY,
6810     PKT_CAPTURE_MODE_DATA_ONLY,
6811     PKT_CAPTURE_MODE_DATA_MGMT,
6812 } WMI_PKT_CAPTURE_MODE_CONFIG;
6813 
6814 /* This information sending to host during offloaded MGMT local TX and host TX */
6815 typedef struct {
6816     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_hdr */
6817     /* channel frequency in MHz */
6818     A_UINT32 chan_freq;
6819     /** snr information used to cal RSSI in dB */
6820     A_UINT32 snr;
6821     /** Rate kbps */
6822     A_UINT32 rate_kbps;
6823     /** phy mode WLAN_PHY_MODE */
6824     A_UINT32 phy_mode;
6825     /** length of the frame in bytes */
6826     A_UINT32 buf_len;
6827     /** status:
6828      * 0x00: CRC ERR
6829      * 0x08: DECRYPT ERR
6830      * 0x10: MIC ERR
6831      * 0x20: KEY CACHE MISS
6832      */
6833     A_UINT32 status;
6834     /** flags:
6835      * Information about the management frame e.g. can give a scan source
6836      * for a scan result mgmt frame
6837      * Refer to WMI_MGMT_RX_HDR_ definitions.
6838      * ex: WMI_MGMT_RX_HDR_EXTSCAN,WMI_MGMT_RX_HDR_ENLO
6839      */
6840     A_UINT32 flags;
6841     /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */
6842     A_INT32 rssi;
6843     /** delta between local TSF (TSF timestamp when frame was RXd)
6844      *  and remote TSF (TSF timestamp in the IE for mgmt frame -
6845      *  beacon, proberesp for example). If remote TSF is not available,
6846      *  delta is set to 0.
6847      *  Although tsf_delta is stored as A_UINT32, it can be negative,
6848      *  and thus would need to be sign-extended if added to a value
6849      *  larger than 32 bits.
6850      */
6851     A_UINT32 tsf_delta;
6852 
6853     /* The lower 32 bits of the TSF (tsf_l32) is copied by FW from
6854      * TSF timestamp in the TX MAC descriptor provided by HW.
6855      */
6856     A_UINT32 tsf_l32;
6857 
6858     /* The upper 32 bits of the TSF (tsf_u32) is copied by FW from
6859      * TSF timestamp in the TX MAC descriptor provided by HW.
6860      */
6861     A_UINT32 tsf_u32;
6862 
6863     /** pdev_id for identifying the MAC the tx mgmt frame transmitted.
6864      * See macros starting with WMI_PDEV_ID_ for values.
6865      */
6866     A_UINT32 pdev_id;
6867 
6868     A_UINT32 direction; /* tx:0,rx:1*/
6869 
6870     /** tx_status:
6871      * 0: xmit ok
6872      * 1: excessive retries
6873      * 2: blocked by tx filtering
6874      * 4: fifo underrun
6875      * 8: swabort
6876      */
6877     A_UINT32 tx_status;
6878 
6879     A_UINT32
6880         /* tx_retry_cnt:
6881          * Indicates retry count of offloaded/local & host mgmt tx frames.
6882          * The WMI_MGMT_HDR_TX_RETRY_[SET,GET] macros can be used to access
6883          * this bitfield in a portable manner.
6884          */
6885         tx_retry_cnt:6, /* [5:0] */
6886         reserved_1:26;  /* [31:6] */
6887 
6888 /* This TLV may be followed by array of bytes:
6889  *   A_UINT8 bufp[]; <-- management frame buffer
6890  */
6891 } wmi_mgmt_hdr;
6892 
6893 /* Tx retry cnt set & get bits*/
6894 #define WMI_MGMT_HDR_TX_RETRY_CNT_SET(tx_retry_cnt, value) \
6895     WMI_SET_BITS(tx_retry_cnt, 0, 6, value)
6896 #define WMI_MGMT_HDR_TX_RETRY_CNT_GET(tx_retry_cnt) \
6897     WMI_GET_BITS(tx_retry_cnt, 0, 6)
6898 
6899 /*
6900  * Instead of universally increasing the RX_HDR_HEADROOM size which may cause problems for older targets,
6901  * this new ext_hdr can be used for extending the header and will be only applicable for new targets.
6902  */
6903 typedef struct
6904 {
6905     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_rssi_ctl_ext */
6906     /** RSSI of PRI 20MHz for each chain, in dB w.r.t. noise floor */
6907     A_UINT32 rssi_ctl_ext[MAX_ANTENNA_EIGHT - ATH_MAX_ANTENNA];
6908 } wmi_rssi_ctl_ext;
6909 
6910 typedef struct {
6911     /** TSF timestamp */
6912     A_UINT32 tsf_timestamp;
6913 
6914     /**
6915      * Current freq1, freq2
6916      *
6917      * [7:0]:    freq1[lo]
6918      * [15:8] :   freq1[hi]
6919      * [23:16]:   freq2[lo]
6920      * [31:24]:   freq2[hi]
6921      */
6922     A_UINT32 freq_info_1;
6923 
6924     /**
6925      * Combined RSSI over all chains and channel width for this PHY error
6926      *
6927      * [7:0]: RSSI combined
6928      * [15:8]: Channel width (MHz)
6929      * [23:16]: PHY error code
6930      * [24:16]: reserved (future use)
6931      */
6932     A_UINT32 freq_info_2;
6933 
6934     /**
6935      * RSSI on chain 0 through 3
6936      *
6937      * This is formatted the same as the PPDU_START RX descriptor
6938      * field:
6939      *
6940      * [7:0]:   pri20
6941      * [15:8]:  sec20
6942      * [23:16]: sec40
6943      * [31:24]: sec80
6944      */
6945     A_UINT32 rssi_chain0;
6946     A_UINT32 rssi_chain1;
6947     A_UINT32 rssi_chain2;
6948     A_UINT32 rssi_chain3;
6949 
6950     /**
6951      * Last calibrated NF value for chain 0 through 3
6952      *
6953      * nf_list_1:
6954      *
6955      * + [15:0] - chain 0
6956      * + [31:16] - chain 1
6957      *
6958      * nf_list_2:
6959      *
6960      * + [15:0] - chain 2
6961      * + [31:16] - chain 3
6962      */
6963     A_UINT32 nf_list_1;
6964     A_UINT32 nf_list_2;
6965 
6966     /** Length of the frame */
6967     A_UINT32 buf_len;
6968 } wmi_single_phyerr_rx_hdr;
6969 
6970 typedef struct {
6971     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_single_phyerr_ext_rx_hdr */
6972     /**
6973      * RSSI on chain 4 through 7 in dB w.r.t noise floor.
6974      *
6975      * This is formatted the same as the PPDU_START RX descriptor
6976      * field:
6977      *
6978      * [7:0]:   pri20
6979      * [15:8]:  sec20
6980      * [23:16]: sec40
6981      * [31:24]: sec80
6982      */
6983     A_UINT32 rssi_chain4;
6984     A_UINT32 rssi_chain5;
6985     A_UINT32 rssi_chain6;
6986     A_UINT32 rssi_chain7;
6987     /**
6988      * Last calibrated NF value for chain 4 through 7 in dBm
6989      *
6990      * nf_list_3:
6991      * + [15:0] - chain 4
6992      * + [31:16] - chain 5
6993      *
6994      * nf_list_4:
6995      * + [15:0] - chain 6
6996      * + [31:16] - chain 7
6997      *
6998      * Each chain's noise floor is stored as a sign-extended (negative)
6999      * value in dBm units.
7000      */
7001     A_UINT32 nf_list_3;
7002     A_UINT32 nf_list_4;
7003 } wmi_single_phyerr_ext_rx_hdr;
7004 
7005 #define WMI_UNIFIED_FREQINFO_1_LO   0x000000ff
7006 #define WMI_UNIFIED_FREQINFO_1_LO_S 0
7007 #define WMI_UNIFIED_FREQINFO_1_HI   0x0000ff00
7008 #define WMI_UNIFIED_FREQINFO_1_HI_S 8
7009 #define WMI_UNIFIED_FREQINFO_2_LO   0x00ff0000
7010 #define WMI_UNIFIED_FREQINFO_2_LO_S 16
7011 #define WMI_UNIFIED_FREQINFO_2_HI   0xff000000
7012 #define WMI_UNIFIED_FREQINFO_2_HI_S 24
7013 
7014 /*
7015  * Please keep in mind that these _SET macros break macro side effect
7016  * assumptions; don't be clever with them.
7017  */
7018 #define WMI_UNIFIED_FREQ_INFO_GET(hdr, f)                                   \
7019             (WMI_F_MS((hdr)->freq_info_1,                                   \
7020               WMI_UNIFIED_FREQINFO_##f##_LO)                                \
7021               | (WMI_F_MS((hdr)->freq_info_1,                               \
7022                  WMI_UNIFIED_FREQINFO_##f##_HI) << 8))
7023 
7024 #define WMI_UNIFIED_FREQ_INFO_SET(hdr, f, v)                                \
7025         do {                                                                \
7026             WMI_F_RMW((hdr)->freq_info_1, (v) & 0xff,                       \
7027                 WMI_UNIFIED_FREQINFO_##f##_LO);                             \
7028             WMI_F_RMW((hdr)->freq_info_1, ((v) >> 8) & 0xff,                \
7029                 WMI_UNIFIED_FREQINFO_##f##_HI);                             \
7030         } while (0)
7031 
7032 #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB    0x000000ff
7033 #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB_S  0
7034 #define WMI_UNIFIED_FREQINFO_2_CHWIDTH      0x0000ff00
7035 #define WMI_UNIFIED_FREQINFO_2_CHWIDTH_S    8
7036 #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE   0x00ff0000
7037 #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE_S 16
7038 
7039 #define WMI_UNIFIED_RSSI_COMB_GET(hdr)                                      \
7040             ((int8_t) (WMI_F_MS((hdr)->freq_info_2,                         \
7041                 WMI_UNIFIED_FREQINFO_2_RSSI_COMB)))
7042 
7043 #define WMI_UNIFIED_RSSI_COMB_SET(hdr, v)                                   \
7044             WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff,                       \
7045               WMI_UNIFIED_FREQINFO_2_RSSI_COMB);
7046 
7047 #define WMI_UNIFIED_CHWIDTH_GET(hdr)                                        \
7048             WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_CHWIDTH)
7049 
7050 #define WMI_UNIFIED_CHWIDTH_SET(hdr, v)                                     \
7051             WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff,                       \
7052               WMI_UNIFIED_FREQINFO_2_CHWIDTH);
7053 
7054 #define WMI_UNIFIED_PHYERRCODE_GET(hdr)                                     \
7055             WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_PHYERRCODE)
7056 
7057 #define WMI_UNIFIED_PHYERRCODE_SET(hdr, v)                                  \
7058             WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff,                       \
7059               WMI_UNIFIED_FREQINFO_2_PHYERRCODE);
7060 
7061 #define WMI_UNIFIED_CHAIN_0     0x0000ffff
7062 #define WMI_UNIFIED_CHAIN_0_S   0
7063 #define WMI_UNIFIED_CHAIN_1     0xffff0000
7064 #define WMI_UNIFIED_CHAIN_1_S   16
7065 #define WMI_UNIFIED_CHAIN_2     0x0000ffff
7066 #define WMI_UNIFIED_CHAIN_2_S   0
7067 #define WMI_UNIFIED_CHAIN_3     0xffff0000
7068 #define WMI_UNIFIED_CHAIN_3_S   16
7069 
7070 #define WMI_UNIFIED_CHAIN_4     0x0000ffff
7071 #define WMI_UNIFIED_CHAIN_4_S   0
7072 #define WMI_UNIFIED_CHAIN_5     0xffff0000
7073 #define WMI_UNIFIED_CHAIN_5_S   16
7074 #define WMI_UNIFIED_CHAIN_6     0x0000ffff
7075 #define WMI_UNIFIED_CHAIN_6_S   0
7076 #define WMI_UNIFIED_CHAIN_7     0xffff0000
7077 #define WMI_UNIFIED_CHAIN_7_S   16
7078 
7079 #define WMI_UNIFIED_CHAIN_0_FIELD   nf_list_1
7080 #define WMI_UNIFIED_CHAIN_1_FIELD   nf_list_1
7081 #define WMI_UNIFIED_CHAIN_2_FIELD   nf_list_2
7082 #define WMI_UNIFIED_CHAIN_3_FIELD   nf_list_2
7083 #define WMI_UNIFIED_CHAIN_4_FIELD   nf_list_3
7084 #define WMI_UNIFIED_CHAIN_5_FIELD   nf_list_3
7085 #define WMI_UNIFIED_CHAIN_6_FIELD   nf_list_4
7086 #define WMI_UNIFIED_CHAIN_7_FIELD   nf_list_4
7087 
7088 #define WMI_UNIFIED_NF_CHAIN_GET(hdr, c)                                    \
7089             ((int16_t) (WMI_F_MS((hdr)->WMI_UNIFIED_CHAIN_##c##_FIELD,      \
7090               WMI_UNIFIED_CHAIN_##c)))
7091 
7092 #define WMI_UNIFIED_NF_CHAIN_SET(hdr, c, nf)                                \
7093             WMI_F_RMW((hdr)->WMI_UNIFIED_CHAIN_##c##_FIELD, (nf) & 0xffff,  \
7094               WMI_UNIFIED_CHAIN_##c);
7095 
7096 /*
7097  * For now, this matches what the underlying hardware is doing.
7098  * Update ar6000ProcRxDesc() to use these macros when populating
7099  * the rx descriptor and then we can just copy the field over
7100  * to the WMI PHY notification without worrying about breaking
7101  * things.
7102  */
7103 #define WMI_UNIFIED_RSSI_CHAN_PRI20     0x000000ff
7104 #define WMI_UNIFIED_RSSI_CHAN_PRI20_S   0
7105 #define WMI_UNIFIED_RSSI_CHAN_SEC20     0x0000ff00
7106 #define WMI_UNIFIED_RSSI_CHAN_SEC20_S   8
7107 #define WMI_UNIFIED_RSSI_CHAN_SEC40     0x00ff0000
7108 #define WMI_UNIFIED_RSSI_CHAN_SEC40_S   16
7109 #define WMI_UNIFIED_RSSI_CHAN_SEC80     0xff000000
7110 #define WMI_UNIFIED_RSSI_CHAN_SEC80_S   24
7111 
7112 #define WMI_UNIFIED_RSSI_CHAN_SET(hdr, c, ch, rssi)                         \
7113             WMI_F_RMW((hdr)->rssi_chain##c, (rssi) & 0xff,                  \
7114               WMI_UNIFIED_RSSI_CHAN_##ch);
7115 
7116 #define WMI_UNIFIED_RSSI_CHAN_GET(hdr, c, ch)                               \
7117             ((int8_t) (WMI_F_MS((hdr)->rssi_chain##c,                       \
7118               WMI_UNIFIED_RSSI_CHAN_##ch)))
7119 
7120 #define WMI_UNIFIED_CHAIN_RSSI_GET(tlv, chain_idx, band) \
7121     ((A_INT8) WMI_F_MS((tlv)->chain_rssi[chain_idx], WMI_UNIFIED_RSSI_CHAN_ ## band))
7122 
7123 typedef struct {
7124     /** Phy error event header */
7125     wmi_single_phyerr_rx_hdr hdr;
7126     /** frame buffer */
7127     WMI_VAR_LEN_ARRAY1(A_UINT8, bufp);
7128 } wmi_single_phyerr_rx_event;
7129 
7130 /* PHY ERROR MASK 0 */
7131 /* bits 1:0 defined but not published */
7132 #define WMI_PHY_ERROR_MASK0_RADAR                           (1 <<  2)
7133 /* bits 23:3 defined but not published */
7134 #define WMI_PHY_ERROR_MASK0_FALSE_RADAR_EXT                 (1 << 24)
7135 /* bits 25:24 defined but not published */
7136 #define WMI_PHY_ERROR_MASK0_SPECTRAL_SCAN                   (1 << 26)
7137 /* bits 31:27 defined but not published */
7138 
7139 /* PHY ERROR MASK 1 */
7140 /* bits 13:0 defined but not published */
7141 /* bits 31:14 reserved */
7142 
7143 /* PHY ERROR MASK 2 */
7144 /* bits 31:0 reserved */
7145 
7146 typedef struct {
7147     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_comb_phyerr_rx_hdr */
7148     /** Phy error phy error count */
7149     A_UINT32 num_phyerr_events;
7150     A_UINT32 tsf_l32;
7151     A_UINT32 tsf_u32;
7152     A_UINT32 buf_len;
7153     union {
7154         A_UINT32 pmac_id; /* OBSOLETE - will be removed once all refs are gone */
7155         /** pdev_id for identifying the MAC
7156          * See macros starting with WMI_PDEV_ID_ for values.
7157          */
7158         A_UINT32 pdev_id;
7159     };
7160     A_UINT32 rsPhyErrMask0; /* see WMI_PHY_ERROR_MASK0 */
7161     A_UINT32 rsPhyErrMask1; /* see WMI_PHY_ERROR_MASK1 */
7162     A_UINT32 rsPhyErrMask2; /* see WMI_PHY_ERROR_MASK2 */
7163 /* This TLV is followed by array of bytes:
7164  *     frame buffer - contains multiple payloads in the order:
7165  *         header - payload, header - payload...
7166  *     (The header is of type: wmi_single_phyerr_rx_hdr)
7167  *   A_UINT8 bufp[];
7168  *     The extension hdr will repeat num_phyerr_events of times
7169  *     and will have 1:1 mapping with above header. i.e the 1st
7170  *     ext_rx_hdr will belong to 1st phyerr_rx_hdr and so on.
7171  *   wmi_single_phyerr_ext_rx_hdr single_phyerr_ext;
7172  */
7173 } wmi_comb_phyerr_rx_hdr;
7174 
7175 /* WMI MGMT TX  */
7176 typedef struct {
7177     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_hdr */
7178     /** unique id identifying the VDEV, generated by the caller */
7179     A_UINT32 vdev_id;
7180     /** peer MAC address */
7181     wmi_mac_addr peer_macaddr;
7182     /** xmit rate */
7183     A_UINT32 tx_rate;
7184     /** xmit power */
7185     A_UINT32 tx_power;
7186     /** Buffer length in bytes */
7187     A_UINT32 buf_len;
7188 /* This TLV is followed by array of bytes:
7189  *   A_UINT8 bufp[]; <-- management frame buffer
7190  */
7191 } wmi_mgmt_tx_hdr;
7192 
7193 #define WMI_TX_SEND_PARAM_EXT_META_ID_GET(tx_param_ext_dword0) WMI_GET_BITS(tx_param_dword0, 0, 3)
7194 #define WMI_TX_SEND_PARAM_EXT_META_ID_SET(tx_param_ext_dword0, value) WMI_SET_BITS(tx_param_dword0, 0, 3, value)
7195 
7196 #define WMI_TX_SEND_PARAM_EXT_WIN_SIZE_GET(tx_param_ext_dword1) WMI_GET_BITS(tx_param_dword1, 0, 16)
7197 #define WMI_TX_SEND_PARAM_EXT_WIN_SIZE_SET(tx_param_ext_dword1, value) WMI_SET_BITS(tx_param_dword1, 0, 16, value)
7198 
7199 typedef enum {
7200     WMI_TX_SEND_PARAMS_EXT_META_ADDBA = 0x0,
7201     WMI_TX_SEND_PARAMS_EXT_META_DELBA = 0x1,
7202 } wmi_tx_send_params_ext_meta_t;
7203 
7204 typedef struct {
7205     A_UINT32 tlv_header; /* TLV tag (WMITLV_TAG_STRUC_wmi_tx_send_params_ext) and len */
7206     union {
7207         struct {
7208             A_UINT32 meta_id     : 3,  /* Describes the representation of the data in tx_param_ext_dword1 Full set shown in wmi_tx_send_params_ext_meta_t */
7209                      reserved_0  : 29; /* Dedicated for commonly used parameters only */
7210         };
7211         A_UINT32 tx_param_ext_dword0;
7212     };
7213     union {
7214         struct {
7215         /* WMI_TX_SEND_PARAMS_EXT_META_ADDBA */
7216             A_UINT32 win_size    : 16,
7217                      reserved_1  : 16;
7218         };
7219         A_UINT32 tx_param_ext_dword1;
7220     };
7221 } wmi_tx_send_params_ext;
7222 
7223 #define WMI_TX_SEND_PARAM_PWR_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 0, 8)
7224 #define WMI_TX_SEND_PARAM_PWR_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 0, 8, value)
7225 
7226 #define WMI_TX_SEND_PARAM_MCS_MASK_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 8, 12)
7227 #define WMI_TX_SEND_PARAM_MCS_MASK_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 8, 12, value)
7228 
7229 #define WMI_TX_SEND_PARAM_NSS_MASK_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 20, 8)
7230 #define WMI_TX_SEND_PARAM_NSS_MASK_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 20, 8, value)
7231 
7232 #define WMI_TX_SEND_PARAM_RETRY_LIMIT_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 28, 4)
7233 #define WMI_TX_SEND_PARAM_RETRY_LIMIT_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 28, 4, value)
7234 
7235 #define WMI_TX_SEND_PARAM_CHAIN_MASK_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 0, 8)
7236 #define WMI_TX_SEND_PARAM_CHAIN_MASK_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 0, 8, value)
7237 
7238 #define WMI_TX_SEND_PARAM_BW_MASK_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 8, 7)
7239 #define WMI_TX_SEND_PARAM_BW_MASK_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 8, 7, value)
7240 
7241 #define WMI_TX_SEND_PARAM_PREAMBLE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 15, 5)
7242 #define WMI_TX_SEND_PARAM_PREAMBLE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 15, 5, value)
7243 
7244 #define WMI_TX_SEND_PARAM_FRAME_TYPE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 20, 1)
7245 #define WMI_TX_SEND_PARAM_FRAME_TYPE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 20, 1, value)
7246 
7247 #define WMI_TX_SEND_PARAM_CFR_CAPTURE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 21, 1)
7248 #define WMI_TX_SEND_PARAM_CFR_CAPTURE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 21, 1, value)
7249 
7250 #define WMI_TX_SEND_PARAM_BEAMFORM_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 22, 1)
7251 #define WMI_TX_SEND_PARAM_BEAMFORM_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 22, 1, value)
7252 
7253 #define WMI_TX_SEND_PARAM_RETRY_LIMIT_EXT_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 23, 3)
7254 #define WMI_TX_SEND_PARAM_RETRY_LIMIT_EXT_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 23, 3, value)
7255 
7256 
7257 /* TX_SEND flags:
7258  * Bit 0: set wrong txkey
7259  *     There is one special WFA test case in STA or AP, setting wrong txkey
7260  *     in disassoc or deauth with PMF enabled to verify if peer disconnected
7261  * Bit 1: set ps buffering for SA query frame
7262  */
7263 #define WMI_TX_SEND_FLAG_SET_WRONG_KEY    0x00000001
7264 #define WMI_TX_SEND_FLAG_SET_WRONG_KEY_GET(tx_flags) WMI_GET_BITS(tx_flags, 0, 1)
7265 #define WMI_TX_SEND_FLAG_SET_WRONG_KEY_SET(tx_flags, value) WMI_SET_BITS(tx_flags, 0, 1, value)
7266 #define WMI_TX_SEND_FLAG_SET_PS_BUFFERING_FOR_SA_QUERY    0x00000002
7267 #define WMI_TX_SEND_FLAG_SET_PS_BUFFERING_FOR_SA_QUERY_GET(tx_flags) WMI_GET_BITS(tx_flags, 1, 1)
7268 #define WMI_TX_SEND_FLAG_SET_PS_BUFFERING_FOR_SA_QUERY_SET(tx_flags, value) WMI_SET_BITS(tx_flags, 1, 1, value)
7269 
7270 typedef struct {
7271     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_send_params */
7272 
7273     union {
7274         struct {
7275             /* DWORD 0: tx power, tx rate, retry_limit */
7276             A_UINT32
7277                 /* pwr -
7278                  * Specify what power the tx frame needs to be transmitted at.
7279                  * The power a signed (two's complement) value is in units of 0.5 dBm.
7280                  * The value needs to be appropriately sign-extended when extracting
7281                  * the value from the message and storing it in a variable that is
7282                  * larger than A_INT8.  (fw automatically handles this sign-extension.)
7283                  * If the transmission uses multiple tx chains, this power spec is
7284                  * the total transmit power, assuming incoherent combination of
7285                  * per-chain power to produce the total power.
7286                  */
7287                  pwr: 8,
7288 
7289                 /* mcs_mask -
7290                  * Specify the allowable values for MCS index (modulation and coding)
7291                  * to use for transmitting the frame.
7292                  *
7293                  * For HT / VHT preamble types, this mask directly corresponds to
7294                  * the HT or VHT MCS indices that are allowed.  For each bit N set
7295                  * within the mask, MCS index N is allowed for transmitting the frame.
7296                  * For legacy CCK and OFDM rates, separate bits are provided for CCK
7297                  * rates versus OFDM rates, so the host has the option of specifying
7298                  * that the target must transmit the frame with CCK or OFDM rates
7299                  * (not HT or VHT), but leaving the decision to the target whether
7300                  * to use CCK or OFDM.
7301                  *
7302                  * For CCK and OFDM, the bits within this mask are interpreted as
7303                  * follows:
7304                  *     bit  0 -> CCK 1 Mbps rate is allowed
7305                  *     bit  1 -> CCK 2 Mbps rate is allowed
7306                  *     bit  2 -> CCK 5.5 Mbps rate is allowed
7307                  *     bit  3 -> CCK 11 Mbps rate is allowed
7308                  *     bit  4 -> OFDM BPSK modulation, 1/2 coding rate is allowed
7309                  *     bit  5 -> OFDM BPSK modulation, 3/4 coding rate is allowed
7310                  *     bit  6 -> OFDM QPSK modulation, 1/2 coding rate is allowed
7311                  *     bit  7 -> OFDM QPSK modulation, 3/4 coding rate is allowed
7312                  *     bit  8 -> OFDM 16-QAM modulation, 1/2 coding rate is allowed
7313                  *     bit  9 -> OFDM 16-QAM modulation, 3/4 coding rate is allowed
7314                  *     bit 10 -> OFDM 64-QAM modulation, 2/3 coding rate is allowed
7315                  *     bit 11 -> OFDM 64-QAM modulation, 3/4 coding rate is allowed
7316                  *
7317                  * The MCS index specification needs to be compatible with the
7318                  * bandwidth mask specification.  For example, a MCS index == 9
7319                  * specification is inconsistent with a preamble type == VHT,
7320                  * Nss == 1, and channel bandwidth == 20 MHz.
7321                  *
7322                  * Furthermore, the host has only a limited ability to specify to
7323                  * the target to select from HT + legacy rates, or VHT + legacy rates,
7324                  * since this mcs_mask can specify either HT/VHT rates or legacy rates.
7325                  * If no bits are set, target can choose what MCS type to use.
7326                  */
7327                  mcs_mask: 12,
7328 
7329                 /* nss_mask -
7330                  * Specify which numbers of spatial streams (MIMO factor) are permitted.
7331                  * Each bit in this mask corresponds to a Nss value:
7332                  *     bit 0: if set, Nss = 1 (non-MIMO) is permitted
7333                  *     bit 1: if set, Nss = 2 (2x2 MIMO) is permitted
7334                  *     bit 2: if set, Nss = 3 (3x3 MIMO) is permitted
7335                  *     bit 3: if set, Nss = 4 (4x4 MIMO) is permitted
7336                  *     bit 4: if set, Nss = 5 (5x5 MIMO) is permitted
7337                  *     bit 5: if set, Nss = 6 (6x6 MIMO) is permitted
7338                  *     bit 6: if set, Nss = 7 (7x7 MIMO) is permitted
7339                  *     bit 7: if set, Nss = 8 (8x8 MIMO) is permitted
7340                  * The values in the Nss mask must be suitable for the recipient, e.g.
7341                  * a value of 0x4 (Nss = 3) cannot be specified for a tx frame to a
7342                  * recipient which only supports 2x2 MIMO.
7343                  * If no bits are set, target can choose what NSS type to use.
7344                  */
7345                  nss_mask: 8,
7346 
7347                 /* retry_limit -
7348                  * Specify the maximum number of transmissions, including the
7349                  * initial transmission, to attempt before giving up if no ack
7350                  * is received.
7351                  * If the tx rate is specified, then all retries shall use the
7352                  * same rate as the initial transmission.
7353                  * If no tx rate is specified, the target can choose whether to
7354                  * retain the original rate during the retransmissions, or to
7355                  * fall back to a more robust rate.
7356                  */
7357                  retry_limit: 4;
7358 
7359        };
7360        A_UINT32 tx_param_dword0;
7361     };
7362 
7363     union {
7364         struct {
7365             /* DWORD 1: tx chain mask, preamble_type, tx BW */
7366             A_UINT32
7367                 /* chain_mask - specify which chains to transmit from
7368                  * If not set, target will choose what chain_mask to use.
7369                  */
7370                 chain_mask: 8,
7371 
7372                 /* The bits in this mask correspond to the values as below
7373                  *     bit  0 -> 5MHz
7374                  *     bit  1 -> 10MHz
7375                  *     bit  2 -> 20MHz
7376                  *     bit  3 -> 40MHz
7377                  *     bit  4 -> 80MHz
7378                  *     bit  5 -> 160MHz
7379                  *     bit  6 -> 80_80MHz
7380                  * If no bits are set, target can choose what BW to use.
7381                  */
7382                 bw_mask: 7,
7383 
7384                 /* preamble_type_mask -
7385                  * Specify which preamble types (CCK, OFDM, HT, VHT) the target
7386                  * may choose from for transmitting this frame.
7387                  * Each bit in this mask corresponds to a preamble_type value:
7388                  *     bit 0: if set, OFDM
7389                  *     bit 1: if set, CCK
7390                  *     bit 2: if set, HT
7391                  *     bit 3: if set, VHT
7392                  *     bit 4: if set, HE
7393                  * If no bits are set, target can choose what preamble type to use.
7394                  */
7395                 preamble_type: 5,
7396 
7397                 /* Data:1 Mgmt:0 */
7398                 frame_type: 1,
7399 
7400                 /* Capture CFR when bit is set */
7401                 cfr_capture: 1,
7402 
7403                 /* Enables Beamforming when bit is set */
7404                 en_beamforming: 1,
7405 
7406                 /*
7407                  * Extra 3 bits of retry limit defined in tx_param_dword0,
7408                  * to allow maximum 127 retries for specific frames.
7409                  */
7410                 retry_limit_ext: 3,
7411 
7412                 reserved1_31_26: 6;
7413         };
7414         A_UINT32 tx_param_dword1;
7415     };
7416 } wmi_tx_send_params;
7417 
7418 #define WMI_MLO_MGMT_TID 0xFFFFFFFF
7419 
7420 typedef struct {
7421     A_UINT32 tlv_header; /* TLV tag (WMITLV_TAG_STRUC_wmi_mlo_tx_send_params) and len */
7422     A_UINT32 hw_link_id; /** Unique link id across SOCs, provided by QMI handshake.
7423                            * If WMI_MLO_MGMT_TID then the frame will be queued in the MLO queue
7424                            * If valid hw_link_id
7425                            */
7426 } wmi_mlo_tx_send_params;
7427 
7428 typedef struct {
7429     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_send_cmd_fixed_param */
7430     A_UINT32 vdev_id;
7431     A_UINT32 desc_id;  /* echoed in tx_compl_event */
7432     A_UINT32 chanfreq; /* MHz units */
7433     /* WMI_MGMT_TX_SEND_CMDID is used for both pass by value and
7434      * pass by reference WMI management frames.
7435      *
7436      * a) If the command is for pass by reference,
7437      *    paddr_lo and padd_hi will hold the address of remote/host buffer
7438      * b) If the command is for pass by value,
7439      *    paddr_lo and paddr_hi will be NULL.
7440      */
7441     A_UINT32 paddr_lo;
7442     A_UINT32 paddr_hi;
7443     A_UINT32 frame_len;
7444     A_UINT32 buf_len;  /** Buffer length in bytes */
7445     /*
7446      * The frame which will have tx_params_valid set will be always be RAW
7447      * frame, as it will be tx'ed on non-pause tid
7448      */
7449     A_UINT32 tx_params_valid;
7450     /* tx_flags:
7451      * Extra flags when tx_params_valid is 0.
7452      * Refer to WMI_TX_SEND_FLAG_xxx defs regarding the meaning of the
7453      * bits within this field.
7454      */
7455     A_UINT32 tx_flags;
7456     /* peer_rssi:
7457      * If non-zero, indicates saved peer beacon/probe resp RSSI (dBm units)
7458      * ONLY for init connection auth/assoc pkt.
7459      */
7460     A_INT32 peer_rssi;
7461 
7462 
7463 /* This TLV is followed by array of bytes: First 64 bytes of management frame
7464  *   A_UINT8 bufp[];
7465  */
7466 /* This TLV is followed by wmi_tx_send_params
7467  * wmi_tx_send_params tx_send_params;
7468  * wmi_mlo_tx_send_params mlo_tx_send_params[];
7469  *     Note: WMI_MLO_MGMT_TID path validated for specific scenario
7470  *     (BTM Usecase). Full support is not available.
7471  * wmi_tx_send_params_ext tx_send_params_ext[0 or 1];
7472  */
7473 } wmi_mgmt_tx_send_cmd_fixed_param;
7474 
7475 typedef struct {
7476     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offchan_data_tx_send_cmd_fixed_param */
7477     A_UINT32 vdev_id;
7478     A_UINT32 desc_id;  /* echoed in tx_compl_event */
7479     A_UINT32 chanfreq; /* MHz units */
7480     A_UINT32 paddr_lo;
7481     A_UINT32 paddr_hi;
7482     A_UINT32 frame_len;
7483     A_UINT32 buf_len;  /** Buffer length in bytes */
7484     /* The frame which will have tx_params_valid set will be always be RAW
7485      * frame, as it will be tx'ed on non-pause tid
7486      */
7487     A_UINT32 tx_params_valid;
7488 
7489 /* This TLV is followed by array of bytes: First 64 bytes of frame
7490  *   A_UINT8 bufp[];
7491  */
7492 /* This TLV is followed by wmi_tx_send_params
7493  * wmi_tx_send_params tx_send_params;
7494  */
7495 } wmi_offchan_data_tx_send_cmd_fixed_param;
7496 
7497 typedef struct {
7498     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_qos_null_frame_tx_send_cmd_fixed_param */
7499     A_UINT32 vdev_id;
7500     A_UINT32 desc_id;  /* echoed in tx_compl_event */
7501     A_UINT32 paddr_lo; /* paddr_lo and padd_hi will hold the address of remote/host buffer, which is physical address of frame */
7502     A_UINT32 paddr_hi;
7503     A_UINT32 frame_len; /* Actual length of frame in bytes*/
7504     A_UINT32 buf_len;  /** Buffer length in bytes, length of data DMA'ed to FW from host */
7505 
7506 /* This fixed_param TLV is followed by the TLVs listed below:
7507  * 1.  ARRAY_BYTE TLV: First buf_len (expected to be 64) bytes of frame
7508  *     A_UINT8 bufp[];
7509  * 2.  wmi_tx_send_params tx_send_params;
7510  */
7511 } wmi_qos_null_frame_tx_send_cmd_fixed_param;
7512 
7513 typedef struct {
7514     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_event_fixed_param */
7515     A_UINT32 value;
7516 } wmi_echo_event_fixed_param;
7517 
7518 typedef struct {
7519     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_cmd_fixed_param */
7520     A_UINT32 value;
7521 } wmi_echo_cmd_fixed_param;
7522 
7523 typedef struct {
7524     A_UINT32 tlv_header; /* TLV tag and len; tag would be equivalent to WMITLV_TAG_STRUC_wmi_mlo_link_disable_request_event_fixed_param  */
7525     /** AP MLD address request to be disabled some set of link */
7526     wmi_mac_addr mld_addr;
7527     /** Request link id set to disable */
7528     A_UINT32 linkid_bitmap;
7529 } wmi_mlo_link_disable_request_event_fixed_param;
7530 
7531 typedef enum {
7532     /**
7533      * Projects support to offload regulatory database by default.
7534      * If don`t offload regulatory database, host can set this bit.
7535      */
7536     WMI_REGDOMAIN_DATABASE_NO_OFFLOAD_BITMASK = 0x00000001,
7537 } WMI_REGDOMAIN_BITMASK;
7538 
7539 typedef struct {
7540     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_regdomain_cmd_fixed_param */
7541 
7542     /** pdev_id for identifying the MAC
7543      * See macros starting with WMI_PDEV_ID_ for values.
7544      */
7545     A_UINT32 pdev_id;
7546     /** reg domain code */
7547     A_UINT32 reg_domain;
7548     A_UINT32 reg_domain_2G; /* fulfil 2G domain ID */
7549     A_UINT32 reg_domain_5G; /* fulfil 5G domain ID */
7550     A_UINT32 conformance_test_limit_2G; /* 2G whole band CTL index */
7551     A_UINT32 conformance_test_limit_5G; /* 5G whole band CTL index */
7552     A_UINT32 dfs_domain;
7553 
7554     /**
7555      * The below conformance_test_limit index fields are for supporting the
7556      * 5G sub-band CTL feature.
7557      * Conformance test limits (CTLs) are the product-specific
7558      * regulatory-compliant powers stored in the board data file (BDF).
7559      * These CTLs within the BDF are identified by CTL index values.
7560      * For example, the BDF file is expected to contain CTL data for
7561      * FCC (CTL index = 0x10), ETSI (CTL index = 0x30),
7562      * Japan/MKK (CTL index = 0x40), Korea (CTL index = 0x50),
7563      * and China (CTL index = 0x60) CTL regions.
7564      * The target FW will use the CTL indices specified in this message to
7565      * find a BDF CTL entry with a matching CTL index value, and then use
7566      * that CTL as one of the inputs into the tx power limit computation.
7567      * A CTL index value of 0x0 is invalid, and will be ignored by the FW.
7568      */
7569     A_UINT32 conformance_test_limit_5G_subband_UNII1;
7570     A_UINT32 conformance_test_limit_5G_subband_UNII2a;
7571     A_UINT32 conformance_test_limit_5G_subband_UNII2c;
7572     A_UINT32 conformance_test_limit_5G_subband_UNII3;
7573     A_UINT32 conformance_test_limit_5G_subband_UNII4;
7574     /**
7575      * The below conformance_test_limit index fields are like the above,
7576      * but are for supporting the 6G sub-band CTL feature.
7577      */
7578     A_UINT32 conformance_test_limit_6G_subband_UNII5;
7579     A_UINT32 conformance_test_limit_6G_subband_UNII6;
7580     A_UINT32 conformance_test_limit_6G_subband_UNII7;
7581     A_UINT32 conformance_test_limit_6G_subband_UNII8;
7582 
7583     /**
7584      * In 6G sub-band CTL, fulfil 6G domain id and whole band CTL index firstly.
7585      * Unlike 5G sub-band CTL index fields, role ap and role client have
7586      * different indices.
7587      * Each role has 3 sub-band indices due to different power_mode type.
7588      * Below 3 represent for power_mode types: 0-LPI, 1-SP, 2-VLP
7589      * Below 2 represent for client_max: 0-default, 1-subordinate
7590      */
7591 
7592     A_UINT32 reg_domain_6G;  /* fulfil 6G domain id */
7593     A_UINT32 conformance_test_limit_6G; /* 6G whole band CTL index */
7594 
7595     A_UINT32 conformance_test_limit_6G_subband_UNII5_ap[3];
7596     A_UINT32 conformance_test_limit_6G_subband_UNII6_ap[3];
7597     A_UINT32 conformance_test_limit_6G_subband_UNII7_ap[3];
7598     A_UINT32 conformance_test_limit_6G_subband_UNII8_ap[3];
7599 
7600     A_UINT32 conformance_test_limit_6G_subband_UNII5_client[3][2];
7601     A_UINT32 conformance_test_limit_6G_subband_UNII6_client[3][2];
7602     A_UINT32 conformance_test_limit_6G_subband_UNII7_client[3][2];
7603     A_UINT32 conformance_test_limit_6G_subband_UNII8_client[3][2];
7604 
7605     /** reg domain bitmap */
7606     A_UINT32 regdomain_bitmap;
7607 } wmi_pdev_set_regdomain_cmd_fixed_param;
7608 
7609 typedef struct {
7610     /** TRUE for scan start and flase for scan end */
7611     A_UINT32 scan_start;
7612 } wmi_pdev_scan_cmd;
7613 
7614 /* WMI support for setting ratemask in target */
7615 
7616 typedef struct {
7617     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_config_ratemask_fixed_param */
7618     A_UINT32 vdev_id;
7619     /*
7620      * 0 - cck/ofdm
7621      * 1 - HT
7622      * 2 - VHT
7623      * 3 - HE
7624      * 4 - EHT
7625      *
7626      * Rate Bit mask format:
7627      *     <MCS in NSS MAX> ...
7628      *     <MCS MAX, ..., 2, 1, 0 : NSS2>
7629      *     <MCS MAX, ..., 2, 1, 0 : NSS1>
7630      * EHT Rate Bit Mask format:
7631      *     <MCS in NSS MAX> ...
7632      *     <MCS MAX, ... 2, 1, 0, -1, -2 : NSS2>
7633      *     <MCS MAX, ..., 2, 1, 0, -1(DCM), -2(EHT Dup) : NSS1>
7634      */
7635     A_UINT32 type;
7636 
7637     A_UINT32 mask_lower32;
7638     A_UINT32 mask_higher32;
7639     A_UINT32 mask_lower32_2;
7640     A_UINT32 mask_higher32_2;
7641 } wmi_vdev_config_ratemask_cmd_fixed_param;
7642 
7643 /* nrp action - Filter Neighbor Rx Packets  - add/remove filter */
7644 enum {
7645     WMI_FILTER_NRP_ACTION_ADD        = 0x1,
7646     WMI_FILTER_NRP_ACTION_REMOVE     = 0x2,
7647     WMI_FILTER_NRP_ACTION_GET_LIST   = 0x3,
7648 }; /* nrp - Neighbor Rx Packets */
7649 
7650 /* nrp type - Filter Neighbor Rx Packets  - ap/client addr */
7651 enum {
7652     WMI_FILTER_NRP_TYPE_AP_BSSID     = 0x1,
7653     WMI_FILTER_NRP_TYPE_STA_MACADDR  = 0x2,
7654 };
7655 
7656 /* nrp flag - Filter Neighbor Rx Packets
7657  * (capture flag, 2 & 3 not initially supported)
7658  */
7659 enum {
7660     WMI_FILTER_NRP_CAPTURE_ONLY_RX_PACKETS      = 0x1,
7661     WMI_FILTER_NRP_CAPTURE_ONLY_TX_PACKETS      = 0x2,
7662     WMI_FILTER_NRP_CAPTURE_BOTH_TXRX_PACKETS    = 0x3,
7663 };
7664 
7665 typedef struct {
7666     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_filter_nrp_config_cmd_fixed_param */
7667     A_UINT32 vdev_id;
7668     /* AP Bssid or Client Mac-addr */
7669     wmi_mac_addr addr;
7670     /* Add/Remove NRF Filter */
7671     A_UINT32 action; /* WMI_FILTER_NRP_ACTION enum */
7672     /* client/ap filter */
7673     A_UINT32 type; /* WMI_FILTER_NRP_TYPE enum */
7674     /* optional - tx/rx capture */
7675     A_UINT32 flag; /* WMI_FILTER_NRP_CAPTURE enum */
7676     /* BSSID index - index of the BSSID register */
7677     A_UINT32 bssid_idx;
7678 } wmi_vdev_filter_nrp_config_cmd_fixed_param; /* Filter for Neighbor Rx Packets */
7679 
7680 /* tx peer filter action - Filter Tx Packets  - add/remove filter */
7681 enum {
7682     WMI_PEER_TX_FILTER_ACTION_ADD                           = 1,
7683     WMI_PEER_TX_FILTER_ACTION_REMOVE                        = 2,
7684     WMI_PEER_TX_FILTER_ACTION_ADD_AND_ENABLE_FILTERING      = 3,
7685     WMI_PEER_TX_FILTER_ACTION_REMOVE_AND_CLEAR_FILTERING    = 4,
7686 };
7687 
7688 typedef struct {
7689     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tx_filter_cmd_fixed_param */
7690     A_UINT32 vdev_id;
7691     /* Client  MAC addr */
7692     wmi_mac_addr addr;
7693     /* Add/Remove monitor_sta Filter */
7694     A_UINT32 action; /* WMI_PEER_TX_FILTER_ACTION enum */
7695 } wmi_peer_tx_filter_cmd_fixed_param; /* Filter for TX Packets */
7696 
7697 /* Command to set/unset chip in quiet mode */
7698 typedef struct {
7699     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_quiet_cmd_fixed_param */
7700     A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
7701     A_UINT32 period; /*period in TUs*/
7702     A_UINT32 duration; /*duration in TUs*/
7703     A_UINT32 next_start; /*offset in TUs*/
7704     A_UINT32 enabled; /*enable/disable*/
7705 } wmi_pdev_set_quiet_cmd_fixed_param;
7706 
7707 typedef struct {
7708     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_quiet_cmd_fixed_param */
7709     A_UINT32 vdev_id;    /* Virtual interface ID */
7710     A_UINT32 period;     /* period in TUs */
7711     A_UINT32 duration;   /* duration in TUs */
7712     A_UINT32 next_start; /* offset in TUs */
7713     A_UINT32 enabled;    /* enable/disable */
7714 } wmi_vdev_set_quiet_cmd_fixed_param;
7715 
7716 /*
7717  * START_STOP flag value: 1 - Start, 0 - Stop
7718  */
7719 #define WMI_OFFLOAD_QUIET_FLAG_START_STOP              0x00000001
7720 /*
7721  * ONE_SHOT flag value: 1 - One shot, 0 - Repeat
7722  * This flag is only relevant if the START_STOP flag == 1 (start).
7723  */
7724 #define WMI_OFFLOAD_QUIET_FLAG_ONE_SHOT                0x00000002
7725 /*
7726  * Enable/Disable sending Quiet IE info in SWBA event from the target
7727  * 0 - Don't include Quiet IE in WMI SWBA Event
7728  * 1 - Include Quiet IE in WMI SWBA Event
7729  */
7730 #define WMI_OFFLOAD_QUIET_FLAG_INFO_IN_SWBA_START_STOP 0x00000004
7731 
7732 typedef struct {
7733     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_bcn_offload_ml_quiet_config_params */
7734     A_UINT32 vdev_id;    /* partner vdev_id */
7735     A_UINT32 hw_link_id; /* hw_link_id: Unique link id across SOCs, got as part of QMI handshake */
7736     A_UINT32 beacon_interval; /* beacon interval in TU from received beacon of the partner link */
7737     A_UINT32 period;     /* period in TUs */
7738     A_UINT32 duration;   /* duration in TUs */
7739     A_UINT32 next_start; /* offset in TUs from beacon */
7740     A_UINT32 flags;      /* STOP or START (and single vs. repeated) Quiet IE
7741                           * See WMI_OFFLOAD_QUIET_FLAG_xxx defs.
7742                           */
7743 } wmi_vdev_bcn_offload_ml_quiet_config_params;
7744 
7745 typedef struct {
7746     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_bcn_offload_quiet_config_cmd_fixed_param */
7747     A_UINT32 vdev_id;    /* Virtual interface ID */
7748     A_UINT32 period;     /* period in TUs */
7749     A_UINT32 duration;   /* duration in TUs */
7750     A_UINT32 next_start; /* offset in TUs from beacon */
7751     A_UINT32 flags;      /* STOP or START (and single vs. repeated) Quiet IE
7752                           * See WMI_OFFLOAD_QUIET_FLAG_xxx defs.
7753                           */
7754 /*
7755  * This TLV is optionally followed by array of wmi_vdev_bcn_offload_ml_quiet_config_params struct
7756  * wmi_vdev_bcn_offload_ml_quiet_config_params will have multiple instances equal to num of links in an AP MLD
7757  *   wmi_vdev_bcn_offload_ml_quiet_config_params ml_quiet_param[];
7758  */
7759 } wmi_vdev_bcn_offload_quiet_config_cmd_fixed_param;
7760 
7761 typedef struct {
7762     A_UINT32 tlv_header;   /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_custom_aggr_size_cmd_fixed_param */
7763     A_UINT32 vdev_id;      /* vdev id indicating to which the vdev custom aggregation size will be applied. */
7764     /* Size for tx aggregation for the vdev mentioned in vdev id
7765      * (max MPDUs per A-MPDU or max MSDUs per A-MSDU based on aggr_type field)
7766      */
7767     A_UINT32 tx_aggr_size;
7768 
7769     A_UINT32 rx_aggr_size; /* Size for rx aggregation (block ack window size limit) for the vdev mentioned in vdev id */
7770 
7771     /*
7772      * To set TX aggregation size limits per VDEV per AC
7773      * bits 1:0 (ac):
7774      *     Access Category (0x0=BE, 0x1=BK, 0x2=VI, 0x3=VO)
7775      *     If tx_ac_enable bit is not set, tx_aggr_size is applied
7776      *     for all Access Categories
7777      * bit 2 (aggr_type):             TX Aggregation Type (0=A-MPDU, 1=A-MSDU)
7778      * bit 3 (tx_aggr_size_disable):  If set tx_aggr_size is invalid
7779      * bit 4 (rx_aggr_size_disable):  If set rx_aggr_size is invalid
7780      * bit 5 (tx_ac_enable):          If set, above ac bitmap is valid.
7781      * bit 6 (256 BA support enable)  If set, Default 256 BA size is expected
7782      *                                from host
7783      * bit 7 (1024 BA support enable) If set, Default 1024 BA size is expected
7784      *                                from host
7785      * bits 31:8:                     Reserved bits. should be set to zero.
7786      */
7787     A_UINT32 enable_bitmap;
7788 } wmi_vdev_set_custom_aggr_size_cmd_fixed_param;
7789 
7790 typedef enum {
7791     WMI_VDEV_CUSTOM_AGGR_TYPE_AMPDU = 0,
7792     WMI_VDEV_CUSTOM_AGGR_TYPE_AMSDU = 1,
7793     WMI_VDEV_CUSTOM_AGGR_TYPE_MAX,
7794 } wmi_vdev_custom_aggr_type_t;
7795 
7796 #define WMI_VDEV_CUSTOM_AGGR_AC_BITPOS           0
7797 #define WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS         2
7798 #define WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS         2
7799 #define WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS       1
7800 #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS    3
7801 #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS  1
7802 #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS    4
7803 #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS  1
7804 #define WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS          5
7805 #define WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS        1
7806 #define WMI_VDEV_CUSTOM_AGGR_256_BA_EN_BITPOS    6
7807 #define WMI_VDEV_CUSTOM_AGGR_256_BA_EN_NUM_BITS  1
7808 #define WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_BITPOS   7
7809 #define WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_NUM_BITS 1
7810 
7811 #define WMI_VDEV_CUSTOM_AGGR_AC_SET(param, value) \
7812     WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_AC_BITPOS, \
7813         WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS, value)
7814 #define WMI_VDEV_CUSTOM_AGGR_AC_GET(param)         \
7815     WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_AC_BITPOS, \
7816         WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS)
7817 
7818 #define WMI_VDEV_CUSTOM_AGGR_TYPE_SET(param, value) \
7819     WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS, \
7820         WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS, value)
7821 #define WMI_VDEV_CUSTOM_AGGR_TYPE_GET(param)         \
7822     WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS, \
7823         WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS)
7824 
7825 #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_SET(param, value) \
7826     WMI_SET_BITS(param, WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS, \
7827         WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS, value)
7828 #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_GET(param)         \
7829     WMI_GET_BITS(param, WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS, \
7830         WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS)
7831 
7832 #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_SET(param, value) \
7833     WMI_SET_BITS(param, WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS, \
7834         WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS, value)
7835 #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_GET(param)         \
7836     WMI_GET_BITS(param, WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS, \
7837         WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS)
7838 
7839 #define WMI_VDEV_CUSTOM_TX_AC_EN_SET(param, value) \
7840     WMI_SET_BITS(param, WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS, \
7841         WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS, value)
7842 #define WMI_VDEV_CUSTOM_TX_AC_EN_GET(param)         \
7843     WMI_GET_BITS(param, WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS, \
7844         WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS)
7845 
7846 #define WMI_VDEV_CUSTOM_AGGR_256_BA_EN_SET(param, value) \
7847     WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_256_BA_EN_BITPOS, \
7848         WMI_VDEV_CUSTOM_AGGR_256_BA_EN_NUM_BITS, value)
7849 #define WMI_VDEV_CUSTOM_AGGR_256_BA_EN_GET(param)         \
7850     WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_256_BA_EN_BITPOS, \
7851         WMI_VDEV_CUSTOM_AGGR_256_BA_EN_NUM_BITS)
7852 
7853 #define WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_SET(param, value) \
7854     WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_BITPOS, \
7855         WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_NUM_BITS, value)
7856 #define WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_GET(param)         \
7857     WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_BITPOS, \
7858         WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_NUM_BITS)
7859 
7860 typedef enum {
7861     WMI_VDEV_CUSTOM_SW_RETRY_TYPE_NONAGGR = 0,
7862     WMI_VDEV_CUSTOM_SW_RETRY_TYPE_AGGR = 1,
7863     WMI_VDEV_CUSTOM_SW_RETRY_TYPE_MAX,
7864 } wmi_vdev_custom_sw_retry_type_t;
7865 
7866 typedef struct {
7867     A_UINT32 tlv_header;   /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_custom_sw_retry_th_cmd_fixed_param */
7868     A_UINT32 vdev_id;      /* vdev id indicating to which the vdev custom software retries will be applied. */
7869     A_UINT32 ac_type;      /* access category (VI, VO, BE, BK) enum wmi_traffic_ac */
7870     A_UINT32 sw_retry_type; /* 0 = non-aggr retry, 1 = aggr retry (wmi_vdev_custom_sw_retry_type_t enum) */
7871     A_UINT32 sw_retry_th;   /* max retry count per AC base on ac_type for the vdev mentioned in vdev id*/
7872 } wmi_vdev_set_custom_sw_retry_th_cmd_fixed_param;
7873 
7874 typedef struct {
7875     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_chainmask_config_cmd_fixed_param */
7876     A_UINT32 tlv_header;
7877     /* vdev id indicating to which the vdev, this chainmask configuration will be applied. */
7878     A_UINT32 vdev_id;
7879     /* number of chains to use for transmissions in 2.4 GHz band
7880      * If vdev is MLO vdev, below 2g params apply to all 2.4 GHz band links
7881      * If vdev is MLO vdev, below 5g params apply to all 5/6 GHz band links
7882      */
7883     A_UINT32 num_tx_chains_2g;
7884     /* number of chains to use for reception in 2.4 GHz band */
7885     A_UINT32 num_rx_chains_2g;
7886     /* nss to use for transmissions in 2.4 GHz band */
7887     A_UINT32 tx_nss_2g;
7888     /* nss to use for reception in 2.4 GHz band */
7889     A_UINT32 rx_nss_2g;
7890     /* number of chains to use for 11b transmissions. Valid only in 2.4 GHz */
7891     A_UINT32 num_tx_chains_b;
7892     /* number of chains to use for 11g transmissions. Valid only in 2.4 GHz */
7893     A_UINT32 num_tx_chains_g;
7894     /* number of chains to use for transmissions in 5 GHz band */
7895     A_UINT32 num_tx_chains_5g;
7896     /* number of chains to use for reception in 5 GHz band */
7897     A_UINT32 num_rx_chains_5g;
7898     /* nss to use for transmissions in 5 GHz band */
7899     A_UINT32 tx_nss_5g;
7900     /* nss to use for reception in 5 GHz band */
7901     A_UINT32 rx_nss_5g;
7902     /* number of chains to use for 11a transmissions. Valid only in 5 GHz */
7903     A_UINT32 num_tx_chains_a;
7904     /* If non-zero then use only one chain for TX when connection tx_nss is 1 in 2.4 GHz */
7905     A_UINT32 disable_tx_mrc_2g;
7906     /* If non-zero then use only one chain for RX when connection rx_nss is 1 in 2.4 GHz */
7907     A_UINT32 disable_rx_mrc_2g;
7908     /* If non-zero then use only one chain for TX when connection tx_nss is 1 in 5 GHz */
7909     A_UINT32 disable_tx_mrc_5g;
7910     /* If non-zero then use only one chain for RX when connection rx_nss is 1 in 5 GHz */
7911     A_UINT32 disable_rx_mrc_5g;
7912     /* Whether fast chain selection is needed when TX chain num is 1 */
7913     A_UINT32 fast_chain_selection;
7914     /* RSSI delta threshold to determine better chain, units: dB */
7915     A_UINT32 better_chain_rssi_threshold;
7916 } wmi_vdev_chainmask_config_cmd_fixed_param;
7917 
7918 /*
7919  * Command to enable/disable Green AP Power Save.
7920  * This helps conserve power during AP operation. When the AP has no
7921  * stations associated with it, the host can enable Green AP Power Save
7922  * to request the firmware to shut down all but one transmit and receive
7923  * chains.
7924  */
7925 typedef struct {
7926     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_green_ap_ps_enable_cmd_fixed_param */
7927     /** pdev_id for identifying the MAC
7928      * See macros starting with WMI_PDEV_ID_ for values.
7929      */
7930     A_UINT32 pdev_id;
7931     A_UINT32 enable; /*1:enable, 0:disable*/
7932 } wmi_pdev_green_ap_ps_enable_cmd_fixed_param;
7933 
7934 
7935 #define MAX_HT_IE_LEN 32
7936 /* DEPRECATED */
7937 typedef struct {
7938     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ht_ie_cmd_fixed_param */
7939     A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
7940     A_UINT32 ie_len; /*length of the ht ie in the TLV ie_data[] */
7941     A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
7942     A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
7943 /** The TLV for the HT IE follows:
7944  *       A_UINT32 ie_data[];
7945  */
7946 } wmi_pdev_set_ht_ie_cmd_fixed_param;
7947 
7948 #define MAX_VHT_IE_LEN 32
7949 /* DEPRECATED */
7950 typedef struct {
7951     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_vht_ie_cmd_fixed_param */
7952     A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
7953     A_UINT32 ie_len; /*length of the vht ie in the TLV ie_data[] */
7954     A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
7955     A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
7956 /** The TLV for the VHT IE follows:
7957  *       A_UINT32 ie_data[];
7958  */
7959 } wmi_pdev_set_vht_ie_cmd_fixed_param;
7960 
7961 typedef struct {
7962     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_base_macaddr_cmd_fixed_param */
7963     /** pdev_id for identifying the MAC
7964      * See macros starting with WMI_PDEV_ID_ for values.
7965      */
7966     A_UINT32 pdev_id;
7967     wmi_mac_addr base_macaddr;
7968 } wmi_pdev_set_base_macaddr_cmd_fixed_param;
7969 
7970 
7971 enum wmi_spectral_scan_mode {
7972     WMI_SPECTRAL_SCAN_NORMAL_MODE,
7973     WMI_SPECTRAL_SCAN_AGILE_MODE,
7974 
7975     WMI_SPECTRAL_SCAN_MAX_MODE /* keep this last */
7976 };
7977 
7978 /*
7979  * For now, the spectral configuration is global rather than
7980  * per-vdev.  The vdev is a placeholder and will be ignored
7981  * by the firmware.
7982  */
7983 typedef struct {
7984     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_configure_cmd_fixed_param */
7985     A_UINT32 vdev_id;
7986     A_UINT32 spectral_scan_count;
7987     A_UINT32 spectral_scan_period;
7988     A_UINT32 spectral_scan_priority;
7989     A_UINT32 spectral_scan_fft_size;
7990     A_UINT32 spectral_scan_gc_ena;
7991     A_UINT32 spectral_scan_restart_ena;
7992     A_UINT32 spectral_scan_noise_floor_ref;
7993     A_UINT32 spectral_scan_init_delay;
7994     A_UINT32 spectral_scan_nb_tone_thr;
7995     A_UINT32 spectral_scan_str_bin_thr;
7996     A_UINT32 spectral_scan_wb_rpt_mode;
7997     A_UINT32 spectral_scan_rssi_rpt_mode;
7998     A_UINT32 spectral_scan_rssi_thr;
7999     A_UINT32 spectral_scan_pwr_format;
8000     A_UINT32 spectral_scan_rpt_mode;
8001     A_UINT32 spectral_scan_bin_scale;
8002     A_UINT32 spectral_scan_dBm_adj;
8003     A_UINT32 spectral_scan_chn_mask;
8004     /* See enum wmi_spectral_scan_mode */
8005     A_UINT32 spectral_scan_mode;
8006     union {
8007         /**
8008          * Two center frequencies are required for agile channel switch
8009          * supporting True 160 and Restricted 160 ((80+80) or 165) MHz.
8010          * This parameter specifies the center frequency for cases with a
8011          * contiguous channel, and the center frequency of the primary
8012          * portion of a non-contiguous (80+80 or 165 MHz) channel.
8013          */
8014         A_UINT32 spectral_scan_center_freq;
8015         A_UINT32 spectral_scan_center_freq1;
8016     };
8017     /* agile span primary channel frequency (MHz), 0 for normal scan*/
8018     A_UINT32 spectral_scan_chan_freq;
8019     /* agile scan bandwidth (20, 40, 80, 80+80, 160), enum wmi_channel_width */
8020     A_UINT32 spectral_scan_chan_width;
8021     /**
8022      * Adding freq2 to support True 160 and restricted 160 ((80+80) or 165) MHz.
8023      * agile span center frequency2 (MHz), 0 for normal scan.
8024      */
8025     A_UINT32 spectral_scan_center_freq2;
8026     /**
8027      * Flag to enable re-capture of FFT sample if the previous sample has
8028      * AGC gain change bit set.
8029      * Re-capture will be enabled only if scan period is greater than 50us.
8030      */
8031     A_UINT32 recapture_sample_on_gain_change;
8032 } wmi_vdev_spectral_configure_cmd_fixed_param;
8033 
8034 /*
8035  * Enabling, disabling and triggering the spectral scan
8036  * is a per-vdev operation.  That is, it will set channel
8037  * flags per vdev rather than globally; so concurrent scan/run
8038  * and multiple STA (eg p2p, tdls, multi-band STA) is possible.
8039  */
8040 typedef struct {
8041     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_enable_cmd_fixed_param */
8042     A_UINT32 vdev_id;
8043     /* 0 - ignore; 1 - trigger, 2 - clear trigger */
8044     A_UINT32 trigger_cmd;
8045     /* 0 - ignore; 1 - enable, 2 - disable */
8046     A_UINT32 enable_cmd;
8047     /* See enum wmi_spectral_scan_mode */
8048     A_UINT32 spectral_scan_mode;
8049 } wmi_vdev_spectral_enable_cmd_fixed_param;
8050 
8051 typedef struct {
8052     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_tx_power_cmd_fixed_param */
8053     A_UINT32 vdev_id;
8054 } wmi_vdev_get_tx_power_cmd_fixed_param;
8055 
8056 /* Primary 80 bin values */
8057 #define WMI_SSCAN_PRI80_START_BIN_GET(pri80_bins)        WMI_GET_BITS(pri80_bins, 0, 16)
8058 #define WMI_SSCAN_PRI80_START_BIN_SET(pri80_bins, value) WMI_SET_BITS(pri80_bins, 0, 16, value)
8059 #define WMI_SSCAN_PRI80_END_BIN_GET(pri80_bins)          WMI_GET_BITS(pri80_bins, 16, 16)
8060 #define WMI_SSCAN_PRI80_END_BIN_SET(pri80_bins, value)   WMI_SET_BITS(pri80_bins, 16, 16, value)
8061 
8062 /* Secondary 80 bin values */
8063 #define WMI_SSCAN_SEC80_START_BIN_GET(sec80_bins)        WMI_GET_BITS(sec80_bins, 0, 16)
8064 #define WMI_SSCAN_SEC80_START_BIN_SET(sec80_bins, value) WMI_SET_BITS(sec80_bins, 0, 16, value)
8065 #define WMI_SSCAN_SEC80_END_BIN_GET(sec80_bins)          WMI_GET_BITS(sec80_bins, 16, 16)
8066 #define WMI_SSCAN_SEC80_END_BIN_SET(sec80_bins, value)   WMI_SET_BITS(sec80_bins, 16, 16, value)
8067 
8068 /* 5MHz bin values */
8069 #define WMI_SSCAN_MID_5MHZ_START_BIN_GET(mid_5mhz_bins)        WMI_GET_BITS(mid_5mhz_bins, 0, 16)
8070 #define WMI_SSCAN_MID_5MHZ_START_BIN_SET(mid_5mhz_bins, value) WMI_SET_BITS(mid_5mhz_bins, 0, 16, value)
8071 #define WMI_SSCAN_MID_5MHZ_END_BIN_GET(mid_5mhz_bins)          WMI_GET_BITS(mid_5mhz_bins, 16, 16)
8072 #define WMI_SSCAN_MID_5MHZ_END_BIN_SET(mid_5mhz_bins, value)   WMI_SET_BITS(mid_5mhz_bins, 16, 16, value)
8073 
8074 typedef struct {
8075     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_sscan_fw_cmd_fixed_param */
8076     A_UINT32 pdev_id;
8077 
8078     /* See enum wmi_spectral_scan_mode */
8079     A_UINT32 spectral_scan_mode;
8080 
8081     /**
8082       * This fixed_param TLV is followed by the below TLVs:
8083       *
8084       * wmi_pdev_sscan_fft_bin_index fft_bin_index[]; // array len = 0 or 1
8085       *     If present (array length is 1) this TLV specifies the primary
8086       *     and secondary channels FFT bin indices for True 160 and
8087       *     Restricted 160 (80+80 or 165) MHz BW cases.
8088       */
8089 } wmi_pdev_sscan_fw_cmd_fixed_param;
8090 
8091 /**
8092  * The below structure is used only to send the FFT bin numbers for
8093  * True 160 and Restricted 160(80+80 or 165) MHz from FW to HOST
8094  */
8095 typedef struct {
8096     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_sscan_fft_bin_index */
8097 
8098     /**
8099      * Bit 15 -  0 : primary 80 start bin number
8100      * Bit 31 - 16 : primary 80 end bin number
8101      * Refer to WMI_SSCAN_PRI80_[START,END]_BIN_[GET,SET] macros.
8102      * Only for True 160 and Restricted 160(80+80 or 165) MHz this
8103      * will be filled.
8104      */
8105     A_UINT32 pri80_bins;
8106 
8107     /**
8108      * Bit 15 -  0 : secondary 80 start bin number
8109      * Bit 31 - 16 : secondary 80 end bin number
8110      * Refer to WMI_SSCAN_SEC80_[START,END]_BIN_[GET,SET] macros.
8111      * Only for True 160 and Restricted 160(80+80 or 165) MHz this
8112      * will be filled.
8113      */
8114     A_UINT32 sec80_bins;
8115 
8116     /**
8117      * Bit 15 -  0 : 5Mhz start bin number
8118      * Bit 31 - 16 : 5Mhz end bin number
8119      * Refer to WMI_SSCAN_MID_5MHZ_[START,END]_BIN_[GET,SET] macros.
8120      * Only for Restricted 160(80+80 or 165), otherwise 0.
8121      */
8122     A_UINT32 mid_5mhz_bins;
8123 } wmi_pdev_sscan_fft_bin_index;
8124 
8125 #define WMI_SPECTRAL_CHAN_PUNCTURE_BMAP_GET(puncture_bmap) WMI_GET_BITS(puncture_bmap, 0, 16)
8126 #define WMI_SPECTRAL_CHAN_PUNCTURE_BMAP_SET(puncture_bmap, value) WMI_SET_BITS(puncture_bmap, 0 , 16, value)
8127 
8128 typedef struct {
8129     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_sscan_chan_info */
8130     /*
8131      *  For contiguous channels, cfreq1 should be represent the center of the entire span and
8132      *  cfreq2 should be 0 whereas for non-contiguous channels, cfreq1 should represent the
8133      *  center of primary segment whereas cfreq2 should represent the center of secondary segment
8134     */
8135     /* Information corresponding to operating channel */
8136     A_UINT32 operating_pri20_freq; /* In MHz */
8137     A_UINT32 operating_cfreq1;     /* In MHz */
8138     A_UINT32 operating_cfreq2;     /* In MHz */
8139     A_UINT32 operating_bw;         /* as per enum wmi_channel_width */
8140     /*
8141      * bits [15:0] are used to represent puncture modes where each bit indicates
8142      * whether that 20MHz channel is punctured.
8143      * bits [31:16] are reserved.
8144      */
8145     A_UINT32 operating_puncture_20mhz_bitmap;
8146 
8147     /* Information corresponding to channel in which spectral scan is done */
8148     A_UINT32 sscan_cfreq1; /* In MHz */
8149     A_UINT32 sscan_cfreq2; /* In MHz */
8150     A_UINT32 sscan_bw; /*  as per enum wmi_channel_width */
8151     /*
8152      * bits [15:0] are used to represent puncture modes where each bit indicates
8153      * whether that 20MHz channel is punctured.
8154      * bits [31:16] are reserved.
8155      */
8156     A_UINT32 sscan_puncture_20mhz_bitmap;
8157 } wmi_pdev_sscan_chan_info;
8158 
8159 typedef struct
8160 {
8161      A_UINT32 tlv_header;  /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_sscan_per_detector_info */
8162      A_UINT32 detector_id; /** ID of the detector involved in the spectral scan */
8163      /*
8164       * Start/End frequency (in MHz) to indicate the frequency range to which the detector is listening
8165      */
8166      A_UINT32 start_freq;       /* in MHz */
8167      A_UINT32 end_freq;         /* in MHz */
8168 } wmi_pdev_sscan_per_detector_info;
8169 
8170 typedef enum {
8171     /** Enum to indicate bmsk of spectral scan stop evt on scan count max out */
8172     WMI_SSCAN_EVT_BMSK_SCAN_STOP_SCOUNT = 0X00000001,
8173 
8174 
8175     /** Add more event code bmsks above this */
8176     WMI_SSCAN_EVT_BMSK_MAX = 0Xffffffff,
8177 } wmi_sscan_evt_message_code;
8178 
8179 /**
8180  * The below structure is used to send the start/stop triggers
8181  * for events related to spectral scan activity from
8182  * FW to host
8183  */
8184 typedef struct {
8185     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sscan_evt_message_fixed_param */
8186     A_UINT32 pdev_id;
8187 
8188     /** Refer Enum wmi_sscan_evt_message_code */
8189     A_UINT32 sscan_evt_code;
8190 } wmi_sscan_evt_message_fixed_param;
8191 
8192 #define WMI_BEACON_CTRL_TX_DISABLE  0
8193 #define WMI_BEACON_CTRL_TX_ENABLE   1
8194 #define WMI_BEACON_CTRL_SWBA_EVENT_DISABLE  2
8195 #define WMI_BEACON_CTRL_SWBA_EVENT_ENABLE   3
8196 
8197 typedef struct {
8198     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_offload_ctrl_cmd_fixed_param */
8199     /** unique id identifying the VDEV, generated by the caller */
8200     A_UINT32 vdev_id;
8201     A_UINT32 bcn_ctrl_op; /* fw default 1 (see WMI_BEACON_CTRL defs) */
8202 } wmi_bcn_offload_ctrl_cmd_fixed_param;
8203 
8204 /** common structure used for wmi_vedv_get_tx_power_event */
8205 typedef struct {
8206     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_tx_power_event_fixed_param */
8207     A_UINT32 tx_power; /** units: 0.5 dBm, per-chain tx power */
8208     A_UINT32 vdev_id; /** unique id identifying the VDEV, generated by the caller */
8209 } wmi_vdev_get_tx_power_event_fixed_param;
8210 
8211 typedef enum {
8212     /** Limit the offchannel duration */
8213     WMI_VDEV_LIMIT_OFFCHAN_ENABLE   = 0x1,
8214     /** Skip DFS channels from Scan channel list.
8215      *  valid for both host scans and FW scans */
8216     WMI_VDEV_LIMIT_OFFCHAN_SKIP_DFS = 0x2,
8217 } wmi_vdev_limit_offchan_flags;
8218 
8219 typedef struct {
8220     A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_vdev_limit_offchan_cmd_fixed_param */
8221     /** Limit the duration of offchannel events requested by the vdev corresponding to the specified vdev_id */
8222     A_UINT32 vdev_id;
8223     /** see enum wmi_vdev_limit_offchan_flags */
8224     A_UINT32 flags;
8225     /** max offchannel time allowed in msec when WMI_VDEV_LIMIT_OFFCHAN_ENABLE flag is set */
8226     A_UINT32 max_offchan_time;
8227     /** rest time in msec on the BSS channel */
8228     A_UINT32 rest_time;
8229 } wmi_vdev_limit_offchan_cmd_fixed_param;
8230 
8231 #define WMI_CSA_EVENT_QSBW_ISE_ID_MASK    0x000000FF /* information sub element id for QSBW, expected value is 0x02 */
8232 #define WMI_CSA_EVENT_QSBW_ISE_LEN_MASK   0x0000FF00 /* length of QSBW ISE data, expected value is 0x02 */
8233 #define WMI_CSA_EVENT_QSBW_ISE_CAP_MASK   0x00FF0000 /* capabilities, 0x01 for 5MHz, 0x02 for 10MHz, 0x01|0x2 for both (see WMI_CSA_EVENT_QSBW_ISE bitmask defs) */
8234 #define WMI_CSA_EVENT_QSBW_ISE_NOTIF_MASK 0xFF000000 /* notification from AP, 0x01 for 5MHz, 0x02 for 10MHz (see WMI_CSA_EVENT_QSBW_ISE bitmask defs) */
8235 
8236 #define WMI_CSA_EVENT_QSBW_ISE_ID 0x02
8237 #define WMI_CSA_EVENT_QSBW_ISE_LEN 0x02
8238 
8239 #define WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK  0x01
8240 #define WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK  0x02
8241 
8242 #define WMI_CSA_EVENT_QSBW_ISE_CAP_5M(qsbw_ise) \
8243     (((qsbw_ise) >> 16) & WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK)
8244 #define WMI_CSA_EVENT_QSBW_ISE_CAP_10M(qsbw_ise) \
8245     (((qsbw_ise) >> 16) & WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK)
8246 #define WMI_CSA_EVENT_QSBW_ISE_NOTIF_5M(qsbw_ise) \
8247     (((qsbw_ise) >> 24) & WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK)
8248 #define WMI_CSA_EVENT_QSBW_ISE_NOTIF_10M(qsbw_ise) \
8249     (((qsbw_ise) >> 24) & WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK)
8250 
8251 typedef enum {
8252     WMI_CSA_IE_PRESENT    = 0x00000001,
8253     WMI_XCSA_IE_PRESENT   = 0x00000002,
8254     WMI_WBW_IE_PRESENT    = 0x00000004,
8255     WMI_CSWRAP_IE_PRESENT = 0x00000008,
8256     WMI_CSWARP_IE_PRESENT = WMI_CSWRAP_IE_PRESENT, /* deprecated: typo */
8257     WMI_QSBW_ISE_PRESENT  = 0x00000010,
8258     WMI_CSWRAP_IE_EXTENDED_PRESENT = 0x00000020, /* Added bitmask to verify if the additional information is filled in */
8259     WMI_CSWRAP_IE_EXT_VER_2_PRESENT = 0x00000040 /* Added bitmask to see if additional info is present in CS wrap IE */
8260 } WMI_CSA_EVENT_IES_PRESENT_FLAG;
8261 
8262 /* wmi CSA receive event from beacon frame */
8263 typedef struct {
8264     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_event_fixed_param */
8265     A_UINT32 i_fc_dur; /* Bit 0-15: FC, Bit 16-31: DUR */
8266     wmi_mac_addr i_addr1;
8267     wmi_mac_addr i_addr2;
8268     /* NOTE: size of array of csa_ie[], xcsa_ie[], and wb_ie[] cannot be
8269      * changed in the future without breaking WMI compatibility */
8270     A_UINT32 csa_ie[2];
8271     A_UINT32 xcsa_ie[2];
8272     A_UINT32 wb_ie[2];
8273     union {
8274         A_UINT32 cswrap_ie; /* use this */
8275         A_UINT32 cswarp_ie; /* deprecated (typo) */
8276     };
8277     A_UINT32 ies_present_flag; /* WMI_CSA_EVENT_IES_PRESENT_FLAG */
8278     A_UINT32 qsbw_ise;
8279     /* cswrap_ie_extended:
8280      * Stores full IEEE80211_ELEMID_CHAN_SWITCH_WRAP information element.
8281      * The first two octets host the Element ID and Length fields.
8282      * The IE comprises New Country Subelement (optional and max length 6),
8283      * Wide Bandwidth Channel Subelement (optional and max length 5) and
8284      * New Transmit Power Envelope subelement (optional and max length 7)
8285      * The 4-byte words within cswrap_ie_extended[] use little endian ordering;
8286      * the first octect of the IE resides in bits 7:0 of cswrap_ie_extended[0],
8287      * the second octet resides in bits 15:8 of cswrap_ie_extended[0] and so on.
8288      */
8289     A_UINT32 cswrap_ie_extended[5];
8290 
8291     /* num_bytes_valid_in_cswrap_ie_ext_ver2:
8292      * This fixed_param TLV can be followed by a VAR length TLV
8293      * variable-length byte-array TLV for CS WRAP IE.
8294      * Since the variable-length byte-array TLVs are always padded, if needed,
8295      * to contain a multiple of 4 bytes, this field shows how many of the bytes
8296      * contain valid data, versus how many are only for alignment padding.
8297      */
8298     A_UINT32 num_bytes_valid_in_cswrap_ie_ext_ver2;
8299 
8300     /*
8301      * Add link id, mld address and link address
8302      * fields for N link CSA support
8303      */
8304     A_UINT32 link_id; /* Link id associated with AP */
8305     wmi_mac_addr mld_mac_address; /* AP mld mac address */
8306     wmi_mac_addr link_mac_address; /* AP link mac address */
8307     A_UINT32 mld_mac_address_present :1,
8308              link_mac_address_present :1,
8309              link_id_present :1,
8310              reserved :29;
8311 /*
8312  * This initial fixed_param TLV may be followed by the below TLVs:
8313  *   - cs_wrap_ie variable-length byte-array TLV
8314  */
8315 } wmi_csa_event_fixed_param;
8316 
8317 #define WMI_GET_MLD_MAC_ADDRESS_PRESENT(mld_mac_address_present) \
8318     WMI_GET_BITS(mld_mac_address_present, 0, 1)
8319 #define WMI_SET_MLD_MAC_ADDRESS_PRESENT(mld_mac_address_present, value) \
8320     WMI_SET_BITS(mld_mac_address_present, 0, 1, value)
8321 
8322 #define WMI_GET_LINK_ADDRESS_PRESENT(link_mac_address_present) \
8323     WMI_GET_BITS(link_mac_address_present, 1, 1)
8324 #define WMI_SET_LINK_ADDRESS_PRESENT(link_mac_address_present, value) \
8325     WMI_SET_BITS(link_mac_address_present, 1, 1, value)
8326 
8327 #define WMI_GET_LINK_ID_PRESENT(link_id_present) \
8328     WMI_GET_BITS(link_id_present, 2, 1)
8329 #define WMI_SET_LINK_ID_PRESENT(link_id_present, value) \
8330     WMI_SET_BITS(link_id_present, 2, 1, value)
8331 
8332 typedef enum {
8333     WMI_QUIET_EVENT_START = 0,
8334     WMI_QUIET_EVENT_STOP  = 1,
8335 } WMI_QUIET_EVENT_FLAG;
8336 
8337 /* WMI Quiet receive event from beacon frame */
8338 typedef struct {
8339     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_quiet_event_fixed_param */
8340     wmi_mac_addr mld_mac_address; /* AP mld mac address */
8341     wmi_mac_addr link_mac_address; /* AP link mac address */
8342     A_UINT32 linkid; /* Link id associated with AP */
8343     A_UINT32 mld_mac_address_present :1,
8344              link_mac_address_present :1,
8345              linkid_present :1,
8346              reserved :29;
8347     A_UINT32 quiet_status; /* WMI_QUIET_EVENT_FLAG: quiet start or stop */
8348 } wmi_quiet_event_fixed_param;
8349 
8350 typedef enum {
8351     WAL_PEER_MCAST2UCAST_DISABLED    = 0,
8352     WAL_PEER_MCAST2UCAST_DROP_EMPTY  = 1, /* Drop the frames if match is not found */
8353     WAL_PEER_MCAST2UCAST_MCAST_EMPTY = 2, /* Send as mcast if match is not found */
8354 } WMI_PEER_MCAST2UCAST_MODE;
8355 
8356 typedef enum {
8357     PKT_PWR_SAVE_NAP_ENABLE     = 0x00000001,
8358     PKT_PWR_SAVE_LS_ENABLE      = 0x00000002,
8359     PKT_PWR_SAVE_DS_ENABLE      = 0x00000004,
8360 
8361     PKT_PWR_SAVE_BTCOEX_ENABLE  = 0x00000008,
8362 
8363     PKT_PWR_SAVE_FSM_ENABLE     = 0x80000000,
8364 } WMI_PDEV_PKT_PWR_SAVE_LEVEL;
8365 
8366 /** MACROs to get user setting for enabling/disabling Secondary Rate Feature set
8367  * Bit-0    : Enable/Disable Control for "PPDU Secondary Retry Support"
8368  * Bit-1    : Enable/Disable Control for "RTS Black/White-listing Support"
8369  * Bit-2    : Enable/Disable Control for "Higher MCS retry restriction on XRETRY failures"
8370  * Bit 3-5  : "Xretry threshold" to use
8371  * Bit 6~31 : reserved for future use.
8372  */
8373 #define WMI_PDEV_PARAM_SECONDARY_RATE_ENABLE_BIT_S      0
8374 #define WMI_PDEV_PARAM_SECONDARY_RATE_ENABLE_BIT        0x00000001
8375 #define WMI_PDEV_PARAM_RTS_BL_WL_ENABLE_BIT_S           1
8376 #define WMI_PDEV_PARAM_RTS_BL_WL_ENABLE_BIT             0x00000002
8377 #define WMI_PDEV_PARAM_HIGHER_MCS_XRETRY_RESTRICTION_S  2
8378 #define WMI_PDEV_PARAM_HIGHER_MCS_XRETRY_RESTRICTION    0x00000004
8379 #define WMI_PDEV_PARAM_XRETRY_THRESHOLD_S               3
8380 #define WMI_PDEV_PARAM_XRETRY_THRESHOLD                 0x00000038
8381 
8382 #define WMI_PDEV_PARAM_IS_SECONDARY_RATE_ENABLED(word32)            WMI_F_MS(word32, WMI_PDEV_PARAM_SECONDARY_RATE_ENABLE_BIT)
8383 #define WMI_PDEV_PARAM_IS_RTS_BL_WL_ENABLED(word32)                 WMI_F_MS(word32, WMI_PDEV_PARAM_RTS_BL_WL_ENABLE_BIT)
8384 #define WMI_PDEV_PARAM_IS_HIGHER_MCS_XRETRY_RESTRICTION_SET(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_HIGHER_MCS_XRETRY_RESTRICTION)
8385 #define WMI_PDEV_PARAM_GET_XRETRY_THRESHOLD(word32)                 WMI_F_MS(word32, WMI_PDEV_PARAM_XRETRY_THRESHOLD)
8386 
8387 /*
8388  * The WMI_SCHED_MODE_FLAGS enum is used by the following WMI commands:
8389  *
8390  *     WMI_VDEV_PARAM_SET_DISABLED_SCHED_MODES
8391  *     WMI_PDEV_PARAM_SET_DISABLED_SCHED_MODES
8392  *     WMI_PEER_SCHED_MODE_DISABLE_CMDID
8393  *     WMI_SAWF_SVC_CLASS_CFG_CMDID
8394  */
8395 typedef enum {
8396     WMI_SCHED_MODE_DL_MU_MIMO = 0x00000001,
8397     WMI_SCHED_MODE_UL_MU_MIMO = 0x00000002,
8398     WMI_SCHED_MODE_DL_OFDMA   = 0x00000004,
8399     WMI_SCHED_MODE_UL_OFDMA   = 0x00000008,
8400 } WMI_SCHED_MODE_FLAGS;
8401 
8402 typedef enum {
8403     /** TX chain mask */
8404     WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
8405     /** RX chain mask */
8406     WMI_PDEV_PARAM_RX_CHAIN_MASK,                     /* 0x2 */
8407     /** TX power limit for 2G Radio */
8408     WMI_PDEV_PARAM_TXPOWER_LIMIT2G,                   /* 0x3 */
8409     /** TX power limit for 5G Radio */
8410     WMI_PDEV_PARAM_TXPOWER_LIMIT5G,                   /* 0x4 */
8411     /** TX power scale */
8412     WMI_PDEV_PARAM_TXPOWER_SCALE,                     /* 0x5 */
8413     /** Beacon generation mode . 0: host, 1: target   */
8414     WMI_PDEV_PARAM_BEACON_GEN_MODE,                   /* 0x6 */
8415     /** Beacon generation mode . 0: staggered 1: bursted   */
8416     WMI_PDEV_PARAM_BEACON_TX_MODE,                    /* 0x7 */
8417     /** Resource manager off chan mode .
8418      * 0: turn off off chan mode. 1: turn on offchan mode
8419      */
8420     WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE,               /* 0x8 */
8421     /** Protection mode  0: no protection 1:use CTS-to-self 2: use RTS/CTS */
8422     WMI_PDEV_PARAM_PROTECTION_MODE,                   /* 0x9 */
8423     /** Dynamic bandwidth 0: disable 1: enable */
8424     WMI_PDEV_PARAM_DYNAMIC_BW,                        /* 0xa */
8425     /** Non aggregrate/ 11g sw retry threshold.0-disable */
8426     WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH,               /* 0xb */
8427     /** aggregrate sw retry threshold. 0-disable*/
8428     WMI_PDEV_PARAM_AGG_SW_RETRY_TH,                   /* 0xc */
8429     /** Station kickout threshold (non of consecutive failures).0-disable */
8430     WMI_PDEV_PARAM_STA_KICKOUT_TH,                    /* 0xd */
8431     /** Aggerate size scaling configuration per AC */
8432     WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING,               /* 0xe */
8433     /** LTR enable */
8434     WMI_PDEV_PARAM_LTR_ENABLE,                        /* 0xf */
8435     /** LTR latency for BE, in us */
8436     WMI_PDEV_PARAM_LTR_AC_LATENCY_BE,                 /* 0x10 */
8437     /** LTR latency for BK, in us */
8438     WMI_PDEV_PARAM_LTR_AC_LATENCY_BK,                 /* 0x11 */
8439     /** LTR latency for VI, in us */
8440     WMI_PDEV_PARAM_LTR_AC_LATENCY_VI,                 /* 0x12 */
8441     /** LTR latency for VO, in us  */
8442     WMI_PDEV_PARAM_LTR_AC_LATENCY_VO,                 /* 0x13 */
8443     /** LTR AC latency timeout, in ms */
8444     WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT,            /* 0x14 */
8445     /** LTR platform latency override, in us */
8446     WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE,                /* 0x15 */
8447     /** LTR-M override, in us */
8448     WMI_PDEV_PARAM_LTR_RX_OVERRIDE,                   /* 0x16 */
8449     /** Tx activity timeout for LTR, in us */
8450     WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT,           /* 0x17 */
8451     /** L1SS state machine enable */
8452     WMI_PDEV_PARAM_L1SS_ENABLE,                       /* 0x18 */
8453     /** Deep sleep state machine enable */
8454     WMI_PDEV_PARAM_DSLEEP_ENABLE,                     /* 0x19 */
8455     /** RX buffering flush enable */
8456     WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH,                /* 0x1a */
8457     /** RX buffering matermark */
8458     WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK,            /* 0x1b */
8459     /** RX buffering timeout enable */
8460     WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN,               /* 0x1c */
8461     /** RX buffering timeout value */
8462     WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE,            /* 0x1d */
8463     /** pdev level stats update period in ms */
8464     WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,          /* 0x1e */
8465     /** vdev level stats update period in ms */
8466     WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD,          /* 0x1f */
8467     /** peer level stats update period in ms */
8468     WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD,          /* 0x20 */
8469     /** beacon filter status update period */
8470     WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD,        /* 0x21 */
8471     /** QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
8472     WMI_PDEV_PARAM_PMF_QOS,                           /* 0x22 */
8473     /** Access category on which ARP frames are sent */
8474     WMI_PDEV_PARAM_ARP_AC_OVERRIDE,                   /* 0x23 */
8475     /** DCS configuration */
8476     WMI_PDEV_PARAM_DCS,                               /* 0x24 */
8477     /** Enable/Disable ANI on target */
8478     WMI_PDEV_PARAM_ANI_ENABLE,                        /* 0x25 */
8479     /** configure the ANI polling period */
8480     WMI_PDEV_PARAM_ANI_POLL_PERIOD,                   /* 0x26 */
8481     /** configure the ANI listening period */
8482     WMI_PDEV_PARAM_ANI_LISTEN_PERIOD,                 /* 0x27 */
8483     /** configure OFDM immunity level */
8484     WMI_PDEV_PARAM_ANI_OFDM_LEVEL,                    /* 0x28 */
8485     /** configure CCK immunity level */
8486     WMI_PDEV_PARAM_ANI_CCK_LEVEL,                     /* 0x29 */
8487     /** Enable/Disable CDD for 1x1 STAs in rate control module */
8488     WMI_PDEV_PARAM_DYNTXCHAIN,                        /* 0x2a */
8489     /** Enable/Disable proxy STA */
8490     WMI_PDEV_PARAM_PROXY_STA,                         /* 0x2b */
8491     /** Enable/Disable low power state when all VDEVs are inactive/idle. */
8492     WMI_PDEV_PARAM_IDLE_PS_CONFIG,                    /* 0x2c */
8493     /** Enable/Disable power gating sleep */
8494     WMI_PDEV_PARAM_POWER_GATING_SLEEP,                /* 0x2d */
8495     /** Enable/Disable Rfkill */
8496     WMI_PDEV_PARAM_RFKILL_ENABLE,                     /* 0x2e */
8497     /** Set Bursting DUR */
8498     WMI_PDEV_PARAM_BURST_DUR,                         /* 0x2f */
8499     /** Set Bursting ENABLE */
8500     WMI_PDEV_PARAM_BURST_ENABLE,                      /* 0x30 */
8501     /** HW rfkill config */
8502     WMI_PDEV_PARAM_HW_RFKILL_CONFIG,                  /* 0x31 */
8503     /** Enable radio low power features */
8504     WMI_PDEV_PARAM_LOW_POWER_RF_ENABLE,               /* 0x32 */
8505    /** L1SS entry and residency time track */
8506     WMI_PDEV_PARAM_L1SS_TRACK,                        /* 0x33 */
8507     /** set hyst at runtime, requirement from SS */
8508     WMI_PDEV_PARAM_HYST_EN,                           /* 0x34 */
8509     /** Enable/ Disable POWER COLLAPSE */
8510     WMI_PDEV_PARAM_POWER_COLLAPSE_ENABLE,             /* 0x35 */
8511    /** configure LED system state */
8512     WMI_PDEV_PARAM_LED_SYS_STATE,                     /* 0x36 */
8513    /** Enable/Disable LED */
8514     WMI_PDEV_PARAM_LED_ENABLE,                        /* 0x37 */
8515     /** set DIRECT AUDIO time latency */
8516     WMI_PDEV_PARAM_AUDIO_OVER_WLAN_LATENCY, /* DEPRECATED */ /* 0x38 */
8517     /** set DIRECT AUDIO Feature ENABLE */
8518     WMI_PDEV_PARAM_AUDIO_OVER_WLAN_ENABLE, /* DEPRECATED */  /* 0x39 */
8519     /** pdev level whal mib stats update enable */
8520     WMI_PDEV_PARAM_WHAL_MIB_STATS_UPDATE_ENABLE,      /* 0x3a */
8521     /** ht/vht info based on vdev */
8522     WMI_PDEV_PARAM_VDEV_RATE_STATS_UPDATE_PERIOD,     /* 0x3b */
8523     /** Set CTS channel BW for dynamic BW adjustment feature */
8524     WMI_PDEV_PARAM_CTS_CBW,                           /* 0x3c */
8525     /** Set GPIO pin info used by WNTS */
8526     WMI_PDEV_PARAM_WNTS_CONFIG,                       /* 0x3d */
8527     /** Enable/Disable hardware adaptive early rx feature */
8528     WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_ENABLE,          /* 0x3e */
8529     /** The minimum early rx duration, to ensure early rx duration is non-zero */
8530     WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_MIN_SLEEP_SLOP,  /* 0x3f */
8531     /** Increasing/decreasing step used by hardware */
8532     WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_INC_DEC_STEP,    /* 0x40 */
8533     /** The fixed early rx duration when adaptive early rx is disabled */
8534     WMI_PDEV_PARAM_EARLY_RX_FIX_SLEEP_SLOP,           /* 0x41 */
8535     /** Enable/Disable bmiss based adaptive beacon timeout feature */
8536     WMI_PDEV_PARAM_BMISS_BASED_ADAPTIVE_BTO_ENABLE,   /* 0x42 */
8537     /** The minimum beacon timeout duration, to ensure beacon timeout duration is non-zero */
8538     WMI_PDEV_PARAM_BMISS_BTO_MIN_BCN_TIMEOUT,         /* 0x43 */
8539     /** Increasing/decreasing step used by hardware */
8540     WMI_PDEV_PARAM_BMISS_BTO_INC_DEC_STEP,            /* 0x44 */
8541     /** The fixed beacon timeout duration when bmiss based adaptive beacon timeout is disabled */
8542     WMI_PDEV_PARAM_BTO_FIX_BCN_TIMEOUT,               /* 0x45 */
8543     /** Enable/Disable Congestion Estimator based adaptive beacon timeout feature */
8544     WMI_PDEV_PARAM_CE_BASED_ADAPTIVE_BTO_ENABLE,      /* 0x46 */
8545     /** combo value of ce_id, ce_threshold, ce_time, refer to WMI_CE_BTO_CE_ID_MASK */
8546     WMI_PDEV_PARAM_CE_BTO_COMBO_CE_VALUE,             /* 0x47 */
8547     /** 2G TX chain mask */
8548     WMI_PDEV_PARAM_TX_CHAIN_MASK_2G,                  /* 0x48 */
8549     /** 2G RX chain mask */
8550     WMI_PDEV_PARAM_RX_CHAIN_MASK_2G,                  /* 0x49 */
8551     /** 5G TX chain mask */
8552     WMI_PDEV_PARAM_TX_CHAIN_MASK_5G,                  /* 0x4a */
8553     /** 5G RX chain mask */
8554     WMI_PDEV_PARAM_RX_CHAIN_MASK_5G,                  /* 0x4b */
8555     /* Set tx chain mask for CCK rates */
8556     WMI_PDEV_PARAM_TX_CHAIN_MASK_CCK,                 /* 0x4c */
8557     /* Set tx chain mask for 1SS stream */
8558     WMI_PDEV_PARAM_TX_CHAIN_MASK_1SS,                 /* 0x4d */
8559     /* Enable/Disable CTS2Self for P2P GO when Non-P2P Client is connected */
8560     WMI_PDEV_PARAM_CTS2SELF_FOR_P2P_GO_CONFIG,        /* 0x4e */
8561     /** TX power backoff in dB: tx power -= param value
8562      * Host passes values(DB) to Halphy, Halphy reduces the power table by
8563      * the values. Safety check will happen in Halphy
8564      */
8565     WMI_PDEV_PARAM_TXPOWER_DECR_DB,                   /* 0x4f */
8566     /** enable and disable aggregate burst along with duration */
8567     WMI_PDEV_PARAM_AGGR_BURST,                        /* 0x50 */
8568     /** Set the global RX decap mode */
8569     WMI_PDEV_PARAM_RX_DECAP_MODE,                     /* 0x51 */
8570     /** Enable/Disable Fast channel reset */
8571     WMI_PDEV_PARAM_FAST_CHANNEL_RESET,                /* 0x52 */
8572     /** Default antenna for Smart antenna */
8573     WMI_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA,     /* 0x53 */
8574     /** Set the user-specified antenna gain */
8575     WMI_PDEV_PARAM_ANTENNA_GAIN,                      /* 0x54 */
8576     /** Set the user-specified RX filter */
8577     WMI_PDEV_PARAM_RX_FILTER,                         /* 0x55 */
8578     /** configure the user-specified MCAST tid for managed mcast feature
8579      *  0-15 is the valid range. 0xff will clear the tid setting */
8580     WMI_PDEV_SET_MCAST_TO_UCAST_TID,                  /* 0x56 */
8581     /** Enable/Disable Proxy sta mode */
8582     WMI_PDEV_PARAM_PROXY_STA_MODE,                    /* 0x57 */
8583     /** configure the mcast2ucast mode for the pdev->peer_mcast.
8584      *  See WMI_PEER_MCAST2UCAST_MODE for possible values */
8585     WMI_PDEV_PARAM_SET_MCAST2UCAST_MODE,              /* 0x58 */
8586     /** Sets the Mcast buffers for cloning, to support Mcast enhancement */
8587     WMI_PDEV_PARAM_SET_MCAST2UCAST_BUFFER,            /* 0x59 */
8588     /** Remove the Mcast buffers added by host */
8589     WMI_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER,         /* 0x5a */
8590     /** En/disable station power save state indication */
8591     WMI_PDEV_PEER_STA_PS_STATECHG_ENABLE,             /* 0x5b */
8592     /** Access category on which ARP frames are sent */
8593     WMI_PDEV_PARAM_IGMPMLD_AC_OVERRIDE,               /* 0x5c */
8594     /** allow or disallow interbss frame forwarding */
8595     WMI_PDEV_PARAM_BLOCK_INTERBSS,                    /* 0x5d */
8596     /** Enable/Disable reset */
8597     WMI_PDEV_PARAM_SET_DISABLE_RESET_CMDID,           /* 0x5e */
8598     /** Enable/Disable/Set MSDU_TTL in milliseconds. */
8599     WMI_PDEV_PARAM_SET_MSDU_TTL_CMDID,                /* 0x5f */
8600     /** Set global PPDU duration limit (usec). */
8601     WMI_PDEV_PARAM_SET_PPDU_DURATION_CMDID,           /* 0x60 */
8602     /** set txbf sounding period of vap in milliseconds */
8603     WMI_PDEV_PARAM_TXBF_SOUND_PERIOD_CMDID,           /* 0x61 */
8604     /** Set promiscuous mode */
8605     WMI_PDEV_PARAM_SET_PROMISC_MODE_CMDID,            /* 0x62 */
8606     /** Set burst mode */
8607     WMI_PDEV_PARAM_SET_BURST_MODE_CMDID,              /* 0x63 */
8608     /** enable enhanced stats */
8609     WMI_PDEV_PARAM_EN_STATS,                          /* 0x64 */
8610     /** Set mu-grouping policy */
8611     WMI_PDEV_PARAM_MU_GROUP_POLICY,                   /* 0x65 */
8612     /** Channel Hopping Enable */
8613     WMI_PDEV_PARAM_NOISE_DETECTION,                   /* 0x66 */
8614     /** Set Channel Hopping NF threshold in dBm */
8615     WMI_PDEV_PARAM_NOISE_THRESHOLD,                   /* 0x67 */
8616     /** Set PAPRD policy */
8617     WMI_PDEV_PARAM_DPD_ENABLE,                        /* 0x68 */
8618     /** Enable/disable mcast/bcast echo, used by ProxySTA */
8619     WMI_PDEV_PARAM_SET_MCAST_BCAST_ECHO,              /* 0x69 */
8620     /** ATF enable/disable strict schedule */
8621     WMI_PDEV_PARAM_ATF_STRICT_SCH,                    /* 0x6a */
8622     /** ATF set access category duration, B0-B29 duration, B30-B31: AC */
8623     WMI_PDEV_PARAM_ATF_SCHED_DURATION,                /* 0x6b */
8624     /** Default antenna polarization */
8625     WMI_PDEV_PARAM_ANT_PLZN,                          /* 0x6c */
8626     /** Set mgmt retry limit */
8627     WMI_PDEV_PARAM_MGMT_RETRY_LIMIT,                  /* 0x6d */
8628     /** Set CCA sensitivity level in dBm */
8629     WMI_PDEV_PARAM_SENSITIVITY_LEVEL,                 /* 0x6e */
8630     /** Set 2G positive and negative Tx power in 0.5dBm units */
8631     WMI_PDEV_PARAM_SIGNED_TXPOWER_2G,                 /* 0x6f */
8632     /** Set 5G positive and negative Tx power in 0.5dBm
8633      *  units */
8634     WMI_PDEV_PARAM_SIGNED_TXPOWER_5G,                 /* 0x70 */
8635     /** Enable/disable AMSDU for tids */
8636     WMI_PDEV_PARAM_ENABLE_PER_TID_AMSDU,              /* 0x71 */
8637     /** Enable/disable AMPDU for tids */
8638     WMI_PDEV_PARAM_ENABLE_PER_TID_AMPDU,              /* 0x72 */
8639     /** Set CCA threshold in dBm */
8640     WMI_PDEV_PARAM_CCA_THRESHOLD,                     /* 0x73 */
8641     /** RTS Fixed rate setting */
8642     WMI_PDEV_PARAM_RTS_FIXED_RATE,                    /* 0x74 */
8643     /** Pdev reset */
8644     WMI_PDEV_PARAM_PDEV_RESET,                        /* 0x75 */
8645     /** wapi mbssid offset **/
8646     WMI_PDEV_PARAM_WAPI_MBSSID_OFFSET,                /* 0x76 */
8647     /** ARP DEBUG source address*/
8648     WMI_PDEV_PARAM_ARP_DBG_SRCADDR,                   /* 0x77 */
8649     /** ARP DEBUG destination address*/
8650     WMI_PDEV_PARAM_ARP_DBG_DSTADDR,                   /* 0x78 */
8651     /** ATF enable/disable obss noise scheduling */
8652     WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCH,                /* 0x79 */
8653     /** ATF obss noise scaling factor */
8654     WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCALING_FACTOR,     /* 0x7a */
8655     /**
8656      * TX power reduction scaling exponent - final tx power is the
8657      * nominal tx power (A_MIN(reg_pow,ctl,etc..)) divided by
8658      * 2^(scale exponent).  For example:
8659      * If this scale exponent is  0, the power is unchanged (divided by 2^0)
8660      * If this factor is 1, the power is scaled down by 2^1, i.e. 3 dB
8661      * If this factor is 2, the power is scaled down by 2^2, i.e. 6 dB
8662      * If this factor is 3, the power is scaled down by 2^3, i.e. 9 dB
8663      */
8664     WMI_PDEV_PARAM_CUST_TXPOWER_SCALE,                /* 0x7b */
8665     /** ATF enabe/disable dynamically */
8666     WMI_PDEV_PARAM_ATF_DYNAMIC_ENABLE,                /* 0x7c */
8667     /** Set tx retry limit for control frames. 0 = disable, 31 = max */
8668     WMI_PDEV_PARAM_CTRL_RETRY_LIMIT,                  /* 0x7d */
8669     /** Set propagation delay for 2G / 5G band.
8670      * The propagation delay is fundamentally a per-peer property, but
8671      * the target may not support per-peer settings for ack timeouts.
8672      * This pdev parameter allows the MAC-level ack timeout to be set to
8673      * a value suitable for the worst-case propagation delay of any peer
8674      * within that pdev.
8675      * Units are microseconds.
8676      */
8677     WMI_PDEV_PARAM_PROPAGATION_DELAY,                 /* 0x7e */
8678     /**
8679      * Host can enable/disable ANT DIV feature
8680      * if it's been enabled in BDF
8681      */
8682     WMI_PDEV_PARAM_ENA_ANT_DIV,                       /* 0x7f */
8683     /** Host can force one chain to select a specific ANT */
8684     WMI_PDEV_PARAM_FORCE_CHAIN_ANT,                   /* 0x80 */
8685     /**
8686      * Start a cycle ANT self test periodically.
8687      * In the test, the FW would select each ANT pair
8688      * one by one, the cycle time could be configured
8689      * via WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL
8690      */
8691     WMI_PDEV_PARAM_ANT_DIV_SELFTEST,                  /* 0x81 */
8692     /**
8693      * Configure the cycle time of ANT self test,
8694      * the unit is micro second. Per the timer
8695      * limitation, too small value could be not so
8696      * accurate.
8697      */
8698     WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL,            /* 0x82 */
8699     /**
8700      * wlan stats observation period, the unit is millisecond.
8701      * The value of 0 is used to turn off periodic stats report.
8702      */
8703     WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD,          /* 0x83 */
8704     /**
8705      * Set tx_ppdu_delay[] bin size to specify how many
8706      * milliseconds each bin of the wmi_tx_stats.tx_ppdu_delay[]
8707      * histogram represents.
8708      */
8709     WMI_PDEV_PARAM_TX_PPDU_DELAY_BIN_SIZE_MS,         /* 0x84 */
8710     /** set wmi_tx_stats.tx_ppdu_delay[] array length */
8711     WMI_PDEV_PARAM_TX_PPDU_DELAY_ARRAY_LEN,           /* 0x85 */
8712     /** set wmi_tx_stats.tx_mpdu_aggr[] array length */
8713     WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_LEN,            /* 0x86 */
8714     /** set wmi_rx_stats.rx_mpdu_aggr[] array length */
8715     WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_LEN,            /* 0x87 */
8716     /** Set TX delay value in TX sch module, unit is microseconds */
8717     WMI_PDEV_PARAM_TX_SCH_DELAY,                      /* 0x88 */
8718     /** Set RTS enable for SIFS bursting */
8719     WMI_PDEV_PARAM_ENABLE_RTS_SIFS_BURSTING,          /* 0x89 */
8720     /** Set Maximum number of MPDUs in an AMPDU*/
8721     WMI_PDEV_PARAM_MAX_MPDUS_IN_AMPDU,                /* 0x8a */
8722 
8723     /** Enable/disable peer stats info mechanism
8724      * A zero value disables; a non-zero value enables.
8725      */
8726     WMI_PDEV_PARAM_PEER_STATS_INFO_ENABLE,            /* 0x8b */
8727 
8728     /** Configure Fast PWR Transition mode
8729      * 0x0 -> inidcates Fast PWR transition disabled
8730      * 0x1 -> indicates Static mode enabled
8731      * 0x2 -> indicates Dynamic mode enabled
8732      */
8733     WMI_PDEV_PARAM_FAST_PWR_TRANSITION,               /* 0x8c */
8734 
8735     /** Enable/disable radio channel stats mechanism
8736      *  A zero value disables; a non-zero value enables.
8737      */
8738     WMI_PDEV_PARAM_RADIO_CHAN_STATS_ENABLE,           /* 0x8d */
8739     /** Enable/disable radio diagnosis feature
8740      *  which allows retrieving the status of radio.
8741      *  A zero value disables; a non-zero value enables.
8742      */
8743     WMI_PDEV_PARAM_RADIO_DIAGNOSIS_ENABLE,            /* 0x8e */
8744     /** Enable/Disable mesh mcast traffic
8745      * 1 - Allow mesh mcast traffic
8746      * 0 - Disallow mesh mcast traffic
8747      */
8748     WMI_PDEV_PARAM_MESH_MCAST_ENABLE,                 /* 0x8f */
8749     /** Enable/Disable smart chainmask scheme
8750       * 1 - Enable smart chainmask scheme
8751       * 0 - Disable smart chainmask scheme
8752       */
8753     WMI_PDEV_PARAM_SMART_CHAINMASK_SCHEME,            /* 0x90 */
8754     /** Enable/Disable alternate chainmask scheme
8755      * 1 - Enable alternate chainmask scheme
8756      * 0 - Disable alternate chainmask scheme
8757      */
8758     WMI_PDEV_PARAM_ALTERNATIVE_CHAINMASK_SCHEME,      /* 0x91 */
8759     /** User configured parameters for antenna diversity algorithm
8760      *  BIT[25..13]: Probe period (milliseconds units)
8761      *  BIT[12..0]: Stay period (milliseconds units)
8762      */
8763     WMI_PDEV_PARAM_ANT_DIV_USRCFG,                    /* 0x92 */
8764     /** pdev packet power save levels,
8765      *  refer to WMI_PDEV_PKT_PWR_SAVE_LEVEL
8766      */
8767     WMI_PDEV_PARAM_PACKET_POWER_SAVE_LEVEL,           /* 0x93 */
8768     /** Define IOT pattern to be enabled/disabled
8769       * bit values: 0 - disable, 1 - enable
8770       * BIT[0..31]: each bit represents an IOT pattern
8771       * -----
8772       * Bit 0 - avoid SMPS with certain APs
8773       * Bits 31:1 - reserved
8774       */
8775     WMI_PDEV_PARAM_SET_IOT_PATTERN,                   /* 0x94 */
8776     /** ACK timeout - change wireless packet ack timeout configuration,
8777      *  units are microseconds
8778      */
8779     WMI_PDEV_PARAM_ACK_TIMEOUT,                       /* 0x95 */
8780     /** Number of TX chains to use for a/b/g rates.
8781      *  bit 0~15  : 11b mode TX chain number.
8782      *  bit 16~31 : 11ag mode TX chain number.
8783      */
8784     WMI_PDEV_PARAM_ABG_MODE_TX_CHAIN_NUM,             /* 0x96 */
8785     /** Enable/Disable cck txfir override
8786      *  bit 0 - enable (1) or disable (0) CCK tx FIR
8787      *  bits 31:1 - unused / reserved (set to 0)
8788      */
8789     WMI_PDEV_PARAM_ENABLE_CCK_TXFIR_OVERRIDE,         /* 0x97 */
8790     /** Enable/Disable DTIM Synth
8791      *   1- Enable DTIM Synth
8792      *   0- Disable DTIM Synth
8793      */
8794     WMI_PDEV_PARAM_DTIM_SYNTH,                        /* 0x98 */
8795     /** Configure auto detect power failure feature.
8796      *   0 - FW will trigger crash if power failure happens.
8797      *   1 - FW will send a failure notification to host, and the host
8798      *       framework determines how to respond to the power failure
8799      *   2 - Silently rejuvenate if power failure occurs.
8800      *   3 - Feature disabled.
8801      */
8802     WMI_PDEV_AUTO_DETECT_POWER_FAILURE,               /* 0x99 */
8803     /** Configure operating voltage corner mode based on phymode and bw.
8804      * bit 0-1 -   operating voltage corner mode for 11a/b.
8805      * bit 2-3 -   operating voltage corner mode for 11g.
8806      * bit 4-5 -   operating voltage corner mode for 11n, 20MHz, 1x1.
8807      * bit 6-7 -   operating voltage corner mode for 11n, 20MHz, 2x2.
8808      * bit 8-9 -   operating voltage corner mode for 11n, 40MHz, 1x1.
8809      * bit 10-11 - operating voltage corner mode for 11n, 40MHz, 2x2.
8810      * bit 12-13 - operating voltage corner mode for 11ac, 20MHz, 1x1.
8811      * bit 14-15 - operating voltage corner mode for 11ac, 20MHz, 2x2.
8812      * bit 16-17 - operating voltage corner mode for 11ac, 40MHz, 1x1.
8813      * bit 18-19 - operating voltage corner mode for 11ac, 40MHz, 2x2.
8814      * bit 20-21 - operating voltage corner mode for 11ac, 80MHz, 1x1.
8815      * bit 22-23 - operating voltage corner mode for 11ac, 80MHz, 2x2.
8816      * bit 24-25 - operating voltage corner mode for 11ac, 160MHz, 1x1.
8817      * bit 26-27 - operating voltage corner mode for 11ac, 160MHz, 2x2.
8818      * ---------------------------------------------
8819      * 00 - Static voltage corner SVS
8820      * 01 - static voltage corner LOW SVS
8821      * 10 - Dynamic voltage corner selection based on TPUT
8822      * 11 - Dynamic voltage corner selection based on TPUT and Tx Flush counters
8823      */
8824     WMI_PDEV_UPDATE_WDCVS_ALGO,                       /* 0x9a */
8825 
8826     /* Enable/Disable data stall detection */
8827     WMI_PDEV_PARAM_DATA_STALL_DETECT_ENABLE,          /* 0x9b */
8828     /* GCMP Support indication to FW */
8829     WMI_PDEV_PARAM_GCMP_SUPPORT_ENABLE,               /* 0x9c */
8830     /** Enable/Disable chain selection optimization for one chain dtim
8831      *   non-zero - Enable optimization and use this non-zero value as the
8832      *              chain imbalance threshold for optimization to kick in
8833      *              (units = dB)
8834      *   0- Disable optimization
8835      */
8836     WMI_PDEV_PARAM_1CH_DTIM_OPTIMIZED_CHAIN_SELECTION,/* 0x9d */
8837     /*
8838      * Override default FW behavior and explicitly enable / disable
8839      * the use of CCK for PPDU transmissions.
8840      *
8841      * When CCK transmissions are disabled, the default OFDM legacy
8842      * rate will be used instead.
8843      */
8844     WMI_PDEV_PARAM_CCK_TX_ENABLE,                     /* 0x9e */
8845     /*
8846      * Set the user-specified antenna gain, but in 0.5 dB units.
8847      * This is a finer-granularity version of WMI_PDEV_PARAM_ANTENNA_GAIN.
8848      * E.g. to set a gain of 15.5 dB, a value of 31 could be provided as the
8849      * value accompanying the PDEV_PARAM_ANTENNA_GAIN_HALF_DB parameter type.
8850      */
8851     WMI_PDEV_PARAM_ANTENNA_GAIN_HALF_DB,              /* 0x9f */
8852     /*
8853      * Global Enable/Disable control for Secondary Retry Feature Set
8854      *
8855      * Bit-0  : Enable/Disable Control for "PPDU Secondary Retry Support"
8856      * Bit-1  : Enable/Disable Control for "RTS Black/White-listing Support"
8857      * Bit-2  : Enable/Disable Control for "Higher MCS retry restriction on XRETRY failures"
8858      * Bit 3-5: "Xretry threshold" to use
8859      */
8860     WMI_PDEV_PARAM_SECONDARY_RETRY_ENABLE,            /* 0xA0 */
8861     /** Set global uplink triggered PPDU duration limit (usec). */
8862     WMI_PDEV_PARAM_SET_UL_PPDU_DURATION,              /* 0xA1 */
8863     /** Set target buffer status report trigger interval (ms) */
8864     WMI_PDEV_PARAM_SET_UL_BSR_TRIG_INTERVAL,          /* 0xA2 */
8865     /** Use simplified equal RU allocation for DL and UL OFDMA */
8866     WMI_PDEV_PARAM_EQUAL_RU_ALLOCATION_ENABLE,        /* 0xA3 */
8867     /** Enable/disable MWS-COEX 4G (LTE) Quick FTDM.
8868      * 0 - Don't allow quick FTDM Policy (Default)
8869      * 1 - Allow quick FTDM policy.
8870      */
8871     WMI_PDEV_PARAM_MWSCOEX_4G_ALLOW_QUICK_FTDM,       /* 0xA4 */
8872     /** Set MWS-COEX 5G-NR power limit.
8873      * 0:    Don't apply user specific power limit,
8874      *       use internal power limit (Default)
8875      * 1-2:  invalid value (ignored)
8876      * 3-21: apply the specified value as the external power limit, in dBm
8877      * >21:  invalid value (ignored)
8878      */
8879     WMI_PDEV_PARAM_MWSCOEX_SET_5GNR_PWR_LIMIT,        /* 0xA5 */
8880     /** Set max msdus available for cong ctrl in target */
8881     WMI_PDEV_PARAM_SET_CONG_CTRL_MAX_MSDUS,           /* 0xA6 */
8882     /*
8883      * Configures the Estimated Throughput Calculation indication (802.11mc) settings.
8884      * The accompanying A_UINT32 parameter, in units of seconds, specifies how often FW needs to send the ESP estimation indication to the host.
8885      * Value 0: Disable this feature
8886      * Non zero Value: Periodicity (seconds)
8887      */
8888     WMI_PDEV_PARAM_ESP_INDICATION_PERIOD,             /* 0xA7 */
8889 
8890     /*
8891      * Enable/Disable periodic peer CFR capture
8892      * WMI_PEER_CFR_CAPTURE_ENABLE - Enable per peer periodic CFR capture
8893      * WMI_PEER_CFR_CAPTURE_DISABLE - Disable per peer periodic CFR capture
8894      */
8895     WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE,
8896 
8897     /*
8898      * Set the base timer for the periodic CFR capture. By default this is 10ms.
8899      * The period ('periodicity' param in wmi_peer_cfr_capture_cmd) of
8900      * CFR measurement of other peers will be in multiples of this base timer.
8901      * The unit is in milliseconds.
8902      */
8903     WMI_PDEV_PARAM_PERIODIC_CFR_BASE_TIMER,
8904 
8905     /*
8906      * Once the periodic capture is enabled using
8907      * WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE, the timer starts running in
8908      * the target. This parameter will ensure that the timer stops if there are
8909      * no active peers in the capture list. Once the peers are added again to
8910      * the capture list, the timer will not start again. The timer has to be
8911      * started again using WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE.
8912      * Value 1: Enable this feature
8913      * Value 0: Disable this feature
8914      */
8915     WMI_PDEV_PARAM_ENABLE_OPTIMIZED_PERIODIC_CFR_TIMER,
8916 
8917     /*
8918      * Configures a portion of the Estimated Service Params indication
8919      * (802.11mc) settings, which together specify estimated throughput.
8920      * The accompanying A_UINT32 parameter is the ESP BA WINDOW size advertised
8921      * Value 0: Disable this feature
8922      * Non zero Value: ESP BA WINDOW size
8923      */
8924     WMI_PDEV_PARAM_ESP_BA_WINDOW,
8925 
8926     /*
8927      * Configures a portion of the Estimated Service Params indication
8928      * (802.11mc) settings, which together specify estimated throughput.
8929      * The accompanying A_UINT32 parameter is the air time fraction to be
8930      * advertised in the ESP IE
8931      * Value 0: Disable this feature
8932      * Non zero Value: Air time fraction in percentage
8933      */
8934     WMI_PDEV_PARAM_ESP_AIRTIME_FRACTION,
8935 
8936     /*
8937      * Configures a portion of the Estimated Service Params indication
8938      * (802.11mc) settings, which together specify estimated throughput.
8939      * The accompanying A_UINT32 parameter specifies PPDU duration in units
8940      * of milliseconds.
8941      * Value 0: Disable this feature
8942      * Non zero Value: PPDU duration in milliseconds
8943      */
8944     WMI_PDEV_PARAM_ESP_PPDU_DURATION,
8945 
8946     /*
8947      * Enable/Disable NOL(Non Occupancy list) in firmware
8948      *   1- Use NOL in firmware
8949      *   0- Don't use NOL in firmware
8950      */
8951     WMI_PDEV_PARAM_USE_NOL,
8952 
8953     /*
8954      * Allow / Not Allow RU26 in any user's RU allocation field in UL OFDMA
8955      * trigger frames sent by AP
8956      *  1 - Allow RU26
8957      *  0 - Do not allow RU26
8958      */
8959     WMI_PDEV_PARAM_UL_RU26_ALLOWED,
8960 
8961     /*
8962      * Enable/Disable sub channel marking
8963      *  1 - Enable sub channel marking
8964      *  0 - Disable sub channel marking (default value)
8965      */
8966     WMI_PDEV_PARAM_SUB_CHANNEL_MARKING,
8967 
8968     /*
8969      * Enable/Disable/Set MGMT_TTL in milliseconds.
8970      * non_zero - Enable, with the specified value
8971      * 0 - Disable
8972      */
8973     WMI_PDEV_PARAM_SET_MGMT_TTL,
8974 
8975     /*
8976      * Enable/Disable/Set PROBE_RESP_TTL in milliseconds.
8977      * non_zero - Enable, with the specified value
8978      * 0 - Disable
8979      */
8980     WMI_PDEV_PARAM_SET_PROBE_RESP_TTL,
8981 
8982     /*
8983      * TBTT_CTRL_CFG
8984      * BITS 0 - 2 (refer to WMI_TBTT_CTRL_CFG enum)
8985      *   0  - DEFAULT -> HW_TBTT
8986      *   1  - SW_TBTT -> HW_TBTT disabled,
8987      *        software would truncate BURST near TBTT
8988      *   2  - IGNORE_TBTT
8989      *
8990      * BITS 3 - 31 Reserved, must be set to 0x0
8991      */
8992     WMI_PDEV_PARAM_SET_TBTT_CTRL,
8993 
8994     /*
8995      * BITS0 ~1 (refer to enum)
8996      * 0 - default --> always update
8997      * 1 - ignore to update
8998      * 2 - update if larger than threshould
8999      * 3 - update if less or equal than threshould
9000      *
9001      * BITS 2 ~ 31 Threshould
9002      */
9003     WMI_PDEV_PARAM_NAV_OVERRIDE_CONFIG,
9004 
9005     /* Set global MU PPDU duration for DL (usec units) */
9006     WMI_PDEV_PARAM_SET_MU_PPDU_DURATION,
9007 
9008     /*
9009      * Enable / disable test mode configuration.
9010      * By default FW will always send triggers dynamically (mix of BSR/Basic).
9011      * The below testmode are only used for certain tests.
9012      * A value of 1 in a given bit enables corresponding test mode.
9013      * bit | test mode
9014      * ---------------
9015      *  0  | FW only sends BSR triggers.
9016      *  1  | FW only sends Basic triggers.
9017      *  2  | If set, FW enables MU-RTS trigger.
9018      *     | If cleared, FW uses implementation-specific internal default setting.
9019      *  3  | FW enables unicast embedded trigger in HE MU PPDU.
9020      * 4-31| reserved.
9021      */
9022     WMI_PDEV_PARAM_SET_TEST_CMD_UL_TRIGGER_TYPE_ENABLE,
9023 
9024     /*
9025      * Configure test command to set LSIG len.
9026      * Value 0: Dynamic LSIG based on STA's qdepth.
9027      * Non zero Value: LSIG length to be configured
9028      *                 as part of trigger frame.
9029      *   bit   |
9030      * ---------------
9031      *  0 - 30 | Bits storing the host supplied <value>.
9032      *  31     | If set: The legitimate value closest to the value specified in
9033      *         |   in bits 30:0 is directly set in UL len in trigger frame.
9034      *         |   The FW performs calculations to determine which legitimate
9035      *         |   value is closest to the specified value, if the specified
9036      *         |   value is not already legitimate.
9037      *         | If not set: The value in lower bits is the duration (in ms),
9038      *         |   from which the UL len is derived.
9039      *         |   Example: if host sets 2000 (2ms), then UL Len in trigger
9040      *         |   will be derived to accommodate the given duration.
9041      */
9042     WMI_PDEV_PARAM_SET_TEST_CMD_UL_TRIGGER_LSIG_LEN,
9043 
9044     /*
9045      * Configure test cmd for fixed rate setting used for UL Trigger
9046      * (only Basic/BSR triggers).
9047      * The top nibble is used to select which format to use for encoding
9048      * the rate specification: 0xVXXXXXXX, V must be 1 for the UL
9049      * format.
9050      * If V == 0b0001: format is: 0x1000RRRR.
9051      *                 This will be output of WMI_ASSEMBLE_RATECODE_V1
9052      *
9053      */
9054     WMI_PDEV_PARAM_SET_TEST_CMD_UL_TRIGGER_FIXED_RATE,
9055 
9056     /*
9057      * Configure test command to set the mac padding duration.
9058      *  0 - FW set Mac Padding to 0us
9059      *  1 - FW set Mac Padding to 8us
9060      *  2 - FW set Mac Padding to 16us
9061      */
9062     WMI_PDEV_PARAM_SET_TEST_CMD_UL_MAC_PADDING,
9063 
9064     /*
9065      * Configure test command to set the fc duration in BSR trigger frame.
9066      *  value 0 - FW calculates the duration (default).
9067      *  Non zero Value: Duration to be configured.
9068      */
9069     WMI_PDEV_PARAM_SET_TEST_CMD_UL_BSR_FC_DURATION,
9070 
9071     /* Parameter used for configuring TWT scheduling properties
9072      * bit | config_mode
9073      * -----------------
9074      *  0  | Disables DL MU for TWT peers within TWT SP
9075      *  1  | Disables UL MU for TWT peers within TWT SP
9076      *  2  | Disables scheduling from WMM sched context for TWT peers
9077      *  3  | If set, FW only sends Basic triggers in TWT SP.
9078      * 4-31| reserved.
9079      */
9080     WMI_PDEV_PARAM_SET_TEST_CMD_TWT_SCHED_CONFIG,
9081 
9082     /* Parameter used to configure OBSS Packet Detect threshold
9083      * for Non-SRG / SRG based Spatial Reuse feature.
9084      * (SRG = Spatial Reuse Group)
9085      * The accepted values are in between 0x00 and 0xFF, inclusive.
9086      * The parameter value is programmed into the appropriate spatial reuse
9087      * register, to specify how low the background signal strength from
9088      * neighboring BSS cells must be, for this AP to employ spatial reuse.
9089      *
9090      * The value of the parameter is compared against the OBSS RSSI in dB.
9091      * It is a 8-bit value whose
9092      * range is -128 to 127 (after two's complement operation).
9093      * For example, if the parameter value is 0xF5, the target will
9094      * allow spatial reuse if the RSSI detected from other BSS
9095      * is below -10 dB.
9096      * Similarly, if the parameter value is 0x0A, the target will
9097      * allow spatial reuse only if the RSSI detected from neighboring
9098      * BSS cells is no more than 10 dB.
9099      *
9100      * If Bit 29 is set, then input value will be in dBm. This is used
9101      * for chipsets that uses dBm for comparison across MAC/Phy blocks.
9102      * Older chipsets support input in dB units. For newer chipsets, dBm
9103      * units will be used.
9104      * The host will use the WMI_SERVICE_SRG_SRP_SPATIAL_REUSE_SUPPORT
9105      * service ready bit to differentiate between providing input as dB or dBm.
9106      *
9107      * bit    | purpose
9108      * -----------------
9109      * 0  - 7 | Param Value for non-SRG based Spatial Reuse
9110      * 8  - 15| Param value for SRG based Spatial Reuse
9111      * 16 - 28| Reserved
9112      * 29     | Param value is in dBm units rather than dB units
9113      * 30     | Enable/Disable SRG based spatial reuse.
9114      *        | If set to 0, ignore bits 8-15.
9115      * 31     | Enable/Disable Non-SRG based spatial reuse.
9116      *        | If set to 0, ignore bits 0-7.
9117      */
9118     WMI_PDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD,
9119 
9120     /* Parameter used for enabling/disabling non wlan coex from boot */
9121     WMI_PDEV_PARAM_ENABLE_NON_WLAN_COEX_FROM_BOOT,
9122 
9123     /* Parameter used to configure OBSS Packet Detection per Access Category
9124      * for SRP based and OBSS_PD based spatial reuse feature.
9125      * (SRP = Spatial Reuse Parameter)
9126      * Based on the bits set, the corresponding Access Category Queues will have
9127      * spatial reuse enabled / disabled.
9128      * bit     | AC
9129      * ------------
9130      * 0       | BK for SRG/Non-SRG
9131      * 1       | BE for SRG/Non-SRG
9132      * 2       | VI for SRG/Non-SRG
9133      * 3       | VO for SRG/Non-SRG
9134      * 4 - 15  | Reserved
9135      * 16      | BK for SRP
9136      * 17      | BE for SRP
9137      * 18      | VI for SRP
9138      * 19      | VO for SRP
9139      * 20 - 31 | Reserved
9140      */
9141     WMI_PDEV_PARAM_SET_CMD_OBSS_PD_PER_AC,
9142 
9143     /*
9144      * Parameter used to enable/disable FW control of MU-EDCA and AP back-off
9145      * parameters.
9146      * If set to zero, FW mode is disabled; if set to 1, FW mode is enabled.
9147      * Default setting is to have it enabled, and user can disable it in
9148      * favor of manual mode or host control mode.
9149      */
9150     WMI_PDEV_PARAM_ENABLE_FW_DYNAMIC_HE_EDCA,
9151 
9152     /*
9153      * Parameter used to set default 6 GHz rate.
9154      * Applies to all non data transmissions in 6 GHz unless
9155      * overwritten by respective VDEV params.
9156      */
9157     WMI_PDEV_PARAM_DEFAULT_6GHZ_RATE,
9158 
9159     /*
9160      * Configures the duration (in seconds) to delay the channel avoidance
9161      * indication at WLAN firmware before indicating it to WLAN host,
9162      * when WWAN (LTE/5GNR) PCC is in conflict due to WWAN-WLAN coexistence.
9163      * Default value is 60 seconds.
9164      * If set to zero, FW sends channel avoidance indcation immediately to Host.
9165      */
9166     WMI_PDEV_PARAM_MWSCOEX_PCC_CHAVD_DELAY,
9167 
9168     /*
9169      * Configures the duration (in seconds) to delay the channel avoidance
9170      * indication at WLAN firmware before indicating it to WLAN host,
9171      * when WWAN (LTE/5GNR) SCC is in conflict due to WWAN-WLAN coexistence.
9172      * Default value is 120 seconds.
9173      * If set to zero, FW sends channel avoidance indcation immediately to Host.
9174      */
9175     WMI_PDEV_PARAM_MWSCOEX_SCC_CHAVD_DELAY,
9176 
9177     /*
9178      * Parameter used to set ageout timer value from host (units = seconds).
9179      * If not set, FW use default value 2 seconds.
9180      * ageout time: the time upto which DFS channel information such as
9181      * beacon found is remembered
9182      */
9183     WMI_PDEV_PARAM_SET_DFS_CHAN_AGEOUT_TIME,
9184 
9185     /* Parameter used for enabling/disabling xlna bypass for SAP mode*/
9186     WMI_PDEV_PARAM_SET_SAP_XLNA_BYPASS,
9187 
9188     /* Parameter used to enable/disable SRP feature */
9189     WMI_PDEV_PARAM_ENABLE_SRP,
9190 
9191     /* Parameter used to enable/disable SR prohibit feature */
9192     WMI_PDEV_PARAM_ENABLE_SR_PROHIBIT,
9193 
9194     /*
9195      * Parameter used to enable/disable UL OFDMA mBSSID support for
9196      * trigger frames. It is disabled by default.
9197      * bit | config_mode
9198      * -----------------
9199      *  0  | Enable/Disable mBSSID trigger support for basic triggers.
9200      *  1  | Enable/Disable mBSSID trigger support for BSR triggers.
9201      *  2  | Enable/Disable mBSSID trigger support for MU RTS.
9202      *  3  | Enable/Disable mBSSID trigger support for UL MUMIMO triggers.
9203      */
9204     WMI_PDEV_PARAM_ENABLE_MBSSID_CTRL_FRAME,
9205 
9206     /*
9207      * Parameter to set preamble punctured band as a bitmask, i.e.
9208      * which 20MHz in the 80MHz bandwidth or 40MHz in 160MHz bandwidth.
9209      * E.g. if first 20MHz is the primary and preamble puncturing is
9210      * desired for 3rd 20Mhz, then the host will send 0x0100.
9211      * FW doesn't expect the primary 20MHz to be punctured.
9212      * This param is required only for 11ax release.
9213      */
9214     WMI_PDEV_PARAM_SET_PREAM_PUNCT_BW,
9215 
9216     /*
9217      * Parameter used to set the Margin dB value to be included for calculating
9218      * the spatial reuse value in common info field of the UL Trigger frame.
9219      * Accepted value as per Spec are 0 to 5 dB (inclusive).
9220      */
9221     WMI_PDEV_PARAM_SR_TRIGGER_MARGIN,
9222 
9223     /* Param to enable/disable PCIE HW ILP */
9224     WMI_PDEV_PARAM_PCIE_HW_ILP,
9225 
9226     /*
9227      * Configure the TXTD_START_TIMESTAMP parameters
9228      * The timestamp units are nanoseconds.
9229      * This parameter can be used to adjust at what point the TXTD module
9230      * will start operating after the STA connects to an AP.
9231      */
9232     WMI_PDEV_PARAM_SET_TXTD_START_TIMESTAMP,
9233 
9234     /*
9235      * Parameter to configure and enable/disable features for mesh usecases
9236      * bit    | config_mode
9237      * -----------------
9238      *  0     | Set to 1 to disable BSSID based spatial reuse.
9239      *  1-31  | Reserved.
9240      */
9241     WMI_PDEV_PARAM_SET_MESH_PARAMS,
9242 
9243     /* Param to enable low latency mode */
9244     WMI_PDEV_PARAM_LOW_LATENCY_SCHED_MODE,
9245 
9246     /* Param to enable per USERPD SSR - for MultiPD enabled chips */
9247     WMI_PDEV_PARAM_MPD_USERPD_SSR,
9248 
9249     /*
9250      * Param to disable Hardware Assist feature,
9251      * i.e. Disables HW feature that reconstructs the PPDU
9252      * by picking failing MPDUs from prior FES attempt.
9253      */
9254     WMI_PDEV_PARAM_DISABLE_HW_ASSIST,
9255 
9256     /*
9257      * Param to Enable/Disable Tx on DFS for Scan Radio RDP
9258      * Send MGMT frames on the DFS channel before Tx on the said channel
9259      * when in monitor mode.
9260      * Scan Radio RDP should do Tx on DFS channel based on available
9261      * Tx frame on DFS without doing CAC.
9262      * Host should ensure to send this param only for Scan Radio RDP.
9263      * This param used to inform Scan Radio Supports Tx on DFS channel.
9264      */
9265     WMI_PDEV_PARAM_SCAN_RADIO_TX_ON_DFS,
9266 
9267     /*
9268      * Param to configure Minimum OBSS ppdu time below which
9269      * spatial reuse will not happen over the TXOP duration of the OBSS frame.
9270      * If the incoming OBSS frame ppdu duration is greater then the value
9271      * configured, then spatial reuse can happen over the OBSS PPDU.
9272      * The value is configured in microseconds.
9273      */
9274     WMI_PDEV_PARAM_OBSS_MIN_DURATION_CHECK_FOR_SR,
9275 
9276     /*
9277      * Param to Enable/Disable Truncate SR feature.
9278      * PPDUs transmitted using SR opportunity will be truncated at the end
9279      * of OBSS frame duration and will not extend beyond.
9280      */
9281     WMI_PDEV_PARAM_TRUNCATE_SR,
9282 
9283     /* Parameter used to configure separate NON_SRG/SRG OBSS PD threshold for
9284      * for Control Frame.
9285      * (SRG = Spatial Reuse Group)
9286      * The accepted values are in between 0x00 and 0xFF, inclusive.
9287      * The parameter value is checked against the RSSI of the OBSS Control
9288      * frame. If RSSI is below the parameter value, then the Control frame is
9289      * aborted and NAV is ignored. Separate OBSS PD threshold for Control frame
9290      * is added to account for the higher TX power used for such control frames
9291      * when compared with data frames.
9292      *
9293      * The input value will be interpreted as a signed value in dBm units.
9294      *
9295      * The values will be reflected in the registers only if
9296      * SRG / non-srg based spatial reuse is enabled via
9297      * WMI_PDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD cmd.
9298      * bit    | purpose
9299      * -----------------
9300      * 0  - 7 | Param Value for non-srg OBSS PD threshold for non-SRG
9301      *        | control frames
9302      * 8  - 15| Param Value for srg OBSS PD threshold for SRG control frames
9303      * 16 - 29| Reserved
9304      * 30     | Enable/Disable separate SRG based spatial reuse for OBSS
9305      *        | control frames.
9306      *        | If set to 0, ignore bits 8-15.
9307      * 31     | Enable/Disable separate non-SRG based spatial reuse for OBSS
9308      *        | control frames.
9309      *        | If set to 0, ignore bits 0-7.
9310      */
9311     WMI_PDEV_PARAM_CTRL_FRAME_OBSS_PD_THRESHOLD,
9312 
9313     /* Param to configure the access category for the TWT queue */
9314     WMI_PDEV_PARAM_TWT_AC_CONFIG,
9315 
9316     /*
9317      * TX xretry extension parameter to allow product specific adjustment.
9318      * I.e. multiply the xretry counter by N% for a requirement from framework.
9319      */
9320     WMI_PDEV_PARAM_PDEV_STATS_TX_XRETRY_EXT,
9321 
9322     /*
9323      * Per PDEV level, set the highest rate cap allowed.
9324      * The accepted input values NSS are between 1-8, inclusive.
9325      * The accepted input values MCS are between 0-15, inclusive.
9326      * FW will use the input values as is.
9327      * The rate cap is specified in NSS, MCS format each 4bits.
9328      * i.e., NSS and MCS combined as shown below:
9329      * b'0-b'7  indicate the NSS (NSS value can be from 1-8)
9330      * b'8-b'15 indicate the MCS (MCS value can be from 0-15)
9331      * b'16 Enable or disable nss cap
9332      * b'17 Enable or disable mcs cap
9333      * b'18 To determine the direction for caping DL_direction
9334      * b'19 To determine the direction for caping UL_direction
9335      *
9336      * For backwards compatibility, if bits 18+19 are both
9337      * cleared, then the rate cap applies to both DL and UL.
9338      * To summarize:
9339      *     bit 19 | bit 18 | rate cap applied
9340      *     -------+--------+------------------
9341      *        0   |    0   | cap rates only for DL
9342      *        0   |    1   | cap rates only for DL
9343      *        1   |    0   | cap rates only for UL
9344      *        1   |    1   | cap rates for both UL and DL
9345      */
9346     WMI_PDEV_PARAM_RATE_UPPER_CAP,
9347 
9348     /*
9349      * Per PDEV level, set number of MCS to be dropped based
9350      * on configured retries.
9351      *  bit | config_mode
9352      *  -----------------
9353      *  0-7 | param value for number MCS to be dropped
9354      *  8-15| param value for excess retries
9355      *  16  | If set to 0, number of MCS to be dropped is disabled, i.e.
9356      *      | fall back to default mode.
9357      *      | The default value of MCS to be dropped is 1.
9358      *  17  | if set to 0, retries is disabled/use default retries.
9359      *      | The default value of retries is 3.
9360      */
9361     WMI_PDEV_PARAM_SET_RATE_DROP_DOWN_RETRY_THRESH,
9362 
9363     /*
9364      * Param value to configure min/max probe interval for MCS of current NSS.
9365      * If probe interval expired, ratectrl will probe for MCS of current NSS.
9366      * If probe was successful, rate control updates the probe time with a
9367      * min of probe interval.
9368      * If probe failed for MCS of current NSS, rate control updates the probe
9369      * time by multiplying the probe period with 2, which is not greater than
9370      * max probe interval.
9371      * units = milliseconds
9372      *  bits | config_mode
9373      *  0-15 | minimum probe time for MCS
9374      *  16-31| maximum probe time for MCS
9375      */
9376     WMI_PDEV_PARAM_MIN_MAX_MCS_PROBE_INTERVAL,
9377 
9378     /* Param value to configure min/max probe interval for NSS.
9379      * Rate control will probe for alternate NSS if probe time is expired.
9380      * If probe for an alternate NSS was successful, rate control updates
9381      * the probe time with a min of probe interval.
9382      * If probe failed for alternate NSS, rate control updates the probe time
9383      * by multiplying the probe period with 2, which is not greater than
9384      * max probe interval.
9385      * units = milliseconds
9386      *  bits | config_mode
9387      *  0-15 | minimum probe time for alternate NSS
9388      *  16-32| maximum probe time for alternate NSS
9389      */
9390     WMI_PDEV_PARAM_MIN_MAX_NSS_PROBE_INTERVAL,
9391 
9392     /* Param to enable/disable probing on all BW */
9393     WMI_PDEV_PARAM_EN_PROBE_ALL_BW,
9394 
9395     /* Param to enable/disable updating scrambler seed feature */
9396     WMI_PDEV_PARAM_EN_UPDATE_SCRAM_SEED,
9397 
9398     /*
9399      * Param to set the GPIO Drive Configuration value for
9400      * Smart Antenna Parallel Mode
9401      */
9402     WMI_PDEV_PARAM_SA_PARALLEL_MODE_GPIO_DRIVE_CFG,
9403 
9404     /*
9405      * Param to disable LPI antenna optimizations
9406      * In 6G LPI mode, additional antenna optimizations are done to
9407      * improve range. Param is provided to disable the added
9408      * optimizations.
9409      */
9410     WMI_PDEV_PARAM_DISABLE_LPI_ANT_OPTIMIZATION,
9411 
9412     /*
9413      * Param to configure exclusive RSID range for 11az TB ranging.
9414      * RSID's are subset of total AID space and must not be used
9415      * for any other purpose by Host. FW uses these IDs for trigger
9416      * based ranging.
9417      */
9418     WMI_PDEV_PARAM_RTT_11AZ_RSID_RANGE,
9419 
9420     /*
9421      * Disable the indicated DL and UL scheduler for the PDEV.
9422      *
9423      * This command is not supported in STA mode.
9424      *
9425      * A value of 1 in a given bit position disables the corresponding mode,
9426      * and a value of 0 enables the mode. The WMI_SCHED_MODE_FLAGS enum defines
9427      * the bit positions for each mode.
9428      *
9429      * A single 32 bit value is used to store the following configuration
9430      * bitmap.
9431      *
9432      * This command differs from WMI_VDEV_PARAM_SET_HEMU_MODE and
9433      * WMI_VDEV_PARAM_SET_EHT_MU_MODE in that it is intended for use during
9434      * normal AP operation, and will never cause a VAP restart or other
9435      * capability bit modification. It simply controls the scheduler
9436      * behavior.
9437      *
9438      * bit   | sched mode
9439      * ---------------
9440      *   0   | DL MU-MIMO
9441      *   1   | UL MU-MIMO
9442      *   2   | DL OFDMA
9443      *   3   | UL OFDMA
9444      * 4..31 | RESERVED
9445      */
9446     WMI_PDEV_PARAM_SET_DISABLED_SCHED_MODES,
9447 
9448     /*
9449      * Override default FW behavior and explicitly enable / disable
9450      * to allow frames without encryption when no encryption is set.
9451      *
9452      */
9453     WMI_PDEV_PARAM_BYPASS_ENCRYPTION,
9454 
9455     /*
9456      * Param to Enable/Disable scan blanking feature on the Scan Radio
9457      * Host should ensure to send this param only for Scan Radio
9458      * The WMI_SCAN_BLANKING_MODE enum specifies the possible values for this parameter.
9459      * Based on the received input, the scan blanking feature will be carried out as explained in the enum WMI_SCAN_BLANKING_MODE
9460      */
9461     WMI_PDEV_PARAM_SET_SCAN_BLANKING_MODE,
9462 
9463     /*
9464      * Parameter to enable/disable Multi-Channel Concurrency low latency mode
9465      * bit    | config_mode
9466      * -----------------
9467      *  0     | 0:disable, 1:enable.
9468      *  1-31  | Reserved.
9469      */
9470     WMI_PDEV_PARAM_SET_CONC_LOW_LATENCY_MODE,
9471 
9472     /*
9473      * Parameter to enable/disable low power listen mode
9474      * bit    | config_mode
9475      * -----------------
9476      *  0     | 0:disable, 1:enable.
9477      *  1-31  | Reserved.
9478      */
9479     WMI_PDEV_PARAM_LPL_SETTING,
9480 
9481     /** Set Probe Resp retry limit */
9482     WMI_PDEV_PARAM_PROBE_RESP_RETRY_LIMIT,
9483 
9484     /*
9485      * Parameter for configure PCIE
9486      *
9487      *  0 - Default Value(FW Control).
9488      *  1 - Force PCIE Gen Speed and Lane Width to maximum supported value.
9489      */
9490     WMI_PDEV_PARAM_PCIE_CONFIG,
9491 
9492     /** CTS timeout - change wireless packet cts timeout configuration,
9493      *  units are microseconds
9494      */
9495     WMI_PDEV_PARAM_CTS_TIMEOUT,
9496 
9497     /** Slot time - change wireless packet slot time value dynamically,
9498      *  units are microseconds
9499      */
9500     WMI_PDEV_PARAM_SLOT_TIME,
9501 
9502     /** VO dedicated time -
9503      * allocate dedicated time slots for VO access category across all
9504      * ATF groups in a pdev.
9505      *   Note :
9506      *   1.  Per AC airtime per group is already available through
9507      *       ATF WMM WMI commands
9508      *   2.  The dedicated time slot is applicable per second
9509      *   3.  Units are in milli-seconds
9510      */
9511     WMI_PDEV_PARAM_ATF_VO_DEDICATED_TIME,
9512 
9513     /** VI dedicated time -
9514      * allocate dedicated time slots for VI access category across all
9515      * ATF groups in a pdev.
9516      *   Note :
9517      *   1.  Per AC airtime per group is already given through ATF WMM WMI cmds
9518      *   2.  The dedicated time slot is applicable per second
9519      *   3.  Units are in milli-seconds
9520      */
9521     WMI_PDEV_PARAM_ATF_VI_DEDICATED_TIME,
9522 
9523     /** Parameter used for enabling/disabling RFA toggle for SAP mode */
9524     WMI_PDEV_PARAM_SET_SAP_RFA_TOGGLE,
9525 
9526     /** Parameter to set PDEV level UL OFDMA RTD */
9527     WMI_PDEV_PARAM_UL_OFDMA_RTD,
9528 
9529     /** Parameter to enable/disable tid0 and tid3 mapping to work 3 Link MLO */
9530     WMI_PDEV_PARAM_TID_MAPPING_3LINK_MLO,
9531 
9532     /** Parameter to enable/disable small OFDMA M-RUs **/
9533     WMI_PDEV_PARAM_ENABLE_SMALL_MRU,
9534 
9535     /** Parameter to enable/disable large OFDMA M-RUs **/
9536     WMI_PDEV_PARAM_ENABLE_LARGE_MRU,
9537 
9538     /** Parameter to enable/disable delayed LMR feedback.
9539      * Note: Delayed LMR feedback is supported only up to two ranging peers to
9540      * enable Location certification
9541      * 0 - Immediate LMR feedback is enabled for all ranging peers.
9542      * 1 (non zero) - delayed LMR feedback is enabled. Third peer onward will
9543      *     default to immediate LMR feedback.
9544      **/
9545     WMI_PDEV_PARAM_ENABLE_DELAYED_LMR_FEEDBACK,
9546 
9547     /* DFS_RADAR_MASK: Radar mask setting programmed in HW registers.
9548      *     bit   | config_mode
9549      * -----------------------
9550      *   0  - 15 | Each bit represents a 20 MHz portion of the channel.
9551      *           | 0-Unmasked 1-Masked
9552      *   16 - 31 | Reserved.
9553      * Bit 0 represents the highest 20 MHz portion within the channel.
9554      * For example...
9555      * For a 80 MHz channel, bit0 = highest 20 MHz, bit3 = lowest 20 MHz
9556      * For a 320 MHz channel, bit0 = highest 20 MHz, bit15 = lowest 20 MHz
9557      */
9558     WMI_PDEV_PARAM_DFS_RADAR_MASK,
9559 
9560     /** PWR_REDUCTION_IN_QUARTER_DB:
9561      * Reduce final Tx power (derived after all considerations)
9562      * by specified value in units of 0.25 dB.
9563      * E.g. a value of 4 will result in a 1.0 dB tx power reduction.
9564      */
9565     WMI_PDEV_PARAM_PWR_REDUCTION_IN_QUARTER_DB,
9566 } WMI_PDEV_PARAM;
9567 
9568 #define WMI_PDEV_ONLY_BSR_TRIG_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 0, 1)
9569 #define WMI_PDEV_ONLY_BSR_TRIG_ENABLE(trig_type) WMI_SET_BITS(trig_type, 0, 1, 1)
9570 #define WMI_PDEV_ONLY_BSR_TRIG_DISABLE(trig_type) WMI_SET_BITS(trig_type, 0, 1, 0)
9571 
9572 #define WMI_PDEV_ONLY_BASIC_TRIG_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 1, 1)
9573 #define WMI_PDEV_ONLY_BASIC_TRIG_ENABLE(trig_type) WMI_SET_BITS(trig_type, 1, 1, 1)
9574 #define WMI_PDEV_ONLY_BASIC_TRIG_DISABLE(trig_type) WMI_SET_BITS(trig_type, 1, 1, 0)
9575 
9576 #define WMI_PDEV_MU_RTS_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 2, 1)
9577 #define WMI_PDEV_MU_RTS_ENABLE(trig_type) WMI_SET_BITS(trig_type, 2, 1, 1)
9578 #define WMI_PDEV_MU_RTS_DISABLE(trig_type) WMI_SET_BITS(trig_type, 2, 1, 0)
9579 
9580 #define WMI_PDEV_EMBEDDED_TRIGGER_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 3, 1)
9581 #define WMI_PDEV_EMBEDDED_TRIGGER_ENABLE(trig_type) WMI_SET_BITS(trig_type, 3, 1, 1)
9582 #define WMI_PDEV_EMBEDDED_TRIGGER_DISABLE(trig_type) WMI_SET_BITS(trig_type, 3, 1, 0)
9583 
9584 #define WMI_PDEV_TWT_SCHED_CFG_IS_DL_MU_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 0, 1)
9585 #define WMI_PDEV_TWT_SCHED_CFG_DL_MU_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 0, 1, 1)
9586 #define WMI_PDEV_TWT_SCHED_CFG_DL_MU_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 0, 1, 0)
9587 
9588 #define WMI_PDEV_TWT_SCHED_CFG_IS_UL_MU_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 1, 1)
9589 #define WMI_PDEV_TWT_SCHED_CFG_UL_MU_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 1, 1, 1)
9590 #define WMI_PDEV_TWT_SCHED_CFG_UL_MU_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 1, 1, 0)
9591 
9592 #define WMI_PDEV_TWT_SCHED_CFG_IS_WMM_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 2, 1)
9593 #define WMI_PDEV_TWT_SCHED_CFG_WMM_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 2, 1, 1)
9594 #define WMI_PDEV_TWT_SCHED_CFG_WMM_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 2, 1, 0)
9595 
9596 #define WMI_PDEV_TWT_SCHED_CFG_IS_USE_ONLY_BASIC_TRIGGER_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 3, 1)
9597 #define WMI_PDEV_TWT_SCHED_CFG_USE_ONLY_BASIC_TRIGGER_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 3, 1, 1)
9598 #define WMI_PDEV_TWT_SCHED_CFG_USE_ONLY_BASIC_TRIGGER_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 3, 1, 0)
9599 
9600 #define WMI_PDEV_LSIG_LEN_DURATION_ENABLE(lsig_len) WMI_SET_BITS(lsig_len, 0, 31, 1)
9601 #define WMI_PDEV_LSIG_LEN_DURATION_DISABLE(lsig_len) WMI_SET_BITS(lsig_len, 0, 31, 0)
9602 #define WMI_PDEV_LSIG_LEN_DURATION_GET(lsig_len) WMI_GET_BITS(lsig_len, 0, 30)
9603 #define WMI_PDEV_LSIG_LEN_DURATION_SET(lsig_len, value) WMI_SET_BITS(lsig_len, 0, 30, value)
9604 
9605 #define WMI_PDEV_IS_NON_SRG_ENABLED(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 31, 1)
9606 #define WMI_PDEV_NON_SRG_ENABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 31, 1, 1)
9607 #define WMI_PDEV_NON_SRG_DISABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 31, 1, 0)
9608 #define WMI_PDEV_NON_SRG_PD_THRESHOLD_SET(pd_threshold_cfg, value) WMI_SET_BITS(pd_threshold_cfg, 0, 8, value)
9609 #define WMI_PDEV_NON_SRG_PD_THRESHOLD_GET(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 0, 8)
9610 
9611 #define WMI_PDEV_IS_SRG_ENABLED(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 30, 1)
9612 #define WMI_PDEV_SRG_ENABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 30, 1, 1)
9613 #define WMI_PDEV_SRG_DISABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 30, 1, 0)
9614 #define WMI_PDEV_SRG_PD_THRESHOLD_SET(pd_threshold_cfg, value) WMI_SET_BITS(pd_threshold_cfg, 8, 8, value)
9615 #define WMI_PDEV_SRG_PD_THRESHOLD_GET(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 8, 8)
9616 
9617 #define WMI_PDEV_IS_PD_THRESHOLD_IN_DBM(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 29, 1)
9618 #define WMI_PDEV_SET_PD_THRESHOLD_IN_DBM(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 29, 1, 1)
9619 
9620 #define WMI_PDEV_OBSS_PD_ENABLE_PER_AC_SET(per_ac_cfg, value) WMI_SET_BITS(per_ac_cfg, 0, 4, value)
9621     #define WMI_PDEV_OBSS_PD_ENABLE_PER_AC_GET(per_ac_cfg) WMI_GET_BITS(per_ac_cfg, 0, 4)
9622 #define WMI_PDEV_SRP_ENABLE_PER_AC_SET(per_ac_cfg, value) WMI_SET_BITS(per_ac_cfg, 16, 4, value)
9623     #define WMI_PDEV_SRP_ENABLE_PER_AC_GET(per_ac_cfg) WMI_GET_BITS(per_ac_cfg, 16, 4)
9624 
9625 #define WMI_PDEV_IS_NON_SRG_SEP_PD_THRESH_CTRL_FRAME_ENABLED(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 31, 1)
9626 #define WMI_PDEV_NON_SRG_SEP_PD_THRESH_CTRL_FRAME_ENABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 31, 1, 1)
9627 #define WMI_PDEV_NON_SRG_SEP_PD_THRESH_CTRL_FRAME_DISABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 31, 1, 0)
9628 #define WMI_PDEV_NON_SRG_SEP_PD_THRESH_CTRL_FRAME_SET(pd_threshold_cfg, value) WMI_SET_BITS(pd_threshold_cfg, 0, 8, value)
9629 #define WMI_PDEV_NON_SRG_SEP_PD_THRESH_CTRL_FRAME_GET(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 0, 8)
9630 
9631 #define WMI_PDEV_IS_SRG_SEP_PD_THRESH_CTRL_FRAME_ENABLED(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 30, 1)
9632 #define WMI_PDEV_SRG_SEP_PD_THRESH_CTRL_FRAME_ENABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 30, 1, 1)
9633 #define WMI_PDEV_SRG_SEP_PD_THRESH_CTRL_FRAME_DISABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 30, 1, 0)
9634 #define WMI_PDEV_SRG_SEP_PD_THRESH_CTRL_FRAME_SET(pd_threshold_cfg, value) WMI_SET_BITS(pd_threshold_cfg, 8, 8, value)
9635 #define WMI_PDEV_SRG_SEP_PD_THRESH_CTRL_FRAME_GET(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 8, 8)
9636 
9637 
9638 #define WMI_PDEV_UPPER_CAP_NSS_GET(value) WMI_GET_BITS(value, 0, 8)
9639 #define WMI_PDEV_UPPER_CAP_NSS_SET(_value, value) WMI_SET_BITS(_value, 0, 8, value)
9640 #define WMI_PDEV_UPPER_CAP_MCS_GET(value) WMI_GET_BITS(value, 8, 8)
9641 #define WMI_PDEV_UPPER_CAP_MCS_SET(_value, value) WMI_SET_BITS(_value, 8, 8, value)
9642 #define WMI_PDEV_UPPER_CAP_NSS_VALID_GET(value) WMI_GET_BITS(value, 16, 1)
9643 #define WMI_PDEV_UPPER_CAP_NSS_VALID_SET(_value, value) WMI_SET_BITS(_value, 16, 1, value)
9644 #define WMI_PDEV_UPPER_CAP_MCS_VALID_GET(value) WMI_GET_BITS(value, 17, 1)
9645 #define WMI_PDEV_UPPER_CAP_MCS_VALID_SET(_value, value) WMI_SET_BITS(_value, 17, 1, value)
9646 #define WMI_PDEV_UPPER_CAP_DL_DIR_GET(value) WMI_GET_BITS(value, 18, 1)
9647 #define WMI_PDEV_UPPER_CAP_DL_DIR_SET(_value, value) WMI_SET_BITS(_value, 18, 1, value)
9648 #define WMI_PDEV_UPPER_CAP_UL_DIR_GET(value) WMI_GET_BITS(value, 19, 1)
9649 #define WMI_PDEV_UPPER_CAP_UL_DIR_SET(_value, value) WMI_SET_BITS(_value, 19, 1, value)
9650 
9651 #define WMI_PDEV_RATE_DROP_NUM_MCS_GET(value) WMI_GET_BITS(value, 0, 8)
9652 #define WMI_PDEV_RATE_DROP_NUM_MCS_SET(_value, value) WMI_SET_BITS(_value, 0, 8, value)
9653 #define WMI_PDEV_RATE_DROP_RETRY_THRSH_GET(value) WMI_GET_BITS(value, 8, 8)
9654 #define WMI_PDEV_RATE_DROP_RETRY_THRSH_SET(_value, value) WMI_SET_BITS(_value, 8, 8, value)
9655 #define WMI_PDEV_RATE_DROP_NUM_MCS_VALID_GET(value) WMI_GET_BITS(value, 16, 1)
9656 #define WMI_PDEV_RATE_DROP_NUM_MCS_VALID_SET(_value, value) WMI_SET_BITS(_value, 16, 1, value)
9657 #define WMI_PDEV_RATE_DROP_RETRY_THRSH_VALID_GET(value) WMI_GET_BITS(value, 17, 1)
9658 #define WMI_PDEV_RATE_DROP_RETRY_THRSH_VALID_SET(_value, value) WMI_SET_BITS(_value, 17, 1, value)
9659 
9660 #define WMI_PDEV_RATE_MIN_MCS_PROBE_INTERVAL_GET(value) WMI_GET_BITS(value, 0, 16)
9661 #define WMI_PDEV_RATE_MIN_MCS_PROBE_INTERVAL_SET(_value, value) WMI_SET_BITS(_value, 0, 16, value)
9662 #define WMI_PDEV_RATE_MAX_MCS_PROBE_INTERVAL_GET(value) WMI_GET_BITS(value, 16, 16)
9663 #define WMI_PDEV_RATE_MAX_MCS_PROBE_INTERVAL_SET(_value, value) WMI_SET_BITS(_value, 16, 16, value)
9664 
9665 #define WMI_PDEV_RATE_MIN_NSS_PROBE_INTERVAL_GET(value) WMI_GET_BITS(value, 0, 16)
9666 #define WMI_PDEV_RATE_MIN_NSS_PROBE_INTERVAL_SET(_value, value) WMI_SET_BITS(_value, 0, 16, value)
9667 #define WMI_PDEV_RATE_MAX_NSS_PROBE_INTERVAL_GET(value) WMI_GET_BITS(value, 16, 16)
9668 #define WMI_PDEV_RATE_MAX_NSS_PROBE_INTERVAL_SET(_value, value) WMI_SET_BITS(_value, 16, 16, value)
9669 
9670 #define WMI_MBSSID_CTRL_FRAME_BASIC_TRIGGER ((A_UINT32) 1 << 0)
9671 #define WMI_MBSSID_CTRL_FRAME_BSR_TRIGGER ((A_UINT32) 1 << 1)
9672 #define WMI_MBSSID_CTRL_FRAME_MU_RTS_TRIGGER ((A_UINT32) 1 << 2)
9673 #define WMI_MBSSID_CTRL_FRAME_UL_MU_MIMO_TRIGGER ((A_UINT32) 1 << 3)
9674 
9675 typedef struct {
9676     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_param_cmd_fixed_param */
9677     /** pdev_id for identifying the MAC
9678      * See macros starting with WMI_PDEV_ID_ for values.
9679      */
9680     A_UINT32 pdev_id;
9681     /** parameter id   */
9682     A_UINT32 param_id; /* WMI_PDEV_PARAM */
9683     /** parameter value */
9684     A_UINT32 param_value;
9685 } wmi_pdev_set_param_cmd_fixed_param;
9686 
9687 /* param values for WMI_PDEV_PARAM_SET_TBTT_CTRL's TBTT_CTRL_CFG bit-field */
9688 typedef enum {
9689     WMI_TBTT_CTRL_HW_TRUNCATE = 0,
9690     WMI_TBTT_CTRL_SW_TRUNCATE,
9691     WMI_TBTT_CTRL_IGNORE_TBTT,
9692 
9693     WMI_TBTT_CTRL_MAX = 0x7,
9694 } WMI_TBTT_CTRL_CFG;
9695 
9696 /** MACRO to set / get TBTT_CTRL_CFG bit-field within
9697  *  WMI_PDEV_PARAM_SET_TBTT_CTRL:
9698  *      bits 0~2 : TBTT_CTRL_CFG
9699  *      bits 3~31: Reserved (set to 0x0)
9700  */
9701 #define WMI_PDEV_PARAM_TBTT_CTRL_CFG_S  0
9702 #define WMI_PDEV_PARAM_TBTT_CTRL_CFG    0x00000007
9703 
9704 #define WMI_PDEV_PARAM_GET_TBTT_CTRL_CFG(word32) \
9705     WMI_F_MS(word32, WMI_PDEV_PARAM_TBTT_CTRL_CFG)
9706 #define WMI_PDEV_PARAM_SET_TBTT_CTRL_CFG(word32, value) \
9707     WMI_F_RMW(word32,value,WMI_PDEV_PARAM_TBTT_CTRL_CFG)
9708 
9709 /** MACRO define to set / get 11b and 11ag mode TX chain number:
9710  *  bit 0~15 : 11b mode TX chain number.
9711  *  bit 16~31: 11ag mode TX chain number.
9712  */
9713 #define WMI_PDEV_PARAM_11B_TX_CHAIN_NUM_S  0
9714 #define WMI_PDEV_PARAM_11B_TX_CHAIN_NUM    0x0000FFFF
9715 #define WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM_S 16
9716 #define WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM   0xFFFF0000
9717 
9718 #define WMI_PDEV_PARAM_GET_11B_TX_CHAIN_NUM(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_11B_TX_CHAIN_NUM)
9719 #define WMI_PDEV_PARAM_SET_11B_TX_CHAIN_NUM(word32, value)  WMI_F_RMW(word32,value,WMI_PDEV_PARAM_11B_TX_CHAIN_NUM)
9720 
9721 #define WMI_PDEV_PARAM_GET_11AG_TX_CHAIN_NUM(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM)
9722 #define WMI_PDEV_PARAM_SET_11AG_TX_CHAIN_NUM(word32, value) WMI_F_RMW(word32,value,WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM)
9723 
9724 /* param_value for param_id WMI_PDEV_PARAM_CTS_CBW */
9725 typedef enum {
9726     WMI_CTS_CBW_INVALID = 0,
9727     WMI_CTS_CBW_20,
9728     WMI_CTS_CBW_40,
9729     WMI_CTS_CBW_80,
9730     WMI_CTS_CBW_80_80,
9731     WMI_CTS_CBW_160,
9732 } WMI_CTS_CBW;
9733 
9734 typedef struct {
9735     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_config_cmd_fixed_param */
9736     /** pdev_id for identifying the MAC
9737      * See macros starting with WMI_PDEV_ID_ for values.
9738      */
9739     A_UINT32 pdev_id;
9740     /** parameter   */
9741     A_UINT32 param;
9742 } wmi_pdev_get_tpc_config_cmd_fixed_param;
9743 
9744 typedef struct {
9745     A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_div_get_rssi_antid_fixed_param */
9746     /** pdev_id for identifying the MAC */
9747     A_UINT32 pdev_id;
9748     /** RSSI (rssi_chain_x_pri20) on each chain (units: dB above noise floor) */
9749     A_UINT32 chain_rssi[WMI_MAX_CHAINS];
9750     /** index of the last-used antenna for each chain */
9751     A_UINT32 ant_id[WMI_MAX_CHAINS];
9752     /** mac address of diversity peer */
9753     wmi_mac_addr macaddr;
9754 } wmi_pdev_div_get_rssi_antid_fixed_param;
9755 
9756 typedef enum {
9757     WMI_TPC_STATS_EVENT_SEND_REG          = 0x00000001,
9758     WMI_TPC_STATS_EVENT_SEND_RATE         = 0x00000002,
9759     WMI_TPC_STATS_EVENT_SEND_CTL          = 0x00000004,
9760     WMI_TPC_STATS_EVENT_SEND_REG_RATE_CTL = 0x00000007, /* REG | RATE | CTL */
9761 } WMI_PDEV_TPC_STATS_PARAMS;
9762 
9763 typedef enum {
9764     WMI_HALPHY_TPC_STATS_SUPPORT_160 = 0,
9765     WMI_HALPHY_TPC_STATS_SUPPORT_320,
9766     WMI_HALPHY_TPC_STATS_SUPPORT_AX,
9767     WMI_HALPHY_TPC_STATS_SUPPORT_AX_EXTRA_MCS,
9768     WMI_HALPHY_TPC_STATS_SUPPORT_BE,
9769     WMI_HALPHY_TPC_STATS_SUPPORT_BE_PUNC,
9770     WMI_HALPHY_TPC_STATS_SUPPORT_CTL_DESIGN_1,
9771 } WMI_HALPHY_TPC_STATS_SUPPORT_BITF; /* support bit fields */
9772 
9773 typedef struct {
9774     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_stats_cmd_fixed_param */
9775     /** pdev_id for identifying the MAC
9776      * See macros starting with WMI_PDEV_ID_ for values.
9777      */
9778     A_UINT32 pdev_id;
9779     /** parameter -
9780      * This is to specify whether we want only the target power
9781      * information (rates array) or the CTL power or the regulatory
9782      * power information. At present, we send all of them.
9783      */
9784     A_UINT32 param; /* Currently expect WMI_TPC_STATS_EVENT_SEND_REG_RATE_CTL
9785                      * as a host specification that rates array, regulatory
9786                      * power array, and ctl power array are all to be sent.
9787                      * See WMI_PDEV_TPC_STATS_PARAMS.
9788                      */
9789 } wmi_pdev_get_tpc_stats_cmd_fixed_param;
9790 
9791 typedef struct {
9792     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_stats_event_fixed_param */
9793     A_UINT32 pdev_id; /* pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values */
9794     A_UINT32 end_of_event; /* The total response to the WMI command will be split into multiple event chunks to fit into the WMI svc msg size limit: 0 indicates more events to follow: 1 indicates end of event  */
9795     A_UINT32 event_count; /* Incremented for every event chunk for Host to know the sequence */
9796     /* wmi_tpc_configs TLV to optionally follow */
9797     /* wmi_max_reg_power_allowed TLVs to optionally follow */
9798     /* wmi_tpc_rates_array TLVs to optionally follow */
9799     /* wmi_tpc_ctl_pwr_table TLVs to optionally follow */
9800 } wmi_pdev_get_tpc_stats_event_fixed_param;
9801 
9802 typedef struct {
9803     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tpc_configs */
9804     A_UINT32 regDomain;
9805     A_UINT32 chanFreq; /* current channel in MHz */
9806     A_UINT32 phyMode;  /* current phy mode - See WLAN_PHY_MODE for the different phy modes */
9807     A_UINT32 maxAntennaGain; /* Maximum antenna gain for the current regulatory in 0.25 dBm steps */
9808     A_UINT32 twiceMaxRDPower; /* Maximum transmit power allowed in the regulatory domain in 0.25 dBm steps */
9809     A_INT32 userAntennaGain; /* User specified antenna gain in 0.25 dBm steps */
9810     A_UINT32 powerLimit; /* The overall power limit in 0.25 dBm steps */
9811     A_UINT32 rateMax; /* The total number of rates supported */
9812     A_UINT32 numTxChain; /* The total number of active chains */
9813     A_UINT32 ctl; /* See CONFORMANCE_TEST_LIMITS enumeration */
9814     A_UINT32 flags; /* See WMI_TPC_CONFIG_EVENT_FLAG */
9815 
9816     /* support_bits:
9817      * Tells info about BE, HE, HE_EXTRA_MCS, 160, 320, 11BE PUNC.
9818      * Refer to enum WMI_HALPHY_TPC_STATS_SUPPORT_BITF.
9819      */
9820     A_UINT32 support_bits;
9821     A_UINT32 nss; /* target specific NUM_SPATIAL_STREAM flag */
9822 } wmi_tpc_configs;
9823 
9824 typedef struct {
9825     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_max_reg_power_allowed */
9826     A_UINT32 reg_power_type; /* 0: maxRegAllowedPower (1D array),
9827                               * 1: maxRegAllowedPowerAGCDD (2D array),
9828                               * 2: maxRegAllowedPowerAGSTBC (2D array),
9829                               * 3: maxRegAllowedPowerAGTXBF (2D array)
9830                               */
9831     A_UINT32 reg_power_array_len; /* Length of the regulatory power array being sent in bytes */
9832     A_UINT32 d1;  /* the length of 1st (innermost) dimension array */
9833     A_UINT32 d2;  /* the length of 2nd dimension array */
9834     A_UINT32 d3;  /* the length of 3rd dimension array (for future use) */
9835     A_UINT32 d4;  /* the length of 4th dimension array (for future use) */
9836     /*
9837      * This TLV is followed by an A_INT16 TLV-array that will carry
9838      * one of the four types of regulatory power arrays.
9839      *
9840      * The multi-dimensional regulatory power array will be communicated
9841      * as a flat array: Host to stitch it back as 2D array.
9842      * For an array[a][b][c][d], d1 = d, d2 = c, d3 = b, d4 = a
9843      * For a 2D array, array[a][b], d1 = b, d2 = a, d3 = 1, d4 = 1
9844      * The possible types of following A_INT16 TLV arrays are
9845      * 1. A_INT16  maxRegAllowedPower[WHAL_TPC_TX_NUM_CHAIN];
9846      * 2. A_INT16  maxRegAllowedPowerAGCDD[WHAL_TPC_TX_NUM_CHAIN - 1][WHAL_TPC_TX_NUM_CHAIN - 1];
9847      * 3. A_INT16  maxRegAllowedPowerAGSTBC[WHAL_TPC_TX_NUM_CHAIN - 1][WHAL_TPC_TX_NUM_CHAIN - 1];
9848      * 4. A_INT16  maxRegAllowedPowerAGTXBF[WHAL_TPC_TX_NUM_CHAIN - 1][WHAL_TPC_TX_NUM_CHAIN - 1];
9849      * where WHAL_TPC_TX_NUM_CHAIN=2 for CYP and 8 for HK.
9850      */
9851 } wmi_max_reg_power_allowed;
9852 
9853 typedef struct {
9854     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tpc_rates_array */
9855     A_UINT32 rate_array_type; /* 0: ratesArray,
9856                                * 1: ratesArray2 (for chain > 4),
9857                                * 2: dl_ofdma rate array
9858                                */
9859     A_UINT32 rate_array_len;
9860     /* This TLV will be followed by an A_UINT16 TLV array that will
9861      * carry one of the types of TPC rate arrays.
9862      * All the rates arrays are 1D arrays.
9863      * The possible types of following A_UINT16 TLV arrays are
9864      * 1. A_UINT16 ratesArray[WHAL_TPC_RATE_MAX];
9865      *    This array has to be referred when number of active chains is < 4
9866      * 2. A_UINT16 ratesArray2[WHAL_TPC_RATE_MAX];
9867      *    This array has to be referred when number of active chains is > 4
9868      * 3. A_UINT16 ratesArray_DL_OFDMA[72];
9869      * WHAL_TPC_RATE_MAX is 748 for HK (considering PHY A0 8x8)
9870      * WHAL_TPC_RATE_MAX is 188 for CYP (considering PHY A0 2x2)
9871      * Each 16 bit value in the rates array carries both SU and MU
9872      * target power information.
9873      * Bits 0:7 contained the SU target power (signed value, 0.25 dBm units),
9874      * bits 8:15 denote the MU target power (signed value, 0.25 dBm units).
9875      */
9876 } wmi_tpc_rates_array;
9877 
9878 typedef struct {
9879     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tpc_ctl_pwr_table */
9880     A_UINT32 ctl_array_type; /* 0: ctl_array,
9881                               * 1: ctl_160 array,
9882                               * 2: ctl_dlOfdma array,
9883                               * 3: ctl_ulOfdma array
9884                               */
9885     A_UINT32 ctl_array_len; /* Length of the CTL array being sent in bytes */
9886     A_UINT32 end_of_ctl_pwr; /* Message MAY be split into smaller chunks
9887                               * to fit in the WMI svc msg size limit:
9888                               * 0 indicates more chunks of CTL info to follow,
9889                               * 1 indicates end of CTL info.
9890                               */
9891     A_UINT32 ctl_pwr_count; /* Incremented for every CTL info chunk
9892                              * for Host to know the sequence.
9893                              */
9894     A_UINT32 d1;  /* the length of 1st (innermost) dimension array */
9895     A_UINT32 d2;  /* the length of 2nd dimension array */
9896     A_UINT32 d3;  /* the length of 3rd dimension array */
9897     A_UINT32 d4;  /* the length of 4th dimension array */
9898     /* This TLV will be followed by an A_INT8 TLV-array that will
9899      * carry one the types of CTL power arrays.
9900      * The CTL array will be multi-dimensional, but will be communicated as
9901      * a flat array; the host has to stitch it back into a 4D array.
9902      * The possible types of following A_INT8 arrays are
9903      * 1. A_INT8 ctlEdgePwrBF[WHAL_MAX_NUM_CHAINS][2][10][8];
9904      * 2. A_INT8 ctlEdgePwr160[WHAL_MAX_NUM_CHAINS/2][2][2][4];
9905      * 3. A_INT8 ctlEdgePwrBF_dlOFDMA[WHAL_MAX_NUM_CHAINS][2][3][8];
9906      * For e.g., in ctlEdgePwrBF
9907      * D4 = WHAL_MAX_NUM_CHAINS = 8 for HK, 2 for CYP, 4 for Pine
9908      * D3 = BF on/off = 2
9909      * D2 = 10 which the number of different tx modes,
9910      *      like cck, legacy, HT20, HT40, VHT80, etc.
9911      * D1 = NSS = 8, number of spatial streams
9912      * Total number of elements = D4*D3*D2*D1
9913      * The same will apply for ctl_dlOfdma array, except that the values
9914      * of d1,d2,d3,d4 will be different.
9915      */
9916 } wmi_tpc_ctl_pwr_table;
9917 
9918 typedef struct {
9919     A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_bss_chan_info_request_fixed_param */
9920     A_UINT32 param;   /* 1 = read only, 2= read and clear */
9921     A_UINT32 pdev_id; /* pdev_id for identifying mac */
9922 } wmi_pdev_bss_chan_info_request_fixed_param;
9923 
9924 typedef struct {
9925     A_UINT32 tlv_header;    /* WMITLV_TAG_STRUC_wmi_pdev_update_ctltable_request_fixed_param */
9926     A_UINT32 total_len;     /* the total number of ctl table bytes to be transferred */
9927     A_UINT32 len;           /* the number of ctltable bytes in current payload */
9928     A_UINT32 seq;           /* the number of current transfers */
9929 /*
9930  * This TLV is followed by the following additional TLVs:
9931  * ARRAY_BYTE TLV of ctltable_data
9932  */
9933 } wmi_pdev_update_ctltable_request_fixed_param;
9934 
9935 #define WMI_ESP_ESTIMATE_GET_BE(airtime)         WMI_GET_BITS(airtime, 0, 8)
9936 #define WMI_ESP_ESTIMATE_SET_BE(airtime, value)  WMI_SET_BITS(airtime, 0, 8, value)
9937 
9938 #define WMI_ESP_ESTIMATE_GET_BK(airtime)         WMI_GET_BITS(airtime, 8, 8)
9939 #define WMI_ESP_ESTIMATE_SET_BK(airtime, value)  WMI_SET_BITS(airtime, 8, 8, value)
9940 
9941 #define WMI_ESP_ESTIMATE_GET_VI(airtime)         WMI_GET_BITS(airtime, 16, 8)
9942 #define WMI_ESP_ESTIMATE_SET_VI(airtime, value)  WMI_SET_BITS(airtime, 16, 8, value)
9943 
9944 #define WMI_ESP_ESTIMATE_GET_VO(airtime)         WMI_GET_BITS(airtime, 24, 8)
9945 #define WMI_ESP_ESTIMATE_SET_VO(airtime, value)  WMI_SET_BITS(airtime, 24, 8, value)
9946 
9947 typedef struct {
9948     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_esp_estimate_event_fixed_param */
9949     /** pdev_id for identifying the MAC
9950      * See macros starting with WMI_PDEV_ID_ for values.
9951      * In non-DBDC case host should set it to 0
9952      */
9953     A_UINT32 pdev_id;
9954     /*
9955      * Percentage of air time available for each AC
9956      * BIT[0-7]   : AC_BE
9957      * BIT[8-15]  : AC_BK
9958      * BIT[16-23] : AC_VI
9959      * BIT[24-31] : AC_VO
9960      */
9961     A_UINT32 ac_airtime_percentage;
9962 } wmi_esp_estimate_event_fixed_param;
9963 
9964 #define WMI_FAST_DIVERSITY_BIT_OFFSET 0
9965 #define WMI_SLOW_DIVERSITY_BIT_OFFSET 1
9966 
9967 #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT 2
9968 #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK (0xf << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
9969 #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_GET_BITS(word32) \
9970     (((word32) & WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK) >> WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
9971 #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SET_BITS(word32, value) \
9972     do { \
9973         (word32) &= ~WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
9974         (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT) & \
9975             WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
9976     } while (0)
9977 
9978 #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT 6
9979 #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK (0xf << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
9980 #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_GET_BITS(word32) \
9981     (((word32) & WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK) >> WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
9982 #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SET_BITS(word32, value) \
9983     do { \
9984         (word32) &= ~WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
9985         (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT) & \
9986             WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
9987     } while (0)
9988 
9989 typedef struct {
9990     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_antenna_diversity_cmd_fixed_param */
9991     union {
9992         A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
9993         /** pdev_id for identifying the MAC
9994          * See macros starting with WMI_PDEV_ID_ for values.
9995          */
9996         A_UINT32 pdev_id;
9997     };
9998     /**
9999      * The following "value" field is divided into bit fields as follows:
10000      *     bits | purpose
10001      *     -----+---------------------------------------
10002      *        0 | enable/disable FAST diversity
10003      *        1 | enable/disable SLOW diversity
10004      *      5:2 | chain0 slow-diversity weighting factor
10005      *      9:6 | chain1 slow-diversity weighting factor
10006      *     31:10| currently unused (set to 0x0)
10007      * Refer to the above WMI_[FAST/SLOW]_DIVERSITY constants.
10008      */
10009     A_UINT32 value;
10010 } wmi_pdev_set_antenna_diversity_cmd_fixed_param;
10011 
10012 #define WMI_MAX_RSSI_THRESHOLD_SUPPORTED 3
10013 
10014 typedef struct {
10015     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_breach_monitor_config_cmd_fixed_param */
10016     A_UINT32 vdev_id; /* vdev_id, where RSSI monitoring will take place */
10017     A_UINT32 request_id; /* host will configure request_id and firmware echo this id in RSSI_BREACH_EVENT */
10018     A_UINT32 enabled_bitmap; /* bit [0-2] = low_rssi_breach_enabled[0-2] enabled, bit [3-5] = hi_rssi_breach_enabled[0-2] */
10019     A_UINT32 low_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; /* unit dBm. host driver to make sure [0] > [1] > [2] */
10020     A_UINT32 hi_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; /* unit dBm. host driver to make sure [0] < [1] < [2] */
10021     A_UINT32 lo_rssi_reenable_hysteresis; /* unit dBm. once low rssi[] breached, same event bitmap will be generated only after signal gets better than this level. This value is adopted for all low_rssi_breach_threshold[3] */
10022     A_UINT32 hi_rssi_reenable_histeresis;/* unit dBm. once hi rssi[] breached, same event bitmap will be generated only after signal gets worse than this level. This value is adopted for all hi_rssi_breach_threshold[3] */
10023     A_UINT32 min_report_interval; /* After last event is generated, we wait until this interval to generate next event  */
10024     A_UINT32 max_num_report; /* this is to suppress number of event to be generated */
10025 } wmi_rssi_breach_monitor_config_fixed_param;
10026 
10027 typedef struct {
10028     /** parameter   */
10029     A_UINT32 param;
10030 } wmi_pdev_dump_cmd;
10031 
10032 typedef enum {
10033     PAUSE_TYPE_CHOP =           0x1, /** for MCC (switch channel), only vdev_map is valid */
10034     PAUSE_TYPE_PS =             0x2, /** for peer station sleep in sap mode, only peer_id is valid */
10035     PAUSE_TYPE_UAPSD =          0x3, /** for uapsd, only peer_id and tid_map are valid. */
10036     PAUSE_TYPE_P2P_CLIENT_NOA = 0x4, /** only vdev_map is valid, actually only one vdev id is set at one time */
10037     PAUSE_TYPE_P2P_GO_PS =      0x5, /** only vdev_map is valid, actually only one vdev id is set at one time */
10038     PAUSE_TYPE_STA_ADD_BA =     0x6, /** only peer_id and tid_map are valid, actually only one tid is set at one time */
10039     PAUSE_TYPE_AP_PS =          0x7, /** for pausing AP vdev when all the connected clients are in PS. only vdev_map is valid */
10040     PAUSE_TYPE_IBSS_PS =        0x8, /** for pausing IBSS vdev when all the peers are in PS. only vdev_map is valid */
10041     PAUSE_TYPE_CHOP_TDLS_OFFCHAN = 0x9, /** for TDLS offchannel MCC (switch channel), only vdev_map is valid, TDLS connection tracker needs to be notified */
10042 
10043     PAUSE_TYPE_HOST =           0x15, /* host is requesting vdev pause */
10044 } wmi_tx_pause_type;
10045 
10046 typedef enum {
10047     ACTION_PAUSE =     0x0,
10048     ACTION_UNPAUSE =   0x1,
10049 } wmi_tx_pause_action;
10050 
10051 typedef struct {
10052     A_UINT32 tlv_header;
10053     A_UINT32 pause_type;
10054     A_UINT32 action;
10055     A_UINT32 vdev_map;
10056     A_UINT32 peer_id;
10057     A_UINT32 tid_map;
10058 } wmi_tx_pause_event_fixed_param;
10059 
10060 typedef enum {
10061     WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK = 0,
10062     WMI_MGMT_TX_COMP_TYPE_DISCARD,
10063     WMI_MGMT_TX_COMP_TYPE_INSPECT,
10064     WMI_MGMT_TX_COMP_TYPE_COMPLETE_NO_ACK,
10065     WMI_MGMT_TX_COMP_TYPE_MAX,
10066 } WMI_MGMT_TX_COMP_STATUS_TYPE;
10067 
10068 typedef struct {
10069     A_UINT32    tlv_header;
10070     A_UINT32    desc_id; /* from tx_send_cmd */
10071     A_UINT32    status;  /* WMI_MGMT_TX_COMP_STATUS_TYPE */
10072     /** pdev_id for identifying the MAC that transmitted the mgmt frame
10073      * See macros starting with WMI_PDEV_ID_ for values.
10074      */
10075     A_UINT32    pdev_id;
10076     /* ppdu_id
10077      * Hardware PPDU ID for tracking the completion stats
10078      * A ppdu_id value of 0x0 is invalid, and should be ignored.
10079      */
10080     A_UINT32    ppdu_id;
10081     /* ack_rssi
10082      * TX mgmt ack RSSI report to host.
10083      * Only valid when status == COMPLETE_OK and the ACK_RSSI report is enabled
10084      * ACK RSSI is reported as SNR dB, i.e. how many dB the RSSI is above
10085      * the noise floor.
10086      */
10087     A_UINT32    ack_rssi;
10088     /* xmit rate in kbps */
10089     A_UINT32 tx_rate;
10090     /* phy mode WLAN_PHY_MODE of the channel defined in wlan_defs.h */
10091     A_UINT32 peer_phymode;
10092     A_UINT32 retries_count;
10093     /* current 64 bit TSF timestamp */
10094     A_UINT32 tx_tsf_l32;
10095     A_UINT32 tx_tsf_u32;
10096     /* info:
10097      * Bit[0:2]   - band on which frame is sent, band value will be
10098      *              one of the wmi_mlo_band_info_t enum constants.
10099      *              Macros WMI_ROAM_BTM_RESP_MLO_BAND_INFO_GET,SET
10100      *              can be reused for setting mlo band info.
10101      * Bit[3:31]  - reserved
10102      */
10103     A_UINT32 info;
10104 } wmi_mgmt_tx_compl_event_fixed_param;
10105 
10106 typedef struct {
10107     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offchan_data_tx_compl_event_fixed_param */
10108     A_UINT32    desc_id; /* from tx_send_cmd */
10109     A_UINT32    status;  /* same status as WMI_MGMT_TX_COMP_STATUS_TYPE */
10110     /** pdev_id for identifying the MAC that transmitted the mgmt frame
10111      * See macros starting with WMI_PDEV_ID_ for values.
10112      */
10113     A_UINT32    pdev_id;
10114     /* ppdu_id
10115      * Hardware PPDU ID for tracking the completion stats
10116      * A ppdu_id value of 0x0 is invalid, and should be ignored.
10117      */
10118     A_UINT32    ppdu_id;
10119 } wmi_offchan_data_tx_compl_event_fixed_param;
10120 
10121 typedef struct {
10122     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_qos_null_frame_tx_compl_event_fixed_param */
10123     A_UINT32    desc_id; /* echoed from tx_send_cmd */
10124     A_UINT32    status;  /* same status as WMI_MGMT_TX_COMP_STATUS_TYPE */
10125     /** pdev_id for identifying the MAC that transmitted the QoS NULL frame
10126      * See macros starting with WMI_PDEV_ID_ for values.
10127      */
10128     A_UINT32    pdev_id;
10129     /* ppdu_id
10130      * Hardware PPDU ID for tracking the completion stats
10131      * A ppdu_id value of 0x0 is invalid, and should be ignored.
10132      */
10133     A_UINT32    ppdu_id;
10134     /* ack_rssi
10135      * TX mgmt ack RSSI report to host.
10136      * Only valid when status == COMPLETE_OK and the ACK_RSSI report is enabled
10137      * ack_rssi is reported in dBm.
10138      */
10139     A_INT32    ack_rssi;
10140 } wmi_qos_null_frame_tx_compl_event_fixed_param;
10141 
10142 typedef struct {
10143     A_UINT32    tlv_header;
10144     A_UINT32    num_reports;
10145     /* tlv for completion
10146      * A_UINT32 desc_ids[num_reports]; <- from tx_send_cmd
10147      * A_UINT32 status[num_reports];   <- WMI_MGMT_TX_COMP_STATUS_TYPE
10148      * A_UINT32 ppdu_id[num_reports];  <- list of PPDU IDs
10149      * A_UINT32 ack_rssi[num_reports]; <- list of ack RSSI
10150      *                                    RSSI units = dB w.r.t. noise floor
10151      */
10152 } wmi_mgmt_tx_compl_bundle_event_fixed_param;
10153 
10154 #define WMI_TPC_RATE_MAX            160
10155 /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
10156 #define WMI_TPC_TX_NUM_CHAIN        4
10157 
10158 typedef enum {
10159     /* bits 0-7 for table flags */
10160     WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD  = 0x1,
10161     WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
10162     WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
10163 
10164     /* bits 8-11 for interface version flags */
10165     WMI_TPC_CONFIG_EVENT_FLAG_IF_MASK = 0x0F00,
10166     WMI_TPC_CONFIG_EVENT_FLAG_IF_V1   = 0x0100,
10167 } WMI_TPC_CONFIG_EVENT_FLAG;
10168 
10169 typedef struct {
10170     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_tpc_config_event_fixed_param  */
10171     A_UINT32 regDomain;
10172     A_UINT32 chanFreq;
10173     A_UINT32 phyMode;
10174     A_UINT32 twiceAntennaReduction;
10175     A_UINT32 twiceMaxRDPower;
10176     A_INT32 twiceAntennaGain;
10177     A_UINT32 powerLimit;
10178     A_UINT32 rateMax;
10179     A_UINT32 numTxChain;
10180     A_UINT32 ctl;
10181     A_UINT32 flags;
10182     /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
10183     A_INT8 maxRegAllowedPower[WMI_TPC_TX_NUM_CHAIN];
10184     A_INT8 maxRegAllowedPowerAGCDD[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
10185     A_INT8 maxRegAllowedPowerAGSTBC[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
10186     A_INT8 maxRegAllowedPowerAGTXBF[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
10187      /** pdev_id for identifying the MAC
10188       * See macros starting with WMI_PDEV_ID_ for values.
10189       */
10190     A_UINT32 pdev_id;
10191 /* This TLV is followed by further TLVs:
10192  * 1.  byte array:
10193  *      A_UINT8 ratesArray[];
10194  * 2a. multi-dimensional array dimension spec:
10195  *      wmi_tlv_arrays_len_param ctlPwrTbl_param[0 or 1]
10196  *
10197  * 2b. ctl power table
10198  *      A_UINT8 ctlPwrTbl_buf[bf][modes][nss], i.e.
10199  *      A_UINT8 ctlPwrTbl_buf[d3_len * d2_len * d1_len]
10200  *      bf is [0 or 1] for [on or off].
10201  *      For 2G, modes is [0,   1,      2,       or 3] for
10202  *                       [cck, legacy, (v)ht20, or (v)ht40]
10203  *      For 5G, modes is [0,      1,       2,       or 3] for
10204  *                       [legacy, (v)ht20, (v)ht40, or vht80]
10205  *      nss is [0, 1, 2, or 3] for the number of streams 1~4.
10206  */
10207 } wmi_pdev_tpc_config_event_fixed_param;
10208 
10209 typedef struct {
10210     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_div_rssi_antid_event_fixed_param */
10211     A_UINT32 tlv_header;
10212     /** how many elements in the MAX_CHAINS arrays below contain valid info */
10213     A_UINT32 num_chains_valid;
10214     /** RSSI (rssi_chain_x_pri20) on each chain (units: dB above noise floor) */
10215     A_UINT32 chain_rssi[WMI_MAX_CHAINS];
10216     /** index of the last-used antenna for each chain */
10217     A_UINT32 ant_id[WMI_MAX_CHAINS];
10218     /** mac address of diversity peer */
10219     wmi_mac_addr macaddr;
10220     /* EVM value for stream0 and stream1 20Mhz, dB units */
10221     A_INT32 chain_evm[WMI_MAX_CHAINS];
10222 } wmi_pdev_div_rssi_antid_event_fixed_param;
10223 
10224 typedef struct {
10225     A_UINT32 tlv_header;                /* WMITLV_TAG_STRUC_wmi_pdev_bss_chan_info_event_fixed_param */
10226     A_UINT32 freq;                      /* Units in MHz */
10227     A_INT32 noise_floor;                /* units are dBm */
10228 
10229     /* rx clear - how often the channel was unused */
10230     A_UINT32 rx_clear_count_low;        /* low 31 bits of rx_clear cnt in 64bits format */
10231     A_UINT32 rx_clear_count_high;       /* high 31 bits of rx_clear cnt in 64bits format */
10232 
10233     /* cycle count - elapsed time during the measured period, in clock ticks */
10234     A_UINT32 cycle_count_low;           /* low 31 bits of cycle cnt in 64bits format */
10235     A_UINT32 cycle_count_high;          /* high 31 bits of cycle cnt in 64bits format */
10236 
10237     /* tx cycle count - elapsed time spent in tx, in clock ticks */
10238     A_UINT32 tx_cycle_count_low;        /* low 31 bits of tx_cycle cnt in 64bits format */
10239     A_UINT32 tx_cycle_count_high;       /* high 31 bits of tx_cycle cnt in 64bits format */
10240 
10241     /* rx cycle count - elapsed time spent in rx, in clock ticks */
10242     A_UINT32 rx_cycle_count_low;        /* low 31 bits of rx_cycle cnt in 64bits format */
10243     A_UINT32 rx_cycle_count_high;       /* high 31 bits of rx_cycle cnt in 64bits format */
10244 
10245     A_UINT32 rx_bss_cycle_count_low;    /* low 31 bits of rx cycle cnt for my bss in 64bits format */
10246     A_UINT32 rx_bss_cycle_count_high;   /* high 31 bits of rx_cycle cnt for my bss in 64bits format */
10247     A_UINT32 pdev_id;                   /* pdev_id for identifying the MAC */
10248 } wmi_pdev_bss_chan_info_event_fixed_param;
10249 
10250 typedef struct {
10251     /* WMI event response update ctltable request to host */
10252     A_UINT32 tlv_header;                /* WMITLV_TAG_STRUC_wmi_pdev_update_ctltable_event_fixed_param */
10253     A_UINT32 total_len;                 /* the total number of bytes to be transferred */
10254     A_UINT32 len;                       /* the number of FW received bytes from host */
10255     A_UINT32 seq;                       /* the number of current transfers */
10256 } wmi_pdev_update_ctltable_event_fixed_param;
10257 
10258 typedef struct {
10259     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_l1ss_track_event_fixed_param  */
10260     A_UINT32 periodCnt;
10261     A_UINT32 L1Cnt;
10262     A_UINT32 L11Cnt;
10263     A_UINT32 L12Cnt;
10264     A_UINT32 L1Entry;
10265     A_UINT32 L11Entry;
10266     A_UINT32 L12Entry;
10267      /** pdev_id for identifying the MAC
10268       * See macros starting with WMI_PDEV_ID_ for values.
10269       */
10270     A_UINT32 pdev_id;
10271 } wmi_pdev_l1ss_track_event_fixed_param;
10272 
10273 typedef struct {
10274     A_UINT32 len;
10275     A_UINT32 msgref;
10276     A_UINT32 segmentInfo;
10277 } wmi_pdev_seg_hdr_info;
10278 
10279 
10280 /*
10281  * Transmit power scale factor.
10282  *
10283  */
10284 typedef enum {
10285     WMI_TP_SCALE_MAX = 0, /* no scaling (default) */
10286     WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
10287     WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
10288     WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
10289     WMI_TP_SCALE_MIN = 4, /* min, but still on   */
10290     WMI_TP_SCALE_SIZE = 5, /* max num of enum     */
10291 } WMI_TP_SCALE;
10292 
10293 #define WMI_MAX_DEBUG_MESG (sizeof(A_UINT32) * 32)
10294 
10295 typedef struct {
10296     /** message buffer, NULL terminated */
10297     char bufp[WMI_MAX_DEBUG_MESG];
10298 } wmi_debug_mesg_event;
10299 
10300 enum {
10301     /** P2P device */
10302     VDEV_SUBTYPE_P2PDEV = 0,
10303     /** P2P client */
10304     VDEV_SUBTYPE_P2PCLI,
10305     /** P2P GO */
10306     VDEV_SUBTYPE_P2PGO,
10307     /** BT3.0 HS */
10308     VDEV_SUBTYPE_BT,
10309 };
10310 
10311 typedef struct {
10312     /** idnore power , only use flags , mode and freq */
10313     wmi_channel chan;
10314 } wmi_pdev_set_channel_cmd;
10315 
10316 typedef struct {
10317     A_UINT32 tlv_header;
10318     /* DBW puncture bitmap */
10319     A_UINT32 dbw_puncture_20mhz_bitmap;
10320 } wmi_dbw_chan_info;
10321 
10322 typedef enum {
10323     WMI_PKTLOG_EVENT_RX =  0x00000001,
10324     WMI_PKTLOG_EVENT_TX =  0x00000002,
10325     WMI_PKTLOG_EVENT_RCF = 0x00000004, /* Rate Control Find */
10326     WMI_PKTLOG_EVENT_RCU = 0x00000008, /* Rate Control Update */
10327     /* 0x10 used by deprecated DBG_PRINT */
10328     WMI_PKTLOG_EVENT_SMART_ANTENNA = 0x00000020, /* To support Smart Antenna */
10329     WMI_PKTLOG_EVENT_SW =  0x00000040, /* To support SW defined events */
10330     WMI_PKTLOG_EVENT_PHY = 0x00000080, /* To support PHY stats */
10331     WMI_PKTLOG_EVENT_CBF = 0x00000100, /* To support CBF's filter in */
10332     /* To support hybrid of events from FW and tx monitor status ring */
10333     WMI_PKTLOG_EVENT_HYBRID_TX = 0x00000200,
10334 } WMI_PKTLOG_EVENT;
10335 
10336 typedef enum {
10337     WMI_PKTLOG_ENABLE_AUTO  = 0, /* (default) FW will decide under what conditions to enable pktlog */
10338     WMI_PKTLOG_ENABLE_FORCE = 1, /* pktlog unconditionally enabled */
10339 } WMI_PKTLOG_ENABLE;
10340 
10341 typedef enum {
10342     WMI_PKTLOG_FILTER_IN  = 0, /* capture only for the MAC addresses in pktlog_mac_addr_list*/
10343     WMI_PKTLOG_FILTER_OUT = 1, /* capture for all MAC addresses except those in pktlog_mac_addr_list */
10344 } WMI_PKTLOG_FILTER_TYPE;
10345 
10346 typedef struct {
10347     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_enable_cmd_fixed_param */
10348     /** pdev_id for identifying the MAC
10349      * See macros starting with WMI_PDEV_ID_ for values.
10350      */
10351     A_UINT32 pdev_id;
10352     A_UINT32 evlist; /* WMI_PKTLOG_EVENT */
10353     A_UINT32 enable; /* WMI_PKTLOG_ENABLE */
10354 } wmi_pdev_pktlog_enable_cmd_fixed_param;
10355 
10356 typedef struct {
10357     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_disable_cmd_fixed_param */
10358     /** pdev_id for identifying the MAC
10359      * See macros starting with WMI_PDEV_ID_ for values.
10360      */
10361     A_UINT32 pdev_id;
10362 } wmi_pdev_pktlog_disable_cmd_fixed_param;
10363 
10364 typedef struct {
10365     /** TLV tag and len; tag equals
10366     *  WMITLV_TAG_STRUC_wmi_pdev_pktlog_filter_info */
10367     A_UINT32 tlv_header;
10368     /** mac addr of the peer to be filtered */
10369     wmi_mac_addr peer_mac_address;
10370 } wmi_pdev_pktlog_filter_info;
10371 
10372 typedef struct {
10373     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_filter_cmd_fixed_param */
10374     /** pdev_id for identifying the MAC
10375      * See macros starting with WMI_PDEV_ID_ for values.
10376      */
10377     A_UINT32 pdev_id;
10378     /** 0 - disable filtering, 1 - enable filtering */
10379     A_UINT32 enable;
10380     A_UINT32 filter_type; /* WMI_PKTLOG_FILTER_TYPE */
10381     A_UINT32 num_of_mac_addresses;
10382     /* This TLV is followed by another TLV of array of structs
10383      * wmi_pdev_pktlog_filter_info pdev_pktlog_filter_info[];
10384      */
10385 } wmi_pdev_pktlog_filter_cmd_fixed_param;
10386 
10387 /**
10388  * WMI event to send packet log decode information to Host.
10389  * This sends the metadata which will be embedded by Host in the file-level
10390  * header of the pktlog trace file (i.e. the ath_pktlog_bufhdr struct).
10391  * This will be later used by the pktlog post-processing scripts to get
10392  * prerequisite pktlog_defs*.JSON files for decoding the trace.
10393  */
10394 typedef struct {
10395     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_decode_info_evt_fixed_param */
10396     /** pdev_id for identifying the MAC
10397      * See macros starting with WMI_PDEV_ID_ for values.
10398      */
10399     A_UINT32 pdev_id;
10400     /** Forty byte field for storing software image as null terminated string */
10401     A_UINT8  software_image[40];
10402     /** Forty byte field for storing chip info as null terminated string */
10403     A_UINT8  chip_info[40];
10404     /** Four byte field for storing JSON version */
10405     A_UINT32 pktlog_defs_json_version;
10406 } wmi_pdev_pktlog_decode_info_evt_fixed_param;
10407 
10408 typedef enum {
10409     WMI_ROGUE_AP_ON_STA_PS  = 1, /* rogue ap on sta ps module */
10410 } WMI_ROGUE_AP_TYPE;
10411 
10412 typedef struct {
10413     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rap_config_fixed_param */
10414     /** pdev_id for identifying the MAC, the default value is WMI_PDEV_ID_SOC
10415      * See macros starting with WMI_PDEV_ID_ for values.
10416      */
10417     A_UINT32 pdev_id;
10418     /** rogue ap type, see WMI_ROGUE_AP_TYPE */
10419     A_UINT32 type;
10420     /** Enable detection of rogue ap in the ps module
10421      *
10422      * 0 -> disabled
10423      * 1 -> enabled (default)
10424      */
10425     A_UINT32 sta_ps_detection_enabled;
10426 /* This TLV is followed by rap_param for each rogue ap:
10427  *     wmi_pdev_set_rap_config_on_sta_ps_tlv_param rap_param[];
10428  */
10429 } wmi_pdev_set_rap_config_fixed_param;
10430 
10431 typedef struct {
10432     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rap_config_on_sta_ps_tlv_param */
10433     /** bssid of rogue ap */
10434     wmi_mac_addr bssid;
10435 } wmi_pdev_set_rap_config_on_sta_ps_tlv_param;
10436 
10437 typedef struct {
10438     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mib_stats_enable_cmd_fixed_param */
10439     /** pdev_id for identifying the MAC
10440      * See macros starting with WMI_PDEV_ID_ for values.
10441      */
10442     A_UINT32 pdev_id;
10443     A_UINT32 enable_Mib; /** enable for mib stats collection. Stats are delivered to host in wmi_mib_stats structure.
10444                           * If enable_Mib=1, stats collection is enabled. If enable_Mib=0, stats collection does not happen */
10445 } wmi_mib_stats_enable_cmd_fixed_param;
10446 
10447 /** Customize the DSCP (bit) to TID (0-7) mapping for QOS.
10448  *  NOTE: This constant cannot be changed without breaking
10449  *  WMI Compatibility. */
10450 
10451 #define WMI_DSCP_MAP_MAX    (64)
10452 /*
10453  * @brief dscp_tid_map_cmdid - command to send the dscp to tid map to the target
10454  * @details
10455  * Create an API for sending the custom DSCP-to-TID map to the target
10456  * If this is a request from the user space or from above the UMAC
10457  * then the best place to implement this is in the umac_if_offload of the OL path.
10458  * Provide a place holder for this API in the ieee80211com (ic).
10459  *
10460  * This API will be a function pointer in the ieee80211com (ic). Any user space calls for manually setting the DSCP-to-TID mapping
10461  * in the target should be directed to the function pointer in the ic.
10462  *
10463  * Implementation details of the API to send the map to the target are as described-
10464  *
10465  * 1. The function will have 2 arguments- struct ieee80211com, DSCP-to-TID map.
10466  *    DSCP-to-TID map is a one dimensional u_int32_t array of length 64 to
10467  *    accommodate 64 TID values for 2^6 (64) DSCP ids.
10468  *    Example:
10469  *      A_UINT32 dscp_tid_map[WMI_DSCP_MAP_MAX] = {
10470  *                                  0, 0, 0, 0, 0, 0, 0, 0,
10471  *                                  1, 1, 1, 1, 1, 1, 1, 1,
10472  *                                  2, 2, 2, 2, 2, 2, 2, 2,
10473  *                                  3, 3, 3, 3, 3, 3, 3, 3,
10474  *                                  4, 4, 4, 4, 4, 4, 4, 4,
10475  *                                  5, 5, 5, 5, 5, 5, 5, 5,
10476  *                                  6, 6, 6, 6, 6, 6, 6, 6,
10477  *                                  7, 7, 7, 7, 7, 7, 7, 7,
10478  *                                };
10479  *
10480  * 2. Request for the WMI buffer of size equal to the size of the DSCP-to-TID map.
10481  *
10482  * 3. Copy the DSCP-to-TID map into the WMI buffer.
10483  *
10484  * 4. Invoke the wmi_unified_cmd_send to send the cmd buffer to the target with the
10485  *    WMI_PDEV_SET_DSCP_TID_MAP_CMDID. Arguments to the wmi send cmd API
10486  *    (wmi_unified_send_cmd) are wmi handle, cmd buffer, length of the cmd buffer and
10487  *    the WMI_PDEV_SET_DSCP_TID_MAP_CMDID id.
10488  *
10489  */
10490 /* DEPRECATED - use VDEV level command instead
10491  * (wmi_vdev_set_dscp_tid_map_cmd_fixed_param)
10492  */
10493 typedef struct {
10494     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_dscp_tid_map_cmd_fixed_param */
10495     A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
10496     /* map indicating DSCP to TID conversion */
10497     A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
10498 } wmi_pdev_set_dscp_tid_map_cmd_fixed_param;
10499 
10500 typedef struct {
10501     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_dscp_tid_map_cmd_fixed_param */
10502     A_UINT32 vdev_id;
10503     /** map indicating DSCP to TID conversion */
10504     A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
10505     A_UINT32 enable_override;
10506 } wmi_vdev_set_dscp_tid_map_cmd_fixed_param;
10507 
10508 enum WMI_WAKE_GPIO_TYPE {
10509     WMI_WAKE_GPIO_LOW = 1,
10510     WMI_WAKE_GPIO_HIGH = 2,
10511     WMI_WAKE_GPIO_RISING_EDGE = 3,
10512     WMI_WAKE_GPIO_FALLING_EDGE = 4,
10513 };
10514 
10515 /**
10516  * Set GPIO numbers used to wakeup host and wakeup target.
10517  */
10518 typedef struct {
10519     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param */
10520     A_UINT32 host_wakeup_gpio; /* gpio num used to wakeup host, 0xff disable wakeup gpio */
10521     A_UINT32 host_wakeup_type; /* refer to WMI_WAKE_GPIO_TYPE */
10522     A_UINT32 target_wakeup_gpio; /* gpio num used to wakeup target, 0xff disable wakeup gpio */
10523     A_UINT32 target_wakeup_type; /* refer to WMI_WAKE_GPIO_TYPE */
10524 } WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param;
10525 
10526 /** Fixed rate (rate-code) for broadcast/ multicast data frames */
10527 /* @brief bcast_mcast_data_rate - set the rates for the bcast/ mcast frames
10528  * @details
10529  * Create an API for setting the custom rate for the MCAST and BCAST frames
10530  * in the target. If this is a request from the user space or from above the UMAC
10531  * then the best place to implement this is in the umac_if_offload of the OL path.
10532  * Provide a place holder for this API in the ieee80211com (ic).
10533  *
10534  * Implementation details of the API to set custom rates for MCAST and BCAST in
10535  * the target are as described-
10536  *
10537  * 1. The function will have 3 arguments-
10538  *    vap structure,
10539  *    MCAST/ BCAST identifier code,
10540  *    8 bit rate code
10541  *
10542  * The rate-code is a 1-byte field in which:for given rate, nss and preamble
10543  * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
10544  * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
10545  * b'3-b'0 indicate the rate, which is indicated as follows:
10546  *          OFDM :     0: OFDM 48 Mbps
10547  *                     1: OFDM 24 Mbps
10548  *                     2: OFDM 12 Mbps
10549  *                     3: OFDM 6 Mbps
10550  *                     4: OFDM 54 Mbps
10551  *                     5: OFDM 36 Mbps
10552  *                     6: OFDM 18 Mbps
10553  *                     7: OFDM 9 Mbps
10554  *         CCK (pream == 1)
10555  *                     0: CCK 11 Mbps Long
10556  *                     1: CCK 5.5 Mbps Long
10557  *                     2: CCK 2 Mbps Long
10558  *                     3: CCK 1 Mbps Long
10559  *                     4: CCK 11 Mbps Short
10560  *                     5: CCK 5.5 Mbps Short
10561  *                     6: CCK 2 Mbps Short
10562  *         HT/VHT (pream == 2/3)
10563  *                     0..7: MCS0..MCS7 (HT)
10564  *                     0..9: MCS0..MCS9 (VHT)
10565  *
10566  * 2. Invoke the wmi_unified_vdev_set_param_send to send the rate value
10567  *    to the target.
10568  *    Arguments to the API are-
10569  *    wmi handle,
10570  *    VAP interface id (av_if_id) defined in ol_ath_vap_net80211,
10571  *    WMI_VDEV_PARAM_BCAST_DATA_RATE/ WMI_VDEV_PARAM_MCAST_DATA_RATE,
10572  *    rate value.
10573  */
10574 typedef enum {
10575     WMI_SET_MCAST_RATE,
10576     WMI_SET_BCAST_RATE
10577 } MCAST_BCAST_RATE_ID;
10578 
10579 typedef struct {
10580     MCAST_BCAST_RATE_ID rate_id;
10581     A_UINT32 rate;
10582 } mcast_bcast_rate;
10583 
10584 typedef struct {
10585     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_params */
10586     A_UINT32 cwmin;
10587     A_UINT32 cwmax;
10588     A_UINT32 aifs;
10589     A_UINT32 txoplimit;
10590     A_UINT32 acm;
10591     A_UINT32 no_ack;
10592 } wmi_wmm_params;
10593 
10594 /* DEPRECATED - use VDEV level command instead
10595  * (wmi_vdev_set_wmm_params_cmd_fixed_param)
10596  */
10597 typedef struct {
10598     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_wmm_params_cmd_fixed_param */
10599     A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
10600     A_UINT32 dg_type;
10601 
10602 /* The TLVs for the 4 AC follows:
10603  *     wmi_wmm_params wmm_params_ac_be;
10604  *     wmi_wmm_params wmm_params_ac_bk;
10605  *     wmi_wmm_params wmm_params_ac_vi;
10606  *     wmi_wmm_params wmm_params_ac_vo;
10607  */
10608 } wmi_pdev_set_wmm_params_cmd_fixed_param;
10609 
10610 typedef struct {
10611     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pifs_params */
10612     /* The unit of this offset is PIFS slot time */
10613     A_UINT32 sap_pifs_offset;
10614     A_UINT32 leb_pifs_offset;
10615     A_UINT32 reb_pifs_offset;
10616 } wmi_pifs_params;
10617 
10618 typedef enum {
10619     WMI_EDCA_PARAM_TYPE_AGGRESSIVE = 0,
10620     WMI_EDCA_PARAM_TYPE_PIFS = 1,
10621 } WMI_EDCA_PARAM_TYPE;
10622 
10623 typedef struct {
10624     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_twt_edca_params_cmd_fixed_param */
10625     A_UINT32 tlv_header;
10626     A_UINT32 vdev_id;
10627     A_UINT32 type; /* contains a WMI_EDCA_PARAM_TYPE value */
10628     /*
10629      * This TLV is (optionally) followed by other TLVs as below:
10630      * wmi_wmm_params wmm_params[0/1];
10631      *     present if type is WMI_EDCA_PARAM_TYPE_AGGRESSIVE
10632      * wmi_pifs_params pifs_params[0/1];
10633      *     present if type is WMI_EDCA_PARAM_TYPE_PIFS
10634      */
10635 } wmi_vdev_set_twt_edca_params_cmd_fixed_param;
10636 
10637 typedef struct {
10638     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_twt_session_stats_info_cmd_fixed_param */
10639     A_UINT32 tlv_header;
10640     A_UINT32 vdev_id;
10641 } wmi_vdev_get_twt_session_stats_info_cmd_fixed_param;
10642 
10643 typedef enum {
10644     WMI_REQUEST_PEER_STAT            = 0x00001,
10645     WMI_REQUEST_AP_STAT              = 0x00002,
10646     WMI_REQUEST_PDEV_STAT            = 0x00004,
10647     WMI_REQUEST_VDEV_STAT            = 0x00008,
10648     WMI_REQUEST_BCNFLT_STAT          = 0x00010,
10649     WMI_REQUEST_VDEV_RATE_STAT       = 0x00020,
10650     WMI_REQUEST_INST_STAT            = 0x00040,
10651     WMI_REQUEST_MIB_STAT             = 0x00080,
10652     WMI_REQUEST_RSSI_PER_CHAIN_STAT  = 0x00100,
10653     WMI_REQUEST_CONGESTION_STAT      = 0x00200,
10654     WMI_REQUEST_PEER_EXTD_STAT       = 0x00400,
10655     WMI_REQUEST_BCN_STAT             = 0x00800,
10656     WMI_REQUEST_BCN_STAT_RESET       = 0x01000,
10657     WMI_REQUEST_PEER_EXTD2_STAT      = 0x02000,
10658     WMI_REQUEST_MIB_EXTD_STAT        = 0x04000,
10659     WMI_REQUEST_PMF_BCN_PROTECT_STAT = 0x08000,
10660     WMI_REQUEST_VDEV_EXTD_STAT       = 0x10000,
10661     WMI_REQUEST_PDEV_EXTD_STAT       = 0x20000,
10662     WMI_REQUEST_PDEV_TELEMETRY_STAT  = 0x40000,
10663 } wmi_stats_id;
10664 
10665 /*
10666  * cfg_retry_count is set to max number of times the AP should try sending
10667  * QoS Null frames to the STA for measuring the instantaneous RSSI
10668  *
10669  * retry_count is used to maintain the number of times the AP has tried sending
10670  * QoS Null frames to the STA for measuring the instantaneous RSSI
10671  */
10672 typedef struct {
10673     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_sub_struc_param */
10674     A_UINT32 cfg_retry_count;
10675     A_UINT32 retry_count;
10676 } wmi_inst_rssi_stats_params;
10677 
10678 typedef struct {
10679     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_fixed_param */
10680     wmi_stats_id stats_id;
10681     /** unique id identifying the VDEV, generated by the caller */
10682     A_UINT32 vdev_id;
10683     /** peer MAC address */
10684     wmi_mac_addr peer_macaddr;
10685     A_UINT32 pdev_id; /** pdev_id for identifying the MAC.  See macros starting with WMI_PDEV_ID_ for values. In non-DBDC case host should set it to 0. */
10686 /*
10687  * This TLV is (optionally) followed by other TLVs:
10688  *     wmi_inst_rssi_stats_params inst_rssi_params;
10689  *     A_UINT32 vdev_id_bitmap[];
10690  *         This array is present and non-zero length in MLO case, stats should
10691  *         only be provided from the vdev_id_bitmap in the bitmap when it is
10692  *         present.
10693  *     wmi_mac_addr mld_macaddr[];
10694  *         This array is present and non-zero length in MLO case, stats should
10695  *         only be provided from the peers with the MLD MAC addresses specified
10696  *         in the array.
10697  */
10698 } wmi_request_stats_cmd_fixed_param;
10699 
10700 /* stats type bitmap  */
10701 #define WMI_LINK_STATS_RADIO         0x00000001
10702 #define WMI_LINK_STATS_IFACE         0x00000002
10703 #define WMI_LINK_STATS_ALL_PEER      0x00000004
10704 #define WMI_LINK_STATS_PER_PEER      0x00000008
10705 #define WMI_LINK_STATS_IPA           0x00000010
10706 
10707 
10708 /* wifi clear statistics bitmap  */
10709 #define WIFI_STATS_RADIO              0x00000001 /** all radio statistics */
10710 #define WIFI_STATS_RADIO_CCA          0x00000002 /** cca_busy_time (within radio statistics) */
10711 #define WIFI_STATS_RADIO_CHANNELS     0x00000004 /** all channel statistics (within radio statistics) */
10712 #define WIFI_STATS_RADIO_SCAN         0x00000008 /** all scan statistics (within radio statistics) */
10713 #define WIFI_STATS_IFACE              0x00000010 /** all interface statistics */
10714 #define WIFI_STATS_IFACE_TXRATE       0x00000020 /** all tx rate statistics (within interface statistics) */
10715 #define WIFI_STATS_IFACE_AC           0x00000040 /** all ac statistics (within interface statistics) */
10716 #define WIFI_STATS_IFACE_CONTENTION   0x00000080 /** all contention (min, max, avg) statistics (within ac statisctics) */
10717 #define WMI_STATS_IFACE_ALL_PEER      0x00000100 /** All peer stats on this interface */
10718 #define WMI_STATS_IFACE_PER_PEER      0x00000200 /** Clear particular peer stats depending on the peer_mac */
10719 
10720 /** Default value for stats if the stats collection has not started */
10721 #define WMI_STATS_VALUE_INVALID       0xffffffff
10722 
10723 #define WMI_DIAG_ID_GET(diag_events_logs)                         WMI_GET_BITS(diag_events_logs, 0, 16)
10724 #define WMI_DIAG_ID_SET(diag_events_logs, value)                  WMI_SET_BITS(diag_events_logs, 0, 16, value)
10725 #define WMI_DIAG_TYPE_GET(diag_events_logs)                       WMI_GET_BITS(diag_events_logs, 16, 1)
10726 #define WMI_DIAG_TYPE_SET(diag_events_logs, value)                WMI_SET_BITS(diag_events_logs, 16, 1, value)
10727 #define WMI_DIAG_ID_ENABLED_DISABLED_GET(diag_events_logs)        WMI_GET_BITS(diag_events_logs, 17, 1)
10728 #define WMI_DIAG_ID_ENABLED_DISABLED_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
10729 
10730 typedef struct {
10731     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_diag_event_log_config_fixed_param */
10732     A_UINT32 num_of_diag_events_logs;
10733 /* The TLVs will follow.
10734  *    A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
10735  *                                      Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
10736  *                                      Bit 17 Indicate if the DIAG type is Enabled/Disabled.
10737  */
10738 } wmi_diag_event_log_config_fixed_param;
10739 
10740 #define WMI_DIAG_FREQUENCY_GET(diag_events_logs)          WMI_GET_BITS(diag_events_logs, 17, 1)
10741 #define WMI_DIAG_FREQUENCY_SET(diag_events_logs, value)   WMI_SET_BITS(diag_events_logs, 17, 1, value)
10742 #define WMI_DIAG_EXT_FEATURE_GET(diag_events_logs)        WMI_GET_BITS(diag_events_logs, 18, 1)
10743 #define WMI_DIAG_EXT_FEATURE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 18, 1, value)
10744 
10745 typedef struct {
10746     A_UINT32 tlv_header;
10747     A_UINT32 num_of_diag_events_logs;
10748 /* The TLVs will follow.
10749  *    A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
10750  *                                      Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
10751  *                                      Bit 17 - Frequency of the DIAG EVENT/LOG High Frequency -1, Low Frequency - 0
10752  *                                      Bit 18 - Set if the EVENTS/LOGs are used for EXT DEBUG Framework
10753  */
10754 } wmi_diag_event_log_supported_event_fixed_params;
10755 
10756 typedef struct {
10757     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_flush_fixed_param*/
10758     A_UINT32 reserved0; /** placeholder for future */
10759 } wmi_debug_mesg_flush_fixed_param;
10760 
10761 typedef struct {
10762     A_UINT32 tlv_header;        /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_fw_data_stall_param */
10763     A_UINT32 vdev_id_bitmap;    /** bitmap representation for vdev_id's where data stall happened */
10764     A_UINT32 data_stall_type;   /** wlan_dbg_data_stall_type_e */
10765     /** reason_code1:
10766      * The information stored in reason_code1 varies based on the data stally
10767      * type values:
10768      * data_stall_type      | reason_code1
10769      * -----------------------------------------------------
10770      * HWSCHED_CMD_FLUSH    | flush req reason (0-40)
10771      * RX_REFILL_FAILED     | ring_id (0-7)
10772      * RX_FCS_LEN_ERROR     | exact error type
10773      */
10774     A_UINT32 reason_code1;
10775     A_UINT32 reason_code2;      /** on which tid/hwq stall happened */
10776     A_UINT32 recovery_type;     /** wlan_dbg_data_stall_recovery_type_e */
10777 } wmi_debug_mesg_fw_data_stall_param;
10778 
10779 typedef struct {
10780     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_fw_cal_failure_param */
10781     A_UINT32 tlv_header;
10782     /* wmi_ctrl_path_stats_cal_type_ids enum defines possible cal type IDs */
10783     A_UINT32 cal_type;
10784     /* wmi_cal_failure_reason_code enum defines possible failure reason codes */
10785     A_UINT32 cal_failure_reason_code;
10786 } wmi_debug_mesg_fw_cal_failure_param;
10787 
10788 typedef struct {
10789     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_flush_complete_fixed_param*/
10790     A_UINT32 reserved0; /** placeholder for future */
10791 } wmi_debug_mesg_flush_complete_fixed_param;
10792 
10793 typedef struct {
10794     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_breach_fixed_param */
10795     /* vdev_id, where RSSI breach event occurred */
10796     A_UINT32 vdev_id;
10797     /* request id */
10798     A_UINT32 request_id;
10799     /* bitmap[0-2] is corresponding to low_rssi[0-2]. bitmap[3-5] is corresponding to hi_rssi[0-2]*/
10800     A_UINT32 event_bitmap;
10801     /* rssi at the time of RSSI breach. Unit dBm */
10802     A_UINT32 rssi;
10803     /* bssid of the monitored AP's */
10804     wmi_mac_addr bssid;
10805 } wmi_rssi_breach_event_fixed_param;
10806 
10807 typedef struct {
10808     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fw_mem_dump */
10809     /** unique id identifying the segment */
10810     A_UINT32 seg_id;
10811     /** Start address of the segment to be read */
10812     A_UINT32 seg_start_addr_lo;
10813     A_UINT32 seg_start_addr_hi;
10814     /** Length of the segment to be read */
10815     A_UINT32 seg_length;
10816     /** Host bufeer address to which the segment will be read and dumped */
10817     A_UINT32 dest_addr_lo;
10818     A_UINT32 dest_addr_hi;
10819 } wmi_fw_mem_dump;
10820 
10821 /* Command to get firmware memory dump*/
10822 typedef struct {
10823     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param */
10824     /** unique id identifying the request */
10825     A_UINT32 request_id;
10826     /** number of memory dump segments */
10827     A_UINT32 num_fw_mem_dump_segs;
10828 /**
10829  * This TLV is followed by another TLV
10830  *     wmi_fw_mem_dump fw_mem_dump[];
10831  */
10832 } wmi_get_fw_mem_dump_fixed_param;
10833 
10834 /** Event to indicate the completion of fw mem dump */
10835 typedef struct {
10836     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_fw_mem_dump_fixed_param */
10837     /** unique id identifying the request, given in the request stats command */
10838     A_UINT32 request_id;
10839     /*In case of Firmware memory dump */
10840     A_UINT32 fw_mem_dump_complete;
10841 } wmi_update_fw_mem_dump_fixed_param;
10842 
10843 
10844 typedef enum {
10845     WMI_ROAMING_IDLE = 0,
10846     WMI_ROAMING_ACTIVE = 1,
10847 } wmi_roam_state;
10848 
10849 /* access categories */
10850 typedef enum {
10851    WMI_AC_VO  = 0,
10852    WMI_AC_VI  = 1,
10853    WMI_AC_BE  = 2,
10854    WMI_AC_BK  = 3,
10855    WMI_AC_MAX = 4,
10856 } wmi_traffic_ac;
10857 
10858 typedef enum {
10859     WMI_STA_STATS = 0,
10860     WMI_SOFTAP_STATS = 1,
10861     WMI_IBSS_STATS = 2,
10862     WMI_P2P_CLIENT_STATS = 3,
10863     WMI_P2P_GO_STATS = 4,
10864     WMI_NAN_STATS = 5,
10865     WMI_MESH_STATS = 6,
10866  } wmi_link_iface_type;
10867 
10868 /* channel operating width */
10869 typedef enum {
10870     WMI_CHAN_WIDTH_20    = 0,
10871     WMI_CHAN_WIDTH_40    = 1,
10872     WMI_CHAN_WIDTH_80    = 2,
10873     WMI_CHAN_WIDTH_160   = 3,
10874     WMI_CHAN_WIDTH_80P80 = 4,
10875     WMI_CHAN_WIDTH_5     = 5,
10876     WMI_CHAN_WIDTH_10    = 6,
10877     WMI_CHAN_WIDTH_165   = 7,
10878     WMI_CHAN_WIDTH_160P160 = 8,
10879     WMI_CHAN_WIDTH_320   = 9,
10880 
10881     WMI_CHAN_WIDTH_MAX,
10882 } wmi_channel_width;
10883 
10884 /* Clear stats */
10885 typedef struct {
10886     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_clear_link_stats_cmd_fixed_param */
10887     /** unique id identifying the VDEV, generated by the caller */
10888     A_UINT32 vdev_id;
10889     /** stop_stats_collection_req = 1 will imply stop the statistics collection */
10890     A_UINT32 stop_stats_collection_req;
10891     /** identifies what stats to be cleared */
10892     A_UINT32 stats_clear_req_mask;
10893     /** identifies which peer stats to be cleared. Valid only while clearing PER_REER */
10894     wmi_mac_addr peer_macaddr;
10895 /*
10896  * This TLV is (optionally) followed by other TLVs:
10897  *     A_UINT32 vdev_id_bitmap[];
10898  *         This array is present and non-zero length in MLO case, stats should
10899  *         only be cleared for the VDEVs in vdev_id_bitmap in the bitmap when
10900  *         it is present.
10901  *     wmi_mac_addr mld_macaddr[];
10902  *         This array is present and non-zero length in MLO case, stats should
10903  *         only be cleared for the peers with the MLD MAC addresses specified
10904  *         in the array.
10905  */
10906 } wmi_clear_link_stats_cmd_fixed_param;
10907 
10908 /* Link Stats configuration params. Trigger the link layer statistics collection*/
10909 typedef struct {
10910     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_link_stats_cmd_fixed_param */
10911     /** threshold to classify the pkts as short or long */
10912     A_UINT32 mpdu_size_threshold;
10913     /** set for field debug mode. Driver should collect all statistics regardless of performance impact.*/
10914     A_UINT32 aggressive_statistics_gathering;
10915 } wmi_start_link_stats_cmd_fixed_param;
10916 
10917 typedef struct {
10918     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_link_stats_cmd_fixed_param */
10919     /** Type of stats required. This is a bitmask WMI_LINK_STATS_RADIO, WMI_LINK_STATS_IFACE */
10920     A_UINT32 stats_type;
10921     /** unique id identifying the VDEV, generated by the caller */
10922     A_UINT32 vdev_id;
10923     /** unique id identifying the request, generated by the caller */
10924     A_UINT32 request_id;
10925     /** peer MAC address */
10926     wmi_mac_addr peer_macaddr;
10927 /*
10928  * This TLV is (optionally) followed by other TLVs:
10929  * A_UINT32 vdev_id_bitmap[];
10930  *     This array is present and non-zero length in MLO case, stats should only
10931  *     be provided from the vdev_id_bitmap in the bitmap when it is present.
10932  * wmi_mac_addr mld_macaddr[];
10933  *     This array is present and non-zero length in MLO case, stats should only
10934  *     be provided from the peers with the MLD MAC addresses specified
10935  *     in the array.
10936  */
10937 } wmi_request_link_stats_cmd_fixed_param;
10938 
10939 typedef struct {
10940     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unified_request_ll_get_sta_cmd_fixed_param */
10941     /** Type of stats required. This is a bitmask of WMI_LINK_STATS_RADIO, WMI_LINK_STATS_IFACE */
10942     A_UINT32 link_stats_type;
10943     /** unique id identifying the VDEV, generated by the caller */
10944     A_UINT32 vdev_id;
10945     /** unique id identifying the request, generated by the caller */
10946     A_UINT32 request_id;
10947     /** peer MAC address */
10948     wmi_mac_addr peer_macaddr;
10949     /** Type of stats required for get station cmd (see wmi_stats_id enum) */
10950     A_UINT32 get_sta_stats_id;
10951     /** pdev_id for identifying the MAC.  See macros starting with WMI_PDEV_ID_ for values. In non-DBDC case host should set it to 0. */
10952     A_UINT32 pdev_id;
10953 /*
10954  * This TLV is (optionally) followed by other TLVs:
10955  * A_UINT32 vdev_id_bitmap[];
10956  *     This array is present and non-zero length in MLO case, stats should only
10957  *     be provided from the vdev_id_bitmap in the bitmap when it is present.
10958  * wmi_mac_addr mld_macaddr[];
10959  *     This array is present and non-zero length in MLO case, stats should only
10960  *     be provided from the peers with the MLD MAC addresses specified
10961  *     in the array.
10962  */
10963 } wmi_request_unified_ll_get_sta_cmd_fixed_param;
10964 
10965 #define WLM_STATS_REQ_LINK          0x00000001
10966 typedef struct {
10967     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_wlm_stats_cmd_fixed_param */
10968     /** unique id identifying the VDEV, generated by the caller */
10969     A_UINT32 vdev_id;
10970     /** WLM event request bitmask
10971      * Used by host to customize the wlm stats report.
10972      * Filled with a combination of WLM_STATS_xxx values.
10973      */
10974     A_UINT32 request_bitmask;
10975 } wmi_request_wlm_stats_cmd_fixed_param;
10976 
10977 /* channel statistics */
10978 typedef struct {
10979     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_stats */
10980     /** Channel width (20, 40, 80, 80+80, 160) enum wmi_channel_width*/
10981     A_UINT32 channel_width;
10982     /** Primary 20 MHz channel */
10983     A_UINT32 center_freq;
10984     /** center frequency (MHz) first segment */
10985     A_UINT32 center_freq0;
10986     /** center frequency (MHz) second segment */
10987     A_UINT32 center_freq1;
10988     /** msecs the radio is awake (32 bits number accruing over time) */
10989     A_UINT32 radio_awake_time;
10990     /** msecs the CCA register is busy (32 bits number accruing over time)
10991      * Includes rx_time but not tx_time.
10992      */
10993     A_UINT32 cca_busy_time;
10994     /** msecs the radio is transmitting (32 bits number accruing over time) */
10995     A_UINT32 tx_time;
10996     /** msecs the radio is in active receive (32 bits number accruing over time) */
10997     A_UINT32 rx_time;
10998     /*** NOTE ***
10999      * Be cautious about adding new fields in wmi_channel_stats.
11000      * STA-centric targets may instantiate many instances of per-channel
11001      * stats, and consequently may consume a non-trivial amount of on-chip
11002      * memory for storing the channel stats.
11003      */
11004 } wmi_channel_stats;
11005 
11006 /* this structure used for pass vdev id in stats events */
11007 typedef struct {
11008     union {
11009         struct {
11010             A_UINT32 id      : 31, /* the vdev ID */
11011                      validate: 1;  /* validate bit, the vdev ID is only valid if this bit set as 1 */
11012         };
11013         A_UINT32 vdev_id;
11014     };
11015 } wmi_vdev_id_info;
11016 
11017 #define WMI_VDEV_ID_INFO_GET_VDEV_ID(vdev_id_info)             WMI_GET_BITS(vdev_id_info, 0, 31)
11018 #define WMI_VDEV_ID_INFO_SET_VDEV_ID(vdev_id_info, value)      WMI_SET_BITS(vdev_id_info, 0, 31, value)
11019 #define WMI_VDEV_ID_INFO_GET_VALIDATE(vdev_id_info)            WMI_GET_BITS(vdev_id_info, 31, 1)
11020 #define WMI_VDEV_ID_INFO_SET_VALIDATE(vdev_id_info, value)     WMI_SET_BITS(vdev_id_info, 31, 1, value)
11021 
11022 typedef struct {
11023     union {
11024         struct {
11025             A_UINT32
11026                 id: 8, /* the vdev ID */
11027                 /* validate:
11028                  * validate bit, the vdev ID (id and link_status) is only valid
11029                  * if this bit set as 1.
11030                  */
11031                 validate: 1,
11032                 /* link_status:
11033                  * 0 -> link inactive
11034                  * 1 -> link active
11035                  */
11036                 link_status: 1,
11037                 reserved:22;
11038         };
11039         A_UINT32 vdev_info_word0;
11040     };
11041 } wmi_vdev_id_info_v2;
11042 
11043 #define WMI_VDEV_ID_INFO_V2_GET_VDEV_ID(vdev_id_info_v2)             WMI_GET_BITS(vdev_id_info_v2, 0, 8)
11044 #define WMI_VDEV_ID_INFO_V2_SET_VDEV_ID(vdev_id_info_v2, value)      WMI_SET_BITS(vdev_id_info_v2, 0, 8, value)
11045 #define WMI_VDEV_ID_INFO_V2_GET_VALIDATE(vdev_id_info_v2)            WMI_GET_BITS(vdev_id_info_v2, 8, 1)
11046 #define WMI_VDEV_ID_INFO_V2_SET_VALIDATE(vdev_id_info_v2, value)     WMI_SET_BITS(vdev_id_info_v2, 8, 1, value)
11047 #define WMI_VDEV_ID_INFO_V2_GET_LINK_STATUS(vdev_id_info_v2)         WMI_GET_BITS(vdev_id_info_v2, 9, 1)
11048 #define WMI_VDEV_ID_INFO_V2_SET_LINK_STATUS(vdev_id_info_v2, value)  WMI_SET_BITS(vdev_id_info_v2, 9, 1, value)
11049 
11050 
11051 /*
11052  * Each step represents 0.5 dB.  The starting value is 0 dBm.
11053  * Thus the TPC levels cover 0 dBm to 31.5 dBm inclusive in 0.5 dB steps.
11054  */
11055 #define MAX_TPC_LEVELS 64
11056 
11057 /* radio statistics */
11058 typedef struct {
11059     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_radio_link_stats */
11060     /** Wifi radio (if multiple radio supported) */
11061     A_UINT32 radio_id;
11062     /** msecs the radio is awake (32 bits number accruing over time) */
11063     A_UINT32 on_time;
11064     /** msecs the radio is transmitting (32 bits number accruing over time) */
11065     A_UINT32 tx_time;
11066     /** msecs the radio is in active receive (32 bits number accruing over time) */
11067     A_UINT32 rx_time;
11068     /** msecs the radio is awake due to all scan (32 bits number accruing over time) */
11069     A_UINT32 on_time_scan;
11070     /** msecs the radio is awake due to NAN (32 bits number accruing over time) */
11071     A_UINT32 on_time_nbd;
11072     /** msecs the radio is awake due to G?scan (32 bits number accruing over time) */
11073     A_UINT32 on_time_gscan;
11074     /** msecs the radio is awake due to roam?scan (32 bits number accruing over time) */
11075     A_UINT32 on_time_roam_scan;
11076     /** msecs the radio is awake due to PNO scan (32 bits number accruing over time) */
11077     A_UINT32 on_time_pno_scan;
11078     /** msecs the radio is awake due to HS2.0 scans and GAS exchange (32 bits number accruing over time) */
11079     A_UINT32 on_time_hs20;
11080     /** number of channels */
11081     A_UINT32 num_channels;
11082     /** tx time per TPC level - DEPRECATED
11083      * This field is deprecated.
11084      * It is superseded by the WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID message.
11085      */
11086     A_UINT32 tx_time_per_tpc[MAX_TPC_LEVELS];
11087     /** msecs the radio is awake due to Host initiated scan (accruing over time) */
11088     A_UINT32 on_time_host_scan;
11089     /** msecs the radio is awake due to LPI scan (accruing over time) */
11090     A_UINT32 on_time_lpi_scan;
11091 } wmi_radio_link_stats;
11092 
11093 /** tx time per power level statistics */
11094 typedef struct {
11095     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_power_level_stats_evt_fixed_param */
11096     /** total number of tx power levels */
11097     A_UINT32 total_num_tx_power_levels;
11098     /** number of tx power levels that are carried in this event */
11099     A_UINT32 num_tx_power_levels;
11100     /** offset of current stats
11101      * If ((num_tx_power_levels + power_level_offset)) ==
11102      *     total_num_tx_power_levels)
11103      * this message completes the report of tx time per power levels.
11104      * Otherwise, additional WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID messages
11105      * will be sent by the target to deliver the remainder of the tx time
11106      * per power level stats.
11107      */
11108     A_UINT32 power_level_offset;
11109     /* radio id for this tx time per power level statistics (if multiple radio supported) */
11110     A_UINT32 radio_id;
11111     /** Indicates the vdev id of the stats for MLO stats query */
11112     wmi_vdev_id_info vdev_id_info;
11113 /*
11114  * This TLV will be followed by a TLV containing a variable-length array of
11115  * A_UINT32 with tx time per power level data
11116  *  A_UINT32 tx_time_per_power_level[num_tx_power_levels]
11117  * The tx time is in units of milliseconds.
11118  * The power levels are board-specific values; a board-specific translation
11119  * has to be applied to determine what actual power corresponds to each
11120  * power level.
11121  * Just as the host has a BDF file available, the host should also have
11122  * a data file available that provides the power level to power translations.
11123  */
11124 } wmi_tx_power_level_stats_evt_fixed_param;
11125 
11126 
11127 /** Radio statistics (once started) do not stop or get reset unless wifi_clear_link_stats is invoked */
11128 typedef struct {
11129     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_radio_link_stats_event_fixed_param */
11130     /** unique id identifying the request, given in the request stats command */
11131     A_UINT32 request_id;
11132     /** Number of radios*/
11133     A_UINT32 num_radio;
11134     /** more_data will be set depending on the number of radios */
11135     A_UINT32 more_radio_events;
11136     /*
11137      * For the event WMI_RADIO_LINK_STATS_EVENTID = 0x16004,
11138      * FW may not be able to send all the channels (2 GHz, 5 GHz & 6 GHz)
11139      * together in one event message, due to buffer size limitations.
11140      * To avoid this limitation, FW will send multiple events to HOST
11141      * depending upon the number of channels.
11142      * If more_channels is set to 0 means FW has indicated all the
11143      * channels for this radio.
11144      * If more_channels is set to 1, it indicates FW will send another
11145      * event having additional channels for the same radio.
11146      */
11147     A_UINT32 more_channels;
11148     /** Indicates the vdev id of the stats for MLO stats query */
11149     wmi_vdev_id_info vdev_id_info;
11150 /*
11151  * This TLV is followed by another TLV of array of bytes
11152  *   size of(struct wmi_radio_link_stats);
11153  *
11154  * This TLV is followed by another TLV of array of bytes
11155  *   num_channels * size of(struct wmi_channel_stats)
11156  */
11157 } wmi_radio_link_stats_event_fixed_param;
11158 
11159 /* per rate statistics */
11160 typedef struct {
11161     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rate_stats */
11162     /** rate information
11163      * The rate-code is a 1-byte field in which:for given rate, nss and preamble
11164      * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
11165      * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
11166      * b'3-b'0 indicate the rate, which is indicated as follows:
11167      *          OFDM :     0: OFDM 48 Mbps
11168      *                     1: OFDM 24 Mbps
11169      *                     2: OFDM 12 Mbps
11170      *                     3: OFDM 6 Mbps
11171      *                     4: OFDM 54 Mbps
11172      *                     5: OFDM 36 Mbps
11173      *                     6: OFDM 18 Mbps
11174      *                     7: OFDM 9 Mbps
11175      *         CCK (pream == 1)
11176      *                     0: CCK 11 Mbps Long
11177      *                     1: CCK 5.5 Mbps Long
11178      *                     2: CCK 2 Mbps Long
11179      *                     3: CCK 1 Mbps Long
11180      *                     4: CCK 11 Mbps Short
11181      *                     5: CCK 5.5 Mbps Short
11182      *                     6: CCK 2 Mbps Short
11183      *         HT/VHT (pream == 2/3)
11184      *                     0..7: MCS0..MCS7 (HT)
11185      *                     0..9: MCS0..MCS9 (VHT)
11186      */
11187     A_UINT32 rate;
11188     /** units of 100 Kbps */
11189     A_UINT32 bitrate;
11190     /** number of successfully transmitted data pkts (ACK rcvd) */
11191     A_UINT32 tx_mpdu;
11192     /** number of received data pkts */
11193     A_UINT32 rx_mpdu;
11194     /** number of data packet losses (no ACK) */
11195     A_UINT32 mpdu_lost;
11196     /** total number of data pkt retries */
11197     A_UINT32 retries;
11198     /** number of short data pkt retries */
11199     A_UINT32 retries_short;
11200     /** number of long data pkt retries */
11201     A_UINT32 retries_long;
11202 } wmi_rate_stats;
11203 
11204 typedef struct {
11205     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_link_stats */
11206     /** peer type (AP, TDLS, GO etc.) enum wmi_peer_type*/
11207     A_UINT32 peer_type;
11208     /** mac address */
11209     wmi_mac_addr peer_mac_address;
11210     /** peer wmi_CAPABILITY_XXX */
11211     A_UINT32 capabilities;
11212     /** number of rates */
11213     A_UINT32 num_rates;
11214 } wmi_peer_link_stats;
11215 
11216 /** PEER statistics (once started) reset and start afresh after each connection */
11217 typedef struct {
11218     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_stats_event_fixed_param */
11219     /** unique id identifying the request, given in the request stats command */
11220     A_UINT32 request_id;
11221     /** number of peers accomidated in this particular event  */
11222     A_UINT32 num_peers;
11223     /** Indicates the fragment number  */
11224     A_UINT32 peer_event_number;
11225     /** Indicates if there are more peers which will be sent as separate peer_stats event */
11226     A_UINT32 more_data;
11227     /** Indicates the vdev id of the stats for MLO stats query */
11228     wmi_vdev_id_info vdev_id_info;
11229 
11230 /**
11231  * This TLV is followed by another TLV
11232  * num_peers * size of(struct wmi_peer_stats)
11233  * num_rates * size of(struct wmi_rate_stats). num_rates is the sum of the rates of all the peers.
11234  */
11235 } wmi_peer_stats_event_fixed_param;
11236 
11237 /* per access category statistics */
11238 typedef struct {
11239     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_ac_stats */
11240     /** access category (VI, VO, BE, BK) enum wmi_traffic_ac*/
11241     A_UINT32 ac_type;
11242     /** number of successfully transmitted unicast data pkts (ACK rcvd) */
11243     A_UINT32 tx_mpdu;
11244     /** number of received unicast mpdus */
11245     A_UINT32 rx_mpdu;
11246     /** number of successfully transmitted multicast data packets */
11247     /** STA case: implies ACK received from AP for the unicast packet in which mcast pkt was sent */
11248     A_UINT32 tx_mcast;
11249     /** number of received multicast data packets */
11250     A_UINT32 rx_mcast;
11251     /** number of received unicast a-mpdus */
11252     A_UINT32 rx_ampdu;
11253     /** number of transmitted unicast a-mpdus */
11254     A_UINT32 tx_ampdu;
11255     /** number of data pkt losses (no ACK) */
11256     A_UINT32 mpdu_lost;
11257     /** total number of data pkt retries */
11258     A_UINT32 retries;
11259     /** number of short data pkt retries */
11260     A_UINT32 retries_short;
11261     /** number of long data pkt retries */
11262     A_UINT32 retries_long;
11263     /** data pkt min contention time (usecs) */
11264     A_UINT32 contention_time_min;
11265     /** data pkt max contention time (usecs) */
11266     A_UINT32 contention_time_max;
11267     /** data pkt avg contention time (usecs) */
11268     A_UINT32 contention_time_avg;
11269     /** num of data pkts used for contention statistics */
11270     A_UINT32 contention_num_samples;
11271     /** number of pending pkts */
11272     A_UINT32 tx_pending_msdu;
11273 } wmi_wmm_ac_stats;
11274 
11275 /* interface statistics */
11276 typedef struct {
11277     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats */
11278     /** access point beacon received count from connected AP */
11279     A_UINT32 beacon_rx;
11280     /** access point mgmt frames received count from connected AP (including Beacon) */
11281     A_UINT32 mgmt_rx;
11282     /** action frames received count */
11283     A_UINT32 mgmt_action_rx;
11284     /** action frames transmit count */
11285     A_UINT32 mgmt_action_tx;
11286     /** access Point Beacon and Management frames RSSI (averaged) */
11287     A_UINT32 rssi_mgmt;
11288     /** access Point Data Frames RSSI (averaged) from connected AP */
11289     A_UINT32 rssi_data;
11290     /** access Point ACK RSSI (averaged) from connected AP */
11291     A_UINT32 rssi_ack;
11292     /** number of peers */
11293     A_UINT32 num_peers;
11294     /** Indicates how many peer_stats events will be sent depending on the num_peers. */
11295     A_UINT32 num_peer_events;
11296     /** number of ac */
11297     A_UINT32 num_ac;
11298     /** Roaming Stat */
11299     A_UINT32 roam_state;
11300     /** Average Beacon spread offset is the averaged time delay between TBTT and beacon TSF */
11301     /** Upper 32 bits of averaged 64 bit beacon spread offset */
11302     A_UINT32 avg_bcn_spread_offset_high;
11303     /** Lower 32 bits of averaged 64 bit beacon spread offset */
11304     A_UINT32 avg_bcn_spread_offset_low;
11305     /** Takes value of 1 if AP leaks packets after sending an ACK for PM=1 otherwise 0 */
11306     A_UINT32 is_leaky_ap;
11307     /** Average number of frames received from AP after receiving the ACK for a frame with PM=1 */
11308     A_UINT32 avg_rx_frms_leaked;
11309     /** Rx leak watch window currently in force to minimize data loss because of leaky AP. Rx leak window is the
11310         time driver waits before shutting down the radio or switching the channel and after receiving an ACK for
11311         a data frame with PM bit set) */
11312     A_UINT32 rx_leak_window;
11313     A_UINT32 tx_rts_succ_cnt;
11314     A_UINT32 tx_rts_fail_cnt;
11315     A_UINT32 tx_ppdu_succ_cnt;
11316     A_UINT32 tx_ppdu_fail_cnt;
11317     /** msecs the interface is in Connected state (accruing over time) */
11318     A_UINT32 connected_duration;
11319     /** msecs the interface is in DisConnected state (accruing over time) */
11320     A_UINT32 disconnected_duration;
11321     /** msecs the interface is doing RTT ranging (accruing over time) */
11322     A_UINT32 rtt_ranging_duration;
11323     /** msecs the interface is in RTT responder mode (accruing over time) */
11324     A_UINT32 rtt_responder_duration;
11325     /** Number of Probes (Tx) sent on the interface (accruing over time) */
11326     A_UINT32 num_probes_tx;
11327     /** Number of Beacon misses on this interface (accruing over time) */
11328     A_UINT32 num_beacon_miss;
11329     /** time slice duty cycle percentage of this interface */
11330     A_UINT32 time_slice_duty_cycle;
11331     /**
11332      * Current home channel noise floor value report to host
11333      * Units are dBm, values 0x0000ffff and 0x0 are invalid.
11334      */
11335     A_INT32 nf_cal_val;
11336 } wmi_iface_link_stats;
11337 
11338 typedef enum {
11339     WMI_OFFLOAD_STATS_TYPE_SOC_BCAST   = 0,
11340     WMI_OFFLOAD_STATS_TYPE_SOC_MCAST   = 1,
11341     WMI_OFFLOAD_STATS_TYPE_SOC_UCAST   = 2,
11342     WMI_OFFLOAD_STATS_TYPE_ARP         = 3,
11343     WMI_OFFLOAD_STATS_TYPE_NS          = 4,
11344     WMI_OFFLOAD_STATS_TYPE_APF_BCAST   = 5,
11345     WMI_OFFLOAD_STATS_TYPE_APF_MCAST   = 6,
11346     WMI_OFFLOAD_STATS_TYPE_APF_UCAST   = 7,
11347     /* Add New offload stat type here */
11348     WMI_OFFLOAD_STATS_TYPE_MAX,
11349 } wmi_offload_stats_type;
11350 
11351 typedef struct {
11352    A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_offload_stats */
11353    /** Type of offload stat. enum wmi_offload_stats_type **/
11354    A_UINT32 type;
11355    /** Number of (MSDUs) frames Received **/
11356    A_UINT32 rx_count;
11357    /** Number of frames Dropped **/
11358    A_UINT32 drp_count;
11359    /** Number of frames for which FW Responded (Valid for ARP and NS only). (or)
11360      * Number of frames forwarded to Host (Valid for stats type except ARP and NS). **/
11361    A_UINT32 fwd_count;
11362 } wmi_iface_offload_stats;
11363 
11364 typedef struct {
11365    A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_powersave_stats */
11366    /** Total TIM beacon event that wlan ps received **/
11367    A_UINT32 tot_tim_bcn;
11368    /** Total error TIM beacon found by wlan ps including no rx in TIM wakeup and TIM event in active state **/
11369    A_UINT32 tot_err_tim_bcn;
11370 } wmi_iface_powersave_stats;
11371 
11372 typedef struct {
11373     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_link_stats */
11374 
11375     /** IPA tx channel 0 buffer hp/tp */
11376     A_UINT32 wbm2sw_ring_ch0_hp;
11377     A_UINT32 wbm2sw_ring_ch0_tp;
11378     /** IPA tx channel 1 buffer hp/tp */
11379     A_UINT32 wbm2sw_ring_ch1_hp;
11380     A_UINT32 wbm2sw_ring_ch1_tp;
11381 
11382     /** IPA rx channel 0 buffer hp/tp */
11383     A_UINT32 reo2sw_ring_ch0_hp;
11384     A_UINT32 reo2sw_ring_ch0_tp;
11385     /** IPA rx channel 1 buffer hp/tp */
11386     A_UINT32 reo2sw_ring_ch1_hp;
11387     A_UINT32 reo2sw_ring_ch1_tp;
11388 
11389     /** IPA rx channel 0 ring full counter */
11390     A_UINT32 reo2sw_ch0_producer_full_cnt;
11391     /** IPA rx channel 1 ring full counter */
11392     A_UINT32 reo2sw_ch1_producer_full_cnt;
11393 
11394     /** IPA rx path drop feature enable */
11395     A_UINT32 ipa_drop_enabled;
11396     /** Counter for IPA rx path switch to drop-enabled state */
11397     A_UINT32 ipa_switch_to_drop_cnt;
11398     /** Counter for IPA rx path switch from drop-enabled state to normal state */
11399     A_UINT32 ipa_switch_from_drop_cnt;
11400 } wmi_ipa_link_stats;
11401 
11402 typedef struct {
11403     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_per_mac_stats */
11404 
11405     /** TCL total enqueued packet number */
11406     A_UINT32 tcl_enqueue_packets;
11407     /** TCL total discarded packet number during enqueue */
11408     A_UINT32 tcl_enqueue_discard;
11409 
11410     /** Total tx duration time, usec */
11411     A_UINT32 total_ppdu_duration_us;
11412 
11413     /** IPA rx no resource debug counter */
11414     A_UINT32 wmac_no_resource_drop_ppdu_cnt_ix0;
11415     A_UINT32 wmac_no_resource_drop_ppdu_cnt_ix1;
11416     A_UINT32 wmac_no_resource_drop_mpdu_cnt_ix0;
11417     A_UINT32 wmac_no_resource_drop_mpdu_cnt_ix1;
11418     A_UINT32 wmac_rxdma2reo_producer_full_cnt;
11419 } wmi_ipa_per_mac_stats;
11420 
11421 /** IPA statistics (once started) reset and start afresh after each connection */
11422 typedef struct {
11423     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_link_stats_event_fixed_param */
11424     /** unique id identifying the request, given in the request stats command */
11425     A_UINT32 request_id;
11426     /** number of MACs */
11427     A_UINT32 num_macs;
11428 /*
11429  * This TLV is followed by other TLVs:
11430  *   wmi_ipa_link_stats ipa_link_stats;
11431  *   wmi_ipa_per_mac_stats ipa_per_mac_stats[num_macs];
11432  */
11433 } wmi_ipa_link_stats_event_fixed_param;
11434 
11435 /** Interface statistics (once started) reset and start afresh after each connection */
11436 typedef struct {
11437     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats_event_fixed_param */
11438     /** unique id identifying the request, given in the request stats command */
11439     A_UINT32 request_id;
11440     /** unique id identifying the VDEV, generated by the caller */
11441     A_UINT32 vdev_id;
11442     /** Number of offload stats **/
11443     A_UINT32 num_offload_stats;
11444 /*
11445  * This TLV is followed by other TLVs:
11446  *   wmi_iface_link_stats iface_link_stats;
11447  *   num_ac * size of(struct wmi_wmm_ac_stats)
11448  *   wmi_iface_offload_stats iface_offload_stats[num_offload_stats]
11449  *   wmi_iface_powersave_stats iface_powersave_stats[]
11450  */
11451 } wmi_iface_link_stats_event_fixed_param;
11452 
11453 typedef struct {
11454     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlm_stats_event_fixed_param */
11455     /** bitmask listing which WLM stats are provided.
11456      * Copied from wlm_stats_cmd_fixed_param.
11457      * (This field is provided for convenience rather than necessity, since
11458      * the recipient can directly check which TLV arrays have non-zero length.)
11459      */
11460     A_UINT32 request_bitmask;
11461     /** unique id identifying the VDEV, generated by the caller */
11462     A_UINT32 vdev_id;
11463     /**
11464      * timestamp of event report, in microseconds units
11465      * This timestamp is for debugging purposes only.
11466      * It can be used to correlate this WLM stats event data with
11467      * other WLM information uploaded through other means.
11468      */
11469     A_UINT32 timestamp;
11470     /**
11471      * Interval between two consecutive WLM stats query requests,
11472      * in microseconds units.
11473      * This interval is used for converting the scan_period and pwr_on_period
11474      * values from within wmi_wlm_link_stats from percentage units to time
11475      * units.
11476      */
11477     A_UINT32 req_interval;
11478 /*
11479  * This TLV is followed by an A_UINT32 array TLV carrying an opaque payload.
11480  */
11481 } wmi_wlm_stats_event_fixed_param;
11482 
11483 /** Suspend option */
11484 enum {
11485     WMI_PDEV_SUSPEND, /* suspend */
11486     WMI_PDEV_SUSPEND_AND_DISABLE_INTR, /* suspend and disable all interrupts */
11487 };
11488 
11489 typedef struct {
11490     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_suspend_cmd_fixed_param  */
11491     /* suspend option sent to target */
11492     A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
11493     A_UINT32 suspend_opt;
11494 } wmi_pdev_suspend_cmd_fixed_param;
11495 
11496 typedef struct {
11497     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_cmd_fixed_param  */
11498     A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
11499 } wmi_pdev_resume_cmd_fixed_param;
11500 
11501 typedef struct {
11502     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_stats_event_fixed_param,  */
11503     A_UINT32 num_vdev_stats; /* number of vdevs */
11504 } wmi_vdev_rate_stats_event_fixed_param;
11505 
11506 typedef struct {
11507     A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_ht_info*/
11508     A_UINT32 vdevid; /* Id of the wlan vdev*/
11509     A_UINT32 tx_nss; /* Bit 28 of tx_rate_kbps has this info - based on last data packet transmitted*/
11510     A_UINT32 rx_nss; /* Bit 24 of rx_rate_kbps - same as above*/
11511     A_UINT32 tx_preamble; /* Bits 30-29 from tx_rate_kbps */
11512     A_UINT32 rx_preamble; /* Bits 26-25 from rx_rate_kbps */
11513 } wmi_vdev_rate_ht_info;
11514 
11515 typedef struct {
11516     A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_rx_aggr_failure_event_fixed_param */
11517     A_UINT32 num_failure_info; /* How many holes on rx aggregation */
11518 } wmi_rx_aggr_failure_event_fixed_param;
11519 
11520 typedef struct {
11521     A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_wmi_rx_aggr_failure_info */
11522     A_UINT32 start_seq; /* start sequence number of the hole */
11523     A_UINT32 end_seq; /* end sequence number of the hole */
11524 } wmi_rx_aggr_failure_info;
11525 
11526 typedef struct {
11527     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_pn_request_cmd_fixed_param */
11528     /** unique id identifying the VDEV, generated by the caller */
11529     A_UINT32 vdev_id;
11530     /** peer MAC address */
11531     wmi_mac_addr peer_macaddr;
11532     A_UINT32 key_type; /* use standard cipher types - see WMI_CIPHER_ defs */
11533     /** key index **/
11534     A_UINT32 key_ix;
11535 } wmi_peer_tx_pn_request_cmd_fixed_param;
11536 
11537 typedef struct {
11538     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_pn_request_cmd_fixed_param */
11539     /** unique id identifying the VDEV, generated by the caller */
11540     A_UINT32 vdev_id;
11541     /** peer MAC address */
11542     wmi_mac_addr peer_macaddr;
11543     A_UINT32 key_type; /* use standard cipher types - see WMI_CIPHER_ defs */
11544     /** key index **/
11545     A_UINT32 key_ix;
11546 } wmi_peer_rx_pn_request_cmd_fixed_param;
11547 
11548 typedef struct {
11549     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_pn_response_event_fixed_param */
11550     /** unique id identifying the VDEV, generated by the caller */
11551     A_UINT32 vdev_id;
11552     /** peer MAC address */
11553     wmi_mac_addr peer_macaddr;
11554     A_UINT32 key_type; /* use standard cipher types - see WMI_CIPHER_ defs */
11555     /** Packet Number
11556     * The PN is provided in little endian order, with bits 7:0 of the PN
11557     * residing in pn[0].
11558     * The key_type indirectly specifies the packet number length, and thus
11559     * how many bytes within pn[] are filled with valid data.
11560     */
11561     A_UINT8 pn[16];
11562     /** key index **/
11563     A_UINT32 key_ix;
11564 } wmi_peer_tx_pn_response_event_fixed_param;
11565 
11566 typedef struct {
11567     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_pn_response_event_fixed_param */
11568     /** unique id identifying the VDEV, generated by the caller */
11569     A_UINT32 vdev_id;
11570     /** peer MAC address */
11571     wmi_mac_addr peer_macaddr;
11572     A_UINT32 key_type; /* use standard cipher types - see WMI_CIPHER_ defs */
11573     A_UINT32 key_idx;
11574     /** Packet Number
11575     * The PN is provided in little endian order, with bits 7:0 of the PN
11576     * residing in pn[0].
11577     * The key_type indirectly specifies the packet number length, and thus
11578     * how many bytes within pn[] are filled with valid data.
11579     */
11580     A_UINT8 pn[WMI_MAX_PN_LEN];
11581 } wmi_peer_rx_pn_response_event_fixed_param;
11582 
11583 typedef struct {
11584     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
11585     wmi_stats_id stats_id;
11586     /** number of pdev stats event structures (wmi_pdev_stats) 0 or 1 */
11587     A_UINT32 num_pdev_stats;
11588     /** number of vdev stats event structures  (wmi_vdev_stats) 0 or max vdevs */
11589     A_UINT32 num_vdev_stats;
11590     /** number of peer stats event structures  (wmi_peer_stats) 0 or max peers */
11591     A_UINT32 num_peer_stats;
11592     A_UINT32 num_bcnflt_stats;
11593     /** number of chan stats event structures  (wmi_chan_stats) 0 to MAX MCC CHANS */
11594     A_UINT32 num_chan_stats;
11595     /** number of MIB stats event structures (wmi_mib_stats) */
11596     A_UINT32 num_mib_stats;
11597     A_UINT32 pdev_id; /** pdev_id for identifying the MAC.  See macros starting with WMI_PDEV_ID_ for values. In non-DBDC case host should set it to 0. */
11598     /** number of beacon stats event structures (wmi_bcn_stats) */
11599     A_UINT32 num_bcn_stats;
11600     /** number of extended peer stats event structures (wmi_peer_extd_stats) */
11601     A_UINT32 num_peer_extd_stats;
11602     /** number of extd2 peer stats event structures (wmi_peer_extd2_stats) */
11603     A_UINT32 num_peer_extd2_stats;
11604     /** last_event
11605      * The most significant bit is set to 1 to indicate whether the last_event
11606      * field contains valid data.  The least significant bit is set to 1 to
11607      * indicate this is the final WMI_STATS_EVENT in a series.
11608      */
11609     A_UINT32 last_event;
11610     /** number of extended MIB stats event structures (wmi_mib_extd_stats) */
11611     A_UINT32 num_mib_extd_stats;
11612     /** Indicates the vdev id of the stats for MLO stats query */
11613     wmi_vdev_id_info vdev_id_info;
11614     /** Indicates the vdev id of the stats for MLO stats query v2 */
11615     wmi_vdev_id_info_v2 vdev_id_info_v2;
11616 
11617 /* This TLV is followed by another TLV of array of bytes
11618  *   A_UINT8 data[];
11619  *  This data array contains
11620  *   num_pdev_stats * size of(struct wmi_pdev_stats)
11621  *   num_vdev_stats * size of(struct wmi_vdev_stats)
11622  *   num_peer_stats * size of(struct wmi_peer_stats)
11623  *   num_bcnflt_stats * size_of()
11624  *   num_chan_stats * size of(struct wmi_chan_stats)
11625  *   num_mib_stats * size of(struct wmi_mib_stats)
11626  *   num_bcn_stats * size of(struct wmi_bcn_stats)
11627  */
11628 /* If WMI_REQUEST_PEER_EXTD_STAT is set in stats_id,
11629  * the data[] array also contains num_peer_stats * size of wmi_peer_extd_stats
11630  * following the information elements listed above.
11631  */
11632 /* If WMI_REQUEST_MIB_EXTD_STAT is set in stats_id,
11633  * the data[] array also contains
11634  * num_mib_extd_stats * size of(struct wmi_mib_extd_stats)
11635  * following the information elements listed above.
11636  */
11637 /* If WMI_REQUEST_PMF_BCN_PROTECT_STAT is set in stats_id, then TLV
11638  * wmi_pmf_bcn_protect_stats pmf_bcn_protect_stats[]
11639  * follows the other TLVs
11640  */
11641 /* If WMI_REQUEST_VDEV_EXTD_STAT is set in stats_id, then TLV
11642  * wmi_vdev_extd_stats wmi_vdev_extd_stats[]
11643  * follows the other TLVs
11644  */
11645 /* If WMI_REQUEST_PDEV_EXTD_STAT is set in stats_id, then TLV
11646  * wmi_pdev_extd_stats wmi_pdev_extd_stats[]
11647  * follows the other TLVs
11648  */
11649 /* If WMI_REQUEST_PDEV_TELEMETRY_STAT is set in stats_id, then TLV
11650  * wmi_pdev_telemetry_stats wmi_pdev_telemetry_stats[]
11651  * follows the other TLVs
11652  */
11653 } wmi_stats_event_fixed_param;
11654 
11655 /* WLAN channel CCA stats bitmap  */
11656 #define WLAN_STATS_IDLE_TIME_SHIFT             0
11657 #define WLAN_STATS_IDLE_TIME_TIME              0x00000001
11658 
11659 #define WLAN_STATS_TX_TIME_SHIFT               1
11660 #define WLAN_STATS_TX_TIME_MASK                0x00000002
11661 
11662 #define WLAN_STATS_RX_IN_BSS_TIME_SHIFT        2
11663 #define WLAN_STATS_RX_IN_BSS_TIME_MASK         0x00000004
11664 
11665 #define WLAN_STATS_RX_OUT_BSS_TIME_SHIFT       3
11666 #define WLAN_STATS_RX_OUT_BSS_TIME_MASK        0x00000008
11667 
11668 #define WLAN_STATS_RX_BUSY_TIME_SHIFT          4
11669 #define WLAN_STATS_RX_BUSY_TIME_MASK           0x00000010
11670 
11671 #define WLAN_STATS_RX_IN_BAD_COND_TIME_SHIFT   5
11672 #define WLAN_STATS_RX_IN_BAD_COND_TIME_MASK    0x00000020
11673 
11674 #define WLAN_STATS_TX_IN_BAD_COND_TIME_SHIFT   6
11675 #define WLAN_STATS_TX_IN_BAD_COND_TIME_MASK    0x00000040
11676 
11677 #define WLAN_STATS_WLAN_NOT_AVAIL_TIME_SHIFT   7
11678 #define WLAN_STATS_WLAN_NOT_AVAIL_TIME_MASK    0x00000080
11679 
11680 /* WLAN peer signal stats bitmap  */
11681 #define WLAN_STATS_PER_CHAIN_SNR_SHIFT         0
11682 #define WLAN_STATS_PER_CHAIN_SNR_MASK          0x00000001
11683 
11684 #define WLAN_STATS_PER_CHAIN_NF_SHIFT          1
11685 #define WLAN_STATS_PER_CHAIN_NF_MASK           0x00000002
11686 
11687 /* WLAN TX stats bitmap  */
11688 #define WLAN_STATS_TX_MSDU_CNT_SHIFT           0
11689 #define WLAN_STATS_TX_MSDU_CNT_MASK            0x00000001
11690 
11691 #define WLAN_STATS_TX_MPDU_CNT_SHIFT           1
11692 #define WLAN_STATS_TX_MPDU_CNT_MASK            0x00000002
11693 
11694 #define WLAN_STATS_TX_PPDU_CNT_SHIFT           2
11695 #define WLAN_STATS_TX_PPDU_CNT_MASK            0x00000004
11696 
11697 #define WLAN_STATS_TX_BYTES_SHIFT              3
11698 #define WLAN_STATS_TX_BYTES_MASK               0x00000008
11699 
11700 #define WLAN_STATS_TX_MSDU_DROP_CNT_SHIFT      4
11701 #define WLAN_STATS_TX_MSDU_DROP_CNT_MASK       0x00000010
11702 
11703 #define WLAN_STATS_TX_DROP_BYTES_SHIFT         5
11704 #define WLAN_STATS_TX_DROP_BYTES_MASK          0x00000020
11705 
11706 #define WLAN_STATS_TX_MPDU_RETRY_CNT_SHIFT     6
11707 #define WLAN_STATS_TX_MPDU_RETRY_CNT_MASK      0x00000040
11708 
11709 #define WLAN_STATS_TX_MPDU_FAIL_CNT_SHIFT      7
11710 #define WLAN_STATS_TX_MPDU_FAIL_CNT_MASK       0x00000080
11711 
11712 #define WLAN_STATS_TX_PPDU_FAIL_CNT_SHIFT      8
11713 #define WLAN_STATS_TX_PPDU_FAIL_CNT_MASK       0x00000100
11714 
11715 #define WLAN_STATS_TX_MPDU_AGGR_SHIFT          9
11716 #define WLAN_STATS_TX_MPDU_AGGR_MASK           0x00000200
11717 
11718 #define WLAN_STATS_TX_SUCC_MCS_SHIFT           10
11719 #define WLAN_STATS_TX_SUCC_MCS_MASK            0x00000400
11720 
11721 #define WLAN_STATS_TX_FAIL_MCS_SHIFT           11
11722 #define WLAN_STATS_TX_FAIL_MCS_MASK            0x00000800
11723 
11724 #define WLAN_STATS_TX_PPDU_DELAY_SHIFT         12
11725 #define WLAN_STATS_TX_PPDU_DELAY_MASK          0x00001000
11726 
11727 /* WLAN RX stats bitmap  */
11728 #define WLAN_STATS_MAC_RX_MPDU_CNT_SHIFT     0
11729 #define WLAN_STATS_MAC_RX_MPDU_CNT_MASK      0x00000001
11730 
11731 #define WLAN_STATS_MAC_RX_BYTES_SHIFT        1
11732 #define WLAN_STATS_MAC_RX_BYTES_MASK         0x00000002
11733 
11734 #define WLAN_STATS_PHY_RX_PPDU_CNT_SHIFT     2
11735 #define WLAN_STATS_PHY_RX_PPDU_CNT_MASK      0x00000004
11736 
11737 #define WLAN_STATS_PHY_RX_BYTES_SHIFT        3
11738 #define WLAN_STATS_PHY_RX_BYTES_MASK         0x00000008
11739 
11740 #define WLAN_STATS_RX_DISORDER_CNT_SHIFT     4
11741 #define WLAN_STATS_RX_DISORDER_CNT_MASK      0x00000010
11742 
11743 #define WLAN_STATS_RX_MPDU_RETRY_CNT_SHIFT   5
11744 #define WLAN_STATS_RX_MPDU_RETRY_CNT_MASK    0x00000020
11745 
11746 #define WLAN_STATS_RX_MPDU_DUP_CNT_SHIFT     6
11747 #define WLAN_STATS_RX_MPDU_DUP_CNT_MASK      0x00000040
11748 
11749 #define WLAN_STATS_RX_MPDU_DISCARD_CNT_SHIFT 7
11750 #define WLAN_STATS_RX_MPDU_DISCARD_CNT_MASK  0x00000080
11751 
11752 #define WLAN_STATS_RX_MPDU_AGGR_SHIFT        8
11753 #define WLAN_STATS_RX_MPDU_AGGR_MASK         0x00000100
11754 
11755 #define WLAN_STATS_RX_MCS_SHIFT              9
11756 #define WLAN_STATS_RX_MCS_MASK               0x00000200
11757 
11758 #define WLAN_STATS_STA_PS_INDS_SHIFT         10
11759 #define WLAN_STATS_STA_PS_INDS_MASK          0x00000400
11760 
11761 #define WLAN_STATS_STA_PS_DURS_SHIFT         11
11762 #define WLAN_STATS_STA_PS_DURS_MASK          0x00000800
11763 
11764 #define WLAN_STATS_RX_PROBE_REQS_SHIFT       12
11765 #define WLAN_STATS_RX_PROBE_REQS_MASK        0x00001000
11766 
11767 #define WLAN_STATS_RX_OTH_MGMTS_SHIFT        13
11768 #define WLAN_STATS_RX_OTH_MGMTS_MASK         0x00002000
11769 
11770 typedef struct
11771 {
11772     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats */
11773     A_UINT32 vdev_id;
11774     /** Percentage of idle time, no TX, no RX, no interference */
11775     A_UINT32 idle_time;
11776     /** Percentage of time transmitting packets */
11777     A_UINT32 tx_time;
11778     /** Percentage of time receiving packets in current BSSs */
11779     A_UINT32 rx_in_bss_time;
11780     /** Percentage of time receiving packets not in current BSSs */
11781     A_UINT32 rx_out_bss_time;
11782     /** Percentage of time interference detected. */
11783     A_UINT32 rx_busy_time;
11784     /** Percentage of time receiving packets with errors
11785      * or packets flagged as retransmission or seqnum discontinued. */
11786     A_UINT32 rx_in_bad_cond_time;
11787     /** Percentage of time the device transmitted packets that haven't been ACKed. */
11788     A_UINT32 tx_in_bad_cond_time;
11789     /** Percentage of time the chip is unable to work in normal conditions. */
11790     A_UINT32 wlan_not_avail_time;
11791 } wmi_chan_cca_stats;
11792 
11793 /** Thresholds of cca stats, stands for percentages of stats variation.
11794  *  Check wmi_chan_cca_stats for each stats's meaning.
11795  */
11796 typedef struct
11797 {
11798     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats_thresh */
11799     A_UINT32 idle_time;           /* units = percent */
11800     A_UINT32 tx_time;             /* units = percent */
11801     A_UINT32 rx_in_bss_time;      /* units = percent */
11802     A_UINT32 rx_out_bss_time;     /* units = percent */
11803     A_UINT32 rx_busy_time;        /* units = percent */
11804     A_UINT32 rx_in_bad_cond_time; /* units = percent */
11805     A_UINT32 tx_in_bad_cond_time; /* units = percent */
11806     A_UINT32 wlan_not_avail_time; /* units = percent */
11807 } wmi_chan_cca_stats_thresh;
11808 
11809 typedef struct
11810 {
11811     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_signal_stats */
11812     A_UINT32 vdev_id;
11813     A_UINT32 peer_id;
11814     /** per chain SNR in current bss, units are dB */
11815     A_INT32 per_chain_snr[WMI_MAX_CHAINS];
11816     /** per chain background noise, units are dBm */
11817     A_INT32 per_chain_nf[WMI_MAX_CHAINS];
11818     /** per antenna rx MPDUs */
11819     A_UINT32 per_antenna_rx_mpdus[WMI_MAX_CHAINS];
11820     /** per antenna tx MPDUs */
11821     A_UINT32 per_antenna_tx_mpdus[WMI_MAX_CHAINS];
11822     /** num of valid chains for per antenna rx/tx MPDU cnts*/
11823     A_UINT32 num_chains_valid;
11824 } wmi_peer_signal_stats;
11825 
11826 /** Thresholds of signal stats, stand for percentage of stats variation.
11827  *  Check wmi_peer_signal_stats for each stats's meaning.
11828  */
11829 typedef struct
11830 {
11831     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_signal_stats_thresh */
11832     A_UINT32 per_chain_snr; /* units = dB */
11833     A_UINT32 per_chain_nf; /* units = dBm */
11834 } wmi_peer_signal_stats_thresh;
11835 
11836 typedef struct
11837 {
11838     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_stats */
11839     /** Number of total TX MSDUs on MAC layer in the period */
11840     A_UINT32 tx_msdu_cnt;
11841     /** Number of total TX MPDUs on MAC layer in the period */
11842     A_UINT32 tx_mpdu_cnt;
11843     /** Number of total TX PPDUs on MAC layer in the period */
11844     A_UINT32 tx_ppdu_cnt;
11845     /** Bytes of tx data on MAC layer in the period */
11846     A_UINT32 tx_bytes;
11847     /** Number of TX MSDUs cancelled due to any reason in the period,
11848      * such as WMM limitation/bandwidth limitation/radio congestion */
11849     A_UINT32 tx_msdu_drop_cnt;
11850     /** Bytes of dropped TX packets in the period */
11851     A_UINT32 tx_drop_bytes;
11852     /** Number of unacked transmissions of MPDUs */
11853     A_UINT32 tx_mpdu_retry_cnt;
11854     /** Number of MPDUs have not been ACKed despite retried */
11855     A_UINT32 tx_mpdu_fail_cnt;
11856     /** Number of PPDUs which received no block ack */
11857     A_UINT32 tx_ppdu_fail_cnt;
11858     /* This TLV is followed by TLVs below: :
11859      *     A_UINT32 tx_mpdu_aggr[tx_mpdu_aggr_array_len];
11860      *     A_UINT32 tx_succ_mcs[tx_succ_mcs_array_len];
11861      *     A_UINT32 tx_fail_mcs[tx_fail_mcs_array_len];
11862      *     A_UINT32 tx_ppdu_delay[tx_ppdu_delay_array_len];
11863      */
11864 } wmi_tx_stats;
11865 
11866 /** Thresholds of tx stats, stand for percentage of stats variation.
11867  *  Check wmi_tx_stats for each stats's meaning.
11868  */
11869 typedef struct
11870 {
11871     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_stats_thresh */
11872     A_UINT32 tx_msdu_cnt;
11873     A_UINT32 tx_mpdu_cnt;
11874     A_UINT32 tx_ppdu_cnt;
11875     A_UINT32 tx_bytes;
11876     A_UINT32 tx_msdu_drop_cnt;
11877     A_UINT32 tx_drop_bytes;
11878     A_UINT32 tx_mpdu_retry_cnt;
11879     A_UINT32 tx_mpdu_fail_cnt;
11880     A_UINT32 tx_ppdu_fail_cnt;
11881     A_UINT32 tx_mpdu_aggr;
11882     A_UINT32 tx_succ_mcs;
11883     A_UINT32 tx_fail_mcs;
11884     A_UINT32 tx_ppdu_delay;
11885 } wmi_tx_stats_thresh;
11886 
11887 typedef struct
11888 {
11889     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_tx_stats */
11890     A_UINT32 vdev_id;
11891     A_UINT32 peer_id;
11892     /* The TLVs for the 4 AC follows:
11893      *     wmi_tx_stats tx_stats[];   wmi_tx_stats for BE/BK/VI/VO
11894      */
11895 } wmi_peer_ac_tx_stats;
11896 
11897 typedef struct
11898 {
11899     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats */
11900     /** Number of RX MPDUs on MAC layer */
11901     A_UINT32 mac_rx_mpdu_cnt;
11902     /** Bytes of RX packets on MAC layer */
11903     A_UINT32 mac_rx_bytes;
11904     /** Number of RX PPDU on PHY layer */
11905     A_UINT32 phy_rx_ppdu_cnt;
11906     /** Bytes of RX packets on PHY layer */
11907     A_UINT32 phy_rx_bytes;
11908     /** Number of discontinuity in seqnum */
11909     A_UINT32 rx_disorder_cnt;
11910     /** Number of RX MPDUs flagged as retransmissions */
11911     A_UINT32 rx_mpdu_retry_cnt;
11912     /** Number of RX MPDUs identified as duplicates */
11913     A_UINT32 rx_mpdu_dup_cnt;
11914     /** Number of RX MPDUs discarded */
11915     A_UINT32 rx_mpdu_discard_cnt;
11916     /* This TLV is followed by TLVs below:
11917      *     A_UINT32 rx_mpdu_aggr[rx_mpdu_aggr_array_len];
11918      *     A_UINT32 rx_mcs[rx_mcs_array_len];
11919      */
11920 } wmi_rx_stats;
11921 
11922 /** Thresholds of rx stats, stands for percentage of stats variation.
11923  *  Check wmi_rx_stats for each stats's meaning.
11924  */
11925 typedef struct
11926 {
11927     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats_thresh */
11928     A_UINT32 mac_rx_mpdu_cnt;
11929     A_UINT32 mac_rx_bytes;
11930     A_UINT32 phy_rx_ppdu_cnt;
11931     A_UINT32 phy_rx_bytes;
11932     A_UINT32 rx_disorder_cnt;
11933     A_UINT32 rx_mpdu_retry_cnt;
11934     A_UINT32 rx_mpdu_dup_cnt;
11935     A_UINT32 rx_mpdu_discard_cnt;
11936     A_UINT32 rx_mpdu_aggr;
11937     A_UINT32 rx_mcs;
11938     A_UINT32 sta_ps_inds;
11939     A_UINT32 sta_ps_durs;
11940     A_UINT32 rx_probe_reqs;
11941     A_UINT32 rx_oth_mgmts;
11942 } wmi_rx_stats_thresh;
11943 
11944 typedef struct
11945 {
11946     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_rx_stats */
11947     A_UINT32 vdev_id;
11948     A_UINT32 peer_id;
11949     /** How many times STAs go to sleep */
11950     A_UINT32 sta_ps_inds;
11951     /** Total sleep time of STAs, milliseconds units */
11952     A_UINT32 sta_ps_durs;
11953     /** Number of probe requests received */
11954     A_UINT32 rx_probe_reqs;
11955     /** Number of other management frames received, not including probe requests */
11956     A_UINT32 rx_oth_mgmts;
11957     /* The TLVs for the 4 AC follows:
11958      *     wmi_rx_stats rx_stats[];  wmi_rx_stats for BE/BK/VI/VO
11959      */
11960 } wmi_peer_ac_rx_stats;
11961 
11962 typedef struct
11963 {
11964     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_period */
11965     /*
11966      * This struct provides the timestamps from a low-frequency timer
11967      * for the start and end of a stats period.
11968      * Each timestamp is reported twice, with different units.
11969      * The _msec timestamp is in millisecond units.
11970      * The _count timestamp is in clock tick units.
11971      * The timestamp is reported in clock ticks as well as in milliseconds
11972      * so that if the stats start and end times fall within the same
11973      * millisecond, the clock tick timestamps can still be used to
11974      * determine what fraction of a millisecond the stats period occupied.
11975      */
11976     A_UINT32 start_low_freq_msec;
11977     A_UINT32 start_low_freq_count;
11978     A_UINT32 end_low_freq_msec;
11979     A_UINT32 end_low_freq_count;
11980 } wmi_stats_period;
11981 
11982 typedef enum {
11983     /** Periodic timer timed out, based on the period specified
11984      *  by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
11985      */
11986     TRIGGER_COND_ID_TIMER_TIMED_OUT  =  0x1,
11987     /** Any of the (enabled) stats thresholds specified
11988      *  in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
11989      *  within the current stats period.
11990      */
11991     TRIGGER_COND_ID_THRESH_EXCEEDED  =  0x2,
11992     /** In Response to the one-time wlan stats request of
11993      *  WMI_REQUEST_WLAN_STATS_CMDID from host.
11994      */
11995     TRIGGER_COND_ID_ONE_TIME_REQUEST =  0x3,
11996 } wmi_report_stats_event_trigger_cond_id;
11997 
11998 typedef struct
11999 {
12000     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_interference */
12001 
12002     /** For cases where a single rx chain has options to be connected to
12003      * different rx antennas, show which rx antennas were in use during
12004      * receipt of a given PPDU.
12005      * This sa_ant_matrix provides a bitmask of the antennas used while
12006      * receiving this frame.
12007      */
12008     A_UINT32 sa_ant_matrix;
12009 
12010     /** Count how many times the hal_rxerr_phy is marked, in this time period.
12011      * The counter value is reset each period. The host specifies the period
12012      * via WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD.
12013      */
12014     A_UINT32 phyerr_count;
12015 
12016     /** The timestamp at which the WMI event is reported.
12017      * In targets that have a WBTIMER_1 timer, this timestamp is taken
12018      * from WBTIMER_1.
12019      */
12020     A_UINT32 timestamp;
12021 } wmi_stats_interference;
12022 
12023 typedef struct {
12024     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_report_stats_event_fixed_param */
12025     /** Indicate what triggered this event, check wmi_report_stats_event_trigger_cond_id for details */
12026     A_UINT32 trigger_cond_id;
12027     /** Bitmap to indicate changed channel CCA stats which exceeded the thresholds */
12028     A_UINT32 cca_chgd_bitmap;
12029     /** Bitmap to indicate changed peer signal stats which exceeded the thresholds */
12030     A_UINT32 sig_chgd_bitmap;
12031     /** Bitmap to indicate changed TX counters which exceeded the thresholds */
12032     A_UINT32 tx_chgd_bitmap;
12033     /** Bitmap to indicate changed RX counters which exceeded the thresholds */
12034     A_UINT32 rx_chgd_bitmap;
12035     /** number of per channel CCA stats structures (wmi_chan_cca_stats), 0 to max vdevs*/
12036     A_UINT32 num_chan_cca_stats;
12037     /** number of per peer signal stats structures (wmi_peer_signal_stats), 0 to max peers*/
12038     A_UINT32 num_peer_signal_stats;
12039     /** number of per peer ac TX stats structures (wmi_peer_ac_tx_stats), 0 to max peers*/
12040     A_UINT32 num_peer_ac_tx_stats;
12041     /** Array length of tx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
12042      *  The array indicates number of MPDUs sent on specified aggregation size
12043      *  (per number of MPDUs per AMPDUs / 1 to 7 and 8+).
12044      *  Array length can be set per WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_LEN */
12045     A_UINT32 tx_mpdu_aggr_array_len;
12046     /** Array length of tx_succ_mcs[] which is histogram of encoding rate.
12047      *  The array indicates number of acked PPDUs sent at a specific rate */
12048     A_UINT32 tx_succ_mcs_array_len;
12049     /** Array length of tx_fail_mcs[] which is histogram of encoding rate.
12050      *  The array indicates number of unacked PPDUs sent at a specific rate */
12051     A_UINT32 tx_fail_mcs_array_len;
12052     /** tx_ppdu_delay[]is a histogram of delays on MAC layer.
12053     * The array counts numbers of PPDUs encountering different TX time delays.
12054     * TX delay here means time interval between the time a PPDU is queued
12055     * to the MAC HW for transmission and the time the lower layers of
12056     * tx FW return a tx status.
12057     *
12058     * The bin size tx_ppdu_delay_bin_size_ms specifies how many milliseconds
12059     * each bin of the tx_ppdu_delay histogram represents.
12060     * By default the bin size is 10ms.
12061     * tx_ppdu_delay[0] -> delays between 0-9 ms
12062     * tx_ppdu_delay[1] -> delays between 10-19 ms
12063     * ...
12064     * tx_ppdu_delay[9] -> delays between 90-99 ms
12065     * tx_ppdu_delay[10] -> delays >= 100 ms
12066     * Bin size can be set per WMI_PDEV_PARAM_TX_PPDU_DELAY_BIN_SIZE_MS.
12067     */
12068     A_UINT32 tx_ppdu_delay_bin_size_ms;
12069     /** Array length of tx_ppdu_delay[]. It can be set per WMI_PDEV_PARAM_TX_PPDU_DELAY_ARRAY_LEN */
12070     A_UINT32 tx_ppdu_delay_array_len;
12071     /** number of per peer ac RX stats structures (wmi_peer_ac_rx_stats), 0 to max peers*/
12072     A_UINT32 num_peer_ac_rx_stats;
12073     /** Array length of rx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
12074      *  It can be set per WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_LEN */
12075     A_UINT32 rx_mpdu_aggr_array_len;
12076     /** Array size of rx_mcs[] which is histogram of encoding rate.
12077      *  The array indicates number of PPDUs received at a specific rate */
12078     A_UINT32 rx_mcs_array_len;
12079     /** Array size of stats_period[] which contains several stats periods. */
12080     A_UINT32 stats_period_array_len;
12081     /** Indicates the vdev id for MLO case */
12082     wmi_vdev_id_info vdev_id_info;
12083 
12084     /**
12085      * This TLV is followed by TLVs below:
12086      *    wmi_chan_cca_stats       chan_cca_stats[];         Array length is specified by num_chan_cca_stats
12087      *    wmi_peer_signal_stats    peer_signal_stats[];      Array length is specified by num_peer_signal_stats
12088      *    wmi_peer_ac_tx_stats     peer_ac_tx_stats[];       Array length is specified by num_peer_ac_tx_stats
12089      *    wmi_tx_stats             tx_stats[][];             Array length is num_peer_ac_tx_stats * WLAN_MAX_AC, array index is (peer_index * WLAN_MAX_AC + ac_index)
12090      *    A_UINT32                 tx_mpdu_aggr[][][];       Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_mpdu_aggr_array_len,
12091      *                                                       array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_mpdu_aggr_array_len + A-MPDU aggregation index
12092      *    A_UINT32                 tx_succ_mcs[][][];        Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_succ_mcs_array_len,
12093      *                                                       array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_succ_mcs_array_len + MCS index
12094      *    A_UINT32                 tx_fail_mcs[][][];        Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_fail_mcs_array_len,
12095      *                                                       array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_fail_mcs_array_len + MCS index
12096      *    A_UINT32                 tx_ppdu_delay[][][];      Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_ppdu_delay_array_len,
12097      *                                                       array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_ppdu_delay_array_len + tx delay index
12098      *    wmi_peer_ac_rx_stats     peer_ac_rx_stats[];       Array length is specified by num_peer_ac_rx_stats
12099      *    wmi_rx_stats             rx_stats[][];             Array length is num_peer_ac_rx_stats * WLAN_MAX_AC, array index is (peer_index * WLAN_MAX_AC + ac_index)
12100      *    A_UINT32                 rx_mpdu_aggr[][][];       Array length is num_peer_ac_rx_stats * WLAN_MAX_AC * rx_mpdu_aggr_array_len,
12101      *                                                       array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mpdu_aggr_array_len + A-MPDU aggregation index
12102      *    A_UINT32                 rx_mcs[][][];             Array length is (num_peer_ac_rx_stats * WLAN_MAX_AC) * rx_mcs_array_len,
12103      *                                                       array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mcs_array_len + MCS index
12104      *    wmi_stats_period         stats_period[];           Array length is specified by stats_period_array_len
12105      *    wmi_stats_interference   stats_interference[];     Array length is determied by dividing array level TLV header's length value by array-element TLV header's length value.
12106      **/
12107 } wmi_report_stats_event_fixed_param;
12108 
12109 typedef struct {
12110     /** TLV tag and len; tag equals
12111      *  WMITLV_TAG_STRUC_wmi_peer_stats_info */
12112     A_UINT32 tlv_header;
12113     /** peer MAC address */
12114     wmi_mac_addr peer_macaddr;
12115     /** bytes (size of MPDUs) transmitted to this peer */
12116     struct {
12117         /* lower 32 bits of the tx_bytes value */
12118         A_UINT32 low_32;
12119         /* upper 32 bits of the tx_bytes value */
12120         A_UINT32 high_32;
12121     } tx_bytes;
12122     /** packets (MSDUs) transmitted to this peer */
12123     struct {
12124         /* lower 32 bits of the tx_packets value */
12125         A_UINT32 low_32;
12126         /* upper 32 bits of the tx_packets value */
12127         A_UINT32 high_32;
12128     } tx_packets;
12129     /** bytes (size of MPDUs) received from this peer */
12130     struct {
12131         /* lower 32 bits of the rx_bytes value */
12132         A_UINT32 low_32;
12133         /* upper 32 bits of the rx_bytes value */
12134         A_UINT32 high_32;
12135     } rx_bytes;
12136     /** packets (MSDUs) received from this peer */
12137     struct {
12138         /* lower 32 bits of the rx_packets value */
12139         A_UINT32 low_32;
12140         /* upper 32 bits of the rx_packets value */
12141         A_UINT32 high_32;
12142     } rx_packets;
12143     /** cumulative retry counts (MPDUs) */
12144     A_UINT32 tx_retries;
12145     /** number of failed transmissions (MPDUs) (retries exceeded, no ACK) */
12146     A_UINT32 tx_failed;
12147     /** rate information, it is output of WMI_ASSEMBLE_RATECODE_V1
12148      *  (in format of 0x1000RRRR)
12149      * The rate-code is a 4-bytes field in which,
12150      * for given rate, nss and preamble
12151      *
12152      * b'31-b'29 unused / reserved
12153      * b'28      indicate the version of rate-code (1 = RATECODE_V1)
12154      * b'27-b'11 unused / reserved
12155      * b'10-b'8  indicate the preamble (0 OFDM, 1 CCK, 2 HT, 3 VHT)
12156      * b'7-b'5   indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3, 3 - 4x4)
12157      * b'4-b'0   indicate the rate, which is indicated as follows:
12158      *          OFDM :     0: OFDM 48 Mbps
12159      *                     1: OFDM 24 Mbps
12160      *                     2: OFDM 12 Mbps
12161      *                     3: OFDM 6 Mbps
12162      *                     4: OFDM 54 Mbps
12163      *                     5: OFDM 36 Mbps
12164      *                     6: OFDM 18 Mbps
12165      *                     7: OFDM 9 Mbps
12166      *         CCK (pream == 1)
12167      *                     0: CCK 11 Mbps Long
12168      *                     1: CCK 5.5 Mbps Long
12169      *                     2: CCK 2 Mbps Long
12170      *                     3: CCK 1 Mbps Long
12171      *                     4: CCK 11 Mbps Short
12172      *                     5: CCK 5.5 Mbps Short
12173      *                     6: CCK 2 Mbps Short
12174      *         HT/VHT (pream == 2/3)
12175      *                     0..7: MCS0..MCS7 (HT)
12176      *                     0..9: MCS0..MCS9 (11AC VHT)
12177      *                     0..11: MCS0..MCS11 (11AX VHT)
12178      */
12179     /** rate-code of the last transmission */
12180     A_UINT32 last_tx_rate_code;
12181     /** rate-code of the last received PPDU */
12182     A_UINT32 last_rx_rate_code;
12183     /** bitrate of the last transmission, in units of kbps */
12184     A_UINT32 last_tx_bitrate_kbps;
12185     /** bitrate of the last received PPDU, in units of kbps */
12186     A_UINT32 last_rx_bitrate_kbps;
12187     /** combined RSSI of the last received PPDU, in unit of dBm */
12188     A_INT32 peer_rssi;
12189     /** number of succeed transmissions (MPDUs) (ACK) */
12190     A_UINT32 tx_succeed;
12191     /**
12192      * The RSSI values are in dBm units, and are exponentially time-averaged.
12193      * The averaging is performed on the dB values (rather than the linear
12194      * values).
12195      */
12196     A_INT32 peer_rssi_per_chain[WMI_MAX_CHAINS];
12197     /* show how many elements in the tx_rate_counts array belong to this peer */
12198     A_UINT32 num_tx_rate_counts;
12199     /* show how many elements in the rx_rate_counts array belong to this peer */
12200     A_UINT32 num_rx_rate_counts;
12201     /* This TLV array is followed by other TLVs:
12202      *   A_UINT32 tx_rate_counts[sum(num_tx_rate_counts)];
12203      *       The above num_tx_rate_counts field shows which elements
12204      *       within the tx_rate_counts array belong to a given peer.
12205      *       Elements tx_rate_counts[0] to tx_rate_counts[N0-1] belong to
12206      *       peer 0, where N0 = peer_stats_info[0].num_tx_rate_counts.
12207      *       Elements tx_rate_counts[N0] to tx_rate_counts[N0+N1-1] belong to
12208      *       peer 1, where N1 = peer_stats_info[1].num_tx_rate_counts.
12209      *       etc.
12210      *   A_UINT32 rx_rate_counts[sum(num_rx_rate_counts)];
12211      *       The above num_rx_rate_counts field shows which elements
12212      *       within the rx_rate_counts array belong to a given peer.
12213      *       Elements rx_rate_counts[0] to rx_rate_counts[N0-1] belong to
12214      *       peer 0, where N0 = peer_stats_info[0].num_rx_rate_counts.
12215      *       Elements rx_rate_counts[N0] to rx_rate_counts[N0+N1-1] belong to
12216      *       peer 1, where N1 = peer_stats_info[1].num_rx_rate_counts.
12217      *       etc.
12218      */
12219 } wmi_peer_stats_info;
12220 
12221 typedef struct {
12222     /** TLV tag and len; tag equals
12223      *  WMITLV_TAG_STRUC_wmi_peer_stats_info_event_fixed_param */
12224     A_UINT32 tlv_header;
12225     /** VDEV to which the peers belong to */
12226     A_UINT32 vdev_id;
12227     /** number of peers in peer_stats_info[] */
12228     A_UINT32 num_peers;
12229     /** flag to indicate if there are more peers which will
12230      *  be sent a following separate peer_stats_info event */
12231     A_UINT32 more_data;
12232     /* This TLV is followed by another TLV of array of structs
12233      * wmi_peer_stats_info peer_stats_info[];
12234      */
12235 } wmi_peer_stats_info_event_fixed_param;
12236 
12237 /**
12238  * WMI arrays of length WMI_MGMT_FRAME_SUBTYPE_MAX use the
12239  * IEEE802.11 standard's enumeration of mgmt frame subtypes:
12240  *  0 -> IEEE80211_FC0_SUBTYPE_ASSOC_REQ
12241  *  1 -> IEEE80211_FC0_SUBTYPE_ASSOC_RESP
12242  *  2 -> IEEE80211_FC0_SUBTYPE_REASSOC_REQ
12243  *  3 -> IEEE80211_FC0_SUBTYPE_REASSOC_RESP
12244  *  4 -> IEEE80211_FC0_SUBTYPE_PROBE_REQ
12245  *  5 -> IEEE80211_FC0_SUBTYPE_PROBE_RESP
12246  *  6 -> Reserved
12247  *  7 -> Reserved
12248  *  8 -> IEEE80211_FC0_SUBTYPE_BEACON
12249  *  9 -> IEEE80211_FC0_SUBTYPE_ATIM
12250  * 10 -> IEEE80211_FC0_SUBTYPE_DISASSOC
12251  * 11 -> IEEE80211_FC0_SUBTYPE_AUTH
12252  * 12 -> IEEE80211_FC0_SUBTYPE_DEAUTH
12253  * 13 -> IEEE80211_FCO_SUBTYPE_ACTION
12254  * 14 -> IEEE80211_FC0_SUBTYPE_ACTION_NOACK
12255  * 15 -> IEEE80211_FC0_SUBTYPE_RESERVED
12256  */
12257 #define WMI_MGMT_FRAME_SUBTYPE_MAX 16
12258 
12259 typedef struct {
12260     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_pdev_stats_struct*/
12261     A_UINT32 tlv_header;
12262     /** pdev_id for identifying the MAC */
12263     A_UINT32 pdev_id;
12264     /** counter of how many times this pdev has
12265      *  transmitted each management frame sub-type */
12266     A_UINT32 tx_mgmt_subtype[WMI_MGMT_FRAME_SUBTYPE_MAX];
12267     /** counter of how many times this pdev has
12268      *  received each management frame sub-type */
12269     A_UINT32 rx_mgmt_subtype[WMI_MGMT_FRAME_SUBTYPE_MAX];
12270     /** scan fail dfs violation time in ms */
12271     A_UINT32 scan_fail_dfs_violation_time_ms;
12272     /** NOL check failed latest channel frequency in MHz */
12273     A_UINT32 nol_check_fail_last_chan_freq;
12274     /** NOL check failed timestamp in ms */
12275     A_UINT32 nol_check_fail_time_stamp_ms;
12276     /** total peer create count */
12277     A_UINT32 total_peer_create_cnt;
12278     /** total peer delete count */
12279     A_UINT32 total_peer_delete_cnt;
12280     /** total peer delete response count */
12281     A_UINT32 total_peer_delete_resp_cnt;
12282     /** sched algo FIFO full count */
12283     A_UINT32 vdev_pause_fail_rt_to_sched_algo_fifo_full_cnt;
12284     /** total number of qos null tx frame queued over WMI */
12285     A_UINT32 qos_null_tx_over_wmi;
12286     /** total qos null tx frame completion received count */
12287     A_UINT32 qos_null_tx_send_compl_over_wmi;
12288     /** total event alloc failure count for qos null tx send */
12289     A_UINT32 qos_null_tx_send_event_alloc_failed;
12290 
12291     /** wlan_pdev fields num_macs, vdev_up_count and vdev_active_count
12292      * num_macs_phy_vdev_up_active:
12293      * This word contains the following bitfields:
12294      * number of macs from wlan_pdev
12295      * (WMI_PDEV_STATS_NUM_MACS_SET,GET)
12296      * number of vdev up count
12297      * (WMI_PDEV_STATS_VDEV_UP_CNT_SET,GET)
12298      * number of vdev active count
12299      * (WMI_PDEV_STATS_VDEV_UP_CNT_SET,GET)
12300      */
12301    A_UINT32 opaque_debug_num_macs_phy_vdev_up_active;
12302    /** refer wlan_pdev ic flags */
12303    A_UINT32 opaque_debug_ic_flags;
12304    /** vdev_id that are paused per pdev */
12305    A_UINT32 opaque_debug_paused_ap_vdev_bitmap;
12306    /** opaque_debug_flags:
12307     * refer to WLAN_PS_DESC_BIN_HWM_HIT or WLAN_PS_DESC_BIN_LWM_HIT
12308     */
12309    A_UINT32 opaque_debug_flags;
12310    /** wlan_pdev fields remote_peer_cnt, max_rf_chains_2G and max_rf_chains_5G
12311     * remote_peer_cnt_max_rf_chains_2G_5G:
12312     * This word contains the following bitfields:
12313     * max chains supported in the 2.4 GHz band
12314     * (WMI_PDEV_STATS_MAX_RF_CHAIN_2G_SET,GET)
12315     * max chains supported in the 5 GHz band,
12316     * (WMI_PDEV_STATS_MAX_RF_CHAIN_5G_SET,GET)
12317     * number of remote peers
12318     * (WMI_PDEV_STATS_REMOTE_PEER_CNT_SET,GET)
12319     */
12320    A_UINT32 opaque_debug_remote_peer_cnt_max_rf_chains_2G_5G;
12321    /** wlan_pdev max HT Capability info, WMI_HT_CAP defines */
12322    A_UINT32 opaque_debug_max_ht_cap_info;
12323    /** wlan_pdev max VHT capability info, WMI_VHT_CAP defines */
12324    A_UINT32 opaque_debug_max_vht_cap_info;
12325    /** opaque_debug_max_vht_supp_mcs:
12326     * wlan_pdev max VHT Supported MCS which is
12327     * vht_supp_mcs_2G or vht_supp_mcs_5G
12328     */
12329    A_UINT32 opaque_debug_max_vht_supp_mcs;
12330    /** wlan_pdev max HE capability info, WMI_HE_CAP defines */
12331    A_UINT32 opaque_debug_max_he_cap_info;
12332    A_UINT32 opaque_debug_max_he_cap_info_ext;
12333    /** the nominal chain mask for transmit */
12334    A_UINT32 opaque_debug_tx_chain_mask;
12335    /** the nominal chain mask for receive */
12336    A_UINT32 opaque_debug_rx_chain_mask;
12337    /** opaque_debug_ema_flags:
12338     *  This word contains the following bitfields:
12339     *  ema_flags: ema_max_vap_cnt and ema_max_profile_period from wlan_pdev
12340     *  ema_max_vap_cnt- number of maximum EMA Tx vaps (VAPs having both
12341     *  VDEV_FLAGS_EMA_MODE and VDEV_FLAGS_TRANSMIT_AP set)
12342     *  (WMI_PDEV_STATS_EMA_MAX_VAP_CNT_SET,GET)
12343     *  ema_max_profile_period - maximum profile periodicity
12344     *  (maximum number of beacons after which VAP profiles repeat)
12345     *  for any EMA VAP on any pdev.
12346     *  (WMI_PDEV_STATS_EMA_MAX_PROFILE_PERIOD_SET,GET)
12347     */
12348    A_UINT32 opaque_debug_ema_flags;
12349    /** wlan_pdev - maximum ML peers supported */
12350    A_UINT32 opaque_debug_num_ml_peer_entries;
12351    /** This word contains the following bitfields:
12352     *  wlan_pdev fields - num_max_hw_links, current_chip_id and max_num_chips
12353     *      (related to MLO)
12354     *  Max number of HW links
12355     *  (WMI_PDEV_STATS_NUM_MAX_HW_LINKS_SET,GET)
12356     *  Current Chip Id
12357     *  (WMI_PDEV_STATS_CURRENT_CHIP_ID_SET,GET)
12358     *  Max number of chips
12359     *  (WMI_PDEV_STATS_MAX_NUM_CHIPS_SET,GET)
12360     */
12361    A_UINT32 opaque_debug_mlo_flags;
12362    /** Indicate beacon size in bytes */
12363    A_UINT32 opaque_debug_large_bcn_size;
12364    /** proposed by the host value of MSDUQs per each LinkView peer's TID */
12365    A_UINT32 opaque_debug_num_of_linkview_msduqs_per_tid;
12366    /** bcn_filter_context variables */
12367    A_UINT32 opaque_debug_bcns_dropped;
12368    A_UINT32 opaque_debug_bcns_recvd;
12369    A_UINT32 opaque_debug_bcns_delivered;
12370    /** Tids that are paused/unpaused based on module_id */
12371    A_UINT32 opaque_debug_vdev_all_tid_pause_bitmap;
12372    /** Tids that are blocked/unblocked based on module_id */
12373    A_UINT32 opaque_debug_vdev_all_tid_block_bitmap;
12374    /** wal_pdev rx filter, WAL_RX_FILTER_FLAGS defines */
12375    A_UINT32 opaque_debug_rx_filter;
12376    /** This word contains the following bitfields:
12377     *  aggr_nonaggr_retry_th:
12378     *      wal_pdev fields - agg_retry_th and non_agg_retry_th
12379     *      This value holds max retry threshold up to which a Data packet
12380     *      will be retried when ack is not received.
12381     *      agg_retry_th - Threshold value used when aggregation is enabled
12382     *          (WMI_PDEV_STATS_AGG_RETRY_TH_SET,GET)
12383     *      non_agg_retry_th - Threshold value used for non-aggregation.
12384     *          (WMI_PDEV_STATS_NON_AGG_RETRY_TH_SET)
12385     */
12386    A_UINT32 opaque_debug_aggr_nonaggr_retry_th;
12387    /** This word contains the following bitfields:
12388     *  num_max_rx_ba_sessions:
12389     *  Number of rx BA session establised
12390     *      (WMI_PDEV_STATS_NUM_RX_BA_SESSIONS_SET,GET)
12391     *  Max number of rx BA session from wal_pdev
12392     *      (WMI_PDEV_STATS_MAX_RX_BA_SESSIONS_SET,GET)
12393     */
12394    A_UINT32 opaque_debug_num_max_rx_ba_sessions;
12395    /** It holds WHAL_CHANNEL_SWITCH_FLAGS values */
12396    A_UINT32 opaque_debug_chan_switch_flags;
12397    /** reset_cause holds PDEV_RESET_CONSEC_FAILURE or PDEV_RESET_TXQ_TIMEOUT */
12398    A_UINT32 opaque_debug_consecutive_failure_reset_cause;
12399    /** PPDU duration limit, in us */
12400    A_UINT32 opaque_debug_mu_ppdu_dur_limit_us;
12401    /** pdev reset in progress */
12402    A_UINT32 opaque_debug_reset_in_progress;
12403    /** wal_dev - vdev_migrate_state refer to WAL_VDEV_MIGRATE_STATE */
12404    A_UINT32 opaque_debug_vdev_migrate_state;
12405    /** opaque_debug_rts_rc_flag:
12406     * wal_pdev rts ratecode - this value reflects whatever
12407     * WMI_PDEV_PARAM_RTS_FIXED_RATE value the host has specified for the pdev.
12408     */
12409    A_UINT32 opaque_debug_rts_rc_flag;
12410    /* Num of peer delete in progress */
12411    A_UINT32 opaque_debug_num_of_peer_delete_in_progress;
12412    /** wal_pdev total number of active vdev count */
12413    A_UINT32 opaque_debug_total_active_vdev_cnt;
12414    /** wal_pdev - max number of vdevs per pdev */
12415    A_UINT32 opaque_debug_max_vdevs;
12416    /* NonOccupancyList(NOL) context  */
12417    A_UINT32 opaque_debug_dfs_nol_count;
12418    /** NOL timeout in seconds */
12419    A_UINT32 opaque_debug_dfs_nol_timeout;
12420    A_UINT32 opaque_debug_dfs_use_nol;
12421    /** channel availability check mode, refer enum WMI_ADFS_OCAC_MODE */
12422    A_UINT32 opaque_debug_cac_mode;
12423    A_UINT32 opaque_debug_dyn_ppdu_dur; /* in ms */
12424    /** This word contains the following bitfields:
12425     * wal_pdev home channel info
12426     * home_chan_mhz_flags:
12427     * primary channel frequency in mhz
12428     *     (WMI_PDEV_STATS_HOME_CHAN_MHZ_SET,GET)
12429     * flags to specify other channel attributes
12430     *     (WMI_PDEV_STATS_HOME_CHAN_FLAGS_SET, GET)
12431     */
12432    A_UINT32 opaque_debug_home_chan_mhz_flags;
12433    /** home channel center frequency in MHz */
12434    A_UINT32 opaque_debug_home_band_center_freq;
12435    /** home channel phy_mode, refer enum WLAN_PHY_MODE */
12436    A_UINT32 opaque_debug_home_phy_mode;
12437    /** This word contains the following bitfields:
12438     * wal_pdev current channel info
12439     * cur_chan_mhz_flags:
12440     * primary channel frequency in mhz
12441     *     (WMI_PDEV_STATS_CUR_CHAN_MHZ_SET,GET)
12442     * flags to specify other channel attributes
12443     *     (WMI_PDEV_STATS_CUR_CHAN_FLAGS_SET,GET)
12444     */
12445    A_UINT32 opaque_debug_cur_chan_mhz_flags;
12446    /** current channel center frequency in MHz */
12447    A_UINT32 opaque_debug_cur_band_center_freq;
12448    /** current channel phy_mode, refer enum WLAN_PHY_MODE */
12449    A_UINT32 opaque_debug_cur_phy_mode;
12450    /* Beacon context info */
12451    A_UINT32 opaque_debug_bcn_q_num_bcns_queued_to_hw;
12452    /** beacon queue AIFS */
12453    A_UINT32 opaque_debug_aifs;
12454    /** beacon queue cwmin */
12455    A_UINT32 opaque_debug_cwmin;
12456    /** beacon queue cwmax */
12457    A_UINT32 opaque_debug_cwmax;
12458    /** FILS discovery period in TU */
12459    A_UINT32 opaque_debug_fils_period;
12460    /** Beacon interval in TU */
12461    A_UINT32 opaque_debug_beacon_period;
12462    A_UINT32 opaque_debug_staggered_beacon_intvl;
12463    /** wal_pdev tx context, refer enum WAL_TX_CTXT_FLAGS */
12464    A_UINT32 opaque_debug_tx_ctxt_flags;
12465    /** opaque_debug_burst_mode_pending_isr
12466     * wal_pdev tx_ctxt fields - burst_mode refer enum WAL_TX_BURST_MODE
12467     * and pending_isr_status count
12468     */
12469    A_UINT32 opaque_debug_burst_mode_pending_isr;
12470    /** max burst duration from ppdu duration in us */
12471    A_UINT32 opaque_debug_burst_dur;
12472    /** counter for tx hw stuck */
12473    A_UINT32 opaque_debug_tx_hw_stuck_cnt;
12474    /** counter for tx consecutive lifetime expiry */
12475    A_UINT32 opaque_debug_consecutive_lifetime_expiries;
12476    /** wal_pdev rx context, refer enum WAL_RX_CTXT_FLAGS */
12477    A_UINT32 opaque_debug_rx_ctxt_flags;
12478    /** wal_pdev fields in rx context for rx_suspend or resume count */
12479    A_UINT32 opaque_debug_rx_suspend_cnt;
12480    A_UINT32 opaque_debug_rx_resume_cnt;
12481    A_UINT32 opaque_debug_rx_pcie_suspend_cnt;
12482    A_UINT32 opaque_debug_rx_pcie_resume_cnt;
12483    /** This word contains the following bitfields:
12484     *  wal_pdev fields
12485     *  pdev paused - WMI_PDEV_STATS_PAUSED_SET,GET
12486     *  pdev suspend - WMI_PDEV_STATS_SUSPENDED_SET,GET
12487     *  cac_enabed - MI_PDEV_STATS_CAC_ENABLED_SET,GET
12488     *  monitor VAP present - WMI_PDEV_STATS_IS_MONITOR_TYPE_PRESENT_SET,GET
12489     *  beacon tx mode - WMI_PDEV_STATS_BCN_TX_MODE_SET,GET
12490     *  isTXsuspended - WMI_PDEV_STATS_IS_TXSUSPENDED_SET,GET
12491     *  isSCHEDsuspended - WMI_PDEV_STATS_IS_SCHEDSUSPENDED_SET,GET
12492     *  sched_algo_resume_needed -
12493     *      WMI_PDEV_STATS_SCHED_ALGO_RESUME_NEEDED_SET,GET
12494     *  abort_reason - WMI_PDEV_STATS_ABORT_REASON_SET,GET
12495     *  atf_cfg - WMI_PDEV_STATS_ATF_CONFIG_SET,GET
12496     *  Green AP TX chainmask valid - WMI_PDEV_STATS_GAP_TX_CH_MASK_VALID_SET,GET
12497     *  Green AP RX chainmask valid - WMI_PDEV_STATS_GAP_RX_CH_MASK_VALID_SET,GET
12498     *  Green AP Phy mode valid - WMI_PDEV_STATS_GAP_PHY_MODE_VALID_SET,GET
12499     *  burst_enable - WMI_PDEV_STATS_BURST_ENABLE_SET,GET
12500     */
12501    A_UINT32 opaque_debug_wal_pdev_bitfield;
12502    /** This word contains the following bitfields:
12503     *  gap_phy_mode_freq:
12504     *  When GreenAP is enabled, phy_mode (WMI_PDEV_STATS_GAP_PHY_MODE_SET,GET)
12505     *  and center freq(MHz) (WMI_PDEV_STATS_GAP_BAND_CENTER_FREQ1_SET,GET)
12506     *  in GAP context is displayed
12507     */
12508    A_UINT32 opaque_debug_gap_phy_mode_freq;
12509    /**
12510     * The following 5 opaque_debug_reserved_field variables are provided
12511     * purely for debugging by technicians who have outside knowledge of
12512     * what kind of values the target has placed into these fields.
12513     */
12514    A_UINT32 opaque_debug_reserved_field_1;
12515    A_UINT32 opaque_debug_reserved_field_2;
12516    A_UINT32 opaque_debug_reserved_field_3;
12517    A_UINT32 opaque_debug_reserved_field_4;
12518    A_UINT32 opaque_debug_reserved_field_5;
12519 } wmi_ctrl_path_pdev_stats_struct;
12520 
12521 #define WMI_PDEV_STATS_NUM_MACS_GET(flag) \
12522     WMI_GET_BITS(flag, 0, 8)
12523 #define WMI_PDEV_STATS_NUM_MACS_SET(flag, val) \
12524     WMI_SET_BITS(flag, 0, 8, val)
12525 #define WMI_PDEV_STATS_NUM_PHY_GET(flag) \
12526     WMI_GET_BITS(flag, 8, 8)
12527 #define WMI_PDEV_STATS_NUM_PHY_SET(flag, val) \
12528     WMI_SET_BITS(flag, 8, 8, val)
12529 #define WMI_PDEV_STATS_VDEV_UP_CNT_GET(flag) \
12530     WMI_GET_BITS(flag, 16, 8)
12531 #define WMI_PDEV_STATS_VDEV_UP_CNT_SET(flag, val) \
12532     WMI_SET_BITS(flag, 16, 8, val)
12533 #define WMI_PDEV_STATS_VDEV_ACTIVE_CNT_GET(flag) \
12534     WMI_GET_BITS(flag, 24, 8)
12535 #define WMI_PDEV_STATS_VDEV_ACTIVE_CNT_SET(flag, val) \
12536     WMI_SET_BITS(flag, 24, 8, val)
12537 #define WMI_PDEV_STATS_REMOTE_PEER_CNT_GET(flag) \
12538     WMI_GET_BITS(flag, 0, 16)
12539 #define WMI_PDEV_STATS_REMOTE_PEER_CNT_SET(flag, val) \
12540     WMI_SET_BITS(flag, 0, 16, val)
12541 #define WMI_PDEV_STATS_MAX_RF_CHAIN_2G_GET(flag) \
12542     WMI_GET_BITS(flag, 16, 8)
12543 #define WMI_PDEV_STATS_MAX_RF_CHAIN_2G_SET(flag, val) \
12544     WMI_SET_BITS(flag, 16, 8, val)
12545 #define WMI_PDEV_STATS_MAX_RF_CHAIN_5G_GET(flag) \
12546     WMI_GET_BITS(flag, 24, 8)
12547 #define WMI_PDEV_STATS_MAX_RF_CHAIN_5G_SET(flag, val) \
12548     WMI_SET_BITS(flag, 24, 8, val)
12549 #define WMI_PDEV_STATS_EMA_MAX_VAP_CNT_GET(flag) \
12550     WMI_GET_BITS(flag, 0, 8 )
12551 #define WMI_PDEV_STATS_EMA_MAX_VAP_CNT_SET(flag, val) \
12552     WMI_SET_BITS(flag, 0, 8 , val)
12553 #define WMI_PDEV_STATS_EMA_MAX_PROFILE_PERIOD_GET(flag) \
12554     WMI_GET_BITS(flag, 8, 8)
12555 #define WMI_PDEV_STATS_EMA_MAX_PROFILE_PERIOD_SET(flag, val) \
12556     WMI_SET_BITS(flag, 8, 8, val)
12557 #define WMI_PDEV_STATS_NUM_SELF_PEERS_GET(flag) \
12558     WMI_GET_BITS(flag, 16, 8)
12559 #define WMI_PDEV_STATS_NUM_SELF_PEERS_SET(flag, val) \
12560     WMI_SET_BITS(flag, 16, 8, val)
12561 #define WMI_PDEV_STATS_MAX_ACTIVE_VDEVS_GET(flag) \
12562     WMI_GET_BITS(flag, 24, 8)
12563 #define WMI_PDEV_STATS_MAX_ACTIVE_VDEVS_SET(flag, val) \
12564     WMI_SET_BITS(flag, 24, 8, val)
12565 #define WMI_PDEV_STATS_NUM_MAX_HW_LINKS_GET(flag) \
12566     WMI_GET_BITS(flag, 0, 8)
12567 #define WMI_PDEV_STATS_NUM_MAX_HW_LINKS_SET(flag, val) \
12568     WMI_SET_BITS(flag, 0, 8, val)
12569 #define WMI_PDEV_STATS_CURRENT_CHIP_ID_GET(flag) \
12570     WMI_GET_BITS(flag, 8, 8)
12571 #define WMI_PDEV_STATS_CURRENT_CHIP_ID_SET(flag, val) \
12572     WMI_SET_BITS(flag, 8, 8, val)
12573 #define WMI_PDEV_STATS_MAX_NUM_CHIPS_GET(flag) \
12574     WMI_GET_BITS(flag, 16, 8)
12575 #define WMI_PDEV_STATS_MAX_NUM_CHIPS_SET(flag, val) \
12576     WMI_SET_BITS(flag, 16, 8, val)
12577 #define WMI_PDEV_STATS_NUM_HOME_CHANS_GET(flag) \
12578     WMI_GET_BITS(flag, 24, 8)
12579 #define WMI_PDEV_STATS_NUM_HOME_CHANS_SET(flag, val) \
12580     WMI_SET_BITS(flag, 24, 8, val)
12581 #define WMI_PDEV_STATS_AGG_RETRY_TH_GET(flag) \
12582     WMI_GET_BITS(flag, 0, 8)
12583 #define WMI_PDEV_STATS_AGG_RETRY_TH_SET(flag, val) \
12584     WMI_SET_BITS(flag, 0, 8, val)
12585 #define WMI_PDEV_STATS_NON_AGG_RETRY_TH_GET(flag) \
12586     WMI_GET_BITS(flag, 8, 8)
12587 #define WMI_PDEV_STATS_NON_AGG_RETRY_TH_SET(flag, val) \
12588     WMI_SET_BITS(flag, 8, 8, val)
12589 #define WMI_PDEV_STATS_MAX_NON_DATA_RETRY_TH_GET(flag) \
12590     WMI_GET_BITS(flag, 16, 8)
12591 #define WMI_PDEV_STATS_MAX_NON_DATA_RETRY_TH_SET(flag, val) \
12592     WMI_SET_BITS(flag, 16, 8, val)
12593 #define WMI_PDEV_STATS_NUM_CONSECUTIVE_BCN_TX_FILT_GET(flag) \
12594     WMI_GET_BITS(flag, 24, 8)
12595 #define WMI_PDEV_STATS_NUM_CONSECUTIVE_BCN_TX_FILT_SET(flag, val) \
12596     WMI_SET_BITS(flag, 24, 8, val)
12597 #define WMI_PDEV_STATS_NUM_RX_BA_SESSIONS_GET(flag) \
12598     WMI_GET_BITS(flag, 0, 16)
12599 #define WMI_PDEV_STATS_NUM_RX_BA_SESSIONS_SET(flag, val) \
12600     WMI_SET_BITS(flag, 0, 16, val)
12601 #define WMI_PDEV_STATS_MAX_RX_BA_SESSIONS_GET(flag) \
12602     WMI_GET_BITS(flag, 16, 16)
12603 #define WMI_PDEV_STATS_MAX_RX_BA_SESSIONS_SET(flag, val) \
12604     WMI_SET_BITS(flag, 16, 16, val)
12605 #define WMI_PDEV_STATS_PPDU_DUR_LIMIT_US_GET(flag) \
12606     WMI_GET_BITS(flag, 0, 16)
12607 #define WMI_PDEV_STATS_PPDU_DUR_LIMIT_US_SET(flag, val) \
12608     WMI_SET_BITS(flag, 0, 16, val)
12609 #define WMI_PDEV_STATS_MU_PPDU_DUR_LIMIT_US_GET(flag) \
12610     WMI_GET_BITS(flag, 16, 16)
12611 #define WMI_PDEV_STATS_MU_PPDU_DUR_LIMIT_US_SET(flag, val) \
12612     WMI_SET_BITS(flag, 16, 16, val)
12613 #define WMI_PDEV_STATS_RTS_RC_FLAGS_GET(flag) \
12614     WMI_GET_BITS(flag, 0, 8)
12615 #define WMI_PDEV_STATS_RTS_RC_FLAGS_SET(flag, val) \
12616     WMI_SET_BITS(flag, 0, 8, val)
12617 #define WMI_PDEV_STATS_RTS_RC_SET(flag, val) \
12618     WMI_SET_BITS(flag, 8, 8, val)
12619 #define WMI_PDEV_STATS_RTS_RC_GET(flag) \
12620     WMI_GET_BITS(flag, 8, 8)
12621 #define WMI_PDEV_STATS_GAP_TX_CH_MASK_SET(flag, val) \
12622     WMI_SET_BITS(flag, 16, 8, val)
12623 #define WMI_PDEV_STATS_GAP_TX_CH_MASK_GET(flag) \
12624     WMI_GET_BITS(flag, 16, 8)
12625 #define WMI_PDEV_STATS_GAP_RX_CH_MASK_SET(flag, val) \
12626     WMI_SET_BITS(flag, 24, 8, val)
12627 #define WMI_PDEV_STATS_GAP_RX_CH_MASK_GET(flag) \
12628     WMI_GET_BITS(flag, 24, 8)
12629 #define WMI_PDEV_STATS_GAP_PHY_MODE_SET(flag, val) \
12630     WMI_SET_BITS(flag, 0, 16, val)
12631 #define WMI_PDEV_STATS_GAP_PHY_MODE_GET(flag) \
12632     WMI_GET_BITS(flag, 0, 16)
12633 #define WMI_PDEV_STATS_GAP_BAND_CENTER_FREQ1_SET(flag, val) \
12634     WMI_SET_BITS(flag, 16, 16, val)
12635 #define WMI_PDEV_STATS_GAP_BAND_CENTER_FREQ1_GET(flag) \
12636     WMI_GET_BITS(flag, 16, 16)
12637 #define WMI_PDEV_STATS_CONSECUTIVE_FAILURE_SET(flag, val) \
12638     WMI_SET_BITS(flag, 0, 16, val)
12639 #define WMI_PDEV_STATS_CONSECUTIVE_FAILURE_GET(flag) \
12640     WMI_GET_BITS(flag, 0, 16)
12641 #define WMI_PDEV_STATS_NUM_FILS_DISC_ENQD_GET(flag) \
12642     WMI_GET_BITS(flag, 24, 8)
12643 #define WMI_PDEV_STATS_NUM_FILS_DISC_ENQD_SET(flag, val) \
12644     WMI_SET_BITS(flag, 24, 8, val)
12645 #define WMI_PDEV_STATS_RESET_CAUSE_BITMAP_GET(flag) \
12646     WMI_GET_BITS(flag, 16, 8)
12647 #define WMI_PDEV_STATS_RESET_CAUSE_BITMAP_SET(flag, val) \
12648     WMI_SET_BITS(flag, 16, 8, val)
12649 #define WMI_PDEV_STATS_SWBA_NUM_OF_VDEVS_GET(flag) \
12650     WMI_GET_BITS(flag, 24, 8)
12651 #define WMI_PDEV_STATS_SWBA_NUM_OF_VDEVS_SET(flag, val) \
12652     WMI_SET_BITS(flag, 24, 8, val)
12653 #define WMI_PDEV_STATS_HOME_CHAN_MHZ_GET(flag) \
12654     WMI_GET_BITS(flag, 0, 16)
12655 #define WMI_PDEV_STATS_HOME_CHAN_MHZ_SET(flag, val) \
12656     WMI_SET_BITS(flag, 0, 16, val)
12657 #define WMI_PDEV_STATS_HOME_CHAN_FLAGS_GET(flag) \
12658     WMI_GET_BITS(flag, 16, 16)
12659 #define WMI_PDEV_STATS_HOME_CHAN_FLAGS_SET(flag, val) \
12660     WMI_SET_BITS(flag, 16, 16, val)
12661 #define WMI_PDEV_STATS_HOME_CHAN_BAND_FREQ_1_GET(flag) \
12662     WMI_GET_BITS(flag, 0, 16)
12663 #define WMI_PDEV_STATS_HOME_CHAN_BAND_FREQ_1_SET(flag,val) \
12664     WMI_SET_BITS(flag, 0, 16, val)
12665 #define WMI_PDEV_STATS_HOME_CHAN_BAND_FREQ_2_GET(flag) \
12666     WMI_GET_BITS(flag, 16, 16)
12667 #define WMI_PDEV_STATS_HOME_CHAN_BAND_FREQ_2_SET(flag, val) \
12668     WMI_SET_BITS(flag, 16, 16, val)
12669 #define WMI_PDEV_STATS_CUR_CHAN_MHZ_GET(flag) \
12670     WMI_GET_BITS(flag, 0, 16)
12671 #define WMI_PDEV_STATS_CUR_CHAN_MHZ_SET(flag, val) \
12672     WMI_SET_BITS(flag, 0, 16, val)
12673 #define WMI_PDEV_STATS_CUR_CHAN_FLAGS_GET(flag) \
12674     WMI_GET_BITS(flag, 16, 16)
12675 #define WMI_PDEV_STATS_CUR_CHAN_FLAGS_SET(flag, val) \
12676     WMI_SET_BITS(flag, 16, 16, val)
12677 #define WMI_PDEV_STATS_CUR_CHAN_BAND_FREQ_1_GET(flag) \
12678     WMI_GET_BITS(flag, 0, 16)
12679 #define WMI_PDEV_STATS_CUR_CHAN_BAND_FREQ_1_SET(flag,val) \
12680     WMI_SET_BITS(flag, 0, 16, val)
12681 #define WMI_PDEV_STATS_CUR_CHAN_BAND_FREQ_2_GET(flag) \
12682     WMI_GET_BITS(flag, 16, 16)
12683 #define WMI_PDEV_STATS_CUR_CHAN_BAND_FREQ_2_SET(flag, val) \
12684     WMI_SET_BITS(flag, 16, 16, val)
12685 #define WMI_PDEV_STATS_BURST_MODE_GET(flag) \
12686     WMI_GET_BITS(flag, 0, 8)
12687 #define WMI_PDEV_STATS_BURST_MODE_SET(flag, val) \
12688     WMI_SET_BITS(flag, 0, 8, val)
12689 #define WMI_PDEV_STATS_PENDING_ISR_STATUS_GET(flag) \
12690     WMI_GET_BITS(flag, 8, 16)
12691 #define WMI_PDEV_STATS_PENDING_ISR_STATUS_SET(flag, val) \
12692     WMI_SET_BITS(flag, 8, 16, val)
12693 #define WMI_PDEV_STATS_BCN_Q_NUM_GET(flag) \
12694     WMI_GET_BITS(flag, 0, 8)
12695 #define WMI_PDEV_STATS_BCN_Q_NUM_SET(flag, val) \
12696     WMI_SET_BITS(flag, 0, 8, val)
12697 #define WMI_PDEV_STATS_NUM_BCNS_QUEUED_TO_HW_GET(flag) \
12698     WMI_GET_BITS(flag, 8, 8)
12699 #define WMI_PDEV_STATS_NUM_BCNS_QUEUED_TO_HW_SET(flag, val) \
12700     WMI_SET_BITS(flag, 8, 8, val)
12701 #define WMI_PDEV_STATS_SWFDA_VDEV_ID_GET(flag) \
12702     WMI_GET_BITS(flag, 16, 8)
12703 #define WMI_PDEV_STATS_SWFDA_VDEV_ID_SET(flag, val) \
12704     WMI_SET_BITS(flag, 16, 8, val)
12705 
12706 #define WMI_PDEV_STATS_ABORT_RESULT_GET(flag) \
12707     WMI_GET_BITS(flag, 0, 1)
12708 #define WMI_PDEV_STATS_ABORT_RESULT_SET(flag, val) \
12709     WMI_SET_BITS(flag, 0, 1, val)
12710 #define WMI_PDEV_STATS_SCHED_ALGO_RESUME_NEEDED_GET(flag) \
12711     WMI_GET_BITS(flag, 1, 1)
12712 #define WMI_PDEV_STATS_SCHED_ALGO_RESUME_NEEDED_SET(flag, val) \
12713     WMI_SET_BITS(flag, 1, 1, val)
12714 #define WMI_PDEV_STATS_ABORT_REASON_GET(flag) \
12715     WMI_GET_BITS(flag, 2, 3)
12716 #define WMI_PDEV_STATS_ABORT_REASON_SET(flag, val) \
12717     WMI_SET_BITS(flag, 2, 3, val)
12718 #define WMI_PDEV_STATS_IS_TXSUSPENDED_GET(flag) \
12719     WMI_GET_BITS(flag, 5, 1)
12720 #define WMI_PDEV_STATS_IS_TXSUSPENDED_SET(flag, val) \
12721     WMI_SET_BITS(flag, 5, 1, val)
12722 #define WMI_PDEV_STATS_IS_SCHEDSUSPENDED_GET(flag) \
12723     WMI_GET_BITS(flag, 6, 1)
12724 #define WMI_PDEV_STATS_IS_SCHEDSUSPENDED_SET(flag, val) \
12725     WMI_SET_BITS(flag, 6, 1, val)
12726 #define WMI_PDEV_STATS_IS_TXSUSPENDED_WITH_AFC_GET(flag) \
12727     WMI_GET_BITS(flag, 7, 1)
12728 #define WMI_PDEV_STATS_IS_TXSUSPENDED_WITH_AFC_SET(flag, val) \
12729     WMI_SET_BITS(flag, 7, 1, val)
12730 #define WMI_PDEV_STATS_IS_SCHEDSUSPENDED_WITH_AFC_GET(flag) \
12731     WMI_GET_BITS(flag, 8, 1)
12732 #define WMI_PDEV_STATS_IS_SCHEDSUSPENDED_WITH_AFC_SET(flag, val) \
12733     WMI_SET_BITS(flag, 8, 1, val)
12734 #define WMI_PDEV_STATS_SW_RETRY_MPDU_COUNT_TH_GET(flag) \
12735     WMI_GET_BITS(flag, 9, 1)
12736 #define WMI_PDEV_STATS_SW_RETRY_MPDU_COUNT_TH_SET(flag, val) \
12737     WMI_SET_BITS(flag, 9, 1, val)
12738 #define WMI_PDEV_STATS_SENDBAR_COMPL_IN_PROGRESS_GET(flag) \
12739     WMI_GET_BITS(flag, 10, 1)
12740 #define WMI_PDEV_STATS_SENDBAR_COMPL_IN_PROGRESS_SET(flag, val) \
12741     WMI_SET_BITS(flag, 10, 1, val)
12742 #define WMI_PDEV_STATS_CAC_ENABLED_GET(flag) \
12743     WMI_GET_BITS(flag, 11, 1)
12744 #define WMI_PDEV_STATS_CAC_ENABLED_SET(flag, val) \
12745     WMI_SET_BITS(flag, 11, 1, val)
12746 #define WMI_PDEV_STATS_PAUSED_GET(flag) \
12747     WMI_GET_BITS(flag, 12, 1)
12748 #define WMI_PDEV_STATS_PAUSED_SET(flag, val) \
12749     WMI_SET_BITS(flag, 12, 1, val)
12750 #define WMI_PDEV_STATS_SUSPENDED_GET(flag) \
12751     WMI_GET_BITS(flag, 13, 1)
12752 #define WMI_PDEV_STATS_SUSPENDED_SET(flag, val) \
12753     WMI_SET_BITS(flag, 13, 1, val)
12754 #define WMI_PDEV_STATS_MAC_COLD_RESET_GET(flag) \
12755     WMI_GET_BITS(flag, 14, 1)
12756 #define WMI_PDEV_STATS_MAC_COLD_RESET_SET(flag, val) \
12757     WMI_SET_BITS(flag, 14, 1, val)
12758 #define WMI_PDEV_STATS_SAFE_TO_ACCESS_HW_GET(flag) \
12759     WMI_GET_BITS(flag, 15, 1)
12760 #define WMI_PDEV_STATS_SAFE_TO_ACCESS_HW_SET(flag, val) \
12761     WMI_SET_BITS(flag, 15, 1, val)
12762 #define WMI_PDEV_STATS_STA_PS_STATECHG_ENABLE_GET(flag) \
12763     WMI_GET_BITS(flag, 16, 1)
12764 #define WMI_PDEV_STATS_STA_PS_STATECHG_ENABLE_SET(flag, val) \
12765     WMI_SET_BITS(flag, 16, 1, val)
12766 #define WMI_PDEV_STATS_WAL_HOST_SCAN_IN_PROGRESS_GET(flag) \
12767     WMI_GET_BITS(flag, 17, 1)
12768 #define WMI_PDEV_STATS_WAL_HOST_SCAN_IN_PROGRESS_SET(flag, val) \
12769     WMI_SET_BITS(flag, 17, 1, val)
12770 #define WMI_PDEV_STATS_ATF_CONFIG_GET(flag) \
12771     WMI_GET_BITS(flag, 18, 1)
12772 #define WMI_PDEV_STATS_ATF_CONFIG_SET(flag, val) \
12773     WMI_SET_BITS(flag, 18, 1, val)
12774 #define WMI_PDEV_STATS_EAPOL_AC_OVERRIDE_GET(flag) \
12775     WMI_GET_BITS(flag, 19, 1)
12776 #define WMI_PDEV_STATS_EAPOL_AC_OVERRIDE_SET(flag, val) \
12777     WMI_SET_BITS(flag, 19, 1, val)
12778 #define WMI_PDEV_STATS_CALC_NEXT_DTIM_CNT_GET(flag) \
12779     WMI_GET_BITS(flag, 20, 1)
12780 #define WMI_PDEV_STATS_CALC_NEXT_DTIM_CNT_SET(flag, val) \
12781     WMI_SET_BITS(flag, 20, 1, val)
12782 #define WMI_PDEV_STATS_ATF_STRICT_SCH_GET(flag) \
12783     WMI_GET_BITS(flag, 21, 1)
12784 #define WMI_PDEV_STATS_ATF_STRICT_SCH_SET(flag, val) \
12785     WMI_SET_BITS(flag, 21, 1, val)
12786 #define WMI_PDEV_STATS_BCN_TX_MODE_GET(flag) \
12787     WMI_GET_BITS(flag, 22, 2)
12788 #define WMI_PDEV_STATS_BCN_TX_MODE_SET(flag, val) \
12789     WMI_SET_BITS(flag, 22, 2, val)
12790 #define WMI_PDEV_STATS_IS_MONITOR_TYPE_PRESENT_GET(flag) \
12791     WMI_GET_BITS(flag, 24, 1)
12792 #define WMI_PDEV_STATS_IS_MONITOR_TYPE_PRESENT_SET(flag, val) \
12793     WMI_SET_BITS(flag, 24, 1, val)
12794 #define WMI_PDEV_STATS_DYN_BW_GET(flag) \
12795     WMI_GET_BITS(flag, 25, 1)
12796 #define WMI_PDEV_STATS_DYN_BW_SET(flag, val) \
12797     WMI_SET_BITS(flag, 25, 1, val)
12798 #define WMI_PDEV_STATS_IS_MLO_SUPPORTED_GET(flag) \
12799     WMI_GET_BITS(flag, 26, 1)
12800 #define WMI_PDEV_STATS_IS_MLO_SUPPORTED_SET(flag, val) \
12801     WMI_SET_BITS(flag, 26, 1, val)
12802 #define WMI_PDEV_STATS_GAP_TX_CH_MASK_VALID_GET(flag) \
12803     WMI_GET_BITS(flag, 27, 1)
12804 #define WMI_PDEV_STATS_GAP_TX_CH_MASK_VALID_SET(flag, val) \
12805     WMI_SET_BITS(flag, 27, 1, val)
12806 #define WMI_PDEV_STATS_GAP_RX_CH_MASK_VALID_GET(flag) \
12807     WMI_GET_BITS(flag, 28, 1)
12808 #define WMI_PDEV_STATS_GAP_RX_CH_MASK_VALID_SET(flag, val) \
12809     WMI_SET_BITS(flag, 28, 1, val)
12810 #define WMI_PDEV_STATS_GAP_PHY_MODE_VALID_GET(flag) \
12811     WMI_GET_BITS(flag, 29, 1)
12812 #define WMI_PDEV_STATS_GAP_PHY_MODE_VALID_SET(flag, val) \
12813     WMI_SET_BITS(flag, 29, 1, val)
12814 #define WMI_PDEV_STATS_GAP_CLKGATE_VALID_GET(flag) \
12815     WMI_GET_BITS(flag, 30, 1)
12816 #define WMI_PDEV_STATS_GAP_CLKGATE_VALID_SET(flag, val) \
12817     WMI_SET_BITS(flag, 30, 1, val)
12818 #define WMI_PDEV_STATS_BURST_ENABLE_GET(flag) \
12819     WMI_GET_BITS(flag, 31, 1)
12820 #define WMI_PDEV_STATS_BURST_ENABLE_SET(flag, val) \
12821     WMI_SET_BITS(flag, 31, 1, val)
12822 
12823 typedef struct {
12824     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_btcoex_stats_struct*/
12825     A_UINT32 tlv_header;
12826     /** pdev_id for identifying the MAC */
12827     A_UINT32 pdev_id;
12828     /** Counts the number of BT TX requests */
12829     A_UINT32 bt_tx_req_cntr;
12830     /** Counts the number of BT RX requests */
12831     A_UINT32 bt_rx_req_cntr;
12832     /** Counts the number of BT requests that got NACKed */
12833     A_UINT32 bt_req_nack_cntr;
12834     /** Counts the number of WLAN TX request denied due to scheduled BT activity */
12835     A_UINT32 wl_tx_req_nack_schd_bt_reason_cntr;
12836     /** Counts the number of WLAN TX request denied due to current BT activity */
12837     A_UINT32 wl_tx_req_nack_current_bt_reason_cntr;
12838     /** Counts the number of WLAN TX request denied due to other WLAN in TX reason */
12839     A_UINT32 wl_tx_req_nack_other_wlan_tx_reason_cntr;
12840     /** Counts the number of times the WLAN in TX is aborted after getting ACKed */
12841     A_UINT32 wl_in_tx_abort_cntr;
12842     /** Counts the number of Auto Response WLAN TX requests */
12843     A_UINT32 wl_tx_auto_resp_req_cntr;
12844     /** Counts the number of ACKed WLAN TX requests */
12845     A_UINT32 wl_tx_req_ack_cntr;
12846     /** Counts the number of WLAN TX requests */
12847     A_UINT32 wl_tx_req_cntr;
12848 } wmi_ctrl_path_btcoex_stats_struct;
12849 
12850 /* Send diag event based on trigger reasons */
12851 typedef enum {
12852     WMI_DIAG_TRIGGER_MIN = 0x1000,
12853 
12854     WMI_DIAG_TRIGGER_HOST_REQUESTED = WMI_DIAG_TRIGGER_MIN,
12855     WMI_DIAG_TRIGGER_BEACON_MISS,
12856     WMI_DIAG_TRIGGER_SCAN_FAIL,
12857     WMI_DIAG_TRIGGER_DISCONNECT,
12858     WMI_DIAG_TRIGGER_ENTER_BMPS_IMPS_FAIL,
12859     WMI_DIAG_TRIGGER_BUFFER_FULL,
12860     WMI_DIAG_TRIGGER_DATA_STALL,
12861     WMI_DIAG_TRIGGER_TIMER_TRIGGERED,
12862     WMI_DIAG_TRIGGER_REMOTE_COPY,
12863     WMI_DIAG_TRIGGER_CAL_FAILURE,
12864     WMI_DIAG_TRIGGER_FES_BKPRESS_DEV_RESET_IND,
12865 
12866     WMI_DIAG_TRIGGER_MAX,
12867 } wmi_diag_trigger_e;
12868 
12869 typedef enum {
12870     WMI_CTRL_PATH_STATS_ARENA_HRAM,
12871     WMI_CTRL_PATH_STATS_ARENA_HCRAM,
12872     WMI_CTRL_PATH_STATS_ARENA_HREMOTE,
12873     WMI_CTRL_PATH_STATS_ARENA_HCREMOTE,
12874     WMI_CTRL_PATH_STATS_ARENA_REMOTE,
12875     WMI_CTRL_PATH_STATS_ARENA_SRAM,
12876     WMI_CTRL_PATH_STATS_ARENA_SRAM_AUX,
12877     WMI_CTRL_PATH_STATS_ARENA_PAGEABLE,
12878     WMI_CTRL_PATH_STATS_ARENA_CMEM,
12879     WMI_CTRL_PATH_STATS_ARENA_TRAM,
12880     WMI_CTRL_PATH_STATS_ARENA_HWIO,
12881     WMI_CTRL_PATH_STATS_ARENA_CALDB,
12882     WMI_CTRL_PATH_STATS_ARENA_M3,
12883     WMI_CTRL_PATH_STATS_ARENA_ETMREMOTE,
12884     WMI_CTRL_PATH_STATS_ARENA_M3_DUMP,
12885     WMI_CTRL_PATH_STATS_ARENA_EMUPHY,
12886     WMI_CTRL_PATH_STATS_ARENA_DBG_SRAM,
12887     WMI_CTRL_PATH_STATS_ARENA_DBG_SRAM_AUX,
12888     WMI_CTRL_PATH_STATS_ARENA_SRAM_AUX_OVERFLOW,
12889     WMI_CTRL_PATH_STATS_ARENA_AMSS,
12890     WMI_CTRL_PATH_STATS_ARENA_MLO_SHMEM,
12891     WMI_CTRL_PATH_STATS_ARENA_MLO_H_SHMEM,
12892     WMI_CTRL_PATH_STATS_ARENA_MLO_HC_SHMEM,
12893     WMI_CTRL_PATH_STATS_ARENA_RRI_CMD,
12894     WMI_CTRL_PATH_STATS_ARENA_SRAM_CLADE,
12895     WMI_CTRL_PATH_STATS_ARENA_MAX,
12896 } wmi_ctrl_path_fw_arena_ids;
12897 
12898 /*
12899  * Used by some hosts to print names of arenas, based on
12900  * wmi_ctrl_path_fw_arena_ids values specified in
12901  * wmi_ctrl_path_mem_stats_struct in ctrl_path_stats event msg.
12902  */
12903 static INLINE A_UINT8 *wmi_ctrl_path_fw_arena_id_to_name(A_UINT32 arena_id)
12904 {
12905     switch(arena_id)
12906     {
12907         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_HRAM);
12908         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_HCRAM);
12909         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_HREMOTE);
12910         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_HCREMOTE);
12911         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_REMOTE);
12912         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_SRAM);
12913         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_SRAM_AUX);
12914         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_PAGEABLE);
12915         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_CMEM);
12916         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_TRAM);
12917         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_HWIO);
12918         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_CALDB);
12919         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_M3);
12920         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_ETMREMOTE);
12921         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_M3_DUMP);
12922         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_EMUPHY);
12923         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_DBG_SRAM);
12924         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_DBG_SRAM_AUX);
12925         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_SRAM_AUX_OVERFLOW);
12926         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_AMSS);
12927         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_MLO_SHMEM);
12928         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_MLO_H_SHMEM);
12929         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_MLO_HC_SHMEM);
12930         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_RRI_CMD);
12931         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_SRAM_CLADE);
12932     }
12933 
12934     return (A_UINT8 *) "WMI_CTRL_PATH_STATS_ARENA_UNKNOWN";
12935 }
12936 
12937 typedef struct {
12938     /** TLV tag and len; tag equals
12939      *  WMITLV_TAG_STRUC_wmi_ctrl_path_mem_stats_struct */
12940     A_UINT32 tlv_header;
12941     A_UINT32 arena_id;          /* see wmi_ctrl_path_fw_arena_ids */
12942     A_UINT32 total_bytes;       /* total bytes in each arena */
12943     A_UINT32 allocated_bytes;   /* allocated bytes in each arena */
12944 } wmi_ctrl_path_mem_stats_struct;
12945 
12946 /* status code of Get stats TWT dialog */
12947 typedef enum _WMI_GET_STATS_TWT_STATUS_T {
12948     WMI_GET_STATS_TWT_STATUS_OK,                 /* Get status TWT dialog successfully completed */
12949     WMI_GET_STATS_TWT_STATUS_DIALOG_ID_NOT_EXIST,/* TWT dialog ID does not exist */
12950     WMI_GET_STATS_TWT_STATUS_INVALID_PARAM,      /* invalid parameters */
12951 } WMI_GET_STATS_TWT_STATUS_T;
12952 
12953 /* Resp type of ODD command operation */
12954 typedef enum _WMI_ODD_ADDR_READ_OPTION_TYPE_T {
12955     WMI_ODD_ADDR_READ_OPTION_TYPE_ADD_ADDR_COMMAND,  /* Resp for the command to add/configure address space */
12956     WMI_ODD_ADDR_READ_OPTION_TYPE_DEL_ADDR_COMMAND,  /* Resp for the command to del/reset address space */
12957     WMI_ODD_ADDR_READ_OPTION_TYPE_DISP_ADDR_COMMAND, /* Resp for the command to display address space */
12958     WMI_ODD_ADDR_READ_OPTION_TYPE_DISP_VAL_COMMAND,  /* Resp for the command to display value at address space */
12959 } WMI_ODD_ADDR_READ_OPTION_TYPE_T;
12960 
12961 typedef struct {
12962     /** TLV tag and len; tag equals
12963      *  WMITLV_TAG_STRUC_wmi_ctrl_path_twt_stats_struct */
12964     A_UINT32 tlv_header;
12965     A_UINT32 dialog_id;         /* TWT dialog ID */
12966     A_UINT32 status;            /* refer to WMI_GET_STATS_TWT_STATUS_T */
12967     A_UINT32 num_sp_cycles;     /* Number of TWT SP's*/
12968     A_UINT32 avg_sp_dur_us;     /* Average SP time */
12969     A_UINT32 min_sp_dur_us;     /* Minimum SP time */
12970     A_UINT32 max_sp_dur_us;     /* Maximum SP time */
12971     A_UINT32 tx_mpdu_per_sp;    /* Average pkts tx per SP */
12972     A_UINT32 rx_mpdu_per_sp;    /* Average pkts rx per SP */
12973     A_UINT32 tx_bytes_per_sp;   /* Average tx bytes per SP */
12974     A_UINT32 rx_bytes_per_sp;   /* Average rx bytes per SP */
12975 } wmi_ctrl_path_twt_stats_struct;
12976 
12977 #define BMISS_STATS_RSSI_SAMPLE_MAX 10
12978 typedef struct {
12979     A_INT32  rssi;        /* dBm units */
12980     A_UINT32 sample_time; /* timestamp from host/target shared qtimer */
12981 } bmiss_stats_rssi_samples_t;
12982 
12983 typedef struct {
12984     A_UINT32 num_of_bmiss_sequences; /* number of consecutive bmiss > 2 */
12985     A_UINT32 num_bitmask_wraparound; /* number of times bitmask wrapped around */
12986     A_UINT32 num_bcn_hist_lost;      /* number of beacons history we have lost */
12987 } consecutive_bmiss_stats_t;
12988 
12989 typedef struct {
12990     /** TLV tag and len; tag equals
12991      *  WMITLV_TAG_STRUC_wmi_ctrl_path_bmiss_stats_struct */
12992     A_UINT32 tlv_header;
12993     A_UINT32 num_pre_bmiss;                     /* number of pre_bmiss */
12994     bmiss_stats_rssi_samples_t  rssi_samples[BMISS_STATS_RSSI_SAMPLE_MAX];  /* RSSI samples at pre bmiss*/
12995     /* rssi_sample_curr_index:
12996      * index of the element in rssi_samples array containing the oldest sample
12997      */
12998     A_UINT32 rssi_sample_curr_index;
12999     A_UINT32 num_first_bmiss;                   /* number of first bmiss */
13000     A_UINT32 num_final_bmiss;                   /* number of final bmiss */
13001     A_UINT32 num_null_sent_in_first_bmiss;      /* number of null frames sent in first bmiss */
13002     A_UINT32 num_null_failed_in_first_bmiss;    /* number of failed null frames in first bmiss */
13003     A_UINT32 num_null_sent_in_final_bmiss;      /* number of null frames sent in final bmiss */
13004     A_UINT32 num_null_failed_in_final_bmiss;    /* number of failed null frames in final bmiss */
13005     consecutive_bmiss_stats_t cons_bmiss_stats;
13006 } wmi_ctrl_path_bmiss_stats_struct;
13007 
13008 typedef enum {
13009     WMI_CTRL_PATH_STATS_CAL_PROFILE_COLD_BOOT_CAL       = 0x0,
13010     WMI_CTRL_PATH_STATS_CAL_PROFILE_FULL_CHAN_SWITCH    = 0x1,
13011     WMI_CTRL_PATH_STATS_CAL_PROFILE_SCAN_CHAN_SWITCH    = 0x2,
13012     WMI_CTRL_PATH_STATS_CAL_PROFILE_DPD_SPLIT_CAL       = 0x3,
13013     WMI_CTRL_PATH_STATS_CAL_PROFILE_TEMP_TRIGEER_CAL    = 0x4,
13014     WMI_CTRL_PATH_STATS_CAL_PROFILE_POWER_SAVE_WAKE_UP  = 0x5,
13015     WMI_CTRL_PATH_STATS_CAL_PROFILE_TIMER_TRIGGER_CAL   = 0x6,
13016     WMI_CTRL_PATH_STATS_CAL_PROFILE_FTM_TRIGGER_CAL     = 0x7,
13017     WMI_CTRL_PATH_STATS_CAL_PROFILE_AGILE_OR_POWER_DOWN_DTIM = 0x8,
13018     WMI_CTRL_PATH_STATS_CAL_PROFILE_NOISY_ENV_RXDO      = 0x9,
13019 
13020     /* add new cal profiles above this line */
13021     WMI_CTRL_PATH_STATS_CAL_PROFILE_INVALID             = 0x1F
13022 } wmi_ctrl_path_stats_cal_profile_ids;
13023 
13024 typedef enum {
13025     WMI_CTRL_PATH_STATS_CAL_TYPE_ADC                     = 0x0,
13026     WMI_CTRL_PATH_STATS_CAL_TYPE_DAC                     = 0x1,
13027     WMI_CTRL_PATH_STATS_CAL_TYPE_PROCESS                 = 0x2,
13028     WMI_CTRL_PATH_STATS_CAL_TYPE_NOISE_FLOOR             = 0x3,
13029     WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO                   = 0x4,
13030     WMI_CTRL_PATH_STATS_CAL_TYPE_COMB_TXLO_TXIQ_RXIQ     = 0x5,
13031     WMI_CTRL_PATH_STATS_CAL_TYPE_TXLO                    = 0x6,
13032     WMI_CTRL_PATH_STATS_CAL_TYPE_TXIQ                    = 0x7,
13033     WMI_CTRL_PATH_STATS_CAL_TYPE_RXIQ                    = 0x8,
13034     WMI_CTRL_PATH_STATS_CAL_TYPE_IM2                     = 0x9,
13035     WMI_CTRL_PATH_STATS_CAL_TYPE_LNA                     = 0xa,
13036     WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXDCO            = 0xb,
13037     WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXIQ             = 0xc,
13038     WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORYLESS          = 0xd,
13039     WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORY              = 0xe,
13040     WMI_CTRL_PATH_STATS_CAL_TYPE_IBF                     = 0xf,
13041     WMI_CTRL_PATH_STATS_CAL_TYPE_PDET_AND_PAL            = 0x10,
13042     WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO_IQ                = 0x11,
13043     WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO_DTIM              = 0x12,
13044     WMI_CTRL_PATH_STATS_CAL_TYPE_TPC_CAL                 = 0x13,
13045     WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_TIMEREQ             = 0x14,
13046     WMI_CTRL_PATH_STATS_CAL_TYPE_BWFILTER                = 0x15,
13047     WMI_CTRL_PATH_STATS_CAL_TYPE_PEF                     = 0x16,
13048     WMI_CTRL_PATH_STATS_CAL_TYPE_PADROOP                 = 0x17,
13049     WMI_CTRL_PATH_STATS_CAL_TYPE_SELFCALTPC              = 0x18,
13050     WMI_CTRL_PATH_STATS_CAL_TYPE_RXSPUR                  = 0x19,
13051 
13052     /* add new cal types above this line */
13053     WMI_CTRL_PATH_STATS_CAL_TYPE_INVALID                 = 0xFF
13054 } wmi_ctrl_path_stats_cal_type_ids;
13055 
13056 typedef enum {
13057     WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_NOISE_FLOOR    = 0x0,
13058     WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_DPD_MEMORYLESS = 0x1,
13059     WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_DPD_MEMORY     = 0x2,
13060 
13061     /* add new periodic cal types above this line */
13062     WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_INVALID        = 0xFF
13063 } wmi_ctrl_path_stats_periodic_cal_type_ids;
13064 
13065 typedef enum {
13066     WMI_CAL_FAILURE_REASON_ERROR_MIN = 0x0,
13067     /* DPD failure reasons */
13068     WMI_CAL_FAILURE_REASON_DPD_NMSE_FAIL = 0x1,
13069     WMI_CAL_FAILURE_REASON_DPD_SQ_FAIL = 0x2,
13070     WMI_CAL_FAILURE_REASON_DPD_HW_FAIL = 0x3,
13071     WMI_CAL_FAILURE_REASON_DPD_EXCESSIVE_RETRY = 0x4,
13072     /* RXDCO failure reasons */
13073     WMI_CAL_FAILURE_REASON_RXDCO_HW_CAL_EXCESSIVE_RETRY = 0x5,
13074     WMI_CAL_FAILURE_REASON_RXDCO_INVALID_HW_CAL = 0x6,
13075     WMI_CAL_FAILURE_REASON_RXDCO_HW_AND_SWPP_FAILURE = 0x7,
13076     /* ADC failure reasons */
13077     WMI_CAL_FAILURE_REASON_TIADC_INVALID_BAND = 0x8,
13078     /* BWFILTER failure reasons */
13079     WMI_CAL_FAILURE_REASON_TXBBF = 0x9,
13080     WMI_CAL_FAILURE_REASON_RXBBF = 0xa,
13081     /* PKDET failure reasons */
13082     WMI_CAL_FAILURE_REASON_PKDET = 0xb,
13083     /* COMBCAL failure reasons */
13084     WMI_CAL_FAILURE_REASON_COMB = 0xc,
13085 
13086     /* add new cal failure error reasons above this line */
13087     WMI_CAL_FAILURE_REASON_ERROR_MAX = 0xff,
13088 } wmi_cal_failure_reason_code;
13089 
13090 /*
13091  * Used by some hosts to print names of cal profile, based on
13092  * wmi_ctrl_path_cal_profile_ids values specified in
13093  * wmi_ctrl_path_calibration_stats_struct in ctrl_path_stats event msg.
13094  */
13095 static INLINE
13096 A_UINT8 *wmi_ctrl_path_cal_profile_id_to_name(A_UINT32 cal_profile_id)
13097 {
13098     switch (cal_profile_id)
13099     {
13100         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_COLD_BOOT_CAL);
13101         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_FULL_CHAN_SWITCH);
13102         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_SCAN_CHAN_SWITCH);
13103         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_DPD_SPLIT_CAL);
13104         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_TEMP_TRIGEER_CAL);
13105         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_POWER_SAVE_WAKE_UP);
13106         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_TIMER_TRIGGER_CAL);
13107         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_FTM_TRIGGER_CAL);
13108         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_AGILE_OR_POWER_DOWN_DTIM);
13109         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_NOISY_ENV_RXDO);
13110     }
13111 
13112     return (A_UINT8 *) "WMI_CTRL_PATH_STATS_CAL_PROFILE_UNKNOWN";
13113 }
13114 
13115 /*
13116  * Used by some hosts to print names of cal type, based on
13117  * wmi_ctrl_path_cal_type_ids values specified in
13118  * wmi_ctrl_path_calibration_stats_struct in ctrl_path_stats event msg.
13119  */
13120 static INLINE A_UINT8 *wmi_ctrl_path_cal_type_id_to_name(A_UINT32 cal_type_id)
13121 {
13122     switch (cal_type_id)
13123     {
13124         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_ADC);
13125         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DAC);
13126         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_PROCESS);
13127         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_NOISE_FLOOR);
13128         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO);
13129         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_COMB_TXLO_TXIQ_RXIQ);
13130         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_TXLO);
13131         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_TXIQ);
13132         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_RXIQ);
13133         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_IM2);
13134         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_LNA);
13135         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXDCO);
13136         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXIQ);
13137         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORYLESS);
13138         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORY);
13139         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_IBF);
13140         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_PDET_AND_PAL);
13141         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO_IQ);
13142         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO_DTIM);
13143         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_TPC_CAL);
13144         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_TIMEREQ);
13145         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_BWFILTER);
13146         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_PEF);
13147         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_PADROOP);
13148         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_SELFCALTPC);
13149         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_RXSPUR);
13150     }
13151 
13152     return (A_UINT8 *) "WMI_CTRL_PATH_STATS_CAL_TYPE_UNKNOWN";
13153 }
13154 
13155 /*
13156  * Used by some hosts to print names of peridodic cal type, based on
13157  * wmi_ctrl_path_periodic_cal_type_ids values specified in
13158  * wmi_ctrl_path_calibration_stats_struct in ctrl_path_stats event msg.
13159  */
13160 static INLINE A_UINT8 *wmi_ctrl_path_periodic_cal_type_id_to_name(A_UINT32 periodic_cal_type_id)
13161 {
13162     switch (periodic_cal_type_id)
13163     {
13164         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_NOISE_FLOOR);
13165         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_DPD_MEMORYLESS);
13166         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_DPD_MEMORY);
13167     }
13168 
13169     return (A_UINT8 *) "WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_UNKNOWN";
13170 }
13171 
13172 /*
13173  * Used by some hosts to print names of cal failure reason code, based on
13174  * wmi_ctrl_path_cal_failure_reason_codes values specified in cal fail event msg
13175  */
13176 static INLINE A_UINT8 *wmi_cal_failure_reason_code_to_name(A_UINT32 cal_failure_reason_code)
13177 {
13178     switch (cal_failure_reason_code)
13179     {
13180         WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_ERROR_MIN);
13181         WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_DPD_NMSE_FAIL);
13182         WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_DPD_SQ_FAIL);
13183         WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_DPD_HW_FAIL);
13184         WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_DPD_EXCESSIVE_RETRY);
13185         WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_RXDCO_HW_CAL_EXCESSIVE_RETRY);
13186         WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_RXDCO_INVALID_HW_CAL);
13187         WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_RXDCO_HW_AND_SWPP_FAILURE);
13188         WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_TIADC_INVALID_BAND);
13189         WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_TXBBF);
13190         WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_RXBBF);
13191         WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_PKDET);
13192         WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_COMB);
13193     }
13194 
13195     return (A_UINT8 *) "WMI_CAL_FAILURE_REASON_UNKNOWN";
13196 }
13197 
13198 typedef struct {
13199     /** TLV tag and len; tag equals
13200      *  WMITLV_TAG_STRUC_wmi_ctrl_path_calibration_stats_struct*/
13201     A_UINT32 tlv_header;
13202     /** pdev_id for identifying the MAC/PHY */
13203     A_UINT32 pdev_id;
13204     /** Bit 0 - 7  : cal type / periodic cal type
13205       *              These bits hold either a wmi_ctrl_path_stats_cal_type_ids
13206       *              value for generic cal (if bit 13 is cleared) or a
13207       *              wmi_ctrl_path_stats_periodic_cal_type_ids value for
13208       *              periodic cal (if bit 13 is set).
13209       *              Signifies the type of calibration
13210       *              cal_type       : 8
13211       * Bit 8 - 12 : These bits hold a wmi_ctrl_path_stats_cal_profile_ids value.
13212       *              Signifies the type of cal profile
13213       *              cal_profile     : 5
13214       * Bit 13     : Signifies whether stats is for generic cal or periodic cal
13215       *              is_cal_periodic : 1
13216       *              0 -> generic cal
13217       *              1 -> periodic cal
13218       * Bit 14 - 31: Reserved for future
13219       */
13220     A_UINT32 cal_info;
13221     A_UINT32 cal_triggered_cnt;   /* Count of number of times calibration triggered */
13222     A_UINT32 cal_fail_cnt;        /* Count of number of times calibration failed */
13223     A_UINT32 cal_fcs_cnt;         /* Count of number of times FCS done for cal */
13224     A_UINT32 cal_fcs_fail_cnt;    /* Count of number of times FCS failed for cal */
13225 } wmi_ctrl_path_calibration_stats_struct;
13226 
13227 #define WMI_CTRL_PATH_CALIBRATION_STATS_CAL_TYPE_GET(cal_info)             WMI_GET_BITS(cal_info, 0, 8)
13228 #define WMI_CTRL_PATH_CALIBRATION_STATS_CAL_TYPE_SET(cal_info, cal_type)   WMI_SET_BITS(cal_info, 0, 8, cal_type)
13229 
13230 #define WMI_CTRL_PATH_CALIBRATION_STATS_CAL_PROFILE_GET(cal_info)              WMI_GET_BITS(cal_info, 8, 5)
13231 #define WMI_CTRL_PATH_CALIBRATION_STATS_CAL_PROFILE_SET(cal_info, cal_profile) WMI_SET_BITS(cal_info, 8, 5, cal_profile)
13232 
13233 #define WMI_CTRL_PATH_CALIBRATION_STATS_IS_PERIODIC_CAL_GET(cal_info)              WMI_GET_BITS(cal_info, 13, 1)
13234 #define WMI_CTRL_PATH_CALIBRATION_STATS_IS_PERIODIC_CAL_SET(cal_info, is_periodic) WMI_SET_BITS(cal_info, 13, 1, is_periodic)
13235 
13236 /* 0=20MHz, 1=40MHz, 2=80MHz, 3=160MHz, 4=240MHz, 5=320MHz */
13237 #define WMI_AWGN_MAX_BW 6
13238 
13239 typedef struct {
13240     /* TLV tag and len; tag equals
13241      * WMITLV_TAG_STRUC_wmi_ctrl_path_awgn_stats_struct
13242      * For 6G FCC test we have to monitor channel interference and switch
13243      * to non-interference channel.
13244      * Additive White Gaussian Noise (AWGN) interference detection logic
13245      * is used to detect interference based upon CCA / BW drop / packet drop.
13246      * Once AWGN interference is detected, the target sends
13247      * WMI_DCS_INTERFERENCE_EVENTID to host for channel change/BW change.
13248      * This stats struct is used to get info about how many times these
13249      * CCA_Interference/BW_Drop/Pkt_Drop indicators of AWGN occur.
13250      */
13251     A_UINT32 tlv_header;
13252     /*
13253      * AWGN WMI event sent count
13254      * This is used to inform how many WMI_DCS_INTERFERENCE_EVENTID have been
13255      * sent to the host.
13256      * WMI_DCS_INTERFERENCE_EVENTID is sent whenever one or more of
13257      * CCA_Int/BW_Drop/Channel_Change(Pkt_Drop) happen.
13258      */
13259     A_UINT32 awgn_send_evt_cnt;
13260     /* AWGN primary int count */
13261     A_UINT32 awgn_pri_int_cnt;
13262     /* AWGN secondary int count */
13263     A_UINT32 awgn_sec_int_cnt;
13264     /*
13265      * AWGN pkt drop trigger count
13266      * This shows how many times the presence of interference on the
13267      * primary BW has been inferred due to pkt drops.
13268      * WMI_DCS_INTERFERENCE_EVENTID will be sent whenever there is
13269      * interference on Primary Channel.
13270      */
13271     A_UINT32 awgn_pkt_drop_trigger_cnt;
13272     /* awgn pkt drop trigger reset count */
13273     A_UINT32 awgn_pkt_drop_trigger_reset_cnt;
13274     /*
13275      * AWGN bandwidth drop count
13276      * This is used to inform count for any frame transmitted on lower BW
13277      * than configured BW.
13278      * WMI_DCS_INTERFERENCE_EVENTID will be sent whenever there is BW drop.
13279      */
13280     A_UINT32 awgn_bw_drop_cnt;
13281     /* AWGN bandwidth drop reset count */
13282     A_UINT32 awgn_bw_drop_reset_cnt;
13283     /*
13284      * AWGN CCA int count
13285      * This is used to inform the interference based on CCA registers.
13286      * WMI_DCS_INTERFERENCE_EVENTID will be sent whenever there is CCA
13287      * interference.
13288      */
13289     A_UINT32 awgn_cca_int_cnt;
13290     /* AWGN cca int reset count */
13291     A_UINT32 awgn_cca_int_reset_cnt;
13292     /* AWGN cca ack blk count */
13293     A_UINT32 awgn_cca_ack_blk_cnt;
13294     /* AWGN cca ack blk reset count */
13295     A_UINT32 awgn_cca_ack_reset_cnt;
13296     /*
13297      * AWGN int BW cnt used to store interference occurred at 20/40/80/160MHz
13298      * awgn_int_bw_cnt[0] counts interference detections in 20 MHz BW,
13299      * awgn_int_bw_cnt[1] counts interference detections in 40 MHz BW,
13300      * awgn_int_bw_cnt[2] counts interference detections in 80 MHz BW,
13301      * awgn_int_bw_cnt[3] counts interference detections in 160 MHz BW,
13302      * awgn_int_bw_cnt[4] is reserved for 240 MHz BW,
13303      * awgn_int_bw_cnt[5] counts interference detections in 320 MHz BW.
13304      */
13305     A_UINT32 awgn_int_bw_cnt[WMI_AWGN_MAX_BW];
13306 
13307     /* Number of OBSS interference occurred */
13308     A_UINT32 obss_int_cnt;
13309 
13310     /* Number of OBSS interference Sent to host */
13311     A_UINT32 obss_int_evt_sent_host_cnt;
13312 
13313     /* Number of OBSS interference skiped due to AWGN as high priority */
13314     A_UINT32 obss_int_evt_skip_awgn_cnt;
13315 
13316     /* Number of OBSS interference skiped due to duplicate OBSS interference */
13317     A_UINT32 obss_int_evt_skip_dup_cnt;
13318 
13319     /* Current OBSS interference segment details
13320      * chan_bw_interference_bitmap:
13321      * Indicates which 20MHz segments contain interference
13322      *  320 MHz: bits 0-15
13323      *  160 MHz: bits 0-7
13324      *   80 MHz: bits 0-3
13325      * Within the bitmap, Bit-0 represents lowest 20Mhz, Bit-1 represents
13326      * second lowest 20Mhz and so on.
13327      * Each bit position will indicate 20MHz in which interference is seen.
13328      * (Valid 16 bits out of 32 bit integer)
13329      */
13330     A_UINT32 obss_int_cur_int_seg;
13331 
13332     /* Previous OBSS Int Segment details
13333      * chan_bw_interference_bitmap:
13334      * Indicates which 20MHz segments contain interference
13335      *  320 MHz: bits 0-15
13336      *  160 MHz: bits 0-7
13337      *   80 MHz: bits 0-3
13338      * Within the bitmap, Bit-0 represents lowest 20Mhz, Bit-1 represents
13339      * second lowest 20Mhz and so on.
13340      * Each bit position will indicate 20MHz in which interference is seen.
13341      * (Valid 16 bits out of 32 bit integer)
13342      */
13343     A_UINT32 obss_int_prv_int_seg;
13344 
13345     /*
13346      * OBSS int BW cnt used to store interference occurred at 20/40/80/160MHz
13347      * obss_int_bw_cnt[0] counts interference detections in 20 MHz BW,
13348      * obss_int_bw_cnt[1] counts interference detections in 40 MHz BW,
13349      * obss_int_bw_cnt[2] counts interference detections in 80 MHz BW,
13350      * obss_int_bw_cnt[3] counts interference detections in 160 MHz BW,
13351      * obss_int_bw_cnt[4] counts interference detections in 240 MHz BW,
13352      * obss_int_bw_cnt[5] counts interference detections in 320 MHz BW,
13353      */
13354     A_UINT32 obss_int_bw_cnt[WMI_AWGN_MAX_BW];
13355 } wmi_ctrl_path_awgn_stats_struct;
13356 
13357 typedef struct {
13358     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_dfs_channel_stats_struct*/
13359     A_UINT32 tlv_header;
13360     /** pdev_id for identifying the PHY */
13361     A_UINT32 pdev_id;
13362     /** nol element num */
13363     A_UINT32 nol;
13364     /** Channel in MHz */
13365     A_UINT32 channel;
13366 
13367     /** Channel width in MHz */
13368     A_UINT32 chwidth;
13369 
13370     /** Time left for the channel to remain in NOL list (in seconds) */
13371     A_UINT32 timeleft;
13372 } wmi_ctrl_path_dfs_channel_stats_struct;
13373 
13374 typedef struct {
13375     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_odd_addr_read_struct*/
13376     A_UINT32 tlv_header;
13377     /* resp_type:
13378      * Response type for each sub option:
13379      * Add address space, display address, display data, delete address space.
13380      * Refer to WMI_ODD_ADDR_READ_OPTION_TYPE_T.
13381      */
13382     A_UINT32 resp_type;
13383     /* User configured Entry id */
13384     A_UINT32 entry_id;
13385     /* address:
13386      * User configured Address Space.
13387      * Any unused elements will be filled with 0x0.
13388      */
13389     A_UINT32 address[WMI_MAX_ADDRESS_SPACE];
13390     /* data
13391      * Data/Value at the User configured Address Space.
13392      * Any unused elements will be filled with 0x0.
13393      */
13394     A_UINT32 data[WMI_MAX_ADDRESS_SPACE];
13395     /* Status of the operation performed: 0 = failure, 1 = success */
13396     A_UINT32 is_success;
13397 } wmi_ctrl_path_odd_addr_read_struct;
13398 
13399 /*
13400  * The wmi_ctrl_path_afc_stats_struct is used to send AFC stats within
13401  * the WMI_CTRL_PATH_STATS_EVENT message, in response to a
13402  * WMI_REQUEST_CTRL_PATH_STATS_CMD message for the stat type
13403  * WMI_REQUEST_CTRL_PATH_AFC_STAT.
13404  */
13405 typedef struct {
13406     /* TLV tag and len; tag equals
13407      *  WMITLV_TAG_STRUC_wmi_ctrl_path_afc_stats_struct */
13408     A_UINT32 tlv_header;
13409 
13410     A_UINT32 pdev_id;               /* pdev_id for identifying the MAC/PHY */
13411 
13412     /* Count of new request ID every time it is generated */
13413     A_UINT32 request_id_count;
13414     /* Count of total number of AFC payload received */
13415     A_UINT32 response_count;
13416     /* Count of total number of invalid AFC response */
13417     A_UINT32 invalid_response_count;
13418     /* Count of total number of AFC resets received  */
13419     A_UINT32 reset_count;
13420 
13421     /* AFC Response error counters*/
13422 
13423     /*
13424      * Count of total number of incorrect payload received due to
13425      * request ID and response
13426      * Increments when request ID doesn't match with response.
13427      */
13428     A_UINT32 id_mismatch_count;
13429 
13430     /*
13431      * Count of total number of "local_error_code" success event
13432      * received as part of the AFC response payload in the below struct
13433      * "afc_spectrum_inquiry_resp_bin_type"
13434      */
13435     A_UINT32 local_err_code_success;
13436 
13437     /*
13438      * Count of total number of "local_error_code" failure event
13439      * received as part of the AFC response payload in the below struct
13440      * "afc_spectrum_inquiry_resp_bin_type"
13441      */
13442     A_UINT32 local_err_code_failure;
13443 
13444     /*
13445      * The below fields are used to denote the count of
13446      * different server response code received in "afc_serv_resp_code"
13447      * received as part of "afc_spectrum_inquiry_resp_bin_type"
13448      * These resp codes are as per the WFA spec
13449      */
13450     /* afc_serv_resp_code = version not supported */
13451     A_UINT32 serv_resp_code_100;
13452     /* afc_serv_resp_code = Device disallowed */
13453     A_UINT32 serv_resp_code_101;
13454     /* afc_serv_resp_code = Missing param */
13455     A_UINT32 serv_resp_code_102;
13456     /* afc_serv_resp_code = invalid value */
13457     A_UINT32 serv_resp_code_103;
13458     /* afc_serv_resp_code = unexpected param */
13459     A_UINT32 serv_resp_code_106;
13460     /* afc_serv_resp_code = unsupported spectrum */
13461     A_UINT32 serv_resp_code_300;
13462 
13463     /*
13464      * AFC Compliance tracker
13465      */
13466     /* proxy_standalone_0
13467      * This field displays the value of Request ID check disable received
13468      * as part of the INI knob
13469      */
13470     A_UINT32 proxy_standalone_0;
13471     /* proxy_standalone_1
13472      * This field displays the value of Timer check disable received
13473      * as part of the INI knob
13474      */
13475     A_UINT32 proxy_standalone_1;
13476 
13477     /* Count of successful power events sent to host */
13478     A_UINT32 power_event_counter;
13479     /* Count of total force LPI power mode switch when grace count expires */
13480     A_UINT32 force_LPI_counter;
13481 
13482     /*
13483      * Count of total number of successful host set
13484      * TPC command received within the compliance timer
13485      */
13486     A_UINT32 tpc_wmi_success_count;
13487 
13488     /*
13489      * Count of total number of failed host set
13490      * TPC command. This is incremented when compliance timer expires
13491      */
13492     A_UINT32 tpc_wmi_failure_count;
13493 
13494     /*
13495      * These counters are incremented as part of the
13496      * Regulatory Compliance check done on the AFC payload
13497      * received from server
13498      */
13499     /* Incorrect PSD value received in freq Obj */
13500     A_UINT32 psd_failure_count;
13501     /* Incorrect End freq received in freq Obj */
13502     A_UINT32 psd_end_freq_failure_count;
13503     /* Incorrect Start freq received in freq Obj */
13504     A_UINT32 psd_start_freq_failure_count;
13505     /* Incorrect EIRP received in channel obj */
13506     A_UINT32 eirp_failure_count;
13507     /* Incorrect centre freq channel received in channel obj */
13508     A_UINT32 cfreq_failure_count;
13509 
13510     /*
13511      * AFC Current status
13512      */
13513     /* Current Request ID */
13514     A_UINT32 request_id;
13515     /* grace_timer_count
13516      * This grace counter increments only after TTL expiry.
13517      * Cleared to zero once valid payload is received.
13518      */
13519     A_UINT32 grace_timer_count;
13520     /* Current TTL Time in seconds from last valid payload response */
13521     A_UINT32 cur_ttl_timer;
13522     /* deployment_mode
13523      * 6G AP deployment mode denoting indoor or outdoor
13524      * Indoor = 1, Outdoor = 2
13525      */
13526     A_UINT32 deployment_mode;
13527     /*
13528      * Proxy mode AFC-Response payload clear count
13529      */
13530     A_UINT32 payload_clear_count;
13531 } wmi_ctrl_path_afc_stats_struct;
13532 
13533 /* AT - Airtime */
13534 /* AA - Available Airtime */
13535 #define WMI_PMLO_UL_DL_INBSS_AT_GET_BE(airtime)         WMI_GET_BITS(airtime, 0, 8)
13536 #define WMI_PMLO_UL_DL_INBSS_AT_SET_BE(airtime, value)  WMI_SET_BITS(airtime, 0, 8, value)
13537 
13538 #define WMI_PMLO_UL_DL_INBSS_AT_GET_BK(airtime)         WMI_GET_BITS(airtime, 8, 8)
13539 #define WMI_PMLO_UL_DL_INBSS_AT_SET_BK(airtime, value)  WMI_SET_BITS(airtime, 8, 8, value)
13540 
13541 #define WMI_PMLO_UL_DL_INBSS_AT_GET_VI(airtime)         WMI_GET_BITS(airtime, 16, 8)
13542 #define WMI_PMLO_UL_DL_INBSS_AT_SET_VI(airtime, value)  WMI_SET_BITS(airtime, 16, 8, value)
13543 
13544 #define WMI_PMLO_UL_DL_INBSS_AT_GET_VO(airtime)         WMI_GET_BITS(airtime, 24, 8)
13545 #define WMI_PMLO_UL_DL_INBSS_AT_SET_VO(airtime, value)  WMI_SET_BITS(airtime, 24, 8, value)
13546 
13547 #define WMI_PMLO_LINK_OBSS_AT_GET(airtime)              WMI_GET_BITS(airtime, 0, 8)
13548 #define WMI_PMLO_LINK_OBSS_AT_SET(airtime, value)       WMI_SET_BITS(airtime, 0, 8, value)
13549 
13550 #define WMI_PMLO_LINK_AA_GET(airtime)                   WMI_GET_BITS(airtime, 8, 8)
13551 #define WMI_PMLO_LINK_AA_SET(airtime, value)            WMI_SET_BITS(airtime, 8, 8, value)
13552 
13553 #define WMI_PMLO_UL_AIRTIME_NON_AC_GET(airtime)         WMI_GET_BITS(airtime, 16, 8)
13554 #define WMI_PMLO_UL_AIRTIME_NON_AC_SET(airtime, value)  WMI_SET_BITS(airtime, 16, 8, value)
13555 
13556 #define WMI_PMLO_DL_AIRTIME_NON_AC_GET(airtime)         WMI_GET_BITS(airtime, 24, 8)
13557 #define WMI_PMLO_DL_AIRTIME_NON_AC_SET(airtime, value)  WMI_SET_BITS(airtime, 24, 8, value)
13558 
13559 /*
13560  * The wmi_ctrl_path_pmlo_stats_struct is used to send Provisional MLO stats
13561  * the WMI_CTRL_PATH_STATS_EVENT message, in response to a
13562  * WMI_REQUEST_CTRL_PATH_STATS_CMD message for the stat type
13563  * WMI_REQUEST_CTRL_PATH_PMLO_STAT.
13564  */
13565 typedef struct {
13566     /* TLV tag and len; tag equals
13567      *  WMITLV_TAG_STRUC_wmi_ctrl_path_pmlo_stats_struct */
13568     A_UINT32 tlv_header;
13569     /** pdev_id for identifying the PHY */
13570     A_UINT32 pdev_id;
13571     /*
13572      * Percentage of downlink air time used in each access category
13573      * calculated InBSS, units in percentage.
13574      * BIT[0-7]   : AC_BE
13575      * BIT[8-15]  : AC_BK
13576      * BIT[16-23] : AC_VI
13577      * BIT[24-31] : AC_VO
13578      * Please refer to WMI_PMLO_UL_DL_INBSS_AT_* macros
13579      * to retrieve values for each access category in dl_inbss_airtime_per_ac.
13580      */
13581     union {
13582         struct {
13583              A_UINT32
13584                  dl_inbss_airtime_ac_be: 8,
13585                  dl_inbss_airtime_ac_bk: 8,
13586                  dl_inbss_airtime_ac_vi: 8,
13587                  dl_inbss_airtime_ac_vo: 8;
13588         };
13589         A_UINT32 dl_inbss_airtime_per_ac;
13590     };
13591     /*
13592      * Percentage of uplink air time used in each access category
13593      * calculated InBSS, units in percentage.
13594      * BIT[0-7]   : AC_BE
13595      * BIT[8-15]  : AC_BK
13596      * BIT[16-23] : AC_VI
13597      * BIT[24-31] : AC_VO
13598      * Please refer to WMI_PMLO_UL_DL_INBSS_AT_* macros
13599      * to set/get values for each access category in ul_inbss_airtime_per_ac.
13600      */
13601     union {
13602         struct {
13603             A_UINT32
13604                 ul_inbss_airtime_ac_be: 8,
13605                 ul_inbss_airtime_ac_bk: 8,
13606                 ul_inbss_airtime_ac_vi: 8,
13607                 ul_inbss_airtime_ac_vo: 8;
13608         };
13609         A_UINT32 ul_inbss_airtime_per_ac;
13610     };
13611     /*
13612      * Percentage of air time available for each AC, units in percentage.
13613      * BIT[0-7]   : AC_BE
13614      * BIT[8-15]  : AC_BK
13615      * BIT[16-23] : AC_VI
13616      * BIT[24-31] : AC_VO
13617      * Please refer to WMI_ESP_ESTIMATE_GET_* and WMI_ESP_ESTIMATE_SET_* macros
13618      * to retrieve values for each access category in estimated_air_time_per_ac.
13619      */
13620     union {
13621         struct {
13622              A_UINT32
13623                  estimated_air_time_ac_be: 8,
13624                  estimated_air_time_ac_bk: 8,
13625                  estimated_air_time_ac_vi: 8,
13626                  estimated_air_time_ac_vo: 8;
13627         };
13628         A_UINT32 estimated_air_time_per_ac;
13629     };
13630     /*
13631      * Average channel latency per AC, units in micro seconds.
13632      * avg_chan_lat_per_ac[0] : AC_VO
13633      * avg_chan_lat_per_ac[1] : AC_VI
13634      * avg_chan_lat_per_ac[2] : AC_BE
13635      * avg_chan_lat_per_ac[3] : AC_BK
13636      */
13637     A_UINT32 avg_chan_lat_per_ac[WMI_AC_MAX];
13638     /*
13639      * link_obss_airtime: Percentage of OBSS used air time per link,
13640      * units in percentage.
13641      * Refer to WMI_PMLO_LINK_OBSS_AT_* Macro to set/get values.
13642      * link_idle_airtime: Idle/free airtime per link, units in percentage.
13643      * Refer to WMI_PMLO_LINK_AA_* macro to set/get values.
13644      * ul_inbss_airtime_non_ac: ul inBSS airtime occupied by non-AC traffic,
13645      * units in percentage.
13646      * Refer to WMI_PMLO_UL_AIRTIME_NON_AC_* macro to set/get values.
13647      * dl_inbss_airtime_non_ac: dl inBSS airtime occupied by non-AC traffic,
13648      * units in percentage.
13649      * Refer to WMI_PMLO_DL_AIRTIME_NON_AC_* macro to set/get values.
13650      */
13651     union {
13652         struct {
13653             A_UINT32 link_obss_airtime:       8,
13654                      link_idle_airtime:       8,
13655                      ul_inbss_airtime_non_ac: 8,
13656                      dl_inbss_airtime_non_ac: 8;
13657         };
13658         A_UINT32 ul_dl_obss_free_aa_word32;
13659     };
13660 } wmi_ctrl_path_pmlo_stats_struct;
13661 
13662 typedef struct {
13663     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_cfr_stats_struct */
13664     A_UINT32 tlv_header;
13665     /*
13666      * This index is used for formatting the printout of this stats TLV.
13667      * A stats header is added when the index=0.
13668      */
13669     A_UINT32 index;
13670     wmi_mac_addr cfr_peer_mac_addr;
13671     A_UINT32 peer_in_use;
13672     A_UINT32 capture_in_progress;
13673     /* capture_method: 0 means oneshot request, otherwise periodic request */
13674     A_UINT32 capture_method;
13675     A_UINT32 periodicity; /* Time in ms */
13676     A_UINT32 latest_req_timestamp; /* Time in ms */
13677     A_UINT32 latest_resp_timestamp; /* Time in ms */
13678     A_UINT32 cfr_req_count;
13679     A_UINT32 cfr_resp_success_count;
13680     A_UINT32 cfr_resp_failure_count;
13681 } wmi_ctrl_path_cfr_stats_struct;
13682 
13683 
13684 #define WMI_MAX_MLO_LINKS 5
13685 #define WMI_HE_MAP_COUNT 3
13686 #define WMI_EHT_MAP_COUNT 3
13687 
13688 typedef struct {
13689     /* TLV tag and len; tag equals
13690      * WMITLV_TAG_STRUC_wmi_ctrl_path_peer_stats_struct
13691      */
13692     A_UINT32 tlv_header;
13693     /* mac address - part of wlan_peer */
13694     wmi_mac_addr mac_addr;
13695     /* wlan_peer flags - refer to IEEE80211_NODE_* flags in wlan_peer.h */
13696     A_UINT32 opaque_debug_flags;
13697     /* opaque_debug_vht_caps:
13698      * Negotiated VHT capabilities in the wlan_peer struct
13699      * Refer to ieee80211_defs.h.
13700      */
13701     A_UINT32 opaque_debug_vht_caps;
13702     /* opaque_debug_flags_ext:
13703      * Extended flags in the wlan_peer struct
13704      * Refer to IEEE80211_NODE_* flags in wlan_peer.h.
13705      */
13706     A_UINT32 opaque_debug_flags_ext;
13707     /* TID queues marked for TWT flush, present in wlan_peer */
13708     A_UINT32 opaque_debug_twt_flush_tidmap;
13709     /* Number of TWT SPs to be expired, present in wlan_peer */
13710     A_UINT32 opaque_debug_n_TWT_SPs_to_expire;
13711     /* opaque_debug_rc_flags:
13712      * Peer rate information, part of struct rate_node
13713      * Refer to whal_rate_api.h for complete RC_FLAGS details.
13714      */
13715     A_UINT32 opaque_debug_rc_flags;
13716     /* opaque_debug_sm_event_mask_eosp_cnt:
13717      * This word contains the following bitfields:
13718      *   - Power save state machine event mask,
13719      *     part of wal_ps_buf_peer_handle_t.
13720      *     Refer to enum wal_ps_buf_peer_reg_ev_handlers.
13721      *     Use WMI_PEER_STATS_SM_MASK_SET,GET macros.
13722      *   - End of service period (EOSP) sent retry counter,
13723      *     part of wal_ps_buf_peer_handle_t.
13724      *     Use WMI_PEER_STATS_EOSP_RETRY_CNT_SET,GET macros.
13725      */
13726     A_UINT32 opaque_debug_sm_event_mask_eosp_cnt;
13727     /* opaque_debug_ps_buf_peer_flag1:
13728      * Power save related send_n, ps_poll, unscheduled service period
13729      * related fields;
13730      * Part of wal_ps_buf_peer_handle_t.
13731      * Refer to wal_ps_buf_peer_ctx struct definition.
13732      */
13733     A_UINT32 opaque_debug_ps_buf_peer_flag1;
13734     /* opaque_debug_ps_buf_peer_flag2:
13735      * Power save related trigger/delivery tid related fields.
13736      * part of wal_ps_buf_peer_handle_t.
13737      * Refer to wal_ps_buf_peer_ctx struct definition.
13738      */
13739     A_UINT32 opaque_debug_ps_buf_peer_flag2;
13740     /* opaque_debug_ps_buf_peer_flag3:
13741      * Power save related last trigger related information,
13742      * part of wal_ps_buf_peer_handle_t.
13743      * Refer to wal_ps_buf_peer_ctx struct definition.
13744      */
13745     A_UINT32 opaque_debug_ps_buf_peer_flag3;
13746     /* opaque_debug_last_rx_trigger_time:
13747      * Time of the most recently received uplink trigger frame,
13748      * part of wal_ps_buf_peer_handle_t - in microseconds units.
13749      */
13750     A_UINT32 opaque_debug_last_rx_trigger_time;
13751     /* opaque_debug_last_poll_time:
13752      * TSF of the most recently received uplink PS-Poll,
13753      * part of wal_ps_buf_peer_handle_t - in TU
13754      */
13755     A_UINT32 opaque_debug_last_poll_time;
13756     /* opaque_debug_oldest_tx_buffered_waiting_ms:
13757      * Enqueue time of most recent MSDU that AP has buffered for
13758      * sleeping station, part of wal_ps_buf_peer_handle_t, in ms units.
13759      */
13760     A_UINT32 opaque_debug_oldest_tx_buffered_waiting_ms;
13761     /* opaque_debug_last_rxtx_activity:
13762      * The last time when there was a rx or tx traffic from a client,
13763      * part of wal_ps_buf_peer_handle_t, in ms units.
13764      */
13765     A_UINT32 opaque_debug_last_rxtx_activity;
13766     /* opaque_debug_twt_flush_expiry_timestamp:
13767      * Peer's TWT flush expiry timestamp in us,
13768      * part of peer_twt_flush struct.
13769      */
13770     A_UINT32 opaque_debug_twt_flush_expiry_timestamp;
13771     /* opaque_debug_hw_link_id:
13772      * Unique link id across SOCs, determined during QMI handshake,
13773      * part of wlan_peer_ml_info_t.
13774      */
13775     A_UINT32 opaque_debug_hw_link_id;
13776     /* opaque_debug_ml_partner_hw_link_id_bitmap:
13777      * Hardware link id of the of partner links that are to be cleaned up.
13778      * This is filled by host during peer delete cmd.
13779      * It it part of wlan_peer_ml_info_t.
13780      */
13781     A_UINT32 opaque_debug_ml_partner_hw_link_id_bitmap;
13782     /* opaque_debug_link_flags:
13783      * MLO link flags: related to assoc, anchor, master and primary UMAC links.
13784      * Refer to resmgr_mlo_link_flags.
13785      * Part of wlan_peer_ml_info_t.
13786      */
13787     A_UINT32 opaque_debug_link_flags;
13788     /* MLO peer id - part of wlan_ml_peer_t */
13789     A_UINT32 opaque_debug_ml_peer_id;
13790     /* MLD mac address - part of wlan_ml_peer_t */
13791     wmi_mac_addr opaque_debug_mld_mac_addr;
13792     /* opaque_debug_assoc_id_usage_cnt:
13793      * Part of wlan_peer.
13794      * This word contains the following bitfields:
13795      *   - assoc id of the peer
13796      *     Use WMI_PEER_STATS_ASSOCIATE_ID_SET,GET macros.
13797      *   - peer usage count to track if peer alloc command is sent
13798      *     for new or existing peer,
13799      *     Use WMI_PEER_STATS_USAGE_CNT_SET,GET macros.
13800      */
13801     A_UINT32 opaque_debug_assoc_id_usage_cnt;
13802     /* opaque_debug_default_ht_caps:
13803      * Part of wlan_peer.
13804      * This word contains the following bitfields:
13805      *   - default peer capabilities of the peer - refer ieee80211_defs.h
13806      *     Use WMI_PEER_STATS_DEF_CAPS_SET,GET macros.
13807      *   - HT capabilities of the peer - refer ieee80211_defs.h
13808      *     Use WMI_PEER_STATS_HT_CAPS_SET,GET macros.
13809      */
13810     A_UINT32 opaque_debug_default_ht_caps;
13811     /* opaque_debug_inact_gen:
13812      * Part of wlan_peer.
13813      * This word contains the following bitfields:
13814      *   - Overall tx/rx inactivity time of the peer in seconds
13815      *     Use WMI_PEER_STATS_INACT_GEN_SET,GET macros.
13816      *   - Data tx/rx inactivity time of the peer in seconds.
13817      *     Use WMI_PEER_STATS_DATA_INACT_GEN_SET,GET macros.
13818      */
13819     A_UINT32 opaque_debug_inact_gen;
13820     /* opaque_debug_id_type:
13821      * Part of wlan_peer.
13822      * This word contains the following bitfields:
13823      *   - Type of peer whether it is bss,self or remote peer.
13824      *     Refer to enum wmi_peer_type.
13825      *     Use WMI_PEER_STATS_TYPE_SET,GET macros.
13826      *   - MAC ID that the peer belongs to
13827      *     Use WMI_PEER_STATS_MAC_ID_SET,GET macros.
13828      *   - sw peer id of the peer
13829      *     Use WMI_PEER_STATS_ID_SET,GET macros.
13830      */
13831     A_UINT32 opaque_debug_id_type;
13832     /* Deleted tids bitmask within the peer - part of wal_peer */
13833     A_UINT32 opaque_debug_deleted_tidmask;
13834     /* number of local pending frames for completions -  part of wal_peer */
13835     A_UINT32 opaque_debug_num_of_local_frames_pending;
13836     /* flags part of wal_peer - refer to wal_peer_flags_t */
13837     A_UINT32 opaque_debug_wal_peer_flags;
13838     /* opaque_debug_keyid0_ast_index:
13839      * The AST index for key id 0 which is always allocated,
13840      * part of wal_peer.
13841      */
13842     A_UINT32 opaque_debug_keyid0_ast_index;
13843     /* opaque_debug_all_tids_block_module_bitmap:
13844      * Bitmap of block IDs requesting block of all TIDs,
13845      * part of wal_peer.
13846      * Refer to enum WLAN_PAUSE_ID.
13847      * This block/pause ID can be mapped to a WLAN_MODULE_ID module ID.
13848      */
13849     A_UINT32 opaque_debug_all_tids_block_module_bitmap;
13850     /* opaque_debug_all_tids_pause_module_bitmap:
13851      * Bitmap of pause IDs requesting block of all TIDs,
13852      * part of wal_peer.
13853      * Refer to enum WLAN_PAUSE_ID.
13854      * This pause ID can be mapped to a WLAN_MODULE_ID module ID.
13855      */
13856     A_UINT32 opaque_debug_all_tids_pause_module_bitmap;
13857     /* opaque_debug_data_tids_block_module_bitmap:
13858      * Bitmap of block ids requesting block of data tids,
13859      * part of wal_peer.
13860      * Refer to enum WLAN_PAUSE_ID.
13861      * This block/pause ID can be mapped to a WLAN_MODULE_ID module ID.
13862      */
13863     A_UINT32 opaque_debug_data_tids_block_module_bitmap;
13864     /* opaque_debug_data_tids_pause_module_bitmap:
13865      * Bitmap of pause ids requesting block of data tids,
13866      * part of wal_peer.
13867      * Refer to enum WLAN_PAUSE_ID.
13868      * This pause ID can be mapped to a WLAN_MODULE_ID module ID.
13869      */
13870     A_UINT32 opaque_debug_data_tids_pause_module_bitmap;
13871     /* The time stamp when first ppdu fails in us, part of wal_peer */
13872     A_UINT32 opaque_debug_ppdu_fail_time;
13873     /* opaque_debug_rate_params:
13874      * This word contains the following bitfields:
13875      *   - Non data rate code of the peer - part of wal_peer
13876      *     Use WMI_PEER_STATS_BSS_NON_DATA_RC_SET,GET macros.
13877      *   - channel bandwidth supported by the peer, part of wal_peer.
13878      *     The mapping is as follows:
13879      *     0 = 20 MHz, 1 = 40 MHz, 2 = 80 MHz, 3 = 160 MHz, 4 = 320 MHz
13880      *     Use WMI_PEER_STATS_CH_WIDTH_SET,GET macros.
13881      *   - MCS used for the last PPDU received from the peer, part of wal_peer
13882      *     Use WMI_PEER_STATS_RX_MCS_SET,GET macros.
13883      */
13884     A_UINT32 opaque_debug_rate_params;
13885     /* consecutive QOS null frame tx fail count, part of wal_peer */
13886     A_UINT32 opaque_debug_consecutive_null_failure;
13887     /* peer delete state refer enum PEER_DELETE_SM_STATE, part of wal_peer */
13888     A_UINT32 opaque_debug_peer_delete_sm_state;
13889     /* opaque_debug_cache_rate_info_low32,_high32:
13890      * Lower/upper 32 bits respectively of cached rate info variable
13891      * updated by the HTT metadata.
13892      * This rate_info is based on the values from struct
13893      * htt_tx_msdu_desc_ext2_t  .
13894      * If htt_tx_desc_ext2->update_peer_cache is set to 1 and
13895      * HTT_TX_TCL_METADATA_PEER_ID_GET(tcl_cmd_num) returns valid peer ID
13896      * then rate_info cache of the peer is updated.
13897      * Part of wal_peer.
13898      */
13899     A_UINT32 opaque_debug_cache_rate_info_low32;
13900     A_UINT32 opaque_debug_cache_rate_info_high32;
13901     /* opaque_debug_peer_delete_rc4_rekey:
13902      * This word contains the following bitfields:
13903      *   - Flag that denotes if Peer delete all is in progress or not,
13904      *     part of wal_peer.
13905      *     Use WMI_PEER_STATS_DELETE_ALL_FLAG_SET,GET macros.
13906      *   - RC4 rekey counter, part of wal_peer.
13907      *     Use WMI_PEER_STATS_RC4_REKEY_CNT_SET,GET macros.
13908      */
13909     A_UINT32 opaque_debug_peer_delete_rc4_rekey;
13910     /* opaque_debug_mcbc_tids_pause_bitmap:
13911      * Bitmap containing Multicast and broadcast tids that are paused,
13912      * part of wal_peer.
13913      */
13914     A_UINT32 opaque_debug_mcbc_tids_pause_bitmap;
13915     /* opaque_debug_next_to_last_pn_low32,_high32:
13916      * Lower/upper 32 bits respectively of last used PN value received,
13917      * part of wal_peer.
13918      */
13919     A_UINT32 opaque_debug_next_to_last_pn_low32;
13920     A_UINT32 opaque_debug_next_to_last_pn_high32;
13921     /* opaque_debug_last_pn_low32,_high32:
13922      * Lower/upper 32 bits respectively of current PN value received,
13923      * part of wal_peer.
13924      */
13925     A_UINT32 opaque_debug_last_pn_low32;
13926     A_UINT32 opaque_debug_last_pn_high32;
13927     /* opaque_debug_twt_ap_peer_ctx_flags:
13928      * This word contains the following bitfields:
13929      *   - TWT AP peer's context flags, part of twt_ap_peer_handle_t struct.
13930      *     Refer twt_ap_twt_session_t definition.
13931      *     Use WMI_PEER_STATS_TWT_AP_FLAGS_SET,GET macros.
13932      *   - TWT session counter, part of twt_ap_peer_handle_t struct.
13933      *     Use WMI_PEER_STATS_TWT_AP_SESSION_CNT_SET,GET macros.
13934      *   - TWT frame retry counter, part of twt_ap_peer_handle_t struct.
13935      *     Use WMI_PEER_STATS_TWT_FRM_RETRY_SET,GET macros.
13936      */
13937     A_UINT32 opaque_debug_twt_ap_peer_ctx_flags;
13938     /* opaque_debug_twt_ap_counters:
13939      * This word contains the following bitfields:
13940      *   - TWT UL trigger counter, part of twt_ap_peer_handle_t struct.
13941      *     Use WMI_PEER_STATS_TWT_UL_TRIGGER_SET,GET macros.
13942      *   - TWT Broadcast session counter, part of twt_ap_peer_handle_t struct.
13943      *     Use WMI_PEER_STATS_TWT_BC_SESSION_SET,GET macros.
13944      *   - TWT pending report counter, part of twt_ap_peer_handle_t struct.
13945      *     Use WMI_PEER_STATS_TWT_PENDING_REPORT_SET,GET macros.
13946      *   - TWT flow IDs, part of twt_ap_peer_handle_t struct.
13947      *     Use WMI_PEER_STATS_TWT_FLOW_IDS_SET,GET macros.
13948      */
13949     A_UINT32 opaque_debug_twt_ap_counters;
13950     /* opaque_debug_tx_state_bmap_low32,_high32:
13951      * Lower/upper 32 bits respectively of list of currently running
13952      * BA Tx states for tids in this peer, part of wal_ba_peer_handle_t.
13953      */
13954     A_UINT32 opaque_debug_tx_state_bmap_low32;
13955     A_UINT32 opaque_debug_tx_state_bmap_high32;
13956     /* opaque_debug_addba_mode:
13957      * This word contains the following bitfields:
13958      *   - ADDBA mode whether its automatic or manual,
13959      *     WAL_BA_ADDBA_MODE_AUTO = 0 and WAL_BA_ADDBA_MODE_MANUAL = 1
13960      *     Part of wal_ba_peer_handle_t.
13961      *     Use WMI_PEER_STATS_ADDBBA_TX_MODE_SET,GET macros.
13962      *   - ADDBA request's response code, part of wal_ba_peer_handle_t.
13963      *     Use WMI_PEER_STATS_ADDBBA_RESP_MODE_SET,GET macros.
13964      */
13965     A_UINT32 opaque_debug_addba_mode;
13966     /* opaque_debug_tx_retry_bmap:
13967      * Bitmap of tids and their TX BlockAck retry counters.
13968      * Each TID uses 2 bits for its BA retry counter.
13969      * Part of wal_ba_peer_handle_t.
13970      */
13971     A_UINT32 opaque_debug_tx_retry_bmap;
13972     /* opaque_debug_rx_state_bmap:
13973      * Bitmap of tids and their RX BlockAck retry counters.
13974      *   00 - BA not setup
13975      *   01 - BA in progress
13976      *   10 - reserved
13977      *   11 - BA setup.
13978      * Each TID uses 2 bits for its BA RX state;
13979      * for instance TID 0's BA info occupies bits 1:0 and so on.
13980      * Part of wal_ba_peer_handle_t.
13981      */
13982     A_UINT32 opaque_debug_rx_state_bmap;
13983     /* opaque_debug_tx_pending_delba_tid_bmap:
13984      * TID bitmap containaing information DELBA tx pending,
13985      * part of wal_ba_peer_handle_t.
13986      */
13987     A_UINT32 opaque_debug_tx_pending_delba_tid_bmap;
13988     /* opaque_debug_link_monitor_tid_num:
13989      * link monitor tid num in bss_peer ba_peer_handle,
13990      * part of wal_ba_peer_handle_t.
13991      */
13992     A_UINT32 opaque_debug_link_monitor_tid_num;
13993     /* opaque_debug_rc4_eapol_key_complete:
13994      * Flag that denotes rc4 eapol key exchange is complete,
13995      * part of wal_peer_ext.
13996      */
13997     A_UINT32 opaque_debug_rc4_eapol_key_complete;
13998     /* qcache peer flags, refer to qpeer_flags_t */
13999     A_UINT32 opaque_debug_qpeer_flags;
14000     /* bitmap of TIDs requested for flush, part of wal_qcache_peer */
14001     A_UINT32 opaque_debug_delete_requested_tidmask;
14002     /* bitmap of created TIDs, part of wal_qcache_peer */
14003     A_UINT32 opaque_debug_tid_created_tidmask;
14004     /* opaque_debug_qpeer_rt_flags0,_flags1,_flags2:
14005      * RT thread related fields in qpeer, refer to _wal_qcache_peer.
14006      */
14007     A_UINT32 opaque_debug_qpeer_rt_flags0;
14008     A_UINT32 opaque_debug_qpeer_rt_flags1;
14009     A_UINT32 opaque_debug_qpeer_rt_flags2;
14010     /* opaque_debug_qpeer_sa_flags0,_flags1:
14011      * SA thread related fields in qpeer, refer to _wal_qcache_peer.
14012      */
14013     A_UINT32 opaque_debug_qpeer_sa_flags0;
14014     A_UINT32 opaque_debug_qpeer_sa_flags1;
14015     /* BE thread related fields in qpeer, refer to _wal_qcache_peer */
14016     A_UINT32 opaque_debug_qpeer_be_flags;
14017     /* qpeer event bitmap, refer to wal_peer_event_type */
14018     A_UINT32 opaque_debug_event_bitmap;
14019     /* tx fail count for a peer, part of dcache peer */
14020     A_UINT32 opaque_debug_seq_no_tx_fail_cnt;
14021     /* Last transmission rate in kbps for a peer, part of dcache peer */
14022     A_UINT32 opaque_debug_last_tx_rate_kbps;
14023     /* opaque_debug_amsdu_size:
14024      * This word contains the following bitfields:
14025      *    - MAX AMSDU size of the peer, part of dcache peer.
14026      *      Use WMI_PEER_STATS_MAX_AMSDU_SIZE_SET,GET macros.
14027      */
14028     A_UINT32 opaque_debug_amsdu_size;
14029     /* opaque_debug_fake_sleep_time:
14030      * Time elapsed in ms after entering into fake sleep after xretry failure,
14031      * part of dcache peer.
14032      */
14033     A_UINT32 opaque_debug_fake_sleep_time;
14034     /* opaque_debug_tx_frame_qos_ctrl:
14035      * This word contains the following bitfields:
14036      *   - Tx frame control FC flags in ieee80211_defs.h, part of dcache peer.
14037      *     Use WMI_PEER_STATS_TX_FRAME_CTRL_SET,GET macros.
14038      *   - Tx QOS control FC flags in ieee80211_defs.h, part of dcache peer.
14039      *     Use WMI_PEER_STATS_TX_QOS_CTRL_SET,GET macros.
14040      */
14041     A_UINT32 opaque_debug_tx_frame_qos_ctrl;
14042     /* opaque_debug_consec_fail_subfrm_sz:
14043      * This word contains the following bitfields:
14044      *   - Consecutive tx fail count for the peer, part of dcache peer.
14045      *     Use WMI_PEER_STATS_CONSEC_FAIL_SET,GET macros.
14046      *   - subframe size configured for the peer, part of dcache peer.
14047      *     Use WMI_PEER_STATS_SUBFRAME_SIZE_SET,GET macros.
14048      */
14049     A_UINT32 opaque_debug_consec_fail_subfrm_sz;
14050     /* opaque_debug_tx_fail_partial_aid:
14051      * This word contains the following bitfields:
14052      *   - tx fail count for the peer, part of dcache peer.
14053      *     Use WMI_PEER_STATS_TX_FAIL_CNT_SET,GET macros.
14054      *   - Partial AID of the peer, part of dcache peer.
14055      *     Use WMI_PEER_STATS_TX_PARTIAL_AID_SET,GET macros.
14056      */
14057     A_UINT32 opaque_debug_tx_fail_partial_aid;
14058     /* opaque_debug_max_nss:
14059      * Part of dcache peer.
14060      * This word contains the following bitfields:
14061      *   - Peer NSS value sent by host during WMI_PEER_ASSOC cmd.
14062      *     Use WMI_PEER_STATS_MAX_NSS_SET,GET macros.
14063      */
14064     A_UINT32 opaque_debug_max_nss;
14065     /* opaque_debug_he_cap_info:
14066      * Peer HE capabilities info sent during peer assoc cmd.
14067      * Refer to WMI_HECAP_* macros in wmi_unified.h.
14068      * Part of dcache peer.
14069      */
14070     A_UINT32 opaque_debug_he_cap_info;
14071     /* opaque_debug_he_cap_info_ext:
14072      * Peer extended HE capabilities info sent during peer assoc cmd.
14073      * Refer to WMI_HECAP_* macros in wmi_unified.h.
14074      * Part of dcache peer.
14075      */
14076     A_UINT32 opaque_debug_he_cap_info_ext;
14077     /* opaque_debug_eht_cap_info:
14078      * Peer EHT capabilities info.
14079      * Refer to ieee80211_defs.h, part of dcache peer.
14080      */
14081     A_UINT32 opaque_debug_eht_cap_info;
14082     /* TAC thread related fields in dcache peer refer wal_dcache_peer_t */
14083     A_UINT32 opaque_debug_dcache_tac_flags;
14084     /* RT thread related fields in dcache peer refer wal_dcache_peer_t */
14085     A_UINT32 opaque_debug_dcache_rt_flags;
14086     /* Supported RC modes for the peer refer enum RC_MODE, part of dcache */
14087     A_UINT32 opaque_debug_rc_mode_supported_mask;
14088     /* opaque_debug_wlan_peer_bitfield_mask:
14089      * Part of wlan peer. This word contains the following bitfields:
14090      *   - Flag that denotes whether peer delete response is being sent
14091      *     to host or not.
14092      *     Use WMI_PEER_STATS_DEL_RESP_TO_HOST_SET,GET macros.
14093      *   - Flag that denotes if peer delete is in progress or not.
14094      *     Use WMI_PEER_STATS_DELETE_IN_PROGRESS_SET,GET macros.
14095      *   - Flag that denotes if peer migration is in progress or not.
14096      *     Use WMI_PEER_STATS_MIGRATION_IN_PROGRESS_SET,GET macros.
14097      *   - Flag that denotes peer's connection/authorized state.
14098      *     Refer WAL_PEER_STATE_* macros in wal_peer.h.
14099      *     Use WMI_PEER_STATS_CONN_STATE_SET,GET macros.
14100      *   - TX chain mask at 160MHz of the peer set during peer assoc command.
14101      *     Use WMI_PEER_STATS_TX_CHAIN_MASK_160_SET,GET macros.
14102      *   - Tx chain mask set during peer assoc command.
14103      *     Use WMI_PEER_STATS_TX_CHAIN_MASK_SET,GET macros.
14104      *   - copy of tx chain mask of peer saved for AP MIMO PS.
14105      *     Use WMI_PEER_STATS_ASSOC_CHAIN_MASK_SET,GET macros.
14106      */
14107     A_UINT32 opaque_debug_wlan_peer_bitfield_mask;
14108     /* opaque_debug_wal_peer_bitfields:
14109      * Part of wal_peer. This word contains the following bitfields:
14110      *   - Flag that denotes if QOS null is sent over WMI or not.
14111      *     Use WMI_PEER_STATS_QOS_NULL_OVER_WMI_SET,GET macros.
14112      *   - Flag that denotes whether peer assoc is received
14113      *     for the first time or not.
14114      *     Use WMI_PEER_STATS_NEW_ASSOC_SET,GET macros.
14115      *   - Flag that denotes whether TWT filter is enabled or not.
14116      *     Use WMI_PEER_STATS_TWT_FILT_FLAG_SET,GET macros.
14117      *   - Flag that denotes whether TWT is registered or not.
14118      *     Use WMI_PEER_STATS_TWT_REG_FLAG_SET,GET macros.
14119      *   - Flag that denotes whether WMM txQ uplink trigger is disabled or not.
14120      *     Use WMI_PEER_STATS_WMM_UL_TRIG_FLAG_SET,GET macros.
14121      *   - Number of active TIDs that do not have BA setup.
14122      *     Use WMI_PEER_STATS_ACTIVE_NOT_BA_TID_SET,GET macros.
14123      */
14124     A_UINT32 opaque_debug_wal_peer_bitfields;
14125     /* flags in RT context refer wal_peer_ext_t */
14126     A_UINT32 opaque_debug_wal_peer_rt_flags;
14127     /* opaque_debug_ml_attributes:
14128      * Part of wal_ml_peer. This word contains the following bitfields:
14129      *   - Num of MLO links
14130      *     Use WMI_PEER_STATS_NUM_LINKS_SET,GET macros.
14131      *   - ML peer id
14132      *     Use WMI_PEER_STATS_ML_PEER_ID_SET,GET macros.
14133      *   - Primary link ID
14134      *     Use WMI_PEER_STATS_PRI_LINK_ID_SET,GET macros.
14135      *   - Primary chip ID
14136      *     Use WMI_PEER_STATS_PRI_CHIP_ID_SET,GET macros.
14137      *   - Initial link count
14138      *     Use WMI_PEER_STATS_LINK_INIT_CNT_SET,GET macros.
14139      *   - Number of local links
14140      *     Use WMI_PEER_STATS_NUM_LOCAL_LINKS_SET,GET macros.
14141      *   - Bitmap of participating chips
14142      *     Use WMI_PEER_STATS_CHIPS_BITMAP_SET,GET macros.
14143      */
14144     A_UINT32 opaque_debug_ml_attributes;
14145     /* wal peer MLO flags refer ml_peer_flags_t */
14146     A_UINT32 opaque_debug_ml_flags;
14147     /* opaque_debug_ml_link_info_flags:
14148      * Part of link_info in wlan_peer_ml_info_t.
14149      * This word contains the following bitfields:
14150      *   - flag denoting if MLO-link is valid or not
14151      *     Use WMI_PEER_STATS_ML_PEER_LINK_INFO_VALID_SET,GET macros.
14152      *   - flag denoting if MLO-link is active or not
14153      *     Use WMI_PEER_STATS_ML_PEER_LINK_INFO_ACTIVE_SET,GET macros.
14154      *   - flag denoting if MLO-link is primary or not
14155      *     Use WMI_PEER_STATS_ML_PEER_LINK_INFO_PRI_SET,GET macros.
14156      *   - flag denoting if MLO-link is assoc link or not
14157      *     Use WMI_PEER_STATS_ML_PEER_LINK_INFO_ASSOC_LINK_SET,GET macros.
14158      *   - Chip ID of the MLO-link
14159      *     Use WMI_PEER_STATS_ML_PEER_LINK_INFO_CHIP_ID_SET,GET macros.
14160      *   - IEEE link ID of the MLO-link
14161      *     Use WMI_PEER_STATS_ML_PEER_LINK_INFO_IEEE_LINK_SET,GET macros.
14162      *   - HW link ID of the MLO-link
14163      *     Use WMI_PEER_STATS_ML_PEER_LINK_INFO_HW_LINK_SET,GET macros.
14164      *   - logical link ID of the MLO-link
14165      *     Use WMI_PEER_STATS_ML_PEER_LINK_INFO_LOGICAL_LINK_SET,GET macros.
14166      *   - flag denoting if MLO-link is master link or not
14167      *     Use WMI_PEER_STATS_ML_PEER_LINK_INFO_MASTER_LINK_SET,GET macros.
14168      *   - flag denoting if MLO-link is anchor link or not
14169      *     Use WMI_PEER_STATS_ML_PEER_LINK_INFO_ANCHOR_LINK_SET,GET macros.
14170      *   - flag denoting if MLO-link is initialized or not
14171      *     Use WMI_PEER_STATS_ML_PEER_LINK_INFO_INIT_SET,GET macros.
14172      */
14173     A_UINT32 opaque_debug_ml_link_info_flags[WMI_MAX_MLO_LINKS];
14174     /* opaque_debug_ml_link_info_id:
14175      * Part of link_info in wlan_peer_ml_info_t.
14176      * This word contains the following bitfields:
14177      *   - sw_peer_id corresponding to the link
14178      *     Use WMI_PEER_STATS_ML_PEER_LINK_INFO_PEER_ID_SET,GET macros.
14179      *   - vdev id corresponding to the link
14180      *     Use WMI_PEER_STATS_ML_PEER_LINK_INFO_VDEV_ID_SET,GET macros.
14181      */
14182     A_UINT32 opaque_debug_ml_link_info_id[WMI_MAX_MLO_LINKS];
14183     /* MLO link info primary tid mask, part of link_info in wlan_peer_ml_info_t */
14184     A_UINT32 opaque_debug_ml_link_info_pri_tidmask[WMI_MAX_MLO_LINKS];
14185     /* opaque_debug_rc_node_params:
14186      * Part of struct TX_PEER_PARAMS.
14187      * This word contains the following bitfields:
14188      *   - NSS of the peer in 160MHZ
14189      *     Use WMI_PEER_STATS_NSS_160_SET,GET macros.
14190      *   - phymode of the peer - refer enum WLAN_PHY_MODE
14191      *     Use WMI_PEER_STATS_RC_PHYMODE_SET,GET macros.
14192      *   - legacy rate set for the peer
14193      *     Use WMI_PEER_STATS_LEGACY_RATE_SET,GET macros.
14194      */
14195     A_UINT32 opaque_debug_rc_node_params;
14196     /* opaque_debug_rc_vht_mcs_set:
14197      * Rate node param - negotiated VHT MCS map,
14198      * part of struct TX_PEER_PARAMS
14199      */
14200     A_UINT32 opaque_debug_rc_vht_mcs_set;
14201     /* opaque_debug_rc_node_params1:
14202      * Part of link_info in wlan_peer_ml_info_t.
14203      * This word contains the following bitfields:
14204      *   - Minimum data rate set for the peer in Mbps
14205      *     Use WMI_PEER_STATS_MIN_DATA_RATE_SET,GET macros.
14206      *   - Max VHT rate set for the peer
14207      *     Use WMI_PEER_STATS_VHT_MAX_RATE_SET,GET macros.
14208      *   - Max VHT streams set for the peer
14209      *     Use WMI_PEER_STATS_VHT_MAX_STREAMS_SET,GET macros.
14210      *   - BSS - Channel frequency set for the peer in MHz
14211      *     Use WMI_PEER_STATS_RC_CHAN_FREQ_SET,GET macros.
14212      */
14213     A_UINT32 opaque_debug_rc_node_params1;
14214     /* opaque_debug_he_mcs_nss_set_tx,_rx:
14215      * Rate node param - negotiated HE MCS tx+rx maps,
14216      * part of struct TX_PEER_PARAMS.
14217      * The lower 8 bits (bits 23:16) within the upper 16 bits indicate
14218      * MCS 12/13 enablement for BW <= 80MHz; the upper 8 bits (bits 31:24)
14219      * within the 16 bits indicate MCS 12/13 enablement for BW > 80MHz.
14220      * The 16 bits for the index values are within the upper bits (bits 31:16)
14221      * of a 32-bit word. and WMI_HE_MAP_COUNT is based on HE_MCS_MAP_CNT
14222      * in ieee80211_defs.h.
14223      */
14224     A_UINT32 opaque_debug_he_mcs_nss_set_tx[WMI_HE_MAP_COUNT];
14225     A_UINT32 opaque_debug_he_mcs_nss_set_rx[WMI_HE_MAP_COUNT];
14226     /* opaque_debug_eht_mcs_nss_set_tx,_rx:
14227      * Rate node param - negotiated EHT MCS tx+rx maps,
14228      * part of struct TX_PEER_PARAMS.
14229      * B0-B3 indicates max NSS that supports mcs 0-7
14230      * B4-B7 indicates max NSS that supports mcs 8-9
14231      * B8-B11 indicates max NSS that supports mcs 10-11
14232      * B12-B15 indicates max NSS that supports mcs 12-13
14233      * B16-B31 reserved.
14234      * WMI_EHT_MAP_COUNT is based on EHT_MCS_MAP_CNT in ieee80211_defs.h.
14235      */
14236     A_UINT32 opaque_debug_eht_mcs_nss_set_tx[WMI_EHT_MAP_COUNT];
14237     A_UINT32 opaque_debug_eht_mcs_nss_set_rx[WMI_EHT_MAP_COUNT];
14238     /* opaque_debug_rc_user_start_mcs_rate:
14239      * Rate node user_start_rate is MCS value set based on phymode.
14240      * For possible values refer "INITIAL_" macros in ratectrl.h.
14241      * Part of struct TX_PEER_PARAMS.
14242      * This is the starting value of MCS that was used by rate control
14243      * for the first transmissions to the peer, until PER information
14244      * from the peer allowed the rate control algorithm to determine
14245      * the suitable MCS.
14246      */
14247     A_UINT32 opaque_debug_rc_user_start_mcs_rate;
14248     /*
14249      * The following 4 opaque_debug_field variables are provided purely
14250      * for debugging by technicians who have outside knowledge of what
14251      * kind of values the target has placed into these fields.
14252      * They are not to be interpreted by the host driver in any manner.
14253      */
14254     A_UINT32 opaque_debug_field_1;
14255     A_UINT32 opaque_debug_field_2;
14256     A_UINT32 opaque_debug_field_3;
14257     A_UINT32 opaque_debug_field_4;
14258 } wmi_ctrl_path_peer_stats_struct;
14259 
14260 #define WMI_PEER_STATS_SM_MASK_SET(flag, val) \
14261     WMI_SET_BITS(flag, 0, 16, val)
14262 #define WMI_PEER_STATS_SM_MASK_GET(flag) \
14263     WMI_GET_BITS(flag, 0, 16)
14264 #define WMI_PEER_STATS_EOSP_RETRY_CNT_SET(flag, val) \
14265     WMI_SET_BITS(flag, 16, 8, val)
14266 #define WMI_PEER_STATS_EOSP_RETRY_CNT_GET(flag) \
14267     WMI_GET_BITS(flag, 16, 8)
14268 /* bits 31:24 unused/reserved */
14269 
14270 #define WMI_PEER_STATS_ASSOCIATE_ID_SET(flag, val) \
14271     WMI_SET_BITS(flag, 0, 16, val)
14272 #define WMI_PEER_STATS_ASSOCIATE_ID_GET(flag) \
14273     WMI_GET_BITS(flag, 0, 16)
14274 #define WMI_PEER_STATS_USAGE_CNT_SET(flag, val) \
14275     WMI_SET_BITS(flag, 16, 16, val)
14276 #define WMI_PEER_STATS_USAGE_CNT_GET(flag) \
14277     WMI_GET_BITS(flag, 16, 16)
14278 
14279 #define WMI_PEER_STATS_DEF_CAPS_SET(flag, val) \
14280     WMI_SET_BITS(flag, 0, 16, val)
14281 #define WMI_PEER_STATS_DEF_CAPS_GET(flag) \
14282     WMI_GET_BITS(flag, 0, 16)
14283 #define WMI_PEER_STATS_HT_CAPS_SET(flag, val) \
14284     WMI_SET_BITS(flag, 16, 16, val)
14285 #define WMI_PEER_STATS_HT_CAPS_GET(flag) \
14286     WMI_GET_BITS(flag, 16, 16)
14287 
14288 #define WMI_PEER_STATS_INACT_GEN_SET(flag, val) \
14289     WMI_SET_BITS(flag, 0, 16, val)
14290 #define WMI_PEER_STATS_INACT_GEN_GET(flag) \
14291     WMI_GET_BITS(flag, 0, 16)
14292 #define WMI_PEER_STATS_DATA_INACT_GEN_SET(flag, val) \
14293     WMI_SET_BITS(flag, 16, 16, val)
14294 #define WMI_PEER_STATS_DATA_INACT_GEN_GET(flag) \
14295     WMI_GET_BITS(flag, 16, 16)
14296 
14297 #define WMI_PEER_STATS_PEER_TYPE_SET(flag, val) \
14298     WMI_SET_BITS(flag, 0, 8, val)
14299 #define WMI_PEER_STATS_PEER_TYPE_GET(flag) \
14300     WMI_GET_BITS(flag, 0, 8)
14301 #define WMI_PEER_STATS_MAC_ID_SET(flag, val) \
14302     WMI_SET_BITS(flag, 8, 8, val)
14303 #define WMI_PEER_STATS_MAC_ID_GET(flag) \
14304     WMI_GET_BITS(flag, 8, 8)
14305 #define WMI_PEER_STATS_PEER_ID_SET(flag, val) \
14306     WMI_SET_BITS(flag, 16, 16, val)
14307 #define WMI_PEER_STATS_PEER_ID_GET(flag) \
14308     WMI_GET_BITS(flag, 16, 16)
14309 
14310 #define WMI_PEER_STATS_BSS_NON_DATA_RC_SET(flag, val) \
14311     WMI_SET_BITS(flag, 0, 8, val)
14312 #define WMI_PEER_STATS_BSS_NON_DATA_RC_GET(flag) \
14313     WMI_GET_BITS(flag, 0, 8)
14314 #define WMI_PEER_STATS_CH_WIDTH_SET(flag, val) \
14315     WMI_SET_BITS(flag, 8, 8, val)
14316 #define WMI_PEER_STATS_CH_WIDTH_GET(flag) \
14317     WMI_GET_BITS(flag, 8, 8)
14318 #define WMI_PEER_STATS_RX_MCS_SET(flag, val) \
14319     WMI_SET_BITS(flag, 16, 8, val)
14320 #define WMI_PEER_STATS_RX_MCS_GET(flag) \
14321     WMI_GET_BITS(flag, 16, 8)
14322 /* bits 31:24 unused/reserved */
14323 
14324 #define WMI_PEER_STATS_DELETE_ALL_FLAG_SET(flag, val) \
14325     WMI_SET_BITS(flag, 0, 8, val)
14326 #define WMI_PEER_STATS_DELETE_ALL_FLAG_GET(flag) \
14327     WMI_GET_BITS(flag, 0, 8)
14328 #define WMI_PEER_STATS_RC4_REKEY_CNT_SET(flag, val) \
14329     WMI_SET_BITS(flag, 8, 8, val)
14330 #define WMI_PEER_STATS_RC4_REKEY_CNT_GET(flag) \
14331     WMI_GET_BITS(flag, 8, 8)
14332 /* bits 31:16 unused/reserved */
14333 
14334 #define WMI_PEER_STATS_TWT_AP_FLAGS_SET(flag, val) \
14335     WMI_SET_BITS(flag, 0, 16, val)
14336 #define WMI_PEER_STATS_TWT_AP_FLAGS_GET(flag) \
14337     WMI_GET_BITS(flag, 0, 16)
14338 #define WMI_PEER_STATS_TWT_AP_SESSION_CNT_SET(flag, val) \
14339     WMI_SET_BITS(flag, 16, 8, val)
14340 #define WMI_PEER_STATS_TWT_AP_SESSION_CNT_GET(flag) \
14341     WMI_GET_BITS(flag, 16, 8)
14342 #define WMI_PEER_STATS_TWT_FRM_RETRY_SET(flag, val) \
14343     WMI_SET_BITS(flag, 24, 8, val)
14344 #define WMI_PEER_STATS_TWT_FRM_RETRY_GET(flag) \
14345     WMI_GET_BITS(flag, 24, 8)
14346 
14347 #define WMI_PEER_STATS_TWT_UL_TRIGGER_SET(flag, val) \
14348     WMI_SET_BITS(flag, 0, 8, val)
14349 #define WMI_PEER_STATS_TWT_UL_TRIGGER_GET(flag) \
14350     WMI_GET_BITS(flag, 0, 8)
14351 #define WMI_PEER_STATS_TWT_BC_SESSION_SET(flag, val) \
14352     WMI_SET_BITS(flag, 8, 8, val)
14353 #define WMI_PEER_STATS_TWT_BC_SESSION_GET(flag) \
14354     WMI_GET_BITS(flag, 8, 8)
14355 #define WMI_PEER_STATS_TWT_PENDING_REPORT_SET(flag, val) \
14356     WMI_SET_BITS(flag, 16, 8, val)
14357 #define WMI_PEER_STATS_TWT_PENDING_REPORT_GET(flag) \
14358     WMI_GET_BITS(flag, 16, 8)
14359 #define WMI_PEER_STATS_TWT_FLOW_IDS_SET(flag, val) \
14360     WMI_SET_BITS(flag, 24, 8, val)
14361 #define WMI_PEER_STATS_TWT_FLOW_IDS_GET(flag) \
14362     WMI_GET_BITS(flag, 24, 8)
14363 
14364 #define WMI_PEER_STATS_ADDBBA_TX_MODE_SET(flag, val) \
14365     WMI_SET_BITS(flag, 0, 16, val)
14366 #define WMI_PEER_STATS_ADDBBA_TX_MODE_GET(flag) \
14367     WMI_GET_BITS(flag, 0, 16)
14368 #define WMI_PEER_STATS_ADDBBA_RESP_MODE_SET(flag, val) \
14369     WMI_SET_BITS(flag, 16, 16, val)
14370 #define WMI_PEER_STATS_ADDBBA_RESP_MODE_GET(flag) \
14371     WMI_GET_BITS(flag, 16, 16)
14372 
14373 #define WMI_PEER_STATS_MAX_AMSDU_SIZE_SET(flag, val) \
14374     WMI_SET_BITS(flag, 0, 16, val)
14375 #define WMI_PEER_STATS_MAX_AMSDU_SIZE_GET(flag) \
14376     WMI_GET_BITS(flag, 0, 16)
14377 /* bits 31:16 unused/reserved */
14378 
14379 #define WMI_PEER_STATS_TX_FRAME_CTRL_SET(flag, val) \
14380     WMI_SET_BITS(flag, 0, 16, val)
14381 #define WMI_PEER_STATS_TX_FRAME_CTRL_GET(flag) \
14382     WMI_GET_BITS(flag, 0, 16)
14383 #define WMI_PEER_STATS_TX_QOS_CTRL_SET(flag, val) \
14384     WMI_SET_BITS(flag, 16, 16, val)
14385 #define WMI_PEER_STATS_TX_QOS_CTRL_GET(flag) \
14386     WMI_GET_BITS(flag, 16, 16)
14387 
14388 #define WMI_PEER_STATS_CONSEC_FAIL_SET(flag, val) \
14389     WMI_SET_BITS(flag, 0, 16, val)
14390 #define WMI_PEER_STATS_CONSEC_FAIL_GET(flag) \
14391     WMI_GET_BITS(flag, 0, 16)
14392 #define WMI_PEER_STATS_SUBFRAME_SIZE_SET(flag, val) \
14393     WMI_SET_BITS(flag, 16, 16, val)
14394 #define WMI_PEER_STATS_SUBFRAME_SIZE_GET(flag) \
14395     WMI_GET_BITS(flag, 16, 16)
14396 
14397 #define WMI_PEER_STATS_TX_FAIL_CNT_SET(flag, val) \
14398     WMI_SET_BITS(flag, 0, 16, val)
14399 #define WMI_PEER_STATS_TX_FAIL_CNT_GET(flag) \
14400     WMI_GET_BITS(flag, 0, 16)
14401 #define WMI_PEER_STATS_TX_PARTIAL_AID_SET(flag, val) \
14402     WMI_SET_BITS(flag, 16, 16, val)
14403 #define WMI_PEER_STATS_TX_PARTIAL_AID_GET(flag) \
14404     WMI_GET_BITS(flag, 16, 16)
14405 
14406 #define WMI_PEER_STATS_MAX_NSS_SET(flag, val) \
14407     WMI_SET_BITS(flag, 0, 8, val)
14408 #define WMI_PEER_STATS_MAX_NSS_GET(flag) \
14409     WMI_GET_BITS(flag, 0, 8)
14410 /* bits 31:8 unused/reserved */
14411 
14412 #define WMI_PEER_STATS_DEL_RESP_TO_HOST_SET(flag, val) \
14413     WMI_SET_BITS(flag, 0, 1, val)
14414 #define WMI_PEER_STATS_DEL_RESP_TO_HOST_GET(flag) \
14415     WMI_GET_BITS(flag, 0, 1)
14416 #define WMI_PEER_STATS_DELETE_IN_PROGRESS_SET(flag, val) \
14417     WMI_SET_BITS(flag, 1, 1, val)
14418 #define WMI_PEER_STATS_DELETE_IN_PROGRESS_GET(flag) \
14419     WMI_GET_BITS(flag, 1, 1)
14420 #define WMI_PEER_STATS_MIGRATION_IN_PROGRESS_SET(flag, val) \
14421     WMI_SET_BITS(flag, 2, 1, val)
14422 #define WMI_PEER_STATS_MIGRATION_IN_PROGRESS_GET(flag) \
14423     WMI_GET_BITS(flag, 2, 1)
14424 #define WMI_PEER_STATS_CONN_STATE_SET(flag, val) \
14425     WMI_SET_BITS(flag, 3, 4, val)
14426 #define WMI_PEER_STATS_CONN_STATE_GET(flag) \
14427     WMI_GET_BITS(flag, 3, 4)
14428 #define WMI_PEER_STATS_TX_CHAIN_MASK_160_SET(flag, val) \
14429     WMI_SET_BITS(flag, 8, 8, val)
14430 #define WMI_PEER_STATS_TX_CHAIN_MASK_160_GET(flag) \
14431     WMI_GET_BITS(flag, 8, 8)
14432 #define WMI_PEER_STATS_TX_CHAIN_MASK_SET(flag, val) \
14433     WMI_SET_BITS(flag, 16, 8, val)
14434 #define WMI_PEER_STATS_TX_CHAIN_MASK_GET(flag) \
14435     WMI_GET_BITS(flag, 16, 8)
14436 #define WMI_PEER_STATS_ASSOC_CHAIN_MASK_SET(flag, val) \
14437     WMI_SET_BITS(flag, 24, 8, val)
14438 #define WMI_PEER_STATS_ASSOC_CHAIN_MASK_GET(flag) \
14439     WMI_GET_BITS(flag, 24, 8)
14440 
14441 #define WMI_PEER_STATS_QOS_NULL_OVER_WMI_SET(flag, val) \
14442     WMI_SET_BITS(flag, 0, 1, val)
14443 #define WMI_PEER_STATS_QOS_NULL_OVER_WMI_GET(flag) \
14444     WMI_GET_BITS(flag, 0, 1)
14445 #define WMI_PEER_STATS_NEW_ASSOC_SET(flag, val) \
14446     WMI_SET_BITS(flag, 1, 1, val)
14447 #define WMI_PEER_STATS_NEW_ASSOC_GET(flag) \
14448     WMI_GET_BITS(flag, 1, 1)
14449 #define WMI_PEER_STATS_TWT_FILT_FLAG_SET(flag, val) \
14450     WMI_SET_BITS(flag, 2, 1, val)
14451 #define WMI_PEER_STATS_TWT_FILT_FLAG_GET(flag) \
14452     WMI_GET_BITS(flag, 2, 1)
14453 #define WMI_PEER_STATS_TWT_REG_FLAG_SET(flag, val) \
14454     WMI_SET_BITS(flag, 3, 1, val)
14455 #define WMI_PEER_STATS_TWT_REG_FLAG_GET(flag) \
14456     WMI_GET_BITS(flag, 3, 1)
14457 #define WMI_PEER_STATS_WMM_UL_TRIG_FLAG_SET(flag, val) \
14458     WMI_SET_BITS(flag, 4, 1, val)
14459 #define WMI_PEER_STATS_WMM_UL_TRIG_FLAG_GET(flag) \
14460     WMI_GET_BITS(flag, 4, 1)
14461 #define WMI_PEER_STATS_ACTIVE_NOT_BA_TID_SET(flag, val) \
14462     WMI_SET_BITS(flag, 5, 4, val)
14463 #define WMI_PEER_STATS_ACTIVE_NOT_BA_TID_GET(flag) \
14464     WMI_GET_BITS(flag, 5, 4)
14465 /* bits 31:10 unused/reserved */
14466 
14467 #define WMI_PEER_STATS_NUM_LINKS_SET(flag, val) \
14468     WMI_SET_BITS(flag, 0, 2, val)
14469 #define WMI_PEER_STATS_NUM_LINKS_GET(flag) \
14470     WMI_GET_BITS(flag, 0, 2)
14471 #define WMI_PEER_STATS_ML_PEER_ID_SET(flag, val) \
14472     WMI_SET_BITS(flag, 2, 12, val)
14473 #define WMI_PEER_STATS_ML_PEER_ID_GET(flag) \
14474     WMI_GET_BITS(flag, 2, 12)
14475 #define WMI_PEER_STATS_PRI_LINK_ID_SET(flag, val) \
14476     WMI_SET_BITS(flag, 14, 3, val)
14477 #define WMI_PEER_STATS_PRI_LINK_ID_GET(flag) \
14478     WMI_GET_BITS(flag, 14, 3)
14479 #define WMI_PEER_STATS_PRI_CHIP_ID_SET(flag, val) \
14480     WMI_SET_BITS(flag, 17, 2, val)
14481 #define WMI_PEER_STATS_PRI_CHIP_ID_GET(flag) \
14482     WMI_GET_BITS(flag, 17, 2)
14483 #define WMI_PEER_STATS_LINK_INIT_CNT_SET(flag, val) \
14484     WMI_SET_BITS(flag, 19, 3, val)
14485 #define WMI_PEER_STATS_LINK_INIT_CNT_GET(flag) \
14486     WMI_GET_BITS(flag, 19, 3)
14487 #define WMI_PEER_STATS_NUM_LOCAL_LINKS_SET(flag, val) \
14488     WMI_SET_BITS(flag, 22, 2, val)
14489 #define WMI_PEER_STATS_NUM_LOCAL_LINKS_GET(flag) \
14490     WMI_GET_BITS(flag, 22, 2)
14491 #define WMI_PEER_STATS_CHIPS_BITMAP_SET(flag, val) \
14492     WMI_SET_BITS(flag, 24, 8, val)
14493 #define WMI_PEER_STATS_CHIPS_BITMAP_GET(flag) \
14494     WMI_GET_BITS(flag, 24, 8)
14495 
14496 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_VALID_SET(flag, val) \
14497     WMI_SET_BITS(flag, 0, 1, val)
14498 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_VALID_GET(flag) \
14499     WMI_GET_BITS(flag, 0, 1)
14500 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_ACTIVE_SET(flag, val) \
14501     WMI_SET_BITS(flag, 1, 1, val)
14502 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_ACTIVE_GET(flag) \
14503     WMI_GET_BITS(flag, 1, 1)
14504 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_PRI_SET(flag, val) \
14505     WMI_SET_BITS(flag, 2, 1, val)
14506 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_PRI_GET(flag) \
14507     WMI_GET_BITS(flag, 2, 1)
14508 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_ASSOC_LINK_SET(flag, val) \
14509     WMI_SET_BITS(flag, 3, 1, val)
14510 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_ASSOC_LINK_GET(flag) \
14511     WMI_GET_BITS(flag, 3, 1)
14512 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_CHIP_ID_SET(flag, val) \
14513     WMI_SET_BITS(flag, 4, 3, val)
14514 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_CHIP_ID_GET(flag) \
14515     WMI_GET_BITS(flag, 4, 3)
14516 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_IEEE_LINK_SET(flag, val) \
14517     WMI_SET_BITS(flag, 7, 8, val)
14518 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_IEEE_LINK_GET(flag) \
14519     WMI_GET_BITS(flag, 7, 8)
14520 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_HW_LINK_SET(flag, val) \
14521     WMI_SET_BITS(flag, 15, 3, val)
14522 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_HW_LINK_GET(flag) \
14523     WMI_GET_BITS(flag, 15, 3)
14524 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_LOGICAL_LINK_SET(flag, val) \
14525     WMI_SET_BITS(flag, 18, 2, val)
14526 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_LOGICAL_LINK_GET(flag) \
14527     WMI_GET_BITS(flag, 18, 2)
14528 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_MASTER_LINK_SET(flag, val) \
14529     WMI_SET_BITS(flag, 20, 1, val)
14530 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_MASTER_LINK_GET(flag) \
14531     WMI_GET_BITS(flag, 20, 1)
14532 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_ANCHOR_LINK_SET(flag, val) \
14533     WMI_SET_BITS(flag, 21, 1, val)
14534 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_ANCHOR_LINK_GET(flag) \
14535     WMI_GET_BITS(flag, 21, 1)
14536 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_INIT_SET(flag, val) \
14537     WMI_SET_BITS(flag, 22, 1, val)
14538 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_INIT_GET(flag) \
14539     WMI_GET_BITS(flag, 22, 1)
14540 /* bits 31:23 unused/reserved */
14541 
14542 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_PEER_ID_SET(flag, val) \
14543     WMI_SET_BITS(flag, 0, 16, val)
14544 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_PEER_ID_GET(flag) \
14545     WMI_GET_BITS(flag, 0, 16)
14546 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_VDEV_ID_SET(flag, val) \
14547     WMI_SET_BITS(flag, 16, 8, val)
14548 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_VDEV_ID_GET(flag) \
14549     WMI_GET_BITS(flag, 16, 8)
14550 /* bits 31:24 unused/reserved */
14551 
14552 #define WMI_PEER_STATS_NSS_160_SET(flag, val) \
14553     WMI_SET_BITS(flag, 0, 8, val)
14554 #define WMI_PEER_STATS_NSS_160_GET(flag) \
14555     WMI_GET_BITS(flag, 0, 8)
14556 #define WMI_PEER_STATS_RC_PHYMODE_SET(flag, val) \
14557     WMI_SET_BITS(flag, 8, 8, val)
14558 #define WMI_PEER_STATS_RC_PHYMODE_GET(flag) \
14559     WMI_GET_BITS(flag, 8, 8)
14560 #define WMI_PEER_STATS_LEGACY_RATE_SET(flag, val) \
14561     WMI_SET_BITS(flag, 16, 16, val)
14562 #define WMI_PEER_STATS_LEGACY_RATE_GET(flag) \
14563     WMI_GET_BITS(flag, 16, 16)
14564 
14565 #define WMI_PEER_STATS_MIN_DATA_RATE_SET(flag, val) \
14566     WMI_SET_BITS(flag, 0, 8, val)
14567 #define WMI_PEER_STATS_MIN_DATA_RATE_GET(flag) \
14568     WMI_GET_BITS(flag, 0, 8)
14569 #define WMI_PEER_STATS_VHT_MAX_RATE_SET(flag, val) \
14570     WMI_SET_BITS(flag, 8, 4, val)
14571 #define WMI_PEER_STATS_VHT_MAX_RATE_GET(flag) \
14572     WMI_GET_BITS(flag, 8, 4)
14573 #define WMI_PEER_STATS_VHT_MAX_STREAMS_SET(flag, val) \
14574     WMI_SET_BITS(flag, 12, 4, val)
14575 #define WMI_PEER_STATS_VHT_MAX_STREAMS_GET(flag) \
14576     WMI_GET_BITS(flag, 12, 4)
14577 #define WMI_PEER_STATS_RC_CHAN_FREQ_SET(flag, val) \
14578     WMI_SET_BITS(flag, 16, 16, val)
14579 #define WMI_PEER_STATS_RC_CHAN_FREQ_GET(flag) \
14580     WMI_GET_BITS(flag, 16, 16)
14581 
14582 
14583 typedef struct {
14584     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_cfr_stats_struct */
14585     A_UINT32 tlv_header;
14586     /* blanking_mode:
14587      * blanking configuration. Refer to WMI_SCAN_BLANKING_MODE
14588      */
14589     A_UINT32 blanking_mode;
14590     /* is_blanking_enabled:
14591      * current blanking status. 0 = disabled, 1 = enabled
14592      */
14593     A_UINT32 is_blanking_enabled;
14594     A_UINT32 gate_2g_enabled; /* 2.4GHZ gate pin state */
14595     A_UINT32 gate_5g_enabled; /* 5GHz gate pin state */
14596     A_UINT32 gate_6g_enabled; /* 6GHz gate pin state */
14597     A_UINT32 blanking_count; /* scan radio blanking count */
14598     A_UINT32 blanking_duration; /* scan radio blanking duration in us */
14599 } wmi_ctrl_path_blanking_stats_struct;
14600 
14601 typedef struct {
14602     /** TLV tag and len; tag equals
14603     *  WMITLV_TAG_STRUC_wmi_ctrl_path_stats_event_fixed_param */
14604     A_UINT32 tlv_header;
14605     /** Request ID */
14606     A_UINT32 request_id;
14607     /** more flag
14608      *  1 - More events sent after this event.
14609      *  0 - no more events after this event.
14610      */
14611     A_UINT32 more;
14612     /** status:
14613      * The status field's value shows whether the WMI_REQUEST_CTRL_PATH_STATS
14614      * request was completed successfully,
14615      *     0 - status is success
14616      *     1 - status is failure
14617      */
14618     A_UINT32 status;
14619     /** This TLV is (optionally) followed by TLV arrays containing
14620      *  different types of stats:
14621      *  1.  wmi_ctrl_path_pdev_stats_struct ctrl_path_pdev_stats[];
14622      *      This TLV array contains zero or more pdev stats instances.
14623      *  2.  wmi_vdev_extd_stats vdev_extd_stats[];
14624      *      This TLV array contains zero or more vdev_extd_stats instances.
14625      */
14626 } wmi_ctrl_path_stats_event_fixed_param;
14627 
14628 typedef struct {
14629     /** TLV tag and len; tag equals
14630      * WMITLV_TAG_STRUC_wmi_halphy_ctrl_path_stats_event_fixed_param
14631      */
14632     A_UINT32 tlv_header;
14633 
14634     /** Process id requested */
14635     A_UINT32 request_id;
14636 
14637     /* end_of_event - single event or Multiple Event */
14638     A_UINT32 end_of_event;
14639 
14640     /*
14641      * event_count - If Multiple Events are send, this is to identify
14642      * particular event out of Multiple Events that are send to host
14643      */
14644     A_UINT32 event_count;
14645 
14646     /** Pdev id requested */
14647     A_UINT32 pdev_id;
14648 } wmi_halphy_ctrl_path_stats_event_fixed_param;
14649 
14650 typedef struct {
14651     /** TLV tag and len; tag equals
14652      *  WMITLV_TAG_STRUC_wmi_radio_chan_stats */
14653     A_UINT32 tlv_header;
14654     /** primary channel freq of the channel whose stats is sent */
14655     A_UINT32 chan_mhz;
14656     /** accumulation of time the radio is tuned to this channel,
14657      *  in units of microseconds */
14658     A_UINT32 on_chan_us;
14659     /** accumulation of the TX PPDU duration over the measurement period,
14660      *  in units of microseconds */
14661     A_UINT32 tx_duration_us;
14662     /** accumulation of the RX PPDU duration over the measurement period,
14663      *  in units of microseconds */
14664     A_UINT32 rx_duration_us;
14665     /** ratio of channel busy time to on_chan_us, in units of percent */
14666     A_UINT32 chan_busy_ratio;
14667     /** ratio of on_chan_us to the measurement period, in units of percent */
14668     A_UINT32 on_chan_ratio;
14669     /** measurement period, in units of microseconds */
14670     A_UINT32 measurement_period_us;
14671     /** MPDUs transmitted on this channel */
14672     A_UINT32 tx_mpdus;
14673     /** MSDUs transmitted on this channel */
14674     A_UINT32 tx_msdus;
14675     /** MPDUS successfully received on this channel */
14676     A_UINT32 rx_succ_mpdus;
14677     /** Failed MPDUs (CRC failures) received on this channel */
14678     A_UINT32 rx_fail_mpdus;
14679 } wmi_radio_chan_stats;
14680 
14681 typedef struct {
14682     /** TLV tag and len; tag equals
14683      *  WMITLV_TAG_STRUC_wmi_radio_chan_stats_event_fixed_param */
14684     A_UINT32 tlv_header;
14685     /** number of channel stats in radio_chan_stats[] */
14686     A_UINT32 num_chans;
14687     /* This TLV is followed by another TLV of array of structs
14688      * wmi_radio_chan_stats radio_chan_stats[];
14689      */
14690 } wmi_radio_chan_stats_event_fixed_param;
14691 
14692 /**
14693  *  PDEV statistics
14694  *
14695  *  This struct incorporates the wlan_dbg_stats struct, which is
14696  *  conditionally defined, based on the AR900B flag.
14697  *  The below _v1 struct variant is the unconditional definition
14698  *  that matches what would be conditionally defined by builds that
14699  *  don't use the AR900B flag.  The _v2 struct variant is the
14700  *  unconditional definition that matches what would be conditionally
14701  *  defined by builds that use the AR900B flag.
14702  *  The _v2 struct def can be used within host or target builds
14703  *  that don't use the AR900B flag, but needs to interoperate with a
14704  *  target or host build that does use the AR900B flag.
14705  *  Similarly, the _v1 struct def can be used by a host or target build
14706  *  that does use the AR900B flag, but needs to interoperate with a
14707  *  target or host build that doesn't use the AR900B flag.
14708  *
14709  *  For backwards compatibility, wmi_pdev_stats is still (conditionally)
14710  *  defined, as an alias for either the _v1 or _v2 variant.
14711  */
14712 typedef struct {
14713     /** Channel noise floor */
14714     A_INT32 chan_nf;
14715     /** TX frame count */
14716     A_UINT32 tx_frame_count;
14717     /** RX frame count */
14718     A_UINT32 rx_frame_count;
14719     /** rx clear count */
14720     A_UINT32 rx_clear_count;
14721     /** cycle count */
14722     A_UINT32 cycle_count;
14723     /** Phy error count */
14724     A_UINT32 phy_err_count;
14725     /** Channel Tx Power */
14726     A_UINT32 chan_tx_pwr;
14727     /** WAL dbg stats */
14728     struct wlan_dbg_stats_v1 pdev_stats;
14729 } wmi_pdev_stats_v1;
14730 
14731 typedef struct {
14732     /** Channel noise floor */
14733     A_INT32 chan_nf;
14734     /** TX frame count */
14735     A_UINT32 tx_frame_count;
14736     /** RX frame count */
14737     A_UINT32 rx_frame_count;
14738     /** rx clear count */
14739     A_UINT32 rx_clear_count;
14740     /** cycle count */
14741     A_UINT32 cycle_count;
14742     /** Phy error count */
14743     A_UINT32 phy_err_count;
14744     /** Channel Tx Power */
14745     A_UINT32 chan_tx_pwr;
14746     /** WAL dbg stats */
14747     struct wlan_dbg_stats_v2 pdev_stats;
14748 } wmi_pdev_stats_v2;
14749 
14750 #if defined(AR900B)
14751 #define wmi_pdev_stats wmi_pdev_stats_v2
14752 #else
14753 #define wmi_pdev_stats wmi_pdev_stats_v1
14754 #endif
14755 
14756 /**
14757  *  pdev extension statistics
14758  */
14759 typedef struct {
14760     A_UINT32 tlv_header;
14761     /* pdev id */
14762     A_UINT32 pdev_id;
14763     /** my_rx_count
14764      * What portion of time, as measured by the MAC HW clock was occupied
14765      * by receiving PPDUs addressed to one of the vdevs within this pdev.
14766      */
14767     A_UINT32 my_rx_count;
14768     /** rx_matched_11ax_msdu_cnt
14769      * number of Rx 11ax MSDUs with matching BSS color counter
14770      * updated at EOP (end of packet)
14771      */
14772     A_UINT32 rx_matched_11ax_msdu_cnt;
14773     /** rx_other_11ax_msdu_cnt
14774      * number of Rx 11ax MSDUs with other BSS color counter updated at EOP
14775      * (end of packet)
14776      */
14777     A_UINT32 rx_other_11ax_msdu_cnt;
14778 } wmi_pdev_extd_stats;
14779 
14780 /**
14781  *  pdev telemetry statistics
14782  */
14783 typedef struct{
14784     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_telemetry_stats */
14785     A_UINT32 pdev_id;
14786     /*
14787      * Average channel latency per AC, units in micro seconds.
14788      * avg_chan_lat_per_ac[0] : AC_VO
14789      * avg_chan_lat_per_ac[1] : AC_VI
14790      * avg_chan_lat_per_ac[2] : AC_BE
14791      * avg_chan_lat_per_ac[3] : AC_BK
14792      */
14793     A_UINT32 avg_chan_lat_per_ac[WMI_AC_MAX];
14794     /*
14795      * Percentage of air time available for each AC, units in percentage.
14796      * BIT[0-7]   : AC_BE
14797      * BIT[8-15]  : AC_BK
14798      * BIT[16-23] : AC_VI
14799      * BIT[24-31] : AC_VO
14800      * Please refer to WMI_ESP_ESTIMATE_GET_* and WMI_ESP_ESTIMATE_SET_* macros
14801      * to retrieve values for each access category in estimated_air_time_per_ac.
14802      */
14803     A_UINT32 estimated_air_time_per_ac;
14804 } wmi_pdev_telemetry_stats;
14805 
14806 /**
14807  *  VDEV statistics
14808  *  @todo
14809  *  add all VDEV stats here
14810  */
14811 
14812 typedef struct {
14813     A_INT32 bcn_snr;
14814     A_INT32 dat_snr;
14815 } wmi_snr_info;
14816 
14817 typedef struct {
14818     /** unique id identifying the VDEV, generated by the caller */
14819     A_UINT32 vdev_id;
14820     wmi_snr_info vdev_snr;
14821     A_UINT32 tx_frm_cnt[WLAN_MAX_AC]; /* Total number of packets(per AC) that were successfully transmitted(with and without retries, including multi-cast, broadcast) */
14822     A_UINT32 rx_frm_cnt; /* Total number of packets that were successfully received (after appropriate filter rules including multi-cast, broadcast) */
14823     A_UINT32 multiple_retry_cnt[WLAN_MAX_AC]; /* The number of MSDU packets and MMPDU frames per AC
14824      that the 802.11 station successfully transmitted after more than one retransmission attempt */
14825     A_UINT32 fail_cnt[WLAN_MAX_AC]; /* Total number packets(per AC) failed to transmit */
14826     A_UINT32 rts_fail_cnt; /* Total number of RTS/CTS sequence failures for transmission of a packet */
14827     A_UINT32 rts_succ_cnt; /* Total number of RTS/CTS sequence success for transmission of a packet */
14828     A_UINT32 rx_err_cnt; /* The receive error count. HAL will provide the RxP FCS error global */
14829     A_UINT32 rx_discard_cnt; /* The sum of the receive error count and dropped-receive-buffer error count. (FCS error) */
14830     A_UINT32 ack_fail_cnt; /* Total number packets failed transmit because of no ACK from the remote entity */
14831     A_UINT32 tx_rate_history[MAX_TX_RATE_VALUES];/*History of last ten transmit rate, in units of 500 kbit/sec */
14832     A_UINT32 bcn_rssi_history[MAX_RSSI_VALUES];/*History of last ten Beacon RSSI of the connected Bss */
14833 } wmi_vdev_stats;
14834 
14835 /*
14836  * vdev ext stats with additional bcn stats
14837  * (Due to backward compatibility requirements, these new stats fields cannot be
14838  * added inside wmi_vdev_stats.)
14839  */
14840 typedef struct {
14841     A_UINT32 vdev_id;
14842     A_UINT32 tx_bcn_succ_cnt; /* Total number of beacon frame transmitted successfully */
14843     A_UINT32 tx_bcn_outage_cnt; /* Total number of failed beacons */
14844 } wmi_bcn_stats;
14845 
14846 #define WMI_VDEV_STATS_FLAGS_LINK_ACTIVE_FLAG_IS_VALID_BIT 0
14847 #define WMI_VDEV_STATS_FLAGS_LINK_ACTIVE_FLAG_IS_VALID_MASK \
14848     (1 << WMI_VDEV_STATS_FLAGS_LINK_ACTIVE_FLAG_IS_VALID_BIT)
14849 
14850 #define WMI_VDEV_STATS_FLAGS_IS_LINK_ACTIVE_BIT 1
14851 #define WMI_VDEV_STATS_FLAGS_IS_LINK_ACTIVE_MASK \
14852     (1 << WMI_VDEV_STATS_FLAGS_IS_LINK_ACTIVE_BIT)
14853 
14854 /**
14855  *  vdev extension statistics
14856  */
14857 typedef struct {
14858     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_vdev_extd_stats */
14859     A_UINT32 tlv_header;
14860     /* vdev id */
14861     A_UINT32 vdev_id;
14862     /* Total number of Fils Discovery frames transmitted successfully */
14863     A_UINT32 fd_succ_cnt;
14864     /* Total number of Fils Discovery frames failed */
14865     A_UINT32 fd_fail_cnt;
14866     /* Total number of unsolicited probe response frames transmitted successfully */
14867     A_UINT32 unsolicited_prb_succ_cnt;
14868     /* Total number of unsolicited probe response frames failed */
14869     A_UINT32 unsolicited_prb_fail_cnt;
14870     /* vdev info flags:
14871      * bit 0: WMI_VDEV_STATS_FLAGS_LINK_ACTIVE_FLAG_IS_VALID,
14872      *     0: the "is link active" flag is not valid
14873      *     1: the "is link active" flag is valid
14874      * bit 1: WMI_VDEV_STATS_FLAGS_IS_LINK_ACTIVE,
14875      *     1:link_active; 0:link_inactive
14876      * Refer to WMI_VDEV_STATS_FLAGS_ defs.
14877      */
14878     A_UINT32 flags;
14879     A_INT32 vdev_tx_power; /* dBm units */
14880 } wmi_vdev_extd_stats;
14881 
14882 /**
14883  * Vdev debug stats to be used for wmi control path stats.
14884  * This is an extension to vdev_extd_stats,
14885  * vdev_extd_stats display is part of apstats.
14886  */
14887 typedef struct {
14888     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_vdev_stats_struct */
14889     A_UINT32 tlv_header;
14890     /* vdev id */
14891     A_UINT32 vdev_id;
14892     /** opaque_debug_wal_vdev_flags:
14893      * This will contain the value from wal_vdev wal vdev flags for vdev state
14894      */
14895     A_UINT32 opaque_debug_wal_vdev_flags;
14896     /** control flags for this vdev */
14897     A_UINT32 opaque_debug_vdev_flags;
14898     /**  vdevid of transmitted AP (mbssid case) */
14899     A_UINT32 opaque_debug_vdevid_trans;
14900     /** opaque_debug_profile_idx:
14901      * the profile index of the connected non-trans ap (mbssid case).
14902      * 0 means invalid.
14903      */
14904     A_UINT32 opaque_debug_profile_idx;
14905     /** opaque_debug_profile_num:
14906      * the total profile numbers of non-trans aps (mbssid case).
14907      * 0 means legacy AP.
14908      */
14909     A_UINT32 opaque_debug_profile_num;
14910     /* Contains the value of multi_vdev_restart status */
14911     A_UINT32 opaque_debug_multi_vdev_restart;
14912     /* Contains the value of created mac_id from wal_vdev */
14913     A_UINT32 opaque_debug_created_mac_id;
14914     /* Contains the value of consecutive count of the leaky AP */
14915     A_UINT32 opaque_debug_consec_detect_leaky_ap_cnt;
14916     /* Contains the value of Vdev manager debug flags */
14917     A_UINT32 opaque_debug_vdev_mgr_dbg_flags;
14918     /* Contains the value of max vdev pause delay in microseconds */
14919     A_UINT32 opaque_debug_max_pause_delay_us;
14920     /* opaque_debug_sta_offset:
14921      * Contains the value of the offset of vdev TSF with BI (vdev_tsf%BI)
14922      * for STA vdev.
14923      */
14924     A_UINT32 opaque_debug_sta_offset;
14925     /* Contains the value of vdev pn sequence receive filter */
14926     A_UINT32 opaque_debug_vdev_pn_rx_filter;
14927     /* Contains the value of config params */
14928     A_UINT32 opaque_debug_traffic_config;
14929     /* opaque_debug_he_bss_rts_thld_tu:
14930      * Contains Period of time in units for a non-AP STA to reserve the medium.
14931      */
14932     A_UINT32 opaque_debug_he_bss_rts_thld_tu;
14933     /* opaque_debug_rts_threshold:
14934      * Contains the value of Request to Send (RTS) Threshold of the packet size.
14935      */
14936     A_UINT32 opaque_debug_rts_threshold; /* dot11RTSThreshold */
14937     /* Contains the value of Tx failure count threshold */
14938     A_UINT32 opaque_debug_tx_fail_cnt_thres;
14939     /* Contains the value of ratio = HI_WORD/LO_WORD */
14940     A_UINT32 opaque_debug_mu_edca_sifs_ratio;
14941     /* opaque_debug_kickout_th:
14942      * Contains the value of kickout threshold that denotes units of
14943      * lost block acks of consecutive tx failure threshold.
14944      */
14945     A_UINT32 opaque_debug_kickout_th;
14946     /* opaque_debug_rate_dd_bmap:
14947      * Contains the value of per vap config related to VAP aggregation
14948      * of ratectrl drop-down limits.
14949      */
14950     A_UINT32 opaque_debug_rate_dd_bmap;
14951     /* Contains the value of Maximum Transmission Unit frame size */
14952     A_UINT32 opaque_debug_mtu_size;
14953     /* Contains the value of vdev event bitmap from wal_vdev */
14954     A_UINT32 opaque_debug_event_bitmap;
14955     /* Contains the value of peer event bitmap from wal_vdev */
14956     A_UINT32 opaque_debug_peer_event_bitmap;
14957     /* Contains the value of Sched config of vdev allowed time during ATF */
14958     A_UINT32 opaque_debug_atf_vdev_allowed_time;
14959     /* opaque_debug_atf_vdev_used_unallocated_time:
14960      * Contains the value of Sched config of vdev used unallocated time
14961      * during ATF.
14962      */
14963     A_UINT32 opaque_debug_atf_vdev_used_unallocated_time;
14964     /* Contains the value of Sched config of vdev unused time during ATF */
14965     A_UINT32 opaque_debug_atf_vdev_unused_time;
14966     /* Contains the value of Carrier frequency offset last programmed time */
14967     A_UINT32 opaque_debug_last_prog_time;
14968     /* Contains the value of Carrier frequency offset last receive time */
14969     A_UINT32 opaque_debug_last_recv_time;
14970     /* Contains the value of Packet count of received frames on the channel */
14971     A_UINT32 opaque_debug_rx_pkt_on_channel;
14972     /* Contains the value of Target beacon transmission time offset value */
14973     A_UINT32 opaque_debug_tbtt_offset;
14974     /* Contains the value of tid pause bitmap of the peer from wal_vdev */
14975     A_UINT32 opaque_debug_peer_all_tid_pause_bitmap;
14976     /* Contains the value of tid block bitmap of the peer from wal_vdev */
14977     A_UINT32 opaque_debug_peer_all_tid_block_bitmap;
14978     /* Contains the value of tdls peer kickout threshold */
14979     A_UINT32 opaque_debug_tdls_peer_kickout_th;
14980     /* opaque_debug_num_of_remote_peers_connected:
14981      * Contains the value of num_of_remote_peers_connected;
14982      * Below field is valid only for AP vap.
14983      */
14984     A_UINT32 opaque_debug_num_of_remote_peers_connected;
14985     /* Contains the value of num of Multi group key support */
14986     A_UINT32 opaque_debug_num_group_key_enabled;
14987     /* Contains the value of delete all peer command flags */
14988     A_UINT32 opaque_debug_delete_all_peer_flags;
14989     /* Contains the value of Keepalive ARP sender address time */
14990     A_UINT32 opaque_debug_keepalive_arp_sender_ipv4;
14991     /* Contains the value of Keepalive ARP Target address time */
14992     A_UINT32 opaque_debug_keepalive_arp_target_ipv4;
14993     /* Contains the value of Keepalive interval duration time */
14994     A_UINT32 opaque_debug_keepalive_interval;
14995     /* Contains the value of Keepalive start timer timestamp */
14996     A_UINT32 opaque_debug_keepalive_timer_start_timestamp;
14997     /* Contains the value of max idle interval and status of STA */
14998     A_UINT32 opaque_debug_sta_maxidle_interval;
14999     A_UINT32 opaque_debug_sta_maxidle_method;
15000     /* Contains the value of Timing synchronization function (TSF) time diff */
15001     A_UINT32 opaque_debug_tsf_curr_time_diff;
15002     /* opaque_debug_sleep_duration_us:
15003      * Contains the value of Time in microsends to detect sleep duration
15004      * of the client.
15005      */
15006     A_UINT32 opaque_debug_sleep_duration_us;
15007     /* Contains the value of pause start time and to calculate pause delay */
15008     A_UINT32 opaque_debug_pause_start_time_us;
15009     A_UINT32 opaque_debug_pause_delay_us;
15010     /* Contains the value of number of supported group key */
15011     A_UINT32 opaque_debug_num_supported_group_key;
15012     /* opaque_debug_avg_data_null_tx_delay:
15013      * Contains the value of Average time taken to calculate data frame
15014      * tx delay.
15015      */
15016     A_UINT32 opaque_debug_avg_data_null_tx_delay;
15017     /* opaque_debug_avg_rx_leak_window:
15018      * Contains the value of Average time taken to calculate data frame
15019      * in receive window.
15020      */
15021     A_UINT32 opaque_debug_avg_rx_leak_window;
15022     /* Contains the value of count for number of received deauth frames */
15023     A_UINT32 opaque_debug_num_recv_deauth;
15024     /* Contains the value of Beacon interval in microseconds */
15025     A_UINT32 opaque_debug_bcn_intval_us;
15026     /* opaque_debug_fils_period
15027      * Contains the value of us, period configured through
15028      * WMI_ENABLE_FILS_CMDID.
15029      */
15030     A_UINT32 opaque_debug_fils_period;
15031     /* Contains the value of previous Timing synchronization function (TSF) */
15032     A_UINT32 opaque_debug_prev_tsf;
15033     /* Contains the value of time taken during client sleep */
15034     A_UINT32 opaque_debug_sleep_entry_time;
15035     /* Contains the value of Total sleep duration from wal_vdev */
15036     A_UINT32 opaque_debug_tot_sleep_dur;
15037     /* Contains the value of Vdev pause bitmap from wal_vdev */
15038     A_UINT32 opaque_debug_pause_bitmap;
15039     /* opaque_debug_last_send_to_host_deauth_tsf:
15040      * Contains the value of Last TSF time last_send_to_host_deauth_tsf
15041      * from wlan_vdev.
15042      */
15043     A_UINT32 opaque_debug_last_send_to_host_deauth_tsf;
15044     /* Contains the value of debug_short_ssid from wlan_vdev */
15045     A_UINT32 opaque_debug_short_ssid;
15046     /* Bitfield macro's expansion variables */
15047     /* opaque_debug_vdev_amsdu_bitfield:
15048      * bit  7:0  - Contains the value of dis_dyn_bw_rts from wlan_vdev,
15049      *     15:8  - max_amsdu,
15050      *     23:16 - def_amsdu,
15051      *     31:24 - he_bss_color
15052      */
15053     A_UINT32 opaque_debug_vdev_amsdu_bitfield;
15054     /* opaque_debug_vdev_ac_failure_configs:
15055      * bit  7:0  - Contains the value of dhe_def_pe_duratio from wal_vdev,
15056      *     15:8  - minimum_allowed_mcs,
15057      *     23:16 - max_11ac_to_leg_rts_fallback_th,
15058      *     31:24 - max_11ac_rts_consec_failure_th
15059      */
15060     A_UINT32 opaque_debug_vdev_ac_failure_configs;
15061     /* opaque_debug_vdev_pkt_type_info:
15062      * bit  7:0  - Contains the value of input_pkt_type from wal_vdev,
15063      *     15:8  - recv_pkt_type,
15064      *     23:16 - disable_intra_fwd,
15065      *     31:24 - ps_awake
15066      */
15067     A_UINT32 opaque_debug_vdev_pkt_type_info;
15068     /* opaque_debug_vdev_ba_param_bitfield:
15069      * bit  7:0  - Contains the value of snr_cal_count from wal_vdev,
15070      *     15:8  - amsdu_auto_enable,
15071      *     23:16 - param_ba_timeout,
15072      *     31:24 - param_ba_buffer_size
15073      */
15074     A_UINT32 opaque_debug_vdev_ba_param_bitfield;
15075     /* opaque_debug_vdev_aggr_bitfield:
15076      * bit  7:0  - Contains the value of param_amsdu_support from wal_vdev,
15077      *     15:8  - param_ba_retry_max,
15078      *     23:16 - tx_aggr_size,
15079      *     31:24 - rx_aggr_size
15080      */
15081     A_UINT32 opaque_debug_vdev_aggr_bitfield;
15082     /* opaque_debug_vdev_event_delivery:
15083      * bit  7:0  - Contains the value of tqm_bypass_enabled from wal_vdev,
15084      *     15:8  - wmmac_timer_vote_cnt,
15085      *     23:16 - peer_event_delivery_in_progress,
15086      *     31:24 - vdev_event_delivery_in_progress
15087      */
15088     A_UINT32 opaque_debug_vdev_event_delivery;
15089      /* opaque_debug_vdev_cap_slot_bitfield:
15090      * bit  7:0  - Contains the value of bcn_max_slot from wal_vdev,
15091      *     15:8  - bcn_curr_slot,
15092      *     23:16 - mgmt_tx_power,
15093      *     31:24 - mbssid_capable_association
15094      */
15095     A_UINT32 opaque_debug_vdev_cap_slot_bitfield;
15096     /* opaque_debug_vdev_bcn_configs:
15097      * bit  7:0  - Contains the value of mbssid_txbssid_association from
15098      *             wal_vdev,
15099      *     15:8  - consec_beacon_skip,
15100      *     23:16 - consec_beacon_skip_cnt,
15101      *     31:24 - max_consec_beacon_skip
15102      */
15103     A_UINT32 opaque_debug_vdev_bcn_configs;
15104     /* Contains the value of opaque_debug_vdev_cmd_info */
15105     A_UINT32 opaque_debug_vdev_cmd_info;
15106     /* opaque_debug_vdev_mac_configs:
15107      * bit  7:0  - Contains the value of pause_cnt from wlan_vdev,
15108      *     15:8  - e_mac_id,
15109      *     23:16 - is_transmit_bssid,
15110      *     31:24 - rts_rc_flag
15111      */
15112     A_UINT32 opaque_debug_vdev_mac_configs;
15113     /* opaque_debug_vdev_mode_configs:
15114      * bit  7:0  - Contains the value of ic_opmode from wlan_vdev,
15115      *     15:8  - ic_subopmode,
15116      *     23:16 - ic_curmode,
15117      *     31:24 - vdev_up_cmd_cnt
15118      */
15119     A_UINT32 opaque_debug_vdev_mode_configs;
15120     /* opaque_debug_vdev_keepalive_bitfields:
15121      * bit  7:0  - keepalive_method
15122      *     15:8  - keepalive_prohibit_data_mgmt
15123      *     23:16 - resp_type
15124      *     31:24 - ap_detect_out_of_sync_sleeping_sta_time_secs
15125      */
15126     A_UINT32 opaque_debug_vdev_keepalive_bitfields;
15127     /* opaque_debug_vdev_bcn_drift_info:
15128      * bit  7:0  - bcn_drift_cnt
15129      *     15:8  - bcn_drift_calibration
15130      *     23:16 - rts_cts_default
15131      *     31:24 - vdev_down_cmd_cnt
15132      */
15133     A_UINT32 opaque_debug_vdev_bcn_drift_info;
15134     /* opaque_debug_vdev_arp_configs:
15135      * bit  7:0  - Contains the value of tbtt_link_type from wlan_vdev,
15136      *     15:8  - is_arp_in_air,
15137      *     23:16 - is_ns_in_air,
15138      *     31:24 - num_of_keepalive_attempts
15139      */
15140     A_UINT32 opaque_debug_vdev_arp_configs;
15141     /* opaque_debug_vdev_streams_configs:
15142      * bit  7:0  - n_beacons_since_last_rssi_report
15143      *     15:8  - num_ofld_peer_alloced
15144      *     23:16 - preferred_tx_streams
15145      *     31:24 - preferred_rx_streams
15146      */
15147     A_UINT32 opaque_debug_vdev_streams_configs;
15148     /* opaque_debug_vdev_chains_configs:
15149      * bit  7:0  - Contains the value of preferred_tx_streams_160 from
15150      *             wlan_vdev,
15151      *     15:8  - preferred_rx_streams_160,
15152      *     23:16 - tx_chains_num_11b,
15153      *     31:24 - tx_chains_num_11ag
15154      */
15155     A_UINT32 opaque_debug_vdev_chains_configs;
15156     /* opaque_debug_vdev_power_cap_configs:
15157      * bit  7:0  - Contains the value of supp_op_cls_ie_len from wlan_vdev,
15158      *     15:8  - rm_en_cap_ie_len,
15159      *     23:16 - power_cap_ie_len,
15160      *     31:24 - supp_channel_ie_len
15161      */
15162     A_UINT32 opaque_debug_vdev_power_cap_configs;
15163     /* opaque_debug_vdev_wmm_mbo_configs:
15164      * bit  7:0  - Contains the value of wmm_tspec_ie_len from wlan_vdev,
15165      *     15:8  - ccx_version_ie_len,
15166      *     23:16 - extn_dh_ie_len,
15167      *     31:24 - mbo_ie_len
15168      */
15169     A_UINT32 opaque_debug_vdev_wmm_mbo_configs;
15170     /* opaque_debug_vdev_remote_configs:
15171      * bit  7:0  - Contains the value of rsnxe_ie_len from wlan_vdev,
15172      *     15:8  - remote_peer_cnt
15173      *     23:16 - p2p_cli_pause_type
15174      *     31:24 - mu_edca_update_count
15175      */
15176     A_UINT32 opaque_debug_vdev_remote_configs;
15177     /* opaque_debug_vdev_stats_id_configs:
15178      * bit  7:0  - vdev_stats_id
15179      *     15:8  - vdev_stats_id_valid
15180      *     23:16 - preferred_tx_streams_320
15181      *     31:24 - preferred_rx_streams_320
15182      */
15183     A_UINT32 opaque_debug_vdev_stats_id_configs;
15184     /* opaque_debug_vdev_assoc_peer_configs:
15185      * bit  7:0  - unused / reserved
15186      *     15:8  - group_cipher
15187      *     31:16 - assoc_id
15188      */
15189     A_UINT32 opaque_debug_vdev_assoc_peer_configs;
15190     /* opaque_debug_vdev_mhz_fils_configs:
15191      * bit 15:0  - Contains the value of bss_channel_mhz from wal_vdev,
15192      *     31:16 - config_fils_period
15193      */
15194     A_UINT32 opaque_debug_vdev_mhz_fils_configs;
15195     /* opaque_debug_vdev_fils_period:
15196      * bit 15:0  - Contains the value of calc_fils_period from wal_vdev,
15197      *     31:16 - ic_txseqs_cmn
15198      */
15199     A_UINT32 opaque_debug_vdev_fils_period;
15200     /* opaque_debug_vdev_inactive_time:
15201      * bit 15:0  - Contains the value of
15202      *             ap_keepalive_min_idle_inactive_time_secs from wlan_vdev,
15203      *     31:16 - ap_keepalive_max_idle_inactive_time_secs
15204      */
15205     A_UINT32 opaque_debug_vdev_inactive_time;
15206     /* opaque_debug_vdev_chain_mask_configs:
15207      * bit 15:0  - Contains the value of
15208      *             ap_keepalive_max_unresponsive_time_secs from wlan_vdev,
15209      *     31:16 - chain_mask
15210      */
15211     A_UINT32 opaque_debug_vdev_chain_mask_configs;
15212     /* opaque_debug_vdev_ie_len_configs:
15213      * bit 15:0  - num_mcast_filters
15214      *     31:16 - ext_cap_ie_len
15215      */
15216     A_UINT32 opaque_debug_vdev_ie_len_configs;
15217     /* opaque_debug_vdev_fils_configs:
15218      * bit 15:0  - Contains the value of fils_channel_guard_time from wlan_vdev,
15219      *     31:16 - fd_tmpl_len
15220      */
15221     A_UINT32 opaque_debug_vdev_fils_configs;
15222     /* opaque_debug_vdev_chan_configs:
15223      * bit 15:0  - Contains the value of common_rsn_caps from wlan_vdev,
15224      *     31:16 - off_ch_active_dwell_time
15225      */
15226     A_UINT32 opaque_debug_vdev_chan_configs;
15227     /* opaque_debug_vdev_dwell_configs:
15228      * bit 15:0  - Contains the value of off_ch_passive_dwell_time from
15229      *             wlan_vdev,
15230      *     31:16 - current_pause_request_id
15231      */
15232     A_UINT32 opaque_debug_vdev_dwell_configs;
15233     /* opaque_debug_vdev_wmi_configs:
15234      * bit  0 - Contains the value of hide_ssid_enable from wlan_vdev,
15235      *      1 - b_none_protocol_paused
15236      *      2 - dpd_cal_state
15237      *      4 - req_bcn_q_unpause
15238      *      5 - bt_coex_enable_cts2s
15239      *      6 - dpd_delay_n_beacon
15240      *      8 - b_need_check_first_beacon
15241      *      9 - ap_peer_keepalive_max_idle_time_reached
15242      *     10 - leakyap_cts2s_enable
15243      *     11 - stasapscc_in_mcc
15244      *     12 - stasapscc_in_mcc_cts2s_enable
15245      *     13 - is_vdev_stopping
15246      *     14 - is_wmi_vdev_down
15247      *     15 - is_vdev_down_pending
15248      *     16 - vdev_delete_in_progress
15249      *     17 - cac_enabled
15250      *     18 - is_quaterrate
15251      *     19 - is_halfrate
15252      *     20 - stop_resp_event_blocked
15253      *     21 - use_enhanced_mcast_filter
15254      *     22 - is_start_pending_on_asm
15255      *     23 - no_null_to_ap_for_roaming
15256      *     24 - is_loopback_cal_pending
15257      *     25 - vdev_delete_acked
15258      *     26 - bc_proberesp_enable
15259      *     27 - is_wmm_param
15260      *     28 - is_connect_in_progress
15261      *     29 - is_mu_edca_param
15262      *     30 - send_del_resp_tohost
15263      *     31 - is_restart_different_ch
15264      */
15265     A_UINT32 opaque_debug_vdev_wmi_configs;
15266     /* opaque_debug_vdev_hu_mu_configs:
15267      * bit     0 - Contains the value of proto_ps_status from wlan_vdev,
15268      *         1 - smps_intolerant
15269      *         2 - is_offload_registered_for_connection
15270      *         3 - is_bss_beacon_offload_registered
15271      *         4 - is_prob_resp_offload_registered
15272      *         5 - is_ibss_beacon_offload_registered
15273      *         6 - is_keepalive_attempts_exhausted
15274      *         7 - is_bcn_tx_ie_changed_log
15275      *         8 - he_su_bfee
15276      *         9 - he_su_bfer
15277      *        10 - he_mu_bfee
15278      *        11 - he_mu_bfer
15279      *        12 - he_dl_ofdma
15280      *        13 - he_ul_ofdma
15281      *        14 - he_ul_mumimo
15282      *        15 - ul_mu_resp
15283      *     23:16 - alt_rssi_non_srg
15284      *     31:24 - alt_rssi_srg
15285      */
15286     A_UINT32 opaque_debug_vdev_hu_mu_configs;
15287     /* opaque_debug_vdev_sm_chan_configs:
15288      * bit    0 - Contains the value of he_bss_color_en from wlan_vdev,
15289      *        1 - he_txbf_ofdma
15290      *        2 - non_srg_enable
15291      *        3 - srg_enable
15292      *        4 - srp_enable
15293      *        5 - sr_initialized
15294      *        6 - sr_rings_initialized
15295      *     10:7 - per_ac_obss_pd_enable
15296      *       11 - ifup
15297      *       12 - ifactive
15298      *       13 - ifpaused
15299      *       14 - ifoutofsync
15300      *       15 - is_free
15301      *       16 - is_nawds
15302      *       17 - hw_flag
15303      *       18 - ch_req_flag
15304      *       20 - restart_resp
15305      *       21 - first_beacon_recv_wait
15306      *       22 - erpenabled
15307      *       23 - start_responded
15308      *       24 - bcn_sync_crit_req_act
15309      *       25 - recal_notif_registered
15310      *       26 - bcn_tx_paused
15311      *       27 - he_bss_color_en_bypass
15312      *       28 - default_ba_mode
15313      *       29 - ba_256_bitmap_enable
15314      *       30 - ba_256_bitmap_tx_disable
15315      *       31 - is_multi_group_key_enabled
15316      */
15317     A_UINT32 opaque_debug_vdev_sm_chan_configs;
15318     /*
15319      * The following 4 opaque_debug variables are provided purely for
15320      * debugging by technicians who have outside knowledge of what kind of
15321      * values the target has placed into these fields.
15322      * The host must not interpret the values of these fields, since the
15323      * meaning of the values provided in these fields may change without
15324      * regard for backwards compatibility or interoperability.
15325      */
15326     A_UINT32 opaque_debug_field_1;
15327     A_UINT32 opaque_debug_field_2;
15328     A_UINT32 opaque_debug_field_3;
15329     A_UINT32 opaque_debug_field_4;
15330 } wmi_ctrl_path_vdev_stats_struct;
15331 
15332 
15333 #define WMI_VDEV_STATS_DIS_DYN_BW_RTS_SET(flag, val) \
15334     WMI_SET_BITS(flag, 0, 8, val)
15335 #define WMI_VDEV_STATS_DIS_DYN_BW_RTS_GET(flag) \
15336     WMI_GET_BITS(flag, 0, 8)
15337 #define WMI_VDEV_STATS_MAX_AMSDU_SET(flag, val) \
15338     WMI_SET_BITS(flag, 8, 8, val)
15339 #define WMI_VDEV_STATS_MAX_AMSDU_GET(flag) \
15340     WMI_GET_BITS(flag, 8, 8)
15341 #define WMI_VDEV_STATS_DEF_AMSDU_SET(flag, val) \
15342     WMI_SET_BITS(flag, 16, 8, val)
15343 #define WMI_VDEV_STATS_DEF_AMSDU_GET(flag) \
15344     WMI_GET_BITS(flag, 16, 8)
15345 #define WMI_VDEV_STATS_HW_BSS_COLOR_SET(flag, val) \
15346     WMI_SET_BITS(flag, 24, 8, val)
15347 #define WMI_VDEV_STATS_HW_BSS_COLOR_GET(flag) \
15348     WMI_GET_BITS(flag, 24, 8)
15349 
15350 #define WMI_VDEV_STATS_HE_DEF_PE_DURATION_SET(flag, val) \
15351     WMI_SET_BITS(flag, 0, 8, val)
15352 #define WMI_VDEV_STATS_HE_DEF_PE_DURATION_GET(flag) \
15353     WMI_GET_BITS(flag, 0, 8)
15354 #define WMI_VDEV_STATS_MINIMUM_ALLOWED_MCS_SET(flag, val) \
15355     WMI_SET_BITS(flag, 8, 8, val)
15356 #define WMI_VDEV_STATS_MINIMUM_ALLOWED_MCS_GET(flag) \
15357     WMI_GET_BITS(flag, 8, 8)
15358 #define WMI_VDEV_STATS_MAX_11AC_TO_LEG_RTS_FALLBACK_TH_SET(flag, val) \
15359     WMI_SET_BITS(flag, 16, 8, val)
15360 #define WMI_VDEV_STATS_MAX_11AC_TO_LEG_RTS_FALLBACK_TH_GET(flag) \
15361     WMI_GET_BITS(flag, 16, 8)
15362 #define WMI_VDEV_STATS_MAX_11AC_RTS_CONSEC_FAILURE_SET(flag, val) \
15363     WMI_SET_BITS(flag, 24, 8, val)
15364 #define WMI_VDEV_STATS_MAX_11AC_RTS_CONSEC_FAILURE_GET(flag) \
15365     WMI_GET_BITS(flag, 24, 8)
15366 
15367 #define WMI_VDEV_STATS_INPUT_PKT_TYPE_SET(flag, val) \
15368     WMI_SET_BITS(flag, 0, 8, val)
15369 #define WMI_VDEV_STATS_INPUT_PKT_TYPE_GET(flag) \
15370     WMI_GET_BITS(flag, 0, 8)
15371 #define WMI_VDEV_STATS_RECV_PKT_TYPE_SET(flag, val) \
15372     WMI_SET_BITS(flag, 8, 8, val)
15373 #define WMI_VDEV_STATS_RECV_PKT_TYPE_GET(flag) \
15374     WMI_GET_BITS(flag, 8, 8)
15375 #define WMI_VDEV_STATS_DISABLE_INTRA_FWD_SET(flag, val) \
15376     WMI_SET_BITS(flag, 16, 8, val)
15377 #define WMI_VDEV_STATS_DISABLE_INTRA_FWD_GET(flag) \
15378     WMI_GET_BITS(flag, 16, 8)
15379 #define WMI_VDEV_STATS_PS_AWAKE_SET(flag, val) \
15380     WMI_SET_BITS(flag, 24, 8, val)
15381 #define WMI_VDEV_STATS_PS_AWAKE_GET(flag) \
15382     WMI_GET_BITS(flag, 24, 8)
15383 
15384 #define WMI_VDEV_STATS_SNR_CAL_COUNT_SET(flag, val) \
15385     WMI_SET_BITS(flag, 0, 8, val)
15386 #define WMI_VDEV_STATS_SNR_CAL_COUNT_GET(flag) \
15387     WMI_GET_BITS(flag, 0, 8)
15388 #define WMI_VDEV_STATS_AMSDU_AUTO_ENABLE_SET(flag, val) \
15389     WMI_SET_BITS(flag, 8, 8, val)
15390 #define WMI_VDEV_STATS_AMSDU_AUTO_ENABLE_GET(flag) \
15391     WMI_GET_BITS(flag, 8, 8)
15392 #define WMI_VDEV_STATS_PARAM_BA_TIMEOUT_SET(flag, val) \
15393     WMI_SET_BITS(flag, 16, 8, val)
15394 #define WMI_VDEV_STATS_PARAM_BA_TIMEOUT_GET(flag) \
15395     WMI_GET_BITS(flag, 16, 8)
15396 #define WMI_VDEV_STATS_PARAM_BA_BUFFER_SIZE_SET(flag, val) \
15397     WMI_SET_BITS(flag, 24, 8, val)
15398 #define WMI_VDEV_STATS_PARAM_BA_BUFFER_SIZE_GET(flag) \
15399     WMI_GET_BITS(flag, 24, 8)
15400 
15401 #define WMI_VDEV_STATS_PARAM_AMSDU_SUPPORT_SET(flag, val) \
15402     WMI_SET_BITS(flag, 0, 8, val)
15403 #define WMI_VDEV_STATS_PARAM_AMSDU_SUPPORT_GET(flag) \
15404     WMI_GET_BITS(flag, 0, 8)
15405 #define WMI_VDEV_STATS_PARAM_BA_RETRY_MAX_SET(flag, val) \
15406     WMI_SET_BITS(flag, 8, 8, val)
15407 #define WMI_VDEV_STATS_PARAM_BA_RETRY_MAX_GET(flag) \
15408     WMI_GET_BITS(flag, 8, 8)
15409 #define WMI_VDEV_STATS_TX_AGGR_SIZE_SET(flag, val) \
15410     WMI_SET_BITS(flag, 16, 8, val)
15411 #define WMI_VDEV_STATS_TX_AGGR_SIZE_GET(flag) \
15412     WMI_GET_BITS(flag, 16, 8)
15413 #define WMI_VDEV_STATS_RX_AGGR_SIZE_SET(flag, val) \
15414     WMI_SET_BITS(flag, 24, 8, val)
15415 #define WMI_VDEV_STATS_RX_AGGR_SIZE_GET(flag) \
15416     WMI_GET_BITS(flag, 24, 8)
15417 
15418 #define WMI_VDEV_STATS_TQM_BYPASS_ENABLED_SET(flag, val) \
15419     WMI_SET_BITS(flag, 0, 8, val)
15420 #define WMI_VDEV_STATS_TQM_BYPASS_ENABLED_GET(flag) \
15421     WMI_GET_BITS(flag, 0, 8)
15422 #define WMI_VDEV_STATS_WMMAC_TIMER_VOTE_CNT_SET(flag, val) \
15423     WMI_SET_BITS(flag, 8, 8, val)
15424 #define WMI_VDEV_STATS_WMMAC_TIMER_VOTE_CNT_GET(flag) \
15425     WMI_GET_BITS(flag, 8, 8)
15426 #define WMI_VDEV_STATS_PEER_EVENT_DELIVERY_IN_PROGRESS_SET(flag, val) \
15427     WMI_SET_BITS(flag, 16, 8, val)
15428 #define WMI_VDEV_STATS_PEER_EVENT_DELIVERY_IN_PROGRESS_GET(flag) \
15429     WMI_GET_BITS(flag, 16, 8)
15430 #define WMI_VDEV_STATS_VDEV_EVENT_DELIVERY_IN_PROGRESS_SET(flag, val) \
15431     WMI_SET_BITS(flag, 24, 8, val)
15432 #define WMI_VDEV_STATS_VDEV_EVENT_DELIVERY_IN_PROGRESS_GET(flag) \
15433     WMI_GET_BITS(flag, 24, 8)
15434 
15435 #define WMI_VDEV_STATS_BCN_MAX_SLOT_SET(flag, val) \
15436     WMI_SET_BITS(flag, 0, 8, val)
15437 #define WMI_VDEV_STATS_BCN_MAX_SLOT_GET(flag) \
15438     WMI_GET_BITS(flag, 0, 8)
15439 #define WMI_VDEV_STATS_BCN_CURR_SLOT_SET(flag, val) \
15440     WMI_SET_BITS(flag, 8, 8, val)
15441 #define WMI_VDEV_STATS_BCN_CURR_SLOT_GET(flag) \
15442     WMI_GET_BITS(flag, 8, 8)
15443 #define WMI_VDEV_STATS_MGMT_TX_POWER_SET(flag, val) \
15444     WMI_SET_BITS(flag, 16, 8, val)
15445 #define WMI_VDEV_STATS_MGMT_TX_POWER_GET(flag) \
15446     WMI_GET_BITS(flag, 16, 8)
15447 #define WMI_VDEV_STATS_MBSSID_CAPABLE_ASSOCIATION_SET(flag, val) \
15448     WMI_SET_BITS(flag, 24, 8, val)
15449 #define WMI_VDEV_STATS_MBSSID_CAPABLE_ASSOCIATION_GET(flag) \
15450     WMI_GET_BITS(flag, 24, 8)
15451 
15452 #define WMI_VDEV_STATS_MBSSID_TXBSSID_ASSOCIATION_SET(flag, val) \
15453     WMI_SET_BITS(flag, 0, 8, val)
15454 #define WMI_VDEV_STATS_MBSSID_TXBSSID_ASSOCIATION_GET(flag) \
15455     WMI_GET_BITS(flag, 0, 8)
15456 #define WMI_VDEV_STATS_CONSEC_BEACON_SKIP_SET(flag, val) \
15457     WMI_SET_BITS(flag, 8, 8, val)
15458 #define WMI_VDEV_STATS_CONSEC_BEACON_SKIP_GET(flag) \
15459     WMI_GET_BITS(flag, 8, 8)
15460 #define WMI_VDEV_STATS_CONSEC_BEACON_SKIP_CNT_SET(flag, val) \
15461     WMI_SET_BITS(flag, 16, 8, val)
15462 #define WMI_VDEV_STATS_CONSEC_BEACON_SKIP_CNT_GET(flag) \
15463     WMI_GET_BITS(flag, 16, 8)
15464 #define WMI_VDEV_STATS_MAX_CONSEC_BEACON_SKIP_SET(flag, val) \
15465     WMI_SET_BITS(flag, 24, 8, val)
15466 #define WMI_VDEV_STATS_MAX_CONSEC_BEACON_SKIP_GET(flag) \
15467     WMI_GET_BITS(flag, 24, 8)
15468 
15469 #define WMI_VDEV_STATS_BCN_DRIFT_CNT_SET(flag, val) \
15470     WMI_SET_BITS(flag, 0, 8, val)
15471 #define WMI_VDEV_STATS_BCN_DRIFT_CNT_GET(flag) \
15472     WMI_GET_BITS(flag, 0, 8)
15473 #define WMI_VDEV_STATS_BCN_DRIFT_CALIBRATION_SET(flag, val) \
15474     WMI_SET_BITS(flag, 8, 8, val)
15475 #define WMI_VDEV_STATS_BCN_DRIFT_CALIBRATION_GET(flag) \
15476     WMI_GET_BITS(flag, 8, 8)
15477 #define WMI_VDEV_STATS_VDEV_DOWN_CMD_CNT_SET(flag, val) \
15478     WMI_SET_BITS(flag, 16, 8, val)
15479 #define WMI_VDEV_STATS_VDEV_DOWN_CMD_CNT_GET(flag) \
15480     WMI_GET_BITS(flag, 16, 8)
15481 #define WMI_VDEV_STATS_RTS_CTS_DEFAULT_SET(flag, val) \
15482     WMI_SET_BITS(flag, 24, 8, val)
15483 #define WMI_VDEV_STATS_RTS_CTS_DEFAULT_GET(flag) \
15484     WMI_GET_BITS(flag, 24, 8)
15485 
15486 #define WMI_VDEV_STATS_PAUSE_CNT_SET(flag, val) \
15487     WMI_SET_BITS(flag, 0, 8, val)
15488 #define WMI_VDEV_STATS_PAUSE_CNT_GET(flag) \
15489     WMI_GET_BITS(flag, 0, 8)
15490 #define WMI_VDEV_STATS_E_MAC_ID_SET(flag, val) \
15491     WMI_SET_BITS(flag, 8, 8, val)
15492 #define WMI_VDEV_STATS_E_MAC_ID_GET(flag) \
15493     WMI_GET_BITS(flag, 8, 8)
15494 #define WMI_VDEV_STATS_IS_TRANSMIT_BSSID_SET(flag, val) \
15495     WMI_SET_BITS(flag, 16, 8, val)
15496 #define WMI_VDEV_STATS_IS_TRANSMIT_BSSID_GET(flag) \
15497     WMI_GET_BITS(flag, 16, 8)
15498 #define WMI_VDEV_STATS_RTS_RC_FLAG_SET(flag, val) \
15499     WMI_SET_BITS(flag, 24, 8, val)
15500 #define WMI_VDEV_STATS_RTS_RC_FLAG_GET(flag) \
15501     WMI_GET_BITS(flag, 24, 8)
15502 
15503 #define WMI_VDEV_STATS_IC_OPMODE_SET(flag, val) \
15504     WMI_SET_BITS(flag, 0, 8, val)
15505 #define WMI_VDEV_STATS_IC_OPMODE_GET(flag) \
15506     WMI_GET_BITS(flag, 0, 8)
15507 #define WMI_VDEV_STATS_IC_SUBOPMODE_SET(flag, val) \
15508     WMI_SET_BITS(flag, 8, 8, val)
15509 #define WMI_VDEV_STATS_IC_SUBOPMODE_GET(flag) \
15510     WMI_GET_BITS(flag, 8, 8)
15511 #define WMI_VDEV_STATS_IC_CURMODE_SET(flag, val) \
15512     WMI_SET_BITS(flag, 16, 8, val)
15513 #define WMI_VDEV_STATS_IC_CURMODE_GET(flag) \
15514     WMI_GET_BITS(flag, 16, 8)
15515 #define WMI_VDEV_STATS_VDEV_UP_CMD_CNT_SET(flag, val) \
15516     WMI_SET_BITS(flag, 24, 8, val)
15517 #define WMI_VDEV_STATS_VDEV_UP_CMD_CNT_GET(flag) \
15518     WMI_GET_BITS(flag, 24, 8)
15519 
15520 #define WMI_VDEV_STATS_KEEPALIVE_METHOD_SET(flag, val) \
15521     WMI_SET_BITS(flag, 0, 8, val)
15522 #define WMI_VDEV_STATS_KEEPALIVE_METHOD_GET(flag) \
15523     WMI_GET_BITS(flag, 0, 8)
15524 #define WMI_VDEV_STATS_KEEPALIVE_PROHIBIT_DATA_MGMT_SET(flag, val) \
15525     WMI_SET_BITS(flag, 8, 8, val)
15526 #define WMI_VDEV_STATS_KEEPALIVE_PROHIBIT_DATA_MGMT_GET(flag) \
15527     WMI_GET_BITS(flag, 8, 8)
15528 #define WMI_VDEV_STATS_RESP_TYPE_SET(flag, val) \
15529     WMI_SET_BITS(flag, 16, 8, val)
15530 #define WMI_VDEV_STATS_RESP_TYPE_GET(flag) \
15531     WMI_GET_BITS(flag, 16, 8)
15532 #define WMI_VDEV_STATS_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS_SET(flag, val) \
15533     WMI_SET_BITS(flag, 24, 8, val)
15534 #define WMI_VDEV_STATS_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS_GET(flag) \
15535     WMI_GET_BITS(flag, 24, 8)
15536 
15537 #define WMI_VDEV_STATS_BCN_DRIFT_CNT_SET(flag, val) \
15538     WMI_SET_BITS(flag, 0, 8, val)
15539 #define WMI_VDEV_STATS_BCN_DRIFT_CNT_GET(flag) \
15540     WMI_GET_BITS(flag, 0, 8)
15541 #define WMI_VDEV_STATS_BCN_DRIFT_CALIBRATION_SET(flag, val) \
15542     WMI_SET_BITS(flag, 8, 8, val)
15543 #define WMI_VDEV_STATS_BCN_DRIFT_CALIBRATION_GET(flag) \
15544     WMI_GET_BITS(flag, 8, 8)
15545 #define WMI_VDEV_STATS_VDEV_DOWN_CMD_CNT_SET(flag, val) \
15546     WMI_SET_BITS(flag, 16, 8, val)
15547 #define WMI_VDEV_STATS_VDEV_DOWN_CMD_CNT_GET(flag) \
15548     WMI_GET_BITS(flag, 16, 8)
15549 #define WMI_VDEV_STATS_RTS_CTS_DEFAULT_SET(flag, val) \
15550     WMI_SET_BITS(flag, 24, 8, val)
15551 #define WMI_VDEV_STATS_RTS_CTS_DEFAULT_GET(flag) \
15552     WMI_GET_BITS(flag, 24, 8)
15553 
15554 #define WMI_VDEV_STATS_TBTT_LINK_TYPE_SET(flag, val) \
15555     WMI_SET_BITS(flag, 0, 8, val)
15556 #define WMI_VDEV_STATS_TBTT_LINK_TYPE_GET(flag) \
15557     WMI_GET_BITS(flag, 0, 8)
15558 #define WMI_VDEV_STATS_IS_ARP_IN_AIR_SET(flag, val) \
15559     WMI_SET_BITS(flag, 8, 8, val)
15560 #define WMI_VDEV_STATS_IS_ARP_IN_AIR_GET(flag) \
15561     WMI_GET_BITS(flag, 8, 8)
15562 #define WMI_VDEV_STATS_IS_NS_IN_AIR_SET(flag, val) \
15563     WMI_SET_BITS(flag, 16, 8, val)
15564 #define WMI_VDEV_STATS_IS_NS_IN_AIR_GET(flag) \
15565     WMI_GET_BITS(flag, 16, 8)
15566 #define WMI_VDEV_STATS_NUM_OF_KEEPALIVE_ATTEMPTS_SET(flag, val) \
15567     WMI_SET_BITS(flag, 24, 8, val)
15568 #define WMI_VDEV_STATS_NUM_OF_KEEPALIVE_ATTEMPTS_GET(flag) \
15569     WMI_GET_BITS(flag, 24, 8)
15570 
15571 #define WMI_VDEV_STATS_N_BEACONS_SINCE_LAST_RSSI_REPORT_SET(flag, val) \
15572     WMI_SET_BITS(flag, 0, 8, val)
15573 #define WMI_VDEV_STATS_N_BEACONS_SINCE_LAST_RSSI_REPORT_GET(flag) \
15574     WMI_GET_BITS(flag, 0, 8)
15575 #define WMI_VDEV_STATS_NUM_OFLD_PEER_ALLOCED_SET(flag, val) \
15576     WMI_SET_BITS(flag, 8, 8, val)
15577 #define WMI_VDEV_STATS_NUM_OFLD_PEER_ALLOCED_GET(flag) \
15578     WMI_GET_BITS(flag, 8, 8)
15579 #define WMI_VDEV_STATS_PREFERRED_TX_STREAMS_SET(flag, val) \
15580     WMI_SET_BITS(flag, 16, 8, val)
15581 #define WMI_VDEV_STATS_PREFERRED_TX_STREAMS_GET(flag) \
15582     WMI_GET_BITS(flag, 16, 8)
15583 #define WMI_VDEV_STATS_PREFERRED_RX_STREAMS_SET(flag, val) \
15584     WMI_SET_BITS(flag, 24, 8, val)
15585 #define WMI_VDEV_STATS_PREFERRED_RX_STREAMS_GET(flag) \
15586     WMI_GET_BITS(flag, 24, 8)
15587 
15588 #define WMI_VDEV_STATS_PREFERRED_TX_STREAMS_160_SET(flag, val) \
15589     WMI_SET_BITS(flag, 0, 8, val)
15590 #define WMI_VDEV_STATS_PREFERRED_TX_STREAMS_160_GET(flag) \
15591     WMI_GET_BITS(flag, 0, 8)
15592 #define WMI_VDEV_STATS_PREFERRED_RX_STREAMS_160_SET(flag, val) \
15593     WMI_SET_BITS(flag, 8, 8, val)
15594 #define WMI_VDEV_STATS_PREFERRED_RX_STREAMS_160_GET(flag) \
15595     WMI_GET_BITS(flag, 8, 8)
15596 #define WMI_VDEV_STATS_TX_CHAINS_NUM_11B_SET(flag, val) \
15597     WMI_SET_BITS(flag, 16, 8, val)
15598 #define WMI_VDEV_STATS_TX_CHAINS_NUM_11B_GET(flag) \
15599     WMI_GET_BITS(flag, 16, 8)
15600 #define WMI_VDEV_STATS_TX_CHAINS_NUM_11AG_SET(flag, val) \
15601     WMI_SET_BITS(flag, 24, 8, val)
15602 #define WMI_VDEV_STATS_TX_CHAINS_NUM_11AG_GET(flag) \
15603     WMI_GET_BITS(flag, 24, 8)
15604 
15605 #define WMI_VDEV_STATS_SUPP_OP_CLS_IE_LEN_SET(flag, val) \
15606     WMI_SET_BITS(flag, 0, 8, val)
15607 #define WMI_VDEV_STATS_SUPP_OP_CLS_IE_LEN_GET(flag) \
15608     WMI_GET_BITS(flag, 0, 8)
15609 #define WMI_VDEV_STATS_RM_EN_CAP_IE_LEN_SET(flag, val) \
15610     WMI_SET_BITS(flag, 8, 8, val)
15611 #define WMI_VDEV_STATS_RM_EN_CAP_IE_LEN_GET(flag) \
15612     WMI_GET_BITS(flag, 8, 8)
15613 #define WMI_VDEV_STATS_POWER_CAP_IE_LEN_SET(flag, val) \
15614     WMI_SET_BITS(flag, 16, 8, val)
15615 #define WMI_VDEV_STATS_POWER_CAP_IE_LEN_GET(flag) \
15616     WMI_GET_BITS(flag, 16, 8)
15617 #define WMI_VDEV_STATS_SUPP_CHANNEL_IE_LEN_SET(flag, val) \
15618     WMI_SET_BITS(flag, 24, 8, val)
15619 #define WMI_VDEV_STATS_SUPP_CHANNEL_IE_LEN_GET(flag) \
15620     WMI_GET_BITS(flag, 24, 8)
15621 
15622 #define WMI_VDEV_STATS_WMM_TSPEC_IE_LEN_SET(flag, val) \
15623     WMI_SET_BITS(flag, 0, 8, val)
15624 #define WMI_VDEV_STATS_WMM_TSPEC_IE_LEN_GET(flag) \
15625     WMI_GET_BITS(flag, 0, 8)
15626 #define WMI_VDEV_STATS_CCX_VERSION_IE_LEN_SET(flag, val) \
15627     WMI_SET_BITS(flag, 8, 8, val)
15628 #define WMI_VDEV_STATS_CCX_VERSION_IE_LEN_GET(flag) \
15629     WMI_GET_BITS(flag, 8, 8)
15630 #define WMI_VDEV_STATS_EXTN_DH_IE_LEN_SET(flag, val) \
15631     WMI_SET_BITS(flag, 16, 8, val)
15632 #define WMI_VDEV_STATS_EXTN_DH_IE_LEN_GET(flag) \
15633     WMI_GET_BITS(flag, 16, 8)
15634 #define WMI_VDEV_STATS_MBO_IE_LEN_SET(flag, val) \
15635     WMI_SET_BITS(flag, 24, 8, val)
15636 #define WMI_VDEV_STATS_MBO_IE_LEN_GET(flag) \
15637     WMI_GET_BITS(flag, 24, 8)
15638 
15639 #define WMI_VDEV_STATS_RSNXE_IE_LEN_SET(flag, val) \
15640     WMI_SET_BITS(flag, 0, 8, val)
15641 #define WMI_VDEV_STATS_RSNXE_IE_LEN_GET(flag) \
15642     WMI_GET_BITS(flag, 0, 8)
15643 #define WMI_VDEV_STATS_REMOTE_PEER_CNT_SET(flag, val) \
15644     WMI_SET_BITS(flag, 8, 8, val)
15645 #define WMI_VDEV_STATS_REMOTE_PEER_CNT_GET(flag) \
15646     WMI_GET_BITS(flag, 8, 8)
15647 #define WMI_VDEV_STATS_P2P_CLI_PAUSE_TYPE_SET(flag, val) \
15648     WMI_SET_BITS(flag, 16, 8, val)
15649 #define WMI_VDEV_STATS_P2P_CLI_PAUSE_TYPE_GET(flag) \
15650     WMI_GET_BITS(flag, 16, 8)
15651 #define WMI_VDEV_STATS_MU_EDCA_UPDATE_COUNT_SET(flag, val) \
15652     WMI_SET_BITS(flag, 24, 8, val)
15653 #define WMI_VDEV_STATS_MU_EDCA_UPDATE_COUNT_GET(flag) \
15654     WMI_GET_BITS(flag, 24, 8)
15655 
15656 #define WMI_VDEV_STATS_ID_SET(flag, val) \
15657     WMI_SET_BITS(flag, 0, 8, val)
15658 #define WMI_VDEV_STATS_ID_GET(flag) \
15659     WMI_GET_BITS(flag, 0, 8)
15660 #define WMI_VDEV_STATS_ID_VALID_SET(flag, val) \
15661     WMI_SET_BITS(flag, 8, 8, val)
15662 #define WMI_VDEV_STATS_ID_VALID_GET(flag) \
15663     WMI_GET_BITS(flag, 8, 8)
15664 #define WMI_VDEV_STATS_PREFERRED_TX_STREAMS_320_SET(flag, val) \
15665     WMI_SET_BITS(flag, 16, 8, val)
15666 #define WMI_VDEV_STATS_PREFERRED_TX_STREAMS_320_GET(flag) \
15667     WMI_GET_BITS(flag, 16, 8)
15668 #define WMI_VDEV_STATS_PREFERRED_RX_STREAMS_320_SET(flag, val) \
15669     WMI_SET_BITS(flag, 24, 8, val)
15670 #define WMI_VDEV_STATS_PREFERRED_RX_STREAMS_320_GET(flag) \
15671     WMI_GET_BITS(flag, 24, 8)
15672 
15673 /* bits 7:0 unused / reserved */
15674 #define WMI_VDEV_STATS_GROUP_CIPHER_SET(flag, val) \
15675     WMI_SET_BITS(flag, 8, 8, val)
15676 #define WMI_VDEV_STATS_GROUP_CIPHER_GET(flag) \
15677     WMI_GET_BITS(flag, 8, 8)
15678 #define WMI_VDEV_STATS_ASSOC_ID_SET(flag, val) \
15679     WMI_SET_BITS(flag, 16, 16, val)
15680 #define WMI_VDEV_STATS_ASSOC_ID_GET(flag) \
15681     WMI_GET_BITS(flag, 16, 16)
15682 
15683 #define WMI_VDEV_STATS_BSS_CHANNEL_MHZ_SET(flag, val) \
15684     WMI_SET_BITS(flag, 0, 16, val)
15685 #define WMI_VDEV_STATS_BSS_CHANNEL_MHZ_GET(flag) \
15686     WMI_GET_BITS(flag, 0, 16)
15687 #define WMI_VDEV_STATS_CONFIG_FILS_PERIOD_SET(flag, val) \
15688     WMI_SET_BITS(flag, 16, 16, val)
15689 #define WMI_VDEV_STATS_CONFIG_FILS_PERIOD_GET(flag) \
15690     WMI_GET_BITS(flag, 16, 16)
15691 
15692 #define WMI_VDEV_STATS_CALC_FILS_PERIOD_SET(flag, val) \
15693     WMI_SET_BITS(flag, 0, 16, val)
15694 #define WMI_VDEV_STATS_CALC_FILS_PERIOD_GET(flag) \
15695     WMI_GET_BITS(flag, 0, 16)
15696 #define WMI_VDEV_STATS_IC_TXSEQS_CMN_SET(flag, val) \
15697     WMI_SET_BITS(flag, 16, 16, val)
15698 #define WMI_VDEV_STATS_IC_TXSEQS_CMN_GET(flag) \
15699     WMI_GET_BITS(flag, 16, 16)
15700 
15701 #define WMI_VDEV_STATS_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS_SET(flag, val) \
15702     WMI_SET_BITS(flag, 0, 16, val)
15703 #define WMI_VDEV_STATS_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS_GET(flag) \
15704     WMI_GET_BITS(flag, 0, 16)
15705 #define WMI_VDEV_STATS_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS_SET(flag, val) \
15706     WMI_SET_BITS(flag, 16, 16, val)
15707 #define WMI_VDEV_STATS_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS_GET(flag) \
15708     WMI_GET_BITS(flag, 16, 16)
15709 
15710 #define WMI_VDEV_STATS_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS_SET(flag, val) \
15711     WMI_SET_BITS(flag, 0, 16, val)
15712 #define WMI_VDEV_STATS_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS_GET(flag) \
15713     WMI_GET_BITS(flag, 0, 16)
15714 #define WMI_VDEV_STATS_CHAIN_MASK_SET(flag, val) \
15715     WMI_SET_BITS(flag, 16, 16, val)
15716 #define WMI_VDEV_STATS_CHAIN_MASK_GET(flag) \
15717     WMI_GET_BITS(flag, 16, 16)
15718 
15719 #define WMI_VDEV_STATS_NUM_MCAST_FILTERS_SET(flag, val) \
15720     WMI_SET_BITS(flag, 0, 16, val)
15721 #define WMI_VDEV_STATS_NUM_MCAST_FILTERS_GET(flag) \
15722     WMI_GET_BITS(flag, 0, 16)
15723 #define WMI_VDEV_STATS_EXT_CAP_IE_LEN_SET(flag, val) \
15724     WMI_SET_BITS(flag, 16, 16, val)
15725 #define WMI_VDEV_STATS_EXT_CAP_IE_LEN_GET(flag) \
15726     WMI_GET_BITS(flag, 16, 16)
15727 
15728 #define WMI_VDEV_STATS_FILS_CHANNEL_GUARD_TIME_SET(flag, val) \
15729     WMI_SET_BITS(flag, 0, 16, val)
15730 #define WMI_VDEV_STATS_FILS_CHANNEL_GUARD_TIME_GET(flag) \
15731     WMI_GET_BITS(flag, 0, 16)
15732 #define WMI_VDEV_STATS_FD_TMPL_LEN_SET(flag, val) \
15733     WMI_SET_BITS(flag, 16, 16, val)
15734 #define WMI_VDEV_STATS_FD_TMPL_LEN_GET(flag) \
15735     WMI_GET_BITS(flag, 16, 16)
15736 
15737 #define WMI_VDEV_STATS_COMMON_RSN_CAPS_SET(flag, val) \
15738     WMI_SET_BITS(flag, 0, 16, val)
15739 #define WMI_VDEV_STATS_COMMON_RSN_CAPS_GET(flag) \
15740     WMI_GET_BITS(flag, 0, 16)
15741 #define WMI_VDEV_STATS_OFF_CH_ACTIVE_DWELL_TIME_SET(flag, val) \
15742     WMI_SET_BITS(flag, 16, 16, val)
15743 #define WMI_VDEV_STATS_OFF_CH_ACTIVE_DWELL_TIME_GET(flag) \
15744     WMI_GET_BITS(flag, 16, 16)
15745 
15746 #define WMI_VDEV_STATS_OFF_CH_PASSIVE_DWELL_TIME_SET(flag, val) \
15747     WMI_SET_BITS(flag, 0, 16, val)
15748 #define WMI_VDEV_STATS_OFF_CH_PASSIVE_DWELL_TIME_GET(flag) \
15749     WMI_GET_BITS(flag, 0, 16)
15750 #define WMI_VDEV_STATS_CURRENT_PAUSE_REQUEST_ID_SET(flag, val) \
15751     WMI_SET_BITS(flag, 16, 16, val)
15752 #define WMI_VDEV_STATS_CURRENT_PAUSE_REQUEST_ID_GET(flag) \
15753     WMI_GET_BITS(flag, 16, 16)
15754 
15755 #define WMI_VDEV_STATS_HIDE_SSID_ENABLE_SET(flag, val) \
15756     WMI_SET_BITS(flag, 0, 1, val)
15757 #define WMI_VDEV_STATS_HIDE_SSID_ENABLE_GET(flag) \
15758     WMI_GET_BITS(flag, 0, 1)
15759 #define WMI_VDEV_STATS_B_NONE_PROTOCOL_PAUSED_SET(flag, val) \
15760     WMI_SET_BITS(flag, 1, 1, val)
15761 #define WMI_VDEV_STATS_B_NONE_PROTOCOL_PAUSED_GET(flag) \
15762     WMI_GET_BITS(flag, 1, 1)
15763 #define WMI_VDEV_STATS_DPD_CAL_STATE_SET(flag, val) \
15764     WMI_SET_BITS(flag, 2, 2, val)
15765 #define WMI_VDEV_STATS_DPD_CAL_STATE_GET(flag) \
15766     WMI_GET_BITS(flag, 2, 2)
15767 #define WMI_VDEV_STATS_REQ_BCN_Q_UNPAUSE_SET(flag, val) \
15768     WMI_SET_BITS(flag, 4, 1, val)
15769 #define WMI_VDEV_STATS_REQ_BCN_Q_UNPAUSE_GET(flag) \
15770     WMI_GET_BITS(flag, 4, 1)
15771 #define WMI_VDEV_STATS_BT_COEX_ENABLE_CTS2S_SET(flag, val) \
15772     WMI_SET_BITS(flag, 5, 1, val)
15773 #define WMI_VDEV_STATS_BT_COEX_ENABLE_CTS2S_GET(flag) \
15774     WMI_GET_BITS(flag, 5, 1)
15775 #define WMI_VDEV_STATS_DPD_DELAY_N_BEACON_SET(flag, val) \
15776     WMI_SET_BITS(flag, 6, 2, val)
15777 #define WMI_VDEV_STATS_DPD_DELAY_N_BEACON_GET(flag) \
15778     WMI_GET_BITS(flag, 6, 2)
15779 #define WMI_VDEV_STATS_B_NEED_CHECK_FIRST_BEACON_SET(flag, val) \
15780     WMI_SET_BITS(flag, 8, 1, val)
15781 #define WMI_VDEV_STATS_B_NEED_CHECK_FIRST_BEACON_GET(flag) \
15782     WMI_GET_BITS(flag, 8, 1)
15783 #define WMI_VDEV_STATS_AP_PEER_KEEPALIVE_MAX_IDLE_TIME_REACHED_SET(flag, val) \
15784     WMI_SET_BITS(flag, 9, 1, val)
15785 #define WMI_VDEV_STATS_AP_PEER_KEEPALIVE_MAX_IDLE_TIME_REACHED_GET(flag) \
15786     WMI_GET_BITS(flag, 9, 1)
15787 #define WMI_VDEV_STATS_LEAKYAP_CTS2S_ENABLE_SET(flag, val) \
15788     WMI_SET_BITS(flag, 10, 1, val)
15789 #define WMI_VDEV_STATS_LEAKYAP_CTS2S_ENABLE_GET(flag) \
15790     WMI_GET_BITS(flag, 10, 1)
15791 #define WMI_VDEV_STATS_STASAPSCC_IN_MCC_SET(flag, val) \
15792     WMI_SET_BITS(flag, 11, 1, val)
15793 #define WMI_VDEV_STATS_STASAPSCC_IN_MCC_GET(flag) \
15794     WMI_GET_BITS(flag, 11, 1)
15795 #define WMI_VDEV_STATS_STASAPSCC_IN_MCC_CTS2S_ENABLE_SET(flag, val) \
15796     WMI_SET_BITS(flag, 12, 1, val)
15797 #define WMI_VDEV_STATS_STASAPSCC_IN_MCC_CTS2S_ENABLE_GET(flag) \
15798     WMI_GET_BITS(flag, 12, 1)
15799 #define WMI_VDEV_STATS_IS_VDEV_STOPPING_SET(flag, val) \
15800     WMI_SET_BITS(flag, 13, 1, val)
15801 #define WMI_VDEV_STATS_IS_VDEV_STOPPING_GET(flag) \
15802     WMI_GET_BITS(flag, 13, 1)
15803 #define WMI_VDEV_STATS_IS_WMI_VDEV_DOWN_SET(flag, val) \
15804     WMI_SET_BITS(flag, 14, 1, val)
15805 #define WMI_VDEV_STATS_IS_WMI_VDEV_DOWN_GET(flag) \
15806     WMI_GET_BITS(flag, 14, 1)
15807 #define WMI_VDEV_STATS_IS_VDEV_DOWN_PENDING_SET(flag, val) \
15808     WMI_SET_BITS(flag, 15, 1, val)
15809 #define WMI_VDEV_STATS_IS_VDEV_DOWN_PENDING_GET(flag) \
15810     WMI_GET_BITS(flag, 15, 1)
15811 #define WMI_VDEV_STATS_VDEV_DELETE_IN_PROGRESS_SET(flag, val) \
15812     WMI_SET_BITS(flag, 16, 1, val)
15813 #define WMI_VDEV_STATS_VDEV_DELETE_IN_PROGRESS_GET(flag) \
15814     WMI_GET_BITS(flag, 16, 1)
15815 #define WMI_VDEV_STATS_CAC_ENABLED_SET(flag, val) \
15816     WMI_SET_BITS(flag, 17, 1, val)
15817 #define WMI_VDEV_STATS_CAC_ENABLED_GET(flag) \
15818     WMI_GET_BITS(flag, 17, 1)
15819 #define WMI_VDEV_STATS_IS_QUATERRATE_SET(flag, val) \
15820     WMI_SET_BITS(flag, 18, 1, val)
15821 #define WMI_VDEV_STATS_IS_QUATERRATE_GET(flag) \
15822     WMI_GET_BITS(flag, 18, 1)
15823 #define WMI_VDEV_STATS_IS_HALFRATE_SET(flag, val) \
15824     WMI_SET_BITS(flag, 19, 1, val)
15825 #define WMI_VDEV_STATS_IS_HALFRATE_GET(flag) \
15826     WMI_GET_BITS(flag, 19, 1)
15827 #define WMI_VDEV_STATS_STOP_RESP_EVENT_BLOCKED_SET(flag, val) \
15828     WMI_SET_BITS(flag, 20, 1, val)
15829 #define WMI_VDEV_STATS_STOP_RESP_EVENT_BLOCKED_GET(flag) \
15830     WMI_GET_BITS(flag, 20, 1)
15831 #define WMI_VDEV_STATS_USE_ENHANCED_MCAST_FILTER_SET(flag, val) \
15832     WMI_SET_BITS(flag, 21, 1, val)
15833 #define WMI_VDEV_STATS_USE_ENHANCED_MCAST_FILTER_GET(flag) \
15834     WMI_GET_BITS(flag, 21, 1)
15835 #define WMI_VDEV_STATS_IS_START_PENDING_ON_ASM_SET(flag, val) \
15836     WMI_SET_BITS(flag, 22, 1, val)
15837 #define WMI_VDEV_STATS_IS_START_PENDING_ON_ASM_GET(flag) \
15838     WMI_GET_BITS(flag, 22, 1)
15839 #define WMI_VDEV_STATS_NO_NULL_TO_AP_FOR_ROAMING_SET(flag, val) \
15840     WMI_SET_BITS(flag, 23, 1, val)
15841 #define WMI_VDEV_STATS_NO_NULL_TO_AP_FOR_ROAMING_GET(flag) \
15842     WMI_GET_BITS(flag, 23, 1)
15843 #define WMI_VDEV_STATS_IS_LOOPBACK_CAL_PENDING_SET(flag, val) \
15844     WMI_SET_BITS(flag, 24, 1, val)
15845 #define WMI_VDEV_STATS_IS_LOOPBACK_CAL_PENDING_GET(flag) \
15846     WMI_GET_BITS(flag, 24, 1)
15847 #define WMI_VDEV_STATS_VDEV_DELETE_ACKED_SET(flag, val) \
15848     WMI_SET_BITS(flag, 25, 1, val)
15849 #define WMI_VDEV_STATS_VDEV_DELETE_ACKED_GET(flag) \
15850     WMI_GET_BITS(flag, 25, 1)
15851 #define WMI_VDEV_STATS_BC_PROBERESP_ENABLE_SET(flag, val) \
15852     WMI_SET_BITS(flag, 26, 1, val)
15853 #define WMI_VDEV_STATS_BC_PROBERESP_ENABLE_GET(flag) \
15854     WMI_GET_BITS(flag, 26, 1)
15855 #define WMI_VDEV_STATS_IS_WMM_PARAM_SET_SET(flag, val) \
15856     WMI_SET_BITS(flag, 27, 1, val)
15857 #define WMI_VDEV_STATS_IS_WMM_PARAM_SET_GET(flag) \
15858     WMI_GET_BITS(flag, 27, 1)
15859 #define WMI_VDEV_STATS_IS_CONNECT_IN_PROGRESS_SET(flag, val) \
15860     WMI_SET_BITS(flag, 28, 1, val)
15861 #define WMI_VDEV_STATS_IS_CONNECT_IN_PROGRESS_GET(flag) \
15862     WMI_GET_BITS(flag, 28, 1)
15863 #define WMI_VDEV_STATS_IS_MU_EDCA_PARAM_SET_SET(flag, val) \
15864     WMI_SET_BITS(flag, 29, 1, val)
15865 #define WMI_VDEV_STATS_IS_MU_EDCA_PARAM_SET_GET(flag) \
15866     WMI_GET_BITS(flag, 29, 1)
15867 #define WMI_VDEV_STATS_SEND_DEL_RESP_TOHOST_SET(flag, val) \
15868     WMI_SET_BITS(flag, 30, 1, val)
15869 #define WMI_VDEV_STATS_SEND_DEL_RESP_TOHOST_GET(flag) \
15870     WMI_GET_BITS(flag, 30, 1)
15871 #define WMI_VDEV_STATS_IS_RESTART_DIFFERENT_CH_SET(flag, val) \
15872     WMI_SET_BITS(flag, 31, 1, val)
15873 #define WMI_VDEV_STATS_IS_RESTART_DIFFERENT_CH_GET(flag) \
15874     WMI_GET_BITS(flag, 31, 1)
15875 
15876 #define WMI_VDEV_STATS_PROTO_PS_STATUS_SET(flag, val) \
15877     WMI_SET_BITS(flag, 0, 1, val)
15878 #define WMI_VDEV_STATS_PROTO_PS_STATUS_GET(flag) \
15879     WMI_GET_BITS(flag, 0, 1)
15880 #define WMI_VDEV_STATS_SMPS_INTOLERANT_SET(flag, val) \
15881     WMI_SET_BITS(flag, 1, 1, val)
15882 #define WMI_VDEV_STATS_SMPS_INTOLERANT_GET(flag) \
15883     WMI_GET_BITS(flag, 1, 1)
15884 #define WMI_VDEV_STATS_IS_OFFLOAD_REGISTERED_FOR_CONNECTION_SET(flag, val) \
15885     WMI_SET_BITS(flag, 2, 1, val)
15886 #define WMI_VDEV_STATS_IS_OFFLOAD_REGISTERED_FOR_CONNECTION_GET(flag) \
15887     WMI_GET_BITS(flag, 2, 1)
15888 #define WMI_VDEV_STATS_IS_BSS_BEACON_OFFLOAD_REGISTERED_SET(flag, val) \
15889     WMI_SET_BITS(flag, 3, 1, val)
15890 #define WMI_VDEV_STATS_IS_BSS_BEACON_OFFLOAD_REGISTERED_GET(flag) \
15891     WMI_GET_BITS(flag, 3, 1)
15892 #define WMI_VDEV_STATS_IS_PROB_RESP_OFFLOAD_REGISTERED_SET(flag, val) \
15893     WMI_SET_BITS(flag, 4, 1, val)
15894 #define WMI_VDEV_STATS_IS_PROB_RESP_OFFLOAD_REGISTERED_GET(flag) \
15895     WMI_GET_BITS(flag, 4, 1)
15896 #define WMI_VDEV_STATS_IS_IBSS_BEACON_OFFLOAD_REGISTERED_SET(flag, val) \
15897     WMI_SET_BITS(flag, 5, 1, val)
15898 #define WMI_VDEV_STATS_IS_IBSS_BEACON_OFFLOAD_REGISTERED_GET(flag) \
15899     WMI_GET_BITS(flag, 5, 1)
15900 #define WMI_VDEV_STATS_IS_KEEPALIVE_ATTEMPTS_EXHAUSTED_SET(flag, val) \
15901     WMI_SET_BITS(flag, 6, 1, val)
15902 #define WMI_VDEV_STATS_IS_KEEPALIVE_ATTEMPTS_EXHAUSTED_GET(flag) \
15903     WMI_GET_BITS(flag, 6, 1)
15904 #define WMI_VDEV_STATS_IS_BCN_TX_IE_CHANGED_LOG_SET(flag, val) \
15905     WMI_SET_BITS(flag, 7, 1, val)
15906 #define WMI_VDEV_STATS_IS_BCN_TX_IE_CHANGED_LOG_GET(flag) \
15907     WMI_GET_BITS(flag, 7, 1)
15908 #define WMI_VDEV_STATS_HE_SU_BFEE_SET(flag, val) \
15909     WMI_SET_BITS(flag, 8, 1, val)
15910 #define WMI_VDEV_STATS_HE_SU_BFEE_GET(flag) \
15911     WMI_GET_BITS(flag, 8, 1)
15912 #define WMI_VDEV_STATS_HE_SU_BFER_SET(flag, val) \
15913     WMI_SET_BITS(flag, 9, 1, val)
15914 #define WMI_VDEV_STATS_HE_SU_BFER_GET(flag) \
15915     WMI_GET_BITS(flag, 9, 1)
15916 #define WMI_VDEV_STATS_HE_MU_BFEE_SET(flag, val) \
15917     WMI_SET_BITS(flag, 10, 1, val)
15918 #define WMI_VDEV_STATS_HE_MU_BFEE_GET(flag) \
15919     WMI_GET_BITS(flag, 10, 1)
15920 #define WMI_VDEV_STATS_HE_MU_BFER_SET(flag, val) \
15921     WMI_SET_BITS(flag, 11, 1, val)
15922 #define WMI_VDEV_STATS_HE_MU_BFER_GET(flag) \
15923     WMI_GET_BITS(flag, 11, 1)
15924 #define WMI_VDEV_STATS_HE_DL_OFDMA_SET(flag, val) \
15925     WMI_SET_BITS(flag, 12, 1, val)
15926 #define WMI_VDEV_STATS_HE_DL_OFDMA_GET(flag) \
15927     WMI_GET_BITS(flag, 12, 1)
15928 #define WMI_VDEV_STATS_HE_UL_OFDMA_SET(flag, val) \
15929     WMI_SET_BITS(flag, 13, 1, val)
15930 #define WMI_VDEV_STATS_HE_UL_OFDMA_GET(flag) \
15931     WMI_GET_BITS(flag, 13, 1)
15932 #define WMI_VDEV_STATS_HE_UL_MUMIMO_SET(flag, val) \
15933     WMI_SET_BITS(flag, 14, 1, val)
15934 #define WMI_VDEV_STATS_HE_UL_MUMIMO_GET(flag) \
15935     WMI_GET_BITS(flag, 14, 1)
15936 #define WMI_VDEV_STATS_UL_MU_RESP_SET(flag, val) \
15937     WMI_SET_BITS(flag, 15, 1, val)
15938 #define WMI_VDEV_STATS_UL_MU_RESP_GET(flag) \
15939     WMI_GET_BITS(flag, 15, 1)
15940 #define WMI_VDEV_STATS_ALT_RSSI_NON_SRG_SET(flag, val) \
15941     WMI_SET_BITS(flag, 16, 8, val)
15942 #define WMI_VDEV_STATS_ALT_RSSI_NON_SRG_GET(flag) \
15943     WMI_GET_BITS(flag, 16, 8)
15944 #define WMI_VDEV_STATS_ALT_RSSI_SRG_SET(flag, val) \
15945     WMI_SET_BITS(flag, 24, 8, val)
15946 #define WMI_VDEV_STATS_ALT_RSSI_SRG_GET(flag) \
15947     WMI_GET_BITS(flag, 24, 8)
15948 
15949 #define WMI_VDEV_STATS_HE_BSS_COLOR_EN_SET(flag, val) \
15950     WMI_SET_BITS(flag, 0, 1, val)
15951 #define WMI_VDEV_STATS_HE_BSS_COLOR_EN_GET(flag) \
15952     WMI_GET_BITS(flag, 0, 1)
15953 #define WMI_VDEV_STATS_HE_TXBF_OFDMA_SET(flag, val) \
15954     WMI_SET_BITS(flag, 1, 1, val)
15955 #define WMI_VDEV_STATS_HE_TXBF_OFDMA_GET(flag) \
15956     WMI_GET_BITS(flag, 1, 1)
15957 #define WMI_VDEV_STATS_NON_SRG_ENABLE_SET(flag, val) \
15958     WMI_SET_BITS(flag, 2, 1, val)
15959 #define WMI_VDEV_STATS_NON_SRG_ENABLE_GET(flag) \
15960     WMI_GET_BITS(flag, 2, 1)
15961 #define WMI_VDEV_STATS_SRG_ENABLE_SET(flag, val) \
15962     WMI_SET_BITS(flag, 3, 1, val)
15963 #define WMI_VDEV_STATS_SRG_ENABLE_GET(flag) \
15964     WMI_GET_BITS(flag, 3, 1)
15965 #define WMI_VDEV_STATS_SRP_ENABLE_SET(flag, val) \
15966     WMI_SET_BITS(flag, 4, 1, val)
15967 #define WMI_VDEV_STATS_SRP_ENABLE_GET(flag) \
15968     WMI_GET_BITS(flag, 4, 1)
15969 #define WMI_VDEV_STATS_SR_INITIALIZED_SET(flag, val) \
15970     WMI_SET_BITS(flag, 5, 1, val)
15971 #define WMI_VDEV_STATS_SR_INITIALIZED_GET(flag) \
15972     WMI_GET_BITS(flag, 5, 1)
15973 #define WMI_VDEV_STATS_SR_RINGS_INITIALIZED_SET(flag, val) \
15974     WMI_SET_BITS(flag, 6, 1, val)
15975 #define WMI_VDEV_STATS_SR_RINGS_INITIALIZED_GET(flag) \
15976     WMI_GET_BITS(flag, 6, 1)
15977 #define WMI_VDEV_STATS_PER_AC_OBSS_PD_ENABLE_SET(flag, val) \
15978     WMI_SET_BITS(flag, 7, 4, val)
15979 #define WMI_VDEV_STATS_PER_AC_OBSS_PD_ENABLE_GET(flag) \
15980     WMI_GET_BITS(flag, 7, 4)
15981 #define WMI_VDEV_STATS_IFUP_SET(flag, val) \
15982     WMI_SET_BITS(flag, 11, 1, val)
15983 #define WMI_VDEV_STATS_IFUP_GET(flag) \
15984     WMI_GET_BITS(flag, 11, 1)
15985 #define WMI_VDEV_STATS_IFACTIVE_SET(flag, val) \
15986     WMI_SET_BITS(flag, 12, 1, val)
15987 #define WMI_VDEV_STATS_IFACTIVE_GET(flag) \
15988     WMI_GET_BITS(flag, 12, 1)
15989 #define WMI_VDEV_STATS_IFPAUSED_SET(flag, val) \
15990     WMI_SET_BITS(flag, 13, 1, val)
15991 #define WMI_VDEV_STATS_IFPAUSED_GET(flag) \
15992     WMI_GET_BITS(flag, 13, 1)
15993 #define WMI_VDEV_STATS_IFOUTOFSYNC_SET(flag, val) \
15994     WMI_SET_BITS(flag, 14, 1, val)
15995 #define WMI_VDEV_STATS_IFOUTOFSYNC_GET(flag) \
15996     WMI_GET_BITS(flag, 14, 1)
15997 #define WMI_VDEV_STATS_IS_FREE_SET(flag, val) \
15998     WMI_SET_BITS(flag, 15, 1, val)
15999 #define WMI_VDEV_STATS_IS_FREE_GET(flag) \
16000     WMI_GET_BITS(flag, 15, 1)
16001 #define WMI_VDEV_STATS_IS_NAWDS_SET(flag, val) \
16002     WMI_SET_BITS(flag, 16, 1, val)
16003 #define WMI_VDEV_STATS_IS_NAWDS_GET(flag) \
16004     WMI_GET_BITS(flag, 16, 1)
16005 #define WMI_VDEV_STATS_HW_FLAG_SET(flag, val) \
16006     WMI_SET_BITS(flag, 17, 1, val)
16007 #define WMI_VDEV_STATS_HW_FLAG_GET(flag) \
16008     WMI_GET_BITS(flag, 17, 1)
16009 #define WMI_VDEV_STATS_CH_REQ_FLAG_SET(flag, val) \
16010     WMI_SET_BITS(flag, 18, 2, val)
16011 #define WMI_VDEV_STATS_CH_REQ_FLAG_GET(flag) \
16012     WMI_GET_BITS(flag, 18, 2)
16013 #define WMI_VDEV_STATS_RESTART_RESP_SET(flag, val) \
16014     WMI_SET_BITS(flag, 20, 1, val)
16015 #define WMI_VDEV_STATS_RESTART_RESP_GET(flag) \
16016     WMI_GET_BITS(flag, 20, 1)
16017 #define WMI_VDEV_STATS_FIRST_BEACON_RECV_WAIT_SET(flag, val) \
16018     WMI_SET_BITS(flag, 21, 1, val)
16019 #define WMI_VDEV_STATS_FIRST_BEACON_RECV_WAIT_GET(flag) \
16020     WMI_GET_BITS(flag, 21, 1)
16021 #define WMI_VDEV_STATS_ERPENABLED_SET(flag, val) \
16022     WMI_SET_BITS(flag, 22, 1, val)
16023 #define WMI_VDEV_STATS_ERPENABLED_GET(flag) \
16024     WMI_GET_BITS(flag, 22, 1)
16025 #define WMI_VDEV_STATS_START_RESPONDED_SET(flag, val) \
16026     WMI_SET_BITS(flag, 23, 1, val)
16027 #define WMI_VDEV_STATS_START_RESPONDED_GET(flag) \
16028     WMI_GET_BITS(flag, 23, 1)
16029 #define WMI_VDEV_STATS_BCN_SYNC_CRIT_REQ_ACT_SET(flag, val) \
16030     WMI_SET_BITS(flag, 24, 1, val)
16031 #define WMI_VDEV_STATS_BCN_SYNC_CRIT_REQ_ACT_GET(flag) \
16032     WMI_GET_BITS(flag, 24, 1)
16033 #define WMI_VDEV_STATS_RECAL_NOTIF_REGISTERED_SET(flag, val) \
16034     WMI_SET_BITS(flag, 25, 1, val)
16035 #define WMI_VDEV_STATS_RECAL_NOTIF_REGISTERED_GET(flag) \
16036     WMI_GET_BITS(flag, 25, 1)
16037 #define WMI_VDEV_STATS_BCN_TX_PAUSED_SET(flag, val) \
16038     WMI_SET_BITS(flag, 26, 1, val)
16039 #define WMI_VDEV_STATS_BCN_TX_PAUSED_GET(flag) \
16040     WMI_GET_BITS(flag, 26, 1)
16041 #define WMI_VDEV_STATS_HE_BSS_COLOR_EN_BYPASS_SET(flag, val) \
16042     WMI_SET_BITS(flag, 27, 1, val)
16043 #define WMI_VDEV_STATS_HE_BSS_COLOR_EN_BYPASS_GET(flag) \
16044     WMI_GET_BITS(flag, 27, 1)
16045 #define WMI_VDEV_STATS_DEFAULT_BA_MODE_SET(flag, val) \
16046     WMI_SET_BITS(flag, 28, 1, val)
16047 #define WMI_VDEV_STATS_DEFAULT_BA_MODE_GET(flag) \
16048     WMI_GET_BITS(flag, 28, 1)
16049 #define WMI_VDEV_STATS_BA_256_BITMAP_ENABLE_SET(flag, val) \
16050     WMI_SET_BITS(flag, 29, 1, val)
16051 #define WMI_VDEV_STATS_BA_256_BITMAP_ENABLE_GET(flag) \
16052     WMI_GET_BITS(flag, 29, 1)
16053 #define WMI_VDEV_STATS_BA_256_BITMAP_TX_DISABLE_SET(flag, val) \
16054     WMI_SET_BITS(flag, 30, 1, val)
16055 #define WMI_VDEV_STATS_BA_256_BITMAP_TX_DISABLE_GET(flag) \
16056     WMI_GET_BITS(flag, 30, 1)
16057 #define WMI_VDEV_STATS_IS_MULTI_GROUP_KEY_ENABLED_SET(flag, val) \
16058     WMI_SET_BITS(flag, 31, 1, val)
16059 #define WMI_VDEV_STATS_IS_MULTI_GROUP_KEY_ENABLED_GET(flag) \
16060     WMI_GET_BITS(flag, 31, 1)
16061 
16062 typedef struct {
16063     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_sta_rrm_stats_struct */
16064     A_UINT32 tlv_header;
16065     A_UINT32 dot11GroupTransmittedFrameCount;
16066     A_UINT32 dot11GroupReceivedFrameCount;
16067     A_UINT32 dot11TransmittedFrameCount;
16068     A_UINT32 dot11AckFailureCount;
16069     A_UINT32 dot11FailedCount;
16070     A_UINT32 dot11FCSErrorCount;
16071     A_UINT32 dot11RTSSuccessCount;
16072     A_UINT32 dot11RTSFailureCount;
16073 } wmi_ctrl_path_sta_rrm_stats_struct;
16074 
16075 /**
16076  *  peer statistics.
16077  */
16078 typedef struct {
16079     /** peer MAC address */
16080     wmi_mac_addr peer_macaddr;
16081     /** RSSI */
16082     A_UINT32 peer_rssi;
16083     /** last tx data rate used for peer */
16084     A_UINT32 peer_tx_rate;
16085     /** last rx data rate used for peer */
16086     A_UINT32 peer_rx_rate;
16087 } wmi_peer_stats;
16088 
16089 /**
16090  *  Peer extension statistics
16091  */
16092 typedef struct {
16093     /** peer MAC address */
16094     wmi_mac_addr peer_macaddr;
16095     /* lower 32 bits of rx duration in microseconds */
16096     A_UINT32 rx_duration;
16097     /** Total TX bytes (including dot11 header) sent to peer */
16098     A_UINT32 peer_tx_bytes;
16099     /** Total RX bytes (including dot11 header) received from peer */
16100     A_UINT32 peer_rx_bytes;
16101     /** last TX ratecode */
16102     A_UINT32 last_tx_rate_code;
16103     /** TX power used by peer - units are 0.5 dBm */
16104     A_INT32 last_tx_power;
16105 
16106     /* Total number of received multicast & broadcast data frames corresponding to this peer */
16107     A_UINT32 rx_mc_bc_cnt; /* 1 in the MSB of rx_mc_bc_cnt represents a valid data */
16108     /* upper 32 bits of rx duration in microseconds */
16109     A_UINT32 rx_duration_u32; /* 1 in the most significant bit indicates this field contains valid data */
16110     A_UINT32 reserved[2]; /** for future use - add new peer stats here */
16111 } wmi_peer_extd_stats;
16112 
16113 typedef struct {
16114     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_extd2_stats */
16115     /** peer MAC address */
16116     wmi_mac_addr peer_macaddr;
16117     /*
16118      * The following rx_bytes field (lower/upper pair) counts only the
16119      * MSDU bytes (after 802.11 decap, if applicable), and thus doesn't
16120      * count the 802.11 header, unlike the wmi_peer_extd_stats.peer_rx_bytes
16121      * and wmi_peer_stats_info.rx_bytes fields.
16122      */
16123     /** Lower 32 bits of the rx_bytes (size of MSDUs) excluding dot11 header from this peer */
16124     A_UINT32 rx_bytes_l32;
16125     /** Upper 32 bits of the rx_bytes (size of MSDUs) excluding dot11 header from this peer */
16126     A_UINT32 rx_bytes_u32;
16127     /** Number of MPDUS received with FCS error from this peer */
16128     A_UINT32 rx_fcs_err;
16129     /** Number of MPDUs(both data and non data) received from this peer */
16130     A_UINT32 rx_mpdus;
16131     /** nss of last tx data to peer */
16132     A_UINT32 last_tx_nss;
16133     /** nss of last rx data from peer */
16134     A_UINT32 last_rx_nss;
16135     /** chain mask used for last tx data to peer */
16136     A_UINT32 last_tx_chain_mask;
16137     /** chain mask used for last rx data from peer */
16138     A_UINT32 last_rx_chain_mask;
16139 } wmi_peer_extd2_stats;
16140 
16141 typedef struct {
16142     /** Primary channel freq of the channel for which stats are sent */
16143     A_UINT32 chan_mhz;
16144     /** Time spent on the channel */
16145     A_UINT32 sampling_period_us;
16146     /** Aggregate duration over a sampling period for which channel activity was observed */
16147     A_UINT32 rx_clear_count;
16148     /** Accumalation of the TX PPDU duration over a sampling period */
16149     A_UINT32 tx_duration_us;
16150     /** Accumalation of the RX PPDU duration over a sampling period */
16151     A_UINT32 rx_duration_us;
16152 } wmi_chan_stats;
16153 
16154 /**
16155  * MIB statistics.  See 802.11 spec for the meaning of each field.
16156  */
16157 typedef struct {
16158     A_UINT32 tx_mpdu_grp_frag_cnt;       /*dot11TransmittedFragmentCount */
16159     A_UINT32 tx_msdu_grp_frm_cnt;        /*dot11GroupTransmittedFrameCount */
16160     A_UINT32 tx_msdu_fail_cnt;           /*dot11FailedCount*/
16161     A_UINT32 rx_mpdu_frag_cnt;           /*dot11ReceivedFragmentCount*/
16162     A_UINT32 rx_msdu_grp_frm_cnt;        /*dot11GroupReceivedFrameCount*/
16163     A_UINT32 rx_mpdu_fcs_err;            /*dot11FCSErrorCount*/
16164     A_UINT32 tx_msdu_frm_cnt;            /*dot11TransmittedFrameCount*/
16165     A_UINT32 tx_msdu_retry_cnt;          /*dot11RetryCount*/
16166     A_UINT32 rx_frm_dup_cnt;             /*dot11FrameDuplicateCount */
16167     A_UINT32 tx_rts_success_cnt;         /*dot11RTSSuccessCount*/
16168     A_UINT32 tx_rts_fail_cnt;            /*dot11RTSFailureCount*/
16169     A_UINT32 tx_Qos_mpdu_grp_frag_cnt;   /*dot11QosTransmittedFragmentCount */
16170     A_UINT32 tx_Qos_msdu_fail_UP;        /*dot11QosFailedCount */
16171     A_UINT32 tx_Qos_msdu_retry_UP;       /*dot11QosRetryCount */
16172     A_UINT32 rx_Qos_frm_dup_cnt_UP;      /*dot11QosFrameDuplicateCount*/
16173     A_UINT32 tx_Qos_rts_success_cnt_UP;  /*dot11QosRTSSuccessCount*/
16174     A_UINT32 tx_Qos_rts_fail_cnt_UP;     /*dot11QosRTSFailureCount*/
16175     A_UINT32 rx_Qos_mpdu_frag_cnt_UP;    /*dot11QosReceivedFragmentCount*/
16176     A_UINT32 tx_Qos_msdu_frm_cnt_UP;     /*dot11QosTransmittedFrameCount*/
16177     A_UINT32 rx_Qos_msdu_discard_cnt_UP; /*dot11QosDiscardedFrameCount*/
16178     A_UINT32 rx_Qos_mpdu_cnt;            /*dot11QosMPDUsReceivedCount*/
16179     A_UINT32 rx_Qos_mpdu_retryBit_cnt;   /*dot11QosRetriesReceivedCount*/
16180     A_UINT32 rsna_Mgmt_discard_CCMP_replay_err_cnt; /*dot11RSNAStatsRobustMgmtCCMPReplays*/
16181     A_UINT32 rsna_TKIP_icv_err_cnt;      /*dot11RSNAStatsTKIPICVErrors*/
16182     A_UINT32 rsna_TKIP_replay_err_cnt;   /*dot11RSNAStatsTKIPReplays*/
16183     A_UINT32 rsna_CCMP_decrypt_err_cnt;  /*dot11RSNAStatsCCMPDecryptErrors*/
16184     A_UINT32 rsna_CCMP_replay_err_cnt;   /*dot11RSNAStatsCCMPReplays*/
16185     A_UINT32 tx_ampdu_cnt;               /*dot11TransmittedAMPDUCount*/
16186     A_UINT32 tx_mpdu_cnt_in_ampdu;       /*dot11TransmittedMPDUsInAMPDUCount*/
16187     union {
16188         A_UINT64 counter; /* for use by target only */
16189         struct {
16190             A_UINT32 low;
16191             A_UINT32 high;
16192         } upload; /* for use by host */
16193     } tx_octets_in_ampdu;                /*dot11TransmittedOctetsInAMPDUCount*/
16194     A_UINT32 rx_ampdu_cnt;               /*dot11AMPDUReceivedCount*/
16195     A_UINT32 rx_mpdu_cnt_in_ampdu;       /*dot11MPDUInReceivedAMPDUCount*/
16196     union {
16197         A_UINT64 counter; /* for use by target only */
16198         struct {
16199             A_UINT32 rx_octets_in_ampdu_low;
16200             A_UINT32 rx_octets_in_ampdu_high;
16201         } upload; /* for use by host */
16202     } rx_octets_in_ampdu;                /*dot11ReceivedOctetsInAMPDUCount*/
16203     A_UINT32 reserved_1;
16204     A_UINT32 reserved_2;
16205     A_UINT32 reserved_3;
16206     A_UINT32 reserved_4;
16207 } wmi_mib_stats;
16208 
16209 /**
16210  *  MIB extension statistics.
16211  */
16212 typedef struct {
16213     A_UINT32 tx_msdu_multi_retry_cnt;    /*dot11MultipleRetryCount*/
16214     A_UINT32 tx_ack_fail_cnt;            /*dot11ACKFailureCount*/
16215     A_UINT32 tx_qos_msdu_multi_retry_up; /*dot11QosMultipleRetryCount*/
16216     A_UINT32 tx_qos_ack_fail_cnt_up;     /*dot11QosACKFailureCount*/
16217     A_UINT32 rsna_cmac_icv_err_cnt;      /*dot11RSNAStatsCMACICVErrors*/
16218     A_UINT32 rsna_cmac_replay_err_cnt;   /*dot11RSNAStatsCMACReplays*/
16219     A_UINT32 rx_ampdu_deli_crc_err_cnt;  /*dot11AMPDUDelimiterCRCErrorCount*/
16220     A_UINT32 reserved[8];    /* Reserve more fields for future extension */
16221 } wmi_mib_extd_stats;
16222 
16223 /**
16224  *  Beacon protection statistics.
16225  */
16226 typedef struct {
16227     A_UINT32 tlv_header;        /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pmf_bcn_protect_stats */
16228     A_UINT32 igtk_mic_fail_cnt; /* MIC failure count of management packets using IGTK */
16229     A_UINT32 igtk_replay_cnt;   /* Replay detection count of management packets using IGTK */
16230     A_UINT32 bcn_mic_fail_cnt;  /* MIC failure count of beacon packets using BIGTK */
16231     A_UINT32 bcn_replay_cnt;    /* Replay detection count of beacon packets using BIGTK */
16232 } wmi_pmf_bcn_protect_stats;
16233 
16234 typedef struct {
16235     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_stats */
16236     A_UINT32 vdev_id;
16237     A_INT32  rssi_avg_beacon[WMI_MAX_CHAINS];
16238     A_INT32  rssi_avg_data[WMI_MAX_CHAINS];
16239     wmi_mac_addr peer_macaddr;
16240 } wmi_rssi_stats;
16241 
16242 typedef struct {
16243     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_congestion_stats */
16244     A_UINT32 vdev_id;
16245    /* congestion -
16246     * This field holds the congestion percentage = (busy_time/total_time)*100
16247     * for the interval from when the vdev was started to the current time
16248     * (or the time at which the vdev was stopped).
16249     */
16250     A_UINT32 congestion;
16251 } wmi_congestion_stats;
16252 
16253 typedef struct {
16254     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_per_chain_rssi_stats */
16255     A_UINT32 num_per_chain_rssi_stats;
16256 /* This TLV is followed by another TLV of array of structs:
16257  *     wmi_rssi_stats rssi_stats[num_per_chain_rssi_stats];
16258  */
16259 } wmi_per_chain_rssi_stats;
16260 
16261 /* vdev control flags (per bits) */
16262 #define VDEV_FLAGS_NON_MBSSID_AP      0x00000001   /* legacy AP */
16263 #define VDEV_FLAGS_TRANSMIT_AP        0x00000002   /* indicate if this vdev is transmitting AP */
16264 #define VDEV_FLAGS_NON_TRANSMIT_AP    0x00000004   /* explicitly indicate this vdev is non-transmitting AP */
16265 #define VDEV_FLAGS_EMA_MODE           0x00000008   /* vdev is EMA and supports multiple beacon profiles.
16266                                                     * Once this flag set, flags VDEV_FLAGS_TRANSMIT_AP and
16267                                                     * VDEV_FLAGS_NON_TRANSMIT_AP classify it as either Tx vap
16268                                                     * or non Tx vap.
16269                                                     */
16270 #define VDEV_FLAGS_SCAN_MODE_VAP      0x00000010   /* for Scan Radio vdev will be special vap.
16271                                                     * There will not be WMI_VDEV_UP_CMD, there will be only WMI_VDEV_CREATE_CMD
16272                                                     * and WMI_VDEV_START_REQUEST_CMD. Based on this parameter need to make decision like
16273                                                     * vdev Pause/Unpause at WMI_VDEV_START_REQUEST_CMD.
16274                                                     */
16275 /* get/set/check macros for VDEV_FLAGS_SCAN_MODE_VAP flag */
16276 #define WMI_SCAN_MODE_VDEV_FLAG_GET(flag)            WMI_GET_BITS(flag, 4, 1)
16277 #define WMI_SCAN_MODE_VDEV_FLAG_SET(flag, val)       WMI_SET_BITS(flag, 4, 1, val)
16278 
16279 #define WMI_SCAN_MODE_VDEV_FLAG_ENABLED(flag)        ((flag & VDEV_FLAGS_SCAN_MODE_VAP) ? 1 : 0)
16280 
16281 typedef struct {
16282     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_create_cmd_fixed_param */
16283     /** unique id identifying the VDEV, generated by the caller */
16284     A_UINT32 vdev_id;
16285     /** VDEV type (AP,STA,IBSS,MONITOR) */
16286     A_UINT32 vdev_type;
16287     /** VDEV subtype (P2PDEV, P2PCLI, P2PGO, BT3.0, BRIDGE) */
16288     A_UINT32 vdev_subtype;
16289     /** VDEV MAC address */
16290     wmi_mac_addr vdev_macaddr;
16291     /** Number of configured txrx streams */
16292     A_UINT32 num_cfg_txrx_streams;
16293     /**
16294      * pdev_id for identifying the MAC,
16295      * See macros starting with WMI_PDEV_ID_ for values.
16296      */
16297     A_UINT32 pdev_id;
16298     /** control flags for this vdev (DEPRECATED)
16299      * Use @mbss_capability_flags in vdev start instead.
16300      */
16301     A_UINT32 flags;
16302     /**  vdevid of transmitted AP (mbssid case) (DEPRECATED)
16303      * Use @vdevid_trans in vdev start instead.
16304      */
16305     A_UINT32 vdevid_trans;
16306     /* vdev_stats_id_valid indicates whether vdev_stats_id is valid */
16307     A_UINT32 vdev_stats_id_valid;
16308     /**
16309      * vdev_stats_id indicates the ID for the REO Rx stats collection
16310      * For Beryllium: 0-47 is the valid range and >=48 is invalid
16311      * This vdev_stats_id field should be ignored unless the
16312      * vdev_stats_id_valid field is non-zero.
16313      */
16314     A_UINT32 vdev_stats_id;
16315 /* This TLV is followed by another TLV of array of structures
16316  *   wmi_vdev_txrx_streams cfg_txrx_streams[];
16317  *   wmi_vdev_create_mlo_params mlo_params[0,1];
16318  *       optional TLV, only present for MLO vdev;
16319  *       if the vdev is not MLO the array length should be 0.
16320  */
16321 } wmi_vdev_create_cmd_fixed_param;
16322 
16323 typedef struct {
16324     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_txrx_streams */
16325     /* band - Should take values from wmi_channel_band_mask */
16326     A_UINT32 band;
16327     /* max supported tx streams per given band for this vdev */
16328     A_UINT32 supported_tx_streams;
16329     /* max supported rx streams per given band for this vdev */
16330     A_UINT32 supported_rx_streams;
16331 } wmi_vdev_txrx_streams;
16332 
16333 /* wmi_p2p_noa_descriptor structure can't be modified without breaking the compatibility for WMI_HOST_SWBA_EVENTID */
16334 typedef struct {
16335     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_descriptor */
16336     A_UINT32 type_count; /** 255: continuous schedule, 0: reserved */
16337     A_UINT32 duration; /** Absent period duration in micro seconds */
16338     A_UINT32 interval; /** Absent period interval in micro seconds */
16339     A_UINT32 start_time; /** 32 bit tsf time when in starts */
16340 } wmi_p2p_noa_descriptor;
16341 
16342 /*
16343  * mlo_flags sub-fields:
16344  * bits 0    - mlo enable flag;
16345  * bits 1    - assoc link flag;
16346  * bits 2    - primary_umac flag;
16347  * bits 3    - is logical link index valid
16348  * bits 4    - is mlo peer id valid
16349  */
16350 #define WMI_MLO_FLAGS_GET_ENABLED(mlo_flags)                WMI_GET_BITS(mlo_flags, 0, 1)
16351 #define WMI_MLO_FLAGS_SET_ENABLED(mlo_flags, value)         WMI_SET_BITS(mlo_flags, 0, 1, value)
16352 #define WMI_MLO_FLAGS_GET_ASSOC_LINK(mlo_flags)             WMI_GET_BITS(mlo_flags, 1, 1)
16353 #define WMI_MLO_FLAGS_SET_ASSOC_LINK(mlo_flags, value)      WMI_SET_BITS(mlo_flags, 1, 1, value)
16354 #define WMI_MLO_FLAGS_GET_PRIMARY_UMAC(mlo_flags)           WMI_GET_BITS(mlo_flags, 2, 1)
16355 #define WMI_MLO_FLAGS_SET_PRIMARY_UMAC(mlo_flags, value)    WMI_SET_BITS(mlo_flags, 2, 1, value)
16356 #define WMI_MLO_FLAGS_GET_LINK_INDEX_VALID(mlo_flags)       WMI_GET_BITS(mlo_flags, 3, 1)
16357 #define WMI_MLO_FLAGS_SET_LINK_INDEX_VALID(mlo_flags, value) WMI_SET_BITS(mlo_flags, 3, 1, value)
16358 #define WMI_MLO_FLAGS_GET_PEER_ID_VALID(mlo_flags)          WMI_GET_BITS(mlo_flags, 4, 1)
16359 #define WMI_MLO_FLAGS_SET_PEER_ID_VALID(mlo_flags, value)   WMI_SET_BITS(mlo_flags, 4, 1, value)
16360 #define WMI_MLO_FLAGS_GET_MCAST_VDEV(mlo_flags)             WMI_GET_BITS(mlo_flags, 5, 1)
16361 #define WMI_MLO_FLAGS_SET_MCAST_VDEV(mlo_flags, value)      WMI_SET_BITS(mlo_flags, 5, 1, value)
16362 #define WMI_MLO_FLAGS_GET_EMLSR_SUPPORT(mlo_flags)          WMI_GET_BITS(mlo_flags, 6, 1)
16363 #define WMI_MLO_FLAGS_SET_EMLSR_SUPPORT(mlo_flags, value)   WMI_SET_BITS(mlo_flags, 6, 1, value)
16364 #define WMI_MLO_FLAGS_GET_FORCE_LINK_INACTIVE(mlo_flags)    WMI_GET_BITS(mlo_flags, 7, 1)
16365 #define WMI_MLO_FLAGS_SET_FORCE_LINK_INACTIVE(mlo_flags, value) WMI_SET_BITS(mlo_flags, 7, 1, value)
16366 #define WMI_MLO_FLAGS_GET_LINK_ADD(mlo_flags)               WMI_GET_BITS(mlo_flags, 8, 1)
16367 #define WMI_MLO_FLAGS_SET_LINK_ADD(mlo_flags, value)        WMI_SET_BITS(mlo_flags, 8, 1, value)
16368 #define WMI_MLO_FLAGS_GET_LINK_DEL(mlo_flags)               WMI_GET_BITS(mlo_flags, 9, 1)
16369 #define WMI_MLO_FLAGS_SET_LINK_DEL(mlo_flags, value)        WMI_SET_BITS(mlo_flags, 9, 1, value)
16370 #define WMI_MLO_FLAGS_GET_BRIDGE_PEER(mlo_flags)            WMI_GET_BITS(mlo_flags, 10, 1)
16371 #define WMI_MLO_FLAGS_SET_BRIDGE_PEER(mlo_flags, value)     WMI_SET_BITS(mlo_flags, 10, 1, value)
16372 #define WMI_MLO_FLAGS_GET_NSTR_BITMAP_PRESENT(mlo_flags)    WMI_GET_BITS(mlo_flags, 11, 1)
16373 #define WMI_MLO_FLAGS_SET_NSTR_BITMAP_PRESENT(mlo_flags, value) WMI_SET_BITS(mlo_flags, 11, 1, value)
16374 #define WMI_MLO_FLAGS_GET_NSTR_BITMAP_SIZE(mlo_flags)       WMI_GET_BITS(mlo_flags, 12, 1)
16375 #define WMI_MLO_FLAGS_SET_NSTR_BITMAP_SIZE(mlo_flags, value) WMI_SET_BITS(mlo_flags, 12, 1, value)
16376 #define WMI_MLO_FLAGS_GET_MLO_LINK_SWITCH(mlo_flags)        WMI_GET_BITS(mlo_flags, 13, 1)
16377 #define WMI_MLO_FLAGS_SET_MLO_LINK_SWITCH(mlo_flags, value) WMI_SET_BITS(mlo_flags, 13, 1, value)
16378 #define WMI_MLO_FLAGS_GET_MLO_BRIDGE_LINK(mlo_flags)        WMI_GET_BITS(mlo_flags, 14, 1)
16379 #define WMI_MLO_FLAGS_SET_MLO_BRIDGE_LINK(mlo_flags, value) WMI_SET_BITS(mlo_flags, 14, 1, value)
16380 
16381 /* this structure used for pass mlo flags*/
16382 typedef struct {
16383     union {
16384         struct {
16385             A_UINT32 mlo_enabled:1, /* indicate is MLO enabled */
16386                      mlo_assoc_link:1, /* indicate is the link used to initialize the association of mlo connection */
16387                      mlo_primary_umac:1, /* indicate is the link on primary UMAC, WIN only flag */
16388                      mlo_logical_link_index_valid:1, /* indicate if the logial link index in wmi_peer_assoc_mlo_params is valid */
16389                      mlo_peer_id_valid:1, /* indicate if the mlo peer id in wmi_peer_assoc_mlo_params is valid */
16390                      mlo_mcast_vdev:1, /* indicate this is the MLO mcast primary vdev */
16391                      emlsr_support:1, /* indicate that eMLSR is supported */
16392                      mlo_force_link_inactive:1, /* indicate this link is forced inactive */
16393                      mlo_link_add:1, /* Indicate dynamic link addition in an MLD VAP */
16394                      mlo_link_del:1, /* Indicate dynamic link deletion in an MLD VAP */
16395                      mlo_bridge_peer:1, /* Indicate if this link has bridge_peer */
16396                      nstr_bitmap_present:1, /* Indicate if at least one NSTR link pair is present in the MLD */
16397                      /* nstr_bitmap_size:
16398                       * Set to 1 if the length of the corresponding NSTR
16399                       * Indication Bitmap subfield is equal to 2 octets.
16400                       * Set to 0 if the length of the corresponding NSTR
16401                       * Indication Bitmap subfield is equal to 1 octet.
16402                       */
16403                      nstr_bitmap_size:1,
16404                      mlo_link_switch: 1, /* indicate the command is a part of link switch procedure */
16405                      mlo_bridge_link:1, /* indicate link is bridge link */
16406                      unused: 17;
16407         };
16408         A_UINT32 mlo_flags;
16409     };
16410 /* NOTE:
16411  * Since this struct is embedded inside WMI TLV structs, it cannot
16412  * have any fields added, as expanding this struct would break
16413  * backwards-compatibility by changing the offsets of the subsequent
16414  * fields in the structs that contain this struct.
16415  */
16416 } wmi_mlo_flags;
16417 
16418 typedef struct {
16419     A_UINT32 tlv_header;/** TLV tag (WMITLV_TAG_STRUC_wmi_partner_link_params) and len;*/
16420     A_UINT32 vdev_id; /** partner vdev_id */
16421     A_UINT32 hw_link_id; /** hw_link_id: Unique link id across SOCs, got as part of QMI handshake */
16422     wmi_mac_addr vdev_macaddr; /** VDEV MAC address */
16423     wmi_mlo_flags mlo_flags;
16424 } wmi_partner_link_params;
16425 
16426 /* this TLV structure used for pass mlo parameters on vdev create*/
16427 typedef struct {
16428     A_UINT32 tlv_header; /** TLV tag and len; */
16429     /** MLD MAC address */
16430     wmi_mac_addr mld_macaddr;
16431 } wmi_vdev_create_mlo_params;
16432 
16433 /* this TLV structure used for pass mlo parameters on vdev start*/
16434 typedef struct {
16435     A_UINT32 tlv_header; /** TLV tag and len; */
16436     wmi_mlo_flags mlo_flags; /*only mlo enable and assoc link flag need by vdev start*/
16437 } wmi_vdev_start_mlo_params;
16438 
16439 /* this TLV structure used for passing mlo parameters on vdev stop */
16440 typedef struct {
16441     A_UINT32 tlv_header; /** TLV tag and len; */
16442     wmi_mlo_flags mlo_flags; /* only mlo_link_switch flag needed by vdev stop */
16443 } wmi_vdev_stop_mlo_params;
16444 
16445 typedef struct {
16446     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_update_mac_addr_cmd_fixed_param */
16447     /** Unique id identifying the VDEV to update mac addr */
16448     A_UINT32 vdev_id;
16449     /** New VDEV MAC address to configure */
16450     wmi_mac_addr vdev_macaddr;
16451     /** New MLD MAC address to configure */
16452     wmi_mac_addr mld_macaddr;
16453 } wmi_vdev_update_mac_addr_cmd_fixed_param;
16454 
16455 typedef struct {
16456     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_update_mac_addr_conf_event_fixed_param */
16457     /** Unique id identifying the VDEV */
16458     A_UINT32 vdev_id;
16459     /*
16460      * Status of mac address update request.
16461      * Refer to wmi_vdev_update_mac_addr_conf_status.
16462      */
16463     A_UINT32 status;
16464 } wmi_vdev_update_mac_addr_conf_event_fixed_param;
16465 
16466 /** VDEV update mac address event response status codes */
16467 typedef enum {
16468     /** VDEV mac address updated successfully */
16469     WMI_VDEV_UPDATE_MAC_ADDR_CONF_STATUS_SUCCESS = 0,
16470     /** Requested VDEV not found */
16471     WMI_VDEV_UPDATE_MAC_ADDR_CONF_STATUS_INVALID_VDEVID = 1,
16472     /** Unsupported VDEV combination.eg: received cmd in VDEV connected state */
16473     WMI_VDEV_UPDATE_MAC_ADDR_CONF_STATUS_NOT_SUPPORTED = 2,
16474     /** FW internal failure to update mac address */
16475     WMI_VDEV_UPDATE_MAC_ADDR_CONF_STATUS_INTERNAL_FAIL = 3,
16476 } wmi_vdev_update_mac_addr_conf_status;
16477 
16478 /** values for vdev_type */
16479 #define WMI_VDEV_TYPE_AP         0x1
16480 #define WMI_VDEV_TYPE_STA        0x2
16481 #define WMI_VDEV_TYPE_IBSS       0x3
16482 #define WMI_VDEV_TYPE_MONITOR    0x4
16483 
16484 /** VDEV type is for social wifi interface.This VDEV is Currently mainly needed
16485 * by FW to execute the NAN specific WMI commands and also implement NAN specific
16486 * operations like Network discovery, service provisioning and service
16487 * subscription  ..etc. If FW needs NAN VDEV then Host should issue VDEV create
16488 * WMI command to create this VDEV once during initialization and host is not
16489 * expected to use any VDEV specific WMI commands on this VDEV.
16490 **/
16491 #define WMI_VDEV_TYPE_NAN        0x5
16492 
16493 #define WMI_VDEV_TYPE_OCB        0x6
16494 
16495 /* NAN Data Interface */
16496 #define WMI_VDEV_TYPE_NDI        0x7
16497 
16498 #define WMI_VDEV_TYPE_MESH_POINT 0x8
16499 
16500 /*
16501  * Param values to be sent for WMI_VDEV_PARAM_SGI command
16502  * which are used in 11ax, 11be systems
16503  */
16504 #define WMI_SGI_LEGACY         0x1 /* for HT and VHT   */
16505 #define WMI_SGI_HE_400_NS      0x2 /* for HE 400 nsec  */
16506 #define WMI_SGI_HE_800_NS      0x4 /* for HE 800 nsec  */
16507 #define WMI_SGI_HE_1600_NS     0x8 /* for HE 1600 nsec */
16508 #define WMI_SGI_HE_3200_NS    0x10 /* for HE 3200 nsec */
16509 #define WMI_SGI_EHT_800_NS    0x20 /* for EHT 800 nsec  */
16510 #define WMI_SGI_EHT_1600_NS   0x40 /* for EHT 1600 nsec */
16511 #define WMI_SGI_EHT_3200_NS   0x80 /* for EHT 3200 nsec */
16512 
16513 /*
16514  * Param values to be sent for WMI_VDEV_PARAM_HE_LTF command
16515  * which are used in 11ax systems
16516  */
16517 #define WMI_HE_LTF_DEFAULT 0x0
16518 #define WMI_HE_LTF_1X      0x1
16519 #define WMI_HE_LTF_2X      0x2
16520 #define WMI_HE_LTF_4X      0x3
16521 /*
16522  * Param values to be sent for WMI_VDEV_EHT_PARAM_LTF command
16523  * which are used in 11be systems
16524  */
16525 #define WMI_EHT_LTF_DEFAULT 0x4
16526 #define WMI_EHT_LTF_1X      0x5
16527 #define WMI_EHT_LTF_2X      0x6
16528 #define WMI_EHT_LTF_4X      0x7
16529 
16530 /** values for vdev_subtype */
16531 #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE 0x1
16532 #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT 0x2
16533 #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO     0x3
16534 #define WMI_UNIFIED_VDEV_SUBTYPE_PROXY_STA  0x4
16535 #define WMI_UNIFIED_VDEV_SUBTYPE_MESH       0x5
16536 /* new subtype for 11S mesh is required as 11S functionality differs
16537  * in many ways from proprietary mesh
16538  * 11S uses 6-addr frame format and supports peering between mesh
16539  * stations and dynamic best path selection between mesh stations.
16540  * While in proprietary mesh, neighboring mesh station MAC is manually
16541  * added to AST table for traffic flow between mesh stations
16542  */
16543 #define WMI_UNIFIED_VDEV_SUBTYPE_MESH_11S   0x6
16544 /* Subtype to indicate that the AP VAP is in smart monitor mode
16545  * This is needed to differentiate in firmware between normal AP mode
16546  * with smart monitor AP mode
16547  */
16548 #define WMI_UNIFIED_VDEV_SUBTYPE_SMART_MON  0x7
16549 
16550 /* Subtype to indicate that the VDEV is in Bridge mode.
16551  * Bridge VDEV is dummy VDEV required for 4 chip MLO scenario.
16552  * Bridge Peer will be connected to Bridge VDEV.
16553  * Bridge VDEV/PEER will be required to seamlessly transmit
16554  * to diagonal links in 4 chip MLO.
16555  */
16556 #define WMI_UNIFIED_VDEV_SUBTYPE_BRIDGE  0x8
16557 
16558 /** values for vdev_start_request flags */
16559 /** Indicates that AP VDEV uses hidden ssid. only valid for
16560  *  AP/GO */
16561 #define WMI_UNIFIED_VDEV_START_HIDDEN_SSID  (1<<0)
16562 /** Indicates if robust management frame/management frame
16563  *  protection is enabled. For GO/AP vdevs, it indicates that
16564  *  it may support station/client associations with RMF enabled.
16565  *  For STA/client vdevs, it indicates that sta will
16566  *  associate with AP with RMF enabled. */
16567 #define WMI_UNIFIED_VDEV_START_PMF_ENABLED  (1<<1)
16568 /*
16569  * Host is sending bcn_tx_rate to override the beacon tx rates.
16570  */
16571 #define WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT (1<<2)
16572 /** Indicates if LDPC RX will be advertized inside HT/VHT Capabilities IE
16573  * of assoc request/response
16574  */
16575 #define WMI_UNIFIED_VDEV_START_LDPC_RX_ENABLED  (1<<3)
16576 /** Indicates HW encryption is disabled, and SW encryption is enabled.
16577  *  If This flag is set, indicates that HW encryption will be disabled
16578  *  and SW encryption will be enabled.
16579  *  If SW encryption is enabled, key plumbing will not happen in FW.
16580  */
16581 #define WMI_UNIFIED_VDEV_START_HW_ENCRYPTION_DISABLED  (1<<4)
16582 /** Indicates VAP is used for MLO repurpose.
16583  *  This Indicates that vap can be brought up as 11ax or 11be and can be
16584  *  repurposed based on the above stack on the fly to change from MLO to
16585  *  non MLO, currently we support only 11ax and 11be transition.
16586  */
16587 #define WMI_UNIFIED_VDEV_START_MLO_REPURPOSE_VAP (1<<5)
16588 
16589 /* BSS color 0-6 */
16590 #define WMI_HEOPS_COLOR_GET_D2(he_ops) WMI_GET_BITS(he_ops, 0, 6)
16591 #define WMI_HEOPS_COLOR_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 0, 6, value)
16592 
16593 /* Default PE Duration subfield indicates the PE duration in units of 4 us */
16594 #define WMI_HEOPS_DEFPE_GET_D2(he_ops) WMI_GET_BITS(he_ops, 6, 3)
16595 #define WMI_HEOPS_DEFPE_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 6, 3, value)
16596 
16597 /* TWT required */
16598 #define WMI_HEOPS_TWT_REQUIRED_GET_D2(he_ops) WMI_GET_BITS(he_ops, 9, 1)
16599 #define WMI_HEOPS_TWT_REQUIRED_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 9, 1, value)
16600 /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_GET instead */
16601 #define WMI_HEOPS_TWT_GET_D2(he_ops) \
16602     WMI_HEOPS_TWT_REQUIRED_GET_D2(he_ops)
16603 /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_SET instead */
16604 #define WMI_HEOPS_TWT_SET_D2(he_ops, value) \
16605     WMI_HEOPS_TWT_REQUIRED_SET_D2(he_ops, value)
16606 
16607 /* RTS threshold in units of 32 us,0 - always use RTS 1023 - this is disabled */
16608 #define WMI_HEOPS_RTSTHLD_GET_D2(he_ops) WMI_GET_BITS(he_ops, 10, 10)
16609 #define WMI_HEOPS_RTSTHLD_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 10, 10, value)
16610 
16611 /* Partial BSS Color field indicates whether BSS applies an AID assignment rule using partial BSS color bits */
16612 #define WMI_HEOPS_PARTBSSCOLOR_GET_D2(he_ops) WMI_GET_BITS(he_ops, 20, 1)
16613 #define WMI_HEOPS_PARTBSSCOLOR_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 20, 1, value)
16614 
16615 /* MAX BSS supported by MultiBSS element */
16616 #define WMI_HEOPS_MAXBSSID_GET_D2(he_ops) WMI_GET_BITS(he_ops, 21, 8)
16617 #define WMI_HEOPS_MAXBSSID_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 21, 8, value)
16618 
16619 /* Tx BSSID Indicator indicates whether HE AP corresponds to transmitted BSSID */
16620 #define WMI_HEOPS_TXBSSID_GET_D2(he_ops) WMI_GET_BITS(he_ops, 29, 1)
16621 #define WMI_HEOPS_TXBSSID_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 29, 1, value)
16622 
16623 /* when set to 1 disables use of BSS color */
16624 #define WMI_HEOPS_BSSCOLORDISABLE_GET_D2(he_ops) WMI_GET_BITS(he_ops, 30, 1)
16625 #define WMI_HEOPS_BSSCOLORDISABLE_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 30, 1, value)
16626 
16627 /**--- HEOPS_DUALBEACON: DO NOT USE - DEPRECATED ---*/
16628 /* When set to 1 HE AP transmits beacons using two PHY formats,
16629  * one in non-HE format and other in an HE_EXT_SU PHY format
16630  */
16631 #define WMI_HEOPS_DUALBEACON_GET_D2(he_ops) (0)
16632 #define WMI_HEOPS_DUALBEACON_SET_D2(he_ops, value) {;}
16633 
16634 #define WMI_MAX_HECAP_PHY_SIZE                 (3)
16635 
16636 /* Dual Band both 2.4 GHz and 5 GHz Supported */
16637 #define WMI_HECAP_PHY_DB_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 0, 1)
16638 #define WMI_HECAP_PHY_DB_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 0, 1, value)
16639 
16640 /*
16641  * B0: Indicates STA support 40 MHz channel width in 2.4 GHz
16642  * B1: Indicates STA support 40 MHz and 80 MHz channel width in 5 GHz
16643  * B2: Indicates STA supports 160 MHz channel width in 5 GHz
16644  * B3: Indicates STA supports 160/80+80 MHz channel width in 5 GHz
16645  * B4: If B1 is set to 0, then B5 indicates support of 242/106/52/26-tone
16646  *     RU mapping in 40 MHz channel width in 2.4 GHz. Otherwise Reserved.
16647  * B5: If B2, B3, and B4 are set to 0, then B6 indicates support of
16648  *     242-tone RU mapping in 40 MHz and 80
16649  * MHz channel width in 5 GHz. Otherwise Reserved.
16650  * B6: Reserved
16651  */
16652 #define WMI_HECAP_PHY_CBW_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 1, 7)
16653 #define WMI_HECAP_PHY_CBW_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 1, 7, value)
16654 
16655 /*
16656  * B0: Indicates STA supports reception of preamble puncturing in 80 MHz,
16657  *     where in the preamble only the secondary 20 MHz is punctured
16658  * B1: Indicates STA supports reception of preamble puncturing in 80 MHz,
16659  *     where in the preamble only one of the two 20 MHz sub-channels in the
16660  *     secondary 40 MHz is punctured
16661  * B2: Indicates STA supports reception of preamble puncturing in 160 MHz
16662  *     or 80+80 MHz, where in the primary 80 MHz of the preamble only the
16663  *     secondary 20 MHz is punctured
16664  * B3: Indicates STA supports reception of preamble puncturing in 160 MHz
16665  *     or 80+80 MHz, where in the primary 80 MHz of the preamble, the
16666  *     primary 40 MHz is present
16667  */
16668 #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 8, 4)
16669 #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 8, 4, value)
16670 
16671 /* Indicates transmitting STA is a Class A (1) or a Class B (0) device */
16672 #define WMI_HECAP_PHY_COD_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 12, 1)
16673 #define WMI_HECAP_PHY_COD_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 12, 1, value)
16674 
16675 /* Indicates support of transmission and reception of LDPC encoded packets */
16676 #define WMI_HECAP_PHY_LDPC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 13, 1)
16677 #define WMI_HECAP_PHY_LDPC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 13, 1, value)
16678 
16679 /* Below 2 macros are for maintaining backward compatibility - Deprecated use WMI_HECAP_PHY_LDPC instead */
16680 #define WMI_HECAP_PHY_TXLDPC_GET_D2(he_cap_phy) WMI_HECAP_PHY_LDPC_GET_D2(he_cap_phy)
16681 #define WMI_HECAP_PHY_TXLDPC_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_LDPC_SET_D2(he_cap_phy, value)
16682 /* Below 2 macros are for maintaining backward compatibility - Deprecated use WMI_HECAP_PHY_LDPC instead */
16683 #define WMI_HECAP_PHY_RXLDPC_GET_D2(he_cap_phy) WMI_HECAP_PHY_LDPC_GET_D2(he_cap_phy)
16684 #define WMI_HECAP_PHY_RXLDPC_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_LDPC_SET_D2(he_cap_phy, value)
16685 
16686 /*
16687  * B0: Indicates support of reception of 1x LTF and 0.8us guard interval duration for HE SU PPDUs.
16688  */
16689 #define WMI_HECAP_PHY_LTFGIFORHE_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 14, 1)
16690 #define WMI_HECAP_PHY_LTFGIFORHE_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 14, 1, value)
16691 
16692 /*
16693  * When the Doppler Rx subfield is 1, indicates the maximum number of space-
16694  * time streams supported for reception when midamble is used in the Data field.
16695  */
16696 #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 15, 2)
16697 #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 15, 2, value)
16698 
16699 /*
16700  * B0: For a transmitting STA acting as beamformee, it indicates support of
16701  *     NDP reception using 4x LTF and 3.2 us guard interval duration
16702  */
16703 #define WMI_HECAP_PHY_LTFGIFORNDP_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 17, 1)
16704 #define WMI_HECAP_PHY_LTFGIFORNDP_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 17, 1, value)
16705 
16706 /* indicates support for the transmission of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx*/
16707 #define WMI_HECAP_PHY_TXSTBC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 18, 1)
16708 #define WMI_HECAP_PHY_TXSTBC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 18, 1, value)
16709 
16710 /* indicates support for the reception of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx*/
16711 #define WMI_HECAP_PHY_RXSTBC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 19, 1)
16712 #define WMI_HECAP_PHY_RXSTBC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 19, 1, value)
16713 
16714 /* indicates transmitting STA supports transmitting HE PPDUs with Doppler procedure */
16715 #define WMI_HECAP_PHY_TXDOPPLER_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 20, 1)
16716 #define WMI_HECAP_PHY_TXDOPPLER_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 20, 1, value)
16717 
16718 /* indicates transmitting STA supports receiving HE PPDUs with Doppler procedure */
16719 #define WMI_HECAP_PHY_RXDOPPLER_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 21, 1)
16720 #define WMI_HECAP_PHY_RXDOPPLER_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 21, 1, value)
16721 
16722 /*
16723  * If the transmitting STA is an AP:
16724  *     indicates STA supports of reception of full bandwidth UL MU-MIMO
16725  *     transmission.
16726  * If the transmitting STA is a non-AP STA:
16727  *     indicates STA supports of transmission of full bandwidth UL MU-MIMO
16728  *     transmission.
16729  */
16730 #define WMI_HECAP_PHY_UL_MU_MIMO_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 22, 1)
16731 #define WMI_HECAP_PHY_UL_MU_MIMO_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 22, 1, value)
16732 
16733 /*
16734  * If the transmitting STA is an AP:
16735  *     indicates STA supports of reception of UL MUMIMO transmission on an
16736  *     RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
16737  * If the transmitting STA is a non-AP STA:
16738  *     indicates STA supports of transmission of UL MU-MIMO transmission on an
16739  *     RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
16740  */
16741 #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 23, 1)
16742 #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 23, 1, value)
16743 
16744 /* Tx DCM
16745  * B0:B1
16746  *     00: Does not support DCM
16747  *     01: BPSK
16748  *     10: QPSK
16749  *     11: 16-QAM
16750  * B2 signals maximum number of spatial streams with DCM
16751  *     0: 1 spatial stream
16752  *     1: 2 spatial streams
16753  */
16754 #define WMI_HECAP_PHY_DCMTX_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 24, 3)
16755 #define WMI_HECAP_PHY_DCMTX_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 24, 3, value)
16756 
16757 /* Rx DCM
16758  * B0:B1
16759  *     00: Does not support DCM
16760  *     01: BPSK
16761  *     10: QPSK
16762  *     11: 16-QAM
16763  * B2 signals maximum number of spatial streams with DCM
16764  *     0: 1 spatial stream
16765  *     1: 2 spatial streams
16766  */
16767 #define WMI_HECAP_PHY_DCMRX_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 27, 3)
16768 #define WMI_HECAP_PHY_DCMRX_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 27, 3, value)
16769 
16770 
16771 /*
16772  * Indicates that the STA supports the reception of an HE MU PPDU payload
16773  * over full bandwidth and partial bandwidth (106-tone RU within 20 MHz).
16774  */
16775 #define WMI_HECAP_PHY_ULHEMU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 30, 1)
16776 #define WMI_HECAP_PHY_ULHEMU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 30, 1, value)
16777 
16778 /* Indicates support for operation as an SU beamformer */
16779 #define WMI_HECAP_PHY_SUBFMR_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 31, 1)
16780 #define WMI_HECAP_PHY_SUBFMR_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 31, 1, value)
16781 
16782 /* Indicates support for operation as an SU beamformee */
16783 #define WMI_HECAP_PHY_SUBFME_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 0, 1)
16784 #define WMI_HECAP_PHY_SUBFME_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 0, 1, value)
16785 
16786 /* Indicates support for operation as an MU Beamformer */
16787 #define WMI_HECAP_PHY_MUBFMR_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 1, 1)
16788 #define WMI_HECAP_PHY_MUBFMR_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 1, 1, value)
16789 
16790 /*
16791  * Num STS -1 for <= 80MHz (min val 3)
16792  * The maximum number of space-time streams minus 1 that the STA can
16793  * receive in an HE NDP
16794  */
16795 #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 2, 3)
16796 #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 2, 3, value)
16797 
16798 
16799 /*
16800  * Num STS -1 for > 80MHz (min val 3)
16801  * The maximum number of space-time streams minus 1 that the STA can
16802  * receive in an HE NDP
16803  */
16804 #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
16805 #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
16806 
16807 /*
16808  * Number Of Sounding Dimensions For <= 80 MHz
16809  * If SU beamformer capable, set to the maximum supported value of the
16810  * TXVECTOR parameter NUM_STS minus 1.
16811  * Otherwise, reserved.
16812  */
16813 #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
16814 #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
16815 
16816 /*
16817  * Number Of Sounding Dimensions For > 80 MHz
16818  * If SU beamformer capable, set to the maximum supported value of the
16819  * TXVECTOR parameter NUM_STS minus 1.
16820  * Otherwise, reserved.
16821  */
16822 #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 11, 3)
16823 #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 11, 3, value)
16824 
16825 /*
16826  * Indicates if the HE beamformee is capable of feedback with tone
16827  * grouping of 16 in the HE Compressed Beamforming Report field for
16828  * a SU-type feedback.
16829  */
16830 #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 14, 1)
16831 #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 14, 1, value)
16832 
16833 /*
16834  * Indicates if the HE beamformee is capable of feedback with tone
16835  * grouping of 16 in the HE Compressed Beamforming Report field for
16836  * a MU-type feedback.
16837  */
16838 #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 15, 1)
16839 #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 15, 1, value)
16840 
16841 /*
16842  * Indicates if HE beamformee is capable of feedback with codebook
16843  * size {4, 2} in the HECompressed Beamforming Report field for
16844  * a SU-type feedback.
16845  */
16846 #define WMI_HECAP_PHY_CODBK42SU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 16, 1)
16847 #define WMI_HECAP_PHY_CODBK42SU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 16, 1, value)
16848 
16849 /*
16850  * Indicates if HE beamformee is capable of feedback with codebook
16851  * size {7, 5} in the HE Compressed Beamforming Report field for
16852  * a MU-type feedback.
16853  */
16854 #define WMI_HECAP_PHY_CODBK75MU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 17, 1)
16855 #define WMI_HECAP_PHY_CODBK75MU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 17, 1, value)
16856 
16857 /*
16858  * Beamforming Feedback With Trigger Frame
16859  * If the transmitting STA is an AP STA:
16860  * B0: indicates support of reception of SU-Type partial(1) and full bandwidth feedback(0)
16861  * B1: indicates support of reception of MU-Type partial(1) bandwidth feedback
16862  * B2: indicates support of reception of CQI-Only partial and full bandwidth feedback
16863  * If the transmitting STA is a non-AP STA:
16864  * B0: indicates support of transmission of SU-Type partial(1) and full bandwidth(0) feedback
16865  * B1: indicates support of transmission of MU-Type partial(1) bandwidth feedback
16866  * B2: indicates support of transmission of CQI-Onlypartial (1)and full bandwidth feedback
16867  */
16868 #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 18, 3)
16869 #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 18, 3, value)
16870 
16871 /* Indicates the support of transmission and reception of an HE extended range SU PPDU payload transmitted
16872  * over the right 106-tone RU or partial BW ER
16873  */
16874 #define WMI_HECAP_PHY_HEERSU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 21, 1)
16875 #define WMI_HECAP_PHY_HEERSU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 21, 1, value)
16876 
16877 /* Indicates that the non-AP STA supports reception of a DL MU-MIMO transmission on an RU in an HE MU PPDU
16878  * where the RU does not span the entire PPDU bandwidth.
16879  */
16880 #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 22, 1)
16881 #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 22, 1, value)
16882 
16883 /* Indicates whether or not the PPE Threshold field is present */
16884 #define WMI_HECAP_PHY_PETHRESPRESENT_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 23, 1)
16885 #define WMI_HECAP_PHY_PETHRESPRESENT_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 23, 1, value)
16886 
16887 /* Indicates that the STA supports SRP-based SR operation */
16888 #define WMI_HECAP_PHY_SRPSPRESENT_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 24, 1)
16889 #define WMI_HECAP_PHY_SRPPRESENT_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 24, 1, value)
16890 
16891 /* Indicates that the STA supports a power boost factor ar for the r-th RU in the range [0.5, 2] */
16892 #define WMI_HECAP_PHY_PWRBOOSTAR_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 25, 1)
16893 #define WMI_HECAP_PHY_PWRBOOSTAR_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 25, 1, value)
16894 
16895 /* Indicates support for the reception of 4x LTF and 0.8us guard interval duration for HE SU PPDUs. */
16896 #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 26, 1)
16897 #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 26, 1, value)
16898 
16899 /* For a transmitting STA acting as a beamformee, it indicates the maximum Nc for beamforming sounding
16900  * feedback supported If SU beamformee capable, then set to the maximum Nc for beamforming sounding feedback
16901  * minus 1. Otherwise, reserved.
16902  */
16903 #define WMI_HECAP_PHY_MAXNC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 27, 3)
16904 #define WMI_HECAP_PHY_MAXNC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 27, 3, value)
16905 
16906 /* Indicates support for the transmission of an HE PPDU that has a bandwidth greater than 80 MHz and is using
16907  * STBC with one spatial stream
16908  */
16909 #define WMI_HECAP_PHY_STBCTXGT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 30, 1)
16910 #define WMI_HECAP_PHY_STBCTXGT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 30, 1, value)
16911 
16912 /* Indicates support for the reception of an HE PPDU that has a bandwidth greater than 80 MHz and is using
16913  * STBC with one spatial stream
16914  */
16915 #define WMI_HECAP_PHY_STBCRXGT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 31, 1)
16916 #define WMI_HECAP_PHY_STBCRXGT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 31, 1, value)
16917 
16918 /* Indicates support for the reception of an HE ER SU PPDU with 4x LTF and 0.8 us guard interval duration */
16919 #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 0, 1)
16920 #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 0, 1, value)
16921 
16922 /*
16923  * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
16924  * receiver of a 40 MHz HE MU PPDU in 2.4 GHz band, or the transmitter of a 40 MHz HE TB PPDU in 2.4GHz band.
16925  */
16926 #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 1, 1)
16927 #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 1, 1, value)
16928 
16929 /*
16930  * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
16931  * receiver of a 80+80 MHz or a 160 MHz HE MU PPDU, or the transmitter of a 80+80 MHz or 160 MHz HE TB PPDU.
16932  */
16933 #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 2, 1)
16934 #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 2, 1, value)
16935 
16936 /*
16937  * Indicates supports of 160 MHz OFDMA for a non-AP HE STA that sets bit B1 of Channel Width Set to 1, and
16938  * sets B2 and B3 of Channel Width Set each to 0, when operating with 80 MHz channel width. The capability
16939  * bit is applicable while receiving a 80+80 MHz or a 160 MHz HE MU PPDU, or transmitting a 80+80 MHz or a
16940  * 160 MHz HE TB PPDU.
16941  */
16942 #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 3, 1)
16943 #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 3, 1, value)
16944 
16945 /* Indicates support for the reception of an HE ER SU PPDU with 1x LTF and 0.8 us guard interval duration */
16946 #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 4, 1)
16947 #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 4, 1, value)
16948 
16949 /*
16950  * When the Doppler Rx subfield is 1, indicates support for receiving midambles with 2x HE-LTF, 1x HE-LTF
16951  * in HE SU PPDU if the HE SU PPDU With 1x HE-LTF And 0.8 s GI subfield is set to 1, and 1x HE-LTF in
16952  * HE ER SU PPDU if the HE ER SU PPDU With 1x HELTF And 0.8 s GI subfield is set to 1.
16953  */
16954 #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 5, 1)
16955 #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 5, 1, value)
16956 
16957 /*HTC + HE Support  Set to 1 if STA supports reception of HE Variant HT control Field*/
16958 #define WMI_HECAP_MAC_HECTRL_GET_D2(he_cap) WMI_GET_BITS(he_cap, 0, 1)
16959 #define WMI_HECAP_MAC_HECTRL_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 0, 1, value)
16960 
16961 /* set to 1 to for TWT Requestor support*/
16962 #define WMI_HECAP_MAC_TWTREQ_GET_D2(he_cap) WMI_GET_BITS(he_cap, 1, 1)
16963 #define WMI_HECAP_MAC_TWTREQ_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 1, 1, value)
16964 
16965 /* set to 1 to for TWT Responder support*/
16966 #define WMI_HECAP_MAC_TWTRSP_GET_D2(he_cap) WMI_GET_BITS(he_cap, 2, 1)
16967 #define WMI_HECAP_MAC_TWTRSP_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 2, 1, value)
16968 
16969 /* Level of frag support
16970    Set to 0 for no support for dynamic fragmentation.
16971    Set to 1 for support for dynamic fragments that are contained within a S-MPDU
16972    Set to 2 for support for dynamic fragments that are contained within a Single MPDU and support for up to
16973         one dynamic fragment for each MSDU and each MMPDU within an A-MPDU or multi-TID A-MPDU.
16974    Set to 3 for support for dynamic fragments that are contained within a Single MPDU and support for multiple
16975         dynamic fragments for each MSDU within an AMPDU or multi-TID AMPDU and up to one dynamic fragment
16976         for each MMPDU in a multi-TID A-MPDU that is not a Single MPDU
16977 */
16978 #define WMI_HECAP_MAC_HEFRAG_GET_D2(he_cap) WMI_GET_BITS(he_cap, 3, 2)
16979 #define WMI_HECAP_MAC_HEFRAG_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 3, 2, value)
16980 
16981 /* The maximum number of fragmented MSDUs, Nmax,defined by this field is Nmax = 2 Maximum Number Of FMPDUs*/
16982 #define WMI_HECAP_MAC_MAXFRAGMSDU_GET_D2(he_cap) WMI_GET_BITS(he_cap, 5, 3)
16983 #define WMI_HECAP_MAC_MAXFRAGMSDU_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 5, 3, value)
16984 
16985 /* 0 =  no restriction on the minimum payload , 1 = 128 octets min, 2 = 256 octets min, 3 = 512 octets min */
16986 #define WMI_HECAP_MAC_MINFRAGSZ_GET_D2(he_cap) WMI_GET_BITS(he_cap, 8, 2)
16987 #define WMI_HECAP_MAC_MINFRAGSZ_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 8, 2, value)
16988 
16989 /*0 = no additional processing time, 1 = 8us,2 = 16us */
16990 #define WMI_HECAP_MAC_TRIGPADDUR_GET_D2(he_cap) WMI_GET_BITS(he_cap, 10, 2)
16991 #define WMI_HECAP_MAC_TRIGPADDUR_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 10, 2, value)
16992 
16993 /*number of TIDs minus 1 of QoS Data frames that HE STA can aggregate in  multi-TID AMPDU*/
16994 #define WMI_HECAP_MAC_MTID_GET_D2(he_cap) WMI_GET_BITS(he_cap, 12, 3)
16995 #define WMI_HECAP_MAC_MTID_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 12, 3, value)
16996 
16997 /*
16998  * Indicates support by a STA to receive an ack-enabled A-MPDU in which an A-MSDU is carried in
16999  * a QoS Data frame for which no block ack agreement exists.
17000  */
17001 #define WMI_HECAP_MAC_AMSDUINAMPDU_GET_D2(he_cap) WMI_GET_BITS(he_cap, 15, 1)
17002 #define WMI_HECAP_MAC_AMSDUINAMPDU_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 15, 1, value)
17003 
17004 /*--- HECAP_MAC_HELKAD: DO NOT USE - DEPRECATED ---*/
17005 /*0=No Feedback,2=Unsolicited,3=Both*/
17006 #define WMI_HECAP_MAC_HELKAD_GET_D2(he_cap) (0)
17007 #define WMI_HECAP_MAC_HELKAD_SET_D2(he_cap, value) {;}
17008 
17009 /* bit 16 reserved. */
17010 
17011 /*Set to 1 for reception of AllAck support*/
17012 #define WMI_HECAP_MAC_AACK_GET_D2(he_cap) WMI_GET_BITS(he_cap, 17, 1)
17013 #define WMI_HECAP_MAC_AACK_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 17, 1, value)
17014 
17015 /*Set to 1 if the STA supports reception of the UL MU Response Scheduling A-Control field*/
17016 #define WMI_HECAP_MAC_ULMURSP_GET_D2(he_cap) WMI_GET_BITS(he_cap, 18, 1)
17017 #define WMI_HECAP_MAC_ULMURSP_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 18, 1, value)
17018 
17019 /*Set to 1 if the STA supports the BSR A-Control field functionality.*/
17020 #define WMI_HECAP_MAC_BSR_GET_D2(he_cap) WMI_GET_BITS(he_cap, 19, 1)
17021 #define WMI_HECAP_MAC_BSR_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 19, 1, value)
17022 
17023 /*Set to 1 when the STA supports broadcast TWT functionality.*/
17024 #define WMI_HECAP_MAC_BCSTTWT_GET_D2(he_cap) WMI_GET_BITS(he_cap, 20, 1)
17025 #define WMI_HECAP_MAC_BCSTTWT_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 20, 1, value)
17026 
17027 /*Set to 1 if STA supports rx of Multi-STA BA that has 32-bit Block Ack Bitmap*/
17028 #define WMI_HECAP_MAC_32BITBA_GET_D2(he_cap) WMI_GET_BITS(he_cap, 21, 1)
17029 #define WMI_HECAP_MAC_32BITBA_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 21, 1, value)
17030 
17031 /*Set to 1 if the STA supports MU cascading operation*/
17032 #define WMI_HECAP_MAC_MUCASCADE_GET_D2(he_cap) WMI_GET_BITS(he_cap, 22, 1)
17033 #define WMI_HECAP_MAC_MUCASCADE_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 22, 1, value)
17034 
17035 /*Set to 1 when the STA supports reception of this multi-TID A-MPDU format*/
17036 #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D2(he_cap) WMI_GET_BITS(he_cap, 23, 1)
17037 #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 23, 1, value)
17038 
17039 /*Set to 1 when the STA supports its reception*/
17040 #define WMI_HECAP_MAC_GROUPMSTABA_GET_D2(he_cap) WMI_GET_BITS(he_cap, 24, 1)
17041 #define WMI_HECAP_MAC_GROUPMSTABA_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 24, 1, value)
17042 
17043 /*Set to 1 if the STA supports reception of the OMI A-Control field*/
17044 #define WMI_HECAP_MAC_OMI_GET_D2(he_cap) WMI_GET_BITS(he_cap, 25, 1)
17045 #define WMI_HECAP_MAC_OMI_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 25, 1, value)
17046 
17047 /*1 if OFDMA Random Access Supported*/
17048 #define WMI_HECAP_MAC_OFDMARA_GET_D2(he_cap) WMI_GET_BITS(he_cap, 26, 1)
17049 #define WMI_HECAP_MAC_OFDMARA_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 26, 1, value)
17050 
17051 /* Maximum AMPDU Length Exponent.
17052  * If the HE STA includes a VHT Capabilities element, the Maximum A-MPDU Length Exponent subfield in
17053  * HE Capabilities element combined with the Maximum A-MPDU Length Exponent subfield in VHT
17054  * Capabilities element indicate the maximum length of A-MPDU that the STA can Receive where EOF
17055  * padding is not included in this limit.
17056 */
17057 #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D2(he_cap) WMI_GET_BITS(he_cap, 27, 2)
17058 #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 27, 2, value)
17059 
17060 /*A-MSDU Fragmentation Support*/
17061 #define WMI_HECAP_MAC_AMSDUFRAG_GET_D2(he_cap) WMI_GET_BITS(he_cap, 29, 1)
17062 #define WMI_HECAP_MAC_AMSDUFRAG_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 29, 1, value)
17063 
17064 /*Flexible TWT Schedule Support*/
17065 #define WMI_HECAP_MAC_FLEXTWT_GET_D2(he_cap) WMI_GET_BITS(he_cap, 30, 1)
17066 #define WMI_HECAP_MAC_FLEXTWT_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 30, 1, value)
17067 
17068 /*Rx Control Frame to MultiBSS*/
17069 #define WMI_HECAP_MAC_MBSS_GET_D2(he_cap) WMI_GET_BITS(he_cap, 31, 1)
17070 #define WMI_HECAP_MAC_MBSS_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 31, 1, value)
17071 
17072 /* BSRP A-MPDU Aggregation
17073  * maintaining compatibility since we don't support this now so not wasting memory
17074  */
17075 #define WMI_HECAP_MAC_BSRPAMPDU_GET_D2(he_cap) (0)
17076 #define WMI_HECAP_MAC_BSRPAMPDU_SET_D2(he_cap, value) {;}
17077 
17078 /* Quiet Time Period (QTP) operation
17079  * maintaining compatibility since we don't support this now so not wasting memory
17080  */
17081 #define WMI_HECAP_MAC_QTP_GET_D2(he_cap) (0)
17082 #define WMI_HECAP_MAC_QTP_SET_D2(he_cap, value) {;}
17083 
17084 /* support by an AP for receiving an (A-)MPDU that contains a BQR in the
17085  * A-Control subfield and support by a non-AP STA for generating an (A-)MPDU
17086  * that contains a BQR in the A-Control subfield
17087  * maintaining compatibility since we don't support this now so not wasting memory
17088  */
17089 #define WMI_HECAP_MAC_ABQR_GET_D2(he_cap) (0)
17090 #define WMI_HECAP_MAC_ABQR_SET_D2(he_cap, value) {;}
17091 
17092 /*Indicates support by the STA for the role of SR Responder.*/
17093 #define WMI_HECAP_MAC_SRRESP_GET_D2(he_cap) (0)
17094 #define WMI_HECAP_MAC_SRRESP_SET_D2(he_cap, value) {;}
17095 
17096 /* Indicates support for an AP to encode OPS information to TIM element of the FILS Discovery
17097  * frames or TIM frames as described in AP operation for opportunistic power save.
17098  * Indicates support for a non-AP STA to receive the opportunistic power save encoded TIM elements
17099  */
17100 #define WMI_HECAP_MAC_OPS_GET_D2(he_cap) (0)
17101 #define WMI_HECAP_MAC_OPS_SET_D2(he_cap, value) {;}
17102 
17103 /* Indicates support for a non-AP STA to follow the NDP feedback report procedure and respond to
17104  * the NDP Feedback Report Poll Trigger frame.
17105  */
17106 #define WMI_HECAP_MAC_NDPFDBKRPT_GET_D2(he_cap) (0)
17107 #define WMI_HECAP_MAC_NDPFDBKRPT_SET_D2(he_cap, value) {;}
17108 
17109 /* BELOW MACROS ARE DEPRECATED Also we are not defining bits for capabilities
17110  * beyond bit 31 we donot support as it adds additional dword to our struct which may be later
17111  * removed by standard
17112  */
17113 #define WMI_HECAP_MAC_MBAHECTRL_GET_D2(he_cap) (0) /* DO NOT USE - DEPRECATED*/
17114 #define WMI_HECAP_MAC_MBAHECTRL_SET_D2(he_cap, value) {;} /* DO NOT USE - DEPRECATED*/
17115 
17116 #define WMI_HECAP_MAC_MURTS_GET_D2(he_cap) (0) /* DO NOT USE - DEPRECATED*/
17117 #define WMI_HECAP_MAC_MURTS_SET_D2(he_cap, value) {;} /* DO NOT USE - DEPRECATED*/
17118 
17119 /*Deprecate use  WMI_HECAP_PHY_PREAMBLEPUNCRX instead*/
17120 #define WMI_HECAP_PHY_CBMODE_GET_D2(he_cap_phy) WMI_HECAP_PHY_CBMODE_GET_D2(he_cap_phy)
17121 #define WMI_HECAP_PHY_CBMODE_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_CBMODE_SET_D2(he_cap_phy, value)
17122 
17123 
17124 /* Below 2 macros are for maintaining backward compatibility - Deprecated use WMI_HECAP_PHY_LTFGIFORHE_GET instead */
17125 #define WMI_HECAP_PHY_OLTF_GET_D2(he_cap_phy) WMI_HECAP_PHY_LTFGIFORHE_GET_D2(he_cap_phy)
17126 #define WMI_HECAP_PHY_OLTF_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_LTFGIFORHE_SET_D2(he_cap_phy, value)
17127 
17128 
17129 /*DEPRECATED - USE WMI_HECAP_PHY_BFMENLTSGT80MHZ*/
17130 #define WMI_HECAP_PHY_SUBFMESTS_GET_D2(he_cap_phy) WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D2(he_cap_phy)
17131 #define WMI_HECAP_PHY_SUBFMESTS_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D2(he_cap_phy, value)
17132 
17133 /*DEPRECATED - use WMI_HECAP_PHY_PETHRESPRESENT**/
17134 #define WMI_HECAP_PHY_PADDING_GET_D2(he_cap_phy) WMI_HECAP_PHY_PETHRESPRESENT_GET_D2(he_cap_phy)
17135 #define WMI_HECAP_PHY_PADDING_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_PETHRESPRESENT_SET_D2(he_cap_phy, value)
17136 
17137 
17138 /**DO NOT USE - DEPRECATED*/
17139 #define WMI_HECAP_PHY_DLOFMAMUMIMO_GET_D2(he_cap_phy) (0)
17140 #define WMI_HECAP_PHY_DLOFDMAMUMIO_SET_D2(he_cap_phy, value) {;}
17141 
17142 /*DO NOT USE - DEPRECATED**/
17143 #define WMI_HECAP_PHY_32GI_GET_D2(he_cap_phy) (0)
17144 #define WMI_HECAP_PHY_32GI_SET_D2(he_cap_phy, value) {;}
17145 
17146 /*DO NOT USE - DEPRECATED**/
17147 #define WMI_HECAP_PHY_NOSUNDIMENS_GET_D2(he_cap_phy) (0)
17148 #define WMI_HECAP_PHY_NOSUNDIMENS_SET_D2(he_cap_phy, value) {;}
17149 
17150 /*DO NOT USE - DEPRECATED**/
17151 #define WMI_HECAP_PHY_40MHZNSS_GET_D2(he_cap_phy)(0)
17152 #define WMI_HECAP_PHY_40MHZNSS_SET_D2(he_cap_phy, value) {;}
17153 
17154 
17155 /* START TEMPORARY WORKAROUND -
17156  * Leave legacy names as aliases for new names, until all references to the
17157  * legacy names have been removed.
17158  */
17159 #define WMI_HECAP_PHY_ULOFDMA_GET_D2 WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D2
17160 #define WMI_HECAP_PHY_ULOFDMA_SET_D2 WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D2
17161 /* END TEMPORARY WORKAROUND */
17162 
17163 /* DEPRECATED - use WMI_HECAP_PHY_DCMRX or WMI_HECAP_PHY_DCMTX */
17164 #define WMI_HECAP_PHY_DCM_GET_D2(he_cap_phy) WMI_HECAP_PHY_DCMRX_GET_D2(he_cap_phy)
17165 #define WMI_HECAP_PHY_DCM_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_DCMRX_SET_D2(he_cap_phy, value)
17166 
17167 /*
17168  * The maximum value for NSTS-1<=80MHz,(min val 3)total that can be sent
17169  * to the STA in a DL MU-MIMO transmission on full or partial bandwidth
17170  */
17171 #define WMI_HECAP_PHY_NSTSLT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
17172 #define WMI_HECAP_PHY_NSTSLT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
17173 
17174 
17175 /*
17176  * The maximum value for NSTS-1 > 80MHz (min val 3) total that can be sent
17177  * to the STA in a DL MU-MIMO transmission on full or partial bandwidth
17178  */
17179 #define WMI_HECAP_PHY_NSTSGT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
17180 #define WMI_HECAP_PHY_NSTSGT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
17181 
17182 /*
17183  * Indicates the spatial multiplexing power save mode after receiving a
17184  * Trigger frame that is in operation immediately after (re)association.
17185  */
17186 #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D2(he_cap2) (0)
17187 #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D2(he_cap2, value) {;}
17188 
17189 /* Indicates support for Punctured Sounding */
17190 #define WMI_HECAP_MAC_PUNCSOUNDING_GET_D2(he_cap2) (0)
17191 #define WMI_HECAP_MAC_PUNCSOUNDING_SET_D2(he_cap2, value) {;}
17192 
17193 /*
17194  * Indicates support for receiving a Trigger frame in an HT PPDU and
17195  * receiving a Trigger frame in a VHT PPDU
17196  */
17197 #define WMI_HECAP_MAC_HTVHTTRIGRX_GET_D2(he_cap2) (0)
17198 #define WMI_HECAP_MAC_HTVHTTRIGRX_SET_D2(he_cap2, value) {;}
17199 
17200 #define WMI_GET_HW_RATECODE_PREAM_V1(_rcode)     (((_rcode) >> 8) & 0x7)
17201 #define WMI_GET_HW_RATECODE_NSS_V1(_rcode)       (((_rcode) >> 5) & 0x7)
17202 #define WMI_GET_HW_RATECODE_RATE_V1(_rcode)      (((_rcode) >> 0) & 0x1F)
17203 #define WMI_ASSEMBLE_RATECODE_V1(_rate, _nss, _pream) \
17204             (((1) << 28) | ((_pream) << 8) | ((_nss) << 5) | (_rate))
17205 
17206 typedef struct {
17207     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_request_cmd_fixed_param */
17208     /** unique id identifying the VDEV, generated by the caller */
17209     A_UINT32 vdev_id;
17210     /** requestor id identifying the caller module */
17211     A_UINT32 requestor_id;
17212     /** beacon interval from received beacon */
17213     A_UINT32 beacon_interval;
17214     /** DTIM Period from the received beacon */
17215     A_UINT32 dtim_period;
17216     /** Flags */
17217     A_UINT32 flags;
17218     /** ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */
17219     wmi_ssid ssid;
17220     /** beacon/probe response xmit rate. Applicable for SoftAP. */
17221     /** This field will be invalid and ignored unless the */
17222     /** flags field has the WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT bit. */
17223     /** When valid, this field contains the fixed tx rate for the beacon */
17224     /** and probe response frames send by the GO or SoftAP */
17225     A_UINT32 bcn_tx_rate;
17226     /** beacon/probe response xmit power. Applicable for SoftAP. */
17227     A_UINT32 bcn_txPower;
17228     /** number of p2p NOA descriptor(s) from scan entry */
17229     A_UINT32 num_noa_descriptors;
17230     /** Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID.
17231      During CAC, Our HW shouldn't ack ditected frames */
17232     A_UINT32 disable_hw_ack;
17233     /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
17234     /** The DBS policy manager indicates the preferred number of transmit streams. */
17235     A_UINT32 preferred_tx_streams;
17236     /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
17237     /** the DBS policy manager indicates the preferred number of receive streams. */
17238     A_UINT32 preferred_rx_streams;
17239     A_UINT32 he_ops; /* refer to WMI_HEOPS_xxx macros */
17240     A_UINT32 cac_duration_ms;  /* in milliseconds */
17241     A_UINT32 regdomain;
17242     /* min data rate to be used in BSS in Mbps */
17243     A_UINT32 min_data_rate;
17244 
17245     /** @mbss_capability_flags: Bitmap of vdev's MBSS/EMA capability.
17246      *  Capabilities are combination of below flags:
17247      *     VDEV_FLAGS_NON_MBSSID_AP
17248      *     VDEV_FLAGS_TRANSMIT_AP
17249      *     VDEV_FLAGS_NON_TRANSMIT_AP
17250      *     VDEV_FLAGS_EMA_MODE
17251      *     VDEV_FLAGS_SCAN_MODE_VAP - if the vdev is used for scan radio
17252      */
17253     A_UINT32 mbss_capability_flags;
17254 
17255     /** vdevid of transmitting VAP (mbssid case). Ignored for non mbssid case */
17256     A_UINT32 vdevid_trans;
17257     A_UINT32 eht_ops;
17258     A_UINT32 puncture_20mhz_bitmap; /* each bit indicates one 20 MHz BW punctured */
17259 
17260     A_UINT32 mbssid_multi_group_flag; /* Flag to identify whether multi group mbssid is supported */
17261     A_UINT32 mbssid_multi_group_id; /* Group id of current vdev only valid when multi group mbssid is supported */
17262     /* Target TSF value by which VDEV restart procedure should be completed in FW */
17263     A_UINT32 target_tsf_us_lo; /* bits 31:0 */
17264     A_UINT32 target_tsf_us_hi; /* bits 63:32 */
17265 
17266 /* The TLVs follows this structure:
17267  *     wmi_channel chan; <-- WMI channel
17268  *     wmi_p2p_noa_descriptor  noa_descriptors[]; <-- actual p2p NOA descriptor from scan entry
17269  *     wmi_vdev_start_mlo_params  mlo_params[0,1]; <-- vdev start MLO parameters
17270  *         optional TLV, only present for MLO vdevs,
17271  *         If the vdev is non-MLO the array length should be 0.
17272  *     wmi_partner_link_info link_info[]; <-- partner link info
17273  *         optional TLV, only present for MLO vdevs,
17274  *         If the vdev is non-MLO the array length should be 0.
17275  *     wmi_channel dbw_chan; <-- WMI channel
17276  *         optional TLV for dbw_chan
17277  *     wmi_dbw_chan_info dbw_chan_info
17278  *         optional TLV used for dbw_chan_info
17279  */
17280 } wmi_vdev_start_request_cmd_fixed_param;
17281 
17282 typedef struct {
17283     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_cmd_fixed_param */
17284     /** unique id identifying the VDEV, generated by the caller */
17285     A_UINT32 vdev_id;
17286 } wmi_vdev_delete_cmd_fixed_param;
17287 
17288 enum WMI_VDEV_UP_FLAGS {
17289     /** EMA_MBSSID_AP
17290      * Valid only for STA VDEV.
17291      * This flag will be set when STA connected MBSSID AP is EMA capable.
17292      * EMA - Enhanced Multiple BSS Advertisemet.
17293      */
17294     WMI_VDEV_UP_FLAG_EMA_MBSSID_AP = 0x00000001,
17295 };
17296 
17297 typedef struct {
17298     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_up_cmdid_fixed_param */
17299     /** unique id identifying the VDEV, generated by the caller */
17300     A_UINT32 vdev_id;
17301     /** aid (assoc id) received in association response for STA VDEV  */
17302     A_UINT32 vdev_assoc_id;
17303     /** bssid of the BSS the VDEV is joining  */
17304     wmi_mac_addr vdev_bssid;
17305     /** bssid of transmitted AP (mbssid case) */
17306     wmi_mac_addr trans_bssid;
17307     /** the profile index of the connected non-trans ap (mbssid case). 0 means invalid */
17308     A_UINT32 profile_idx;
17309     /** the total profile numbers of non-trans aps (mbssid case). 0 means legacy AP */
17310     A_UINT32 profile_num;
17311     /** flags - this is a bitwise-or combination of WMI_VDEV_UP_FLAGS values */
17312     A_UINT32 flags;
17313 } wmi_vdev_up_cmd_fixed_param;
17314 
17315 typedef struct {
17316     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stop_cmd_fixed_param */
17317     /** unique id identifying the VDEV, generated by the caller */
17318     A_UINT32 vdev_id;
17319 
17320     /* The TLVs follows this structure:
17321      *   - wmi_vdev_stop_mlo_params mlo_params[0/1];
17322      *     optional TLV, host may provide this TLV to indicate the vdev stop
17323      *     is done for link switch.
17324      */
17325 } wmi_vdev_stop_cmd_fixed_param;
17326 
17327 typedef struct {
17328     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_down_cmd_fixed_param */
17329     /** unique id identifying the VDEV, generated by the caller */
17330     A_UINT32 vdev_id;
17331 } wmi_vdev_down_cmd_fixed_param;
17332 
17333 typedef struct {
17334     /** unique id identifying the VDEV, generated by the caller */
17335     A_UINT32 vdev_id;
17336 } wmi_vdev_standby_response_cmd;
17337 
17338 typedef struct {
17339     /** unique id identifying the VDEV, generated by the caller */
17340     A_UINT32 vdev_id;
17341 } wmi_vdev_resume_response_cmd;
17342 
17343 typedef struct {
17344     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_param_cmd_fixed_param */
17345     /** unique id identifying the VDEV, generated by the caller */
17346     A_UINT32 vdev_id;
17347     /** parameter id   */
17348     A_UINT32 param_id;
17349     /** parameter value */
17350     A_UINT32 param_value;
17351 } wmi_vdev_set_param_cmd_fixed_param;
17352 
17353 typedef struct {
17354     A_UINT32 key_seq_counter_l;
17355     A_UINT32 key_seq_counter_h;
17356 } wmi_key_seq_counter;
17357 
17358 #define  WMI_CIPHER_NONE         0x0  /* clear key */
17359 #define  WMI_CIPHER_WEP          0x1
17360 #define  WMI_CIPHER_TKIP         0x2
17361 #define  WMI_CIPHER_AES_OCB      0x3
17362 #define  WMI_CIPHER_AES_CCM      0x4
17363 #define  WMI_CIPHER_WAPI         0x5
17364 #define  WMI_CIPHER_CKIP         0x6
17365 #define  WMI_CIPHER_AES_CMAC     0x7
17366 #define  WMI_CIPHER_ANY          0x8
17367 #define  WMI_CIPHER_AES_GCM      0x9
17368 #define  WMI_CIPHER_AES_GMAC     0xa
17369 #define  WMI_CIPHER_WAPI_GCM_SM4 0xb
17370 #define  WMI_CIPHER_BIP_CMAC_128 0xc
17371 #define  WMI_CIPHER_BIP_CMAC_256 0xd
17372 #define  WMI_CIPHER_BIP_GMAC_128 0xe
17373 #define  WMI_CIPHER_BIP_GMAC_256 0xf
17374 
17375 typedef struct {
17376     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_cmd_fixed_param */
17377     /** unique id identifying the VDEV, generated by the caller */
17378     A_UINT32 vdev_id;
17379     /** MAC address used for installing   */
17380     wmi_mac_addr peer_macaddr;
17381     /** key index */
17382     A_UINT32 key_ix;
17383     /** key flags */
17384     A_UINT32 key_flags;
17385     /** key cipher, defined above */
17386     A_UINT32 key_cipher;
17387     /** key rsc counter */
17388     wmi_key_seq_counter key_rsc_counter;
17389     /** global key rsc counter */
17390     wmi_key_seq_counter key_global_rsc_counter;
17391     /** global key tsc counter */
17392     wmi_key_seq_counter key_tsc_counter;
17393     /** WAPI key rsc counter */
17394     A_UINT8 wpi_key_rsc_counter[16];
17395     /** WAPI key tsc counter */
17396     A_UINT8 wpi_key_tsc_counter[16];
17397     /** key length */
17398     A_UINT32 key_len;
17399     /** key tx mic length */
17400     A_UINT32 key_txmic_len;
17401     /** key rx mic length */
17402     A_UINT32 key_rxmic_len;
17403     /** specifies if the group_key_ix is valid, filled by the sender */
17404     A_UINT32 is_group_key_ix_valid;
17405     /** Multi group key ID */
17406     A_UINT32 group_key_ix;
17407 /*
17408  * Following this struct are this TLV.
17409  *     A_UINT8  key_data[]; <-- actual key data; contains key followed by tx mic followed by rx mic
17410  */
17411 } wmi_vdev_install_key_cmd_fixed_param;
17412 
17413 typedef struct {
17414     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_ltf_key_seed_cmd_fixed_param */
17415     /** unique id identifying the VDEV, generated by the caller */
17416     A_UINT32 vdev_id;
17417     /** MAC address used for deriving */
17418     wmi_mac_addr peer_macaddr;
17419     /** authentication mode */
17420     A_UINT32 rsn_authmode;
17421     /** LTF key seed length */
17422     A_UINT32 key_seed_len;
17423 /*
17424  * Following this struct are this TLV.
17425  *     A_UINT8  key_seed[key_seed_len]; <-- actual LTF key seed;
17426  */
17427 } wmi_vdev_set_ltf_key_seed_cmd_fixed_param;
17428 
17429 /** Preamble types to be used with VDEV fixed rate configuration */
17430 typedef enum {
17431     WMI_RATE_PREAMBLE_OFDM,
17432     WMI_RATE_PREAMBLE_CCK,
17433     WMI_RATE_PREAMBLE_HT,
17434     WMI_RATE_PREAMBLE_VHT,
17435     WMI_RATE_PREAMBLE_HE,
17436     WMI_RATE_PREAMBLE_EHT,
17437 } WMI_RATE_PREAMBLE;
17438 
17439 /** Value to disable fixed rate setting */
17440 #define WMI_FIXED_RATE_NONE    (0xff)
17441 
17442 #define WMI_GI_400_NS 1
17443 #define WMI_GI_800_NS 0
17444 #define WMI_GI_1600_NS 2
17445 #define WMI_GI_3200_NS 3
17446 
17447 /** OCE(Optimized Connectivity_Experience) Feature flags */
17448 #define WMI_VDEV_OCE_PROBE_REQUEST_RATE_FEATURE_BITMAP                 0x1
17449 #define WMI_VDEV_OCE_PROBE_RESPONSE_RATE_FEATURE_BITMAP                0x2
17450 #define WMI_VDEV_OCE_BEACON_RATE_FEATURE_BITMAP                        0x4
17451 #define WMI_VDEV_OCE_PROBE_REQUEST_DEFERRAL_FEATURE_BITMAP             0x8
17452 #define WMI_VDEV_OCE_FILS_DISCOVERY_FRAME_FEATURE_BITMAP               0x10
17453 #define WMI_VDEV_OCE_ESP_FEATURE_BITMAP                                0x20
17454 #define WMI_VDEV_OCE_REASSOC_REJECT_FEATURE_BITMAP                     0x40
17455 
17456 /** 6 GHZ params **/
17457 /* Control to enable/disable beacon tx in non-HT duplicate */
17458 #define WMI_VDEV_6GHZ_BITMAP_NON_HT_DUPLICATE_BEACON                    0x1
17459 /* Control to enable/disable broadcast probe response tx in non-HT duplicate */
17460 #define WMI_VDEV_6GHZ_BITMAP_NON_HT_DUPLICATE_BCAST_PROBE_RSP           0x2
17461 /* Control to enable/disable FILS discovery frame tx in non-HT duplicate */
17462 #define WMI_VDEV_6GHZ_BITMAP_NON_HT_DUPLICATE_FD_FRAME                  0x4
17463 /* Control to enable/disable periodic FILS discovery frame transmission */
17464 #define WMI_VDEV_6GHZ_BITMAP_FD_FRAME                                   0x8  /* deprecated */
17465 /* Control to enable/disable periodic broadcast probe response transmission */
17466 #define WMI_VDEV_6GHZ_BITMAP_BCAST_PROBE_RSP                            0x10 /* deprecated */
17467 
17468 /** ROAM_11KV control params */
17469 
17470 /* WMI_VDEV_ROAM_11KV_CTRL_DISABLE_FW_TRIGGER_ROAMING:
17471  * Disable all FW-triggered roaming (e.g. low RSSI/final bmiss/BTM/PER)
17472  * while still allowing host-invoked roaming.
17473  */
17474 #define WMI_VDEV_ROAM_11KV_CTRL_DISABLE_FW_TRIGGER_ROAMING              0x1
17475 /* WMI_VDEV_ROAM_11KV_CTRL_KEEP_CONN_RECV_BTM_REQ:
17476  * DUT do not scan or roaming when receiving BTM req frame
17477  */
17478 #define WMI_VDEV_ROAM_11KV_CTRL_KEEP_CONN_RECV_BTM_REQ                  0x2
17479 /* WMI_VDEV_ROAM_11KV_CTRL_DONOT_SEND_DISASSOC_ON_BTM_DI_SET:
17480  * DUT do not send disasoc frame to AP when receiving BTM req with
17481  * Disassoc Imminent bit set to 1.
17482  */
17483 #define WMI_VDEV_ROAM_11KV_CTRL_DONOT_SEND_DISASSOC_ON_BTM_DI_SET       0x4
17484 
17485 
17486 /** NAN vdev config Feature flags */
17487 #define WMI_VDEV_NAN_ALLOW_DW_CONFIG_CHANGE_IN_SYNC_ROLE                0x1
17488 
17489 
17490 /** the definition of different VDEV parameters */
17491 typedef enum {
17492     /** RTS Threshold */
17493     WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1,
17494     /** Fragmentation threshold */
17495     WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD,                   /* 0x2 */
17496     /** beacon interval in TUs */
17497     WMI_VDEV_PARAM_BEACON_INTERVAL,                           /* 0x3 */
17498     /** Listen interval in TUs */
17499     WMI_VDEV_PARAM_LISTEN_INTERVAL,                           /* 0x4 */
17500     /** multicast rate in Mbps */
17501     WMI_VDEV_PARAM_MULTICAST_RATE,                            /* 0x5 */
17502     /** management frame rate in Mbps */
17503     WMI_VDEV_PARAM_MGMT_TX_RATE,                              /* 0x6 */
17504     /** slot time (long vs short) */
17505     WMI_VDEV_PARAM_SLOT_TIME,                                 /* 0x7 */
17506     /** preamble (long vs short) */
17507     WMI_VDEV_PARAM_PREAMBLE,                                  /* 0x8 */
17508     /** SWBA time (time before tbtt in msec) */
17509     WMI_VDEV_PARAM_SWBA_TIME,                                 /* 0x9 */
17510     /** time period for updating VDEV stats */
17511     WMI_VDEV_STATS_UPDATE_PERIOD,                             /* 0xa */
17512     /** age out time in msec for frames queued for station in power save*/
17513     WMI_VDEV_PWRSAVE_AGEOUT_TIME,                             /* 0xb */
17514     /** Host SWBA interval (time in msec before tbtt for SWBA event generation) */
17515     WMI_VDEV_HOST_SWBA_INTERVAL,                              /* 0xc */
17516     /** DTIM period (specified in units of num beacon intervals) */
17517     WMI_VDEV_PARAM_DTIM_PERIOD,                               /* 0xd */
17518     /** scheduler air time limit for this VDEV. used by off chan scheduler  */
17519     WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT,                     /* 0xe */
17520     /** enable/disable WDS for this VDEV  */
17521     WMI_VDEV_PARAM_WDS,                                       /* 0xf */
17522     /** ATIM Window */
17523     WMI_VDEV_PARAM_ATIM_WINDOW,                               /* 0x10 */
17524     /** BMISS max */
17525     WMI_VDEV_PARAM_BMISS_COUNT_MAX,                           /* 0x11 */
17526     /** BMISS first time */
17527     WMI_VDEV_PARAM_BMISS_FIRST_BCNT,                          /* 0x12 */
17528     /** BMISS final time */
17529     WMI_VDEV_PARAM_BMISS_FINAL_BCNT,                          /* 0x13 */
17530     /** WMM enables/disabled */
17531     WMI_VDEV_PARAM_FEATURE_WMM,                               /* 0x14 */
17532     /** Channel width */
17533     WMI_VDEV_PARAM_CHWIDTH,                                   /* 0x15 */
17534     /** Channel Offset */
17535     WMI_VDEV_PARAM_CHEXTOFFSET,                               /* 0x16 */
17536     /** Disable HT Protection */
17537     WMI_VDEV_PARAM_DISABLE_HTPROTECTION,                      /* 0x17 */
17538     /** Quick STA Kickout */
17539     WMI_VDEV_PARAM_STA_QUICKKICKOUT,                          /* 0x18 */
17540     /** Rate to be used with Management frames */
17541     WMI_VDEV_PARAM_MGMT_RATE,                                 /* 0x19 */
17542     /** Protection Mode */
17543     WMI_VDEV_PARAM_PROTECTION_MODE,                           /* 0x1a */
17544     /** Fixed rate setting
17545      * The top nibble is used to select which format to use for encoding
17546      * the rate specification: 0xVXXXXXXX
17547      * If V == 0b0000: format is same as before: 0x000000RR
17548      * If V == 0b0001: format is: 0x1000RRRR.
17549      *                 This will be output of WMI_ASSEMBLE_RATECODE_V1
17550      * The host shall use the new V1 format (and set V = 0x1) if the target
17551      * indicates 802.11ax support via the WMI_SERVICE_11AX flag, or if the
17552      * system is configured with Nss > 4 (either at compile time within the
17553      * host driver, or through WMI_SERVICE_READY PHY capabilities provided
17554      * by the target).
17555      */
17556     WMI_VDEV_PARAM_FIXED_RATE,                                /* 0x1b */
17557     /**
17558      * 11AX: GI =
17559      *     WMI_GI_400_NS, WMI_GI_800_NS, WMI_GI_1600_NS, or WMI_GI_3200_NS
17560      * 11N: SGI=WMI_GI_400_NS
17561      */
17562     WMI_VDEV_PARAM_SGI,                                       /* 0x1c */
17563     /** Enable LDPC */
17564     WMI_VDEV_PARAM_LDPC,                                      /* 0x1d */
17565     /** Enable Tx STBC */
17566     WMI_VDEV_PARAM_TX_STBC,                                   /* 0x1e */
17567     /** Enable Rx STBC */
17568     WMI_VDEV_PARAM_RX_STBC,                                   /* 0x1f */
17569     /** Intra BSS forwarding  */
17570     WMI_VDEV_PARAM_INTRA_BSS_FWD,                             /* 0x20 */
17571     /** Setting Default xmit key for Vdev */
17572     WMI_VDEV_PARAM_DEF_KEYID,                                 /* 0x21 */
17573     /** NSS width */
17574     WMI_VDEV_PARAM_NSS,                                       /* 0x22 */
17575     /** Set the custom rate for the broadcast data frames */
17576     WMI_VDEV_PARAM_BCAST_DATA_RATE,                           /* 0x23 */
17577     /** Set the custom rate (rate-code) for multicast data frames */
17578     WMI_VDEV_PARAM_MCAST_DATA_RATE,                           /* 0x24 */
17579     /** Tx multicast packet indicate Enable/Disable */
17580     WMI_VDEV_PARAM_MCAST_INDICATE,                            /* 0x25 */
17581     /** Tx DHCP packet indicate Enable/Disable */
17582     WMI_VDEV_PARAM_DHCP_INDICATE,                             /* 0x26 */
17583     /** Enable host inspection of Tx unicast packet to unknown destination */
17584     WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE,                     /* 0x27 */
17585 
17586     /* The minimum amount of time AP begins to consider STA inactive */
17587     WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,  /* 0x28 */
17588 
17589     /* An associated STA is considered inactive when there is no recent TX/RX
17590      * activity and no downlink frames are buffered for it. Once a STA exceeds
17591      * the maximum idle inactive time, the AP will send an 802.11 data-null as
17592      * a keep alive to verify the STA is still associated. If the STA does ACK
17593      * the data-null, or if the data-null is buffered and the STA does not
17594      * retrieve it, the STA will be considered unresponsive (see
17595      * WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS). */
17596     WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,  /* 0x29 */
17597 
17598     /* An associated STA is considered unresponsive if there is no recent
17599      * TX/RX activity and downlink frames are buffered for it. Once a STA
17600      * exceeds the maximum unresponsive time, the AP will send a
17601      * WMI_STA_KICKOUT event to the host so the STA can be deleted. */
17602     WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,   /* 0x2a */
17603 
17604     /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
17605     WMI_VDEV_PARAM_AP_ENABLE_NAWDS,                           /* 0x2b */
17606     /** Enable/Disable RTS-CTS */
17607     WMI_VDEV_PARAM_ENABLE_RTSCTS,                             /* 0x2c */
17608     /* Enable TXBFee/er */
17609     WMI_VDEV_PARAM_TXBF,                                      /* 0x2d */
17610 
17611     /**Set packet power save */
17612     WMI_VDEV_PARAM_PACKET_POWERSAVE,                          /* 0x2e */
17613 
17614     /**Drops un-encrypted packets if any received in an encryted connection
17615      * otherwise forwards to host
17616      */
17617     WMI_VDEV_PARAM_DROP_UNENCRY,                              /* 0x2f */
17618 
17619     /*
17620      * Set TX encap type.
17621      *
17622      * enum wmi_pkt_type is to be used as the parameter
17623      * specifying the encap type.
17624      */
17625     WMI_VDEV_PARAM_TX_ENCAP_TYPE,                             /* 0x30 */
17626 
17627     /*
17628      * Try to detect stations that woke-up and exited power save but did not
17629      * successfully transmit data-null with PM=0 to AP. When this happens,
17630      * STA and AP power save state are out-of-sync. Use buffered but
17631      * undelivered MSDU to the STA as a hint that the STA is really awake
17632      * and expecting normal ASAP delivery, rather than retrieving BU with
17633      * PS-Poll, U-APSD trigger, etc.
17634      *
17635      * 0 disables out-of-sync detection. Maximum time is 255 seconds.
17636      */
17637     WMI_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS,  /* 0x31 */
17638 
17639     /* Enable/Disable early rx dynamic adjust feature.
17640      * Early-rx dynamic adjust is a advance power save feature.
17641      * Early-rx is a wakeup duration before exact TBTT,which is deemed necessary to provide a cushion for various
17642      * timing discrepancies in the system.
17643      * In current code branch, the duration is set to a very conservative fix value to make sure the drift impact is minimum.
17644      * The fix early-tx will result in the unnessary power consume, so a dynamic early-rx adjust algorithm can be designed
17645      * properly to minimum the power consume.*/
17646     WMI_VDEV_PARAM_EARLY_RX_ADJUST_ENABLE,                    /* 0x32 */
17647 
17648     /* set target bmiss number per sample cycle if bmiss adjust was chosen.
17649      * In this adjust policy,early-rx is adjusted by comparing the current bmiss rate to target bmiss rate
17650      * which can be set by user through WMI command.
17651      */
17652     WMI_VDEV_PARAM_EARLY_RX_TGT_BMISS_NUM,                    /* 0x33 */
17653 
17654     /* set sample cycle(in the unit of beacon interval) if bmiss adjust was chosen */
17655     WMI_VDEV_PARAM_EARLY_RX_BMISS_SAMPLE_CYCLE,               /* 0x34 */
17656 
17657     /* set slop_step */
17658     WMI_VDEV_PARAM_EARLY_RX_SLOP_STEP,                        /* 0x35 */
17659 
17660     /* set init slop */
17661     WMI_VDEV_PARAM_EARLY_RX_INIT_SLOP,                        /* 0x36 */
17662 
17663     /* pause adjust enable/disable */
17664     WMI_VDEV_PARAM_EARLY_RX_ADJUST_PAUSE,                     /* 0x37 */
17665 
17666 
17667     /* Set channel pwr limit value of the vdev the minimal value of all
17668      * vdevs operating on this channel will be set as channel tx power
17669      * limit, which is used to configure ratearray
17670      */
17671     WMI_VDEV_PARAM_TX_PWRLIMIT,                               /* 0x38 */
17672 
17673     /* set the count of snr value for calculation in snr monitor */
17674     WMI_VDEV_PARAM_SNR_NUM_FOR_CAL,                           /* 0x39 */
17675 
17676     /** Roaming offload */
17677     WMI_VDEV_PARAM_ROAM_FW_OFFLOAD,                           /* 0x3a */
17678 
17679     /** Enable Leader request RX functionality for RMC */
17680     WMI_VDEV_PARAM_ENABLE_RMC,                                /* 0x3b */
17681 
17682    /* IBSS does not have deauth/disassoc, vdev has to detect peer gone event
17683      * by himself. If the beacon lost time exceed this threshold, the peer is
17684      * thought to be gone. */
17685     WMI_VDEV_PARAM_IBSS_MAX_BCN_LOST_MS,                      /* 0x3c */
17686 
17687     /** max rate in kpbs, transmit rate can't go beyond it */
17688     WMI_VDEV_PARAM_MAX_RATE,                                  /* 0x3d */
17689 
17690     /* enable/disable drift sample. 0: disable; 1: clk_drift; 2: ap_drift; 3 both clk and ap drift*/
17691     WMI_VDEV_PARAM_EARLY_RX_DRIFT_SAMPLE,                     /* 0x3e */
17692 
17693     /* set Tx failure count threshold for the vdev */
17694     WMI_VDEV_PARAM_SET_IBSS_TX_FAIL_CNT_THR,                  /* 0x3f */
17695 
17696     /* set ebt resync timeout value, in the unit of TU */
17697     WMI_VDEV_PARAM_EBT_RESYNC_TIMEOUT,                        /* 0x40 */
17698 
17699     /* Enable Aggregation State Trigger Event */
17700     WMI_VDEV_PARAM_AGGR_TRIG_EVENT_ENABLE,                    /* 0x41 */
17701 
17702     /* This parameter indicates whether IBSS station can enter into power save
17703     * mode by sending Null frame (with PM=1). When not allowed, IBSS station has to stay
17704     * awake all the time and should never set PM=1 in its transmitted frames.
17705     * This parameter is meaningful/valid only when WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH
17706     * is non-zero. */
17707     WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED,                /* 0x42 */
17708 
17709     /* This parameter indicates if this station can enter into power collapse
17710     * for the remaining beacon interval after the ATIM window.
17711     * This parameter is meaningful/valid only when WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED
17712     * is set to TRUE. */
17713     WMI_VDEV_PARAM_IS_POWER_COLLAPSE_ALLOWED,                 /* 0x43 */
17714 
17715     /* This parameter indicates whether IBSS station exit power save mode and
17716     * enter power active state (by sending Null frame with PM=0 in the immediate ATIM Window)
17717     * whenever there is a TX/RX activity. */
17718     WMI_VDEV_PARAM_IS_AWAKE_ON_TXRX_ENABLED,                  /* 0x44 */
17719 
17720     /* If Awake on TX/RX activity is enabled, this parameter indicates
17721     * the data inactivity time in number of beacon intervals after which
17722     * IBSS station reenters power save by sending Null frame with PM=1. */
17723     WMI_VDEV_PARAM_INACTIVITY_CNT,                            /* 0x45 */
17724 
17725     /* Inactivity time in msec after which TX Service Period (SP) is
17726     * terminated by sending a Qos Null frame with EOSP.
17727     * If value is 0, TX SP is terminated with the last buffered packet itself
17728     * instead of waiting for the inactivity timeout. */
17729     WMI_VDEV_PARAM_TXSP_END_INACTIVITY_TIME_MS,               /* 0x46 */
17730 
17731     /** DTIM policy */
17732     WMI_VDEV_PARAM_DTIM_POLICY,                               /* 0x47 */
17733 
17734     /* When IBSS network is initialized, PS-supporting device
17735     * does not enter protocol sleep state during first
17736     * WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS seconds. */
17737     WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS,                  /* 0x48 */
17738 
17739     /* Enable/Disable 1 RX chain usage during the ATIM window */
17740     WMI_VDEV_PARAM_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_ENABLE,   /* 0x49 */
17741 
17742     /* RX Leak window is the time driver waits before shutting down
17743      * the radio or switching the channel and after receiving an ACK
17744      * for a data frame with PM bit set) */
17745     WMI_VDEV_PARAM_RX_LEAK_WINDOW,                            /* 0x4a */
17746 
17747     /** Averaging factor(16 bit value) is used in the calculations to
17748      * perform averaging of different link level statistics like average
17749      * beacon spread or average number of frames leaked */
17750     WMI_VDEV_PARAM_STATS_AVG_FACTOR,                          /* 0x4b */
17751 
17752     /** disconnect threshold, once the consecutive error for specific peer
17753      * exceed this threshold, FW will send kickout event to host */
17754     WMI_VDEV_PARAM_DISCONNECT_TH,                             /* 0x4c */
17755 
17756     /** The rate_code of RTS_CTS changed by host. Now FW can support
17757      * more non-HT rates rather than 1Mbps or 6Mbps */
17758     WMI_VDEV_PARAM_RTSCTS_RATE,                               /* 0x4d */
17759 
17760     /** This parameter indicates whether using a long duration RTS-CTS
17761      * protection when a SAP goes off channel in MCC mode */
17762     WMI_VDEV_PARAM_MCC_RTSCTS_PROTECTION_ENABLE,              /* 0x4e */
17763 
17764     /** This parameter indicates whether using a broadcast probe response
17765      * to increase the detectability of SAP in MCC mode */
17766     WMI_VDEV_PARAM_MCC_BROADCAST_PROBE_ENABLE,                /* 0x4f */
17767 
17768     /** This parameter indicates the power backoff in percentage
17769      * currently supports 100%, 50%, 25%, 12.5%, and minimum
17770      * Host passes 0, 1, 2, 3, 4 to Firmware
17771      * 0 --> 100% --> no changes, 1 --> 50% --> -3dB,
17772      * 2 --> 25% --> -6dB, 3 --> 12.5% --> -9dB, 4 --> minimum --> -32dB
17773      */
17774     WMI_VDEV_PARAM_TXPOWER_SCALE,                             /* 0x50 */
17775 
17776     /** TX power backoff in dB: tx power -= param value
17777      * Host passes values(DB) to Halphy, Halphy reduces the power table
17778      * by the values.  Safety check will happen in Halphy.
17779      */
17780     WMI_VDEV_PARAM_TXPOWER_SCALE_DECR_DB,                     /* 0x51 */
17781 
17782     /** Multicast to Unicast conversion setting */
17783     WMI_VDEV_PARAM_MCAST2UCAST_SET,                           /* 0x52 */
17784 
17785     /** Total number of HW retries */
17786     WMI_VDEV_PARAM_RC_NUM_RETRIES,                            /* 0x53 */
17787 
17788     /** Max tx percentage for cabq */
17789     WMI_VDEV_PARAM_CABQ_MAXDUR,                               /* 0x54 */
17790 
17791     /** MFPTEST settings */
17792     WMI_VDEV_PARAM_MFPTEST_SET,                               /* 0x55 */
17793 
17794     /** RTS Fixed rate setting */
17795     WMI_VDEV_PARAM_RTS_FIXED_RATE,                            /* 0x56 */
17796 
17797     /** VHT SGI MASK */
17798     WMI_VDEV_PARAM_VHT_SGIMASK,                               /* 0x57 */
17799 
17800     /** VHT80 Auto Rate MASK */
17801     WMI_VDEV_PARAM_VHT80_RATEMASK,                            /* 0x58 */
17802 
17803     /** set Proxy STA features for this vap */
17804     WMI_VDEV_PARAM_PROXY_STA,                                 /* 0x59 */
17805 
17806     /** set virtual cell mode - enable/disable */
17807     WMI_VDEV_PARAM_VIRTUAL_CELL_MODE,                         /* 0x5a */
17808 
17809     /** Set receive packet type */
17810     WMI_VDEV_PARAM_RX_DECAP_TYPE,                             /* 0x5b */
17811 
17812     /** Set ratemask with specific Bandwidth and NSS */
17813     WMI_VDEV_PARAM_BW_NSS_RATEMASK,                           /* 0x5c */
17814 
17815     /** Set SENSOR Support */
17816     WMI_VDEV_PARAM_SENSOR_AP,                                 /* 0x5d */
17817 
17818     /** Set beacon rate */
17819     WMI_VDEV_PARAM_BEACON_RATE,                               /* 0x5e */
17820 
17821     /** Enable CTS to self for DTIM beacon */
17822     WMI_VDEV_PARAM_DTIM_ENABLE_CTS,                           /* 0x5f */
17823 
17824     /** Disable station kickout at Vap level */
17825     WMI_VDEV_PARAM_STA_KICKOUT,                               /* 0x60 */
17826 
17827     /* VDEV capabilities */
17828     WMI_VDEV_PARAM_CAPABILITIES, /* see capabilities defs below */ /* 0x61 */
17829 
17830     /**
17831      * Increment TSF in micro seconds to avoid beacon collision on mesh VAP.
17832      * The host must ensure that either no other vdevs share the TSF with
17833      * this vdev, or else that it is acceptable to apply this TSF adjustment
17834      * to all vdevs sharing the TSF.
17835      */
17836     WMI_VDEV_PARAM_TSF_INCREMENT,                             /* 0x62 */
17837 
17838     /** Disable/Enable AMPDU of vdev per AC:
17839      * bit | AC
17840      * --------
17841      *  0  | VO
17842      *  1  | VI
17843      *  2  | BE
17844      *  3  | BK
17845      * A value of 0 in a given bit disables A-MPDU aggregation for
17846      * that AC; a value of 1 enables A-MPDU aggregation
17847      */
17848     WMI_VDEV_PARAM_AMPDU_PER_AC,                              /* 0x63 */
17849 
17850     /**
17851      * Vdev level rx filter of from-ds / to-ds / no-ds / ta / ra frames.
17852      * Used mainly for mesh-vap.
17853      * The parameter value delivered with the RX_FILTER vdev param contains
17854      * a bit-or mask of wmi_vdev_param_filter enum values.
17855      */
17856     WMI_VDEV_PARAM_RX_FILTER,                                 /* 0x64 */
17857 
17858     /** vdev-specific mgmt tx power in dBm units (signed integer value) */
17859     WMI_VDEV_PARAM_MGMT_TX_POWER,                             /* 0x65 */
17860 
17861     /** Vdev level non aggregration/11g sw retry threshold. 0-disable, min:0, max:31, default:15 */
17862     WMI_VDEV_PARAM_NON_AGG_SW_RETRY_TH,                       /* 0x66 */
17863     /** Vdev level aggregration sw retry threshold. 0-disable, min:0, max:31, default:15 */
17864     WMI_VDEV_PARAM_AGG_SW_RETRY_TH,                           /* 0x67 */
17865 
17866     /** disable dynamic bw RTS **/
17867     WMI_VDEV_PARAM_DISABLE_DYN_BW_RTS,                        /* 0x68 */
17868 
17869     /** per ssid (vdev) based ATF strict/fair scheduling policy
17870      *  param values are WMI_ATF_SSID_FAIR_SCHED, WMI_ATF_SSID_STRICT_SCHED,
17871      *  or WMI_ATF_SSID_FAIR_SCHED_WITH_UB
17872      */
17873     WMI_VDEV_PARAM_ATF_SSID_SCHED_POLICY,                     /* 0x69 */
17874 
17875     /** Enable or disable Dual carrier modulation
17876      * valid values: 0-Disable DCM, 1-Enable DCM.
17877      */
17878     WMI_VDEV_PARAM_HE_DCM,                                    /* 0x6a */
17879 
17880     /** Enable or disable Extended range
17881      * valid values: 0-Disable ER, 1-Enable ER.
17882      */
17883     WMI_VDEV_PARAM_HE_RANGE_EXT,                              /* 0x6b */
17884 
17885     /* enable or disable BCAST probe response feature */
17886     WMI_VDEV_PARAM_ENABLE_BCAST_PROBE_RESPONSE,               /* 0x6c */
17887 
17888     /* param to specify probe request Tx delay during Fast Initial Link Setup */
17889     WMI_VDEV_PARAM_FILS_MAX_CHANNEL_GUARD_TIME, /* units = milliseconds */ /* 0x6d */
17890 
17891     /* enable or disable NOA for P2P GO */
17892     WMI_VDEV_PARAM_DISABLE_NOA_P2P_GO,                        /* 0x6e */
17893 
17894     /** Per band user management frame fix rate setting
17895      *  BIT 31: enable (1) or disable (0) mgmt fix rate for 5G
17896      *  BIT 30: enable (1) or disable (0) mgmt fix rate for 2G
17897      *
17898      *  BIT 23: 11ax (1) or legacy (0) rate code
17899      *  BITS [22..12]: rate code for 5G
17900      *
17901      *  BIT 11: 11ax (1) or legacy (0) rate code
17902      *  BITS [10..0]: rate code for 2G
17903      */
17904     WMI_VDEV_PARAM_PER_BAND_MGMT_TX_RATE,                     /* 0x6f */
17905     /* This should be called before WMI_VDEV_PARAM_TXBF */
17906     WMI_VDEV_PARAM_11AX_TXBF,                                 /* 0x70 */
17907 
17908     /** This parameter indicates whether VDEV is SMPS intolerant.
17909      * I.e. - SMPS action frame cannot be transmitted by the VDEV to
17910      * dynamically change the RX NSS.
17911      *
17912      * valid values: 1 - VDEV is SMPS intolerant, 0 - VDEV is SMPS tolerant
17913      */
17914     WMI_VDEV_PARAM_SMPS_INTOLERANT,                           /* 0x71 */
17915 
17916     /** specify probe request Tx delay for scans triggered on this VDEV */
17917     WMI_VDEV_PARAM_PROBE_DELAY, /* units = milliseconds */    /* 0x72 */
17918 
17919     /** specify the time gap between each set of probe request transmissions.
17920      * The number of probe requests in each set depends on the ssid_list and
17921      * bssid_list in the scan request.
17922      * This parameter will be applied only for scans triggered on this VDEV.
17923      */
17924     WMI_VDEV_PARAM_REPEAT_PROBE_TIME, /* units = milliseconds */ /* 0x73 */
17925 
17926     /** specify the HE LTF setting that should be used for fixed rate
17927      * transmissions.
17928      *
17929      * Expects values of WMI_HE_LTF_DEFAULT, WMI_HE_LTF_1X, WMI_HE_LTF_2X,
17930      * or WMI_HE_LTF_4X.
17931      */
17932     WMI_VDEV_PARAM_HE_LTF,                                    /* 0x74 */
17933 
17934     /** VDEV parameter to configure the number of TX chains to use for
17935      *  a/b/g rates.
17936      *  bit 0~15  : 11b mode TX chain number.
17937      *  bit 16~31 : 11ag mode TX chain number.
17938      *
17939      *  valid values:
17940      *      Should not exceed the maximum number of supported TX Chains
17941      *      0 - Used to reset the vote. Acts as Don't Care
17942      */
17943     WMI_VDEV_PARAM_ABG_MODE_TX_CHAIN_NUM,                     /* 0x75 */
17944 
17945     /**
17946      * Enable or disable the multi group key feature on this VDEV.
17947      * used for NAN APP and VLAN Tagging
17948      */
17949     WMI_VDEV_PARAM_ENABLE_MULTI_GROUP_KEY,                    /* 0x76 */
17950 
17951    /*
17952     * Specify the total number of multi group key on this VDEV.
17953     */
17954     WMI_VDEV_PARAM_NUM_GROUP_KEYS,                            /* 0x77 */
17955 
17956     /** VDEV parameter to enable or disable various OCE features */
17957     WMI_VDEV_PARAM_ENABLE_DISABLE_OCE_FEATURES,              /* 0x78 */
17958 
17959     /*
17960      * Set/Clear 3 least-significant bits to
17961      * Disable or Enable rate drop down for MGMT, SU data and MU data pkts
17962      *
17963      * bit 0 -> If set MGMT Pkt rate drop down is enabled else disabled
17964      * bit 1 -> If set SU data Pkt rate drop down is enabled else disabled
17965      * bit 2 -> If set MU data Pkt rate drop down is enabled else disabled
17966      * bits 31:3 -> Reserved bits. should be set to zero.
17967      */
17968     WMI_VDEV_PARAM_RATE_DROPDOWN_BMAP,                       /* 0x79 */
17969 
17970     /** VDEV parameter to config modulated DTIM count */
17971     WMI_VDEV_PARAM_MODDTIM_CNT,                              /* 0x7a */
17972 
17973     /**
17974      * VDEV parameter to config max listen interval,
17975      * when modulated DTIM is enabled.
17976      * Units are 100TU.
17977      */
17978     WMI_VDEV_PARAM_MAX_LI_OF_MODDTIM,                        /* 0x7b */
17979 
17980     /** VDEV parameter to config dynamic DTIM count */
17981     WMI_VDEV_PARAM_DYNDTIM_CNT,                              /* 0x7c */
17982 
17983     /** VDEV parameter to enable or disable RTT responder role
17984      * A value of 0 in a given bit disables corresponding mode.
17985      * bit | Responder mode support
17986      * -----------------------------------------
17987      *  0  | responder mode for 11MC ranging
17988      *  1  | responder mode for 11AZ NTB ranging
17989      *  2  | responder mode for 11AZ TB ranging
17990      */
17991     WMI_VDEV_PARAM_ENABLE_DISABLE_RTT_RESPONDER_ROLE,        /* 0x7d */
17992 
17993     /** Parameter to configure BA mode.
17994      * Valid values: 0- Auto mode,
17995      *               1- Manual mode(addba req not sent).
17996      *               2- buffer size 64
17997      *               3- buffer size 256
17998      *               4- buffer size 128 // placeholder, not valid
17999      *               5- buffer size 512
18000      *               6- buffer size 1024
18001      */
18002     WMI_VDEV_PARAM_BA_MODE,                                 /* 0x7e */
18003 
18004     /**
18005      * VDEV parameter to force to set modulate DTIM count as listen interval,
18006      * no matter whether WoW is enabled
18007      * Default: Disabled.
18008      * Valid values: 0- Disabled,
18009      *               1- Enabled.
18010      */
18011     WMI_VDEV_PARAM_FORCED_MODDTIM_ENABLE,                   /* 0x7f */
18012 
18013     /** specify the setting that are valid for auto rate transmissions.
18014      * bits 7:0 (LTF): When bitmask is set, then corresponding LTF value is
18015      *                 used for auto rate.
18016      *     BIT0   = 1 (WMI_HE_LTF_1X or WMI_EHT_LTF_1X depending on
18017      *                 current rate’s preamble type HE or EHT)
18018      *     BIT1   = 1 (WMI_HE_LTF_2X or WMI_EHT_LTF_2X)
18019      *     BIT2   = 1 (WMI_HE_LTF_4X or WMI_EHT_LTF_4X)
18020      *     BIT3-7 = Reserved bits.
18021      * bits 15:8 (SGI): When bitmask is set, then corresponding SGI value is
18022      *                 used for auto rate.
18023      *     BIT8     = 1 (400 NS)
18024      *     BIT9     = 1 (800 NS)
18025      *     BIT10    = 1 (1600 NS)
18026      *     BIT11    = 1 (3200 NS)
18027      *     BIT12-15 = Reserved bits.
18028      * bits 31:16: Reserved bits. should be set to zero.
18029      */
18030     WMI_VDEV_PARAM_AUTORATE_MISC_CFG,                       /* 0x80 */
18031 
18032     /** VDEV parameter to enable or disable RTT initiator mac address
18033       * randomization.
18034       * Default: Disabled.
18035       * valid values: 0-Disable random mac 1-Enable random mac
18036       */
18037     WMI_VDEV_PARAM_ENABLE_DISABLE_RTT_INITIATOR_RANDOM_MAC, /* 0x81 */
18038 
18039     /**
18040      * For each AC, configure how many tx retries to send without RTS
18041      * before enabling RTS
18042      *  bits 0:7    :BE
18043      *  bits 8:15   :BK
18044      *  bits 16:23  :VI
18045      *  bits 24:31  :VO
18046      * A value of 0 in specific AC means default configuration for that AC.
18047      */
18048     WMI_VDEV_PARAM_TX_RETRIES_BEFORE_RTS_PER_AC,           /* 0x82 */
18049 
18050     /**
18051      * Parameter to enable/disable AMSDU aggregation size auto-selection logic.
18052      * We have logic where AMSDU aggregation size is dynamically decided
18053      * based on MCS. That logic is enabled by default.
18054      * For certain tests, we need a method to disable this optimization,
18055      * and base AMSDU size only on the peer's capability rather than our logic.
18056      * A value of 0 means disable internal optimization,
18057      * 1 means enable internal optimzation.
18058      */
18059     WMI_VDEV_PARAM_AMSDU_AGGREGATION_SIZE_OPTIMIZATION,    /* 0x83 */
18060 
18061     /**
18062      * In RAW mode, FW will not know whether the encryption is enabled
18063      * on this vdev or not.
18064      * Because of this, FW will not program the right info into the
18065      * RawNwifi TLV resulting in the connection failure in RAW mode.
18066      * So to program the right info, FW should know whether the security
18067      * is enabled on this VDEV.
18068      * Host will send this VDEV param command (With Value = 1) in case of
18069      * RAW secure mode.
18070      */
18071     WMI_VDEV_PARAM_RAW_IS_ENCRYPTED,                       /* 0x84 */
18072 
18073     /**
18074      * Dynamically enable/disable green tx (GTX) on supported rates.
18075      * Host will set this param to 1 for enabling GTX & 0 for disabling it.
18076      * Note: If GTX was already running (since the global GTX control
18077      * resides with default BDF setting) & host wants to disable GTX,
18078      * the VDEV does not exercise any more TPC changes on the GTX supported
18079      * rates & goes to a default GTX SM where all PPDU's sent on default TPC.
18080      * Whenever, host wants to re-enable GTX, the enable command resumes the
18081      * GTX functionality & TPC convergence to lower power levels can be
18082      * attained as long as PER on GTX supported rates is within the pre-defined
18083      * PER margin configured through the BDF.
18084      */
18085     WMI_VDEV_PARAM_GTX_ENABLE,                             /* 0x85 */
18086 
18087     /*
18088      * Enable/Disable multicast buffer.
18089      * A FLAG to enable & disable buffering of multicast frames at AP
18090      * when stations are in Power Save mode.
18091      * Once AP disables buffering of multicast frame,
18092      * clients which goes into Power save mode will not receive these frames.
18093      * by default MCAST buffering will be enabled.
18094      * (CABQ = Content After Beacon Queue = multicast queue)
18095      * Host will send this VDEV param command,
18096      * With Value = 1 means fw will disable the MCAST buffering
18097      * With Value = 0 means fw will enable the MCAST buffering.
18098      */
18099     WMI_VDEV_PARAM_DISABLE_CABQ,                          /* 0x86 */
18100 
18101     /**
18102       * For SU and MU sounding
18103       * switch between su ac/ax sounding and mu ac/ax sounding
18104       * switch between triggered/ non-triggered on ax sounding enabled.
18105       * each bit toggles the corresponding modes by enabling/disabling
18106       *
18107       * Bit 1 doesn't carry any operation for now and may change later,
18108       * so reserved.
18109       *
18110       *-----------------------
18111       * bit(0)   |    mode
18112       *-----------------------
18113       *       0  |  AC
18114       *       1  |  AX
18115       *-----------------------
18116       *
18117       * bit(1)   |  Reserved
18118       *
18119       *-----------------------
18120       * bit(2)   |    mode
18121       *-----------------------
18122       *       0  |  SU
18123       *       1  |  MU
18124       *-----------------------
18125       * bit(3)   |    mode
18126       *-----------------------
18127       *       0  |  non -triggered
18128       *       1  |  triggered
18129       */
18130     WMI_VDEV_PARAM_SET_HE_SOUNDING_MODE,                  /* 0x87 */
18131 
18132     /** Fixed rate setting used in UL Trigger
18133      * The top nibble is used to select which format to use for encoding
18134      * the rate specification: 0xVXXXXXXX, V must be 1 for the UL
18135      * format.
18136      * If V == 0b0001: format is: 0x1000RRRR.
18137      *                 ("RRRR" ratecode already has those preamble bits,
18138      *                 which can specify HE or EHT)
18139      *                 This will be output of WMI_ASSEMBLE_RATECODE_V1
18140      *
18141      * This parameter controls the UL OFDMA and UL MU-MIMO vdev fixed rate.
18142      */
18143     WMI_VDEV_PARAM_UL_FIXED_RATE,                         /* 0x88 */
18144 
18145     /**
18146      * Uplink MU-MIMO & OFDMA GI configuration used in UL Trigger
18147      * 11AX: GI =
18148      *     WMI_GI_400_NS, WMI_GI_800_NS, WMI_GI_1600_NS, or WMI_GI_3200_NS
18149      * 11N: SGI=WMI_GI_400_NS
18150      */
18151     /** Top nibble can be used to distinguish between HE and EHT: 0xVXXXXXXX
18152      *  If V == 0b0000: format is HE.
18153      *  If V == 0b0001: format is EHT.
18154      */
18155     WMI_VDEV_PARAM_UL_GI,                                 /* 0x89 */
18156 
18157     /** Enable/Disable LDPC in UL Trigger */
18158     /** Top nibble can be used to distinguish between HE and EHT: 0xVXXXXXXX
18159      *  If V == 0b0000: format is HE.
18160      *  If V == 0b0001: format is EHT.
18161      */
18162     WMI_VDEV_PARAM_UL_LDPC,                               /* 0x8A */
18163 
18164     /** Max NSS allowed in UL Trigger */
18165     /** Top nibble can be used to distinguish between HE and EHT: 0xVXXXXXXX
18166      *  If V == 0b0000: format is HE.
18167      *  If V == 0b0001: format is EHT.
18168      */
18169     WMI_VDEV_PARAM_UL_NSS,                                /* 0x8B */
18170 
18171     /** Enable/Disable STBC in UL Trigger */
18172     /** Top nibble can be used to distinguish between HE and EHT: 0xVXXXXXXX
18173      *  If V == 0b0000: format is HE.
18174      *  If V == 0b0001: format is EHT.
18175      */
18176     WMI_VDEV_PARAM_UL_STBC,                               /* 0x8C */
18177 
18178     /** specify the HE LTF setting that should be used for fixed rate
18179      * uplink transmissions.
18180      *
18181      * Expects values of WMI_HE_LTF_DEFAULT, WMI_HE_LTF_1X, WMI_HE_LTF_2X,
18182      * or WMI_HE_LTF_4X.
18183      */
18184     WMI_VDEV_PARAM_UL_HE_LTF,                             /* 0x8D */
18185 
18186     /** Uplink OFDMA PPDU bandwidth */
18187     /** Top nibble can be used to distinguish between HE and EHT: 0xVXXXXXXX
18188      *  If V == 0b0000: format is HE.
18189      *                  (0: 20MHz, 1: 40MHz, 2: 80Mhz, 3: 160MHz)
18190      *  If V == 0b0001: format is EHT.
18191      *                  (0: 20MHz, 1: 40MHz, 2: 80Mhz, 3: 160MHz, 4: 320MHz)
18192      */
18193     WMI_VDEV_PARAM_UL_PPDU_BW,                            /* 0x8E */
18194 
18195     /** Enable/Disable FW handling MU EDCA change from AP (1: En, 0:Dis)  */
18196     WMI_VDEV_PARAM_MU_EDCA_FW_UPDATE_EN,                  /* 0x8F */
18197 
18198     /** Update dot11ObssNbruToleranceTime in fw. Param value: seconds */
18199     WMI_VDEV_PARAM_UPDATE_OBSS_RU_TOLERANCE_TIME,         /* 0x90 */
18200 
18201     /** Parameter used when MTU size is sent by the host
18202      * In particular, this configuration message is used for cases where the
18203      * encapsulation header results in a larger max frame size than the
18204      * typical 802.3 + SNAP/LLC frame.
18205      */
18206     WMI_VDEV_PARAM_MAX_MTU_SIZE,                          /* 0x91 */
18207 
18208     /** Send every nth beacon to host
18209      * if value of n is 0, it means this Nth beacon upload is disabled
18210      */
18211     WMI_VDEV_PARAM_NTH_BEACON_TO_HOST,                    /* 0x92 */
18212 
18213     /**
18214      * To capture the MGMT OR DATA OR BOTH packets.
18215      * Refer to enum WMI_PKT_CAPTURE_MODE_CONFIG for specifications of
18216      * which parameter value enables which kind of packet captures.
18217      */
18218     WMI_VDEV_PARAM_PACKET_CAPTURE_MODE,         /* 0x93 */
18219 
18220     /**
18221      * To configure duration of how many seconds without tx unicast traffic is
18222      * considered stale for mcast rate adaptation
18223      */
18224     WMI_VDEV_PARAM_MCAST_RC_STALE_PERIOD,       /* 0x94 */
18225 
18226     /*
18227      * Bits 3:0   - AST0_FLOW_MASK(4)
18228      * Bits 7:4   - AST1_FLOW_MASK(4)
18229      * Bits 11:8  - AST2_FLOW_MASK(4)
18230      * Bits 15:12 - AST3_FLOW_MASK(4)
18231      * Bits 23:16 - TID_VALID_HI_PRI(8)
18232      * Bits 31:24 - TID_VALID_LOW_PRI(8)
18233      *
18234      * The below macros can be used to set/get the relevant fields.
18235      * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_GET(msdu_flow_config1, ast_x)
18236      * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_SET(msdu_flow_config1, ast_x, mask)
18237      * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_GET(msdu_flow_config1)
18238      * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_SET(msdu_flow_config1, mask)
18239      * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_GET(msdu_flow_config1)
18240      * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_SET(msdu_flow_config1, mask)
18241      */
18242     WMI_VDEV_PARAM_MSDU_FLOW_OVERRIDE_CONFIG,  /* 0x95 */
18243 
18244     /* Enable/Disable using NULL frame for leaky AP  */
18245     WMI_VDEV_PARAM_ENABLE_NULL_FOR_LEAKY_AP,   /* 0x96 */
18246 
18247     /**
18248      * To configure duration of how many seconds without TX/RX data traffic,
18249      * NDI vdev can kickout the connected peer (i.e. NDP Termination).
18250      */
18251     WMI_VDEV_PARAM_NDP_INACTIVITY_TIMEOUT,     /* 0x97 */
18252 
18253     /* To enable/disable multicast rate adaptation feature at vdev level */
18254     WMI_VDEV_PARAM_ENABLE_MCAST_RC,            /* 0x98 */
18255 
18256     /*
18257      * Params related to 6 GHz operation
18258      * The parameter value is formed from WMI_VDEV_6GHZ_BITMAP flags.
18259      */
18260     WMI_VDEV_PARAM_6GHZ_PARAMS,                /* 0x99 */
18261 
18262     /**
18263      * VDEV parameter to enable or disable RTT initiator role
18264      * Default : Enabled
18265      * valid values: 0-Disable initiator role, 1-Enable initiator role.
18266      */
18267     WMI_VDEV_PARAM_ENABLE_DISABLE_RTT_INITIATOR_ROLE, /* 0x9A */
18268 
18269     /**
18270      * To configure duration of how many seconds to wait to kickout peer
18271      * if peer is not reachable
18272      */
18273     WMI_VDEV_PARAM_NDP_KEEPALIVE_TIMEOUT,      /* 0x9B*/
18274 
18275     /**
18276      * To support discovery of NAN cluster with Master Preference (MP) as 0
18277      * when a new device is enabling NAN
18278      */
18279     WMI_VDEV_PARAM_ALLOW_NAN_INITIAL_DISCOVERY_OF_MP0_CLUSTER, /* 0x9C */
18280 
18281     /**
18282      * VDEV parameter to enable or disable roaming reason VSIE in
18283      * re-association request
18284      *
18285      * Default : Disabled
18286      * valid values: 0 - Disable 1 - Enable
18287      */
18288     WMI_VDEV_PARAM_ENABLE_DISABLE_ROAM_REASON_VSIE, /* 0x9D */
18289 
18290     /* Parameter used to configure OBSS Packet Detect threshold
18291      * for Non-SRG / SRG based Spatial Reuse feature.
18292      * (SRG = Spatial Reuse Group)
18293      * The accepted values are in between 0x00 and 0xFF, inclusive.
18294      * The parameter value is programmed into the appropriate spatial reuse
18295      * register, to specify how low the background signal strength from
18296      * neighboring BSS cells must be, for this AP to employ spatial reuse.
18297      *
18298      * The value of the parameter is compared against the OBSS RSSI in dB.
18299      * It is a 8-bit value whose
18300      * range is -128 to 127 (after two's complement operation).
18301      * For example, if the parameter value is 0xF5, the target will
18302      * allow spatial reuse if the RSSI detected from other BSS
18303      * is below -10 dB.
18304      * Similarly, if the parameter value is 0x0A, the target will
18305      * allow spatial reuse only if the RSSI detected from neighboring
18306      * BSS cells is no more than 10 dB.
18307      *
18308      * If Bit 29 is set, then input value will be in dBm. This is used
18309      * for chipsets that use dBm for comparison across MAC/Phy blocks.
18310      * Older chipsets support input in dB units. For newer chipsets, dBm
18311      * units will be used.
18312      * The host will use the WMI_SERVICE_SRG_SRP_SPATIAL_REUSE_SUPPORT
18313      * service ready bit to differentiate between providing input as dB or dBm.
18314      *
18315      * bit    | purpose
18316      * -----------------
18317      * 0  - 7 | Param Value for non-SRG based Spatial Reuse
18318      * 8  - 15| Param value for SRG based Spatial Reuse
18319      * 16 - 28| Reserved
18320      * 29     | Param value is in dBm units rather than dB units
18321      * 30     | Enable/Disable SRG based spatial reuse.
18322      *        | If set to 0, ignore bits 8-15.
18323      * 31     | Enable/Disable Non-SRG based spatial reuse.
18324      *        | If set to 0, ignore bits 0-7.
18325      *
18326      * The WMI_VDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD setting will only
18327      * take effect if the WMI_PDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD
18328      * setting is also set for the pdev that the vdev belongs to.
18329      */
18330     WMI_VDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD, /* 0x9E */
18331 
18332     /* Parameter used to configure OBSS Packet Detection per Access Category
18333      * for SRP based and OBSS_PD based spatial reuse feature.
18334      * (SRP = Spatial Reuse Parameter)
18335      * Based on the bits set, the corresponding Access Category Queues will have
18336      * spatial reuse enabled / disabled.
18337      * bit     | AC
18338      * ------------
18339      * 0       | BK for SRG/Non-SRG
18340      * 1       | BE for SRG/Non-SRG
18341      * 2       | VI for SRG/Non-SRG
18342      * 3       | VO for SRG/Non-SRG
18343      * 4 - 15  | Reserved
18344      * 16      | BK for SRP
18345      * 17      | BE for SRP
18346      * 18      | VI for SRP
18347      * 19      | VO for SRP
18348      * 20 - 31 | Reserved
18349      *
18350      * The WMI_VDEV_PARAM_SET_CMD_OBSS_PD_PER_AC setting will only take effect
18351      * if the WMI_PDEV_PARAM_SET_CMD_OBSS_PD_PER_AC setting is also set for
18352      * the pdev that the vdev belongs to.
18353      */
18354     WMI_VDEV_PARAM_SET_CMD_OBSS_PD_PER_AC, /* 0x9F */
18355 
18356     /**
18357      * VDEV parameter to indicate RSN (Robust Security Network) capability.
18358      * This value will be intersection of the local vdev's (STA's)
18359      * RSN capability and the peer's (AP's) RSN capability.
18360      */
18361     WMI_VDEV_PARAM_RSN_CAPABILITY,        /* 0xA0 */
18362 
18363     /* Parameter used to enable/disable SRP feature */
18364     WMI_VDEV_PARAM_ENABLE_SRP,            /* 0xA1 */
18365 
18366     /*
18367      * Parameter used to control roaming/11kv (BTM) / etc. behavior
18368      * bit    | purpose
18369      * -----------------
18370      * 0      | Disable any FW side roaming except host invoke roaming
18371      * 1      | Do not trans away on receiving BTM req
18372      * 2      | Do not send disassoc to AP when receiving BTM req with
18373      *        | Disassoc Imminent bit set to 1
18374      * 3 - 31 | Reserved
18375      */
18376     WMI_VDEV_PARAM_ROAM_11KV_CTRL,        /* 0xA2 */
18377 
18378     /* vdev param to enable or disable various NAN config features
18379      * param value bitmap set to 1 for enable and 0 for disable respectively
18380      */
18381     WMI_VDEV_PARAM_ENABLE_DISABLE_NAN_CONFIG_FEATURES,  /* 0xA3 */
18382 
18383     /* vdev param to enable the SAP HW offload
18384      *  Bit : 0     - enable/disable SHO
18385      *  Bit : 1     - enable for Sta connected state as well.
18386      *  Bit : 2-31  - reserved
18387      */
18388     WMI_VDEV_PARAM_SHO_CONFIG,          /* 0xA4  */
18389 
18390     /** Enable or disable Non-data HE Extended range
18391      *  valid values: 0-Disable ER, 1-Enable ER.
18392      */
18393     WMI_VDEV_PARAM_NON_DATA_HE_RANGE_EXT,    /* 0xA5 */
18394 
18395     /** Prohibit data & mgmt except keepalive pkt */
18396     WMI_VDEV_PARAM_PROHIBIT_DATA_MGMT,       /* 0xA6 */
18397 
18398     /**  Enable or disable Txop requirement feature
18399      *   0 - Disable feature
18400      *   1 - Enable feature
18401      */
18402     WMI_VDEV_PARAM_WMM_TXOP_ENABLE,          /* 0xA7 */
18403 
18404     /** Value of DTIM to be applied in Suspend mode
18405      */
18406     WMI_VDEV_PARAM_FORCE_DTIM_CNT,           /* 0xA8 */
18407 
18408     /* vdev param to configure the Smart Monitor features
18409      *  Bit : 0     - enable/disable Trigger frames
18410      *  Bit : 1     - enable/disable QOS frames
18411      *  Bit : 2-4   - if 1, fwd beacon frames from connected AP
18412      *              - if 2, fwd beacon frames from unconnected AP
18413      *                during roam scan/host scan
18414      *              - if 3, fwd beacons from unconnected AP during
18415      *                roam scan/host scan and from connected AP
18416      *              - if 4, don't fwd any beacon frame
18417      *  Bit : 5-31  - reserved
18418      */
18419     WMI_VDEV_PARAM_SMART_MONITOR_CONFIG,     /* 0xA9  */
18420 
18421     /** Value of MAX modulated DTIM in ms to be applied
18422      *  in Suspend mode. This parameter will override
18423      *  the value of WMI_VDEV_PARAM_MAX_LI_OF_MODDTIM
18424      */
18425     WMI_VDEV_PARAM_MAX_LI_OF_MODDTIM_MS,     /* 0xAA */
18426 
18427     /*
18428      * Security config advertised in beacons
18429      * bit 0: URNM_MFPR in RSNXE
18430      * bit 1: MFPC in RSN CAP
18431      * bit 2: MFPR in RSN CAP
18432      * bit 3: URNM_MFPR_X20 in RSNXE
18433      * bit 4: RSTA_EXTCAP_I2R_LMR_FB
18434      * bit 31:5 Reserved
18435      */
18436     WMI_VDEV_PARAM_11AZ_SECURITY_CONFIG,    /* 0xAB */
18437 
18438     /*
18439      * Latency Level Flags
18440      */
18441     WMI_VDEV_PARAM_NORMAL_LATENCY_FLAGS_CONFIGURATION,    /* 0xAC */
18442     WMI_VDEV_PARAM_XR_LATENCY_FLAGS_CONFIGURATION,        /* 0xAD */
18443     WMI_VDEV_PARAM_LOW_LATENCY_FLAGS_CONFIGURATION,       /* 0xAE */
18444     WMI_VDEV_PARAM_ULTRA_LOW_LATENCY_FLAGS_CONFIGURATION, /* 0xAF */
18445 
18446     /*
18447      * Latency level UL/DL
18448      * 0-15 bits: UL
18449      * 16-31 bits: DL
18450      */
18451     WMI_VDEV_PARAM_NORMAL_LATENCY_UL_DL_CONFIGURATION,    /* 0xB0 */
18452     WMI_VDEV_PARAM_XR_LATENCY_UL_DL_CONFIGURATION,        /* 0xB1 */
18453     WMI_VDEV_PARAM_LOW_LATENCY_UL_DL_CONFIGURATION,       /* 0xB2 */
18454     WMI_VDEV_PARAM_ULTRA_LOW_LATENCY_UL_DL_CONFIGURATION, /* 0xB3 */
18455     /*
18456      * Ini to
18457      * Configure default latency level for all clients
18458      */
18459     WMI_VDEV_PARAM_DEFAULT_LATENCY_LEVEL_CONFIGURATION,   /* 0xB4 */
18460 
18461     /*
18462      * Ini to
18463      * Configure multi client Low latency Feature
18464      */
18465     WMI_VDEV_PARAM_MULTI_CLIENT_LL_FEATURE_CONFIGURATION, /* 0xB5 */
18466 
18467     /*
18468      * traffic config for per vdev
18469      * bit 0: low latency vdev
18470      * bit 1: high tput vdev
18471      * bit 31:2 Reserved
18472      */
18473     WMI_VDEV_PARAM_VDEV_TRAFFIC_CONFIG,                   /* 0xB6 */
18474 
18475     /* Final bmiss time for Non WOW mode in sec */
18476     WMI_VDEV_PARAM_FINAL_BMISS_TIME_SEC,                  /* 0xB7 */
18477     /* Final bmiss time for WOW mode in sec */
18478     WMI_VDEV_PARAM_FINAL_BMISS_TIME_WOW_SEC,              /* 0xB8 */
18479 
18480     /*
18481      * Param to disable LPI antenna optimizations at Vdev level.
18482      * In 6G LPI mode, additional antenna optimizations are done to
18483      * improve range. Param is provided to disable the added
18484      * optimizations.
18485      */
18486     WMI_VDEV_PARAM_DISABLE_LPI_ANT_OPTIMIZATION,          /* 0xB9 */
18487 
18488     /*
18489      * Param to update connected VDEV channel bandwidth.
18490      * Target firmware should take care of notifying associated peers
18491      * (except TDLS) about change in bandwidth, through OMN/OMI notification
18492      * before performing bandwidth update internally.
18493      * Please note incase of STA VDEV only BSS peer gets updated,
18494      * associated TDLS peer bandwidth won't be impacted.
18495      *
18496      * The updated bandwidth is specified with a wmi_channel_width value.
18497      */
18498     WMI_VDEV_PARAM_CHWIDTH_WITH_NOTIFY,                   /* 0xBA */
18499 
18500     /*
18501      * Min time between measurment for 11AZ NTB ranging
18502      * in units of 100 microseconds
18503      */
18504     WMI_VDEV_PARAM_RTT_11AZ_NTB_MIN_TIME_BW_MEAS,         /* 0xBB */
18505 
18506     /*
18507      * Max time between measurment for 11AZ NTB ranging
18508      * in units of 10 milliseconds
18509      */
18510     WMI_VDEV_PARAM_RTT_11AZ_NTB_MAX_TIME_BW_MEAS,         /* 0xBC */
18511 
18512     /*
18513      * Max session expiry for 11AZ TB ranging.
18514      * Session expiry value is computed as 2^(Max Session Exp + 8) ms.
18515      */
18516     WMI_VDEV_PARAM_RTT_11AZ_TB_MAX_SESSION_EXPIRY,        /* 0xBD */
18517 
18518     /*
18519      * WiFi Standard version to be supported.
18520      * Value is from enum WMI_WIFI_STANDARD
18521      */
18522     WMI_VDEV_PARAM_WIFI_STANDARD_VERSION,                 /* 0xBE */
18523 
18524     /*
18525      * Allow to disable TWT on 2G channel
18526      * if corresponding INI is set
18527      */
18528     WMI_VDEV_PARAM_DISABLE_2G_TWT,                        /* 0xBF */
18529 
18530     /*
18531      * Disable FW initiated Information frame for TWT
18532      */
18533     WMI_VDEV_PARAM_DISABLE_TWT_INFO_FRAME,                /* 0xC0 */
18534 
18535     /*
18536      * Set the Recommended Max allowed active links
18537      */
18538     WMI_VDEV_PARAM_MLO_MAX_RECOM_ACTIVE_LINKS,            /* 0xC1 */
18539 
18540     /* DCS stats enable configuration at VDEV level */
18541     WMI_VDEV_PARAM_DCS,                                   /* 0xC2 */
18542 
18543     /* VDEV parameter to configure Telescopic DTIM count */
18544     WMI_VDEV_PARAM_TELESDTIM_CNT,                         /* 0xC3 */
18545 
18546 
18547     /*=== ADD NEW VDEV PARAM TYPES ABOVE THIS LINE ===
18548      * The below vdev param types are used for prototyping, and are
18549      * prone to change.
18550      */
18551     WMI_VDEV_PARAM_PROTOTYPE = 0x8000,
18552         /* 11AX SPECIFIC defines */
18553         /* USE this for BSS color change */
18554         WMI_VDEV_PARAM_BSS_COLOR,                             /* 0x8001 */
18555 
18556         /*
18557          * Enable / disable trigger access for a AP vdev's peers.
18558          * For a STA mode vdev this will enable/disable triggered access
18559          * and enable/disable Multi User mode of operation.
18560          * A value of 0 in a given bit disables corresponding mode.
18561          * bit | hemu mode
18562          * ---------------
18563          *  0  | HE SUBFEE
18564          *  1  | HE SUBFER
18565          *  2  | HE MUBFEE
18566          *  3  | HE MUBFER
18567          *  4  | DL OFDMA, for AP its DL Tx OFDMA for Sta its Rx OFDMA
18568          *  5  | UL OFDMA, for AP its Tx OFDMA trigger for Sta its Rx OFDMA
18569          *     |           trigger receive & UL response
18570          *  6  | UL MUMIMO
18571          *  7  | TXBF+OFDMA
18572          */
18573         WMI_VDEV_PARAM_SET_HEMU_MODE,                         /* 0x8002 */
18574         WMI_VDEV_PARAM_HEOPS_0_31,                            /* 0x8003 */
18575         WMI_VDEV_PARAM_OBSSPD,                                /* 0x8004 */
18576 
18577         /*
18578          * Enable / disable trigger access for a AP vdev's peers.
18579          * For a STA mode vdev this will enable/disable triggered access
18580          * and enable/disable Multi User mode of operation.
18581          * A value of 0 in a given bit disables corresponding mode.
18582          * bit | EHT mu mode
18583          * ---------------
18584          *  0  | EHT SUBFEE
18585          *  1  | EHT SUBFER
18586          *  2  | EHT MUBFEE
18587          *  3  | EHT MUBFER
18588          *  4  | EHT DL OFDMA, for AP its DL Tx OFDMA for Sta its Rx OFDMA
18589          *  5  | EHT UL OFDMA, for AP its Tx OFDMA trigger for Sta its Rx OFDMA
18590          *     |           trigger receive & UL response
18591          *  6  | EHT MUMIMO
18592          *  7  | EHT DL OFDMA + TXBF
18593          *  8  | EHT DL OFDMA + MU-MIMO
18594          *  9  | EHT UL OFDMA + MU-MIMO
18595          */
18596         WMI_VDEV_PARAM_SET_EHT_MU_MODE,                       /* 0x8005 */
18597 
18598         /**
18599          * Specify the EHT LTF setting that should be used for fixed rate
18600          * transmissions.
18601          *
18602          * Expects values of WMI_EHT_LTF_DEFAULT, WMI_EHT_LTF_1X,
18603          * WMI_EHT_LTF_2X, or WMI_EHT_LTF_4X.
18604          */
18605          WMI_VDEV_PARAM_EHT_LTF,                               /* 0x8006 */
18606 
18607         /**
18608          * Expects values of WMI_EHT_LTF_DEFAULT, WMI_EHT_LTF_1X,
18609          * WMI_EHT_LTF_2X, or WMI_EHT_LTF_4X.
18610          */
18611         WMI_VDEV_PARAM_UL_EHT_LTF,                             /* 0x8007 */
18612 
18613         /**
18614          * Enable or disable Dual Carrier Modulation
18615          * valid values: 0-Disable EHT DCM, 1-Enable EHT DCM.
18616          */
18617         WMI_VDEV_PARAM_EHT_DCM,                                /* 0x8008 */
18618 
18619         /**
18620          * Enable or disable Extended range
18621          * valid values: 0-Disable ER, 1-Enable ER.
18622          */
18623         WMI_VDEV_PARAM_EHT_RANGE_EXT,                          /* 0x8009 */
18624 
18625         /**
18626          * Enable or disable Non-data EHT Extended range
18627          *  valid values: 0-Disable ER, 1-Enable ER.
18628          */
18629         WMI_VDEV_PARAM_NON_DATA_EHT_RANGE_EXT,                 /* 0x800A */
18630 
18631         /*
18632          * 0 - fixed pattern disable,
18633          * 1 - Fixed pattern enable and value pointed by
18634          *     WMI_VDEV_PARAM_FIXED_PUNCTURE_PATTERN
18635          *     punctured mode for 11be systems
18636          */
18637         WMI_VDEV_PARAM_FIXED_PUNCTURE_PATTERN,                /* 0x800B */
18638 
18639         WMI_VDEV_PARAM_EHTOPS_0_31,                           /* 0x800C */
18640 
18641         /*
18642          * 0 - eht 11be puncturing disable,
18643          * 1 - eht 11be puncturing enable
18644          */
18645         WMI_VDEV_PARAM_SET_EHT_PUNCTURING_MODE,               /* 0x800D */
18646 
18647         /*
18648          * 0 - Disable MCAST Beamforming
18649          * 1 - Enable MCAST Beamforming
18650          */
18651         WMI_VDEV_PARAM_MCAST_STEERING,                        /* 0x800E */
18652 
18653         /*
18654          * bit 0: 0 - XR SAP profile disabled
18655          *        1 - XR SAP profile enabled
18656          * bit 1: 0 - XPAN profile disabled
18657          *        1 - XPAN profile enabled
18658          * bits 31:2 - reserved
18659          */
18660         WMI_VDEV_PARAM_SET_PROFILE,                           /* 0x800F */
18661 
18662         /*
18663          * for valid vdev id
18664          * for vdev offload stats
18665          */
18666         WMI_VDEV_PARAM_VDEV_STATS_ID_UPDATE,                  /* 0x8010 */
18667 
18668         /*
18669          * Enable or disable Extra LTF capability in Auto rate and
18670          * Fixed rate EHT data packet transmissions.
18671          * Even when this vdev param is enabled, Extra LTF may not be
18672          * enabled for all rates in auto rate mode based on other conditions.
18673          * valid values: 0 - Disable Extra LTF, 1- Enable Extra LTF.
18674          */
18675         WMI_VDEV_PARAM_EXTRA_EHT_LTF,                  /* 0x8011 */
18676 
18677         /*
18678          * Disable the indicated DL and UL scheduler for the VDEV.
18679          *
18680          * This command is not supported in STA mode.
18681          *
18682          * A value of 1 in a given bit position disables the corresponding
18683          * mode, and a value of 0 enables the mode. The WMI_SCHED_MODE_FLAGS
18684          * enum defines the bit positions for each mode.
18685          *
18686          * A single 32 bit value is used to store the following configuration
18687          * bitmap.
18688          *
18689          * This command differs from WMI_VDEV_PARAM_SET_HEMU_MODE and
18690          * WMI_VDEV_PARAM_SET_EHT_MU_MODE in that it is intended for use during
18691          * normal AP operation, and will never cause a VAP restart or other
18692          * capability bit modification. It simply controls the scheduler
18693          * behavior.
18694          *
18695          * bit   | sched mode
18696          * ---------------
18697          *   0   | DL MU-MIMO
18698          *   1   | UL MU-MIMO
18699          *   2   | DL OFDMA
18700          *   3   | UL OFDMA
18701          * 4..31 | RESERVED
18702          */
18703         WMI_VDEV_PARAM_SET_DISABLED_SCHED_MODES,       /* 0x8012 */
18704 
18705         /*
18706          * SAP Power save with TWT vdev param command
18707          *      0 - Disable SAP Power save TWT
18708          *      1 - Enable SAP Power save TWT
18709          */
18710         WMI_VDEV_PARAM_SET_SAP_PS_WITH_TWT,            /* 0x8013 */
18711 
18712     /*=== END VDEV_PARAM_PROTOTYPE SECTION ===*/
18713 } WMI_VDEV_PARAM;
18714 
18715 /* EHT Modes */
18716 #define WMI_VDEV_EHT_SUBFEE_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 0, 1)
18717 #define WMI_VDEV_EHT_SUBFEE_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 0, 1, 1)
18718 #define WMI_VDEV_EHT_SUBFEE_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 0, 1, 0)
18719 
18720 #define WMI_VDEV_EHT_SUBFER_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 1, 1)
18721 #define WMI_VDEV_EHT_SUBFER_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 1, 1, 1)
18722 #define WMI_VDEV_EHT_SUBFER_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 1, 1, 0)
18723 
18724 #define WMI_VDEV_EHT_MUBFEE_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 2, 1)
18725 #define WMI_VDEV_EHT_MUBFEE_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 2, 1, 1)
18726 #define WMI_VDEV_EHT_MUBFEE_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 2, 1, 0)
18727 
18728 #define WMI_VDEV_EHT_MUBFER_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 3, 1)
18729 #define WMI_VDEV_EHT_MUBFER_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 3, 1, 1)
18730 #define WMI_VDEV_EHT_MUBFER_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 3, 1, 0)
18731 
18732 #define WMI_VDEV_EHT_DLOFDMA_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 4, 1)
18733 #define WMI_VDEV_EHT_DLOFDMA_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 4, 1, 1)
18734 #define WMI_VDEV_EHT_DLOFDMA_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 4, 1, 0)
18735 
18736 #define WMI_VDEV_EHT_ULOFDMA_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 5, 1)
18737 #define WMI_VDEV_EHT_ULOFDMA_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 5, 1, 1)
18738 #define WMI_VDEV_EHT_ULOFDMA_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 5, 1, 0)
18739 
18740 #define WMI_VDEV_EHT_ULMUMIMO_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 6, 1)
18741 #define WMI_VDEV_EHT_ULMUMIMO_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 6, 1, 1)
18742 #define WMI_VDEV_EHT_ULMUMIMO_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 6, 1, 0)
18743 
18744 #define WMI_VDEV_EHT_TXBF_OFDMA_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 7, 1)
18745 #define WMI_VDEV_EHT_TXBF_OFDMA_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 7, 1, 1)
18746 #define WMI_VDEV_EHT_TXBF_OFDMA_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 7, 1, 0)
18747 
18748 #define WMI_VDEV_EHT_DLOFDMA_W_MUMIMO_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 8, 1)
18749 #define WMI_VDEV_EHT_DLOFDMA_W_MUMIMO_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 8, 1, 1)
18750 #define WMI_VDEV_EHT_DLOFDMA_W_MUMIMO_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 8, 1, 0)
18751 
18752 #define WMI_VDEV_EHT_ULOFDMA_W_MUMIMO_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 9, 1)
18753 #define WMI_VDEV_EHT_ULOFDMA_W_MUMIMO_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 9, 1, 1)
18754 #define WMI_VDEV_EHT_ULOFDMA_W_MUMIMO_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 9, 1, 0)
18755 
18756 /* HE Modes */
18757 #define WMI_VDEV_HE_SUBFEE_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 0, 1)
18758 #define WMI_VDEV_HE_SUBFEE_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 0, 1, 1)
18759 #define WMI_VDEV_HE_SUBFEE_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 0, 1, 0)
18760 
18761 #define WMI_VDEV_HE_SUBFER_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 1, 1)
18762 #define WMI_VDEV_HE_SUBFER_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 1, 1, 1)
18763 #define WMI_VDEV_HE_SUBFER_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 1, 1, 0)
18764 
18765 #define WMI_VDEV_HE_MUBFEE_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 2, 1)
18766 #define WMI_VDEV_HE_MUBFEE_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 2, 1, 1)
18767 #define WMI_VDEV_HE_MUBFEE_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 2, 1, 0)
18768 
18769 #define WMI_VDEV_HE_MUBFER_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 3, 1)
18770 #define WMI_VDEV_HE_MUBFER_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 3, 1, 1)
18771 #define WMI_VDEV_HE_MUBFER_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 3, 1, 0)
18772 
18773 #define WMI_VDEV_HE_DLOFDMA_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 4, 1)
18774 #define WMI_VDEV_HE_DLOFDMA_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 4, 1, 1)
18775 #define WMI_VDEV_HE_DLOFDMA_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 4, 1, 0)
18776 
18777 #define WMI_VDEV_HE_ULOFDMA_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 5, 1)
18778 #define WMI_VDEV_HE_ULOFDMA_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 5, 1, 1)
18779 #define WMI_VDEV_HE_ULOFDMA_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 5, 1, 0)
18780 
18781 #define WMI_VDEV_HE_ULMUMIMO_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 6, 1)
18782 #define WMI_VDEV_HE_ULMUMIMO_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 6, 1, 1)
18783 #define WMI_VDEV_HE_ULMUMIMO_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 6, 1, 0)
18784 
18785 #define WMI_VDEV_HE_TXBF_OFDMA_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 7, 1)
18786 #define WMI_VDEV_HE_TXBF_OFDMA_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 7, 1, 1)
18787 #define WMI_VDEV_HE_TXBF_OFDMA_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 7, 1, 0)
18788 
18789 #define WMI_VDEV_HE_AX_SOUNDING_IS_ENABLED(mode) WMI_GET_BITS(mode, 0, 1)
18790 #define WMI_VDEV_HE_MU_SOUNDING_IS_ENABLED(mode) WMI_GET_BITS(mode, 2, 1)
18791 #define WMI_VDEV_HE_AX_TRIG_SOUNDING_IS_ENABLED(mode) WMI_GET_BITS(mode, 3, 1)
18792 
18793 /* Indicates RTT Responder mode support for 11MC, 11AZ NTB, 11AZ TB ranging */
18794 #define WMI_VDEV_11MC_RESP_ENABLED(param) WMI_GET_BITS(param, 0, 1)
18795 #define WMI_VDEV_11AZ_NTB_RESP_ENABLED(param) WMI_GET_BITS(param, 1, 1)
18796 #define WMI_VDEV_11AZ_TB_RESP_ENABLED(param) WMI_GET_BITS(param, 2, 1)
18797 
18798 /* vdev capabilities bit mask */
18799 #define WMI_VDEV_BEACON_SUPPORT  0x1
18800 #define WMI_VDEV_WDS_LRN_ENABLED 0x2
18801 #define WMI_VDEV_VOW_ENABLED     0x4
18802 
18803 #define WMI_VDEV_IS_BEACON_SUPPORTED(param) ((param) & WMI_VDEV_BEACON_SUPPORT)
18804 #define WMI_VDEV_IS_WDS_LRN_ENABLED(param) ((param) & WMI_VDEV_WDS_LRN_ENABLED)
18805 #define WMI_VDEV_IS_VOW_ENABLED(param) ((param) & WMI_VDEV_VOW_ENABLED)
18806 
18807 /* Per VAP rate dropdown masks */
18808 #define WMI_VDEV_MGMT_RATE_DROPDOWN_M        0x01
18809 #define WMI_VDEV_MGMT_RATE_DROPDOWN_S           0
18810 #define WMI_VDEV_MGMT_RATE_DROPDOWN (WMI_VDEV_MGMT_RATE_DROPDOWN_M << WMI_VDEV_MGMT_RATE_DROPDOWN_S)
18811 #define WMI_VDEV_MGMT_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_MGMT_RATE_DROPDOWN)
18812 #define WMI_VDEV_MGMT_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_MGMT_RATE_DROPDOWN)
18813 
18814 #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_M     0x01
18815 #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_S        1
18816 #define WMI_VDEV_SU_DATA_RATE_DROPDOWN (WMI_VDEV_SU_DATA_RATE_DROPDOWN_M << WMI_VDEV_SU_DATA_RATE_DROPDOWN_S)
18817 #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_SU_DATA_RATE_DROPDOWN)
18818 #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_SU_DATA_RATE_DROPDOWN)
18819 
18820 #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_M     0x01
18821 #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_S        2
18822 #define WMI_VDEV_MU_DATA_RATE_DROPDOWN (WMI_VDEV_MU_DATA_RATE_DROPDOWN_M << WMI_VDEV_MU_DATA_RATE_DROPDOWN_S)
18823 #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_MU_DATA_RATE_DROPDOWN)
18824 #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_MU_DATA_RATE_DROPDOWN)
18825 
18826 /* TXBF capabilities masks */
18827 #define WMI_TXBF_CONF_SU_TX_BFEE_S 0
18828 #define WMI_TXBF_CONF_SU_TX_BFEE_M 0x1
18829 #define WMI_TXBF_CONF_SU_TX_BFEE (WMI_TXBF_CONF_SU_TX_BFEE_M << WMI_TXBF_CONF_SU_TX_BFEE_S)
18830 #define WMI_TXBF_CONF_SU_TX_BFEE_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_SU_TX_BFEE)
18831 #define WMI_TXBF_CONF_SU_TX_BFEE_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_SU_TX_BFEE)
18832 
18833 #define WMI_TXBF_CONF_MU_TX_BFEE_S 1
18834 #define WMI_TXBF_CONF_MU_TX_BFEE_M 0x1
18835 #define WMI_TXBF_CONF_MU_TX_BFEE (WMI_TXBF_CONF_MU_TX_BFEE_M << WMI_TXBF_CONF_MU_TX_BFEE_S)
18836 #define WMI_TXBF_CONF_MU_TX_BFEE_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_MU_TX_BFEE)
18837 #define WMI_TXBF_CONF_MU_TX_BFEE_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_MU_TX_BFEE)
18838 
18839 #define WMI_TXBF_CONF_SU_TX_BFER_S 2
18840 #define WMI_TXBF_CONF_SU_TX_BFER_M 0x1
18841 #define WMI_TXBF_CONF_SU_TX_BFER (WMI_TXBF_CONF_SU_TX_BFER_M << WMI_TXBF_CONF_SU_TX_BFER_S)
18842 #define WMI_TXBF_CONF_SU_TX_BFER_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_SU_TX_BFER)
18843 #define WMI_TXBF_CONF_SU_TX_BFER_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_SU_TX_BFER)
18844 
18845 #define WMI_TXBF_CONF_MU_TX_BFER_S 3
18846 #define WMI_TXBF_CONF_MU_TX_BFER_M 0x1
18847 #define WMI_TXBF_CONF_MU_TX_BFER (WMI_TXBF_CONF_MU_TX_BFER_M << WMI_TXBF_CONF_MU_TX_BFER_S)
18848 #define WMI_TXBF_CONF_MU_TX_BFER_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_MU_TX_BFER)
18849 #define WMI_TXBF_CONF_MU_TX_BFER_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_MU_TX_BFER)
18850 
18851 #define WMI_TXBF_CONF_STS_CAP_S 4
18852 #define WMI_TXBF_CONF_STS_CAP_M 0x7
18853 #define WMI_TXBF_CONF_STS_CAP (WMI_TXBF_CONF_STS_CAP_M << WMI_TXBF_CONF_STS_CAP_S)
18854 #define WMI_TXBF_CONF_STS_CAP_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_STS_CAP);
18855 #define WMI_TXBF_CONF_STS_CAP_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_STS_CAP)
18856 
18857 #define WMI_TXBF_CONF_IMPLICIT_BF_S 7
18858 #define WMI_TXBF_CONF_IMPLICIT_BF_M 0x1
18859 #define WMI_TXBF_CONF_IMPLICIT_BF (WMI_TXBF_CONF_IMPLICIT_BF_M << WMI_TXBF_CONF_IMPLICIT_BF_S)
18860 #define WMI_TXBF_CONF_IMPLICIT_BF_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_IMPLICIT_BF)
18861 #define WMI_TXBF_CONF_IMPLICIT_BF_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_IMPLICIT_BF)
18862 
18863 #define WMI_TXBF_CONF_BF_SND_DIM_S 8
18864 #define WMI_TXBF_CONF_BF_SND_DIM_M 0x7
18865 #define WMI_TXBF_CONF_BF_SND_DIM (WMI_TXBF_CONF_BF_SND_DIM_M << WMI_TXBF_CONF_BF_SND_DIM_S)
18866 #define WMI_TXBF_CONF_BF_SND_DIM_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_BF_SND_DIM)
18867 #define WMI_TXBF_CONF_BF_SND_DIM_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_BF_SND_DIM)
18868 
18869 /* commands for 11ax TXBF capabilities */
18870 
18871 #define WMI_TXBF_CONF_11AX_SU_TX_BFER_GET(x) WMI_GET_BITS((x,0,1)
18872 #define WMI_TXBF_CONF_11AX_SU_TX_BFER_SET(x,z)  WMI_SET_BITS(x,0,1,z)
18873 
18874 #define WMI_TXBF_CONF_11AX_SU_TX_BFEE_GET(x) WMI_GET_BITS((x,1,1)
18875 #define WMI_TXBF_CONF_11AX_SU_TX_BFEE_SET(x,z) WMI_SET_BITS(x,1,1,z)
18876 
18877 #define WMI_TXBF_CONF_11AX_MU_TX_BFER_GET(x) WMI_GET_BITS((x,2,1)
18878 #define WMI_TXBF_CONF_11AX_MU_TX_BFER_SET(x,z)  WMI_SET_BITS(x,2,1,z)
18879 
18880 #define WMI_TXBF_CONF_11AX_BFEE_NDP_STS_LT_EQ_80_GET(x) WMI_GET_BITS((x,3,3)
18881 #define WMI_TXBF_CONF_11AX_BFEE_NDP_STS_LT_EQ_80_SET(x,z) WMI_SET_BITS(x,3,3,z)
18882 
18883 #define WMI_TXBF_CONF_11AX_NSTS_LT_EQ_80_GET(x) WMI_GET_BITS((x,6,3)
18884 #define WMI_TXBF_CONF_11AX_NSTS_LT_EQ_80_SET(x,z) WMI_SET_BITS(x,6,3,z)
18885 
18886 #define WMI_TXBF_CONF_11AX_TX_BFEE_NDP_STS_GT_80_GET(x) WMI_GET_BITS((x,9,3)
18887 #define WMI_TXBF_CONF_11AX_TX_BFEE_NDP_STS_GT_80_SET(x,z) WMI_SET_BITS(x,9,3,z)
18888 
18889 #define WMI_TXBF_CONF_11AX_NSTS_GT_80_GET(x) WMI_GET_BITS((x,12,3)
18890 #define WMI_TXBF_CONF_11AX_NSTS_GT_80_SET(x,z) WMI_SET_BITS(x,12,3,z)
18891 
18892 #define WMI_TXBF_CONF_AX_BFER_SND_DIM_LT_EQ_80_SND_DIM_GET(x) WMI_GET_BITS((x,15,3)
18893 #define WMI_TXBF_CONF_AX_BFER_SND_DIM_LT_EQ_80_SND_DIM_SET(x,z) WMI_SET_BITS(x,15,3,z)
18894 
18895 #define WMI_TXBF_CONF_AX_BFER_SND_DIM_GT_80_SND_DIM_GET(x) WMI_GET_BITS((x,18,3)
18896 #define WMI_TXBF_CONF_AX_BFER_SND_DIM_GT_80_SND_DIM_SET(x,z) WMI_SET_BITS(x,18,3,z)
18897 
18898 #define WMI_TXBF_CONF_AX_SU_BFEE_NG16_FDBK_GET(x) WMI_GET_BITS((x,21,1)
18899 #define WMI_TXBF_CONF_AX_SU_BFEE_NG16_FDBK_SET(x,z) WMI_SET_BITS(x,21,1,z)
18900 
18901 #define WMI_TXBF_CONF_AX_MU_BFEE_NG16_FDBK_GET(x) WMI_GET_BITS((x,22,1)
18902 #define WMI_TXBF_CONF_AX_MU_BFEE_NG16_FDBK_SET(x,z) WMI_SET_BITS(x,22,1,z)
18903 
18904 #define WMI_TXBF_CONF_AX_SU_BFEE_CDBK_4_2_GET(x) WMI_GET_BITS((x,23,1)
18905 #define WMI_TXBF_CONF_AX_SU_BFEE_CDBK_4_2_SET(x,z) WMI_SET_BITS(x,23,1,z)
18906 
18907 #define WMI_TXBF_CONF_AX_MU_BFEE_CDBK_7_5_GET(x) WMI_GET_BITS((x,24,1)
18908 #define WMI_TXBF_CONF_AX_MU_BFEE_CDBK_7_5_SET(x,z) WMI_SET_BITS(x,24,1,z)
18909 
18910 #define WMI_TXBF_CONF_AX_FDBK_TRIG_GET(x) WMI_GET_BITS((x,25,1)
18911 #define WMI_TXBF_CONF_AX_FDBK_TRIG_SET(x,z) WMI_SET_BITS(x,25,1,z)
18912 
18913 
18914 /* TXBF capabilities */
18915 typedef struct {
18916     A_UINT32 txbf_cap;
18917 } wmi_vdev_txbf_cap;
18918 
18919 /* vdev rx filters (for mesh) */
18920 typedef enum {
18921     WMI_VDEV_RX_ALLOW_ALL_FRAMES  =  0x0, /* Don't drop any frames - Default */
18922     WMI_VDEV_RX_FILTER_OUT_FROMDS =  0x1, /* Drop FromDS frames */
18923     WMI_VDEV_RX_FILTER_OUT_TODS   =  0x2, /* Drop ToDS frames */
18924     WMI_VDEV_RX_FILTER_OUT_NODS   =  0x4, /* Drop NODS frames */
18925     WMI_VDEV_RX_FILTER_OUT_RA     =  0x8, /* Drop RA frames */
18926     WMI_VDEV_RX_FILTER_OUT_TA     = 0x10, /* Drop TA frames */
18927 } wmi_vdev_param_filter;
18928 
18929 /* Length of ATIM Window in TU */
18930 #define WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH WMI_VDEV_PARAM_ATIM_WINDOW
18931 
18932 enum wmi_pkt_type {
18933     WMI_PKT_TYPE_RAW = 0,
18934     WMI_PKT_TYPE_NATIVE_WIFI = 1,
18935     WMI_PKT_TYPE_ETHERNET = 2,
18936 };
18937 
18938 /*******************************************************************
18939  * wmi_vdev_txbf_en is DEPRECATED in favor of wmi_vdev_txbf_cap
18940  * Do not use it!
18941  *******************************************************************/
18942 typedef struct {
18943     A_UINT8     sutxbfee    : 1,
18944                 mutxbfee    : 1,
18945                 sutxbfer    : 1,
18946                 mutxbfer    : 1,
18947                 txb_sts_cap : 3,
18948                 implicit_bf : 1;
18949 } wmi_vdev_txbf_en;
18950 
18951 /** Upto 8 bits are available for Roaming module to be sent along with
18952 WMI_VDEV_PARAM_ROAM_FW_OFFLOAD WMI_VDEV_PARAM **/
18953 /* Bit 0: Enable Roaming FW offload LFR1.5/LFR2.0 implementation */
18954 #define WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG                          0x1
18955 /* Bit 1: Enable Roaming module in FW to do scan based on Final BMISS */
18956 #define WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG                    0x2
18957 /* Bit 2:
18958  * To enable/disable EAPOL_4WAY_HANDSHAKE process while roaming.
18959  * param value = 0 --> Enable EAPOL 4way handshake
18960  * param value = 1 --> Skip EAPOL 4way handshake
18961  */
18962 #define WMI_VDEV_PARAM_SKIP_ROAM_EAPOL_4WAY_HANDSHAKE            0x4
18963 /* Bit 3:
18964  * Scan type when WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG is set:
18965  * value = 0 --> Chanmap scan followed by one full scan if no candidate found.
18966  * value = 1 --> Chanmap scan only
18967  */
18968 #define WMI_ROAM_BMISS_FINAL_SCAN_TYPE_FLAG                      0x8
18969 /* Bit 4:
18970  * To enable/disable feature: EAPOL offload to FW while SAE roaming.
18971  * param value = 0 --> Enable EAPOL offload to FW for SAE roaming
18972  * param value = 1 --> Disable EAPOL offload to FW for SAE roaming
18973  */
18974 #define WMI_VDEV_PARAM_SKIP_SAE_ROAM_4WAY_HANDSHAKE              0x10
18975 
18976 /** slot time long */
18977 #define WMI_VDEV_SLOT_TIME_LONG                                  0x1
18978 /** slot time short */
18979 #define WMI_VDEV_SLOT_TIME_SHORT                                 0x2
18980 /** preablbe long */
18981 #define WMI_VDEV_PREAMBLE_LONG                                   0x1
18982 /** preablbe short */
18983 #define WMI_VDEV_PREAMBLE_SHORT                                  0x2
18984 
18985 /** the definition of different START/RESTART Event response  */
18986 typedef enum {
18987     /* Event response of START CMD */
18988     WMI_VDEV_START_RESP_EVENT = 0,
18989     /* Event response of RESTART CMD */
18990     WMI_VDEV_RESTART_RESP_EVENT,
18991 } WMI_START_EVENT_PARAM;
18992 
18993 typedef struct {
18994     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_response_event_fixed_param  */
18995     /** unique id identifying the VDEV, generated by the caller */
18996     A_UINT32 vdev_id;
18997     /** requestor id that requested the VDEV start request */
18998     A_UINT32 requestor_id;
18999     /* Respose of Event type START/RESTART */
19000     WMI_START_EVENT_PARAM resp_type;
19001     /** status of the response */
19002     A_UINT32 status;
19003     /** Vdev chain mask */
19004     A_UINT32 chain_mask;
19005     /** Vdev mimo power save mode */
19006     A_UINT32 smps_mode;
19007     union {
19008         A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
19009         /** pdev_id for identifying the MAC
19010          * See macros starting with WMI_PDEV_ID_ for values.
19011          */
19012         A_UINT32 pdev_id;
19013     };
19014     /** Configured Transmit Streams **/
19015     A_UINT32 cfgd_tx_streams;
19016     /** Configured Receive Streams **/
19017     A_UINT32 cfgd_rx_streams;
19018     /**
19019      * maximum allowed Tx power (in dBm) for this connection.
19020      * max_allowed_tx_power = 0 dBm means value is not specified.
19021      */
19022     A_INT32 max_allowed_tx_power;
19023     /** unique id to identify mac's TSF register */
19024     A_UINT32 mac_tsf_id;
19025     /** ignore mac_tsf_id unless mac_tsf_id_valid is set */
19026     A_UINT32 mac_tsf_id_valid;
19027     /** min_device_tx_pwr_valid = 0 means value is not specified. */
19028     A_UINT32 min_device_tx_pwr_valid;
19029     /** minimum allowed device Tx power (in dBm) for this connection. */
19030     A_INT32  min_device_tx_pwr;
19031 } wmi_vdev_start_response_event_fixed_param;
19032 
19033 typedef struct {
19034     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stopped_event_fixed_param  */
19035     /** unique id identifying the VDEV, generated by the caller */
19036     A_UINT32 vdev_id;
19037 } wmi_vdev_stopped_event_fixed_param;
19038 
19039 typedef struct {
19040     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_resp_event_fixed_param  */
19041     /** unique id identifying the VDEV, generated by the caller */
19042     A_UINT32 vdev_id;
19043 } wmi_vdev_delete_resp_event_fixed_param;
19044 
19045 /** common structure used for simple events (stopped, resume_req, standby response) */
19046 typedef struct {
19047     A_UINT32 tlv_header; /* TLV tag and len; tag would be equivalent to actual event  */
19048     /** unique id identifying the VDEV, generated by the caller */
19049     A_UINT32 vdev_id;
19050 } wmi_vdev_simple_event_fixed_param;
19051 
19052 /* Commands for getting and setting protected bit : bss max idle time */
19053 #define WMI_BSS_MAX_IDLE_TIME_PROTECTED_GET(idle_options) \
19054     WMI_GET_BITS(idle_options, 0, 1)
19055 #define WMI_BSS_MAX_IDLE_TIME_PROTECTED_SET(idle_options, val) \
19056     WMI_SET_BITS(idle_options, 0, 1, val)
19057 
19058 typedef struct {
19059     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_VDEV_BSS_MAX_IDLE_TIME_fixed_param */
19060     A_UINT32 vdev_id; /** unique id identifying the VDEV, generated by the caller */
19061     A_UINT32 max_idle_period; /* time interval in seconds */
19062     /* idle_options:
19063      * bit 0    - Protected bit
19064      *            Refer to WMI_BSS_MAX_IDLE_TIME_PROTECTED_GET,SET macros.
19065      * bit 31:1 - Reserved bits
19066      */
19067     A_UINT32 idle_options;
19068 } wmi_vdev_bss_max_idle_time_cmd_fixed_param;
19069 
19070 /** VDEV start response status codes */
19071 #define WMI_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0  /** VDEV successfully started */
19072 #define WMI_VDEV_START_RESPONSE_INVALID_VDEVID  0x1  /** requested VDEV not found */
19073 #define WMI_VDEV_START_RESPONSE_NOT_SUPPORTED  0x2  /** unsupported VDEV combination */
19074 #define WMI_VDEV_START_RESPONSE_DFS_VIOLATION  0x3  /** DFS_VIOLATION since channel in the NOL is selected */
19075 #define WMI_VDEV_START_RESPONSE_INVALID_REGDOMAIN 0x4 /** Invalid regulatory domain in VDEV start */
19076 #define WMI_VDEV_START_RESPONSE_INVALID_BAND   0x5    /** Band unsupported by current hw mode in VDEV start */
19077 #define WMI_VDEV_START_RESPONSE_INVALID_PREFERRED_TX_RX_STREAMS 0x6 /** Invalid preferred tx/rx streams */
19078 #define WMI_VDEV_START_RESPONSE_INVALID_TX_VAP_CONFIG   0x7 /** Invalid tx_vap config in VDEV start */
19079 
19080 /** Beacon processing related command and event structures */
19081 typedef struct {
19082     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tx_hdr */
19083     /** unique id identifying the VDEV, generated by the caller */
19084     A_UINT32 vdev_id;
19085     /** xmit rate */
19086     A_UINT32 tx_rate;
19087     /** xmit power */
19088     A_UINT32 txPower;
19089     /** beacon buffer length in bytes */
19090     A_UINT32 buf_len;
19091 /* This TLV is followed by array of bytes:
19092  *   A_UINT8 bufp[]; <-- beacon frame buffer
19093  */
19094 } wmi_bcn_tx_hdr;
19095 
19096 /* Beacon filter */
19097 #define WMI_BCN_FILTER_ALL   0 /* Filter all beacons */
19098 #define WMI_BCN_FILTER_NONE  1 /* Pass all beacons */
19099 #define WMI_BCN_FILTER_RSSI  2 /* Pass Beacons RSSI >= RSSI threshold */
19100 #define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */
19101 #define WMI_BCN_FILTER_SSID  4 /* Pass Beacons with matching SSID */
19102 
19103 typedef struct {
19104     /** Filter ID */
19105     A_UINT32 bcn_filter_id;
19106     /** Filter type - wmi_bcn_filter */
19107     A_UINT32 bcn_filter;
19108     /** Buffer len */
19109     A_UINT32 bcn_filter_len;
19110     /** Filter info (threshold, BSSID, RSSI) */
19111     A_UINT8 *bcn_filter_buf;
19112 } wmi_bcn_filter_rx_cmd;
19113 
19114 /** Capabilities and IEs to be passed to firmware */
19115 typedef struct {
19116     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_prb_info */
19117     /** Capabilities */
19118     A_UINT32 caps;
19119     /** ERP info */
19120     A_UINT32 erp;
19121 /** Advanced capabilities */
19122 /** HT capabilities */
19123 /** HT Info */
19124 /** ibss_dfs */
19125 /** wpa Info */
19126 /** rsn Info */
19127 /** rrm info */
19128 /** ath_ext */
19129 /** app IE */
19130 } wmi_bcn_prb_info;
19131 
19132 enum wmi_frame_inject_type {
19133     /* Transmit QoS null frame each period */
19134     WMI_FRAME_INJECT_TYPE_QOS_NULL,
19135     /* Transmit CTS to self each period */
19136     WMI_FRAME_INJECT_TYPE_CTS_TO_SELF,
19137     /* Transmit HOST provided buffer instead of forming frame in FW */
19138     WMI_FRAME_INJECT_TYPE_HOST_BUFFER,
19139     /* Max valid frame inject type for sanity checks*/
19140     WMI_FRAME_INJECT_TYPE_MAX,
19141 };
19142 
19143 typedef struct {
19144     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_frame_inject_cmd_fixed_param */
19145     A_UINT32 tlv_header;
19146     /** unique id identifying the VDEV, generated by the caller.
19147      * At any time only one vdev per mac can have this feature enabled.
19148      * Two consecutive enable commands on same mac will result in previous
19149      * command being disabled and new one being enabled.
19150      */
19151     A_UINT32 vdev_id;
19152     /** enable or disable injection */
19153     A_UINT32 enable;
19154     /** frame type to be used for frame injection. possible values are
19155      * defined in enum wmi_frame_inject_type.
19156      */
19157     A_UINT32 frame_type;
19158     /** periodicity of frame injection in milliseconds */
19159     A_UINT32 frame_inject_period;
19160     /** Destination address of frame */
19161     wmi_mac_addr frame_addr1;
19162     /** Frame control duration field to be set in CTS_TO_SELF.
19163      * Applicable to frame_type WMI_FRAME_INJECT_TYPE_CTS_TO_SELF only.
19164      */
19165     A_UINT32 fc_duration;
19166     /** variable buffer length. Can be used for frame template.
19167      * data is in TLV data[]
19168      */
19169     A_UINT32 buf_len;
19170     /** bw:
19171      * Bandwidth to use for the injected frame, of type wmi_channel_width.
19172      * This bw spec shall be ignored unless the bw_valid flag is set.
19173      */
19174     A_UINT32 bw;
19175     /*
19176      * The TLVs follows:
19177      * A_UINT8  data[]; <-- Variable length data
19178      */
19179 } wmi_frame_inject_cmd_fixed_param;
19180 
19181 #define WMI_BEACON_TMPLT_PROFILE_PERIOD_BITPOS  (0)
19182 #define WMI_BEACON_TMPLT_PROFILE_PERIOD_MASK    (0xff << WMI_BEACON_TMPLT_PROFILE_PERIOD_BITPOS)
19183 #define WMI_BEACON_TMPLT_SET_PROFILE_PERIOD(_ema_param, _val) \
19184     WMI_SET_BITS(_ema_param, WMI_BEACON_TMPLT_PROFILE_PERIOD_BITPOS, 8, _val)
19185 #define WMI_BEACON_TMPLT_GET_PROFILE_PERIOD(_ema_param) \
19186     WMI_GET_BITS(_ema_param, WMI_BEACON_TMPLT_PROFILE_PERIOD_BITPOS, 8)
19187 
19188 #define WMI_BEACON_TMPLT_TEMPLATE_INDEX_BITPOS  (8)
19189 #define WMI_BEACON_TMPLT_TEMPLATE_INDEX_MASK    (0xff << WMI_BEACON_TMPLT_TEMPLATE_INDEX_BITPOS)
19190 #define WMI_BEACON_TMPLT_SET_TEMPLATE_INDEX(_ema_param, _val) \
19191     WMI_SET_BITS(_ema_param, WMI_BEACON_TMPLT_TEMPLATE_INDEX_BITPOS, 8, _val)
19192 #define WMI_BEACON_TMPLT_GET_TEMPLATE_INDEX(_ema_param) \
19193     WMI_GET_BITS(_ema_param, WMI_BEACON_TMPLT_TEMPLATE_INDEX_BITPOS, 8)
19194 
19195 #define WMI_BEACON_TMPLT_FIRST_TEMPLATE_BITPOS  (16)
19196 #define WMI_BEACON_TMPLT_FIRST_TEMPLATE_MASK    (0xff << WMI_BEACON_TMPLT_FIRST_TEMPLATE_BITPOS)
19197 #define WMI_BEACON_TMPLT_SET_FIRST_TEMPLATE(_ema_param, _val) \
19198     WMI_SET_BITS(_ema_param, WMI_BEACON_TMPLT_FIRST_TEMPLATE_BITPOS, 8, _val)
19199 #define WMI_BEACON_TMPLT_GET_FIRST_TEMPLATE(_ema_param) \
19200     WMI_GET_BITS(_ema_param, WMI_BEACON_TMPLT_FIRST_TEMPLATE_BITPOS, 8)
19201 
19202 #define WMI_BEACON_TMPLT_LAST_TEMPLATE_BITPOS  (24)
19203 #define WMI_BEACON_TMPLT_LAST_TEMPLATE_MASK    (0xff << WMI_BEACON_TMPLT_LAST_TEMPLATE_BITPOS)
19204 #define WMI_BEACON_TMPLT_SET_LAST_TEMPLATE(_ema_param, _val) \
19205     WMI_SET_BITS(_ema_param, WMI_BEACON_TMPLT_LAST_TEMPLATE_BITPOS, 8, _val)
19206 #define WMI_BEACON_TMPLT_GET_LAST_TEMPLATE(_ema_param) \
19207     WMI_GET_BITS(_ema_param, WMI_BEACON_TMPLT_LAST_TEMPLATE_BITPOS, 8)
19208 
19209 typedef struct {
19210     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_ml_info */
19211     /** hw_link_id:
19212      * Unique link id across SOCs, got as part of QMI handshake
19213      */
19214     A_UINT32 hw_link_id;
19215     /**
19216      * CU vdev map for the Critical update category-1
19217      * (Inclusion of CU IES)
19218      */
19219     A_UINT32 cu_vdev_map_cat1_lo; /* bits 31:0 */
19220     A_UINT32 cu_vdev_map_cat1_hi; /* bits 63:32 */
19221     /**
19222      * CU vdev map for the Critical update category-2
19223      * (modification of CU IES)
19224      */
19225     A_UINT32 cu_vdev_map_cat2_lo; /* bits 31:0 */
19226     A_UINT32 cu_vdev_map_cat2_hi; /* bits 63:32 */
19227 } wmi_bcn_tmpl_ml_info;
19228 
19229 typedef struct {
19230     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_ml_params */
19231     A_UINT32 vdev_id;    /* partner vdev_id */
19232     A_UINT32 hw_link_id; /* hw_link_id: Unique link id across SOCs, got as part of QMI handshake */
19233     A_UINT32 beacon_interval; /* beacon interval in TU from received beacon of the partner link */
19234     /** CSA IE switch count offset from the beginning of data[]
19235      *  Value 0 indicates CSA IE is not present in beacon template.
19236      */
19237     A_UINT32 csa_switch_count_offset; /* units = bytes */
19238     /** Extended CSA IE switch count offset from the beginning of data[]
19239      *  Value 0 indicates ECSA IE is not present in beacon template.
19240      */
19241     A_UINT32 ext_csa_switch_count_offset; /* units = bytes */
19242     /** Per-STA profile Subelement offset from the beginning of the template. */
19243     A_UINT32 per_sta_profile_offset;
19244     /** Quiet IE offset from the beginning of the template. */
19245     A_UINT32 quiet_ie_offset;
19246     /** Flag to check if other IEs are present in per-sta profile */
19247     A_UINT32 is_other_ie_present;
19248 } wmi_bcn_tmpl_ml_params;
19249 
19250 typedef struct {
19251     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_cmd_fixed_param */
19252     /** unique id identifying the VDEV, generated by the caller */
19253     A_UINT32 vdev_id;
19254     /** TIM IE offset from the beginning of the template. */
19255     A_UINT32 tim_ie_offset;
19256     /** beacon buffer length. data is in TLV data[] */
19257     A_UINT32 buf_len;
19258     /** CSA IE switch count offset from the beginning of data[]
19259      *  Value 0 indicates CSA IE is not present in beacon template.
19260      */
19261     A_UINT32 csa_switch_count_offset; /* units = bytes */
19262     /** Extended CSA IE switch count offset from the beginning of data[]
19263      *  Value 0 indicates CSA IE is not present in beacon template.
19264      */
19265     A_UINT32 ext_csa_switch_count_offset; /* units = bytes */
19266 
19267     /** Specify when to send the CSA switch count status from FW to host.
19268      * See WMI_CSA_EVENT_BMAP* below for more information.
19269      * E.g. if CSA switch count event is needed to be sent when the switch count
19270      * is 0, 1, 4 and 5, set the bitmap to (0X80000033)
19271      */
19272     A_UINT32 csa_event_bitmap;
19273     /** offset (in octets/bytes) of MBSSID IE in beacon frame */
19274     A_UINT32 mbssid_ie_offset;
19275     /** offset (in octets/bytes) of ESP IE in beacon frame */
19276     A_UINT32 esp_ie_offset;
19277     /** CSC IE color switch count offset from the beginning of data[]
19278      *  Value 0 indicates CSC IE is not present in beacon template.
19279      */
19280     A_UINT32 csc_switch_count_offset; /* units = bytes */
19281     /** Specify when to send the CSC switch count status from FW to host.
19282      * See WMI_CSC_EVENT_BMAP* below for more information.
19283      * E.g. if CSA switch count event is needed to be sent when the switch count
19284      * is 0, 1, 4 and 5, set the bitmap to (0X80000033)
19285      */
19286     A_UINT32 csc_event_bitmap;
19287     /** Specify offset for FW to overwrite MU EDCA parameters in the beacon.
19288      * This is done during FW tuning of EDCA parameters.
19289      * Based on number of HE and Legacy stations.
19290      * If mu_edca_ie_offset == 0, it is ignored.
19291      * Only non-zero values are considered.
19292      */
19293     A_UINT32 mu_edca_ie_offset;
19294     /** Specify features that need to be enabled/disabled for the beacon.
19295      *
19296      * Bit 0:
19297      *     Beacon Protection feature enable/disable indication.
19298      *     Refer to WMI_BEACON_PROTECTION_EN_SET/GET macros.
19299      *
19300      * More features can be added to this bitmap.
19301      */
19302     A_UINT32 feature_enable_bitmap;
19303 
19304     /**
19305      * @ema_params: Applicable only for EMA tx VAPs (VAPs having both flags
19306      *         VDEV_FLAGS_EMA_MODE and VDEV_FLAGS_TRANSMIT_AP set) and should
19307      *         remain 0 otherwise. For EMA vaps it carries below information
19308      *         encoded in each byte:
19309      * Byte 0: (@ema_beacon_profile_periodicity) - beacon profile periodicity
19310      *         (number of beacons) after which nontransmitted MBSS info repeats.
19311      *         Assumes values [1, N] inclusive.
19312      *         Refer to WMI_BEACON_TMPLT_[SET,GET]_PROFILE_PERIOD macros.
19313      * Byte 1: (@ema_beacon_tmpl_idx) -  Specifies the position of beacon
19314      *         templates within profile periodicity.
19315      *         Assumes values [0, ema_beacon_profile_periodicity-1] inclusive.
19316      *         Multiple templates having same @ema_beacon_max_tmpl_idx will
19317      *         overwrite previous template.
19318      *         Refer to WMI_BEACON_TMPLT_[SET,GET]_TEMPLATE_INDEX macros.
19319      * Byte 2: (@ema_first_tmpl) - Specifies whether it's a last template in
19320      *         sequence of @ema_beacon_profile_periodicity templates
19321      *         (end of new template update exchange).
19322      *         If this template is the only template being updated,
19323      *         @ema_first_tmpl and @ema_last_tmpl both shall be set to 1.
19324      *         Refer to WMI_BEACON_TMPLT_[SET,GET]_FIRST_TEMPLATE macros.
19325      * Byte 3: (@ema_last_tmpl) - pecifies whether it's a last template in
19326      *         sequence of @ema_beacon_profile_periodicity templates
19327      *         (end of new template update exchange).
19328      *         If this template is the only template being updated,
19329      *         @ema_first_tmpl and @ema_last_tmpl both shall be set to 1.
19330      *         Refer to WMI_BEACON_TMPLT_[SET,GET]_LAST_TEMPLATE macros.
19331      */
19332     A_UINT32 ema_params;
19333 
19334 /*
19335  * The TLVs follows:
19336  *    wmi_bcn_prb_info bcn_prb_info; <-- beacon probe capabilities and IEs
19337  *    A_UINT8  data[]; <-- Variable length data
19338  *    wmi_bcn_tmpl_ml_params ml_bcn_param[]; <-- per-MLO-link beacon data
19339  *        wmi_bcn_tmpl_ml_params will have multiple instances equal to
19340  *        the number of links in an AP MLD
19341  */
19342 } wmi_bcn_tmpl_cmd_fixed_param;
19343 
19344 #define WMI_CSA_EVENT_BMAP_VALID_MASK           0X80000000  /* Follow bitmap for sending the CSA switch count event */
19345 #define WMI_CSA_EVENT_BMAP_SWITCH_COUNT_ZERO    0           /* Send only when the switch count becomes zero, added for backward compatibility
19346                                                             Same can also be achieved by setting bitmap to 0X80000001 */
19347 #define WMI_CSA_EVENT_BMAP_ALL                  0XFFFFFFFF  /* Send CSA switch count event for every update to switch count */
19348 
19349 #define WMI_CSC_EVENT_BMAP_VALID_MASK           0X80000000  /* Follow bitmap for sending the CSC switch count event */
19350 #define WMI_CSC_EVENT_BMAP_SWITCH_COUNT_ZERO    0           /* Send only when the switch count becomes zero, added for backward compatibility
19351                                                             Same can also be achieved by setting bitmap to 0X80000001 */
19352 #define WMI_CSC_EVENT_BMAP_ALL                  0XFFFFFFFF  /* Send CSC switch count event for every update to switch count */
19353 
19354 #define WMI_BEACON_PROTECTION_BIT_POS           0 /* Beacon Protection enable/disable indication */
19355 
19356 #define WMI_BEACON_PROTECTION_EN_SET(param, value) \
19357     WMI_SET_BITS(param, WMI_BEACON_PROTECTION_BIT_POS, 1, value)
19358 
19359 #define WMI_BEACON_PROTECTION_EN_GET(param) \
19360     WMI_GET_BITS(param, WMI_BEACON_PROTECTION_BIT_POS, 1)
19361 
19362 typedef struct {
19363     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_prb_resp_tmpl_ml_info */
19364     /** hw_link_id:
19365      * Unique link id across SOCs, got as part of QMI handshake
19366      */
19367     A_UINT32 hw_link_id;
19368     /**
19369      * CU vdev map for the Critical update category-1
19370      * (Inclusion of CU IES)
19371      */
19372     A_UINT32 cu_vdev_map_cat1_lo; /* bits 31:0 */
19373     A_UINT32 cu_vdev_map_cat1_hi; /* bits 63:32 */
19374     /**
19375      * CU vdev map for the Critical update category-2
19376      * (modification of CU IES)
19377      */
19378     A_UINT32 cu_vdev_map_cat2_lo; /* bits 31:0 */
19379     A_UINT32 cu_vdev_map_cat2_hi; /* bits 63:32 */
19380 } wmi_prb_resp_tmpl_ml_info;
19381 
19382 typedef struct {
19383     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_prb_tmpl_cmd_fixed_param */
19384     /** unique id identifying the VDEV, generated by the caller */
19385     A_UINT32 vdev_id;
19386     /** beacon buffer length. data is in TLV data[] */
19387     A_UINT32 buf_len;
19388 /*
19389  * The TLVs follows:
19390  *    wmi_bcn_prb_info bcn_prb_info; <-- beacon probe capabilities and IEs
19391  *    A_UINT8  data[]; <-- Variable length data
19392  */
19393 } wmi_prb_tmpl_cmd_fixed_param;
19394 
19395 typedef struct {
19396     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fd_tmpl_cmd_fixed_param */
19397     /** unique id identifying the VDEV, generated by the caller */
19398     A_UINT32 vdev_id;
19399     /** fd frame buffer length. data is in TLV data[] */
19400     A_UINT32 buf_len;
19401 
19402 /*
19403  * The TLVs follows:
19404  *    A_UINT8  data[]; <-- Variable length data
19405  */
19406 } wmi_fd_tmpl_cmd_fixed_param;
19407 
19408 typedef struct {
19409     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_bcn_tx_status_event_fixed_param */
19410     A_UINT32 tlv_header;
19411     /** unique id identifying the VDEV */
19412     A_UINT32 vdev_id;
19413     /** bcn tx status, values defined in enum WMI_FRAME_TX_STATUS */
19414     A_UINT32 tx_status;
19415 } wmi_offload_bcn_tx_status_event_fixed_param;
19416 
19417 enum wmi_sta_ps_mode {
19418     /** enable power save for the given STA VDEV */
19419     WMI_STA_PS_MODE_DISABLED = 0,
19420     /** disable power save  for a given STA VDEV */
19421     WMI_STA_PS_MODE_ENABLED = 1,
19422 };
19423 
19424 typedef struct {
19425     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_mode_cmd_fixed_param */
19426     /** unique id identifying the VDEV, generated by the caller */
19427     A_UINT32 vdev_id;
19428 
19429     /** Power save mode
19430      *
19431      * (see enum wmi_sta_ps_mode)
19432      */
19433     A_UINT32 sta_ps_mode;
19434 } wmi_sta_powersave_mode_cmd_fixed_param;
19435 
19436 typedef struct {
19437     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_tdcc_config_cmd_fixed_param */
19438     /**  Set a max tx period: percentage of one beacon interval. range: 0 - 100  */
19439     A_UINT32 tx_cycle_percentage;
19440     /**  Enable/disable TX Duty Cycle Control powersave */
19441     A_UINT32 enabled;
19442 } wmi_sta_tdcc_config_cmd_fixed_param;
19443 
19444 enum wmi_csa_offload_en {
19445            WMI_CSA_OFFLOAD_DISABLE = 0,
19446            WMI_CSA_OFFLOAD_ENABLE = 1,
19447 };
19448 
19449 typedef struct {
19450     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_enable_cmd_fixed_param  */
19451     A_UINT32 vdev_id;
19452     A_UINT32 csa_offload_enable;
19453 } wmi_csa_offload_enable_cmd_fixed_param;
19454 
19455 typedef struct {
19456     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_chanswitch_cmd_fixed_param  */
19457     A_UINT32 vdev_id;
19458 /*
19459  * The TLVs follows:
19460  *    wmi_channel chan;
19461  */
19462 } wmi_csa_offload_chanswitch_cmd_fixed_param;
19463 /**
19464  * This parameter controls the policy for retrieving frames from AP while the
19465  * STA is in sleep state.
19466  *
19467  * Only takes affect if the sta_ps_mode is enabled
19468  */
19469 enum wmi_sta_ps_param_rx_wake_policy {
19470     /* Wake up when ever there is an  RX activity on the VDEV. In this mode
19471      * the Power save SM(state machine) will come out of sleep by either
19472      * sending null frame (or) a data frame (with PS==0) in response to TIM
19473      * bit set in the received beacon frame from AP.
19474      */
19475     WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0,
19476 
19477     /* Here the power save state machine will not wakeup in response to TIM
19478      * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
19479      * configuration setup by WMISET_PS_SET_UAPSD  WMI command.  When all
19480      * access categories are delivery-enabled, the station will send a UAPSD
19481      * trigger frame, otherwise it will send a PS-Poll.
19482      */
19483     WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
19484 };
19485 
19486 /** Number of tx frames/beacon  that cause the power save SM to wake up.
19487  *
19488  * Value 1 causes the SM to wake up for every TX. Value 0 has a special
19489  * meaning, It will cause the SM to never wake up. This is useful if you want
19490  * to keep the system to sleep all the time for some kind of test mode . host
19491  * can change this parameter any time.  It will affect at the next tx frame.
19492  */
19493 enum wmi_sta_ps_param_tx_wake_threshold {
19494     WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
19495     WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
19496 
19497 /* Values greater than one indicate that many TX attempts per beacon
19498  * interval before the STA will wake up
19499  */
19500 };
19501 
19502 /**
19503  * The maximum number of PS-Poll frames the FW will send in response to
19504  * traffic advertised in TIM before waking up (by sending a null frame with PS
19505  * = 0). Value 0 has a special meaning: there is no maximum count and the FW
19506  * will send as many PS-Poll as are necessary to retrieve buffered BU. This
19507  * parameter is used when the RX wake policy is
19508  * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake
19509  * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE.
19510  */
19511 enum wmi_sta_ps_param_pspoll_count {
19512     WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
19513 /* Values greater than 0 indicate the maximum number of PS-Poll frames FW
19514  * will send before waking up.
19515  */
19516 };
19517 
19518 /*
19519  * This will include the delivery and trigger enabled state for every AC.
19520  * This is the negotiated state with AP. The host MLME needs to set this based
19521  * on AP capability and the state Set in the association request by the
19522  * station MLME.Lower 8 bits of the value specify the UAPSD configuration.
19523  */
19524 #define WMI_UAPSD_AC_TYPE_DELI 0
19525 #define WMI_UAPSD_AC_TYPE_TRIG 1
19526 
19527 #define WMI_UAPSD_AC_BIT_MASK(ac,type) \
19528     ((type == WMI_UAPSD_AC_TYPE_DELI) ? \
19529      (1 << (ac<<1)) : \
19530      (1 << ((ac<<1)+1)))
19531 
19532 enum wmi_sta_ps_param_uapsd {
19533     WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
19534     WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
19535     WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
19536     WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
19537     WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
19538     WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
19539     WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
19540     WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
19541 };
19542 
19543 enum wmi_sta_ps_scheme_cfg {
19544     WMI_STA_PS_OPM_CONSERVATIVE = 0,
19545     WMI_STA_PS_OPM_AGGRESSIVE = 1,
19546     WMI_STA_PS_USER_DEF = 2,
19547 };
19548 
19549 enum wmi_sta_powersave_param {
19550 /**
19551  * Controls how frames are retrievd from AP while STA is sleeping
19552  *
19553  * (see enum wmi_sta_ps_param_rx_wake_policy)
19554  */
19555 WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0,
19556 
19557 /**
19558  * The STA will go active after this many TX
19559  *
19560  * (see enum wmi_sta_ps_param_tx_wake_threshold)
19561  */
19562 WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
19563 
19564 /**
19565  * Number of PS-Poll to send before STA wakes up
19566  *
19567  * (see enum wmi_sta_ps_param_pspoll_count)
19568  *
19569  */
19570 WMI_STA_PS_PARAM_PSPOLL_COUNT = 2,
19571 
19572 /**
19573  * TX/RX inactivity time in msec before going to sleep.
19574  *
19575  * The power save SM will monitor tx/rx activity on the VDEV, if no
19576  * activity for the specified msec of the parameter the Power save SM will
19577  * go to sleep.
19578  */
19579 WMI_STA_PS_PARAM_INACTIVITY_TIME = 3,
19580 
19581 /**
19582  * Set uapsd configuration.
19583  *
19584  * (see enum wmi_sta_ps_param_uapsd)
19585  */
19586 WMI_STA_PS_PARAM_UAPSD = 4,
19587 
19588 /**
19589  * Number of PS-Poll to send before STA wakes up in QPower Mode
19590  */
19591 WMI_STA_PS_PARAM_QPOWER_PSPOLL_COUNT = 5,
19592 
19593 /**
19594  * Enable OPM
19595  */
19596 WMI_STA_PS_ENABLE_QPOWER = 6,
19597     WMI_STA_PS_ENABLE_OPM = WMI_STA_PS_ENABLE_QPOWER, /* alias */
19598 
19599 /**
19600  * Number of TX frames before the entering the Active state
19601  */
19602 WMI_STA_PS_PARAM_QPOWER_MAX_TX_BEFORE_WAKE = 7,
19603 
19604 /**
19605  * QPower SPEC PSPOLL interval
19606  */
19607 WMI_STA_PS_PARAM_QPOWER_SPEC_PSPOLL_WAKE_INTERVAL = 8,
19608 
19609 /**
19610  * Max SPEC PSPOLL to be sent when the PSPOLL response has
19611  * no-data bit set
19612  */
19613 WMI_STA_PS_PARAM_QPOWER_SPEC_MAX_SPEC_NODATA_PSPOLL = 9,
19614 
19615 /**
19616  * Max value of ITO reset when there is no tx-rx
19617  * after AP has set the TIM bit
19618  */
19619 WMI_STA_PS_PARAM_MAX_RESET_ITO_COUNT_ON_TIM_NO_TXRX = 10,
19620 
19621 /**
19622  * Flag to enable/disable Powersave Optimization
19623  * in WOW
19624  */
19625 WMI_STA_PS_PARAM_ENABLE_PS_OPT_IN_WOW = 11,
19626 
19627 /**
19628  *  Speculative interval in ms
19629  */
19630 WMI_STA_PS_PARAM_SPEC_WAKE_INTERVAL = 12,
19631 
19632 };
19633 
19634 typedef struct {
19635     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_param_cmd_fixed_param */
19636     /** unique id identifying the VDEV, generated by the caller */
19637     A_UINT32 vdev_id;
19638     /** station power save parameter (see enum wmi_sta_powersave_param) */
19639     A_UINT32 param;
19640     A_UINT32 value;
19641 } wmi_sta_powersave_param_cmd_fixed_param;
19642 
19643 /** No MIMO power save */
19644 #define WMI_STA_MIMO_PS_MODE_DISABLE
19645 /** mimo powersave mode static*/
19646 #define WMI_STA_MIMO_PS_MODE_STATIC
19647 /** mimo powersave mode dynamic */
19648 #define WMI_STA_MIMO_PS_MODE_DYNAMI
19649 
19650 typedef struct {
19651     /** unique id identifying the VDEV, generated by the caller */
19652     A_UINT32 vdev_id;
19653     /** mimo powersave mode as defined above */
19654     A_UINT32 mimo_pwrsave_mode;
19655 } wmi_sta_mimo_ps_mode_cmd;
19656 
19657 
19658 /** U-APSD configuration of peer station from (re)assoc request and TSPECs */
19659 enum wmi_ap_ps_param_uapsd {
19660     WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
19661     WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
19662     WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
19663     WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
19664     WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
19665     WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
19666     WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
19667     WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
19668 };
19669 
19670 /** U-APSD maximum service period of peer station */
19671 enum wmi_ap_ps_peer_param_max_sp {
19672     WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
19673     WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
19674     WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
19675     WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
19676 
19677     /* keep last! */
19678     MAX_WMI_AP_PS_PEER_PARAM_MAX_SP,
19679 };
19680 
19681 /** param values for WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE */
19682 enum wmi_ap_ps_param_sifs_resp_frmtype {
19683     WMI_SIFS_RESP_PSPOLL    = (1 << 0),
19684     WMI_SIFS_RESP_UAPSD     = (1 << 1),
19685     WMI_SIFS_RESP_QBST_EXP  = (1 << 2),
19686     WMI_SIFS_RESP_QBST_DATA = (1 << 3),
19687     WMI_SIFS_RESP_QBST_BAR  = (1 << 4),
19688 };
19689 
19690 /**
19691  * AP power save parameter
19692  * Set a power save specific parameter for a peer station
19693  */
19694 enum wmi_ap_ps_peer_param {
19695     /** Set uapsd configuration for a given peer.
19696      *
19697      * This will include the delivery and trigger enabled state for every AC.
19698      * The host  MLME needs to set this based on AP capability and stations
19699      * request Set in the association request  received from the station.
19700      *
19701      * Lower 8 bits of the value specify the UAPSD configuration.
19702      *
19703      * (see enum wmi_ap_ps_param_uapsd)
19704      * The default value is 0.
19705      */
19706     WMI_AP_PS_PEER_PARAM_UAPSD = 0,
19707 
19708     /**
19709      * Set the service period for a UAPSD capable station
19710      *
19711      * The service period from wme ie in the (re)assoc request frame.
19712      *
19713      * (see enum wmi_ap_ps_peer_param_max_sp)
19714      */
19715     WMI_AP_PS_PEER_PARAM_MAX_SP = 1,
19716 
19717     /** Time in seconds for aging out buffered frames for STA in power save */
19718     WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
19719 
19720     /**
19721      * Specify frame types that are considered SIFS RESP trigger frame
19722      * (see enum wmi_ap_ps_param_sifs_resp_frmtype)
19723      */
19724     WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3,
19725 
19726     /** Specifies the trigger state of TID. Valid only for UAPSD frame type  */
19727     WMI_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4,
19728 
19729     /** Specifies the WNM sleep state of a STA */
19730     WMI_AP_PS_PEER_PARAM_WNM_SLEEP = 5,
19731 };
19732 
19733 typedef struct {
19734     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_ps_peer_cmd_fixed_param */
19735     /** unique id identifying the VDEV, generated by the caller */
19736     A_UINT32 vdev_id;
19737     /** peer MAC address */
19738     wmi_mac_addr peer_macaddr;
19739     /** AP powersave param (see enum wmi_ap_ps_peer_param) */
19740     A_UINT32 param;
19741     /** AP powersave param value (see defines) */
19742     A_UINT32 value;
19743 } wmi_ap_ps_peer_cmd_fixed_param;
19744 
19745 /** Configure peer station 11v U-APSD coexistence
19746  *
19747  * Two parameters from uaspd coexistence ie info (as specified in 11v) are
19748  * sent down to FW along with this command.
19749  *
19750  * The semantics of these fields are described in the following text extracted
19751  * from 802.11v.
19752  *
19753  * ---  If the non-AP STA specified a non-zero TSF 0 Offset value in the
19754  *      U-APSD Coexistence element, the AP should not transmit frames to the
19755  *      non-AP STA outside of the U-APSD Coexistence Service Period, which
19756  *      begins when the AP receives the U-APSD trigger frame and ends after
19757  *      the transmission period specified by the result of the following
19758  *      calculation:
19759  *
19760  *          End of transmission period = T + (Interval . ((T . TSF 0 Offset) mod Interval))
19761  *
19762  *      Where T is the time the U-APSD trigger frame was received at the AP
19763  *      Interval is the UAPSD Coexistence element Duration/Interval field
19764  *      value (see 7.3.2.91) or upon the successful transmission of a frame
19765  *      with EOSP bit set to 1, whichever is earlier.
19766  *
19767  *
19768  * ---  If the non-AP STA specified a zero TSF 0 Offset value in the U-APSD
19769  *      Coexistence element, the AP should not transmit frames to the non-AP
19770  *      STA outside of the U-APSD Coexistence Service Period, which begins
19771  *      when the AP receives a U-APSD trigger frame and ends after the
19772  *      transmission period specified by the result of the following
19773  *      calculation: End of transmission period = T + Duration
19774  */
19775 typedef struct {
19776     /** unique id identifying the VDEV, generated by the caller */
19777     A_UINT32 vdev_id;
19778     /** peer MAC address */
19779     wmi_mac_addr peer_macaddr;
19780     /** Enable U-APSD coexistence support for this peer
19781      *
19782      * 0 -> disabled (default)
19783      * 1 -> enabled
19784      */
19785     A_UINT32 enabled;
19786     /** Duration/Interval as defined by 11v U-ASPD coexistence */
19787     A_UINT32 duration_interval;
19788     /** Upper 32 bits of 64-bit TSF offset */
19789     A_UINT32 tsf_offset_high;
19790     /** Lower 32 bits of 64-bit TSF offset */
19791     A_UINT32 tsf_offset_low;
19792 } wmi_ap_powersave_peer_uapsd_coex_cmd;
19793 
19794 typedef enum {
19795     WMI_AP_PS_EGAP_F_ENABLE_PHYERR_DETECTION      = 0x0001,
19796     WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_PS_STATE   = 0x0002,
19797     WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_INACTIVITY = 0x0004,
19798 
19799     WMI_AP_PS_EGAP_FLAG_MAX = 0x8000
19800 } wmi_ap_ps_egap_flag_type;
19801 
19802 #define WMI_EGAP_GET_REDUCED_2G_TX_CHM(txrx_chm)  WMI_GET_BITS(txrx_chm, 0, 8)
19803 #define WMI_EGAP_GET_REDUCED_2G_RX_CHM(txrx_chm)  WMI_GET_BITS(txrx_chm, 8, 8)
19804 #define WMI_EGAP_GET_REDUCED_5G_TX_CHM(txrx_chm)  WMI_GET_BITS(txrx_chm, 16, 8)
19805 #define WMI_EGAP_GET_REDUCED_5G_RX_CHM(txrx_chm)  WMI_GET_BITS(txrx_chm, 24, 8)
19806 
19807 #define WMI_EGAP_SET_REDUCED_2G_TX_CHM(txrx_chm, val)  WMI_SET_BITS(txrx_chm, 0, 8, val)
19808 #define WMI_EGAP_SET_REDUCED_2G_RX_CHM(txrx_chm, val)  WMI_SET_BITS(txrx_chm, 8, 8, val)
19809 #define WMI_EGAP_SET_REDUCED_5G_TX_CHM(txrx_chm, val)  WMI_SET_BITS(txrx_chm, 16, 8, val)
19810 #define WMI_EGAP_SET_REDUCED_5G_RX_CHM(txrx_chm, val)  WMI_SET_BITS(txrx_chm, 24, 8, val)
19811 
19812 /**
19813  * configure enhanced green ap parameters
19814  */
19815 typedef struct {
19816     A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_ap_powersave_egap_param_cmd_fixed_param  */
19817     /** Enable enhanced green ap
19818      * 0 -> disabled
19819      * 1 -> enabled
19820      */
19821     A_UINT32 enable;
19822     /** The param indicates a duration that all STAs connected
19823      * to S-AP have no traffic.
19824      */
19825     A_UINT32 inactivity_time; /* in unit of milliseconds */
19826     /** The param indicates a duration that all STAs connected
19827      * to S-AP have no traffic, after all STAs have entered powersave.
19828      */
19829     A_UINT32 wait_time; /* in unit of milliseconds */
19830     /** The param is used to turn on/off some functions within E-GAP.
19831      */
19832     A_UINT32 flags; /* wmi_ap_ps_egap_flag_type bitmap */
19833     /** Reduced_txrx_chainmask
19834      *    [7:0]   - 2G band tx chain mask
19835      *    [15:8]  - 2G band rx chain mask
19836      *    [23:16] - 5G band tx chain mask
19837      *    [31:24] - 5G band rx chain mask
19838      */
19839     A_UINT32 reduced_txrx_chainmask;
19840 } wmi_ap_ps_egap_param_cmd_fixed_param;
19841 
19842 typedef enum {
19843     WMI_AP_PS_EGAP_STATUS_IDLE        = 1,
19844     WMI_AP_PS_EGAP_STATUS_PWRSAVE_OFF = 2,
19845     WMI_AP_PS_EGAP_STATUS_PWRSAVE_ON  = 3,
19846 
19847     WMI_AP_PS_EGAP_STATUS_MAX = 15
19848 } wmi_ap_ps_egap_status_type;
19849 
19850 /**
19851  * send enhanced green ap status to host
19852  */
19853 typedef struct
19854 {
19855     /** TLV tag and len; tag equals
19856      * WMITLV_TAG_STRUC_wmi_ap_ps_egap_info_chainmask_list */
19857     A_UINT32 tlv_header;
19858     union {
19859         A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
19860         /** pdev_id for identifying the MAC
19861          * See macros starting with WMI_PDEV_ID_ for values.
19862          */
19863         A_UINT32 pdev_id;
19864     };
19865     /** The param indicates the current tx chainmask with the mac id. */
19866     A_UINT32 tx_chainmask;
19867     /** The param indicates the current rx chainmask with the mac id. */
19868     A_UINT32 rx_chainmask;
19869 } wmi_ap_ps_egap_info_chainmask_list;
19870 
19871 typedef struct {
19872     A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_ap_powersave_egap_param_cmd_fixed_param  */
19873     /** Enhanced green ap status (WMI_AP_PS_EGAP_STATUS). */
19874     A_UINT32 status;
19875 /* This TLV is followed by
19876  *     wmi_ap_ps_egap_info_chainmask_list chainmask_list[];
19877  */
19878 } wmi_ap_ps_egap_info_event_fixed_param;
19879 
19880 /* 128 clients = 4 words */
19881 /* WMI_TIM_BITMAP_ARRAY_SIZE can't be modified without breaking the compatibility */
19882 #define WMI_TIM_BITMAP_ARRAY_SIZE 4
19883 
19884 typedef struct {
19885     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info  */
19886     /** TIM bitmap len (in bytes) */
19887     A_UINT32 tim_len;
19888     /** TIM Partial Virtual Bitmap */
19889     A_UINT32 tim_mcast;
19890     A_UINT32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE];
19891     A_UINT32 tim_changed;
19892     A_UINT32 tim_num_ps_pending;
19893     /** Use the vdev_id only if vdev_id_valid is set */
19894     A_UINT32 vdev_id_valid;
19895     /** unique id identifying the VDEV */
19896     A_UINT32 vdev_id;
19897 } wmi_tim_info;
19898 
19899 typedef struct {
19900     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info  */
19901     /** TIM Partial Virtual Bitmap */
19902     A_UINT32 tim_mcast;
19903     A_UINT32 tim_changed;
19904     A_UINT32 tim_num_ps_pending;
19905     /** Use the vdev_id only if vdev_id_valid is set */
19906     A_UINT32 vdev_id_valid;
19907     /** unique id identifying the VDEV */
19908     A_UINT32 vdev_id;
19909     /** TIM bitmap len (in bytes) */
19910     A_UINT32 tim_len;
19911     /* followed by WMITLV_TAG_ARRAY_BYTE holding the TIM bitmap */
19912 } wmi_tim_info_v2;
19913 
19914 typedef struct {
19915     /** Flag to enable quiet period IE support */
19916     A_UINT32 is_enabled;
19917     /** Quiet start */
19918     A_UINT32 tbttcount;
19919     /** Beacon intervals between quiets*/
19920     A_UINT32 period;
19921     /** TUs of each quiet*/
19922     A_UINT32 duration;
19923     /** TUs of from TBTT of quiet start*/
19924     A_UINT32 offset;
19925 } wmi_quiet_info;
19926 
19927 /* WMI_P2P_MAX_NOA_DESCRIPTORS can't be modified without breaking the compatibility */
19928 #define WMI_P2P_MAX_NOA_DESCRIPTORS 4   /* Maximum number of NOA Descriptors supported */
19929 
19930 typedef struct {
19931     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_info  */
19932     /** Bit  0:     Flag to indicate an update in NOA schedule
19933      *  Bits 7-1:   Reserved
19934      *  Bits 15-8:  Index (identifies the instance of NOA sub element)
19935      *  Bit  16:    Opp PS state of the AP
19936      *  Bits 23-17: Ctwindow in TUs
19937      *  Bits 31-24: Number of NOA descriptors
19938      */
19939     A_UINT32 noa_attributes;
19940     wmi_p2p_noa_descriptor noa_descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
19941     /** Use the vdev_id only if vdev_id_valid is set */
19942     A_UINT32 vdev_id_valid;
19943     /** unique id identifying the VDEV */
19944     A_UINT32 vdev_id;
19945 } wmi_p2p_noa_info;
19946 
19947 typedef struct {
19948     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_quiet_offload_info  */
19949     A_UINT32 vdev_id;   /* unique id identifying the VDEV */
19950     A_UINT8  tbttcount; /* quiet start */
19951     A_UINT8  period;    /* beacon intervals between quiets */
19952     A_UINT16 duration;  /* TUs of each quiet */
19953     A_UINT16 offset;    /* TUs of from TBTT of quiet start */
19954 } wmi_quiet_offload_info;
19955 
19956 #define WMI_UNIFIED_NOA_ATTR_MODIFIED       0x1
19957 #define WMI_UNIFIED_NOA_ATTR_MODIFIED_S     0
19958 
19959 #define WMI_UNIFIED_NOA_ATTR_IS_MODIFIED(hdr)                       \
19960             WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_MODIFIED)
19961 
19962 #define WMI_UNIFIED_NOA_ATTR_MODIFIED_SET(hdr)                      \
19963             WMI_F_RMW((hdr)->noa_attributes, 0x1,                   \
19964                 WMI_UNIFIED_NOA_ATTR_MODIFIED);
19965 
19966 #define WMI_UNIFIED_NOA_ATTR_INDEX          0xff00
19967 #define WMI_UNIFIED_NOA_ATTR_INDEX_S        8
19968 
19969 #define WMI_UNIFIED_NOA_ATTR_INDEX_GET(hdr)                         \
19970             WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_INDEX)
19971 
19972 #define WMI_UNIFIED_NOA_ATTR_INDEX_SET(hdr, v)                      \
19973             WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff,            \
19974                 WMI_UNIFIED_NOA_ATTR_INDEX);
19975 
19976 #define WMI_UNIFIED_NOA_ATTR_OPP_PS         0x10000
19977 #define WMI_UNIFIED_NOA_ATTR_OPP_PS_S       16
19978 
19979 #define WMI_UNIFIED_NOA_ATTR_OPP_PS_GET(hdr)                         \
19980             WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_OPP_PS)
19981 
19982 #define WMI_UNIFIED_NOA_ATTR_OPP_PS_SET(hdr)                         \
19983             WMI_F_RMW((hdr)->noa_attributes, 0x1,                    \
19984                 WMI_UNIFIED_NOA_ATTR_OPP_PS);
19985 
19986 #define WMI_UNIFIED_NOA_ATTR_CTWIN          0xfe0000
19987 #define WMI_UNIFIED_NOA_ATTR_CTWIN_S        17
19988 
19989 #define WMI_UNIFIED_NOA_ATTR_CTWIN_GET(hdr)                          \
19990             WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_CTWIN)
19991 
19992 #define WMI_UNIFIED_NOA_ATTR_CTWIN_SET(hdr, v)                       \
19993             WMI_F_RMW((hdr)->noa_attributes, (v) & 0x7f,             \
19994                 WMI_UNIFIED_NOA_ATTR_CTWIN);
19995 
19996 #define WMI_UNIFIED_NOA_ATTR_NUM_DESC       0xff000000
19997 #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_S     24
19998 
19999 #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET(hdr)                       \
20000             WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_NUM_DESC)
20001 
20002 #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_SET(hdr, v)                    \
20003             WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff,             \
20004                 WMI_UNIFIED_NOA_ATTR_NUM_DESC);
20005 
20006 typedef struct {
20007     /** TIM info */
20008     wmi_tim_info tim_info;
20009     /** P2P NOA info */
20010     wmi_p2p_noa_info p2p_noa_info;
20011 /* TBD: More info elements to be added later */
20012 } wmi_bcn_info;
20013 
20014 typedef struct {
20015     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swba_event_fixed_param  */
20016     /** bitmap identifying the VDEVs, generated by the caller */
20017     A_UINT32 vdev_map;
20018     /** how many vdev's info is included in this message
20019      *  If this field is zero, then the number of vdevs is specified by
20020      *  the number of bits set in the vdev_map bitmap.
20021      */
20022     A_UINT32 num_vdevs;
20023 /* This TLV is followed by tim_info and p2p_noa_info for each vdev:
20024  *     wmi_tim_info tim_info[];
20025  *     wmi_p2p_noa_info p2p_noa_info[];
20026  *     wmi_quiet_offload_info quiet_offload_info[0/1];
20027  *
20028  */
20029 } wmi_host_swba_event_fixed_param;
20030 
20031 #define WMI_MAX_AP_VDEV 16
20032 
20033 typedef struct {
20034     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swfda_event_fixed_param  */
20035     /** vdev_id identifying the VDEV for which FILS should be generated */
20036     A_UINT32 vdev_id;
20037     /** time (in TU) at which current FILS Discovery frame is scheduled for Tx */
20038     A_UINT32 fils_tt;
20039     /** next TBTT time (in TU) for this vdev  */
20040     A_UINT32 tbtt;
20041 } wmi_host_swfda_event_fixed_param;
20042 
20043 typedef struct {
20044     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_event_fixed_param  */
20045     /** bimtap of VDEVs that has tbtt offset updated */
20046     A_UINT32 vdev_map;
20047 /* The TLVs for tbttoffset_list, tbtt_qtime_low_us_list, and
20048  * tbtt_qtime_high_us_list will follow this TLV.
20049  *   - tbtt offset list in the order of the LSb to MSb in the vdev_map bitmap
20050  *     A_UINT32 tbttoffset_list[WMI_MAX_AP_VDEV];
20051  *   - tbtt qtime_low_us list(Lower 32 bit of qtime us) in the order of the
20052  *     LSb to MSb in the vdev_map bitmap
20053  *     A_UINT32 tbtt_qtime_low_us_list[WMI_MAX_AP_VDEV];
20054  *   - tbtt qtime_high_us list(Higher 32 bit of qtime us) in the order of the
20055  *     LSb to MSb in the vdev_map bitmap
20056  *     A_UINT32 tbtt_qtime_high_us_list[WMI_MAX_AP_VDEV];
20057  */
20058 } wmi_tbtt_offset_event_fixed_param;
20059 
20060 #define WMI_TBTT_OFFSET_INVALID 0xffffffff /* tbttoffset is not updated by FW */
20061 typedef struct {
20062     A_UINT32 tlv_header;/* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_info */
20063     /** unique id identifying the VDEV */
20064     A_UINT32 vdev_id;
20065     /** tbttoffset in TUs */
20066     A_UINT32 tbttoffset;
20067     /** absolute tbtt time in qtime us */
20068     A_UINT32 tbtt_qtime_low_us;  /* bits 31:0 of qtime */
20069     A_UINT32 tbtt_qtime_high_us; /* bits 63:32 of qtime */
20070 } wmi_tbtt_offset_info;
20071 
20072 /** Use this event if number of vdevs > 32 */
20073 typedef struct {
20074    A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_ext_event_fixed_param  */
20075    A_UINT32 num_vdevs;
20076 /*
20077  * The TLVs for tbttoffset will follow this TLV.
20078  * Of size num_vdevs * wmi_tbtt_offset_info
20079  */
20080 } wmi_tbtt_offset_ext_event_fixed_param;
20081 
20082 
20083 /* Peer Specific commands and events */
20084 
20085 typedef struct {
20086     A_UINT32 percentage; /* in unit of 12.5% */
20087     A_UINT32 min_delta;  /* in unit of Mbps */
20088 } rate_delta_t;
20089 
20090 #define PEER_RATE_REPORT_COND_FLAG_DELTA        0x01
20091 #define PEER_RATE_REPORT_COND_FLAG_THRESHOLD    0x02
20092 #define MAX_NUM_OF_RATE_THRESH                  4
20093 
20094 typedef struct {
20095     A_UINT32 val_cond_flags;     /* PEER_RATE_REPORT_COND_FLAG_DELTA, PEER_RATE_REPORT_COND_FLAG_THRESHOLD
20096                                     Any of these two conditions or both of them can be set. */
20097     rate_delta_t rate_delta;
20098     A_UINT32 rate_threshold[MAX_NUM_OF_RATE_THRESH];  /* In unit of Mbps. There are at most 4 thresholds.
20099                                                          If the threshold count is less than 4, set zero to
20100                                                          the one following the last threshold */
20101 } report_cond_per_phy_t;
20102 
20103 
20104 enum peer_rate_report_cond_phy_type {
20105     PEER_RATE_REPORT_COND_11B = 0,
20106     PEER_RATE_REPORT_COND_11A_G,
20107     PEER_RATE_REPORT_COND_11N,
20108     PEER_RATE_REPORT_COND_11AC,
20109     PEER_RATE_REPORT_COND_MAX_NUM
20110 };
20111 
20112 typedef struct {
20113     A_UINT32 tlv_header;                     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_rate_report_condition_fixed_param */
20114     A_UINT32 enable_rate_report;             /* 1= enable, 0=disable */
20115     A_UINT32 report_backoff_time;            /* in unit of msecond */
20116     A_UINT32 report_timer_period;            /* in unit of msecond */
20117     /* In the following field, the array index means the phy type,
20118      * please see enum peer_rate_report_cond_phy_type for detail */
20119     report_cond_per_phy_t cond_per_phy[PEER_RATE_REPORT_COND_MAX_NUM];
20120 } wmi_peer_set_rate_report_condition_fixed_param;
20121 
20122 /* Peer Type:
20123  * NB: This can be left DEFAULT for the normal case, and f/w will determine BSS type based
20124  * on address and vdev opmode. This is largely here to allow host to indicate that
20125  * peer is explicitly a TDLS peer
20126  */
20127 enum wmi_peer_type {
20128     WMI_PEER_TYPE_DEFAULT = 0,    /* Generic/Non-BSS/Self Peer */
20129     WMI_PEER_TYPE_BSS = 1,        /* Peer is BSS Peer entry */
20130     WMI_PEER_TYPE_TDLS = 2,       /* Peer is a TDLS Peer */
20131     WMI_PEER_TYPE_OCB = 3,        /* Peer is a OCB Peer */
20132     WMI_PEER_TYPE_NAN_DATA = 4,   /* Peer is NAN DATA */
20133     WMI_PEER_TYPE_TRANS_BSS = 5,  /* For creating BSS peer when connecting with non-transmit AP */
20134     WMI_PEER_TYPE_PASN = 6,       /* Peer is used for Pre-Association Security Negotiation */
20135     WMI_PEER_TYPE_BRIDGE = 7,     /* For creating Dummy Peer in case of 4 Link MLO */
20136     WMI_PEER_TYPE_HOST_MAX = 127, /* Host <-> Target Peer type is assigned up to 127 */
20137                                   /* Reserved from 128 - 255 for target internal use.*/
20138     WMI_PEER_TYPE_ROAMOFFLOAD_TEMP = 128, /* Temporarily created during offload roam */
20139 };
20140 
20141 /* this TLV structure used for providing mlo parameters on peer create */
20142 typedef struct {
20143     A_UINT32 tlv_header; /** TLV tag and len */
20144     wmi_mlo_flags mlo_flags; /* only mlo enable flag need by STA mode peer create */
20145 } wmi_peer_create_mlo_params;
20146 
20147 typedef struct {
20148     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_cmd_fixed_param */
20149     /** unique id identifying the VDEV, generated by the caller */
20150     A_UINT32 vdev_id;
20151     /** peer MAC address */
20152     wmi_mac_addr peer_macaddr;
20153     /** peer type: see enum values above */
20154     A_UINT32 peer_type;
20155 /* The TLVs follows this structure:
20156  * wmi_peer_create_mlo_params mlo_params[]; <-- MLO flags on peer_create
20157  *     Optional TLV, only present for MLO peers.
20158  *     If the peer is non-MLO, the array length should be 0.
20159  *     Only mlo_enable flag required by MCC to decide MAC address to be used.
20160  */
20161 } wmi_peer_create_cmd_fixed_param;
20162 
20163 /* this TLV structure is used for providing MLO parameters on peer delete */
20164 typedef struct {
20165     A_UINT32 tlv_header; /** TLV tag and len */
20166     A_UINT32 mlo_hw_link_id_bitmap; /* Hardware link id of the link which has crashed or was not created in the first place */
20167     wmi_mlo_flags mlo_flags; /* to indicate whether peer delete is due to link switch */
20168 } wmi_peer_delete_mlo_params;
20169 
20170 typedef struct {
20171     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_cmd_fixed_param */
20172     /** unique id identifying the VDEV, generated by the caller */
20173     A_UINT32 vdev_id;
20174     /** peer MAC address */
20175     wmi_mac_addr peer_macaddr;
20176 /* The TLVs follows this structure:
20177  * wmi_peer_delete_mlo_params mlo_params[]; <-- MLO flags on peer_delete
20178  *     Optional TLV, only present for MLO peers.
20179  *     If the peer is non-MLO, the array length should be 0.
20180  *     Used for Link peer deleted.
20181  */
20182 } wmi_peer_delete_cmd_fixed_param;
20183 
20184 #define WMI_VDEV_ALL_PEER_MAX_BITMAP_WORD32 ((WMI_PEER_TYPE_HOST_MAX+31) / 32)
20185 
20186 #define WMI_VDEV_DELETE_ALL_PEER_BITMAP_SET(param, peer_type) \
20187         WMI_SET_BITS(param[peer_type / 32], (peer_type % 32), 1, 1)
20188 
20189 #define WMI_VDEV_DELETE_ALL_PEER_BITMAP_GET(param, peer_type) \
20190         WMI_GET_BITS(param[peer_type / 32], (peer_type % 32), 1)
20191 
20192 typedef struct {
20193     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delete_all_peer_cmd_fixed_param */
20194     /** unique id identifying the VDEV, generated by the caller */
20195     A_UINT32 vdev_id;
20196     /**
20197      * Host can request for deletion of peers specific to wmi_peer_type
20198      * through below bitmap.
20199      * Macro's WMI_VDEV_DELETE_ALL_PEER_BITMAP_SET &
20200      * WMI_VDEV_DELETE_ALL_PEER_BITMAP_GET are used for accessing purpose.
20201      * And if bitmap array is filled with zeros, firmware needs to delete
20202      * all peers.
20203      */
20204      A_UINT32 peer_type_bitmap[WMI_VDEV_ALL_PEER_MAX_BITMAP_WORD32];
20205 } wmi_vdev_delete_all_peer_cmd_fixed_param;
20206 
20207 typedef struct {
20208     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_unmap_response_cmd_fixed_param */
20209     A_UINT32 tlv_header;
20210     /*
20211      * Following this struct is the TLV:
20212      * A_UINT32 peer_ids[]; <-- variable-length array of peer_ids
20213      *                          that have been unmapped by the host
20214      */
20215 } wmi_peer_unmap_response_cmd_fixed_param;
20216 
20217 typedef struct {
20218     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_rx_blocksize_cmd_fixed_param */
20219     /** unique id identifying the VDEV, generated by the caller */
20220     A_UINT32 vdev_id;
20221     /** peer MAC address */
20222     wmi_mac_addr peer_macaddr;
20223     /**
20224      * maximum block ack window size to use during a rx block ack negotiation,
20225      * i.e. the maximum number of MPDUs per A-MPDU that will be received
20226      */
20227     A_UINT32  rx_block_ack_win_limit;
20228 } wmi_peer_set_rx_blocksize_cmd_fixed_param;
20229 
20230 typedef struct {
20231     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_flush_tids_cmd_fixed_param */
20232     /** unique id identifying the VDEV, generated by the caller */
20233     A_UINT32 vdev_id;
20234     /** peer MAC address */
20235     wmi_mac_addr peer_macaddr;
20236     /** tid bitmap identifying the tids to flush */
20237     A_UINT32 peer_tid_bitmap;
20238 } wmi_peer_flush_tids_cmd_fixed_param;
20239 
20240 typedef struct {
20241     /** rate mode . 0: disable fixed rate (auto rate)
20242      *   1: legacy (non 11n) rate  specified as ieee rate 2*Mbps
20243      *   2: ht20 11n rate  specified as mcs index
20244      *   3: ht40 11n rate  specified as mcs index
20245      */
20246     A_UINT32 rate_mode;
20247     /** 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB)
20248      *  and series 3 is stored at byte 3 (MSB) */
20249     A_UINT32 rate_series;
20250     /** 4 retry counts for 4 rate series. retry count for rate 0 is stored in byte 0 (LSB)
20251      *  and retry count for rate 3 is stored at byte 3 (MSB) */
20252     A_UINT32 rate_retries;
20253 } wmi_fixed_rate;
20254 
20255 typedef struct {
20256     /** unique id identifying the VDEV, generated by the caller */
20257     A_UINT32 vdev_id;
20258     /** peer MAC address */
20259     wmi_mac_addr peer_macaddr;
20260     /** fixed rate */
20261     wmi_fixed_rate peer_fixed_rate;
20262 } wmi_peer_fixed_rate_cmd;
20263 
20264 #define WMI_MGMT_TID    17
20265 
20266 typedef struct {
20267     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_clear_resp_cmd_fixed_param */
20268     /** unique id identifying the VDEV, generated by the caller */
20269     A_UINT32 vdev_id;
20270     /** peer MAC address */
20271     wmi_mac_addr peer_macaddr;
20272 } wmi_addba_clear_resp_cmd_fixed_param;
20273 
20274 typedef struct {
20275     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_send_cmd_fixed_param */
20276     /** unique id identifying the VDEV, generated by the caller */
20277     A_UINT32 vdev_id;
20278     /** peer MAC address */
20279     wmi_mac_addr peer_macaddr;
20280     /** Tid number */
20281     A_UINT32 tid;
20282     /** Buffer/Window size*/
20283     A_UINT32 buffersize;
20284 } wmi_addba_send_cmd_fixed_param;
20285 
20286 typedef struct {
20287     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delba_send_cmd_fixed_param */
20288     /** unique id identifying the VDEV, generated by the caller */
20289     A_UINT32 vdev_id;
20290     /** peer MAC address */
20291     wmi_mac_addr peer_macaddr;
20292     /** Tid number */
20293     A_UINT32 tid;
20294     /** Is Initiator */
20295     A_UINT32 initiator;
20296     /** Reason code */
20297     A_UINT32 reasoncode;
20298 } wmi_delba_send_cmd_fixed_param;
20299 
20300 typedef struct {
20301     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_setresponse_cmd_fixed_param */
20302     /** unique id identifying the vdev, generated by the caller */
20303     A_UINT32 vdev_id;
20304     /** peer mac address */
20305     wmi_mac_addr peer_macaddr;
20306     /** Tid number */
20307     A_UINT32 tid;
20308     /** status code */
20309     A_UINT32 statuscode;
20310 } wmi_addba_setresponse_cmd_fixed_param;
20311 
20312 typedef struct {
20313     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_send_singleamsdu_cmd_fixed_param */
20314     /** unique id identifying the vdev, generated by the caller */
20315     A_UINT32 vdev_id;
20316     /** peer mac address */
20317     wmi_mac_addr peer_macaddr;
20318     /** Tid number */
20319     A_UINT32 tid;
20320 } wmi_send_singleamsdu_cmd_fixed_param;
20321 
20322 /* Type of Station DTIM Power Save method */
20323 enum {
20324     /* For NORMAL DTIM, the parameter is the number of beacon intervals and
20325      * also the same value as the listen interval. For this method, the
20326      * station will wake up based on the listen interval. If this
20327      * listen interval is not equal to DTIM, then the station may
20328      * miss certain DTIM beacons. If this value is 1, then the
20329      * station will wake up for every beacon.
20330      */
20331     WMI_STA_DTIM_PS_NORMAL_DTIM = 0x01,
20332     /* For MODULATED_DTIM, parameter is a multiple of DTIM beacons to skip.
20333      * When this value is 1, then the station will wake at every DTIM beacon.
20334      * If this value is >1, then the station will skip certain DTIM beacons.
20335      * This value is the multiple of DTIM intervals that the station will
20336      * wake up to receive the DTIM beacons.
20337      */
20338     WMI_STA_DTIM_PS_MODULATED_DTIM = 0x02,
20339 };
20340 
20341 /* Parameter structure for the WMI_STA_DTIM_PS_METHOD_CMDID */
20342 typedef struct {
20343     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_dtim_ps_method_cmd_fixed_param */
20344     /** unique id identifying the VDEV, generated by the caller */
20345     A_UINT32 vdev_id;
20346     /** Station DTIM Power Save method as defined above */
20347     A_UINT32 dtim_pwrsave_method;
20348     /** DTIM PS value. Contents depends on the method */
20349     A_UINT32 value;
20350     /** Modulated DTIM value */
20351     A_UINT32 MaxLIModulatedDTIM;
20352 } wmi_sta_dtim_ps_method_cmd_fixed_param;
20353 
20354 /*
20355  * For Station UAPSD Auto Trigger feature, the Firmware monitors the
20356  * uAPSD uplink and downlink traffic for each uAPSD enabled WMM ACs.
20357  * If there is no uplink/download for the specified service interval (field service_interval),
20358  * firmware will auto generate a QOS-NULL trigger for that WMM-AP with the TID value
20359  * specified in the UP (field user_priority).
20360  * Firmware also monitors the responses for these QOS-NULL triggers.
20361  * If the peer does not have any delivery frames, it will respond with
20362  * QOS-NULL (EOSP=1). This feature of only using service interval is assumed to be mandatory for all
20363  * firmware implementation. For this basic implementation, the suspend_interval and delay_interval
20364  * are unused and should be set to 0.
20365  * When service_interval is 0, then the firmware will not send any trigger frames. This is for
20366  * certain host-based implementations that don't want this firmware offload.
20367  * Note that the per-AC intervals are required for some usage scenarios. This is why the intervals
20368  * are given in the array of ac_param[]. For example, Voice service interval may defaults to 20 ms
20369  * and rest of the AC default to 300 ms.
20370  *
20371  * The service bit, WMI_STA_UAPSD_VAR_AUTO_TRIG, will indicate that the more advanced feature
20372  * of variable auto trigger is supported. The suspend_interval and delay_interval is used in
20373  * the more advanced monitoring method.
20374  * If the PEER does not have any delivery enabled data frames (non QOS-NULL) for the
20375  * suspend interval (field suspend_interval), firmware will change its auto trigger interval
20376  * to delay interval (field delay_interval). This way, when there is no traffic, the station
20377  * will save more power by waking up less and sending less trigger frames.
20378  * The (service_interval < suspend_interval) and (service_interval < delay_interval).
20379  * If this variable auto trigger is not required, then the suspend_interval and delay_interval
20380  * should be 0.
20381  */
20382 typedef struct {
20383     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_param */
20384     /** WMM Access category from 0 to 3 */
20385     A_UINT32 wmm_ac;
20386     /** User priority to use in trigger frames. It is the TID
20387      *  value. This field needs to be specified and may not be
20388      *  equivalent to AC since some implementation may use the TSPEC
20389      *  to enable UAPSD and negotiate a particular user priority. */
20390     A_UINT32 user_priority;
20391     /** service interval in ms */
20392     A_UINT32 service_interval;
20393     /** Suspend interval in ms */
20394     A_UINT32 suspend_interval;
20395     /** delay interval in ms */
20396     A_UINT32 delay_interval;
20397 } wmi_sta_uapsd_auto_trig_param;
20398 
20399 typedef struct {
20400     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_cmd_fixed_param */
20401     /** unique id identifying the VDEV, generated by the caller */
20402     A_UINT32 vdev_id;
20403     /** peer mac address */
20404     wmi_mac_addr peer_macaddr;
20405     /** Number of AC to specify */
20406     A_UINT32 num_ac;
20407 /*
20408  * Following this struct is the TLV:
20409  *     wmi_sta_uapsd_auto_trig_param ac_param[]; <-- Variable number of AC parameters (defined by field num_ac)
20410  */
20411 
20412 } wmi_sta_uapsd_auto_trig_cmd_fixed_param;
20413 
20414 /** mimo powersave state */
20415 #define WMI_PEER_MIMO_PS_STATE                          0x1
20416 /** enable/disable AMPDU . initial value (enabled) */
20417 #define WMI_PEER_AMPDU                                  0x2
20418 /** authorize/unauthorize peer. initial value is unauthorized (0)  */
20419 #define WMI_PEER_AUTHORIZE                              0x3
20420 /** peer channel bandwidth */
20421 #define WMI_PEER_CHWIDTH                                0x4
20422 /** peer NSS */
20423 #define WMI_PEER_NSS                                    0x5
20424 /** USE 4 ADDR */
20425 #define WMI_PEER_USE_4ADDR                              0x6
20426 /* set group membership status */
20427 #define WMI_PEER_MEMBERSHIP             0x7
20428 #define WMI_PEER_USERPOS                0x8
20429 /*
20430  * A critical high-level protocol is being used with this peer. Target
20431  * should take appropriate measures (if possible) to ensure more
20432  * reliable link with minimal latency. This *may* include modifying the
20433  * station power save policy, enabling more RX chains, increased
20434  * priority of channel scheduling, etc.
20435  *
20436  * NOTE: This parameter should only be considered a hint as specific
20437  * behavior will depend on many factors including current network load
20438  * and vdev/peer configuration.
20439  *
20440  * For STA VDEV this peer corresponds to the AP's BSS peer.
20441  * For AP VDEV this peer corresponds to the remote peer STA.
20442  */
20443 #define WMI_PEER_CRIT_PROTO_HINT_ENABLED     0x9
20444 /* set Tx failure count threshold for the peer - Currently unused */
20445 #define WMI_PEER_TX_FAIL_CNT_THR                        0xA
20446 /* Enable H/W retry and Enable H/W Send CTS2S before Data */
20447 #define WMI_PEER_SET_HW_RETRY_CTS2S                     0xB
20448 
20449 /* Set peer advertised IBSS atim window length */
20450 #define WMI_PEER_IBSS_ATIM_WINDOW_LENGTH                0xC
20451 
20452 /** peer phy mode */
20453 #define WMI_PEER_PHYMODE                                0xD
20454 /** Use FIXED Pwr */
20455 #define WMI_PEER_USE_FIXED_PWR                          0xE
20456 /** Set peer fixed rate
20457  * The top nibble is used to select which format to use for encoding
20458  * the rate specification: 0xVXXXXXXX
20459  * If V == 0b0000: format is same as before: 0x000000RR
20460  * If V == 0b0001: format is: 0x1000RRRR.
20461  *                 This will be output of WMI_ASSEMBLE_RATECODE_V1
20462  * The host shall use the new V1 format (and set V = 0x1) if the target
20463  * indicates 802.11ax support via the WMI_SERVICE_11AX flag, or if the
20464  * system is configured with Nss > 4 (either at compile time within the
20465  * host driver, or through WMI_SERVICE_READY PHY capabilities provided
20466  * by the target).
20467  */
20468 #define WMI_PEER_PARAM_FIXED_RATE                       0xF
20469 
20470 /** Allowlist peer TIDs */
20471 #define WMI_PEER_SET_MU_ALLOWLIST                       0x10
20472 /* retain definition of deprecated prior name, for backwards compatibility */
20473 #define WMI_PEER_SET_MU_WHITELIST WMI_PEER_SET_MU_ALLOWLIST
20474 
20475 /** Set peer max tx rate (MCS) in adaptive rate ctrl */
20476 #define WMI_PEER_SET_MAX_TX_RATE                        0x11
20477 /** Set peer minimal tx rate (MCS) in adaptive rate ctrl */
20478 #define WMI_PEER_SET_MIN_TX_RATE                        0x12
20479 /**
20480  * default ring routing for peer data packets,
20481  * param_value = bit 0 for hash based routing enabled or not
20482  *               (value 1 is enabled, value 0 is disabled)
20483  *               bits 1:5 are for ring 32 (i.e. ring id value
20484  *               selected from 0 to 31 values)
20485  *               bits 6:7 are for LMAC/peer based routing.
20486  *               bit 8 for peer based ring selection enabled or not
20487  *               (value 1 is enabled, value 0 is disabled
20488  *                bits 9-15 are valid when bit 8 is set to 1)
20489  *               bit 9 is for ring selection enabled for filter-pass
20490  *               unicast or not (value 1 is enabled, value 0 is disabled)
20491  *               bit 10 is for ring selection enabled for filter-pass
20492  *               mcast or not (value 1 is enabled, value 0 is disabled)
20493  *               bit 11 is for ring selection enabled for filter-pass
20494  *               BAR or not (value 1 is enabled, value 0 is disabled)
20495  *               bit 12-14 is for source ring selection value
20496  *               (value 0 for wbm2rxdma buf ring,
20497  *                value 1 for fw2rxdma buf ring,
20498  *                value 2 for sw2rxdma buf ring,
20499  *                value 3 for no buf ring,
20500  *                value 4 for sw2rxdma_exception buf ring,
20501  *                value 5 for fw2rxdma buf ring)
20502  *               bit 15-17 is for destination ring selection value
20503  *               (value 0 for wbm release ring,
20504  *                value 1 for rxdma2fw ring,
20505  *                value 2 for rxdma2sw ring,
20506  *                value 3 for rxdma2reo ring,
20507  *                value 4 for rxdma2fw_pmac1_ring,
20508  *                value 5 for rxdma2reo_remote0_ring,
20509  *                value 6 for rxdma2reo_remote1_ring)
20510  */
20511 #define WMI_PEER_HASH_BASED_ROUTING_GET(value32)        WMI_GET_BITS(value32, 0x0, 1)
20512 #define WMI_PEER_ROUTING_RING_ID_GET(value32)           WMI_GET_BITS(value32, 0x1, 5)
20513 #define WMI_PEER_LMAC_BASED_ROUTING_GET(value32)        WMI_GET_BITS(value32, 0x6, 2)
20514 #define WMI_PEER_BASED_RING_SELECTION_GET(value32)      WMI_GET_BITS(value32, 0x8, 1)
20515 #define WMI_PEER_FILTER_PASS_UNICAST_GET(value32)       WMI_GET_BITS(value32, 0x9, 1)
20516 #define WMI_PEER_FILTER_PASS_MCAST_GET(value32)         WMI_GET_BITS(value32, 0xA, 1)
20517 #define WMI_PEER_FILTER_PASS_BAR_GET(value32)           WMI_GET_BITS(value32, 0xB, 1)
20518 #define WMI_PEER_FILTER_PASS_SRC_RING_VAL_GET(value32)  WMI_GET_BITS(value32, 0xC, 3)
20519 #define WMI_PEER_FILTER_PASS_DEST_RING_VAL_GET(value32) WMI_GET_BITS(value32, 0xF, 3)
20520 
20521 #define WMI_PEER_SET_DEFAULT_ROUTING                    0x13
20522 /* peer NSS for VHT160 - Extended NSS support */
20523 #define WMI_PEER_NSS_VHT160                             0x14
20524 /* peer NSS for VHT160 - Extended NSS support */
20525 #define WMI_PEER_NSS_VHT80_80                           0x15
20526 /* Peer SU TXBF sounding interval */
20527 #define WMI_PEER_PARAM_SU_TXBF_SOUNDING_INTERVAL        0x16
20528 /* Peer MU TXBF sounding interval */
20529 #define WMI_PEER_PARAM_MU_TXBF_SOUNDING_INTERVAL        0x17
20530 /* Peer TXBF sounding enable or disable */
20531 #define WMI_PEER_PARAM_TXBF_SOUNDING_ENABLE             0x18
20532 /* Per peer 11ax OFDMA enable or disable */
20533 #define WMI_PEER_PARAM_OFDMA_ENABLE                     0x19
20534 /* Per peer 11ax/11ac MU enable or disable */
20535 #define WMI_PEER_PARAM_MU_ENABLE                        0x1a
20536 /** Set peer fixed rate used in UL Trigger
20537  * The top nibble is used to select which format to use for encoding
20538  * the rate specification: 0xVXXXXXXX, V must be 1 for this parameter.
20539  * If V == 0b0001: format is: 0x1000RRRR.
20540  *                 ("RRRR" rate code already has those preamble bits,
20541  *                 which can specify EHT or HE)
20542  *                 This will be output of WMI_ASSEMBLE_RATECODE_V1
20543  *
20544  * This parameter controls the UL OFDMA and UL MU-MIMO peer fixed rate.
20545  */
20546 #define WMI_PEER_PARAM_UL_FIXED_RATE                    0x1b
20547 /** send specific OMI to peer via QoS-null frame
20548  * param_value = follow 11ax spec definition
20549  *               bit0:VHT(1), bit1:HE(1), bit2-31:A-Control
20550  */
20551 #define WMI_PEER_PARAM_XMIT_OMI                         0x1c
20552 #define WMI_PEER_RARAM_XMIT_OMI WMI_PEER_PARAM_XMIT_OMI /* alias due to prior typo */
20553 
20554 /* Disable burst and assist */
20555 #define WMI_PEER_PARAM_DISABLE_AGGRESSIVE_TX            0x1d
20556 /* Enable 11r FT Roaming */
20557 #define  WMI_PEER_PARAM_ENABLE_FT                       0x1e
20558 /* update peer flag for ptk 4 way handshake */
20559 #define  WMI_PEER_PARAM_NEED_PTK_4_WAY                  0x1f
20560 /* update peer flag for gtk 2 way handshake */
20561 #define  WMI_PEER_PARAM_NEED_GTK_2_WAY                  0x20
20562 /* update peer flag for M4 sent */
20563 #define  WMI_PEER_PARAM_M4_SENT                         0x21
20564 
20565 /* Per peer MISC stats enable or disable */
20566 #define  WMI_PEER_PARAM_MISC_STATS_ENABLE               0x22
20567 
20568 /* Per peer FW congestion enable or disable:
20569  * A parameter value of 1 will disable FW tx congestion control for the peer,
20570  * a parameter value 0f 0 will enable FW tx congestion control for the peer.
20571  */
20572 #define  WMI_PEER_PARAM_FW_CONGESTION_DISABLE           0x23
20573 
20574 /* Per peer dynamically change max Nss limit in supported tx modes.
20575  * Whereas WMI_PEER_NSS cmd needs to reset PER tables and start peer rate
20576  * control again.
20577  * Currently supported only for 2x2 case, and also only supports setting
20578  * all NSS up to current NSS.
20579  * Mask is used so we can extend in future if needed.
20580  *
20581  *  Expected values in bits:
20582  *  00: Use autorate
20583  *  01: Enable only 1SS
20584  *  10: Enable only 2SS
20585  *  11: Disable NSS clamp feature or Fallback to autorate
20586  */
20587 #define WMI_PEER_PARAM_DYN_NSS_EN_MASK                 0x24
20588 
20589 /* Per peer enable/disable RTS/CTS for unicast management frames.
20590  * Enabling RTS/CTS only applicable after association process of the peer.
20591  * Currently supported for spruce(2x2) chipset.
20592  * Expected values:
20593  * 0 : Disable RTS/CTS for unicast management frames.
20594  * 1 : Enable  RTS/CTS for unicast management frames.
20595  */
20596 #define WMI_PEER_PARAM_EN_RTSCTS_FOR_UNICAST_MGMT      0x25
20597 
20598 /** mimo ps values for the parameter WMI_PEER_MIMO_PS_STATE  */
20599 #define WMI_PEER_MIMO_PS_NONE                          0x0
20600 #define WMI_PEER_MIMO_PS_STATIC                        0x1
20601 #define WMI_PEER_MIMO_PS_DYNAMIC                       0x2
20602 
20603 /*
20604  * Each bit indicates one 20 MHz subchannel is punctured or not.
20605  * A bit in the bitmap is set to 1 to indicate that the corresponding 20 MHz
20606  * subchannel is not punctured and is set to 0 to indicate that it is punctured.
20607  */
20608 #define WMI_PEER_PUNCTURE_20MHZ_BITMAP                 0x26
20609 
20610 #define WMI_PEER_CHWIDTH_PUNCTURE_BITMAP_GET_CHWIDTH(value32)          WMI_GET_BITS(value32, 0x0, 8)
20611 #define WMI_PEER_CHWIDTH_PUNCTURE_BITMAP_GET_PUNCTURE_BMAP(value32)    WMI_GET_BITS(value32, 0x8, 16)
20612 /*
20613  * peer channel bandwidth and puncture_bitmap
20614  * BIT 0-7  -  Peer channel width
20615  *             This bitfield holds a wmi_channel_width enum value.
20616  * BIT 8-23 -  Peer Puncture bitmap where each bit indicates whether
20617  *             a 20 MHz BW is punctured.
20618  *             The variable should be read from left, LSb (bit 8) will
20619  *             represent the lowest-frequency 20 MHz portion.
20620  *             Bit value: 0 - 20 MHz channel is punctured, 1 - not punctured
20621  */
20622 #define WMI_PEER_CHWIDTH_PUNCTURE_20MHZ_BITMAP         0x27
20623 
20624 #define WMI_PEER_SET_TX_POWER                          0x28
20625 
20626 #define WMI_PEER_FT_ROAMING_PEER_UPDATE                0x29
20627 
20628 #define WMI_PEER_PARAM_DMS_SUPPORT                     0x2A
20629 
20630 #define WMI_PEER_PARAM_UL_OFDMA_RTD                    0x2B
20631 
20632 typedef struct {
20633     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_param_cmd_fixed_param */
20634     /** unique id identifying the VDEV, generated by the caller */
20635     A_UINT32 vdev_id;
20636     /** peer MAC address */
20637     wmi_mac_addr peer_macaddr;
20638     /** parameter id   */
20639     A_UINT32 param_id;
20640     /** parameter value */
20641     A_UINT32 param_value;
20642 } wmi_peer_set_param_cmd_fixed_param;
20643 
20644 typedef union {
20645     /*
20646      * The A_UINT16 "mode" and "tx_rate" fields can only be directly used
20647      * by the target or a little-endian host.
20648      * A big-endian host needs to use the WMI_PEER_MAX_MIN_TX_xxx_GET/SET
20649      * macros on the A_UINT32 "value" field.
20650      */
20651     struct {
20652         A_UINT16 mode; /* 0:CCK, 1:OFDM, 2:HT, 3:VHT (see WMI_RATE_PREAMBLE) */
20653         A_UINT16 tx_rate; /* see per-mode specs below */
20654     };
20655     A_UINT32 value; /* for use by big-endian host */
20656 } wmi_peer_max_min_tx_rate;
20657 
20658 /*
20659  * Any access to the mode/tx_rate in an big endian system should use
20660  * the below Macros on the wmi_peer_max_min_tx_rate.value field.
20661  */
20662 #define WMI_PEER_MAX_MIN_TX_MODE_GET(value32) WMI_GET_BITS(value32, 0, 16)
20663 #define WMI_PEER_MAX_MIN_TX_MODE_SET(value32, tx_mode) WMI_SET_BITS(value32, 0, 16, tx_mode)
20664 
20665 #define WMI_PEER_MAX_MIN_TX_RATE_GET(value32) WMI_GET_BITS(value32, 16, 16)
20666 #define WMI_PEER_MAX_MIN_TX_RATE_SET(value32, tx_mode) WMI_SET_BITS(value32, 16, 16, tx_mode)
20667 
20668 /*   CCK max/min tx Rate description
20669  *   tx_rate = 0:  1   Mbps
20670  *   tx_rate = 1:  2   Mbps
20671  *   tx_rate = 2:  5.5 Mbps
20672  *   tx_rate = 3: 11   Mbps
20673  *   tx_rate = else: invalid
20674  */
20675 enum {
20676     WMI_MAX_CCK_TX_RATE_1M,       /* up to 1M CCK Rate available */
20677     WMI_MAX_CCK_TX_RATE_2M,       /* up to 2M CCK Rate available */
20678     WMI_MAX_CCK_TX_RATE_5_5M,     /* up to 5.5M CCK Rate available */
20679     WMI_MAX_CCK_TX_RATE_11M,      /* up to 11M CCK Rate available */
20680     WMI_MAX_CCK_TX_RATE = WMI_MAX_CCK_TX_RATE_11M,
20681 };
20682 
20683 /*   OFDM max/min tx Rate description
20684  *   tx_rate = 0:  6 Mbps
20685  *   tx_rate = 1:  9 Mbps
20686  *   tx_rate = 2: 12 Mbps
20687  *   tx_rate = 3: 18 Mbps
20688  *   tx_rate = 4: 24 Mbps
20689  *   tx_rate = 5: 32 Mbps
20690  *   tx_rate = 6: 48 Mbps
20691  *   tx_rate = 7: 54 Mbps
20692  *   tx_rate = else: invalid
20693  */
20694 enum {
20695     WMI_MAX_OFDM_TX_RATE_6M,      /* up to 6M OFDM Rate available */
20696     WMI_MAX_OFDM_TX_RATE_9M,      /* up to 9M OFDM Rate available */
20697     WMI_MAX_OFDM_TX_RATE_12M,     /* up to 12M OFDM Rate available */
20698     WMI_MAX_OFDM_TX_RATE_18M,     /* up to 18M OFDM Rate available */
20699     WMI_MAX_OFDM_TX_RATE_24M,     /* up to 24M OFDM Rate available */
20700     WMI_MAX_OFDM_TX_RATE_36M,     /* up to 36M OFDM Rate available */
20701     WMI_MAX_OFDM_TX_RATE_48M,     /* up to 48M OFDM Rate available */
20702     WMI_MAX_OFDM_TX_RATE_54M,     /* up to 54M OFDM Rate available */
20703     WMI_MAX_OFDM_TX_RATE = WMI_MAX_OFDM_TX_RATE_54M,
20704 };
20705 
20706 /*   HT max/min tx rate description
20707  *    tx_rate = 0~7 : MCS Rate 0~7
20708  *    tx_rate=else : invalid.
20709  */
20710 #define WMI_MAX_HT_TX_MCS 0x07
20711 
20712 /*   VHT max/min tx rate description
20713  *    tx_rate = 0~9 : MCS Rate 0~9
20714  *    tx_rate=else : invalid.
20715  */
20716 #define WMI_MAX_VHT_TX_MCS 0x09
20717 
20718 
20719 #define MAX_SUPPORTED_RATES 128
20720 
20721 typedef struct {
20722     /** total number of rates */
20723     A_UINT32 num_rates;
20724     /**
20725      * rates (each 8bit value) packed into a 32 bit word.
20726      * the rates are filled from least significant byte to most
20727      * significant byte.
20728      */
20729     A_UINT32 rates[(MAX_SUPPORTED_RATES / 4) + 1];
20730 } wmi_rate_set;
20731 
20732 /* NOTE: It would bea good idea to represent the Tx MCS
20733  * info in one word and Rx in another word. This is split
20734  * into multiple words for convenience
20735  */
20736 typedef struct {
20737     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vht_rate_set */
20738     A_UINT32 rx_max_rate; /* Max Rx data rate */
20739     A_UINT32 rx_mcs_set; /* Negotiated RX VHT rates */
20740     A_UINT32 tx_max_rate; /* Max Tx data rate */
20741     /*
20742      *  bit [15:0]  indicates MCS 0 to 9
20743      *  bit [23:16] indicates MCS 10 & 11
20744      *  bit [24]    indicates whether MCS 10 & 11 is notified in bit [23:16]
20745      */
20746     A_UINT32 tx_mcs_set; /* Negotiated TX VHT rates */
20747     A_UINT32 tx_max_mcs_nss;  /* b0-b3: max mcs idx; b4-b7: max nss */
20748 } wmi_vht_rate_set;
20749 
20750 /* NOTE: It would bea good idea to represent the Tx MCS
20751  * info in one word and Rx in another word. This is split
20752  * into multiple words for convenience
20753  * currently this is being defined in IEEE802.11ax so this is same as wmi_vht_rate_set and is  sub change in future and may include BW as well
20754  */
20755 typedef struct {
20756     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_he_rate_set */
20757     /* HE Supported MCS Set field Rx
20758      * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
20759      *    value 0 - MCS 0-7 enabled for this NSS
20760      *    value 1 - MCS 0-9 enabled for this NSS
20761      *    value 2 - MCS 0-11 enabled for this NSS
20762      *    value 3 - NSS disabled
20763      * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
20764      */
20765     A_UINT32 rx_mcs_set; /* Negotiated RX HE rates (i.e. rate this node can RX from peer)*/
20766     /* HE Supported MCS Set field Tx
20767      * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
20768      *    value 0 - MCS 0-7 enabled for this NSS
20769      *    value 1 - MCS 0-9 enabled for this NSS
20770      *    value 2 - MCS 0-11 enabled for this NSS
20771      *    value 3 - NSS disabled
20772      *   WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
20773      *
20774      * - 8 bits x 2 are used for each Nss value for 2 categories of bandwidths,
20775      *   to indicate whether MCS 12 and 13 are enabled.
20776      *    Bits [16:23] used for checking if MCS 12/13 is enabled for a
20777      *        particular NSS (BW <= 80MHz)
20778      *    Bits [24:31] used for checking if MCS 12/13 is enabled for a
20779      *        particular NSS (BW > 80MHz)
20780      *   The WMI_HE_EXTRA_MCS_SS_[GET,SET] macros can be used for accessing
20781      *   these bit-fields.
20782      */
20783     A_UINT32 tx_mcs_set; /* Negotiated TX HE rates(i.e. rate this node can TX to peer) */
20784 } wmi_he_rate_set;
20785 
20786 typedef struct {
20787     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_eht_rate_set */
20788     /*
20789      * B0-B3   indicates max NSS that supports mcs 0-7
20790      * B4-B7   indicates max NSS that supports mcs 8-9
20791      * B8-B11  indicates max NSS that supports mcs 10-11
20792      * B12-B15 indicates max NSS that supports mcs 12-13
20793      * B16-B31 reserved
20794      */
20795     A_UINT32 rx_mcs_set; /* Rx max NSS set */
20796     A_UINT32 tx_mcs_set; /* Tx max NSS set */
20797 } wmi_eht_rate_set;
20798 
20799 /*
20800  * IMPORTANT: Make sure the bit definitions here are consistent
20801  * with the ni_flags definitions in wlan_peer.h
20802  */
20803 #define WMI_PEER_AUTH            0x00000001  /* Authorized for data */
20804 #define WMI_PEER_QOS             0x00000002  /* QoS enabled */
20805 #define WMI_PEER_NEED_PTK_4_WAY  0x00000004  /* Needs PTK 4 way handshake for authorization */
20806 #define WMI_PEER_GK_INST         0x00000008  /* group Key Installed */
20807 #define WMI_PEER_NEED_GTK_2_WAY  0x00000010  /* Needs GTK 2 way handshake after 4-way handshake */
20808 #define WMI_PEER_PRIV            0x00000020  /* Encryption Enabled */
20809 #define WMI_PEER_PK_INST         0x00000040  /* Pairwise Key Installed */
20810 #define WMI_PEER_TKIP_CM_ENABLED 0x00000080  /* TKIP CounterMeasures */
20811 #define WMI_PEER_SW_DEMIC_FRAG   0x00000100  /* S/W Demic of Frag Train */
20812 #define WMI_PEER_CCX_ENABLED     0x00000200  /* CCX enabled */
20813 #define WMI_PEER_HE              0x00000400  /* HE Enabled */
20814 #define WMI_PEER_APSD            0x00000800  /* U-APSD power save enabled */
20815 #define WMI_PEER_HT              0x00001000  /* HT enabled */
20816 #define WMI_PEER_40MHZ           0x00002000  /* 40MHz enabld */
20817 #define WMI_PEER_INTER_BSS_PEER  0x00004000  /* Inter BSS peer */
20818 #define WMI_PEER_STBC            0x00008000  /* STBC Enabled */
20819 #define WMI_PEER_LDPC            0x00010000  /* LDPC ENabled */
20820 #define WMI_PEER_DYN_MIMOPS      0x00020000  /* Dynamic MIMO PS Enabled */
20821 #define WMI_PEER_STATIC_MIMOPS   0x00040000  /* Static MIMO PS enabled */
20822 #define WMI_PEER_DIS_MIMOPS      0x00080000  /* MIMO PS DISABLED */
20823 #define WMI_PEER_SPATIAL_EXP     0x00100000  /* Enable spatial expansion for
20824                                               * single stream rates to avoid
20825                                               * unintentional beamforming */
20826 #define WMI_PEER_SPATIAL_MUX     0x00200000  /* SM Enabled */
20827 #define WMI_PEER_TWT_REQ         0x00400000  /* TWT Requester Support bit in Extended Capabilities element */
20828 #define WMI_PEER_TWT_RESP        0x00800000  /* TWT Responder Support bit in Extended Capabilities element */
20829 #define WMI_PEER_MULTI_BSSID     0x01000000  /* Multiple BSSID Support bit in Extended Capabilities element */
20830 #define WMI_PEER_VHT             0x02000000  /* VHT Enabled */
20831 #define WMI_PEER_80MHZ           0x04000000  /* 80MHz enabld */
20832 #define WMI_PEER_PMF             0x08000000  /* Robust Management Frame Protection enabled */
20833 #define WMI_PEER_F_PS_PRESEND_REQUIRED 0x10000000 /* Use this flag to avoid calling powersave API when STA is awake */
20834 #define WMI_PEER_IS_P2P_CAPABLE  0x20000000  /* P2P capable peer */
20835 #define WMI_PEER_160MHZ          0x40000000  /* 160 MHz enabled */
20836 #define WMI_PEER_SAFEMODE_EN     0x80000000  /* Fips Mode Enabled */
20837 
20838 /** define for peer_flags_ext */
20839 #define WMI_PEER_EXT_EHT         0x00000001  /* EHT enabled */
20840 #define WMI_PEER_EXT_320MHZ      0x00000002  /* 320Mhz enabled */
20841 #define WMI_PEER_EXT_DMS_CAPABLE 0x00000004
20842 #define WMI_PEER_EXT_HE_CAPS_6GHZ_VALID        0x00000008  /* param he_caps_6ghz is valid or not */
20843 #define WMI_PEER_EXT_IS_QUALCOMM_NODE 0x00000010 /* Indicates if the peer connecting is a qualcomm node */
20844 #define WMI_PEER_EXT_IS_MESH_NODE 0x00000020 /* Indicates if the peer connecting is a mesh node */
20845 #define WMI_PEER_EXT_F_CRIT_PROTO_HINT_ENABLED 0x40000000
20846 
20847 /**
20848  * Peer rate capabilities.
20849  *
20850  * This is of interest to the ratecontrol
20851  * module which resides in the firmware. The bit definitions are
20852  * consistent with that defined in if_athrate.c.
20853  *
20854  * @todo
20855  * Move this to a common header file later so there is no need to
20856  * duplicate the definitions or maintain consistency.
20857  */
20858 #define WMI_RC_DS_FLAG          0x01    /* Dual stream flag */
20859 #define WMI_RC_CW40_FLAG        0x02    /* CW 40 */
20860 #define WMI_RC_SGI_FLAG         0x04    /* Short Guard Interval */
20861 #define WMI_RC_HT_FLAG          0x08    /* HT */
20862 #define WMI_RC_RTSCTS_FLAG      0x10    /* RTS-CTS */
20863 #define WMI_RC_TX_STBC_FLAG     0x20    /* TX STBC */
20864 #define WMI_RC_TX_STBC_FLAG_S   5       /* TX STBC */
20865 #define WMI_RC_RX_STBC_FLAG     0xC0    /* RX STBC ,2 bits */
20866 #define WMI_RC_RX_STBC_FLAG_S   6       /* RX STBC ,2 bits */
20867 #define WMI_RC_WEP_TKIP_FLAG    0x100   /* WEP/TKIP encryption */
20868 #define WMI_RC_TS_FLAG          0x200   /* Three stream flag */
20869 #define WMI_RC_UAPSD_FLAG       0x400   /* UAPSD Rate Control */
20870 
20871 enum WMI_PEER_STA_TYPE {
20872     WMI_PEER_STA_TYPE_INVALID                 = 0, /* Invalid type*/
20873     WMI_PEER_STA_TYPE_ONLY_STAVDEV            = 1, /* AP has only STAVDEV and APVDEV is not present on any radio */
20874     WMI_PEER_STA_TYPE_APVDEV_ON_OTHER_RADIO   = 2, /* AP has STAVDEV on one radio and APVDEV on other radios */
20875     WMI_PEER_STA_TYPE_FH_APVDEV_ON_SAME_RADIO = 3, /* AP has STAVDEV and APVDEV on same radio. During STAVDEV connection,
20876                                                     * no repeater client is connected with this repeater APVDEV
20877                                                     */
20878     WMI_PEER_STA_TYPE_BH_APVDEV_ON_SAME_RADIO = 4, /* AP has STAVDEV and APVDEV on same radio. During STAVDEV connection,
20879                                                     * at least one repeater client is connected with this repeater APVDEV
20880                                                     * (daisy chain config)
20881                                                     */
20882 };
20883 
20884 #define WMI_PEER_STA_TYPE_GET(dword)        WMI_GET_BITS(dword, 0, 8)
20885 #define WMI_PEER_STA_TYPE_SET(dword, value) WMI_SET_BITS(dword, 0, 8, value)
20886 
20887 #define WMI_PEER_ASSOC_BSS_MAX_IDLE_OPTION_BITPOS  (0)
20888 #define WMI_PEER_ASSOC_BSS_MAX_IDLE_OPTION_MASK    (0x1 << WMI_PEER_ASSOC_BSS_MAX_IDLE_OPTION_BITPOS)
20889 #define WMI_PEER_ASSOC_SET_BSS_MAX_IDLE_OPTION(_dword, _val) \
20890     WMI_SET_BITS(_dword, WMI_PEER_ASSOC_BSS_MAX_IDLE_OPTION_BITPOS, 1, _val)
20891 #define WMI_PEER_ASSOC_GET_BSS_MAX_IDLE_OPTION(_dword) \
20892     WMI_GET_BITS(_dword, WMI_PEER_ASSOC_BSS_MAX_IDLE_OPTION_BITPOS, 1)
20893 
20894 #define WMI_PEER_ASSOC_BSS_MAX_IDLE_PERIOD_BITPOS  (16)
20895 #define WMI_PEER_ASSOC_BSS_MAX_IDLE_PERIOD_MASK    (0xFFFF << WMI_PEER_ASSOC_BSS_MAX_IDLE_PERIOD_BITPOS)
20896 #define WMI_PEER_ASSOC_SET_BSS_MAX_IDLE_PERIOD(_dword, _val) \
20897     WMI_SET_BITS(_dword, WMI_PEER_ASSOC_BSS_MAX_IDLE_PERIOD_BITPOS, 16, _val)
20898 #define WMI_PEER_ASSOC_GET_BSS_MAX_IDLE_PERIOD(_dword) \
20899     WMI_GET_BITS(_dword, WMI_PEER_ASSOC_BSS_MAX_IDLE_PERIOD_BITPOS, 16)
20900 
20901 typedef struct {
20902     A_UINT32 tlv_header; /** TLV tag (MITLV_TAG_STRUC_wmi_peer_assoc_mlo_partner_link_params) and len */
20903     A_UINT32 vdev_id; /** unique id identifying the VDEV, generated by the caller. Set to 0xFFFFFFFF if no vdev is allocated. */
20904     A_UINT32 hw_mld_link_id; /** Unique link id across SOCs, got as part of QMI handshake. */
20905     wmi_mlo_flags mlo_flags;  /** MLO flags */
20906     A_UINT32 logical_link_index; /** Unique index for links of the mlo. Starts with Zero */
20907     A_UINT32 ieee_link_id;  /*link id in the 802.11 frames*/
20908     wmi_mac_addr bss_id;
20909     wmi_channel wmi_chan;
20910     wmi_mac_addr self_mac;
20911 } wmi_peer_assoc_mlo_partner_link_params;
20912 
20913 /* This TLV structure used to pass mlo Parameters on peer assoc, only apply for mlo-peers */
20914 typedef struct {
20915     A_UINT32 tlv_header; /** TLV tag and len; */
20916     /** MLO flags */
20917     wmi_mlo_flags mlo_flags;
20918     /** MLD MAC address */
20919     wmi_mac_addr mld_macaddr;
20920     /** Unique index for links of the mlo. Starts with Zero */
20921     A_UINT32 logical_link_index;
20922     /** ML Peer ID
20923      * In WIN systems, mld_peer_id is generated by Host.
20924      * In MCL systems, mld_peer_id will be set to invalid peer id.
20925      */
20926     A_UINT32 mld_peer_id;
20927     /** Link-ID of the AP to which STA is associated */
20928     A_UINT32 ieee_link_id;
20929     /** eMLSR transition timeout in microseconds */
20930     A_UINT32 emlsr_trans_timeout_us;
20931     /** eMLSR transition delay in microseconds */
20932     A_UINT32 emlsr_trans_delay_us;
20933     /** eMLSR padding delay in microseconds */
20934     A_UINT32 emlsr_padding_delay_us;
20935     union {
20936         /** Medium Synchronization Duration field in units of 32 microseconds */
20937         A_UINT32 msd_dur_subfield;
20938         /** DEPRECATED - DO NOT USE.
20939          * Medium Synchronization Duration in microseconds */
20940         A_UINT32 msd_dur_us;
20941     };
20942     /** Medium Synchronization OFDM ED Threshold */
20943     A_UINT32 msd_ofdm_ed_thr;
20944     /** Medium Synchronization Max Num of TXOPs */
20945     A_UINT32 msd_max_num_txops;
20946     /** max_num_simultaneous_links:
20947      * The maximum number of affiliated STAs in the non-AP MLD that
20948      * support simultaneous transmission or reception of frames.
20949      */
20950     A_UINT32 max_num_simultaneous_links;
20951     /** NSTR indication bitmap received in assoc req */
20952     A_UINT32 nstr_indication_bitmap;
20953 
20954     /** max num of active links recommended by AP or applications */
20955     A_UINT32 recommended_max_num_simultaneous_links;
20956 } wmi_peer_assoc_mlo_params;
20957 
20958 typedef struct {
20959     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_tid_to_link_map */
20960     A_UINT32 tlv_header;
20961 
20962     /**
20963      * A_UINT32
20964      *     WMI_TID_TO_LINK_MAP_TID_NUM_GET / WMI_TID_TO_LINK_MAP_TID_NUM_SET
20965      *     tid_num:5,
20966      *
20967      *     WMI_TID_TO_LINK_MAP_DIR_GET / WMI_TID_TO_LINK_MAP_DIR_SET
20968      *     dir:2,                 // 0 - DL, 1 - UL, 2 - BiDi
20969      *
20970      *     WMI_TID_TO_LINK_MAP_DEFAULT_MAPPING_GET /
20971      *         WMI_TID_TO_LINK_MAP_DEFAULT_MAPPING_SET
20972      *     default_link_mapping:1, // If this is set to 1, ignore
20973      *                             // link_mapping_mask for the specific tid
20974      *
20975      *     WMI_TID_TO_LINK_MAP_LINK_MASK_GET / WMI_TID_TO_LINK_MAP_LINK_MASK_SET
20976      *     link_mapping_mask:16,
20977      *
20978      *     rsvd:8;
20979      */
20980     A_UINT32 tid_to_link_map_info;
20981 } wmi_peer_assoc_tid_to_link_map;
20982 
20983 #define WMI_PDEV_MESH_RX_FILTER_GET(enable) WMI_GET_BITS(enable,0,1)
20984 #define WMI_PDEV_MESH_RX_FILTER_SET(enable,value) WMI_SET_BITS(enable,0,1,value)
20985 
20986 typedef struct {
20987     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_mesh_rx_filter_enable_fixed_param **/
20988     A_UINT32 tlv_header;
20989 
20990     A_UINT32 pdev_id;
20991     union {
20992         struct {
20993             A_UINT32 enable: 1, /** denotes enable/disable mesh rx filter, refer to WMI_PDEV_MESH_RX_FILTER_GET/SET macros */
20994                     reserved: 31;
20995         };
20996         A_UINT32 enable_word32;
20997     };
20998 
20999     /** Mac_Add for the RX filter **/
21000     wmi_mac_addr link_macaddr;
21001 } wmi_pdev_mesh_rx_filter_enable_fixed_param;
21002 
21003 
21004 /*
21005  * PEER assoc_flags for assoc complete:
21006  * Bit 0: Set for peer data flush
21007  */
21008 #define WMI_ASSOC_FLAG_FLUSH_PEER_DATA  0x00000001
21009 #define WMI_ASSOC_FLAG_FLUSH_PEER_DATA_GET(assoc_flags) WMI_GET_BITS(assoc_flags, 0, 1)
21010 #define WMI_ASSOC_FLAG_FLUSH_PEER_DATA_SET(assoc_flags, value) WMI_GET_BITS(assoc_flags, 0, 1, value)
21011 
21012 typedef struct {
21013     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_complete_cmd_fixed_param */
21014     /** peer MAC address */
21015     wmi_mac_addr peer_macaddr;
21016     /** VDEV id */
21017     A_UINT32 vdev_id;
21018     /** assoc = 1 reassoc = 0 */
21019     A_UINT32 peer_new_assoc;
21020     /** peer associd (16 bits) */
21021     A_UINT32 peer_associd;
21022     /** peer station flags: see definition above */
21023     A_UINT32 peer_flags;
21024     /** negotiated capabilities (lower 16 bits)*/
21025     A_UINT32 peer_caps;
21026     /** Listen interval */
21027     A_UINT32 peer_listen_intval;
21028     /** HT capabilities of the peer */
21029     A_UINT32 peer_ht_caps;
21030     /** maximum rx A-MPDU length */
21031     A_UINT32 peer_max_mpdu;
21032     /** mpdu density of the peer in usec(0 to 16) */
21033     A_UINT32 peer_mpdu_density;
21034     /** peer rate capabilities see flags above */
21035     A_UINT32 peer_rate_caps;
21036     /** num spatial streams */
21037     A_UINT32 peer_nss;
21038     /** VHT capabilities of the peer */
21039     A_UINT32 peer_vht_caps;
21040     /** phy mode */
21041     A_UINT32 peer_phymode;
21042     /** HT Operation Element of the peer. Five bytes packed in 2
21043      *  INT32 array and filled from lsb to msb.
21044      *  Note that the size of array peer_ht_info[] cannotbe changed
21045      *  without breaking WMI Compatibility. */
21046     A_UINT32 peer_ht_info[2];
21047     /** total number of negotiated legacy rate set. Also the sizeof
21048      *  peer_legacy_rates[] */
21049     A_UINT32 num_peer_legacy_rates;
21050     /** total number of negotiated ht rate set. Also the sizeof
21051      *  peer_ht_rates[] */
21052     A_UINT32 num_peer_ht_rates;
21053     /**
21054      * Bitmap providing the mapping of bandwidths to max Rx NSS for this peer
21055      * in VHT160 / VHT80+80 Mode.
21056      * As per the New IEEE 802.11 Update, the AP & Peer could advertise and
21057      * handshake with the Max Rx NSS differing for different bandwidths
21058      * instead of a single max Rx NSS Value.
21059      * Some QCA chipsets have to advertise a different max Rx NSS value for
21060      * 160 MHz and 80MHz.
21061      *
21062      *  bit[2:0] : Represents value of Rx NSS for VHT 160 MHz
21063      *  bit[5:3] : Represents value of Rx NSS for VHT 80_80 MHz -
21064      *             Extended NSS support
21065      *  bit[30:6]: Reserved
21066      *  bit[31]  : MSB(0/1): 1 in case of valid data sent from Host
21067      */
21068     A_UINT32 peer_bw_rxnss_override;
21069 
21070     /* 802.11ax capabilities */
21071     wmi_ppe_threshold peer_ppet;
21072     A_UINT32 peer_he_cap_info; /* protocol-defined HE / 11ax capability flags */
21073     A_UINT32 peer_he_ops; /* HE operation contains BSS color */
21074     A_UINT32 peer_he_cap_phy[WMI_MAX_HECAP_PHY_SIZE];
21075     A_UINT32 peer_he_mcs; /* Indicates number of HE MCS TLV present */
21076 
21077     /* 2nd DWORD of 11ax MAC Capabilities */
21078     A_UINT32 peer_he_cap_info_ext;
21079 
21080     /*
21081      * bit 0     : Indicated support for RX 1xLTF + 0.4us
21082      * bit 1     : Indicates support for RX 2xLTF + 0.4us
21083      * bit 2     : Indicates support for 2xLTF in 160/80+80 MHz HE PPDU
21084      * bit[4:3]  : Indicates support for DL OFDMA
21085      *             Refer to enum WMI_HE_RX_DL_OFDMA_SUPPORT_x
21086      * bit[6:5]  : Indicates support for DL MU-MIMO
21087      *             Refer to enum WMI_HE_RX_DL_MUMIMO_SUPPORT_x
21088      * bit[31:7] : Reserved
21089      * Refer to WMI_HE_CAP_xx_LTF_xxx_SUPPORT_GET/SET macros
21090      */
21091     A_UINT32 peer_he_cap_info_internal;
21092 
21093     /* min data rate to be used in Mbps */
21094     A_UINT32 min_data_rate;
21095 
21096     /** HE 6 GHz Band Capabilities of the peer.
21097      * (Defined in 9.4.2.261 HE 6 GHz Band Capabilities element in
21098      * 802.11ax_D5.0.)
21099      * valid when WMI_PEER_HE is set and WMI_PEER_VHT/HT are not set.
21100      */
21101     A_UINT32 peer_he_caps_6ghz;
21102 
21103     /* bit[0-7] : sta_type
21104      * bit[8-31]: reserved
21105      * Refer to enum WMI_PEER_STA_TYPE for sta_type values.
21106      * Refer to WMI_PEER_STA_TYPE_GET/SET macros.
21107      */
21108     A_UINT32 sta_type;
21109 
21110     /*
21111      * @bss_max_idle_option - Parameters exchanged for BSS Max Idle capability.
21112      * bit 0       : If set, only a protected frame indicates activity.
21113      *               If cleared, either an unprotected or a protected frame
21114      *               indicates activity.
21115      *               Refer to the WMI_PEER_ASSOC_[SET,GET]_BSS_MAX_IDLE_OPTION
21116      *               macros.
21117      * bit [1:15]  : Reserved
21118      * bit [16:31] : Max idle period in units of 1000 TUs
21119      *               Refer to the WMI_PEER_ASSOC_[SET,GET]_BSS_MAX_IDLE_PERIOD
21120      *               macros.
21121      */
21122     A_UINT32 bss_max_idle_option;
21123 
21124     /*
21125      * Connected AP auth mode values are from  WMI_AUTH_ enum.
21126      * The target shall ignore an auth_mode value of 0 / WMI_AUTH_NONE,
21127      * due to ambiguity whether a zero value was provided explicitly or
21128      * simply as a default.
21129      */
21130     A_UINT32 auth_mode;
21131 
21132     /* Refer to WMI_PEER_EXT_xxx defs */
21133     A_UINT32 peer_flags_ext;
21134 
21135     /* 802.11be capabilities and other params */
21136     A_UINT32 puncture_20mhz_bitmap; /* each bit indicates one 20Mhz bw puntured */
21137     /* EHT mac capabilities from BSS beacon EHT cap IE, total WMI_MAX_EHTCAP_MAC_SIZE*A_UINT32 bits */
21138     A_UINT32 peer_eht_cap_mac[WMI_MAX_EHTCAP_MAC_SIZE];
21139     /* EHT phy capabilities from BSS beacon EHT cap IE, total WMI_MAX_EHTCAP_PHY_SIZE*A_UINT32 bits */
21140     A_UINT32 peer_eht_cap_phy[WMI_MAX_EHTCAP_PHY_SIZE];
21141     A_UINT32 peer_eht_ops;
21142     wmi_ppe_threshold peer_eht_ppet;
21143     A_UINT32 assoc_flags;
21144 
21145 /* Following this struct are the TLV's:
21146  *     A_UINT8 peer_legacy_rates[];
21147  *     A_UINT8 peer_ht_rates[];
21148  *     wmi_vht_rate_set peer_vht_rates; <-- VHT capabilities of the peer
21149  *     WMI_he_rate_set_peer_he_rates; <-- HE capabilities of the peer
21150  *     wmi_peer_assoc_mlo_params  mlo_params[0,1]; <-- MLO parameters opt. TLV
21151  *         Only present for MLO peers.
21152  *         For non-MLO peers the array length should be 0.
21153  *     wmi_eht_rate_set peer_eht_rates; <-- EHT capabilities of the peer
21154  *     wmi_peer_assoc_mlo_partner_link_params link_info[] <-- partner link info
21155  *     wmi_peer_assoc_tid_to_link_map[] <-- tid to link_map info
21156  */
21157 } wmi_peer_assoc_complete_cmd_fixed_param;
21158 
21159 /* WDS Entry Flags */
21160 #define WMI_WDS_FLAG_STATIC    0x1    /* Disable aging & learning */
21161 
21162 typedef struct {
21163     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_add_wds_entry_cmd_fixed_param */
21164     /** peer MAC address */
21165     wmi_mac_addr peer_macaddr;
21166     /** wds MAC addr */
21167     wmi_mac_addr wds_macaddr;
21168     /* Flags associated with WDS entry - see WMI_WDS_FLAG defs */
21169     A_UINT32 flags;
21170     A_UINT32 vdev_id;
21171 } wmi_peer_add_wds_entry_cmd_fixed_param;
21172 
21173 #define WMI_CHAN_INFO_START_RESP 0
21174 #define WMI_CHAN_INFO_END_RESP 1
21175 /* deprecated but maintained as aliases: old names containing typo */
21176 #define WMI_CHAN_InFO_START_RESP WMI_CHAN_INFO_START_RESP
21177 #define WMI_CHAN_InFO_END_RESP   WMI_CHAN_INFO_END_RESP
21178 /* end deprecated */
21179 #define WMI_CHAN_INFO_ENTRY_RESP 2
21180 
21181 typedef struct {
21182     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_remove_wds_entry_cmd_fixed_param */
21183     /** wds MAC addr */
21184     wmi_mac_addr wds_macaddr;
21185     A_UINT32 vdev_id;
21186 } wmi_peer_remove_wds_entry_cmd_fixed_param;
21187 
21188 
21189 typedef struct {
21190     /** peer MAC address */
21191     wmi_mac_addr peer_macaddr;
21192 } wmi_peer_q_empty_callback_event;
21193 
21194 /*
21195  * Command to update an already existing WDS entry. Different address setting
21196  * combinations are possible.
21197  *
21198  * Valid wds and peer      -> Associated WDS entry peer ptr & flags will be updated.
21199  * Valid wds and null peer -> Associated WDS entry flags will be updated.
21200  * Null wds and Valid peer -> Flags will be updated for all WDS entries behind the peer.
21201  * Null wds and peer       -> Flags will be updated for all WDS entries.
21202  */
21203 typedef struct {
21204     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_update_wds_entry_cmd_fixed_param */
21205     /** peer MAC address */
21206     wmi_mac_addr peer_macaddr;
21207     /** wds MAC addr */
21208     wmi_mac_addr wds_macaddr;
21209     /* Flags associated with WDS entry */
21210     A_UINT32 flags;
21211     A_UINT32 vdev_id;
21212 } wmi_peer_update_wds_entry_cmd_fixed_param;
21213 
21214 /**
21215  * Channel info WMI event
21216  */
21217 typedef struct {
21218     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_info_event_fixed_param */
21219     /** Error code */
21220     A_UINT32 err_code;
21221     /** Channel freq */
21222     A_UINT32 freq;
21223     /** Read flags */
21224     A_UINT32 cmd_flags;
21225     /** Noise Floor value */
21226     A_UINT32 noise_floor;
21227     /** rx clear count */
21228     A_UINT32 rx_clear_count;
21229     /** cycle count */
21230     A_UINT32 cycle_count;
21231     /** channel tx power per range in 0.5dBm steps */
21232     A_UINT32 chan_tx_pwr_range;
21233     /** channel tx power per throughput */
21234     A_UINT32 chan_tx_pwr_tp;
21235     /** rx frame count (cumulative) */
21236     A_UINT32   rx_frame_count;
21237     /** BSS rx cycle count */
21238     A_UINT32 my_bss_rx_cycle_count;
21239     /** b-mode data rx time (units are microseconds) */
21240     A_UINT32 rx_11b_mode_data_duration;
21241     /** tx frame count */
21242     A_UINT32 tx_frame_cnt;
21243     /** mac clock */
21244     A_UINT32 mac_clk_mhz;
21245     /** unique id identifying the VDEV */
21246     A_UINT32 vdev_id;
21247     /**
21248      * Noise Floor value for all chain in dBm.
21249      * If per_chain_noise_floor value is 0 then it should be ignored.
21250      */
21251     A_UINT32 per_chain_noise_floor[WMI_MAX_CHAINS];
21252 
21253 /**
21254  * Following this structure is the optional TLV:
21255  * struct wmi_scan_blanking_params_info[0/1];
21256  * struct wmi_cca_busy_subband_info[];
21257  *     Reporting subband CCA busy info in host requested manner.
21258  */
21259 } wmi_chan_info_event_fixed_param;
21260 
21261 typedef struct {
21262     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_cca_busy_subband_info */
21263     A_UINT32 tlv_header;
21264     /** rx clear count */
21265     A_UINT32 rx_clear_count;
21266 } wmi_cca_busy_subband_info;
21267 
21268 /**
21269  * The below structure contains parameters related to the scan radio
21270  * blanking feature
21271  */
21272 typedef struct {
21273     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_blanking_params_info */
21274     A_UINT32 tlv_header;
21275     /* scan_radio_blanking_duration:
21276      * Cumulative scan disabled duration which indicates the total time in
21277      * micro seconds where rx blanking was enabled on the scan radio due to
21278      * simultaneous transmissions on the same band in the serving radio.
21279      */
21280     A_UINT32 scan_radio_blanking_duration;
21281     /* scan_radio_blanking_count:
21282      * Count of the number of times rx blanking was enabled on the scan radio
21283      * due to simultaneous transmissions on the same band in the serving radio.
21284      */
21285     A_UINT32 scan_radio_blanking_count;
21286 } wmi_scan_blanking_params_info;
21287 
21288 typedef enum {
21289     /* Blanking feature will be disabled */
21290     WMI_SCAN_BLANKING_DISABLED = 0,
21291 
21292     /* Blanking enabled only on current operating band */
21293     WMI_SCAN_BLANKING_ENABLED,
21294 
21295     /*
21296      * Blanking enabled on both 5GHz and 6GHz bands when scan radio
21297      * home channel is on either 5GHz or 6GHz bands
21298      */
21299     WMI_SCAN_BLANKING_ENABLED_NO_ISOLATION,
21300 
21301     WMI_SCAN_BLANKING_MAX,
21302 } WMI_SCAN_BLANKING_MODE;
21303 
21304 /**
21305  * The below three structures are the params used for converting RSSI
21306  * from dB to dBm units.
21307  */
21308 
21309 typedef struct {
21310     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_dbm_conversion_params_info */
21311     /* Current operating bandwidth as per wmi_channel_width */
21312     A_UINT32 curr_bw;
21313     /* Current rx chainmask */
21314     A_UINT32 curr_rx_chainmask;
21315     /* 3 Bytes of xbar_config are used for RF to BB mapping*/
21316     /* Samples of xbar_config,
21317      * If xbar_config is 0xFAC688(hex):
21318      *     RF chains 0-7 are connected to BB chains 0-7
21319      *     here,
21320      *         bits 0 to 2 = 0, maps BB chain 0 for RF chain 0
21321      *         bits 3 to 5 = 1, maps BB chain 1 for RF chain 1
21322      *         bits 6 to 8 = 2, maps BB chain 2 for RF chain 2
21323      *         bits 9 to 11 = 3, maps BB chain 3 for RF chain 3
21324      *         bits 12 to 14 = 4, maps BB chain 4 for RF chain 4
21325      *         bits 15 to 17 = 5, maps BB chain 5 for RF chain 5
21326      *         bits 18 to 20 = 6, maps BB chain 6 for RF chain 6
21327      *         bits 21 to 23 = 7, maps BB chain 7 for RF chain 7
21328      *
21329      * If xbar_config is 0x688FAC(hex):
21330      *     RF chains 0-3 are connected to BB chains 4-7
21331      *     RF chains 4-7 are connected to BB chains 0-3
21332      *     here,
21333      *         bits 0 to 2 = 4, maps BB chain 4 for RF chain 0
21334      *         bits 3 to 5 = 5, maps BB chain 5 for RF chain 1
21335      *         bits 6 to 8 = 6, maps BB chain 6 for RF chain 2
21336      *         bits 9 to 11 = 7, maps BB chain 7 for RF chain 3
21337      *         bits 12 to 14 = 0, maps BB chain 0 for RF chain 4
21338      *         bits 15 to 17 = 1, maps BB chain 1 for RF chain 5
21339      *         bits 18 to 20 = 2, maps BB chain 2 for RF chain 6
21340      *         bits 21 to 23 = 3, maps BB chain 3 for RF chain 7
21341      */
21342     A_UINT32 xbar_config;
21343     /* The below xlna_bypass params needed in old target architecture
21344      * generation, not applicable for current target architecture generation.
21345      * Values will be zero for current target architectures. */
21346     /* Low noise amplifier bypass offset; signed integer; units are in dB */
21347     A_INT32 xlna_bypass_offset;
21348     /* Low noise amplifier bypass threshold; signed integer; units are in dB */
21349     A_INT32 xlna_bypass_threshold;
21350     /* nf_hw_dbm:
21351      * 2D byte array of HW noise floor in dBm per chain, per 20MHz subband
21352      * This array is filled in little endian format.
21353      * for big-endian hosts, manual endian conversion is needed to obtain
21354      * correct sequence of values.
21355      */
21356     A_INT8 nf_hw_dbm[MAX_ANTENNA_EIGHT][MAX_20MHZ_SEGMENTS];
21357 } wmi_rssi_dbm_conversion_params_info;
21358 
21359 typedef struct {
21360     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_dbm_conversion_temp_offset_info */
21361     /**
21362      * RSSI offset based on the current temperature, signed integer,
21363      * units are in dB
21364      */
21365     A_INT32 rssi_temp_offset;
21366 } wmi_rssi_dbm_conversion_temp_offset_info;
21367 
21368 /**
21369  * RSSI dB to dBm conversion params event to host
21370  */
21371 typedef struct {
21372     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_dbm_conversion_fixed_param */
21373     /* PDEV id */
21374     A_UINT32 pdev_id;
21375     /**
21376      * Followed by these TLVs below.
21377      * wmi_rssi_dbm_conversion_params_info rssi_dbm_conversion_param[0 or 1]
21378      *     wmi_rssi_dbm_conversion_params_info will be sent in case of
21379      *     channel, BW, rx_chainmask change.
21380      * wmi_rssi_dbm_conversion_temp_offset_info rssi_temp_offset[0 or 1]
21381      *     wmi_rssi_dbm_conversion_temp_offset_info will be sent when the
21382      *     RSSI temp offset changes.
21383      */
21384 } wmi_rssi_dbm_conversion_params_info_event_fixed_param;
21385 
21386 /**
21387  * Non wlan interference event
21388  */
21389 typedef struct {
21390     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wlan_dcs_cw_int */
21391     A_UINT32 channel; /* either number or freq in mhz*/
21392 } wlan_dcs_cw_int;
21393 #define ath_dcs_cw_int /* DEPRECATED */ wlan_dcs_cw_int /* alias */
21394 
21395 /**
21396  *  wlan_dcs_im_tgt_stats
21397  *
21398  */
21399 typedef struct _wlan_dcs_im_tgt_stats {
21400     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wlan_dcs_im_tgt_stats_t */
21401 
21402     /** current running TSF from the TSF-1 */
21403     A_UINT32 reg_tsf32;
21404 
21405     /** Known last frame RSSI, in case of multiple stations, if
21406      *  and at different ranges, this would not guarantee that
21407      *  this is the least RSSI.
21408      */
21409     A_UINT32 last_ack_rssi;
21410 
21411     /**  Sum of all the failed durations in the last one second interval.
21412      */
21413     A_UINT32 tx_waste_time;
21414     /** count how many times the hal_rxerr_phy is marked, in this
21415      *  time period
21416      */
21417     A_UINT32 rx_time;
21418     A_UINT32 phyerr_cnt;
21419 
21420     /**
21421      *  WLAN IM stats from target to host
21422      *
21423      *  Below statistics are sent from target to host periodically.
21424      *  These are collected at target as long as target is running
21425      *  and target chip is not in sleep.
21426      *
21427      */
21428 
21429     /** listen time from ANI */
21430     A_INT32 listen_time;
21431 
21432     /** tx frame count, MAC_PCU_TX_FRAME_CNT_ADDRESS */
21433     A_UINT32 reg_tx_frame_cnt;
21434 
21435     /** rx frame count, MAC_PCU_RX_FRAME_CNT_ADDRESS */
21436     A_UINT32 reg_rx_frame_cnt;
21437 
21438     /** rx clear count, MAC_PCU_RX_CLEAR_CNT_ADDRESS */
21439     A_UINT32 reg_rxclr_cnt;
21440 
21441     /** total cycle counts MAC_PCU_CYCLE_CNT_ADDRESS */
21442     A_UINT32 reg_cycle_cnt; /* delta cycle count */
21443 
21444     /** extension channel rx clear count  */
21445     A_UINT32 reg_rxclr_ext_cnt;
21446 
21447     /** OFDM phy error counts, MAC_PCU_PHY_ERR_CNT_1_ADDRESS */
21448     A_UINT32 reg_ofdm_phyerr_cnt;
21449 
21450     /** CCK phy error count, MAC_PCU_PHY_ERR_CNT_2_ADDRESS */
21451     A_UINT32 reg_cck_phyerr_cnt; /* CCK err count since last reset, read from register */
21452 
21453     /** Channel noise floor (units are dBm) */
21454     A_INT32 chan_nf;
21455 
21456     /** BSS rx cycle count */
21457     A_UINT32 my_bss_rx_cycle_count;
21458 } wlan_dcs_im_tgt_stats_t;
21459 
21460 typedef struct wlan_dcs_awgn_info {
21461     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_awgn_int_t */
21462     A_UINT32 tlv_header;
21463     /** Channel width (20, 40, 80, 80+80, 160, 320 ) enum wmi_channel_width */
21464     A_UINT32 channel_width;
21465     /** Primary channel frequency (MHz) */
21466     A_UINT32 chan_freq;
21467     /** center frequency (MHz) first segment */
21468     A_UINT32 center_freq0;
21469     /** center frequency (MHz) second segment */
21470     A_UINT32 center_freq1;
21471     /*
21472      * Indicates which 20MHz segments contain interference
21473      *  320 MHz: bits 0-15
21474      *  160 MHz: bits 0-7
21475      *   80 MHz: bits 0-3
21476      * Bitmap - Each bit position will indicate 20MHz in which
21477      * interference is seen. (Valid 16 bits out of 32 bit integer)
21478      * Note: for 11be, the interference present 20MHz can be punctured
21479      * for better channel utilization.
21480      */
21481     A_UINT32 chan_bw_interference_bitmap;
21482 } wmi_dcs_awgn_int_t;
21483 
21484 typedef struct wlan_dcs_obss_info {
21485     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_obss_int_t */
21486     A_UINT32 tlv_header;
21487     /** Channel width (20, 40, 80, 80+80, 160, 320) enum wmi_channel_width */
21488     A_UINT32 channel_width;
21489     /** Primary channel frequency (MHz) */
21490     A_UINT32 chan_freq;
21491     /** center frequency (MHz) first segment */
21492     A_UINT32 center_freq0;
21493     /** center frequency (MHz) second segment */
21494     A_UINT32 center_freq1;
21495     /* chan_bw_interference_bitmap:
21496      * Indicates which 20MHz segments contain interference
21497      *  320 MHz: bits 0-15
21498      *  160 MHz: bits 0-7
21499      *   80 MHz: bits 0-3
21500      * Within the bitmap, Bit-0 represents lowest 20Mhz, Bit-1 represents
21501      * second lowest 20Mhz and so on.
21502      * Each bit position will indicate 20MHz in which interference is seen.
21503      * (Valid 16 bits out of 32 bit integer)
21504      * Note: for 11be, the interference present 20MHz can be punctured
21505      * for better channel utilization.
21506      */
21507     A_UINT32 chan_bw_interference_bitmap;
21508 } wmi_dcs_obss_int_t;
21509 
21510 /**
21511  *  wmi_dcs_interference_event_t
21512  *
21513  *  Right now this is event and stats together. Partly this is
21514  *  because cw interference is handled in target now. This
21515  *  can be done at host itself, if we can carry the NF alone
21516  *  as a stats event. In future this would be done and this
21517  *  event would carry only stats.
21518  */
21519 typedef struct {
21520     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_interference_event_fixed_param */
21521     /**
21522      * Type of the event present, either the cw interference event, or the wlan_im stats, or AWGN int
21523      *  ATH_CAP_DCS_CWIM   0x01
21524      *  ATH_CAP_DCS_WLANIM 0x02
21525      *  ATH_CAP_DCS_AGWNIM 0x04
21526      *  reserved (AFC)     0x08
21527      *  ATH_CAP_DCS_OBSSIM 0x10
21528      */
21529     A_UINT32 interference_type; /* type of interference, wlan, cw, or AWGN */
21530     /** pdev_id for identifying the MAC
21531      * See macros starting with WMI_PDEV_ID_ for values.
21532      */
21533     A_UINT32 pdev_id;
21534     /** VDEV ID for identifying DCS stats reported at VDEV level.
21535      * Should be interpreted only when WMI_SERVICE_VDEV_DCS_STATS_SUPPORT
21536      * service cap is advertized by target.
21537      * And value would be 0xFF if DCS stats is still configured at PDEV level.
21538      */
21539     A_UINT32 vdev_id;
21540 /*
21541  * Following this struct are these TLVs. Note that they are both array of structures
21542  * but can have at most one element. Which TLV is empty or has one element depends
21543  * on the field interference_type. This is to emulate an union with cw_int and wlan_stat
21544  * elements (not arrays).     union { wlan_dcs_cw_int cw_int; wlan_dcs_im_tgt_stats_t   wlan_stat; } int_event;
21545  *
21546  *       wlan_dcs_cw_int            cw_int[];   <-- cw_interference event
21547  *       wlan_dcs_im_tgt_stats_t   wlan_stat[]; <-- wlan im interference stats
21548  *       wmi_dcs_awgn_int_t        awgn_int[];  <-- Additive white Gaussian noise (AWGN) interference
21549  *       wmi_dcs_obss_int_t        obss_int[];  <-- Overlapping Basic Service Set (OBSS) interference
21550  */
21551 } wmi_dcs_interference_event_fixed_param;
21552 
21553 enum wmi_peer_mcast_group_action {
21554     wmi_peer_mcast_group_action_add = 0,
21555     wmi_peer_mcast_group_action_del = 1
21556 };
21557 #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_M   0x1
21558 #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_S   0
21559 #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_M 0x2
21560 #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_S 1
21561 #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_M 0x4 /* flag to exclude an ip while filtering. set to exclude */
21562 #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_S 2
21563 #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_M 0x8 /* flag to say ipv4/ipv6. Will be set for ipv6 */
21564 #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_S 3
21565 #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_M 0x10 /* delete all mcast table entries. */
21566 #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_S 4
21567 
21568 /* multicast group membership commands */
21569 /* TODO: Converting this will be tricky since it uses an union.
21570  Also, the mac_addr is not aligned. We will convert to the wmi_mac_addr */
21571 typedef struct {
21572     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcast_group_cmd_fixed_param */
21573     A_UINT32 flags;
21574     wmi_mac_addr ucast_mac_addr;
21575     /* in network byte order */
21576     /* for ipv4, bytes (12-15) should contain ip address and other lower bytes 0. ipv6 should have all bytes valid */
21577     A_UINT8 mcast_ip_addr[16];
21578     /* for ipv6, all 16 bytes has to be valid; for ipv4 last 4 bytes(12-15) has to be valid, rest all 0s */
21579     A_UINT8 mcast_ip_mask[16];/* zero out lower bytes if ipv4*/
21580     /* number of address filters - irrespective of ipv4/ipv6 addresses */
21581     A_UINT32 num_filter_addr;
21582     /* this array should contain the src IPs that are to be filtered during find
21583        The array should be packed.
21584        If there are 2 ipv4 addresses, there should be 8 bytes and rest all 0s */
21585     A_UINT8 filter_addr[64]; /* 16 ipv4 addresses or 4 ipv6 addresses */
21586     A_UINT8  vdev_id; /* vdev of this mcast group */
21587 } wmi_peer_mcast_group_cmd_fixed_param;
21588 
21589 
21590 /** Offload Scan and Roaming related  commands */
21591 /** The FW performs 2 different kinds of offload scans independent
21592  *  of host. One is Roam scan which is primarily performed  on a
21593  *  station VDEV after association to look for a better AP that
21594  *  the station VDEV can roam to. The second scan is connect scan
21595  *  which is mainly performed when the station is not associated
21596  *  and to look for a matching AP profile from a list of
21597  *  configured profiles. */
21598 
21599 /* flags for roam_scan_mode_cmd
21600  * indicate the status (success/fail) of wmi_roam_scan_mode cmd through WMI_ROAM_EVENTID */
21601 #define WMI_ROAM_SCAN_MODE_FLAG_REPORT_STATUS  0x1
21602 
21603 /**
21604  * WMI_ROAM_SCAN_MODE: Set Roam Scan mode
21605  *   the roam scan mode is one of the periodic, RSSI change, both, none.
21606  *   None        : Disable Roam scan. No Roam scan at all.
21607  *   Periodic    : Scan periodically with a configurable period.
21608  *   Rssi change : Scan when ever RSSI to current AP changes by the threshold value
21609  *                 set by WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD command.
21610  *   Both        : Both of the above (scan when either period expires or rss to current AP changes by X amount)
21611  *
21612  */
21613 typedef struct {
21614     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_mode_fixed_param */
21615     A_UINT32 roam_scan_mode;
21616     A_UINT32 vdev_id;
21617     A_UINT32 flags; /* see WMI_ROAM_SCAN_MODE_FLAG defs */
21618     /*
21619      * Minimum duration allowed between two consecutive roam scans.
21620      * Roam scan is not allowed, if duration between two consecutive
21621      * roam scans is less than this time.
21622      */
21623     A_UINT32 min_delay_btw_scans; /* In msec */
21624     /*
21625      * Bitmask (with enum WMI_ROAM_TRIGGER_REASON_ID identifying the bit
21626      * positions) showing for which roam_trigger_reasons the
21627      * min_delay_btw_scans constraint should be applied.
21628      * 0x0 means there is no time restrictions between successive roam scans.
21629      */
21630     A_UINT32 min_delay_roam_trigger_reason_bitmask;
21631 } wmi_roam_scan_mode_fixed_param;
21632 
21633 #define WMI_ROAM_SCAN_MODE_NONE        0x0
21634 #define WMI_ROAM_SCAN_MODE_PERIODIC    0x1
21635 #define WMI_ROAM_SCAN_MODE_RSSI_CHANGE 0x2
21636 #define WMI_ROAM_SCAN_MODE_BOTH        0x3
21637 /* Note: WMI_ROAM_SCAN_MODE_ROAMOFFLOAD is one bit not conflict with LFR2.0 SCAN_MODE. */
21638 #define WMI_ROAM_SCAN_MODE_ROAMOFFLOAD 0x4
21639 
21640 
21641 typedef struct {
21642     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_cmd_fixed_param */
21643     A_UINT32 vdev_id;
21644     A_UINT32 command_arg;
21645 } wmi_roam_scan_cmd_fixed_param;
21646 
21647 #define WMI_ROAM_SCAN_STOP_CMD 0x1
21648 
21649 /** flags for WMI_ROAM_SCAN_RSSI_THRESHOLD command:
21650  *  BIT 0     -> Indicate High RSSI Trigger support is enabled for roaming
21651  *               from 5 GHz to 6 GHz Band
21652  *  BIT 1-31  -> Reserved
21653  */
21654 #define WMI_ROAM_SCAN_RSSI_THRESHOLD_FLAG_ROAM_HI_RSSI_EN_ON_5G 0x1
21655 
21656 /**
21657  * WMI_ROAM_SCAN_RSSI_THRESHOLD : set scan RSSI threshold
21658  *  scan RSSI threshold is the RSSI threshold below which the FW will start running Roam scans.
21659  * Applicable when WMI_ROAM_SCAN_MODE is not set to none.
21660  */
21661 typedef struct {
21662     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_threshold_fixed_param */
21663     /** unique id identifying the VDEV, generated by the caller */
21664     A_UINT32 vdev_id;
21665     /** roam scan RSSI threshold */
21666     A_UINT32 roam_scan_rssi_thresh;
21667     /** When using Hw generated beacon RSSI interrupts */
21668     A_UINT32 roam_rssi_thresh_diff;
21669     /** 5G scan max count */
21670     A_UINT32 hirssi_scan_max_count;
21671     /** 5G scan RSSI change threshold value */
21672     A_UINT32 hirssi_scan_delta;
21673     /** 5G scan upper bound */
21674     A_UINT32 hirssi_upper_bound;
21675     /** roam scan RSSI threshold for 5G band.
21676      *  offset from roam_scan_rssi_thres, in dB units
21677      */
21678     A_INT32 rssi_thresh_offset_5g;
21679     /** flags for WMI_ROAM_SCAN_RSSI_THRESHOLD Command */
21680     A_UINT32 flags; /* see WMI_ROAM_SCAN_RSSI_THRESHOLD_FLAG defs */
21681     /* The TLVs will follow.
21682      * wmi_roam_scan_extended_threshold_param extended_param;
21683      * wmi_roam_earlystop_rssi_thres_param earlystop_param;
21684      * wmi_roam_dense_thres_param dense_param;
21685      * wmi_roam_bg_scan_roaming_param bg_scan_param;
21686      * wmi_roam_data_rssi_roaming_param data_rssi_param;
21687      */
21688 } wmi_roam_scan_rssi_threshold_fixed_param;
21689 
21690 /**
21691  * WMI_ROAM_BTM_CONFIG_CMDID : set BTM (BSS Transition Management. 802.11v) offload config
21692  *  Applicable only when WMI_ROAM_SCAN_MODE is enabled with WMI_ROAM_SCAN_MODE_ROAMOFFLOAD
21693  */
21694 
21695 /**
21696  *  btm_config.flags
21697  *  BIT 0     : Enable/Disable the BTM offload.
21698  *  BIT 1-2   : Action on non matching candidate with cache. Used WMI_ROAM_BTM_OFLD_NON_MATCHING_CND_XXX
21699  *  BIT 3-5   : Roaming handoff decisions. Use WMI_ROAM_BTM_OFLD_CNDS_MATCH_XXX
21700  *  BIT 6     : Enable/Disable solicited BTM
21701  *  BIT 7     : Roam BTM candidates based on the roam score instead of BTM preferred value
21702  *  BIT 8     : BTM query preference over 11k neighbor report request
21703  *  BIT 9     : Send BTM query with preferred candidates list
21704  *  BIT 10    : Forward MBO BTM Request to Host if MBO ASSOC RETRY attribute is set
21705  *  BIT 11-31 : Reserved
21706  */
21707 #define WMI_ROAM_BTM_SET_ENABLE(flags, val)                        WMI_SET_BITS(flags, 0, 1, val)
21708 #define WMI_ROAM_BTM_GET_ENABLE(flags)                             WMI_GET_BITS(flags, 0, 1)
21709 #define WMI_ROAM_BTM_SET_NON_MATCHING_CND_ACTION(flags, val)       WMI_SET_BITS(flags, 1, 2, val)
21710 #define WMI_ROAM_BTM_GET_NON_MATCHING_CND_ACTION(flags)            WMI_GET_BITS(flags, 1, 2)
21711 #define WMI_ROAM_BTM_SET_CNDS_MATCH_CONDITION(flags, val)          WMI_SET_BITS(flags, 3, 3, val)
21712 #define WMI_ROAM_BTM_GET_CNDS_MATCH_CONDITION(flags)               WMI_GET_BITS(flags, 3, 3)
21713 #define WMI_ROAM_BTM_SET_SOLICITED_BTM_ENABLE(flags, val)          WMI_SET_BITS(flags, 6, 1, val)
21714 #define WMI_ROAM_BTM_GET_SOLICITED_BTM_ENABLE(flags)               WMI_GET_BITS(flags, 6, 1)
21715 #define WMI_ROAM_BTM_SET_CNDS_SELECT_BASED_ON_SCORE(flags, val)    WMI_SET_BITS(flags, 7, 1, val)
21716 #define WMI_ROAM_BTM_GET_CNDS_SELECT_BASED_ON_SCORE(flags)         WMI_GET_BITS(flags, 7, 1)
21717 #define WMI_ROAM_BTM_SET_BTM_QUERY_PREFERENCE_OVER_11K(flags, val) WMI_SET_BITS(flags, 8, 1, val)
21718 #define WMI_ROAM_BTM_GET_BTM_QUERY_PREFERENCE_OVER_11K(flags)      WMI_GET_BITS(flags, 8, 1)
21719 #define WMI_ROAM_BTM_SET_BTM_QUERY_WITH_CANDIDATE_LIST(flags, val) WMI_SET_BITS(flags, 9, 1, val)
21720 #define WMI_ROAM_BTM_GET_BTM_QUERY_WITH_CANDIDATE_LIST(flags)      WMI_GET_BITS(flags, 9, 1)
21721 #define WMI_ROAM_BTM_SET_FORWARD_MBO_ASSOC_RETRY_BTM_REQUEST_TO_HOST(flags, val)    WMI_SET_BITS(flags, 10, 1, val)
21722 #define WMI_ROAM_BTM_GET_FORWARD_MBO_ASSOC_RETRY_BTM_REQUEST_TO_HOST(flags)         WMI_GET_BITS(flags, 10, 1)
21723 
21724 
21725 /** WMI_ROAM_BTM_SET_NON_MATCHING_CNDS_ACTION definition: When BTM candidate is not matched with cache by WMI_ROAM_BTM_SET_CNDS_MATCH_CONDITION, determine what to do */
21726 #define WMI_ROAM_BTM_NON_MATCHING_CNDS_SCAN_CONSUME      0 /** Invoke roam scan and consume within firmware. Applicable only when ROAM_SCAN_MODE is enabled. If ROAM_SCAN_MODE is disabled, firmware won't scan and forward it to host */
21727 #define WMI_ROAM_BTM_NON_MATCHING_CNDS_NO_SCAN_FORWARD   1 /** Does not allow roam scan and forward BTM frame to host */
21728 /** reserved upto 3 */
21729 
21730 /** WMI_ROAM_BTM_SET_CNDS_MATCH_CONDITION definition: This is used to invoke WMI_ROAM_BTM_SET_NON_MATCHING_CND_ACTION when compared with cache. i.e this condition is not applied with fresh scan result */
21731 #define WMI_ROAM_BTM_CNDS_MATCH_EXACT                    0 /** Exactly matched with roam candidate list to BTM candidates */
21732 #define WMI_ROAM_BTM_CNDS_MATCH_AT_LEAST_TOP             1 /** At least one or more top priority bssid matched */
21733 /** reserved upto 7 */
21734 
21735 typedef struct {
21736     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_btm_config_fixed_param */
21737     A_UINT32 tlv_header;
21738     /** unique id identifying the VDEV on which BTM is enabled/disabled */
21739     A_UINT32 vdev_id;
21740     /** BTM configuration control flags */
21741     A_UINT32 flags;
21742     /*  BTM query timeout, unit: milliseconds
21743      *  valid value range: 1-10000,
21744      *  default value: 100 will be set if invalid value is given
21745      */
21746     A_UINT32 solicited_timeout_ms;
21747     /*  Maximum attempt of solicited BTM
21748      *  If continuous failure reach to this value, solicited BTM to current
21749      *  ESS will be disabled.
21750      *  valid value range: 1 - (2^32-1). (2^32)-1 means sending forever
21751      *  Default value: 3 will be set if invalid value is given
21752      */
21753     A_UINT32 max_attempt_cnt;
21754     /*  Time to stick to current AP after BTM, unit: seconds
21755      *  valid value range: 0 -(2^16-1).
21756      *  Either 0 or (2^16)-1 means stick to AP forever.
21757      *  Default value: 300 will be set if invalid value is given
21758      */
21759      A_UINT32 stick_time_seconds;
21760     /*  Disassoc time threshold in milliseconds
21761      *  This time threshold allows the target to judge whether the STA
21762      *  should can move to another AP immediately, or if the STA has time
21763      *  to calculate roaming candidates.
21764      *  If the disassoc_timer_threshold value is 0x0, the field should be
21765      *  disregarded.
21766      */
21767     A_UINT32 disassoc_timer_threshold;
21768     /*
21769      * Bitmask (with enum WMI_ROAM_TRIGGER_REASON_ID identifying the bit
21770      * positions) showing for which roam_trigger_reasons the
21771      * btm query needs to be sent.
21772      * If roam trigger reasons are unspecified, btm_bitmap will be 0x0.
21773      */
21774     A_UINT32 btm_bitmap;
21775     /*
21776      * Consider AP as roam candidate only if AP score is better than
21777      * btm_candidate_min_score for BTM roam trigger
21778      */
21779     A_UINT32 btm_candidate_min_score;
21780 } wmi_btm_config_fixed_param;
21781 
21782 #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_FIXED  0x0
21783 #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LINEAR 0x1
21784 #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LOG    0x2
21785 #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_EXP    0x3
21786 
21787 typedef struct {
21788     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_extended_threshold_param */
21789     A_UINT32 boost_threshold_5g; /** RSSI threshold above which 5GHz RSSI is favored */
21790     A_UINT32 penalty_threshold_5g; /** RSSI threshold below which 5GHz RSSI is penalized */
21791     A_UINT32 boost_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
21792     A_UINT32 boost_factor_5g; /** factor by which 5GHz RSSI is boosted */
21793     A_UINT32 penalty_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
21794     A_UINT32 penalty_factor_5g; /** factor by which 5GHz RSSI is penalized */
21795     A_UINT32 max_boost_5g; /** maximum boost that can be applied to a 5GHz RSSI */
21796     A_UINT32 max_penalty_5g; /** maximum penalty that can be applied to a 5GHz RSSI */
21797     A_UINT32 good_rssi_threshold; /**  RSSI below which roam is kicked in by background scan, although RSSI is still good */
21798 } wmi_roam_scan_extended_threshold_param;
21799 
21800 /**
21801  * WMI_ROAM_SCAN_PERIOD: period for roam scan.
21802  *  Applicable when the scan mode is Periodic or both.
21803  */
21804 typedef struct {
21805     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_period_fixed_param */
21806     /** unique id identifying the VDEV, generated by the caller */
21807     A_UINT32 vdev_id;
21808     /** roam scan period value */
21809     A_UINT32 roam_scan_period; /* units = milliseconds */
21810     /** Aging for Roam scans */
21811     A_UINT32 roam_scan_age;
21812     /** Inactivity monitoring time to consider device is in inactive state with data count is less than roam_inactive_count */
21813     A_UINT32 inactivity_time_period; /* units = milliseconds */
21814     /** Maximum allowed data packets count during inactivity_time_period */
21815     A_UINT32 roam_inactive_count;
21816     /** New roam scan period after device is in inactivity state */
21817     A_UINT32 roam_scan_period_after_inactivity; /* units = milliseconds */
21818     /** roam full scan period value */
21819     A_UINT32 roam_full_scan_period; /* units = milliseconds */
21820 } wmi_roam_scan_period_fixed_param;
21821 
21822 /**
21823  * WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD : RSSI delta to trigger the roam scan.
21824  *   Rssi change threshold used when mode is Rssi change (or) Both.
21825  *   The FW will run the roam scan when ever the RSSI changes (up or down) by the value set by this parameter.
21826  *   Note scan is triggered based on the RSSI threshold condition set by WMI_ROAM_SCAN_RSSI_THRESHOLD
21827  */
21828 typedef struct {
21829     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_change_threshold_fixed_param */
21830     /** unique id identifying the VDEV, generated by the caller */
21831     A_UINT32 vdev_id;
21832     /** roam scan RSSI change threshold value */
21833     A_UINT32 roam_scan_rssi_change_thresh;
21834     /** When using Hw generated beacon RSSI interrupts */
21835     A_UINT32 bcn_rssi_weight;
21836     /** Minimum delay between two 5G scans */
21837     A_UINT32 hirssi_delay_btw_scans;
21838 } wmi_roam_scan_rssi_change_threshold_fixed_param;
21839 
21840 #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_NONE 0x1
21841 #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_STATIC 0x2
21842 #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_DYNAMIC 0x3
21843 
21844 #define WMI_ROAM_SCAN_LIST_FLAG_FLUSH_STATIC 0x1 /* Flush static roam scan channel list in FW */
21845 #define WMI_ROAM_SCAN_LIST_FLAG_FLUSH_DYNAMIC 0x2 /* Flush dynamic roam scan channel list in FW */
21846 
21847 /**
21848  * TLV for roaming channel list
21849  */
21850 typedef struct {
21851     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_chan_list_fixed_param */
21852     /** unique id identifying the VDEV, generated by the caller */
21853     A_UINT32 vdev_id;
21854     /** WMI_CHAN_LIST_TAG */
21855     A_UINT32 chan_list_type;
21856     /** # if channels to scan */
21857     A_UINT32 num_chan;
21858     A_UINT32 flags; /* refer to WMI_ROAM_SCAN_LIST_FLAG_xxx defs */
21859 /**
21860  * TLV (tag length value) parameters follow the wmi_roam_chan_list
21861  * structure. The TLV's are:
21862  *     A_UINT32 channel_list[]; // in MHz
21863  **/
21864 } wmi_roam_chan_list_fixed_param;
21865 
21866 /** Authentication modes */
21867 enum {
21868     WMI_AUTH_NONE, /* no upper level auth */
21869     WMI_AUTH_OPEN, /* open */
21870     WMI_AUTH_SHARED, /* shared-key */
21871     WMI_AUTH_8021X, /* 802.1x */
21872     WMI_AUTH_AUTO, /* Auto */
21873     WMI_AUTH_WPA, /* WPA */
21874     WMI_AUTH_RSNA, /* WPA2/RSNA */
21875     WMI_AUTH_CCKM, /* CCKM */
21876     WMI_AUTH_WAPI, /* WAPI */
21877     WMI_AUTH_AUTO_PSK,
21878     WMI_AUTH_WPA_PSK,
21879     WMI_AUTH_RSNA_PSK,
21880     WMI_AUTH_WAPI_PSK,
21881     WMI_AUTH_FT_RSNA, /* 11r FT */
21882     WMI_AUTH_FT_RSNA_PSK,
21883     WMI_AUTH_RSNA_PSK_SHA256,
21884     WMI_AUTH_RSNA_8021X_SHA256,
21885     WMI_AUTH_CCKM_WPA,
21886     WMI_AUTH_CCKM_RSNA,
21887     WMI_AUTH_RSNA_FILS_SHA256,
21888     WMI_AUTH_RSNA_FILS_SHA384,
21889     WMI_AUTH_RSNA_SUITE_B_8021X_SHA256,
21890     WMI_AUTH_RSNA_SUITE_B_8021X_SHA384,
21891     WMI_AUTH_FT_RSNA_SAE,
21892     WMI_AUTH_FT_RSNA_SUITE_B_8021X_SHA384,
21893     WMI_AUTH_FT_RSNA_FILS_SHA256,
21894     WMI_AUTH_FT_RSNA_FILS_SHA384,
21895     WMI_AUTH_WPA3_SAE,
21896     WMI_AUTH_WPA3_OWE,
21897     WMI_AUTH_PASN,
21898     WMI_AUTH_RSNA_8021X_SHA384,
21899     WMI_AUTH_WPA3_SAE_SHA384,
21900     WMI_AUTH_FT_RSNA_SAE_SHA384,
21901 };
21902 
21903 typedef enum {
21904     WMI_SCAN_CLIENT_NLO = 0x1,  /* 1 */
21905     WMI_SCAN_CLIENT_EXTSCAN,    /* 2 */
21906     WMI_SCAN_CLIENT_ROAM,       /* 3 */
21907     WMI_SCAN_CLIENT_P2P,        /* 4 */
21908     WMI_SCAN_CLIENT_LPI,        /* 5 */
21909     WMI_SCAN_CLIENT_NAN,        /* 6 */
21910     WMI_SCAN_CLIENT_ANQP,       /* 7 */
21911     WMI_SCAN_CLIENT_OBSS,       /* 8 */
21912     WMI_SCAN_CLIENT_PLM,        /* 9 */
21913     WMI_SCAN_CLIENT_HOST,       /* 10 */
21914 } WMI_SCAN_CLIENT_ID;
21915 
21916 typedef struct {
21917     /** authentication mode (defined above)  */
21918     A_UINT32 rsn_authmode;
21919     /** unicast cipher set */
21920     A_UINT32 rsn_ucastcipherset;
21921     /** mcast/group cipher set */
21922     A_UINT32 rsn_mcastcipherset;
21923     /** mcast/group management frames cipher set */
21924     A_UINT32 rsn_mcastmgmtcipherset;
21925 } wmi_rsn_params;
21926 
21927 /** looking for a wps enabled AP */
21928 #define WMI_AP_PROFILE_FLAG_WPS    0x1
21929 /** looking for a secure AP  */
21930 #define WMI_AP_PROFILE_FLAG_CRYPTO 0x2
21931 /** looking for a PMF enabled AP */
21932 #define WMI_AP_PROFILE_FLAG_PMF    0x4
21933 /** If this flag is set roam to SAE_H2E (Hash to Element) enabled APs only */
21934 #define WMI_AP_PROFILE_FLAG_SAE_H2E 0x8
21935 
21936 /* the value used in wmi_roam_cnd_scoring_param->disable_bitmap */
21937 #define WLAN_ROAM_SCORING_RSSI_DISABLE                  0x00000001
21938 #define WLAN_ROAM_SCORING_HT_DISABLE                    0x00000002
21939 #define WLAN_ROAM_SCORING_VHT_DISABLE                   0x00000004
21940 #define WLAN_ROAM_SCORING_BW_DISABLE                    0x00000008
21941 #define WLAN_ROAM_SCORING_BAND_DISABLE                  0x00000010
21942 #define WLAN_ROAM_SCORING_NSS_DISABLE                   0x00000020
21943 #define WLAN_ROAM_SCORING_CHAN_CONGESTION_DISABLE       0x00000040
21944 #define WLAN_ROAM_SCORING_BEAMFORMING_DISABLE           0x00000080
21945 #define WLAN_ROAM_SCORING_PCL_DISABLE                   0x00000100
21946 #define WLAN_ROAM_SCORING_HE_DISABLE                    0x00000200
21947 #define WLAN_ROAM_SCORING_OCE_WAN_DISABLE               0x00000400
21948 #define WLAN_ROAM_SCORING_ETH_DISABLE                   0x00000800
21949 #define WLAN_ROAM_SCORING_MLO_DISABLE                   0x00001000
21950 
21951 #define WLAN_ROAM_SCORING_DISABLE_ALL                   0xFFFFFFFF
21952 #define WLAN_ROAM_SCORING_DEFAULT_PARAM_ALLOW           0x0
21953 
21954 #define WLAN_ROAM_MAX_SELECTION_SCORE                   10000
21955 
21956 #define WLAN_ROAM_SCORE_20MHZ_BW_INDEX                  0
21957 #define WLAN_ROAM_SCORE_40MHZ_BW_INDEX                  1
21958 #define WLAN_ROAM_SCORE_80MHZ_BW_INDEX                  2
21959 #define WLAN_ROAM_SCORE_160MHZ_BW_INDEX                 3
21960 #define WLAN_ROAM_SCORE_MAX_BW_INDEX                    4
21961 #define WMI_ROAM_GET_BW_SCORE_PERCENTAGE(value32, bw_index)                   WMI_GET_BITS(value32, (8 * (bw_index)), 8)
21962 #define WMI_ROAM_SET_BW_SCORE_PERCENTAGE(value32, score_pcnt, bw_index)       WMI_SET_BITS(value32, (8 * (bw_index)), 8, score_pcnt)
21963 
21964 #define WLAN_ROAM_SCORE_NSS_1x1_INDEX                   0
21965 #define WLAN_ROAM_SCORE_NSS_2x2_INDEX                   1
21966 #define WLAN_ROAM_SCORE_NSS_3x3_INDEX                   2
21967 #define WLAN_ROAM_SCORE_NSS_4x4_INDEX                   3
21968 #define WLAN_ROAM_SCORE_MAX_NSS_INDEX                   4
21969 #define WMI_ROAM_GET_NSS_SCORE_PERCENTAGE(value32, nss_index)                 WMI_GET_BITS(value32, (8 * (nss_index)), 8)
21970 #define WMI_ROAM_SET_NSS_SCORE_PERCENTAGE(value32, score_pcnt, nss_index)     WMI_SET_BITS(value32, (8 * (nss_index)), 8, score_pcnt)
21971 
21972 #define WLAN_ROAM_SCORE_BAND_2G_INDEX                   0
21973 #define WLAN_ROAM_SCORE_BAND_5G_INDEX                   1
21974 #define WLAN_ROAM_SCORE_BAND_6G_INDEX                   2
21975 /* 3 is reserved */
21976 #define WLAN_ROAM_SCORE_MAX_BAND_NUM_INDICES            4
21977 #define WLAN_ROAM_SCORE_MAX_BAND_INDEX WLAN_ROAM_SCORE_MAX_BAND_NUM_INDICES
21978 
21979 #define WLAN_ROAM_SCORE_SECURITY_WPA_INDEX              0
21980 #define WLAN_ROAM_SCORE_SECURITY_WPA2_INDEX             1
21981 #define WLAN_ROAM_SCORE_SECURITY_WPA3_INDEX             2
21982 /* 3 is reserved */
21983 #define WLAN_ROAM_SCORE_SECURITY_MAX_NUM_INDICES        4
21984 
21985 #define WMI_ROAM_GET_BAND_SCORE_PERCENTAGE(value32, band_index)                 WMI_GET_BITS(value32, (8 * (band_index)), 8)
21986 #define WMI_ROAM_SET_BAND_SCORE_PERCENTAGE(value32, score_pcnt, band_index)     WMI_SET_BITS(value32, (8 * (band_index)), 8, score_pcnt)
21987 
21988 #define WLAN_ROAM_SCORE_MAX_CHAN_CONGESTION_SLOT        16
21989 #define WLAN_ROAM_SCORE_DEFAULT_CONGESTION_SLOT         0
21990 
21991 #define WLAN_ROAM_SCORE_MAX_OCE_WAN_SLOT                16
21992 #define WLAN_ROAM_SCORE_DEFAULT_OCE_WAN_SLOT            0
21993 
21994 #define WLAN_ROAM_SCORE_320MHZ_BW_EXT_INDEX             0
21995 #define WLAN_ROAM_SCORE_MAX_BW_EXT_INDEX                4
21996 
21997 #define WLAN_ROAM_SCORE_MLSR_INDEX                      0
21998 #define WLAN_ROAM_SCORE_MLMR_INDEX                      1
21999 #define WLAN_ROAM_SCORE_EMLSR_INDEX                     2
22000 #define WLAN_ROAM_SCORE_EMLMR_INDEX                     3
22001 #define WLAN_ROAM_SCORE_MLO_INDEX                       4
22002 #define WMI_ROAM_GET_MLO_SCORE_PERCENTAGE(value32, mlo_index)                 WMI_GET_BITS(value32, (8 * (mlo_index)), 8)
22003 #define WMI_ROAM_SET_MLO_SCORE_PERCENTAGE(value32, score_pcnt, mlo_index)     WMI_SET_BITS(value32, (8 * (mlo_index)), 8, score_pcnt)
22004 #define WMI_ROAM_GET_SECURITY_SCORE_PERCENTAGE(value32, security_index) \
22005     WMI_GET_BITS(value32, (8 * (security_index)), 8)
22006 #define WMI_ROAM_SET_SECURITY_SCORE_PERCENTAGE(value32, score_pcnt, security_index) \
22007     WMI_SET_BITS(value32, (8 * (security_index)), 8, score_pcnt)
22008 
22009 /**
22010     best_rssi_threshold: Roamable AP RSSI equal or better than this threshold, full RSSI score 100. Units in dBm.
22011     good_rssi_threshold: Below this threshold, scoring linear percentage between rssi_good_pcnt and 100. Units in dBm.
22012     bad_rssi_threshold:  Between good and bad RSSI threshold, scoring linear percentage between rssi_bad_pcnt and rssi_good_pcnt. Units in dBm.
22013     good_rssi_pcnt: Used to assigned scoring percentage of each slot between best to good RSSI threshold. Units in percentage.
22014     bad_rssi_pcnt: Used to assigned scoring percentage of each slot between good to bad RSSI threshold. Units in percentage.
22015     good_bucket_size : bucket size of slot in good zone.  Units in dB.
22016     bad_bucket_size : bucket size of slot in bad zone. Units in dB.
22017     rssi_pref_5g_rssi_thresh: Below RSSI threshold, 5G AP have given preference of band percentage. Units in dBm.
22018 */
22019 /**
22020     The graph below explains how RSSI scoring percentage is calculated
22021     as the RSSI improves.  In the graph, the derived parameters good_buckets
22022     and bad_buckets are used.  These derived parameters are related to the
22023     specified parameters as follows:
22024         good_buckets =
22025             (best_rssi_threshold - good_rssi_threshold) / good_bucket_size
22026         bad_buckets =
22027             (good_rssi_threshold - bad_rssi_threshold) / bad_bucket_size
22028 
22029       |     (x0,y0) (x0 = best_rssi, y0 = 100)
22030 p 100 |-------o
22031 e     |       |<--------- (100 - good_rssi_pct)/good_buckets
22032 r     |       |___  ,---- good_bucket_size
22033 c     |           | |
22034 e     |           |_V_
22035 n     |               |
22036 t     |               |___o (x1,y1) (x1 = good_rssi, y1 = good_rssi_pcnt)
22037    80 |                   |
22038 %     |                   |<------ (good_rssi_pcnt - bad_rssi_pcnt)/bad_buckets
22039       |                   |_____
22040       |                         |  ,-- bad_bucket_size
22041       |                         |  |
22042       |                         |__v__
22043       |                               |
22044       |                               |
22045    40 |                               o------------
22046       |                             (x2,y2) (x2 = bad_rssi, y2 = bad_rssi_pcnt)
22047       +------o------------o-----------o------------->
22048             -50         -70          -80          RSSI dBm
22049 
22050 | excellent  |  good      | bad       | poor
22051 | zone       |  zone      | zone      | zone
22052              V            V           V
22053         BEST_THRES   GOOD_THRES     BAD_THRES
22054  */
22055 typedef struct {
22056     A_INT32  best_rssi_threshold;
22057     A_INT32  good_rssi_threshold;
22058     A_INT32  bad_rssi_threshold;
22059     A_UINT32 good_rssi_pcnt;
22060     A_UINT32 bad_rssi_pcnt;
22061     A_UINT32 good_bucket_size;
22062     A_UINT32 bad_bucket_size;
22063     A_INT32  rssi_pref_5g_rssi_thresh;
22064 } wmi_roam_cnd_rssi_scoring;
22065 
22066 /**
22067     Use macro WMI_ROAM_CND_GET/SET_BW_SCORE_PERCENTAGE to get and set the
22068     value respectively of bw_scoring
22069         BITS 0-7   :- It contains scoring percentage of 20MHz  BW
22070         BITS 8-15  :- It contains scoring percentage of 40MHz  BW
22071         BITS 16-23 :- It contains scoring percentage of 80MHz  BW
22072         BITS 24-31 :- It contains scoring percentage of 160MHz BW
22073 
22074     Use macro WMI_ROAM_CND_GET/SET_BW_SCORE_PERCENTAGE to get and set the
22075     value respectively of ext_bw_scoring:
22076         BITS 0-7   :- It contains scoring percentage of 320MHz BW
22077         BITS 8-15  :- reserved
22078         BITS 16-23 :- reserved
22079         BITS 24-31 :- reserved
22080 
22081     The value of each index must be 0-100
22082  */
22083 typedef struct {
22084     A_UINT32 score_pcnt;
22085 } wmi_roam_cnd_bw_scoring;
22086 
22087 /**
22088     Use macro WMI_ROAM_CND_GET/SET_BAND_SCORE_PERCENTAGE to get and set the value respectively.
22089     BITS 0-7   :- It contains scoring percentage of 2G
22090     BITS 8-15  :- It contains scoring percentage of 5G
22091     BITS 16-23 :- reserved
22092     BITS 24-31 :- reserved
22093 
22094     The value of each index must be 0-100
22095  */
22096 typedef struct {
22097     A_UINT32 score_pcnt;
22098 } wmi_roam_cnd_band_scoring;
22099 
22100 /**
22101     Use macro WMI_ROAM_CND_GET/SET_NSS_SCORE_PERCENTAGE to get and set the value respectively.
22102         BITS 0-7   :- It contains scoring percentage of 1x1
22103         BITS 8-15  :- It contains scoring percentage of 2x2
22104         BITS 16-23 :- It contains scoring percentage of 3x3
22105         BITS 24-31 :- It contains scoring percentage of 4x4
22106 
22107     The value of each index must be 0-100
22108  */
22109 typedef struct {
22110     A_UINT32 score_pcnt;
22111 } wmi_roam_cnd_nss_scoring;
22112 
22113 /**
22114     score_pcnt: Contains roam score percentage of each slot of respective channel_congestion_pcnt.It is also used same BITS for slot(0-3)
22115                 BITS 0-7   :- the scoring pcnt when AP is not advertise QBSS/ESP info
22116                 BITS 8-15 :-  SLOT_1
22117                 BITS 16-23 :- SLOT_2
22118                 BITS 24-31 :- SLOT_3
22119                 BITS 32-      ...
22120 
22121     num_slot will equally divide 100. e.g, if num_slot = 4
22122     slot 0 = 0-25%, slot 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
22123 */
22124 typedef struct {
22125     A_UINT32 num_slot; /* max 15 */
22126     A_UINT32 score_pcnt3_to_0;
22127     A_UINT32 score_pcnt7_to_4;
22128     A_UINT32 score_pcnt11_to_8;
22129     A_UINT32 score_pcnt15_to_12;
22130 } wmi_roam_cnd_esp_qbss_scoring;
22131 
22132 /**
22133     score_pcnt: Contains roam score percentage of each slot of respective channel_congestion_pcnt.It is also used same BITS for slot(0-3)
22134                 BITS 0-7   :- the scoring pcnt when AP is not advertise QBSS/ESP info
22135                 BITS 8-15 :-  SLOT_1
22136                 BITS 16-23 :- SLOT_2
22137                 BITS 24-31 :- SLOT_3
22138                 BITS 32-      ...
22139 
22140     num_slot will equally divide 100. e.g, if num_slot = 4
22141     slot 0 = 0-25%, slot 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
22142 */
22143 typedef struct {
22144     A_UINT32 num_slot; /* max 15  */
22145     A_UINT32 score_pcnt3_to_0;
22146     A_UINT32 score_pcnt7_to_4;
22147     A_UINT32 score_pcnt11_to_8;
22148     A_UINT32 score_pcnt15_to_12;
22149 } wmi_roam_cnd_oce_wan_scoring;
22150 
22151 /**
22152  *  Use macro WMI_ROAM_CND_GET/SET_SECURITY_SCORE_PERCENTAGE
22153  *  to get and set the value respectively.
22154  *  BITS 0-7   :- It contains scoring percentage of WPA security
22155  *  BITS 8-15  :- It contains scoring percentage of WPA2 security
22156  *  BITS 16-23 :- It contains scoring percentage of WPA3 security
22157  *  BITS 24-31 :- reserved
22158  *
22159  *  The value of each score must be 0-100
22160  */
22161 typedef struct {
22162     A_UINT32 score_pcnt;
22163 } wmi_roam_cnd_security_scoring;
22164 
22165 typedef enum {
22166     WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID_NONE = 0, /* Legacy roam score algorithm */
22167     WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID_RSSI_CU_BASED = 1, /* Roam score algorithm based on RSSI and CU */
22168 }  WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID;
22169 
22170 /**
22171     disable_bitmap :- Each bit will be either allow(0)/disallow(1) to considered the roam score param.
22172     rssi_weightage_pcnt :- RSSI weightage out of total score in percentage
22173     ht_weightage_pcnt :- HT weightage out of total score in percentage.
22174     vht_weightage_pcnt :- VHT weightage out of total score in percentage.
22175     he_weightage_pcnt :- 11ax weightage out of total score in percentage.
22176     bw_weightage_pcnt :- Bandwidth weightage out of total score in percentage.
22177     band_weightage_pcnt :- Band(2G/5G) weightage out of total score in percentage.
22178     nss_weightage_pcnt:- NSS(1x1 / 2x2) weightage out of total score in percentage.
22179     esp_qbss_weightage_pcnt: ESP/QBSS weightage out of total score in percentage.
22180     beamforming_weightage_pcnt :- Beamforming weightage out of total score in percentage.
22181     pcl_weightage_pcnt :- PCL weightage out of total score in percentage.
22182     oce_wan_weightage_pcnt :- OCE WAN metrics weightage out of total score in percentage.
22183     rssi_scoring :- RSSI scoring information.
22184     bw_scoring :- channel BW scoring percentage information.
22185     band_scoring : - band scording percentage information.
22186     nss_scoring :- NSS scoring percentage information.
22187     esp_qbss_scoring :- ESP/QBSS scoring percentage information
22188     oce_wan_scoring : OCE WAN metrics percentage information
22189     roam_score_delta_pcnt :- consider scanned AP as roam eligible candidate only if scanned AP score is at least roam_score_delta % better than connected AP score
22190     roam_score_delta_mask :- roam trigger bitmap for which roam_score_delta needs to apply. The WMI_ROAM_TRIGGER_REASON_ID enum values identify which bit within the mask is used for which roam trigger cause.
22191 */
22192 typedef struct {
22193     A_UINT32 tlv_header;     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_cnd_scoring_param */
22194     A_UINT32 disable_bitmap;
22195     A_INT32 rssi_weightage_pcnt;
22196     A_INT32 ht_weightage_pcnt;
22197     A_INT32 vht_weightage_pcnt;
22198     A_INT32 he_weightage_pcnt;
22199     A_INT32 bw_weightage_pcnt;
22200     A_INT32 band_weightage_pcnt;
22201     A_INT32 nss_weightage_pcnt;
22202     A_INT32 esp_qbss_weightage_pcnt;
22203     A_INT32 beamforming_weightage_pcnt;
22204     A_INT32 pcl_weightage_pcnt;
22205     A_INT32 oce_wan_weightage_pcnt;
22206     wmi_roam_cnd_rssi_scoring rssi_scoring;
22207     wmi_roam_cnd_bw_scoring bw_scoring;
22208     wmi_roam_cnd_band_scoring band_scoring;
22209     wmi_roam_cnd_nss_scoring nss_scoring;
22210     wmi_roam_cnd_esp_qbss_scoring esp_qbss_scoring;
22211     wmi_roam_cnd_oce_wan_scoring oce_wan_scoring;
22212     A_UINT32 roam_score_delta_pcnt;
22213     A_UINT32 roam_score_delta_mask;
22214     /* Vendor specific roam score algorithm ID from WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID enum */
22215     A_UINT32 vendor_roam_score_algorithm_id;
22216     /*
22217      * During CU and low RSSI based roam triggers, consider AP as
22218      * roam candidate only if its roam score is better than connected AP score
22219      * by at least candidate_min_roam_score_delta.
22220      */
22221     A_UINT32 candidate_min_roam_score_delta;
22222     /*
22223      * For OCE Release 2, give weightage to roam candidate tx power if
22224      * oce_ap_tx_pwr_weightage_pcnt != 0.
22225      */
22226     A_UINT32 oce_ap_tx_pwr_weightage_pcnt;
22227     /*
22228      * For OCE Release 2, give weightage to roam candidate based on
22229      * advertised subnet id.
22230      * Only used if oce_ap_subnet_id_weightage_pcnt != 0.
22231      */
22232     A_UINT32 oce_ap_subnet_id_weightage_pcnt;
22233     /*
22234      * Give weightage to SAE-PK (Simultaneous Authentication of Equals -
22235      * Public Key) enabled network APs.
22236      * Only used if sae_pk_ap_weightage_pcnt != 0.
22237      */
22238     A_UINT32 sae_pk_ap_weightage_pcnt;
22239     /*
22240      * Give weightage to bandwidth which is greater than 160Mhz.
22241      */
22242     wmi_roam_cnd_bw_scoring ext_bw_scoring;
22243     /*
22244      * eht_weightage_pcnt :- 11be weightage out of total score in percentage.
22245      */
22246     A_UINT32 eht_weightage_pcnt;
22247     /*
22248      * mlo_weightage_pcnt :- give weightage to candidate based on MLO support.
22249      */
22250     A_UINT32 mlo_weightage_pcnt;
22251     /*
22252      * btc_score_factor :- Scale down 2.4GHz AP total score by btc_score_factor
22253      * during BT coex.
22254      * Value 0 should be ignored
22255      */
22256     A_UINT32 btc_score_factor;
22257     /*
22258      * btc_etp_factor :- Scale down 2.4GHz AP total etp value by btc_etp_factor
22259      * during BT coex.
22260      * Value 0 should be ignored
22261      */
22262     A_UINT32 btc_etp_factor;
22263     /* Scoring for security mode */
22264     A_INT32 security_weightage_pcnt;
22265     wmi_roam_cnd_security_scoring security_scoring;
22266     /* mlo_etp_weightage_pcnt:
22267      * Give etp weightage to candidate based on MLO support.
22268      * In host INI configuration, it will give boost(+) or reduction(-)
22269      * percentage value and host will deliver actual weighted number
22270      * based on 100. For example:
22271      * If percentage value in INI is 20, then host will give 120 (100 * 1.2)
22272      * as mlo_etp_weightage_pcnt.
22273      * If percentage value in INI is -20, then host will give 80 (100 * 0.8)
22274      * as mlo_etp_weightage_pcnt.
22275      */
22276     A_UINT32 mlo_etp_weightage_pcnt;
22277 } wmi_roam_cnd_scoring_param;
22278 
22279 typedef struct {
22280     A_UINT32 tlv_header;   /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_score_delta_param */
22281     /* Roam trigger reason ID from WMI_ROAM_TRIGGER_REASON_ID */
22282     A_UINT32 roam_trigger_reason;
22283     /* Roam score delta in %.
22284      * Consider AP as roam candidate only if AP score is at least
22285      * roam_score_delta % better than connected AP score.
22286      * Ex: roam_score_delta = 20, and connected AP score is 4000,
22287      * then consider candidate AP only if its score is at least
22288      * 4800 (= 4000 * 120%)
22289      */
22290     A_UINT32 roam_score_delta;
22291 } wmi_roam_score_delta_param;
22292 
22293 typedef struct {
22294     A_UINT32 tlv_header;    /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_cnd_min_rssi_param */
22295     /* Roam trigger reason ID from WMI_ROAM_TRIGGER_REASON_ID */
22296     A_UINT32 roam_trigger_reason;
22297     /*
22298      * Consider AP as roam candidate only if AP RSSI is better than
22299      * candidate_min_rssi
22300      */
22301     A_UINT32 candidate_min_rssi; /* units = dBm */
22302 } wmi_roam_cnd_min_rssi_param;
22303 
22304 /** To match an open AP, the rs_authmode should be set to WMI_AUTH_NONE
22305  *  and WMI_AP_PROFILE_FLAG_CRYPTO should be clear.
22306  *  To match a WEP enabled AP, the rs_authmode should be set to WMI_AUTH_NONE
22307  *  and WMI_AP_PROFILE_FLAG_CRYPTO should be set .
22308  */
22309 
22310 typedef struct {
22311     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_profile */
22312     /** flags as defined above */
22313     A_UINT32 flags;
22314     /**
22315      * RSSI threshold value in dB: the value of the candidate AP should
22316      * higher by this threshold than the RSSI of the currently associated AP.
22317      */
22318     A_UINT32 rssi_threshold;
22319     /**
22320      * ssid value to be matched.
22321      */
22322     wmi_ssid ssid;
22323 
22324     /**
22325      * security params to be matched.
22326      */
22327     /** authentication mode (defined above)  */
22328     A_UINT32 rsn_authmode;
22329     /** unicast cipher set */
22330     A_UINT32 rsn_ucastcipherset;
22331     /** mcast/group cipher set */
22332     A_UINT32 rsn_mcastcipherset;
22333     /** mcast/group management frames cipher set */
22334     A_UINT32 rsn_mcastmgmtcipherset;
22335     /**
22336      * rssi_abs_threshold value: the value of the candidate AP should
22337      * higher than this absolute RSSI threshold.
22338      * Zero means no absolute minimum RSSI is required.
22339      * units are the offset from the noise floor in dB.
22340      */
22341     A_UINT32 rssi_abs_thresh;
22342     /**
22343      * bg_rssi_threshold value in dB: For background scan the value of
22344      * the candidate AP should be higher by this threshold than the RSSI
22345      * of the currently associated AP.
22346      */
22347     A_UINT32 bg_rssi_threshold;
22348 } wmi_ap_profile;
22349 
22350 typedef struct {
22351     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_owe_ap_profile */
22352 
22353     /* OPEN SSID value when STA is connected to OWE transition AP in OWE security */
22354     wmi_ssid open_ssid_for_owe_transition;
22355 } wmi_owe_ap_profile;
22356 
22357 typedef struct {
22358     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_cnd_vendor_scoring_param */
22359     A_UINT32 tlv_header;
22360     /** Indicates the channel band for which these vendor scoring params needs to be applied.
22361      *  Refer WLAN_ROAM_SCORE_MAX_BAND_INDEX for possible band_idx values.
22362      */
22363     A_UINT32 band_idx;
22364     /** Below RSSI/CU factor_value & factor_score param values are configured by vendor */
22365     A_UINT32 rssi_factor_value1;
22366     A_UINT32 rssi_factor_value2;
22367     A_UINT32 rssi_factor_value3;
22368     A_UINT32 rssi_factor_value4;
22369     A_UINT32 rssi_factor_value5;
22370     A_UINT32 rssi_factor_score1;
22371     A_UINT32 rssi_factor_score2;
22372     A_UINT32 rssi_factor_score3;
22373     A_UINT32 rssi_factor_score4;
22374     A_UINT32 rssi_factor_score5;
22375     A_UINT32 cu_factor_value1;
22376     A_UINT32 cu_factor_value2;
22377     A_UINT32 cu_factor_score1;
22378     A_UINT32 cu_factor_score2;
22379 } wmi_roam_cnd_vendor_scoring_param;
22380 
22381 /** Support early stop roaming scanning when finding a strong candidate AP
22382  * A 'strong' candidate is
22383  * 1) Is eligible candidate
22384  *    (all conditions are met in existing candidate selection).
22385  * 2) Its RSSI is better than earlystop threshold.
22386  *    Earlystop threshold will be relaxed as each channel is scanned.
22387  */
22388 typedef struct {
22389     A_UINT32 tlv_header;
22390     /* Minimum RSSI threshold value for early stop, unit is dB above NF. */
22391     A_UINT32 roam_earlystop_thres_min;
22392     /* Maminum RSSI threshold value for early stop, unit is dB above NF. */
22393     A_UINT32 roam_earlystop_thres_max;
22394 } wmi_roam_earlystop_rssi_thres_param;
22395 
22396 typedef struct {
22397     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_dense_thres_param */
22398     A_UINT32 tlv_header;
22399     /** RSSI threshold offset under trffic and dense env */
22400     A_UINT32 roam_dense_rssi_thres_offset;
22401     /** minimum number of APs to determine dense env */
22402     A_UINT32 roam_dense_min_aps;
22403     /** initial dense status detected by host at the time of initial connection */
22404     A_UINT32 roam_dense_status;
22405     /* traffic threshold to enable aggressive roaming in dense env; units are percent of medium occupancy, 0 - 100 */
22406     A_UINT32 roam_dense_traffic_thres;
22407 } wmi_roam_dense_thres_param;
22408 
22409 /* Definition for flags in wmi_roam_bg_scan_roaming_param
22410  * Bit 0: BG roaming enabled when we connect to 2G AP only and roaming to 5G AP only.
22411  * Bit 1-31: Reserved
22412  */
22413 #define WMI_ROAM_BG_SCAN_FLAGS_2G_TO_5G_ONLY   1
22414 
22415 typedef struct {
22416     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_bg_scan_roaming_param */
22417     A_UINT32 tlv_header;
22418     /** RSSI threshold in dBm below which roaming will be triggered during background scan(non-roam scan). 0 will disable this threshold */
22419     A_UINT32 roam_bg_scan_bad_rssi_thresh;
22420     /** bitmap for which scan client will enable/disable background roaming. bit position is mapped to the enum WMI_SCAN_CLIENT_ID. 1 = enable, 0 = disable */
22421     A_UINT32 roam_bg_scan_client_bitmap;
22422     /** roam scan RSSI threshold for 2 GHz band.
22423      *  offset from roam_bg_scan_bad_rssi_thresh, in dB units
22424      */
22425     A_INT32 bad_rssi_thresh_offset_2g;
22426     /* flags for background roaming */
22427     A_UINT32 flags;
22428 } wmi_roam_bg_scan_roaming_param;
22429 
22430 /*
22431  * If there's rx activity during rx_inactivity_ms and avg of data_rssi
22432  * is better than roam_data_rssi_thres, then suppress low rssi roaming.
22433  */
22434 #define WMI_ROAM_DATA_RSSI_FLAG_LOW_RSSI   0x00000001
22435 /*
22436  * If there's no rx activity during rx_inactivity_ms or avg of data_rssi
22437  * is better than roam_data_rssi_thres, then suppress this background roaming.
22438  */
22439 #define WMI_ROAM_DATA_RSSI_FLAG_BACKGROUND 0x00000002
22440 
22441 typedef struct {
22442     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_data_rssi_roaming_param */
22443     A_UINT32 tlv_header;
22444     /* flags for when consider data_rssi,
22445      * valid values are OR operation of WMI_ROAM_DATA_RSSI_FLAG_ .
22446      * value 0 to disable the feature.
22447      */
22448     A_UINT32 flags;
22449     /**
22450      * RSSI threshold in dBm above which roaming scan will be suppressed
22451      * during some roaming trigger.
22452      */
22453     A_INT32 roam_data_rssi_thres;
22454     /** rx inactivity time, in unit of milliseconds. */
22455     A_UINT32 rx_inactivity_ms;
22456 } wmi_roam_data_rssi_roaming_param;
22457 
22458 /** Beacon filter wmi command info */
22459 
22460 #define BCN_FLT_MAX_SUPPORTED_IES    256
22461 #define BCN_FLT_MAX_ELEMS_IE_LIST    (BCN_FLT_MAX_SUPPORTED_IES/32)
22462 
22463 typedef struct bss_bcn_stats {
22464     A_UINT32 vdev_id;
22465     A_UINT32 bss_bcnsdropped;
22466     A_UINT32 bss_bcnsdelivered;
22467 } wmi_bss_bcn_stats_t;
22468 
22469 typedef struct bcn_filter_stats {
22470     A_UINT32 bcns_dropped;
22471     A_UINT32 bcns_delivered;
22472     A_UINT32 activefilters;
22473     wmi_bss_bcn_stats_t bss_stats;
22474 } wmi_bcnfilter_stats_t;
22475 
22476 typedef struct wmi_add_bcn_filter_cmd {
22477     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_add_bcn_filter_cmd_fixed_param */
22478     A_UINT32 vdev_id;
22479 /*
22480  * Following this structure is the TLV:
22481  *    A_UINT32   ie_map[BCN_FLT_MAX_ELEMS_IE_LIST];
22482  */
22483 } wmi_add_bcn_filter_cmd_fixed_param;
22484 
22485 typedef struct wmi_rmv_bcn_filter_cmd {
22486     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rmv_bcn_filter_cmd_fixed_param */
22487     A_UINT32 vdev_id;
22488 } wmi_rmv_bcn_filter_cmd_fixed_param;
22489 
22490 #define WMI_BCN_SEND_DTIM_ZERO         1
22491 #define WMI_BCN_SEND_DTIM_BITCTL_SET   2
22492 typedef struct wmi_bcn_send_from_host {
22493     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_send_from_host_cmd_fixed_param  */
22494     A_UINT32 vdev_id;
22495     A_UINT32 data_len;
22496     union {
22497         A_UINT32 frag_ptr; /* Physical address of the frame */
22498         A_UINT32 frag_ptr_lo; /* LSBs of physical address of the frame */
22499     };
22500     A_UINT32 frame_ctrl; /* farme ctrl to setup PPDU desc */
22501     A_UINT32 dtim_flag; /* to control CABQ traffic */
22502     A_UINT32 bcn_antenna;   /* Antenna for beacon transmission */
22503     A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */
22504 } wmi_bcn_send_from_host_cmd_fixed_param;
22505 
22506 /* cmd to support bcn snd for all vaps at once */
22507 typedef struct wmi_pdev_send_bcn {
22508     A_UINT32 num_vdevs;
22509     WMI_VAR_LEN_ARRAY1(wmi_bcn_send_from_host_cmd_fixed_param, bcn_cmd);
22510 } wmi_pdev_send_bcn_cmd_t;
22511 
22512 typedef struct wmi_fd_send_from_host {
22513     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fd_send_from_host_cmd_fixed_param  */
22514     A_UINT32 vdev_id;
22515     A_UINT32 data_len;
22516     union {
22517         A_UINT32 frag_ptr; /* Physical address of the frame */
22518         A_UINT32 frag_ptr_lo; /* LSBs of physical address of the frame */
22519     };
22520     A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */
22521     A_UINT32 frame_ctrl; /* frame ctrl to setup PPDU desc */
22522 } wmi_fd_send_from_host_cmd_fixed_param;
22523 
22524 /*
22525  * Control to send broadcast probe response instead of FD frames.
22526  * When this flag is not set then FD frame will be transmitted when
22527  * fd_period is non-zero
22528  */
22529 #define WMI_FILS_FLAGS_BITMAP_BCAST_PROBE_RSP   0x1
22530 
22531 /*
22532  * WMI command structure for FILS feature enable/disable
22533  */
22534 typedef struct {
22535     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_enable_fils_cmd_fixed_param  */
22536     /* VDEV identifier */
22537     A_UINT32 vdev_id;
22538     A_UINT32 fd_period; /* non-zero - enable Fils Discovery frames or broadcast probe response with this period (in TU),
22539                          * 0 - disable FD and broadcast probe response frames */
22540     A_UINT32 flags; /* WMI_FILS_FLAGS_BITMAP flags */
22541 } wmi_enable_fils_cmd_fixed_param;
22542 
22543 /*
22544  * WMI_ROAM_AP_PROFILE:  AP profile of connected AP for roaming.
22545  */
22546 typedef struct {
22547     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ap_profile_fixed_param */
22548     /** id of AP criteria */
22549     A_UINT32 id;
22550 
22551     /** unique id identifying the VDEV, generated by the caller */
22552     A_UINT32 vdev_id;
22553 
22554 /*
22555  * Following this structure are the TLVs:
22556  *     wmi_ap_profile ap_profile; <-- AP profile info
22557  *     wmi_roam_cnd_scoring_param roam_cnd_scoring_param
22558  *     wmi_roam_score_delta_param roam_score_delta_param_list[]
22559  *     wmi_roam_cnd_min_rssi_param roam_cnd_min_rssi_param_list[]
22560  *     wmi_roam_cnd_vendor_scoring_param roam_cnd_vendor_scoring_param[]
22561  *     wmi_owe_ap_profile owe_ap_profile[]
22562  *     A_UINT32 authmode_list[] <-- List of authmode allowed for roaming.
22563  *         Refer WMI_AUTH_ for authmode values.
22564  */
22565 } wmi_roam_ap_profile_fixed_param;
22566 
22567 /**
22568  * WMI_OFL_SCAN_ADD_AP_PROFILE: add an AP profile.
22569  */
22570 typedef struct {
22571     /** id of AP criteria */
22572     A_UINT32 id;
22573 
22574     /** unique id identifying the VDEV, generated by the caller */
22575     A_UINT32 vdev_id;
22576 
22577     /** AP profile info */
22578     wmi_ap_profile ap_profile;
22579 
22580 } wmi_ofl_scan_add_ap_profile;
22581 
22582 /**
22583  * WMI_OFL_SCAN_REMOVE_AP_CRITERIA: remove an ap profile.
22584  */
22585 typedef struct {
22586     /** id of AP criteria */
22587     A_UINT32 id;
22588     /** unique id identifying the VDEV, generated by the caller */
22589     A_UINT32 vdev_id;
22590 } wmi_ofl_scan_remove_ap_profile;
22591 
22592 /**
22593  * WMI_OFL_SCAN_PERIOD: period in msec for offload scan.
22594  *  0 will disable ofload scan and a very low value will perform a continuous
22595  *  scan.
22596  */
22597 typedef struct {
22598     /** offload scan period value, used for scans used when not connected */
22599     A_UINT32 ofl_scan_period;
22600 } wmi_ofl_scan_period;
22601 
22602 /* Do not modify XXX_BYTES or XXX_LEN below as it is fixed by standard */
22603 #define ROAM_OFFLOAD_PMK_BYTES       (32)
22604 #define ROAM_OFFLOAD_PSK_MSK_BYTES   (32)
22605 #define ROAM_OFFLOAD_KRK_BYTES       (16)
22606 #define ROAM_OFFLOAD_BTK_BYTES       (32)
22607 #define ROAM_OFFLOAD_R0KH_ID_MAX_LEN (48)
22608 #define ROAM_OFFLOAD_NUM_MCS_SET     (16)
22609 
22610 /* This TLV will be filled only in case roam offload for wpa2-psk/okc/ese/11r is enabled */
22611 typedef struct {
22612     A_UINT32 tlv_header;     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param */
22613     A_UINT32 rssi_cat_gap;   /* gap for every category bucket */
22614     A_UINT32 prefer_5g;      /* prefer select 5G candidate */
22615     A_UINT32 select_5g_margin;
22616     A_UINT32 reassoc_failure_timeout;     /* reassoc failure timeout */
22617     A_UINT32 capability;
22618     A_UINT32 ht_caps_info;
22619     A_UINT32 ampdu_param;
22620     A_UINT32 ht_ext_cap;
22621     A_UINT32 ht_txbf;
22622     A_UINT32 asel_cap;
22623     A_UINT32 qos_enabled;
22624     A_UINT32 qos_caps;
22625     A_UINT32 wmm_caps;
22626     A_UINT32 mcsset[ROAM_OFFLOAD_NUM_MCS_SET>>2]; /* since this 4 byte aligned, we don't declare it as tlv array */
22627     A_UINT32 handoff_delay_for_rx; /* In msec. Delay Hand-Off by this duration to receive pending Rx frames from current BSS */
22628     A_UINT32 max_mlme_sw_retries; /* maximum number of software retries for preauth and reassoc req */
22629     A_UINT32 no_ack_timeout; /* In msec. duration to wait before another SW retry made if no ack seen for previous frame */
22630     A_UINT32 roam_candidate_validity_time; /* In msec. validity duration of each entry in roam cache.  If the value is 0x0, this field should be disregarded. */
22631     A_UINT32 roam_to_current_bss_disable; /* Disable roaming to current bss */
22632 } wmi_roam_offload_tlv_param;
22633 
22634 
22635 /* flags for 11i offload */
22636 #define WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED       0   /* okc is enabled */
22637 #define WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED 1  /* pmk caching is disabled */
22638 #define WMI_ROAM_OFFLOAD_FLAG_SAE_SAME_PMKID 2      /* Use same PMKID for WPA3 SAE roaming */
22639 /* from bit 3 to bit 31 are reserved */
22640 
22641 #define WMI_SET_ROAM_OFFLOAD_OKC_ENABLED(flag) do { \
22642         (flag) |=  (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED);      \
22643      } while (0)
22644 
22645 #define WMI_SET_ROAM_OFFLOAD_OKC_DISABLED(flag) do { \
22646         (flag) &=  ~(1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED);      \
22647      } while (0)
22648 
22649 #define WMI_GET_ROAM_OFFLOAD_OKC_ENABLED(flag)   \
22650         ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED))
22651 
22652 
22653 #define WMI_SET_ROAM_OFFLOAD_PMK_CACHE_ENABLED(flag) \
22654     do { \
22655         (flag) &=  ~(1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED); \
22656     } while (0)
22657 
22658 #define WMI_SET_ROAM_OFFLOAD_PMK_CACHE_DISABLED(flag) \
22659     do { \
22660         (flag) |=  (1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED); \
22661     } while (0)
22662 
22663 #define WMI_GET_ROAM_OFFLOAD_PMK_CACHE_DISABLED(flag) \
22664     ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED))
22665 
22666 
22667 /* This TLV will be filled only in case of wpa-psk/wpa2-psk/wpa3 */
22668 typedef struct {
22669     A_UINT32 tlv_header;     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11i_offload_fixed_param */
22670     A_UINT32 flags;          /** flags. see WMI_ROAM_OFFLOAD_FLAG_ above */
22671     A_UINT32 pmk[ROAM_OFFLOAD_PMK_BYTES>>2]; /* pmk offload. As this 4 byte aligned, we don't declare it as tlv array */
22672     A_UINT32 pmk_len; /**the length of pmk. in normal case it should be 32, but for LEAP, is should be 16*/
22673     A_UINT32 pmk_ext_len; /** the length of extended pmk. in normal case it should be 0, but for suiteB, it should be 16*/
22674     A_UINT32 pmk_ext[ROAM_OFFLOAD_PMK_BYTES>>2]; /* pmk ext offload. 16 bytes for suiteB */
22675 } wmi_roam_11i_offload_tlv_param;
22676 
22677 /* This TLV will be  filled only in case of 11R*/
22678 typedef struct {
22679     A_UINT32 tlv_header;     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11r_offload_fixed_param */
22680     A_UINT32 mdie_present;
22681     A_UINT32 mdid;
22682     A_UINT32 r0kh_id[ROAM_OFFLOAD_R0KH_ID_MAX_LEN>>2];
22683     A_UINT32 r0kh_id_len;
22684     A_UINT32 psk_msk[ROAM_OFFLOAD_PSK_MSK_BYTES>>2]; /* psk/msk offload. As this 4 byte aligned, we don't declare it as tlv array */
22685     A_UINT32 psk_msk_len; /**length of psk_msk*/
22686     A_UINT32 psk_msk_ext_len; /**length of psk_msk_ext*/
22687     A_UINT32 psk_msk_ext[ROAM_OFFLOAD_PSK_MSK_BYTES>>2];
22688     A_UINT32 adaptive_11r; /* FW needs to perform adaptive 11r roaming */
22689     /*
22690      * FW needs to perform FT initial moiblity association instead of
22691      * FT roaming for deauth roam trigger
22692      *     0 - To disable FT-IM
22693      *     1 - To enable FT-IM
22694      */
22695     A_UINT32 ft_im_for_deauth;
22696     /*
22697      * FW can prefer doing over-the-ds fast BSS transition instead of
22698      * over-the-air if associated and target AP are both capable of FT over DS.
22699      *     0 - To disable FT-over-DS
22700      *     1 - To enable FT-over-DS
22701      */
22702     A_UINT32 ft_over_ds_enable;
22703 } wmi_roam_11r_offload_tlv_param;
22704 
22705 /* This TLV will be filled only in case of ESE */
22706 typedef struct {
22707     A_UINT32 tlv_header;     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ese_offload_fixed_param */
22708     A_UINT32 krk[ROAM_OFFLOAD_KRK_BYTES>>2]; /* KRK offload. As this 4 byte aligned, we don't declare it as tlv array */
22709     A_UINT32 btk[ROAM_OFFLOAD_BTK_BYTES>>2]; /* BTK offload. As this 4 byte aligned, we don't declare it as tlv array */
22710 } wmi_roam_ese_offload_tlv_param;
22711 
22712 typedef struct {
22713     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_sae_offload_tlv_param */
22714     /* SAE SPMK timeout value in seconds after which FW need to perform SAE full authentication to derive new SPMK */
22715     A_UINT32 spmk_timeout;
22716 } wmi_roam_sae_offload_tlv_param;
22717 
22718 typedef enum {
22719     WMI_BL_REASON_NUD_FAILURE = 1,
22720     WMI_BL_REASON_STA_KICKOUT,
22721     WMI_BL_REASON_ROAM_HO_FAILURE,
22722     /* Assoc resp with status code 71 - POOR RSSI CONDITIONS */
22723     WMI_BL_REASON_ASSOC_REJECT_POOR_RSSI,
22724     /* Assoc resp with status code 34 - DENIED_POOR_CHANNEL_CONDITIONS */
22725     WMI_BL_REASON_ASSOC_REJECT_OCE,
22726     WMI_BL_REASON_USERSPACE_BL,
22727     WMI_BL_REASON_USERSPACE_AVOID_LIST,
22728     WMI_BL_REASON_BTM_DIASSOC_IMMINENT,
22729     WMI_BL_REASON_BTM_BSS_TERMINATION,
22730     WMI_BL_REASON_BTM_MBO_RETRY,
22731     /* Reassoc resp with status code 34 - DENIED_POOR_CHANNEL_CONDITIONS */
22732     WMI_BL_REASON_REASSOC_RSSI_REJECT,
22733     /* Reassoc resp with status code 17 - DENIED_NO_MORE_STAS */
22734     WMI_BL_REASON_REASSOC_NO_MORE_STAS,
22735 } WMI_BLACKLIST_REASON_ID;
22736 
22737 typedef enum {
22738     WMI_BL_SOURCE_HOST = 1,
22739     WMI_BL_SOURCE_FW,
22740 } WMI_BLACKLIST_SOURCE_ID;
22741 
22742 typedef struct {
22743     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_blacklist_with_timeout_tlv_param */
22744     A_UINT32 tlv_header;
22745     /** Blaclisted AP mac address */
22746     wmi_mac_addr bssid;
22747     /** How much time in milliseconds to keep AP in blacklist */
22748     A_UINT32 timeout;
22749     /** RSSI (dBm units) when put in blacklist */
22750     A_INT32 rssi;
22751     /* Blacklist reason from WMI_BLACKLIST_REASON_ID */
22752     A_UINT32 reason;
22753     /* Source of adding AP to BL from WMI_BLACKLIST_SOURCE_ID */
22754     A_UINT32 source;
22755     /*
22756      * timestamp is the absolute time w.r.t host timer which is synchronized
22757      * between the host and target.
22758      * This timestamp indicates the time when AP added to blacklist.
22759      */
22760     A_UINT32 timestamp;
22761     /* Original timeout value in milli seconds when AP added to BL */
22762     A_UINT32 original_timeout;
22763     /*
22764      * If disallow_linkid_bitmap is not 0, then means current entity
22765      * is for MLD AP and bssid field is standing for MLD address.
22766      * If all links for MLD AP is disallow, then the value shall be 0xffffffff
22767      */
22768     A_UINT32 disallow_linkid_bitmap;
22769 } wmi_roam_blacklist_with_timeout_tlv_param;
22770 
22771 /** WMI_ROAM_BLACKLIST_EVENT: generated whenever STA needs to move AP to blacklist for a particluar time
22772  *  Ex: AP which sends BTM request with disassoc imminent is set should be
22773  *  moved to blacklist until disassociation timer expires
22774  */
22775 typedef struct {
22776     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_blacklist_event_fixed_param */
22777     A_UINT32 vdev_id;
22778     /* This TLV is followed by further TLVs:
22779      *     wmi_roam_blacklist_with_timeout_tlv_param blacklist_with_timeout[]
22780      */
22781 } wmi_roam_blacklist_event_fixed_param;
22782 
22783 typedef struct {
22784     A_UINT32 tlv_header;
22785     /** candidate AP mac address */
22786     wmi_mac_addr bssid;
22787 } wmi_roam_pmkid_request_tlv_param;
22788 
22789 /** WMI_ROAM_PMKID_REQUEST_EVENT: generated whenever FW needs the PMKID while roaming **/
22790 typedef struct {
22791     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_pmkid_request_event_fixed_param */
22792     A_UINT32 vdev_id;
22793     /* This TLV is followed by further TLVs:
22794      *     wmi_roam_pmkid_request_tlv_param pmkid_request[]
22795      */
22796 } wmi_roam_pmkid_request_event_fixed_param;
22797 
22798 /** WMI_ROAM_EVENT: roam event triggering the host roam logic.
22799  * generated when ever a better AP is found in the recent roam scan (or)
22800  * when beacon miss is detected (or) when a DEAUTH/DISASSOC is received
22801  * from the current AP.
22802  */
22803 typedef struct {
22804     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_event_fixed_param  */
22805     /** unique id identifying the VDEV, generated by the caller */
22806     A_UINT32 vdev_id;
22807     /** reason for roam event */
22808     A_UINT32 reason;
22809     /** associated AP's RSSI calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI */
22810     A_UINT32 rssi;
22811     /** roam notification */
22812     A_UINT32 notif;
22813     /** roam notification param
22814      *  Refer to WMI_ROAM_NOTIF_ defs to interpret the notif_params value.
22815      *  notif_params contains roam invoke fail reason from
22816      *  wmi_roam_invoke_error_t if reason is WMI_ROAM_REASON_INVOKE_ROAM_FAIL.
22817      */
22818     A_UINT32 notif_params;
22819     /** roam notification param1
22820      *  Refer to WMI_ROAM_NOTIF_ defs to interpret the notif_params1 value.
22821      *  notif_params1 is exact frame length of deauth or disassoc if reason
22822      *  is WMI_ROAM_REASON_DEAUTH.
22823      */
22824     A_UINT32 notif_params1;
22825 } wmi_roam_event_fixed_param;
22826 
22827 #define WMI_ROAM_BSS_INFO_FLAG_IS_MLD 0
22828 
22829 typedef struct {
22830     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_bss_info_param */
22831     /*
22832      * bit0: WMI_ROAM_BSS_INFO_FLAG_IS_MLD
22833      */
22834     A_UINT32 flags;
22835     /*
22836      * mld score if WMI_ROAM_BSS_INFO_FLAG_IS_MLD set, otherwise link score
22837      */
22838     A_UINT32 score;
22839     /*
22840      *  mld address if WMI_ROAM_BSS_INFO_FLAG_IS_MLD set, otherwise link address
22841      */
22842     wmi_mac_addr mac_addr;
22843 } wmi_roam_bss_info_param;
22844 
22845 /* roam_reason: bits 0-3 */
22846 #define WMI_ROAM_REASON_INVALID   0x0 /** invalid reason. Do not interpret reason field */
22847 #define WMI_ROAM_REASON_BETTER_AP 0x1 /** found a better AP */
22848 #define WMI_ROAM_REASON_BMISS     0x2 /** beacon miss detected */
22849 #define WMI_ROAM_REASON_LOW_RSSI  0x3 /** connected AP's low RSSI condition detected */
22850 #define WMI_ROAM_REASON_SUITABLE_AP 0x4 /** found another AP that matches
22851                                           SSID and Security profile in
22852                                           WMI_ROAM_AP_PROFILE, found during scan
22853                                           triggered upon FINAL_BMISS **/
22854 #define WMI_ROAM_REASON_HO_FAILED  0x5  /** LFR3.0 roaming failed, indicate the disconnection to host */
22855 /** WMI_ROAM_REASON_INVOKE_ROAM_FAIL:
22856  * Result code of WMI_ROAM_INVOKE_CMDID.
22857  * Any roaming failure before reassociation will be indicated to host
22858  * with this reason.
22859  * Any roaming failure after reassociation will be indicated to host with
22860  * WMI_ROAM_REASON_HO_FAILED no matter WMI_ROAM_INVOKE_CMDID is called or not.
22861  */
22862 #define WMI_ROAM_REASON_INVOKE_ROAM_FAIL 0x6
22863 #define WMI_ROAM_REASON_RSO_STATUS       0x7
22864 #define WMI_ROAM_REASON_BTM              0x8 /** Roaming because of BTM request received */
22865 #define WMI_ROAM_REASON_DEAUTH           0x9 /** deauth/disassoc received */
22866 /* reserved up through 0xF */
22867 
22868 /* subnet status: bits 4-5 */
22869 typedef enum
22870 {
22871     WMI_ROAM_SUBNET_CHANGE_STATUS_UNKNOWN = 0,
22872     WMI_ROAM_SUBNET_CHANGE_STATUS_UNCHANGED,
22873     WMI_ROAM_SUBNET_CHANGE_STATUS_CHANGED,
22874 } wmi_roam_subnet_change_status;
22875 
22876 #define WMI_ROAM_SUBNET_CHANGE_STATUS_MASK      0x30
22877 #define WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT     4
22878 
22879 #define WMI_SET_ROAM_SUBNET_CHANGE_STATUS(roam_reason, status) \
22880     do { \
22881         (roam_reason) |= \
22882             (((status) << WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT) & \
22883              WMI_ROAM_SUBNET_CHANGE_STATUS_MASK); \
22884     } while (0)
22885 
22886 #define WMI_GET_ROAM_SUBNET_CHANGE_STATUS(roam_reason) \
22887     (((roam_reason) & WMI_ROAM_SUBNET_CHANGE_STATUS_MASK) >> \
22888      WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT)
22889 
22890 #define WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK     0x40
22891 #define WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT    6
22892 
22893 #define WMI_SET_ROAM_REQUEST_HOST_HW_MODE_CHANGE(roam_reason, status) \
22894     do { \
22895         (roam_reason) |= \
22896             (((status) << WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT) & \
22897              WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK); \
22898     } while (0)
22899 
22900 #define WMI_GET_ROAM_REQUEST_HOST_HW_MODE_CHANGE(roam_reason) \
22901     (((roam_reason) & WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK) >> \
22902      WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT)
22903 
22904 /* Bits  0-3: stores 4 LSbs of trigger reason.
22905  *            Old host will get trigger reasons <= 15 from this bitfield.
22906  * Bit 7 will be 1 always to indicate that bits 8-15 are valid.
22907  * Bits 8-15: full trigger_reason, including values > 15.
22908  *            New host will gett full trigger_reason from this bitfield.
22909  *            Bits 8-11 and bits 0-3 store matching values.
22910  */
22911 #define WMI_SET_ROAM_EXT_TRIGGER_REASON(roam_reason, trigger_reason) \
22912     do { \
22913         (roam_reason) |= (trigger_reason & 0xf); \
22914         (roam_reason) |= 0x80; \
22915         (roam_reason) |= ((trigger_reason & 0xff) << 8); \
22916     } while (0)
22917 
22918 /* roaming notification */
22919 #define WMI_ROAM_NOTIF_INVALID           0x0 /** invalid notification. Do not interpret notif field  */
22920 #define WMI_ROAM_NOTIF_ROAM_START        0x1 /** indicate that roaming is started. sent only in non WOW state */
22921 #define WMI_ROAM_NOTIF_ROAM_ABORT        0x2 /** indicate that roaming is aborted. sent only in non WOW state */
22922 #define WMI_ROAM_NOTIF_ROAM_REASSOC      0x3 /** indicate that reassociation is done. sent only in non WOW state */
22923 #define WMI_ROAM_NOTIF_SCAN_MODE_SUCCESS 0x4 /** indicate that roaming scan mode is successful */
22924 #define WMI_ROAM_NOTIF_SCAN_MODE_FAIL    0x5 /** indicate that roaming scan mode is failed due to internal roaming state */
22925 #define WMI_ROAM_NOTIF_DISCONNECT        0x6 /** indicate that roaming not allowed due BTM req */
22926 #define WMI_ROAM_NOTIF_SUBNET_CHANGED    0x7 /** indicate that subnet has changed */
22927 #define WMI_ROAM_NOTIF_SCAN_START        0x8 /** indicate roam scan start, notif_params to be sent as WMI_ROAM_TRIGGER_REASON_ID */
22928 #define WMI_ROAM_NOTIF_DEAUTH_RECV       0x9 /** indicate deauth received, notif_params to be sent as reason code, notif_params1 to be sent as frame length */
22929 #define WMI_ROAM_NOTIF_DISASSOC_RECV     0xa /** indicate disassoc received, notif_params to be sent as reason code, notif_params1 to be sent as frame length */
22930 #define WMI_ROAM_NOTIF_SCAN_MODE_SUCCESS_WITH_HO_FAIL 0xb /** indicate that roaming scan mode is successful but cause disconnection and subsequent
22931                                                            ** WMI_ROAM_REASON_HO_FAILED is event expected */
22932 #define WMI_ROAM_NOTIF_SCAN_END          0xc /** indicate roam scan end, notif_params to be sent as WMI_ROAM_TRIGGER_REASON_ID */
22933 
22934 /**whenever RIC request information change, host driver should pass all ric related information to firmware (now only support tsepc)
22935 * Once, 11r roaming happens, firmware can generate RIC request in reassoc request based on this information
22936 */
22937 typedef struct
22938 {
22939     A_UINT32 tlv_header;      /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ric_request_fixed_param */
22940     A_UINT32 vdev_id;         /**unique id identifying the VDEV, generated by the caller*/
22941     A_UINT32 num_ric_request; /**number of ric request ie send to firmware.(max value is 2 now)*/
22942     A_UINT32 is_add_ric;      /**support add ric or delete ric*/
22943 } wmi_ric_request_fixed_param;
22944 
22945 /** tspec element: refer to 8.4.2.32 of 802.11 2012 spec
22946 * these elements are used to construct tspec field in RIC request, which allow station to require specific TS when 11r roaming
22947 */
22948 typedef struct {
22949     A_UINT32                         tlv_header;
22950     A_UINT32                         ts_info; /** bits value of TS Info field.*/
22951     A_UINT32                         nominal_msdu_size; /**Nominal MSDU Size field*/
22952     A_UINT32                         maximum_msdu_size; /**The Maximum MSDU Size field*/
22953     A_UINT32                         min_service_interval; /**The Minimum Service Interval field*/
22954     A_UINT32                         max_service_interval; /**The Maximum Service Interval field*/
22955     A_UINT32                         inactivity_interval; /**The Inactivity Interval field*/
22956     A_UINT32                         suspension_interval; /**The Suspension Interval field*/
22957     A_UINT32                         svc_start_time; /**The Service Start Time field*/
22958     A_UINT32                         min_data_rate; /**The Minimum Data Rate field*/
22959     A_UINT32                         mean_data_rate; /**The Mean Data Rate field*/
22960     A_UINT32                         peak_data_rate; /**The Peak Data Rate field*/
22961     A_UINT32                         max_burst_size; /**The Burst Size field*/
22962     A_UINT32                         delay_bound; /**The Delay Bound field*/
22963     A_UINT32                         min_phy_rate; /**The Minimum PHY Rate field*/
22964     A_UINT32                         surplus_bw_allowance; /**The Surplus Bandwidth Allowance field*/
22965     A_UINT32                         medium_time; /**The Medium Time field,in units of 32 us/s.*/
22966 } wmi_ric_tspec;
22967 
22968 /* flags for roam_invoke_cmd */
22969 /* add this channel into roam cache channel list after this command is finished */
22970 #define WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE           0
22971 /* indicate to host of failure if WMI_ROAM_INVOKE_CMDID. */
22972 #define WMI_ROAM_INVOKE_FLAG_REPORT_FAILURE            1
22973 /* during host-invoked roaming, don't send null data frame to AP */
22974 #define WMI_ROAM_INVOKE_FLAG_NO_NULL_FRAME_TO_AP       2
22975 /* start extra full scan if no candidate found in previous scan */
22976 #define WMI_ROAM_INVOKE_FLAG_FULL_SCAN_IF_NO_CANDIDATE 3
22977 /* when bit is set:
22978  *     Candidate selection algo will based on fw score algo.
22979  *     Which means configurations like wmi_roam_score_delta_param,
22980  *     wmi_configure_roam_trigger_parameters is also configurable for
22981  *     host_invoke roam, as well as consider current BSS score as
22982  *     score algo input.
22983  * when bit is not set:
22984  *     Candidate selection algo will ignore score and above configurations
22985  *     and ignore current BSS score.
22986  */
22987 #define WMI_ROAM_INVOKE_FLAG_SELECT_CANDIDATE_CONSIDER_SCORE 4
22988 /* from bit 5 to bit 31 are reserved */
22989 
22990 #define WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
22991         (flag) |=  (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE);      \
22992      } while (0)
22993 
22994 #define WMI_CLEAR_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
22995         (flag) &=  ~(1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE);      \
22996      } while (0)
22997 
22998 #define WMI_GET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag)   \
22999         ((flag) & (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE))
23000 
23001 
23002 #define WMI_ROAM_INVOKE_SCAN_MODE_FIXED_CH      0   /* scan given channel only */
23003 #define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_LIST    1   /* scan cached channel list */
23004 #define WMI_ROAM_INVOKE_SCAN_MODE_FULL_CH       2   /* scan full channel */
23005 #define WMI_ROAM_INVOKE_SCAN_MODE_SKIP          3   /* no scan is performed. use beacon/probe resp given by the host */
23006 #define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_MAP     4   /* scan cached channel map */
23007 
23008 #define WMI_ROAM_INVOKE_AP_SEL_FIXED_BSSID      0   /* roam to given BSSID only */
23009 #define WMI_ROAM_INVOKE_AP_SEL_ANY_BSSID        1   /* roam to any BSSID */
23010 
23011 enum wlan_roam_invoke_reason {
23012     ROAM_INVOKE_REASON_UNDEFINED = 0,
23013     /* FW will use default parameters to do roam scan, ignore other parameters like WLM, etc. */
23014     ROAM_INVOKE_REASON_NUD_FAILURE, /* Neighbor Unreachable Detection */
23015     ROAM_INVOKE_REASON_USER_SPACE,
23016 };
23017 
23018 /** WMI_ROAM_INVOKE_CMD: command to invoke roaming forcefully
23019 *
23020 if <roam_scan_ch_mode> is zero and <channel_no> is not given, roaming is not executed.
23021 if <roam_ap_sel_mode> is zero and <BSSID) is not given, roaming is not executed
23022 
23023 This command can be used to add specific channel into roam cached channel list by following
23024 <roam_scan_ch_mode> = 0
23025 <roam_ap_sel_mode> = 0
23026 <roam_delay> = 0
23027 <flag> |= WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE
23028 <BSSID> = do not fill (there will be no actual roaming because of ap_sel_mode is zero, but no BSSID is given)
23029 <channel_no> = channel list to be added
23030 */
23031 typedef struct {
23032     A_UINT32 tlv_header;     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_invoke_fixed_param */
23033     A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming is invoked */
23034     A_UINT32 flags;   /** flags. see WMI_ROAM_INVOKE_FLAG_ above */
23035     A_UINT32 roam_scan_mode; /** see WMI_ROAM_INVOKE_SCAN_ above */
23036     A_UINT32 roam_ap_sel_mode; /** see WMI_ROAM_INVOKE_AP_SEL_ above */
23037     A_UINT32 roam_delay; /** 0 = immediate roam, 1-2^32 = roam after this delay (msec) */
23038     A_UINT32 num_chan; /** # if channels to scan. In the TLV channel_list[] */
23039     A_UINT32 num_bssid;  /** number of bssids. In the TLV bssid_list[] */
23040     A_UINT32 num_buf; /** number of buffers In the TLV bcn_prb_buf_list[] */
23041     A_UINT32 reason; /** reason of invoke roam, see enum wlan_roam_invoke_reason */
23042     /**
23043      * TLV (tag length value) parameters follows roam_invoke_req
23044      * The TLV's are:
23045      *     A_UINT32 channel_list[]; // in MHz
23046      *     wmi_mac_addr bssid_list[];
23047      *     wmi_tlv_buf_len_param bcn_prb_buf_list[];
23048      *     A_UINT8 bcn_prb_frm[];
23049      */
23050 } wmi_roam_invoke_cmd_fixed_param;
23051 
23052 /* Definition for op_bitmap */
23053 enum {
23054     ROAM_FILTER_OP_BITMAP_BLACK_LIST =   0x1,
23055     ROAM_FILTER_OP_BITMAP_WHITE_LIST =   0x2,
23056     ROAM_FILTER_OP_BITMAP_PREFER_BSSID = 0x4,
23057     ROAM_FILTER_OP_BITMAP_LCA_DISALLOW = 0x8,
23058     ROAM_FILTER_OP_BITMAP_RSSI_REJECTION_OCE = 0x10,
23059 };
23060 
23061 /** lca_enable_source_bitmap */
23062 #define WMI_ROAM_LCA_DISALLOW_SOURCE_PER        0x1
23063 #define WMI_ROAM_LCA_DISALLOW_SOURCE_BMISS      0x2
23064 #define WMI_ROAM_LCA_DISALLOW_SOURCE_LOW_RSSI   0x4
23065 #define WMI_ROAM_LCA_DISALLOW_SOURCE_HIGH_RSSI  0x8
23066 #define WMI_ROAM_LCA_DISALLOW_SOURCE_PERIODIC   0x10
23067 #define WMI_ROAM_LCA_DISALLOW_SOURCE_MAWC       0x20 /* MAWC = Motion Aided Wifi connectivity */
23068 #define WMI_ROAM_LCA_DISALLOW_SOURCE_DENSE      0x40
23069 #define WMI_ROAM_LCA_DISALLOW_SOURCE_BACKGROUND 0x80
23070 #define WMI_ROAM_LCA_DISALLOW_SOURCE_FORCED     0x100
23071 
23072 typedef struct {
23073     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_rejection_list_config_param */
23074     A_UINT32 tlv_header;
23075      /** BSSID of AP, who reject (re-)assoc due to low RSSI */
23076     wmi_mac_addr bssid;
23077     /** Disallowed AP for certain duration, in units of milliseconds */
23078     A_UINT32 remaining_disallow_duration;
23079    /** AP will be allowed for candidate, when AP RSSI better than expected RSSI units in dBm */
23080     A_INT32 requested_rssi;
23081 } wmi_roam_rejection_list_config_param;
23082 typedef wmi_roam_rejection_list_config_param wmi_roam_rssi_rejection_oce_config_param; /* retain old struct name as an alias for the new name */
23083 
23084 typedef struct {
23085     A_UINT32 tlv_header;     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_filter_list_fixed_param */
23086     A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming filter is adopted */
23087     A_UINT32 flags; /** flags for filter */
23088     A_UINT32 op_bitmap; /** 32 bit bitmap to be set on. bit0 = first param, bit 1 = second param...etc. Can be or'ed */
23089     A_UINT32 num_bssid_black_list; /* number of blacklist in the TLV variable bssid_black_list */
23090     A_UINT32 num_ssid_white_list; /* number of whitelist in the TLV variable ssid_white_list */
23091     A_UINT32 num_bssid_preferred_list; /* only for lfr 3.0. number of preferred list & factor in the TLV */
23092     A_UINT32 num_rssi_rejection_ap; /** number of list of AP who rejected STA due to low RSSI */
23093     A_UINT32 delta_rssi; /** (dB units) when AB in RSSI blacklist improved by at least delta_rssi, it will be removed from blacklist */
23094     /**
23095      * TLV (tag length value) parameters follows roam_filter_list_cmd
23096      * The TLV's are:
23097      *     wmi_mac_addr bssid_black_list[];
23098      *     wmi_ssid ssid_white_list[];
23099      *     wmi_mac_addr bssid_preferred_list[];
23100      *     A_UINT32 bssid_preferred_factor[];
23101      *     wmi_roam_lca_disallow_config_tlv_param lca_disallow_param[0/1] (opt)
23102      *     wmi_roam_rejection_list_config_param rssi_rejection_list[]
23103      */
23104 } wmi_roam_filter_fixed_param;
23105 
23106 typedef struct {
23107     A_UINT32 tlv_header;        /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_lca_disallow_config_tlv_param */
23108     A_UINT32 disallow_duration; /** How long LCA AP will be disallowed before it can be a roaming candidate again, in units of seconds */
23109     A_UINT32 rssi_channel_penalization; /** How much RSSI will be penalized if candidate(s) are found in the same channel as disallowed AP's, in units of db */
23110     A_UINT32 num_disallowed_aps; /** How many APs the target should maintain in its LCA (Last Connected AP) list */
23111     A_UINT32 disallow_lca_enable_source_bitmap; /** disallow LCA logic is enabled only when trigger sources are matched with corresponding bit (see WMI_ROAM_LCA_DISALLOW_SOURCE constants) */
23112 } wmi_roam_lca_disallow_config_tlv_param;
23113 
23114 typedef struct {
23115     A_UINT8 address[4]; /* IPV4 address in Network Byte Order */
23116 } WMI_IPV4_ADDR;
23117 
23118 typedef struct _WMI_IPV6_ADDR {
23119     A_UINT8 address[16]; /* IPV6 in Network Byte Order */
23120 } WMI_IPV6_ADDR;
23121 
23122 /* flags for subnet change detection */
23123 #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED 0
23124 #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED 1
23125 /* bit 2 to bit 31 are reserved */
23126 
23127 /* set IPv4 enabled/disabled flag and get the flag */
23128 #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) do { \
23129     (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
23130 } while (0)
23131 
23132 #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_DISABLED(flag) do { \
23133     (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
23134 } while (0)
23135 
23136 #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) \
23137     ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED))
23138 
23139 /* set IPv6 enabled flag, disabled and get the flag */
23140 #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) do { \
23141     (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
23142 } while (0)
23143 
23144 #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_DISABLED(flag) do { \
23145     (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
23146 } while (0)
23147 
23148 #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) \
23149     ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED))
23150 
23151 /**
23152  * WMI_ROAM_SUBNET_CHANGE_CONFIG : Pass the gateway IP and MAC addresses
23153  *  to FW. FW uses these parameters for subnet change detection.
23154  */
23155 typedef struct {
23156     A_UINT32      tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_subnet_change_config_fixed_param */
23157     /** unique id identifying the VDEV, generated by the caller */
23158     A_UINT32      vdev_id;
23159     /** IPv4/IPv6 enabled/disabled */
23160     /** This flag sets the WMI_SET_ROAM_SUBNET_CHANGE_FLAG_xxx_ENABLED/DISABLED */
23161     A_UINT32      flag;
23162     /** Gateway MAC address */
23163     wmi_mac_addr  inet_gw_mac_addr;
23164     /** IP addresses */
23165     WMI_IPV4_ADDR inet_gw_ip_v4_addr;
23166     WMI_IPV6_ADDR inet_gw_ip_v6_addr;
23167     /** Number of software retries for ARP/Neighbor solicitation request */
23168     A_UINT32      max_retries;
23169     /** timeout in milliseconds for each ARP request*/
23170     A_UINT32      timeout;
23171     /** number of skipped aps **/
23172     A_UINT32      num_skip_subnet_change_detection_bssid_list;
23173 /**
23174  * TLV (tag length value) parameters follows roam_subnet_change_config_cmd
23175  * structure. The TLV's are:
23176  *     wmi_mac_addr skip_subnet_change_detection_bssid_list [];
23177  **/
23178 } wmi_roam_subnet_change_config_fixed_param;
23179 
23180 typedef enum {
23181     /** No change in scan mode, use legacy modes */
23182     ROAM_TRIGGER_SCAN_MODE_NONE = 0,
23183     /** Trigger only partial roam scan */
23184     ROAM_TRIGGER_SCAN_MODE_PARTIAL,
23185     /** Trigger only FULL roam scan */
23186     ROAM_TRIGGER_SCAN_MODE_FULL,
23187     /** Don't trigger any roam scan and disconnect from AP */
23188     ROAM_TRIGGER_SCAN_MODE_NO_SCAN_DISCONNECTION,
23189 } WMI_ROAM_TRIGGER_SCAN_MODE;
23190 
23191 typedef struct {
23192     A_UINT32 tlv_header;     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_configure_roam_trigger_parameters */
23193     A_UINT32 trigger_reason; /** Roam trigger reason from WMI_ROAM_TRIGGER_REASON_ID */
23194     A_UINT32 enable;         /** 0 - Disable, non-zero - enable */
23195     A_UINT32 scan_mode;      /** Scan mode from WMI_ROAM_TRIGGER_SCAN_MODE */
23196     /** consider roam trigger if connected AP RSSI is worse than trigger_rssi_threshold */
23197     A_INT32 trigger_rssi_threshold;      /* Units in dBm */
23198     /*
23199      * Consider 2.4GHz AP as roam candidate only if AP RSSI is better than
23200      * cand_ap_min_rssi_threshold
23201      * If valid (non-zero) cand_ap_min_rssi_threshold_5g and
23202      * cand_ap_min_rssi_threshold_6g values are provided,
23203      * then cand_ap_min_rssi_threshold should only be applied to 2.4 GHz APs.
23204      * But if cand_ap_min_rssi_threshold_5g and cand_ap_min_rssi_threshold_6g
23205      * are zeros, then cand_ap_min_rssi_threshold should be applied to all APs.
23206      */
23207     A_INT32 cand_ap_min_rssi_threshold; /* Units in dBm */
23208     /* Roam score delta in %.
23209      * Consider AP as roam candidate only if AP score is at least
23210      * roam_score_delta % better than connected AP score.
23211      * Ex: roam_score_delta = 20, and connected AP score is 4000,
23212      * then consider candidate AP only if its score is at least
23213      * 4800 (= 4000 * 120%)
23214      */
23215     A_UINT32 roam_score_delta_percentage;
23216     /* Reason code to be filled in the response frame from STA.
23217        Ex: Reason code in the BTM response frame
23218        Valid values are 0 - 255 */
23219     A_UINT32 reason_code;
23220     /*
23221      * Consider 5GHz AP as roam candidate only if AP RSSI is better than
23222      * cand_ap_min_rssi_threshold_5g
23223      */
23224     A_INT32 cand_ap_min_rssi_threshold_5g; /* Units in dBm */
23225     /*
23226      * Consider 6 GHz AP as roam candidate only if AP RSSI is better than
23227      * cand_ap_min_rssi_threshold_6g
23228      */
23229     A_INT32 cand_ap_min_rssi_threshold_6g; /* Units in dBm */
23230 } wmi_configure_roam_trigger_parameters;
23231 
23232 /**
23233  * WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON:
23234  * Enable or disable roaming triggers in FW.
23235  */
23236 typedef struct {
23237     A_UINT32      tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_enable_disable_trigger_reason_fixed_param */
23238     /** unique id identifying the VDEV, generated by the caller */
23239     A_UINT32      vdev_id;
23240     /**
23241      * Bitmask (with enum WMI_ROAM_TRIGGER_REASON_ID identifying the bit
23242      * positions) showing for which roam_trigger_reasons are enabled by
23243      * bit value equal 0x1, and which roam_trigger_reasons are disabled by
23244      * bit value equal 0x0.
23245      */
23246     A_UINT32      trigger_reason_bitmask;
23247 
23248 /**
23249  * The following TLVs will follow this fixed_param TLV:
23250  *
23251  * wmi_configure_roam_trigger_parameters config_roam_trigger_param[]
23252  *     Roam trigger configuration per roam trigger.
23253  *     The number of elements in this TLV array is limited to
23254  *     WMI_ROAM_TRIGGER_EXT_REASON_MAX
23255  */
23256 } wmi_roam_enable_disable_trigger_reason_fixed_param;
23257 
23258 /** WMI_PROFILE_MATCH_EVENT: offload scan
23259  * generated when ever atleast one of the matching profiles is found
23260  * in recent NLO scan. no data is carried with the event.
23261  */
23262 
23263 /** P2P specific commands */
23264 
23265 /**
23266  * WMI_P2P_DEV_SET_DEVICE_INFO : p2p device info, which will be used by
23267  * FW to generate P2P IE tobe carried in probe response frames.
23268  * FW will respond to probe requests while in listen state.
23269  */
23270 typedef struct {
23271     /* number of secondary device types,supported */
23272     A_UINT32 num_secondary_dev_types;
23273 /**
23274  * followed by 8 bytes of primary device id and
23275  * num_secondary_dev_types * 8 bytes of secondary device
23276  * id.
23277  */
23278 } wmi_p2p_dev_set_device_info;
23279 
23280 /** WMI_P2P_DEV_SET_DISCOVERABILITY: enable/disable discoverability
23281  *  state. if enabled, an active STA/AP will respond to P2P probe requests on
23282  *  the operating channel of the VDEV.
23283  */
23284 
23285 typedef struct {
23286     /* 1:enable disoverability, 0:disable discoverability */
23287     A_UINT32 enable_discoverability;
23288 } wmi_p2p_set_discoverability;
23289 
23290 /** WMI_P2P_GO_SET_BEACON_IE: P2P IE to be added to
23291  *  beacons generated by FW. used in FW beacon mode.
23292  *  the FW will add this IE to beacon in addition to the beacon
23293  *  template set by WMI_BCN_TMPL_CMDID command.
23294  */
23295 typedef struct {
23296     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_go_set_beacon_ie_fixed_param  */
23297     /** unique id identifying the VDEV, generated by the caller */
23298     A_UINT32 vdev_id;
23299     /* ie length */
23300     A_UINT32 ie_buf_len;
23301 /* Following this structure is the TLV byte stream of ie data of length ie_buf_len:
23302  *     A_UINT8 ie_data[]; <-- length in byte given by field num_data.
23303  */
23304 
23305 } wmi_p2p_go_set_beacon_ie_fixed_param;
23306 
23307 /** WMI_P2P_GO_PROBE_RESP_IE: P2P IE to be added to
23308  *  probe response generated by FW. used in FW beacon mode.
23309  *  the FW will add this IE to probe response in addition to the probe response
23310  *  template set by WMI_PRB_TMPL_CMDID command.
23311  */
23312 typedef struct {
23313     /** unique id identifying the VDEV, generated by the caller */
23314     A_UINT32 vdev_id;
23315     /* ie length */
23316     A_UINT32 ie_buf_len;
23317 /*followed by  byte stream of ie data of length ie_buf_len */
23318 } wmi_p2p_go_set_probe_resp_ie;
23319 
23320 /** WMI_P2P_SET_VENDOR_IE_DATA_CMDID: Vendor specific P2P IE data, which will
23321  *  be used by the FW to parse the P2P NoA attribute in beacons, probe responses
23322  *  and action frames received by the P2P Client.
23323  *  Note: This command is currently used only for Apple P2P implementation.
23324  */
23325 typedef struct {
23326     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_vendor_ie_data_cmd_fixed_param */
23327     /** OS specific P2P IE OUI (3 bytes) + OUI type (1 byte)  */
23328     A_UINT32 p2p_ie_oui_type;
23329     /** OS specific NoA Attribute ID */
23330     A_UINT32 p2p_noa_attribute;
23331 } wmi_p2p_set_vendor_ie_data_cmd_fixed_param;
23332 
23333 /*----P2P disc offload definition  ----*/
23334 
23335 typedef struct {
23336     A_UINT32 pattern_type;
23337 /**
23338  * TLV (tag length value) parameters follow the pattern structure.
23339  * TLV can contain bssid list, ssid list and
23340  * ie. the TLV tags are defined above;
23341  */
23342 } wmi_p2p_disc_offload_pattern_cmd;
23343 
23344 typedef struct {
23345     /* unique id identifying the VDEV, generated by the caller */
23346     A_UINT32 vdev_id;
23347     /* mgmt type of the ie*/
23348     A_UINT32 mgmt_type;
23349     /* ie length */
23350     A_UINT32 ie_buf_len;
23351 /*followed by  byte stream of ie data of length ie_buf_len */
23352 } wmi_p2p_disc_offload_appie_cmd;
23353 
23354 typedef struct {
23355     /* enable/disable p2p find offload*/
23356     A_UINT32 enable;
23357     /* unique id identifying the VDEV, generated by the caller */
23358     A_UINT32 vdev_id;
23359     /* p2p find type */
23360     A_UINT32 disc_type;
23361     /* p2p find perodic */
23362     A_UINT32 perodic;
23363     /* p2p find listen channel in MHz */
23364     A_UINT32 listen_channel;
23365     /* p2p find full channel number */
23366     A_UINT32 num_scan_chans;
23367 /**
23368  * TLV (tag length value) parameters follow the pattern structure.
23369  * TLV  contain channel list in MHz
23370  */
23371 } wmi_p2p_disc_offload_config_cmd;
23372 
23373 /*----P2P OppPS definition  ----*/
23374 typedef struct {
23375     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_oppps_cmd_fixed_param  */
23376     A_UINT32 tlv_header;
23377     /* unique id identifying the VDEV, generated by the caller */
23378     A_UINT32 vdev_id;
23379     /* OppPS attributes */
23380     /** Bit  0:     Indicate enable/disable of OppPS
23381      *  Bits 7-1:   Ctwindow in TUs
23382      *  Bits 31-8:  Reserved
23383      */
23384     A_UINT32    oppps_attr;
23385 } wmi_p2p_set_oppps_cmd_fixed_param;
23386 
23387 #define WMI_UNIFIED_OPPPS_ATTR_ENALBED      0x1
23388 #define WMI_UNIFIED_OPPPS_ATTR_ENALBED_S    0
23389 
23390 #define WMI_UNIFIED_OPPPS_ATTR_IS_ENABLED(hdr)                      \
23391             WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_ENALBED)
23392 
23393 #define WMI_UNIFIED_OPPPS_ATTR_ENABLED_SET(hdr)                 \
23394             WMI_F_RMW((hdr)->oppps_attr, 0x1,                   \
23395                 WMI_UNIFIED_OPPPS_ATTR_ENALBED);
23396 
23397 #define WMI_UNIFIED_OPPPS_ATTR_CTWIN        0xfe
23398 #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_S      1
23399 
23400 #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_GET(hdr)                           \
23401             WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_CTWIN)
23402 
23403 #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_SET(hdr, v)                \
23404             WMI_F_RMW((hdr)->oppps_attr, (v) & 0x7f,            \
23405                 WMI_UNIFIED_OPPPS_ATTR_CTWIN);
23406 
23407 typedef enum p2p_lo_start_ctrl_flags_e {
23408     P2P_LO_START_CTRL_FLAG_FLUSH_LISTEN_RESULT = 1 << 0,  /* flush prob. req when host is awake */
23409 } p2p_lo_start_ctrl_flags;
23410 
23411 #define P2P_LO_PER_DEV_TYPE_LEN     8
23412 #define P2P_LO_DEV_TYPES_COUNT_MAX  10
23413 #define P2P_LO_DEV_TYPES_LEN_MAX    (P2P_LO_PER_DEV_TYPE_LEN * P2P_LO_DEV_TYPES_COUNT_MAX)
23414 #define P2P_LO_PROB_RESP_MAX_LEN    512
23415 
23416 typedef struct {
23417     A_UINT32 tlv_header;
23418     A_UINT32 vdev_id;
23419     A_UINT32 ctl_flags; /* refer to enum_p2p_lo_start_ctrl_flags_e */
23420     A_UINT32 channel;   /* MHz */
23421     A_UINT32 period;    /* ms */
23422     A_UINT32 interval;  /* ms, interval should be larger than period */
23423     A_UINT32 count;     /* 0 means forever */
23424     /*
23425      * device_types_len specifies the number of bytes in the
23426      * device_types_data[] byte-array TLV that follows this TLV.
23427      * The data in device_types_data[] is in 8-byte elements, so
23428      * device_types_len will be a multiple of 8.
23429      * Refer to P2P_LO_DEV_TYPES_LEN_MAX
23430      */
23431     A_UINT32 device_types_len;
23432     /*
23433      * prob_resp_len specifies the number of bytes in the
23434      * prob_resp_data[] byte-array TLV that follows this TLV.
23435      * Refer to P2P_LO_PROB_RESP_MAX_LEN
23436      */
23437     A_UINT32 prob_resp_len;
23438     /*
23439      * Two other TLVs follow this TLV:
23440      * A_UINT8 device_types_data[device_types_len];
23441      * A_UINT8 prob_resp_data[prob_resp_len];
23442      *     The information in device_types_data[] and prob_resp_data[]
23443      *     needs to be provided to the target in over-the-air byte order.
23444      *     On a big-endian host, if device_types_data and prob_resp_data
23445      *     are initially in the correct over-the-air byte order,
23446      *     the automatic byteswap for endianness-correction during WMI
23447      *     message download will mess up the byte order.
23448      *     Thus, a big-endian host needs to explicitly byte-swap the bytes
23449      *     within each quad-byte segment of device_types_data[] and
23450      *     prob_resp_data[], so that the automatic byte-swap applied during
23451      *     WMI download from a big-endian host to the little-endian target
23452      *     will restore device_types_data and prob_resp_data into the
23453      *     correct byte ordering.
23454      */
23455 } wmi_p2p_lo_start_cmd_fixed_param;
23456 
23457 typedef struct {
23458     A_UINT32 tlv_header;
23459     A_UINT32 vdev_id;
23460 } wmi_p2p_lo_stop_cmd_fixed_param;
23461 
23462 typedef enum p2p_lo_stopped_reason_e {
23463     P2P_LO_STOPPED_REASON_COMPLETE = 0,   /* finished as scheduled */
23464     P2P_LO_STOPPED_REASON_RECV_STOP_CMD,  /* host stops it */
23465     P2P_LO_STOPPED_REASON_INVALID_LO_PAR, /* invalid listen offload par */
23466     P2P_LO_STOPPED_REASON_FW_NOT_SUPPORT, /* vdev cannot support it right now */
23467 } p2p_lo_stopped_reason;
23468 
23469 typedef struct {
23470     A_UINT32 tlv_header;
23471     A_UINT32 vdev_id;
23472     A_UINT32 reason;/* refer to p2p_lo_stopped_reason_e */
23473 } wmi_p2p_lo_stopped_event_fixed_param;
23474 
23475 typedef enum {
23476     WMI_MNT_FILTER_CONFIG_MANAGER,
23477     WMI_MNT_FILTER_CONFIG_CONTROL,
23478     WMI_MNT_FILTER_CONFIG_DATA,
23479     WMI_MNT_FILTER_CONFIG_ALL,
23480     WMI_MNT_FILTER_CONFIG_UNKNOWN,
23481 } WMI_MNT_FILTER_CONFIG_TYPE;
23482 
23483 typedef struct {
23484     A_UINT32 tlv_header;
23485     A_UINT32 vdev_id;
23486     A_UINT32 clear_or_set;
23487     A_UINT32 configure_type; /* see WMI_MNT_FILTER_CONFIG_TYPE */
23488 } wmi_mnt_filter_cmd_fixed_param;
23489 
23490 typedef struct {
23491     A_UINT32 time32; /* upper 32 bits of time stamp */
23492     A_UINT32 time0;  /* lower 32 bits of time stamp */
23493 } A_TIME64;
23494 
23495 typedef enum wmi_peer_sta_kickout_reason {
23496     WMI_PEER_STA_KICKOUT_REASON_UNSPECIFIED = 0,        /* default value to preserve legacy behavior */
23497     WMI_PEER_STA_KICKOUT_REASON_XRETRY = 1,
23498     WMI_PEER_STA_KICKOUT_REASON_INACTIVITY = 2,
23499     WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT = 3,
23500     WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT = 4,    /* TDLS peer has disappeared. All tx is failing */
23501     WMI_PEER_STA_KICKOUT_REASON_SA_QUERY_TIMEOUT = 5,
23502     WMI_PEER_STA_KICKOUT_REASON_ROAMING_EVENT = 6,      /* Directly connected peer has roamed to a repeater */
23503     WMI_PEER_STA_KICKOUT_REASON_PMF_ERROR = 7,          /* PMF error threshold is hit */
23504 } PEER_KICKOUT_REASON;
23505 
23506 typedef struct {
23507     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_kickout_event_fixed_param  */
23508     /** peer mac address */
23509     wmi_mac_addr peer_macaddr;
23510     /** Reason code, defined as above */
23511     A_UINT32 reason;
23512     /** RSSI of the last bcn (averaged) in dB. 0 means Noise Floor value */
23513     A_UINT32 rssi;
23514 } wmi_peer_sta_kickout_event_fixed_param;
23515 
23516 #define WMI_WLAN_PROFILE_MAX_HIST     3
23517 #define WMI_WLAN_PROFILE_MAX_BIN_CNT 32
23518 
23519 typedef struct _wmi_wlan_profile_t {
23520     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_t */
23521     A_UINT32 id;
23522     A_UINT32 cnt;
23523     A_UINT32 tot;
23524     A_UINT32 min;
23525     A_UINT32 max;
23526     A_UINT32 hist_intvl;
23527     A_UINT32 hist[WMI_WLAN_PROFILE_MAX_HIST];
23528 } wmi_wlan_profile_t;
23529 
23530 typedef struct _wmi_wlan_profile_ctx_t {
23531     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_ctx_t */
23532     A_UINT32 tot; /* time in us */
23533     A_UINT32 tx_msdu_cnt;
23534     A_UINT32 tx_mpdu_cnt;
23535     A_UINT32 tx_ppdu_cnt;
23536     A_UINT32 rx_msdu_cnt;
23537     A_UINT32 rx_mpdu_cnt;
23538     A_UINT32 bin_count;
23539 } wmi_wlan_profile_ctx_t;
23540 
23541 
23542 typedef struct {
23543     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_trigger_cmd_fixed_param */
23544     A_UINT32 enable;
23545 } wmi_wlan_profile_trigger_cmd_fixed_param;
23546 
23547 typedef struct {
23548     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_get_prof_data_cmd_fixed_param */
23549     A_UINT32 value;
23550 } wmi_wlan_profile_get_prof_data_cmd_fixed_param;
23551 
23552 typedef struct {
23553     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_set_hist_intvl_cmd_fixed_param */
23554     A_UINT32 profile_id;
23555     A_UINT32 value;
23556 } wmi_wlan_profile_set_hist_intvl_cmd_fixed_param;
23557 
23558 typedef struct {
23559     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_enable_profile_id_cmd_fixed_param */
23560     A_UINT32 profile_id;
23561     A_UINT32 enable;
23562 } wmi_wlan_profile_enable_profile_id_cmd_fixed_param;
23563 
23564 /*Wifi header is upto 26, LLC is 8, with 14 byte duplicate in 802.3 header, that's 26+8-14=20.
23565  146-128=18. So this means it is converted to non-QoS header. Riva FW take care of the QOS/non-QOS
23566  when comparing wifi header.*/
23567 /* NOTE: WOW_DEFAULT_BITMAP_PATTERN_SIZE(_DWORD) and WOW_DEFAULT_BITMASK_SIZE(_DWORD) can't be changed without breaking the compatibility */
23568 #define WOW_DEFAULT_BITMAP_PATTERN_SIZE      146
23569 #define WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD 37 /* Convert WOW_DEFAULT_EVT_BUF_SIZE into Int32 size */
23570 #define WOW_DEFAULT_BITMASK_SIZE             146
23571 #define WOW_DEFAULT_BITMASK_SIZE_DWORD        37
23572 #define WOW_MAX_BITMAP_FILTERS               32
23573 #define WOW_DEFAULT_MAGIG_PATTERN_MATCH_CNT  16
23574 #define WOW_EXTEND_PATTERN_MATCH_CNT    16
23575 #define WOW_SHORT_PATTERN_MATCH_CNT     8
23576 #define WOW_DEFAULT_EVT_BUF_SIZE             148  /* Maximum 148 bytes of the data is copied starting from header incase if the match is found.
23577                                                                                     The 148 comes from (128 - 14)  payload size  + 8bytes LLC + 26bytes MAC header*/
23578 #define WOW_DEFAULT_IOAC_PATTERN_SIZE  6
23579 #define WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD 2
23580 #define WOW_DEFAULT_IOAC_RANDOM_SIZE  6
23581 #define WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD 2
23582 #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE   120
23583 #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD 30
23584 #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE  32
23585 #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD 8
23586 #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE       32
23587 #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD 8
23588 #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE  128
23589 #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD 32
23590 
23591 typedef enum pattern_type_e {
23592     WOW_PATTERN_MIN = 0,
23593     WOW_BITMAP_PATTERN = WOW_PATTERN_MIN,
23594     WOW_IPV4_SYNC_PATTERN,
23595     WOW_IPV6_SYNC_PATTERN,
23596     WOW_WILD_CARD_PATTERN,
23597     WOW_TIMER_PATTERN,
23598     WOW_MAGIC_PATTERN,
23599     WOW_IPV6_RA_PATTERN,
23600     WOW_IOAC_PKT_PATTERN,
23601     WOW_IOAC_TMR_PATTERN,
23602     WOW_IOAC_SOCK_PATTERN,
23603     WOW_PATTERN_MAX
23604 } WOW_PATTERN_TYPE;
23605 
23606 typedef enum event_type_e {
23607     WOW_BMISS_EVENT = 0,          /*  0 */
23608     WOW_BETTER_AP_EVENT,          /*  1 */
23609     WOW_DEAUTH_RECVD_EVENT,       /*  2 */
23610     WOW_MAGIC_PKT_RECVD_EVENT,    /*  3 */
23611     WOW_GTK_ERR_EVENT,            /*  4 */
23612     WOW_FOURWAY_HSHAKE_EVENT,     /*  5 */
23613     WOW_EAPOL_RECVD_EVENT,        /*  6 */
23614     WOW_NLO_DETECTED_EVENT,       /*  7 */
23615     WOW_DISASSOC_RECVD_EVENT,     /*  8 */
23616     WOW_PATTERN_MATCH_EVENT,      /*  9 */
23617     WOW_CSA_IE_EVENT,             /* 10 */
23618     WOW_PROBE_REQ_WPS_IE_EVENT,   /* 11 */
23619     WOW_AUTH_REQ_EVENT,           /* 12 */
23620     WOW_ASSOC_REQ_EVENT,          /* 13 */
23621     WOW_HTT_EVENT,                /* 14 */
23622     WOW_RA_MATCH_EVENT,           /* 15 */
23623     WOW_HOST_AUTO_SHUTDOWN_EVENT, /* 16 */
23624     WOW_IOAC_MAGIC_EVENT,         /* 17 */
23625     WOW_IOAC_SHORT_EVENT,         /* 18 */
23626     WOW_IOAC_EXTEND_EVENT,        /* 19 */
23627     WOW_IOAC_TIMER_EVENT,         /* 20 */
23628     WOW_DFS_PHYERR_RADAR_EVENT,   /* 21 */
23629     WOW_BEACON_EVENT,             /* 22 */
23630     WOW_CLIENT_KICKOUT_EVENT,     /* 23 */
23631     WOW_NAN_EVENT,                /* 24 */
23632     WOW_EXTSCAN_EVENT,            /* 25 */
23633     WOW_IOAC_REV_KA_FAIL_EVENT,   /* 26 */
23634     WOW_IOAC_SOCK_EVENT,          /* 27 */
23635     WOW_NLO_SCAN_COMPLETE_EVENT,  /* 28 */
23636     WOW_NAN_DATA_EVENT,           /* 29 */
23637     WOW_NAN_RTT_EVENT, /* DEPRECATED, UNUSED; 30 */
23638     WOW_OEM_RESPONSE_EVENT = WOW_NAN_RTT_EVENT, /* reuse deprecated event value; 30 */
23639     WOW_TDLS_CONN_TRACKER_EVENT,  /* 31 */
23640     WOW_CRITICAL_LOG_EVENT,               /* 32 +  0 */
23641     WOW_CHIP_POWER_FAILURE_DETECT_EVENT,  /* 32 +  1 */
23642     WOW_11D_SCAN_EVENT,                   /* 32 +  2 */
23643     WOW_SAP_OBSS_DETECTION_EVENT,         /* 32 +  3 */
23644     WOW_BSS_COLOR_COLLISION_DETECT_EVENT, /* 32 +  4 */
23645     WOW_TKIP_MIC_ERR_FRAME_RECVD_EVENT,   /* 32 +  5 */
23646     WOW_ROAM_PREAUTH_START_EVENT,         /* 32 +  6 */
23647     WOW_ROAM_PMKID_REQUEST_EVENT,         /* 32 +  7 */
23648     WOW_DFS_CAC_COMPLETE_EVENT,           /* 32 +  8 */
23649     WOW_VDEV_DISCONNECT_EVENT,            /* 32 +  9 */
23650     WOW_TWT_EVENT,                        /* 32 + 10 */
23651     WOW_DCS_INTERFERENCE_DET,             /* 32 + 11 */
23652     WOW_ROAM_STATS_EVENT,                 /* 32 + 12 */
23653     WOW_RTT_11AZ_EVENT,                   /* 32 + 13 */
23654     WOW_P2P_NOA_EVENT,                    /* 32 + 14 */
23655     WOW_XGAP_EVENT,                       /* 32 + 15 */
23656 } WOW_WAKE_EVENT_TYPE;
23657 
23658 typedef enum wake_reason_e {
23659     WOW_REASON_UNSPECIFIED = -1,
23660     WOW_REASON_NLOD = 0,
23661     WOW_REASON_AP_ASSOC_LOST,
23662     WOW_REASON_LOW_RSSI,
23663     WOW_REASON_DEAUTH_RECVD,
23664     WOW_REASON_DISASSOC_RECVD,
23665     WOW_REASON_GTK_HS_ERR,
23666     WOW_REASON_EAP_REQ,
23667     WOW_REASON_FOURWAY_HS_RECV,
23668     WOW_REASON_TIMER_INTR_RECV,
23669     WOW_REASON_PATTERN_MATCH_FOUND,
23670     WOW_REASON_RECV_MAGIC_PATTERN,
23671     WOW_REASON_P2P_DISC,
23672     WOW_REASON_WLAN_HB,
23673     WOW_REASON_CSA_EVENT,
23674     WOW_REASON_PROBE_REQ_WPS_IE_RECV,
23675     WOW_REASON_AUTH_REQ_RECV,
23676     WOW_REASON_ASSOC_REQ_RECV,
23677     WOW_REASON_HTT_EVENT,
23678     WOW_REASON_RA_MATCH,
23679     WOW_REASON_HOST_AUTO_SHUTDOWN,
23680     WOW_REASON_IOAC_MAGIC_EVENT,
23681     WOW_REASON_IOAC_SHORT_EVENT,
23682     WOW_REASON_IOAC_EXTEND_EVENT,
23683     WOW_REASON_IOAC_TIMER_EVENT,
23684     WOW_REASON_ROAM_HO,
23685     WOW_REASON_DFS_PHYERR_RADADR_EVENT,
23686     WOW_REASON_BEACON_RECV,
23687     WOW_REASON_CLIENT_KICKOUT_EVENT,
23688     WOW_REASON_NAN_EVENT,
23689     WOW_REASON_EXTSCAN,
23690     WOW_REASON_RSSI_BREACH_EVENT,
23691     WOW_REASON_IOAC_REV_KA_FAIL_EVENT,
23692     WOW_REASON_IOAC_SOCK_EVENT,
23693     WOW_REASON_NLO_SCAN_COMPLETE,
23694     WOW_REASON_PACKET_FILTER_MATCH,
23695     WOW_REASON_ASSOC_RES_RECV,
23696     WOW_REASON_REASSOC_REQ_RECV,
23697     WOW_REASON_REASSOC_RES_RECV,
23698     WOW_REASON_ACTION_FRAME_RECV,
23699     WOW_REASON_BPF_ALLOW,
23700     WOW_REASON_NAN_DATA,
23701     WOW_REASON_NAN_RTT, /* DEPRECATED, UNUSED */
23702     WOW_REASON_OEM_RESPONSE_EVENT = WOW_REASON_NAN_RTT, /* reuse deprecated reason value */
23703     WOW_REASON_TDLS_CONN_TRACKER_EVENT,
23704     WOW_REASON_CRITICAL_LOG,
23705     WOW_REASON_P2P_LISTEN_OFFLOAD,
23706     WOW_REASON_NAN_EVENT_WAKE_HOST,
23707     WOW_REASON_CHIP_POWER_FAILURE_DETECT,
23708     WOW_REASON_11D_SCAN,
23709     WOW_REASON_THERMAL_CHANGE,
23710     WOW_REASON_OIC_PING_OFFLOAD,
23711     WOW_REASON_WLAN_DHCP_RENEW,
23712     WOW_REASON_SAP_OBSS_DETECTION,
23713     WOW_REASON_BSS_COLOR_COLLISION_DETECT,
23714     WOW_REASON_TKIP_MIC_ERR_FRAME_RECVD_DETECT,
23715     WOW_REASON_WLAN_MD, /* motion detected */
23716     WOW_REASON_WLAN_BL, /* baselining done */
23717     WOW_REASON_NTH_BCN_OFLD, /* nth beacon forward to host */
23718     WOW_REASON_PKT_CAPTURE_MODE_WAKE,
23719     WOW_REASON_PAGE_FAULT, /* Host wake up due to page fault */
23720     WOW_REASON_ROAM_PREAUTH_START,
23721     WOW_REASON_ROAM_PMKID_REQUEST,
23722     WOW_REASON_RFKILL,
23723     WOW_REASON_DFS_CAC,
23724     WOW_REASON_VDEV_DISCONNECT,
23725     WOW_REASON_LOCAL_DATA_UC_DROP,
23726     WOW_REASON_GENERIC_WAKE, /* A generic reason that host should be woken up */
23727     WOW_REASON_ERR_PKT_TRIGGERED_WAKEUP,
23728     WOW_REASON_TWT,
23729     WOW_REASON_FATAL_EVENT_WAKE,
23730     WOW_REASON_DCS_INT_DET,
23731     WOW_REASON_ROAM_STATS,
23732     WOW_REASON_MDNS_WAKEUP,
23733     WOW_REASON_RTT_11AZ,
23734     WOW_REASON_P2P_NOA_UPDATE,
23735     /* When Host configured timer elapsed for delayed wakeup */
23736     WOW_REASON_DELAYED_WAKEUP_HOST_CFG_TIMER_ELAPSED,
23737     /* Data store list is full, so Host wakeup should be triggered */
23738     WOW_REASON_DELAYED_WAKEUP_DATA_STORE_LIST_FULL,
23739     /* Sched PM FW initiated termination event */
23740     WOW_REASON_SCHED_PM_TERMINATED,
23741     /* XGAP entry/exit response */
23742     WOW_REASON_XGAP,
23743     /* COEX channel avoid event */
23744     WOW_REASON_COEX_CHAVD,
23745     /* vdev repurpose request event */
23746     WOW_REASON_VDEV_REPURPOSE,
23747     /* STX High duty cycle event */
23748     WOW_REASON_STX_WOW_HIGH_DUTY_CYCLE,
23749     /* WoW exit reason MCC lite */
23750     WOW_REASON_MCC_LITE,
23751 
23752     /* add new WOW_REASON_ defs before this line */
23753     WOW_REASON_MAX,
23754     WOW_REASON_DEBUG_TEST = 0xFF,
23755 } WOW_WAKE_REASON_TYPE;
23756 
23757 
23758 typedef enum {
23759     WOW_IFACE_PAUSE_ENABLED,
23760     WOW_IFACE_PAUSE_DISABLED
23761 } WOW_IFACE_STATUS;
23762 
23763 enum {
23764     WMI_WOW_FLAG_IGNORE_PCIE_RESET          = 0x00000001, /* some win10 platform will not assert pcie_reset for wow.*/
23765     /* WMI_WOW_FLAG_SEND_PM_PME
23766      * Some platforms have issues if the PM_PME message is sent after WoW,
23767      * so don't send PM_PME after WoW unless the host uses this flag
23768      * to request it.
23769      */
23770     WMI_WOW_FLAG_SEND_PM_PME                = 0x00000002,
23771     /* Flag to indicate unit test */
23772     WMI_WOW_FLAG_UNIT_TEST_ENABLE           = 0x00000004,
23773     /* Force HTC wakeup */
23774     WMI_WOW_FLAG_DO_HTC_WAKEUP              = 0x00000008,
23775     /* Enable L1SS sleep for PCIE DRV case */
23776     WMI_WOW_FLAG_ENABLE_DRV_PCIE_L1SS_SLEEP = 0x00000010,
23777     /*
23778      * To differentiate system suspend Vs RTPM BIT set -
23779      * System Suspend WOW, BIT Reset- RTPM (DRV)
23780      */
23781     WMI_WOW_FLAG_SYSTEM_SUSPEND_WOW         = 0x00000020,
23782     /*
23783      * Feature flag for INI enable_mod_dtim_on_system_suspend
23784      * This flag/bit will be set if INI settings enable mod_dtim_on_sys_suspend.
23785      */
23786     WMI_WOW_FLAG_MOD_DTIM_ON_SYS_SUSPEND    = 0x00000040,
23787     /*
23788      * Forced dtim in suspend mode enable Flag.
23789      * setDtimInSuspendMode
23790      */
23791     WMI_WOW_FLAG_FORCED_DTIM_ON_SYS_SUSPEND = 0x00000080,
23792     /* Flag to force DPD lock. */
23793     WMI_WOW_FLAG_FORCED_DPD_LOCK            = 0x00000100,
23794     /*
23795      * Feature flag for INI 'enable_teles_dtim_on_system_suspend'
23796      * This flag/bit will be set if INI 'enable_teles_dtim_on_system_suspend'
23797      * is enabled.
23798      */
23799     WMI_WOW_FLAG_TELES_DTIM_ON_SYS_SUSPEND  = 0x00000200,
23800 };
23801 
23802 typedef struct {
23803     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_cmd_fixed_param  */
23804     A_UINT32 enable;
23805     A_UINT32 pause_iface_config;
23806     A_UINT32 flags;  /* WMI_WOW_FLAG enums */
23807 } wmi_wow_enable_cmd_fixed_param;
23808 
23809 typedef enum {
23810     WMI_WOW_RESUME_FLAG_TX_DATA          = 0x00000001, /* TX data pending to be sent in resume */
23811 } WMI_WOW_RESUME_FLAG_ENUM;
23812 
23813 /* wow nack reason codes */
23814 typedef enum {
23815     /* WoW error due to unnkown reason */
23816     WMI_WOW_NON_ACK_REASON_UNKNOWN = 0,
23817 
23818     /* WoW error due to TX failure */
23819     WMI_WOW_NON_ACK_REASON_TX = 1,
23820 
23821     /* WoW error due to some data blocked */
23822     WMI_WOW_NON_ACK_REASON_IS_BLOCK = 2,
23823 
23824     /* WoW error in WFA mode */
23825     WMI_WOW_NON_ACK_REASON_NOT_ALLOW = 3,
23826 
23827     /* WoW error mac operation fail */
23828     WMI_WOW_NON_ACK_REASON_HW_FAIL = 4,
23829 
23830     /* WoW error due to timeout */
23831     WMI_WOW_NON_ACK_REASON_TIMEOUT = 5,
23832 
23833     /* WoW error due to RTT or CFR capture active */
23834     WMI_WOW_NON_ACK_REASON_RTT_DMA = 6,
23835 
23836     /* WoW error due to roam module holding lock */
23837     WMI_WOW_NON_ACK_REASON_ROAM = 7,
23838 
23839     /* WoW error remote peer not sleeping */
23840     WMI_WOW_NON_ACK_REASON_PEER_ACTIVE = 8,
23841 
23842     /* WoW error due to WoW entry defer failed */
23843     WMI_WOW_NON_ACK_REASON_DEFER_FAILURE = 9,
23844 
23845     /* WoW error due to WoW entry defer timeout */
23846     WMI_WOW_NON_ACK_REASON_DEFER_TIMEOUT = 10,
23847 
23848     /* WoW error due to FATAL event */
23849     WMI_WOW_NON_ACK_REASON_FATAL_EVENT = 11,
23850 
23851     /* WoW error if close to TBTT */
23852     WMI_WOW_NON_ACK_REASON_CLOSE_TO_TBTT = 12,
23853 } WMI_WOW_NACK_STATUS;
23854 
23855 typedef struct {
23856     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_hostwakeup_from_sleep_cmd_fixed_param  */
23857     /* reserved0:
23858      * This "reserved" field is not actually reserved any more.
23859      * It is being used in certain FW branches to hold flags, whose values
23860      * are defined by WMI_WOW_RESUME_FLAG_ENUM.
23861      */
23862     union {
23863         A_UINT32 reserved0;
23864         A_UINT32 flags;
23865     };
23866 } wmi_wow_hostwakeup_from_sleep_cmd_fixed_param;
23867 
23868 #define WOW_ICMPV6_NA_FILTER_DISABLE 0
23869 #define WOW_ICMPV6_NA_FILTER_ENABLE 1
23870 
23871 typedef struct {
23872     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param  */
23873     A_UINT32 vdev_id;
23874     A_UINT32 enable; /* WOW_ICMPV6_NA_FILTER_ENABLE/DISABLE */
23875 } wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param;
23876 
23877 typedef struct bitmap_pattern_s {
23878     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_BITMAP_PATTERN_T */
23879     A_UINT32 patternbuf[WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD];
23880     A_UINT32 bitmaskbuf[WOW_DEFAULT_BITMASK_SIZE_DWORD];
23881     A_UINT32 pattern_offset;
23882     A_UINT32 pattern_len;
23883     A_UINT32 bitmask_len;
23884     A_UINT32 pattern_id; /* must be less than max_bitmap_filters */
23885 } WOW_BITMAP_PATTERN_T;
23886 
23887 typedef struct ipv4_sync_s {
23888     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV4_SYNC_PATTERN_T */
23889     A_UINT32 ipv4_src_addr;
23890     A_UINT32 ipv4_dst_addr;
23891     A_UINT32 tcp_src_prt;
23892     A_UINT32 tcp_dst_prt;
23893 } WOW_IPV4_SYNC_PATTERN_T;
23894 
23895 typedef struct ipv6_sync_s {
23896     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV6_SYNC_PATTERN_T */
23897     A_UINT32 ipv6_src_addr[4];
23898     A_UINT32 ipv6_dst_addr[4];
23899     A_UINT32 tcp_src_prt;
23900     A_UINT32 tcp_dst_prt;
23901 } WOW_IPV6_SYNC_PATTERN_T;
23902 
23903 typedef struct WOW_MAGIC_PATTERN_CMD
23904 {
23905     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_MAGIC_PATTERN_CMD */
23906     wmi_mac_addr macaddr;
23907 } WOW_MAGIC_PATTERN_CMD;
23908 
23909 typedef enum wow_ioac_pattern_type {
23910     WOW_IOAC_MAGIC_PATTERN = 1,
23911     WOW_IOAC_SHORT_PATTERN,
23912     WOW_IOAC_EXTEND_PATTERN,
23913 } WOW_IOAC_PATTERN_TYPE;
23914 
23915 typedef struct ioac_sock_pattern_s {
23916     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_SOCK_PATTERN_T */
23917     A_UINT32 id;
23918     A_UINT32 local_ipv4;
23919     A_UINT32 remote_ipv4;
23920     A_UINT32 local_port;
23921     A_UINT32 remote_port;
23922     A_UINT32 pattern_len; /* units = bytes */
23923     A_UINT32 pattern[WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD];
23924     WMI_IPV6_ADDR local_ipv6;
23925     WMI_IPV6_ADDR remote_ipv6;
23926     A_UINT32 ack_nak_len;
23927     A_UINT32 ackpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
23928     A_UINT32 nakpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
23929 } WOW_IOAC_SOCK_PATTERN_T;
23930 
23931 typedef struct ioac_pkt_pattern_s {
23932     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_PKT_PATTERN_T */
23933     A_UINT32 pattern_type;
23934     A_UINT32 pattern[WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD];
23935     A_UINT32 random[WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD];
23936     A_UINT32 pattern_len;
23937     A_UINT32 random_len;
23938 } WOW_IOAC_PKT_PATTERN_T;
23939 
23940 typedef struct ioac_tmr_pattern_s {
23941     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_TMR_PATTERN_T */
23942     A_UINT32 wake_in_s;
23943     A_UINT32 vdev_id;
23944 } WOW_IOAC_TMR_PATTERN_T;
23945 
23946 typedef struct {
23947     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param */
23948     A_UINT32 nID;
23949 } WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param;
23950 
23951 typedef struct {
23952     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param */
23953     A_UINT32 nID;
23954 } WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param;
23955 
23956 typedef struct ioac_keepalive_s {
23957     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_KEEPALIVE_T */
23958     A_UINT32 keepalive_pkt_buf[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD];
23959     A_UINT32 keepalive_pkt_len;
23960     A_UINT32 period_in_ms;
23961     A_UINT32 vdev_id;
23962     A_UINT32 max_loss_cnt;
23963     A_UINT32 local_ipv4;
23964     A_UINT32 remote_ipv4;
23965     A_UINT32 local_port;
23966     A_UINT32 remote_port;
23967     A_UINT32 recv_period_in_ms;
23968     A_UINT32 rev_ka_size;
23969     A_UINT32 rev_ka_data[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD];
23970     WMI_IPV6_ADDR local_ipv6;
23971     WMI_IPV6_ADDR remote_ipv6;
23972 } WMI_WOW_IOAC_KEEPALIVE_T;
23973 
23974 typedef struct {
23975     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param */
23976     A_UINT32 vdev_id;
23977     A_UINT32 pattern_type;
23978 /*
23979  * Following this struct are these TLVs. Note that they are all array of structures
23980  * but can have at most one element. Which TLV is empty or has one element depends
23981  * on the field pattern_type. This is to emulate an union.
23982  *     WOW_IOAC_PKT_PATTERN_T pattern_info_pkt[];
23983  *     WOW_IOAC_TMR_PATTERN_T pattern_info_tmr[];
23984  */
23985 } WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param;
23986 
23987 typedef struct {
23988     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param */
23989     A_UINT32 vdev_id;
23990     A_UINT32 pattern_type;
23991     A_UINT32 pattern_id;
23992 } WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param;
23993 
23994 typedef struct {
23995     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_PATTERN_CMD_fixed_param */
23996     A_UINT32 vdev_id;
23997     A_UINT32 pattern_id;
23998     A_UINT32 pattern_type;
23999 /*
24000  * Following this struct are these TLVs. Note that they are all array of structures
24001  * but can have at most one element. Which TLV is empty or has one element depends
24002  * on the field pattern_type. This is to emulate an union.
24003  *     WOW_BITMAP_PATTERN_T       pattern_info_bitmap[];
24004  *     WOW_IPV4_SYNC_PATTERN_T    pattern_info_ipv4[];
24005  *     WOW_IPV6_SYNC_PATTERN_T    pattern_info_ipv6[];
24006  *     WOW_MAGIC_PATTERN_CMD      pattern_info_magic_pattern[];
24007  *     A_UINT32                   pattern_info_timeout[];
24008  *     A_UINT32                   ra_ratelimit_interval;
24009  */
24010 } WMI_WOW_ADD_PATTERN_CMD_fixed_param;
24011 
24012 typedef struct {
24013     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_DEL_PATTERN_CMD_fixed_param */
24014     A_UINT32 vdev_id;
24015     A_UINT32 pattern_id;
24016     A_UINT32 pattern_type;
24017 } WMI_WOW_DEL_PATTERN_CMD_fixed_param;
24018 
24019 #define WMI_WOW_MAX_EVENT_BM_LEN 4
24020 
24021 typedef struct {
24022     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_DEL_EVT_CMD_fixed_param  */
24023     A_UINT32 vdev_id;
24024     A_UINT32 is_add;
24025     union {
24026         A_UINT32 event_bitmap;
24027         A_UINT32 event_bitmaps[WMI_WOW_MAX_EVENT_BM_LEN];
24028     };
24029 } WMI_WOW_ADD_DEL_EVT_CMD_fixed_param;
24030 
24031 /*
24032  * This structure is used to set the pattern to check UDP packet in WOW mode.
24033  * If match, construct a tx frame in a local buffer to send through the peer
24034  * AP to the entity in the IP network that sent the UDP packet to this STA.
24035  */
24036 typedef struct {
24037     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param  */
24038     A_UINT32 vdev_id;
24039     A_UINT32 enable; /* 1: enable, 0: disable*/
24040     /* dest_port -
24041      * bits 7:0  contain the LSB of the UDP dest port,
24042      * bits 15:8 contain the MSB of the UDP dest port
24043      */
24044     A_UINT32 dest_port;
24045     A_UINT32 pattern_len; /* length in byte of pattern[] */
24046     A_UINT32 response_len; /* length in byte of response[] */
24047 /* Following this struct are the TLV's:
24048  *  A_UINT8 pattern[];  <-- payload of UDP packet to be checked, network byte order
24049  *  A_UINT8 response[]; <-- payload of UDP packet to be response, network byte order
24050  */
24051 } WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param;
24052 
24053 /*
24054  * This structure is used to set the pattern for WOW host wakeup pin pulse pattern confirguration.
24055  */
24056 typedef struct {
24057     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_HOSTWAKEUP_PIN_PATTERN_CONFIG_CMD_fixed_param  */
24058     A_UINT32 enable; /* 1: enable, 0: disable */
24059     A_UINT32 pin; /* pin for host wakeup */
24060     A_UINT32 interval_low; /* interval for keeping low voltage, unit: ms */
24061     A_UINT32 interval_high; /* interval for keeping high voltage, unit: ms */
24062     A_UINT32 repeat_cnt; /* repeat times for pulse (0xffffffff means forever) */
24063     A_UINT32 init_state; /* Sense of the GPIO pin used for host wakeups.
24064                           * If init_state is 0, a low --> high transition
24065                           * causes a host wakeup interrupt.
24066                           * If init_state is 1, a high --> low transition
24067                           * causes a host wakeup interrupt.
24068                           */
24069 } WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMD_fixed_param;
24070 
24071 #define MAX_SUPPORTED_ACTION_CATEGORY           256
24072 #define MAX_SUPPORTED_ACTION_SUBCATEGORY        32
24073 #define MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST  (MAX_SUPPORTED_ACTION_CATEGORY/32)
24074 
24075 typedef enum {
24076     WOW_ACTION_WAKEUP_OPERATION_RESET = 0,
24077     WOW_ACTION_WAKEUP_OPERATION_SET,
24078     WOW_ACTION_WAKEUP_OPERATION_ADD_SET,
24079     WOW_ACTION_WAKEUP_OPERATION_DELETE_SET,
24080 } WOW_ACTION_WAKEUP_OPERATION;
24081 
24082 typedef struct {
24083     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param */
24084     A_UINT32 vdev_id;
24085     A_UINT32 operation; /* 0 reset to fw default, 1 set the bits, 2 add the setting bits, 3 delete the setting bits */
24086     A_UINT32 action_category_map[MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST];
24087     /* This fixed_param TLV is followed by these additional TLV's
24088      * action_bitmaps_per_category -
24089      * Each element is a 32-bit bitmap indicating which subcategories
24090      * for that particular action category are considered for WoW wakeup
24091      * (if the subcategory's bit is 0) or ignored for WoW wakeup (if the
24092      * subcategory's bit is 1).
24093      *
24094      * A_UINT32 action_bitmaps_per_category[]; <-- variable length array
24095      */
24096 } WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param;
24097 
24098 typedef union {
24099     /* the bytes within these IP addresses are arranged in network byte order */
24100     A_UINT8 ipv4_addr[4];
24101     A_UINT8 ipv6_addr[16];
24102 } WMI_IP_ADDR;
24103 
24104 #define WMI_COAP_IPTV6_BIT_POS                    0
24105 #define WMI_COAP_ADDR_TYPE_BIT_POS                1
24106 
24107 #define WMI_COAP_IPV6_SET(param, value) \
24108     WMI_SET_BITS(param, WMI_COAP_IPTV6_BIT_POS, 1, value)
24109 
24110 #define WMI_COAP_IPV6_GET(param)     \
24111     WMI_GET_BITS(param, WMI_COAP_IPTV6_BIT_POS, 1)
24112 
24113 #define WMI_COAP_ADDR_TYPE_SET(param, value) \
24114     WMI_SET_BITS(param, WMI_COAP_ADDR_TYPE_BIT_POS, 1, value)
24115 
24116 #define WMI_COAP_ADDR_TYPE_GET(param)     \
24117     WMI_GET_BITS(param, WMI_COAP_ADDR_TYPE_BIT_POS, 1)
24118 
24119 typedef struct {
24120     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_ADD_PATTERN_CMD_fixed_param */
24121     A_UINT32 vdev_id;
24122     A_UINT32 pattern_id;
24123 
24124     /* pattern_type:
24125      * Indicates the type of pattern to be enabled
24126      * Bit 0:    Indicate pattern IP ADDR is IPV6 or IPV4
24127      * Bit 1:    Indicate pattern ADDR TYPE is BC or UC/MC
24128      * Bits 31:2 Reserved for future use
24129      *
24130      * Refer to WMI_COAP_IPV6_SET,GET and WMI_COAP_ADDR_TYPE_SET,GET macros
24131      */
24132     A_UINT32 pattern_type;
24133 
24134     A_UINT32 timeout; /* the cached packet expire timeout in ms */
24135 
24136     /* the dst ip address(uc/mc/bc), dst port to match CoAP message */
24137     WMI_IP_ADDR match_udp_ip; /* network byte order */
24138     A_UINT32 match_udp_port;
24139 
24140     /* DUT ip address and port for CoAP replay message */
24141     WMI_IP_ADDR udp_local_ip; /* network byte order */
24142     A_UINT32 udp_local_port;
24143 
24144     A_UINT32 verify_offset; /* UDP payload offset to verify */
24145     A_UINT32 verify_len;    /* UDP payload length to verofy*/
24146     A_UINT32 coapmsg_len;   /* CoAP reply message length */
24147 /* The below TLV (tag length value) parameters follow this fixed_param TLV:
24148  *     A_UINT8 verify_string[];  verify content,
24149  *         length identified by verify_len;
24150  *     A_UINT8 coapmsg[];        CoAP reply message,
24151  *         length identified by coapmsg_len;
24152  */
24153 } WMI_WOW_COAP_ADD_PATTERN_CMD_fixed_param;
24154 
24155 typedef struct {
24156     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_DEL_PATTERN_CMD_fixed_param */
24157     A_UINT32 vdev_id;
24158     A_UINT32 pattern_id;
24159 } WMI_WOW_COAP_DEL_PATTERN_CMD_fixed_param;
24160 
24161 typedef struct {
24162     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_ADD_KEEPALIVE_PATTERN_CMD_fixed_param */
24163     A_UINT32 vdev_id;
24164     A_UINT32 pattern_id;
24165 
24166     /* pattern_type:
24167      * Indicates the type of pattern to be enabled
24168      * Bit 0:    Indicate pattern IP ADDR is IPV6 or IPV4
24169      * Bit 1:    Indicate pattern ADDR TYPE is BC or UC/MC
24170      * Bits 31:2 Reserved for future use
24171      *
24172      * Refer to WMI_COAP_IPV6_SET,GET and WMI_COAP_ADDR_TYPE_SET,GET macros
24173      */
24174     A_UINT32 pattern_type;
24175 
24176     /* ip address and port for CoAP send keepalive message */
24177     WMI_IP_ADDR udp_local_ip; /* network byte order */
24178     A_UINT32 udp_local_port;
24179     WMI_IP_ADDR udp_remote_ip; /* network byte order */
24180     A_UINT32 udp_remote_port;
24181 
24182     A_UINT32 timeout;         /* the periorid to send keepalive message in ms */
24183     A_UINT32 coapmsg_len;     /* keeplive CoAP message length */
24184 /* The below TLV (tag length value) parameters follow this fixed_param TLV:
24185  *     A_UINT8 coapmsg[];  CoAP keepalive message,
24186  *          length specified by coapmsg_len field
24187  */
24188 } WMI_WOW_COAP_ADD_KEEPALIVE_PATTERN_CMD_fixed_param;
24189 
24190 typedef struct {
24191     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_DEL_KEEPALIVE_PATTERN_CMD_fixed_param */
24192     A_UINT32 vdev_id;
24193     A_UINT32 pattern_id;
24194 } WMI_WOW_COAP_DEL_KEEPALIVE_PATTERN_CMD_fixed_param;
24195 
24196 typedef struct {
24197     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_GET_BUF_INFO_CMD_fixed_param */
24198     A_UINT32 vdev_id;
24199     A_UINT32 pattern_id;
24200 } WMI_WOW_COAP_GET_BUF_INFO_CMD_fixed_param;
24201 
24202 typedef struct {
24203     A_UINT32 tlv_hdr; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_coap_tuple */
24204     A_UINT64 tsf;     /* host and firmware sync tsf */
24205     /* flag:
24206      * Indicates the type of ip address
24207      * Bit 0:    Indicate ip address is IPV6 or IPV4
24208      * Bits 31:1 Reserved for future use
24209      *
24210      * Refer to WMI_COAP_IPV6_SET,GET macros
24211      */
24212     A_UINT32 flag;
24213     WMI_IP_ADDR src_ip; /* network byte order */
24214     A_UINT32 payload_len;
24215 } wmi_coap_tuple;
24216 
24217 typedef struct {
24218     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_BUF_INFO_fixed_param */
24219     A_UINT32 vdev_id;
24220     A_UINT32 pattern_id;
24221     /** more_data will be set depending on the number of tuples need transmit */
24222     A_UINT32 more_tuples;
24223 
24224 /* The below TLV (tag length value) parameters follow this fixed_param TLV:
24225  *     wmi_coap_tuple coap_tuple[]; <-- Array of coap_tuple.
24226  *     A_UINT32 payloads[] <-- the cached received CoAP messages.
24227  *         The number of message payloads combined into the payloads[]
24228  *         array matches the number of coap tuples.
24229  *         The length of each message payload is specified by the
24230  *         "payload_len" field in the corresponding coap_tuple.
24231  *         The subsequent message payload starts at the next 4-byte aligned
24232  *         position within payloads[].
24233  *         For example, if there are 3 coap_tuples, with
24234  *             coap_tuples[0].payload_len = 12
24235  *             coap_tuples[1].payload_len = 23
24236  *             coap_tuples[2].payload_len = 34
24237  *         then msg 0 payload will be stored in payloads[0] - payloads[11]
24238  *         message  1 payload will be stored in payloads[12] - payloads[34]
24239  *         message  2 payload will be stored in payloads[36] - payloads[69]
24240  */
24241 } WMI_WOW_COAP_BUF_INFO_EVENT_fixed_param;
24242 
24243 typedef struct wow_event_info_s {
24244     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_fixed_param  */
24245     A_UINT32 vdev_id;
24246     A_UINT32 flag; /*This is current reserved.*/
24247     A_INT32 wake_reason;
24248     A_UINT32 data_len;
24249     A_UINT32 delayed_pkt_count;
24250 } WOW_EVENT_INFO_fixed_param;
24251 
24252 typedef struct wow_initial_wakeup_event_s {
24253     A_UINT32 tlv_header; /* TLV tag and len; tag equals WOW_INITIAL_WAKEUP_EVENT_fixed_param  */
24254     A_UINT32 vdev_id;
24255 } WOW_INITIAL_WAKEUP_EVENT_fixed_param;
24256 
24257 typedef enum {
24258     WOW_EVENT_INFO_TYPE_PACKET = 0x0001,
24259     WOW_EVENT_INFO_TYPE_BITMAP,
24260     WOW_EVENT_INFO_TYPE_GTKIGTK,
24261 } WOW_EVENT_INFO_TYPE;
24262 
24263 typedef struct wow_event_info_section_s {
24264     A_UINT32 data_type;
24265     A_UINT32 data_len;
24266 } WOW_EVENT_INFO_SECTION;
24267 
24268 typedef struct wow_event_info_section_packet_s {
24269     A_UINT8 packet[WOW_DEFAULT_EVT_BUF_SIZE];
24270 } WOW_EVENT_INFO_SECTION_PACKET;
24271 
24272 typedef struct wow_event_info_section_bitmap_s {
24273     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_SECTION_BITMAP  */
24274     A_UINT32 flag; /*This is current reserved.*/
24275     A_UINT32 value; /*This could be the pattern id for bitmap pattern.*/
24276     A_UINT32 org_len; /*The length of the original packet.*/
24277 } WOW_EVENT_INFO_SECTION_BITMAP;
24278 
24279 /**
24280  * This command is sent from WLAN host driver to firmware to
24281  * enable or disable D0-WOW. D0-WOW means APSS suspend with
24282  * PCIe link and DDR being active.
24283  *
24284  *
24285  * Entering D0-WOW Mode (based on kernel suspend request):
24286  *    host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 1)
24287  *    target: Take action (e.g. dbglog suspend)
24288  *    target->host: HTC_ACK (HTC_MSG_SEND_SUSPEND_COMPLETE message)
24289  *
24290  * Exiting D0-WOW mode (based on kernel resume OR target->host message received)
24291  *    host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 0)
24292  *    target: Take action (e.g. dbglog resume)
24293  *    target->host: WMI_D0_WOW_DISABLE_ACK_EVENTID
24294  *
24295  * This command is applicable only on the PCIE LL systems
24296  * Host can enter either D0-WOW or WOW mode, but NOT both at same time
24297  * Decision to enter D0-WOW or WOW is based on active interfaces
24298  *
24299  */
24300 typedef struct {
24301     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_enable_disable_cmd_fixed_param  */
24302     A_UINT32 enable;     /* 1 = enable, 0 = disable */
24303 } wmi_d0_wow_enable_disable_cmd_fixed_param;
24304 
24305 
24306 typedef enum extend_wow_type_e {
24307     EXTWOW_TYPE_APP_TYPE1,   /* extend wow type: only enable wakeup for app type1 */
24308     EXTWOW_TYPE_APP_TYPE2,   /* extend wow type: only enable wakeup for app type2 */
24309     EXTWOW_TYPE_APP_TYPE1_2, /* extend wow type: enable wakeup for app type1&2 */
24310     EXTWOW_TYPE_APP_PULSETEST,
24311     EXTWOW_DISABLED = 255,
24312 } EXTWOW_TYPE;
24313 
24314 typedef struct {
24315     A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_enable_cmd_fixed_param  */
24316     A_UINT32 vdev_id;
24317     A_UINT32 type;
24318     A_UINT32 wakeup_pin_num;
24319     A_UINT32 swol_pulsetest_type;
24320     A_UINT32 swol_pulsetest_application;
24321 } wmi_extwow_enable_cmd_fixed_param;
24322 
24323 #define SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX 8
24324 #define SWOL_INDOOR_KEY_LEN 16
24325 
24326 typedef struct {
24327     A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type1_params_cmd_fixed_param  */
24328     A_UINT32 vdev_id;
24329     wmi_mac_addr  wakee_mac;
24330     A_UINT8  ident[8];
24331     A_UINT8  passwd[16];
24332     A_UINT32 ident_len;
24333     A_UINT32 passwd_len;
24334 
24335     /* indoor check parameters */
24336     /* key for mac addresses specified in swol_indoor_key_mac
24337      * Big-endian hosts need to byte-swap the bytes within each 4-byte
24338      * segment of this array, so the bytes will return to their original
24339      * order when the entire WMI message contents are byte-swapped to
24340      * convert from big-endian to little-endian format.
24341      */
24342     A_UINT8 swol_indoor_key[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX][SWOL_INDOOR_KEY_LEN];
24343     /* key length for specified mac address index
24344      * Big-endian hosts need to byte-swap the bytes within each 4-byte
24345      * segment of this array, so the bytes will return to their original
24346      * order when the entire WMI message contents are byte-swapped to
24347      * convert from big-endian to little-endian format.
24348      */
24349     A_UINT8 swol_indoor_key_len[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
24350     /* mac address array allowed to wakeup host*/
24351     wmi_mac_addr swol_indoor_key_mac[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
24352     /* app mask for the mac addresses specified in swol_indoor_key_mac */
24353     A_UINT32 swol_indoor_app_mask[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
24354     A_UINT32 swol_indoor_waker_check; /* whether to do indoor waker check */
24355     A_UINT32 swol_indoor_pw_check;    /* whether to check password */
24356     A_UINT32 swol_indoor_pattern;     /* wakeup pattern */
24357     A_UINT32 swol_indoor_exception;   /* wakeup when exception happens */
24358     A_UINT32 swol_indoor_exception_app;
24359     A_UINT32 swol_assist_enable;      /* whether to enable IoT mode */
24360 } wmi_extwow_set_app_type1_params_cmd_fixed_param;
24361 
24362 typedef struct {
24363     A_UINT32 tlv_header;  /* TLV tag and len; tag equals wmi_extwow_set_app_type2_params_cmd_fixed_param  */
24364     A_UINT32 vdev_id;
24365 
24366     A_UINT8  rc4_key[16];
24367     A_UINT32 rc4_key_len;
24368 
24369     /** ip header parameter */
24370     A_UINT32 ip_id;         /* NC id */
24371     A_UINT32 ip_device_ip;  /* NC IP address */
24372     A_UINT32 ip_server_ip;  /* Push server IP address */
24373 
24374     /** tcp header parameter */
24375     A_UINT16 tcp_src_port;  /* NC TCP port */
24376     A_UINT16 tcp_dst_port;  /* Push server TCP port */
24377     A_UINT32 tcp_seq;
24378     A_UINT32 tcp_ack_seq;
24379 
24380     A_UINT32 keepalive_init;  /* Initial ping interval */
24381     A_UINT32 keepalive_min;   /* Minimum ping interval */
24382     A_UINT32 keepalive_max;   /* Maximum ping interval */
24383     A_UINT32 keepalive_inc;   /* Increment of ping interval */
24384 
24385     wmi_mac_addr gateway_mac;
24386     A_UINT32 tcp_tx_timeout_val;
24387     A_UINT32 tcp_rx_timeout_val;
24388 
24389     /** add extra parameter for backward-compatible */
24390     /*
24391      * For all byte arrays, natural order is used.  E.g.
24392      * rc4_write_sandbox[0] holds the 1st RC4 S-box byte,
24393      * rc4_write_sandbox[1] holds the 2nd RC4 S-box byte, etc.
24394      */
24395 
24396     /* used to encrypt transmit packet such as keep-alive */
24397     A_UINT8  rc4_write_sandbox[256];
24398     A_UINT32 rc4_write_x;
24399     A_UINT32 rc4_write_y;
24400 
24401     /* used to decrypt received packet such as wow data */
24402     A_UINT8  rc4_read_sandbox[256];
24403     A_UINT32 rc4_read_x;
24404     A_UINT32 rc4_read_y;
24405 
24406     /* used to calculate HMAC hash for transmit packet such as keep-alive */
24407     A_UINT8  ssl_write_seq[8];
24408     A_UINT8  ssl_sha1_write_key[64];
24409     A_UINT32 ssl_sha1_write_key_len;
24410 
24411     /* used to calculate HAMC hash for receive packet such as wow data */
24412     A_UINT8  ssl_read_seq[8];
24413     A_UINT8  ssl_sha1_read_key[64];
24414     A_UINT32 ssl_sha1_read_key_len;
24415 
24416     /* optional element for specifying TCP options data to include in
24417      * transmit packets such as keep-alive
24418      */
24419     A_UINT32 tcp_options_len;
24420     A_UINT8  tcp_options[40];
24421 
24422     A_UINT32 async_id; /* keep-alive request id */
24423 } wmi_extwow_set_app_type2_params_cmd_fixed_param;
24424 
24425 
24426 #define WMI_RXERR_CRC               0x01    /* CRC error on frame */
24427 #define WMI_RXERR_DECRYPT           0x08    /* non-Michael decrypt error */
24428 #define WMI_RXERR_MIC               0x10    /* Michael MIC decrypt error */
24429 #define WMI_RXERR_KEY_CACHE_MISS    0x20    /* No/incorrect key matter in h/w */
24430 #define WMI_RX_OFFLOAD_MON_MODE     0x40    /* Offload dropped mgmt pkt's for only in capture mode*/
24431 #define WMI_RXERR_PN                0x80    /* Invalid PN number on frame */
24432 
24433 typedef enum {
24434     PKT_PWR_SAVE_PAID_MATCH =           0x00000001,
24435     PKT_PWR_SAVE_GID_MATCH =            0x00000002,
24436     PKT_PWR_SAVE_EARLY_TIM_CLEAR =      0x00000004,
24437     PKT_PWR_SAVE_EARLY_DTIM_CLEAR =     0x00000008,
24438     PKT_PWR_SAVE_EOF_PAD_DELIM =        0x00000010,
24439     PKT_PWR_SAVE_MACADDR_MISMATCH =     0x00000020,
24440     PKT_PWR_SAVE_DELIM_CRC_FAIL =       0x00000040,
24441     PKT_PWR_SAVE_GID_NSTS_ZERO =        0x00000080,
24442     PKT_PWR_SAVE_RSSI_CHECK =           0x00000100,
24443     PKT_PWR_SAVE_5G_EBT =               0x00000200,
24444     PKT_PWR_SAVE_2G_EBT =               0x00000400,
24445     PKT_PWR_SAVE_BSS_COLOR_MISMATCH =   0x00000800,
24446     PKT_PWR_SAVE_UL_FLAG =              0x00001000,
24447     PKT_PWR_SAVE_STA_ID_MISMATCH =      0x00002000,
24448     PKT_PWR_SAVE_MACADDR_MISMATCH_FCS = 0x00004000,
24449 
24450     PKT_PWR_SAVE_ENABLE =               0x80000000,
24451 } WMI_PKT_PWR_SAVE_TYPE;
24452 
24453 typedef struct {
24454     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_cmd_fixed_param */
24455     A_UINT32 num_data; /** length in byte of data[]. */
24456     /** pdev_id for identifying the MAC
24457      * See macros starting with WMI_PDEV_ID_ for values.
24458      */
24459     A_UINT32 pdev_id;
24460 /* This structure is used to send Factory Test Mode [FTM] command
24461  * from host to firmware for integrated chips which are binary blobs.
24462  * Following this structure is the TLV:
24463  *     A_UINT8 data[]; <-- length in byte given by field num_data.
24464  */
24465 } wmi_ftm_intg_cmd_fixed_param;
24466 
24467 typedef struct {
24468     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_event_fixed_param */
24469     A_UINT32 num_data; /** length in byte of data[]. */
24470 /* This structure is used to receive Factory Test Mode [FTM] event
24471  * from firmware to host for integrated chips which are binary blobs.
24472  * Following this structure is the TLV:
24473  *     A_UINT8 data[]; <-- length in byte given by field num_data.
24474  */
24475 } wmi_ftm_intg_event_fixed_param;
24476 
24477 #define WMI_MAX_NS_OFFLOADS           2
24478 #define WMI_MAX_ARP_OFFLOADS          2
24479 
24480 #define WMI_ARPOFF_FLAGS_VALID              (1 << 0)    /* the tuple entry is valid */
24481 #define WMI_ARPOFF_FLAGS_MAC_VALID          (1 << 1)    /* the target mac address is valid */
24482 #define WMI_ARPOFF_FLAGS_REMOTE_IP_VALID    (1 << 2)    /* remote IP field is valid */
24483 
24484 typedef struct {
24485     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_ARP_OFFLOAD_TUPLE */
24486     A_UINT32 flags; /* flags */
24487     A_UINT8 target_ipaddr[4]; /* IPV4 addresses of the local node*/
24488     A_UINT8 remote_ipaddr[4]; /* source address of the remote node requesting the ARP (qualifier) */
24489     wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
24490 } WMI_ARP_OFFLOAD_TUPLE;
24491 
24492 #define WMI_NSOFF_FLAGS_VALID           (1 << 0)    /* the tuple entry is valid */
24493 #define WMI_NSOFF_FLAGS_MAC_VALID       (1 << 1)    /* the target mac address is valid */
24494 #define WMI_NSOFF_FLAGS_REMOTE_IP_VALID (1 << 2)    /* remote IP field is valid */
24495 #define WMI_NSOFF_FLAGS_IS_IPV6_ANYCAST (1 << 3)    /* whether the configured IPv6 address is anycast */
24496 
24497 #define WMI_NSOFF_MAX_TARGET_IPS    2
24498 
24499 typedef struct {
24500     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_NS_OFFLOAD_TUPLE */
24501     A_UINT32 flags; /* flags */
24502     /* NOTE: This size of array target_ipaddr[] cannot be changed without breaking WMI compatibility. */
24503     WMI_IPV6_ADDR target_ipaddr[WMI_NSOFF_MAX_TARGET_IPS]; /* IPV6 target addresses of the local node  */
24504     WMI_IPV6_ADDR solicitation_ipaddr; /* multi-cast source IP addresses for receiving solicitations */
24505     WMI_IPV6_ADDR remote_ipaddr; /* address of remote node requesting the solicitation (qualifier) */
24506     wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
24507 } WMI_NS_OFFLOAD_TUPLE;
24508 
24509 typedef struct {
24510     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param */
24511     A_UINT32 flags;
24512     A_UINT32 vdev_id;
24513     A_UINT32 num_ns_ext_tuples;
24514 /* Following this structure are the TLVs:
24515  *     WMI_NS_OFFLOAD_TUPLE  ns_tuples[WMI_MAX_NS_OFFLOADS];
24516  *     WMI_ARP_OFFLOAD_TUPLE arp_tuples[WMI_MAX_ARP_OFFLOADS];
24517  *     WMI_NS_OFFLOAD_TUPLE  ns_ext_tuples[]; <-- size based on num_ns_ext_tuples
24518  */
24519 } WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param;
24520 
24521 
24522 typedef struct {
24523     A_UINT32 tlv_header;
24524     A_UINT32 vdev_id;
24525     A_UINT32 pattern_id;
24526     A_UINT32 timeout;
24527     A_UINT32 length;
24528     /*Following this would be the pattern
24529        A_UINT8 pattern[] of length specified by length
24530        field in the structure.*/
24531 } WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
24532 
24533 
24534 typedef struct {
24535     A_UINT32 tlv_header;
24536     A_UINT32 vdev_id;
24537     A_UINT32 pattern_id;
24538 } WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
24539 
24540 typedef struct {
24541     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_addba_cmd_fixed_param */
24542     /** unique id identifying the VDEV, generated by the caller */
24543     A_UINT32 vdev_id;
24544     /** peer MAC address */
24545     wmi_mac_addr peer_macaddr;
24546     /** Tid number */
24547     A_UINT32 tid;
24548     /** Initiator (1) or Responder (0) for this aggregation */
24549     A_UINT32 initiator;
24550     /** size of the negotiated window */
24551     A_UINT32 window_size;
24552     /** starting sequence number (only valid for initiator) */
24553     A_UINT32 ssn;
24554     /** timeout field represents the time to wait for Block Ack in
24555      *   initiator case and the time to wait for BAR in responder
24556      *   case. 0 represents no timeout. */
24557     A_UINT32 timeout;
24558     /* BA policy: immediate ACK (0) or delayed ACK (1) */
24559     A_UINT32 policy;
24560 } wmi_peer_tid_addba_cmd_fixed_param;
24561 
24562 typedef struct {
24563     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_delba_cmd */
24564     /** unique id identifying the VDEV, generated by the caller */
24565     A_UINT32 vdev_id;
24566     /** peer MAC address */
24567     wmi_mac_addr peer_macaddr;
24568     /** Tid number */
24569     A_UINT32 tid;
24570     /** Initiator (1) or Responder (0) for this aggregation */
24571     A_UINT32 initiator;
24572 } wmi_peer_tid_delba_cmd_fixed_param;
24573 
24574 typedef struct {
24575     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_addba_complete_event_fixed_param */
24576     /** unique id identifying the VDEV, generated by the caller */
24577     A_UINT32 vdev_id;
24578     /** peer MAC address */
24579     wmi_mac_addr peer_macaddr;
24580     /** Tid number */
24581     A_UINT32 tid;
24582     /** Event status */
24583     A_UINT32 status;
24584 } wmi_tx_addba_complete_event_fixed_param;
24585 
24586 typedef struct {
24587     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_delba_complete_event_fixed_param */
24588     /** unique id identifying the VDEV, generated by the caller */
24589     A_UINT32 vdev_id;
24590     /** peer MAC address */
24591     wmi_mac_addr peer_macaddr;
24592     /** Tid number */
24593     A_UINT32 tid;
24594     /** Event status */
24595     A_UINT32 status;
24596 } wmi_tx_delba_complete_event_fixed_param;
24597 
24598 
24599 
24600 /*
24601  * Structure to request sequence numbers for a given
24602  * peer station on different TIDs. The TIDs are
24603  * indicated in the tidBitMap, tid 0 would
24604  * be represented by LSB bit 0. tid 1 would be
24605  * represented by LSB bit 1 etc.
24606  * The target will retrieve the current sequence
24607  * numbers for the peer on all the TIDs requested
24608  * and send back a response in a WMI event.
24609  */
24610 typedef struct
24611 {
24612     A_UINT32    tlv_header;  /* TLV tag and len; tag equals
24613                                 WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_sub_struct_param */
24614     wmi_mac_addr peer_macaddr;
24615     A_UINT32 tidBitmap;
24616 } wmi_ba_req_ssn;
24617 
24618 typedef struct {
24619     A_UINT32 tlv_header; /* TLV tag and len; tag equals
24620      WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_fixed_param */
24621     /** unique id identifying the VDEV, generated by the caller */
24622     A_UINT32 vdev_id;
24623     /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
24624     A_UINT32 num_ba_req_ssn;
24625 /* Following this struct are the TLV's:
24626  *     wmi_ba_req_ssn ba_req_ssn_list; All peer and tidBitMap for which the ssn is requested
24627  */
24628 } wmi_ba_req_ssn_cmd_fixed_param;
24629 
24630 /*
24631  * Max transmit categories
24632  *
24633  * Note: In future if we need to increase WMI_MAX_TC definition
24634  * It would break the compatibility for WMI_BA_RSP_SSN_EVENTID.
24635  */
24636 #define WMI_MAX_TC  8
24637 
24638 /*
24639  * Structure to send response sequence numbers
24640  * for a give peer and tidmap.
24641  */
24642 typedef struct
24643 {
24644     A_UINT32    tlv_header;  /* TLV tag and len; tag equals
24645                                 WMITLV_TAG_STRUC_wmi_ba_req_ssn_event_sub_struct_param */
24646     wmi_mac_addr peer_macaddr;
24647     /* A boolean to indicate if ssn is present */
24648     A_UINT32 ssn_present_for_tid[WMI_MAX_TC];
24649     /* The ssn from target, valid only if
24650      * ssn_present_for_tid[tidn] equals 1
24651      */
24652     A_UINT32 ssn_for_tid[WMI_MAX_TC];
24653 } wmi_ba_event_ssn;
24654 
24655 typedef struct {
24656     A_UINT32 tlv_header; /* TLV tag and len; tag equals
24657      WMITLV_TAG_STRUC_wmi_ba_rsp_ssn_event_fixed_param */
24658     /** unique id identifying the VDEV, generated by the caller */
24659     A_UINT32 vdev_id;
24660     /** Event status, success or failure of the overall operation */
24661     A_UINT32 status;
24662     /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
24663     A_UINT32 num_ba_event_ssn;
24664 /* Following this struct are the TLV's:
24665  *     wmi_ba_event_ssn ba_event_ssn_list; All peer and tidBitMap for which the ssn is requested
24666  */
24667 } wmi_ba_rsp_ssn_event_fixed_param;
24668 
24669 
24670 enum wmi_aggr_state_req_type {
24671 
24672     WMI_DISABLE_AGGREGATION,
24673     WMI_ENABLE_AGGREGATION
24674 };
24675 
24676 /*
24677  * This event is generated by the COEX module
24678  * when esco call is begins the coex module in fw generated this event to host to
24679  * disable the RX aggregation and after completion of the esco call fw will indicate to
24680  * enable back the Rx aggregation .
24681 */
24682 
24683 typedef struct {
24684     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_aggr_state_trig_event_fixed_param */
24685     /** unique id identifying the VDEV, generated by the caller */
24686     A_UINT32 vdev_id;
24687    /** req_type  contains values from enum
24688      *  wmi_aggr_state_req_type; 0 (disable) 1(enable) */
24689     A_UINT32  req_type;
24690 } wmi_aggr_state_trig_event_fixed_param;
24691 
24692 typedef struct {
24693     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_complete_event_fixed_param */
24694     /** unique id identifying the VDEV, generated by the caller */
24695     A_UINT32 vdev_id;
24696     /** MAC address used for installing   */
24697     wmi_mac_addr peer_macaddr;
24698     /** key index */
24699     A_UINT32 key_ix;
24700     /** key flags */
24701     A_UINT32 key_flags;
24702     /** Event status */
24703     A_UINT32 status;
24704 } wmi_vdev_install_key_complete_event_fixed_param;
24705 
24706 typedef enum {
24707     /* CSA_SA_QUERY_TIMEOUT:
24708      * Disconnect due to SA query timeout after moving to new channel
24709      * due to CSA in OCV enabled case.
24710      */
24711     WLAN_DISCONNECT_REASON_CSA_SA_QUERY_TIMEOUT = 1,
24712     /* MOVE_TO_CELLULAR:
24713      * Disconnect from WiFi to move to cellular
24714      */
24715     WLAN_DISCONNECT_REASON_MOVE_TO_CELLULAR,
24716 } WMI_VDEV_DISCONNECT_REASON_ID;
24717 
24718 typedef struct {
24719     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_disconnect_event_fixed_param */
24720     /** unique id identifying the VDEV, generated by the caller */
24721     A_UINT32 vdev_id;
24722     /* Disconnect reason from WMI_VDEV_DISCONNECT_REASON_ID */
24723     A_UINT32 reason;
24724 } wmi_vdev_disconnect_event_fixed_param;
24725 
24726 typedef enum _WMI_NLO_AUTH_ALGORITHM {
24727     WMI_NLO_AUTH_ALGO_80211_OPEN = 1,
24728     WMI_NLO_AUTH_ALGO_80211_SHARED_KEY = 2,
24729     WMI_NLO_AUTH_ALGO_WPA = 3,
24730     WMI_NLO_AUTH_ALGO_WPA_PSK = 4,
24731     WMI_NLO_AUTH_ALGO_WPA_NONE = 5,
24732     WMI_NLO_AUTH_ALGO_RSNA = 6,
24733     WMI_NLO_AUTH_ALGO_RSNA_PSK = 7,
24734 } WMI_NLO_AUTH_ALGORITHM;
24735 
24736 typedef enum _WMI_NLO_CIPHER_ALGORITHM {
24737     WMI_NLO_CIPHER_ALGO_NONE = 0x00,
24738     WMI_NLO_CIPHER_ALGO_WEP40 = 0x01,
24739     WMI_NLO_CIPHER_ALGO_TKIP = 0x02,
24740     WMI_NLO_CIPHER_ALGO_CCMP = 0x04,
24741     WMI_NLO_CIPHER_ALGO_WEP104 = 0x05,
24742     WMI_NLO_CIPHER_ALGO_BIP = 0x06,
24743     WMI_NLO_CIPHER_ALGO_WPA_USE_GROUP = 0x100,
24744     WMI_NLO_CIPHER_ALGO_RSN_USE_GROUP = 0x100,
24745     WMI_NLO_CIPHER_ALGO_WEP = 0x101,
24746 } WMI_NLO_CIPHER_ALGORITHM;
24747 
24748 /* SSID broadcast  type passed in NLO params */
24749 typedef enum _WMI_NLO_SSID_BcastNwType
24750 {
24751   WMI_NLO_BCAST_UNKNOWN      = 0,
24752   WMI_NLO_BCAST_NORMAL       = 1,
24753   WMI_NLO_BCAST_HIDDEN       = 2,
24754 } WMI_NLO_SSID_BcastNwType;
24755 
24756 #define WMI_NLO_MAX_SSIDS    16
24757 #define WMI_NLO_MAX_CHAN     48
24758 
24759 #define WMI_NLO_CONFIG_STOP                             (0x1 << 0)
24760 #define WMI_NLO_CONFIG_START                            (0x1 << 1)
24761 #define WMI_NLO_CONFIG_RESET                            (0x1 << 2)
24762 #define WMI_NLO_CONFIG_SLOW_SCAN                        (0x1 << 4)
24763 #define WMI_NLO_CONFIG_FAST_SCAN                        (0x1 << 5)
24764 #define WMI_NLO_CONFIG_SSID_HIDE_EN                     (0x1 << 6)
24765 
24766 /* This bit is used to indicate if EPNO Profile is enabled */
24767 #define WMI_NLO_CONFIG_ENLO                             (0x1 << 7)
24768 #define WMI_NLO_CONFIG_SCAN_PASSIVE                     (0x1 << 8)
24769 #define WMI_NLO_CONFIG_ENLO_RESET                       (0x1 << 9)
24770 #define WMI_NLO_CONFIG_SPOOFED_MAC_IN_PROBE_REQ         (0x1 << 10)
24771 #define WMI_NLO_CONFIG_RANDOM_SEQ_NO_IN_PROBE_REQ       (0x1 << 11)
24772 #define WMI_NLO_CONFIG_ENABLE_IE_WHITELIST_IN_PROBE_REQ (0x1 << 12)
24773 #define WMI_NLO_CONFIG_ENABLE_CNLO_RSSI_CONFIG          (0x1 << 13)
24774 
24775 /* Whether directed scan needs to be performed (for hidden SSIDs) */
24776 #define WMI_ENLO_FLAG_DIRECTED_SCAN      1
24777 /* Whether PNO event shall be triggered if the network is found on A band */
24778 #define WMI_ENLO_FLAG_A_BAND             2
24779 /* Whether PNO event shall be triggered if the network is found on G band */
24780 #define WMI_ENLO_FLAG_G_BAND             4
24781 /* Whether strict matching is required (i.e. firmware shall not match on the entire SSID) */
24782 #define WMI_ENLO_FLAG_STRICT_MATCH       8
24783 
24784 /* Code for matching the beacon AUTH IE - additional codes TBD */
24785 /* open */
24786 #define WMI_ENLO_AUTH_CODE_OPEN  1
24787 /* WPA_PSK or WPA2PSK */
24788 #define WMI_ENLO_AUTH_CODE_PSK   2
24789 /* any EAPOL */
24790 #define WMI_ENLO_AUTH_CODE_EAPOL 4
24791 
24792 /* NOTE: wmi_nlo_ssid_param structure can't be changed without breaking the compatibility */
24793 typedef struct wmi_nlo_ssid_param
24794 {
24795     A_UINT32 valid;
24796     wmi_ssid ssid;
24797 } wmi_nlo_ssid_param;
24798 
24799 /* NOTE: wmi_nlo_enc_param structure can't be changed without breaking the compatibility */
24800 typedef struct wmi_nlo_enc_param
24801 {
24802     A_UINT32 valid;
24803     A_UINT32 enc_type;
24804 } wmi_nlo_enc_param;
24805 
24806 /* NOTE: wmi_nlo_auth_param structure can't be changed without breaking the compatibility */
24807 typedef struct wmi_nlo_auth_param
24808 {
24809     A_UINT32 valid;
24810     A_UINT32 auth_type;
24811 } wmi_nlo_auth_param;
24812 
24813 /* NOTE: wmi_nlo_bcast_nw_param structure can't be changed without breaking the compatibility */
24814 typedef struct wmi_nlo_bcast_nw_param
24815 {
24816     A_UINT32 valid;
24817 /* If WMI_NLO_CONFIG_EPNO is not set. Supplicant PNO is enabled. The value should be true/false
24818 Otherwise EPNO is enabled. bcast_nw_type would be used as a bit flag contains WMI_ENLO_FLAG_XXX */
24819     A_UINT32 bcast_nw_type;
24820 } wmi_nlo_bcast_nw_param;
24821 
24822 /* NOTE: wmi_nlo_rssi_param structure can't be changed without breaking the compatibility */
24823 typedef struct wmi_nlo_rssi_param
24824 {
24825     A_UINT32 valid;
24826     A_INT32 rssi;
24827 } wmi_nlo_rssi_param;
24828 
24829 typedef struct nlo_configured_parameters {
24830     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_nlo_configured_parameters */
24831     wmi_nlo_ssid_param ssid;
24832     wmi_nlo_enc_param enc_type;
24833     wmi_nlo_auth_param auth_type;
24834     wmi_nlo_rssi_param rssi_cond;
24835     wmi_nlo_bcast_nw_param bcast_nw_type; /* indicates if the SSID is hidden or not */
24836 } nlo_configured_parameters;
24837 
24838 
24839 /* Support channel prediction for PNO scan after scanning top_k_num channels
24840  * if stationary_threshold is met.
24841  */
24842 typedef struct nlo_channel_prediction_cfg {
24843     A_UINT32 tlv_header;
24844     /* Enable or disable this feature. */
24845     A_UINT32 enable;
24846     /* Top K channels will be scanned before deciding whether to further scan
24847      * or stop. Minimum value is 3 and maximum is 5. */
24848     A_UINT32 top_k_num;
24849     /* Preconfigured stationary threshold.
24850      * Lesser value means more conservative. Bigger value means more aggressive.
24851      * Maximum is 100 and minimum is 0. */
24852     A_UINT32 stationary_threshold;
24853     /* Periodic full channel scan in milliseconds unit.
24854      * After full_scan_period_ms since last full scan, channel prediction
24855      * scan is suppressed and will do full scan.
24856      * This is to help detecting sudden AP power-on or -off. Value 0 means no
24857      * full scan at all (not recommended).
24858      */
24859     A_UINT32 full_scan_period_ms;
24860 } nlo_channel_prediction_cfg;
24861 
24862 typedef struct enlo_candidate_score_params_t {
24863     A_UINT32 tlv_header;   /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_enlo_candidate_score_param */
24864     A_INT32 min5GHz_rssi;  /* minimum 5GHz RSSI for a BSSID to be considered (units = dBm) */
24865     A_INT32 min24GHz_rssi; /* minimum 2.4GHz RSSI for a BSSID to be considered (units = dBm) */
24866     A_UINT32 initial_score_max; /* the maximum score that a network can have before bonuses */
24867     /* current_connection_bonus:
24868      * only report when there is a network's score this much higher
24869      * than the current connection
24870      */
24871     A_UINT32 current_connection_bonus;
24872     A_UINT32 same_network_bonus; /* score bonus for all networks with the same network flag */
24873     A_UINT32 secure_bonus; /* score bonus for networks that are not open */
24874     A_UINT32 band5GHz_bonus; /* 5GHz RSSI score bonus (applied to all 5GHz networks) */
24875 } enlo_candidate_score_params;
24876 
24877 typedef struct connected_nlo_bss_band_rssi_pref_t {
24878     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_connected_nlo_bss_band_rssi_pref */
24879     /** band which needs to get preference over other band - see wmi_set_vdev_ie_band enum */
24880     A_UINT32 band;
24881     /* Amount of RSSI preference (in dB) that can be given to band (mentioned above) over other band */
24882     A_INT32  rssi_pref;
24883 } connected_nlo_bss_band_rssi_pref;
24884 
24885 typedef struct connected_nlo_rssi_params_t {
24886     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_connected_nlo_rssi_params */
24887     /* Relative RSSI threshold (in dB) by which new BSS should have better RSSI than
24888      * the current connected BSS.
24889      */
24890     A_INT32  relative_rssi;
24891     /* The amount of RSSI preference (in dB) that can be given to a 5G BSS over 2.4G BSS. */
24892     A_INT32  relative_rssi_5g_pref;
24893 } connected_nlo_rssi_params;
24894 
24895 typedef struct wmi_nlo_config {
24896     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_config_cmd_fixed_param */
24897     A_UINT32 flags;
24898     A_UINT32 vdev_id;
24899     A_UINT32 fast_scan_max_cycles;
24900     A_UINT32 active_dwell_time;
24901     A_UINT32 passive_dwell_time; /* PDT in msecs */
24902     A_UINT32 probe_bundle_size;
24903     A_UINT32 rest_time; /* ART = IRT */
24904     A_UINT32 max_rest_time; /* Max value that can be reached after SBM */
24905     A_UINT32 scan_backoff_multiplier; /* SBM */
24906     A_UINT32 fast_scan_period; /* SCBM */
24907     A_UINT32 slow_scan_period; /* specific to windows */
24908     A_UINT32 no_of_ssids;
24909     A_UINT32 num_of_channels;
24910     A_UINT32 delay_start_time; /* NLO scan start delay time in milliseconds */
24911     /** MAC Address to use in Probe Req as SA **/
24912     wmi_mac_addr mac_addr;
24913     /** Mask on which MAC has to be randomized **/
24914     wmi_mac_addr mac_mask;
24915     /** IE bitmap to use in Probe Req **/
24916     A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
24917     /** Number of vendor OUIs. In the TLV vendor_oui[] **/
24918     A_UINT32 num_vendor_oui;
24919     /** Number of connected NLO band preferences **/
24920     A_UINT32 num_cnlo_band_pref;
24921     /** dwell time in msec on active 2GHz channels */
24922     A_UINT32 active_dwell_time_2ghz;
24923     /** dwell time in msec when 6 GHz channel (PSC or non-PSC) is marked as an active channel */
24924     A_UINT32 active_dwell_time_6ghz;
24925     /** dwell time in msec when 6 GHz channel (PSC or non-PSC) is marked as a passive channel */
24926     A_UINT32 passive_dwell_time_6ghz;
24927 /* The TLVs will follow.
24928  * nlo_configured_parameters nlo_list[];
24929  * A_UINT32 channel_list[num_of_channels]; // in MHz
24930  *     channel_list:
24931  *     If FW supports WMI_SERVICE_PNO_SCAN_CONFIG_PER_CHANNEL,
24932  *         then channel_list may fill the upper 12 bits with channel flags,
24933  *         while using only the lower 20 bits for channel frequency.
24934  *         Check WMI_SCAN_CHANNEL_FLAG macros for the channel flags
24935  *     If FW doesn't support WMI_SERVICE_PNO_SCAN_CONFIG_PER_CHANNEL,
24936  *         then channel_list only holds the frequency value
24937  * nlo_channel_prediction_cfg ch_prediction_cfg;
24938  * enlo_candidate_score_params candidate_score_params;
24939  * wmi_vendor_oui vendor_oui[num_vendor_oui];
24940  * connected_nlo_rssi_params cnlo_rssi_params;
24941  * connected_nlo_bss_band_rssi_pref cnlo_bss_band_rssi_pref[num_cnlo_band_pref];
24942  * A_UINT32 preferred_chan_list[]; // in MHz
24943  */
24944 } wmi_nlo_config_cmd_fixed_param;
24945 
24946 typedef struct wmi_nlo_event
24947 {
24948     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_event */
24949     A_UINT32 vdev_id;
24950 } wmi_nlo_event;
24951 
24952 
24953 /* WMI_PASSPOINT_CONFIG_SET
24954  * Sets a list for passpoint networks for PNO purposes;
24955  * it should be matched against any passpoint networks found
24956  * during regular PNO scan.
24957  */
24958 #define WMI_PASSPOINT_CONFIG_SET       (0x1 << 0)
24959 /* WMI_PASSPOINT_CONFIG_RESET
24960  * Reset passpoint network list -
24961  * no Passpoint networks should be matched after this.
24962  */
24963 #define WMI_PASSPOINT_CONFIG_RESET     (0x1 << 1)
24964 
24965 #define PASSPOINT_REALM_LEN                  256
24966 #define PASSPOINT_ROAMING_CONSORTIUM_ID_LEN  5
24967 #define PASSPOINT_ROAMING_CONSORTIUM_ID_NUM  16
24968 #define PASSPOINT_PLMN_ID_LEN                3
24969 #define PASSPOINT_PLMN_ID_ALLOC_LEN /* round up to A_UINT32 boundary */ \
24970     (((PASSPOINT_PLMN_ID_LEN + 3) >> 2) << 2)
24971 
24972 /*
24973  * Confirm PASSPOINT_REALM_LEN is a multiple of 4, so the
24974  *     A_UINT8 realm[PASSPOINT_REALM_LEN]
24975  * array will end on a 4-byte boundary.
24976  * (This 4-byte alignment simplifies endianness-correction byte swapping.)
24977  */
24978 A_COMPILE_TIME_ASSERT(
24979     check_passpoint_realm_size,
24980     (PASSPOINT_REALM_LEN % sizeof(A_UINT32)) == 0);
24981 
24982 /*
24983  * Confirm the product of PASSPOINT_ROAMING_CONSORTIUM_ID_NUM and
24984  * PASSPOINT_ROAMING_CONSORTIUM_ID_LEN is a multiple of 4, so the
24985  * roaming_consortium_ids array below will end on a 4-byte boundary.
24986  * (This 4-byte alignment simplifies endianness-correction byte swapping.)
24987  */
24988 A_COMPILE_TIME_ASSERT(
24989     check_passpoint_roaming_consortium_ids_size,
24990     ((PASSPOINT_ROAMING_CONSORTIUM_ID_NUM*PASSPOINT_ROAMING_CONSORTIUM_ID_LEN) % sizeof(A_UINT32)) == 0);
24991 
24992 /* wildcard ID to allow an action (reset) to apply to all networks */
24993 #define WMI_PASSPOINT_NETWORK_ID_WILDCARD 0xFFFFFFFF
24994 typedef struct wmi_passpoint_config {
24995     A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_passpoint_config_cmd_fixed_param */
24996     /* (network) id
24997      * identifier of the matched network, report this in event
24998      * This id can be a wildcard (WMI_PASSPOINT_NETWORK_ID_WILDCARD)
24999      * that indicates the action should be applied to all networks.
25000      * Currently, the only action that is applied to all networks is "reset".
25001      * If a non-wildcard ID is specified, that particular network is configured.
25002      * If a wildcard ID is specified, all networks are reset.
25003      */
25004     A_UINT32 id;
25005     A_UINT32 req_id;
25006     A_UINT8  realm[PASSPOINT_REALM_LEN]; /*null terminated UTF8 encoded realm, 0 if unspecified*/
25007     A_UINT8  roaming_consortium_ids[PASSPOINT_ROAMING_CONSORTIUM_ID_NUM][PASSPOINT_ROAMING_CONSORTIUM_ID_LEN]; /*roaming consortium ids to match, 0s if unspecified*/
25008                                                                                                               /*This would be bytes-stream as same as defition of realm id in 802.11 standard*/
25009     A_UINT8  plmn[PASSPOINT_PLMN_ID_ALLOC_LEN]; /*PLMN id mcc/mnc combination as per rules, 0s if unspecified */
25010 } wmi_passpoint_config_cmd_fixed_param;
25011 
25012 typedef struct {
25013     A_UINT32 tlv_header;    /* TLV tag and len; tag equals wmi_passpoint_event_hdr */
25014     A_UINT32 id;            /* identifier of the matched network */
25015     A_UINT32 vdev_id;
25016     A_UINT32 timestamp;     /* time since boot (in microsecond) when the result was retrieved*/
25017     wmi_ssid ssid;
25018     wmi_mac_addr    bssid;  /* bssid of the network */
25019     A_UINT32 channel_mhz;   /* channel frequency in MHz */
25020     A_UINT32 rssi;          /* RSSI value */
25021     A_UINT32 rtt;           /* timestamp in nanoseconds*/
25022     A_UINT32 rtt_sd;        /* standard deviation in rtt */
25023     A_UINT32 beacon_period; /* beacon advertised in the beacon */
25024     A_UINT32 capability;    /* capabilities advertised in the beacon */
25025     A_UINT32 ie_length;     /* size of the ie_data blob */
25026     A_UINT32 anqp_length;   /* length of ANQP blob */
25027 /* Following this structure is the byte stream of ie data of length ie_buf_len:
25028  *  A_UINT8 ie_data[]; <-- length in byte given by field ie_length, blob of ie data in beacon
25029  *  A_UINT8 anqp_ie[]; <-- length in byte given by field anqp_len, blob of anqp data of IE
25030  *  Implicitly, combing ie_data and anqp_ie into a single bufp, and the bytes stream of each ie should be same as BEACON/Action-frm  by 802.11 spec.
25031  */
25032 } wmi_passpoint_event_hdr;
25033 
25034 
25035 #define GTK_OFFLOAD_OPCODE_MASK             0xFF000000
25036 /** Enable GTK offload, and provided parameters KEK,KCK and replay counter values */
25037 #define GTK_OFFLOAD_ENABLE_OPCODE           0x01000000
25038 /** Disable GTK offload */
25039 #define GTK_OFFLOAD_DISABLE_OPCODE          0x02000000
25040 /** Read GTK offload parameters, generates WMI_GTK_OFFLOAD_STATUS_EVENT */
25041 #define GTK_OFFLOAD_REQUEST_STATUS_OPCODE   0x04000000
25042 enum wmi_chatter_mode {
25043     /* Chatter enter/exit happens
25044      * automatically based on preset
25045      * params
25046      */
25047     WMI_CHATTER_MODE_AUTO,
25048     /* Chatter enter is triggered
25049      * manually by the user
25050      */
25051     WMI_CHATTER_MODE_MANUAL_ENTER,
25052     /* Chatter exit is triggered
25053      * manually by the user
25054      */
25055     WMI_CHATTER_MODE_MANUAL_EXIT,
25056     /* Placeholder max value, always last*/
25057     WMI_CHATTER_MODE_MAX
25058 };
25059 
25060 enum wmi_chatter_query_type {
25061     /*query coalescing filter match counter*/
25062     WMI_CHATTER_QUERY_FILTER_MATCH_CNT,
25063     WMI_CHATTER_QUERY_MAX
25064 };
25065 
25066 typedef struct {
25067     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_set_mode_cmd_fixed_param  */
25068     A_UINT32 chatter_mode;
25069 } wmi_chatter_set_mode_cmd_fixed_param;
25070 
25071 /** maximum number of filter supported*/
25072 #define CHATTER_MAX_COALESCING_RULES     11
25073 /** maximum number of field tests per filter*/
25074 #define CHATTER_MAX_FIELD_TEST           5
25075 /** maximum field length in number of DWORDS*/
25076 #define CHATTER_MAX_TEST_FIELD_LEN32     2
25077 
25078 /** field test kinds*/
25079 #define CHATTER_COALESCING_TEST_EQUAL            1
25080 #define CHATTER_COALESCING_TEST_MASKED_EQUAL     2
25081 #define CHATTER_COALESCING_TEST_NOT_EQUAL        3
25082 
25083 /** packet type*/
25084 #define CHATTER_COALESCING_PKT_TYPE_UNICAST      (1 << 0)
25085 #define CHATTER_COALESCING_PKT_TYPE_MULTICAST    (1 << 1)
25086 #define CHATTER_COALESCING_PKT_TYPE_BROADCAST    (1 << 2)
25087 
25088 /** coalescing field test*/
25089 typedef struct _chatter_pkt_coalescing_hdr_test {
25090     /** offset from start of mac header, for windows native wifi host driver
25091      * should assume standard 802.11 frame format without QoS info and address4
25092      * FW would account for any non-stand fields for final offset value.
25093      */
25094     A_UINT32 offset;
25095     A_UINT32 length; /* length of test field*/
25096     A_UINT32 test; /*equal, not equal or masked equal*/
25097     A_UINT32 mask[CHATTER_MAX_TEST_FIELD_LEN32]; /*mask byte stream*/
25098     A_UINT32 value[CHATTER_MAX_TEST_FIELD_LEN32]; /*value byte stream*/
25099 } chatter_pkt_coalescing_hdr_test;
25100 
25101 /** packet coalescing filter*/
25102 typedef struct _chatter_pkt_coalescing_filter {
25103     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_pkt_coalescing_filter */
25104     A_UINT32 filter_id; /* unique id assigned by OS */
25105     A_UINT32 max_coalescing_delay; /* max milliseconds 1st pkt can be held */
25106     A_UINT32 pkt_type; /* unicast/multicast/broadcast */
25107     A_UINT32 num_of_test_field; /* number of field test in table */
25108     chatter_pkt_coalescing_hdr_test test_fields[CHATTER_MAX_FIELD_TEST]; /* field test tbl */
25109 } chatter_pkt_coalescing_filter;
25110 
25111 /** packet coalescing filter add command*/
25112 typedef struct {
25113     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_add_filter_cmd_fixed_param */
25114     A_UINT32 num_of_filters;
25115 /* Following this tlv, there comes an array of structure of type chatter_pkt_coalescing_filter
25116  chatter_pkt_coalescing_filter rx_filter[1];*/
25117 } wmi_chatter_coalescing_add_filter_cmd_fixed_param;
25118 /** packet coalescing filter delete command*/
25119 typedef struct {
25120     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_delete_filter_cmd_fixed_param */
25121     A_UINT32 filter_id; /*filter id which will be deleted*/
25122 } wmi_chatter_coalescing_delete_filter_cmd_fixed_param;
25123 /** packet coalescing query command*/
25124 typedef struct {
25125     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_query_cmd_fixed_param */
25126     A_UINT32 type; /*type of query*/
25127 } wmi_chatter_coalescing_query_cmd_fixed_param;
25128 /** chatter query reply event*/
25129 typedef struct {
25130     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_query_reply_event_fixed_param  */
25131     A_UINT32 type; /*query type*/
25132     A_UINT32 filter_match_cnt; /*coalescing filter match counter*/
25133 } wmi_chatter_query_reply_event_fixed_param;
25134 
25135 /* NOTE: This constants GTK_OFFLOAD_KEK_BYTES, GTK_OFFLOAD_KCK_BYTES, and GTK_REPLAY_COUNTER_BYTES
25136  * cannot be changed without breaking WMI compatibility. */
25137 #define GTK_OFFLOAD_KEK_BYTES       16
25138 #define GTK_OFFLOAD_KCK_BYTES       16
25139 /* NOTE: GTK_REPLAY_COUNTER_BYTES, WMI_MAX_KEY_LEN, IGTK_PN_SIZE cannot be changed in the future without breaking WMI compatibility */
25140 #define GTK_REPLAY_COUNTER_BYTES    8
25141 #define WMI_MAX_KEY_LEN             32
25142 #define IGTK_PN_SIZE                6
25143 
25144 typedef struct {
25145     /**
25146      * WMITLV_TAG_STRUC_wmi_roam_ml_key_material_param will exist when link is not created by fw.
25147      */
25148 
25149     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ml_link_key_material_param */
25150     A_UINT32 link_id;    /* The key is for which link, when link_id is 0xf, means the key is used for all links, like PTK */
25151     /** key index */
25152     A_UINT32 key_ix;
25153     /** key cipher, defined as WMI_CIPHER_ */
25154     A_UINT32 key_cipher;
25155     A_UINT8  pn[WMI_MAX_PN_LEN];
25156     A_UINT8  key_buff[WMI_MAX_KEY_LEN];
25157     /*
25158      * When link_id is 0xf, this field will be MLD address.
25159      * Otherwise, it will be bssid which specified with link_id.
25160      */
25161     wmi_mac_addr mac_addr;
25162     A_UINT32 key_len; /* number of valid bytes within key_buff */
25163     A_UINT32 key_flags;
25164 } wmi_roam_ml_key_material_param;
25165 
25166 typedef struct {
25167     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param */
25168     A_UINT32 vdev_id; /** unique id identifying the VDEV */
25169     A_UINT32 flags; /* status flags */
25170     A_UINT32 refresh_cnt; /* number of successful GTK refresh exchanges since last SET operation */
25171     /*
25172      * As with all WMI messages, this message uses little-endian byte
25173      * ordering within each A_UINT32 field.
25174      * If a big-endian host is using automatic swapping of the bytes within
25175      * each 4-byte A_UINT32 to automatically correct the endianness of the
25176      * A_UINT32 fields as the message is uploaded from target --> host, the
25177      * big-endian host will have to undo the automatic byte swapping for the
25178      * below A_UINT8 fields, to restore them to their original order.
25179      */
25180     A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* current replay counter */
25181     A_UINT8 igtk_keyIndex; /* Use if IGTK_OFFLOAD is defined */
25182     A_UINT8 igtk_keyLength; /* Use if IGTK_OFFLOAD is defined */
25183     A_UINT8 igtk_keyRSC[IGTK_PN_SIZE]; /* key replay sequence counter *//* Use if IGTK_OFFLOAD is defined */
25184     A_UINT8 igtk_key[WMI_MAX_KEY_LEN]; /* Use if IGTK_OFFLOAD is defined */
25185     A_UINT8 gtk_keyIndex; /* GTK key index */
25186     A_UINT8 gtk_keyLength; /* GTK key length */
25187     A_UINT8 gtk_keyRSC[GTK_REPLAY_COUNTER_BYTES]; /* GTK key replay sequence counter */
25188     A_UINT8 gtk_key[WMI_MAX_KEY_LEN]; /* GTK key data */
25189     A_UINT8 bigtk_keyIndex; /* Use if IGTK_OFFLOAD is defined */
25190     A_UINT8 bigtk_keyLength; /* Use if IGTK_OFFLOAD is defined */
25191     A_UINT8 bigtk_keyRSC[IGTK_PN_SIZE]; /* key replay sequence counter *//* Use if IGTK_OFFLOAD is defined */
25192     A_UINT8 bigtk_key[WMI_MAX_KEY_LEN]; /* Use if IGTK_OFFLOAD is defined */
25193 } WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param;
25194 
25195 typedef struct {
25196     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_CMD_fixed_param */
25197     A_UINT32 vdev_id; /** unique id identifying the VDEV */
25198     A_UINT32 flags; /* control flags, GTK offload command use high byte  */
25199     /* The size of following 3 arrays cannot be changed without breaking WMI compatibility. */
25200     A_UINT8 KEK[GTK_OFFLOAD_KEK_BYTES]; /* key encryption key */
25201     A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
25202     A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
25203 
25204     /*
25205      * Following structure will be appended when fils:
25206      *     wmi_gtk_offload_fils_tlv_param wmi_fils_gtk_info;
25207      * Following structure will be appended to the above KEK[] when kek length
25208      * is larger than GTK_OFFLOAD_KEK_BYTES:
25209      *     A_UINT8 kek_ext[];
25210      * Following structure will be appended to the above KCK[] when kck length
25211      * is larger than GTK_OFFLOAD_KCK_BYTES:
25212      *     A_UINT8 kck_ext[];
25213      */
25214 } WMI_GTK_OFFLOAD_CMD_fixed_param;
25215 
25216 typedef struct {
25217     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_offload_extended_tlv_param */
25218     A_UINT32 vdev_id; /** unique id identifying the VDEV */
25219     A_UINT32 flags; /* control flags, GTK offload command use high byte  */
25220     A_UINT32 kek_len;
25221     A_UINT8  KEK[GTK_OFFLOAD_KEK_EXTENDED_BYTES]; /* key encryption key */
25222     A_UINT8  KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
25223     A_UINT8  replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
25224 } wmi_gtk_offload_fils_tlv_param;
25225 
25226 typedef struct {
25227     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param */
25228     A_UINT32 vdev_id;
25229     A_UINT32 sa_query_retry_interval;  /* in msec */
25230     A_UINT32 sa_query_max_retry_count;
25231 } WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param;
25232 
25233 typedef enum {
25234     WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1, /* 802.11 NULL frame */
25235     WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE = 2, /* ARP response */
25236     WMI_STA_KEEPALIVE_METHOD_ETHERNET_LOOPBACK = 3, /*ETHERNET LOOPBACK*/
25237     WMI_STA_KEEPALIVE_METHOD_GRATUITOUS_ARP_REQUEST = 4, /* gratuitous ARP req*/
25238     WMI_STA_KEEPALIVE_METHOD_MGMT_VENDOR_ACTION = 5, /* vendor action frame */
25239 } WMI_STA_KEEPALIVE_METHOD;
25240 
25241 typedef struct {
25242     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALVE_ARP_RESPONSE */
25243     WMI_IPV4_ADDR sender_prot_addr; /* Sender protocol address */
25244     WMI_IPV4_ADDR target_prot_addr; /* Target protocol address */
25245     wmi_mac_addr dest_mac_addr; /* destination MAC address */
25246 } WMI_STA_KEEPALVE_ARP_RESPONSE;
25247 
25248 typedef struct {
25249     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALIVE_CMD_fixed_param */
25250     A_UINT32 vdev_id;
25251     A_UINT32 enable; /* 1 - Enable, 0 - disable */
25252     A_UINT32 method; /* keep alive method */
25253     A_UINT32 interval; /* time interval in seconds  */
25254 /*
25255  * NOTE: following this structure is the TLV for ARP Response:
25256  *     WMI_STA_KEEPALVE_ARP_RESPONSE arp_resp; <-- ARP response
25257  */
25258 } WMI_STA_KEEPALIVE_CMD_fixed_param;
25259 
25260 typedef struct {
25261     A_UINT32 tlv_header;
25262     A_UINT32 vdev_id;
25263     A_UINT32 action;
25264 } WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param;
25265 typedef WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param WMI_STA_WNMSLEEP_CMD;
25266 
25267 typedef struct {
25268     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_keepalive_cmd_fixed_param */
25269     A_UINT32 vdev_id;
25270     A_UINT32 keepaliveInterval; /* seconds */
25271     A_UINT32 keepaliveMethod;
25272 } wmi_vdev_set_keepalive_cmd_fixed_param;
25273 
25274 typedef struct {
25275     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_cmd_fixed_param */
25276     A_UINT32 vdev_id;
25277 } wmi_vdev_get_keepalive_cmd_fixed_param;
25278 
25279 typedef struct {
25280     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_event_fixed_param */
25281     A_UINT32 vdev_id;
25282     A_UINT32 keepaliveInterval; /* seconds */
25283     A_UINT32 keepaliveMethod; /* seconds */
25284 } wmi_vdev_get_keepalive_event_fixed_param;
25285 
25286 typedef enum {
25287     WMI_CLEAR_ARP_STATS_COLLECTED = 0x0,
25288     WMI_START_ARP_STATS_COLLECTION,
25289 } WMI_ARP_STATS_ACTION;
25290 
25291 typedef enum {
25292     WMI_ARP_STATS_RX_PKT_TYPE_ARP = 0x1,
25293 } WMI_ARP_STATS_RX_PKT_TYPE;
25294 
25295 typedef enum {
25296     WMI_BA_SESSION_ESTABLISHMENT_STATUS_SUCCESS = 0x0,
25297     WMI_BA_SESSION_ESTABLISHMENT_STATUS_FAILURE,
25298 } WMI_ARP_STATS_BA_SESSION_ESTABLISH_STATUS;
25299 
25300 typedef enum {
25301     WMI_CONNECTION_STATUS_FAILURE = 0x0,
25302     WMI_CONNECTION_STATUS_SUCCESS,
25303 } WMI_ARP_STATS_CONNECTION_STATUS;
25304 
25305 /* ARP stats set (configure) req */
25306 typedef struct {
25307     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_arp_stats_cmd_fixed_param */
25308     A_UINT32 vdev_id;
25309     A_UINT32 set_clr;  /* WMI_ARP_STATS_ACTION */
25310     A_UINT32 pkt_type; /* WMI_ARP_STATS_RX_PKT_TYPE */
25311     A_UINT32 ipv4;     /* target will maintain ARP stats (only) for frames containing this IP address */
25312 } wmi_vdev_set_arp_stats_cmd_fixed_param;
25313 
25314 /* ARP stats get req */
25315 typedef struct {
25316     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_arp_stats_cmd_fixed_param */
25317     A_UINT32 vdev_id;
25318 } wmi_vdev_get_arp_stats_cmd_fixed_param;
25319 
25320 /* per vdev based ARP stats */
25321 typedef struct {
25322     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_arp_stats_event_fixed_param */
25323     A_UINT32 vdev_id;
25324     A_UINT32 arp_req_enqueue;
25325     A_UINT32 arp_req_tx_success;
25326     A_UINT32 arp_req_tx_failure; /* number of times a tx MPDU containing a unicast ARP request went unacked */
25327     A_UINT32 arp_rsp_recvd;
25328     A_UINT32 out_of_order_arp_rsp_drop_cnt;
25329     A_UINT32 dad_detected; /* duplicate address detection */
25330     A_UINT32 connect_status; /* WMI_ARP_STATS_CONNECTION_STATUS */
25331     A_UINT32 ba_session_establishment_status; /* WMI_ARP_STATS_BA_SESSION_ESTABLISH_STATUS */
25332 } wmi_vdev_get_arp_stats_event_fixed_param;
25333 
25334 typedef struct {
25335     A_UINT32 tlv_header; /*  TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_connectivity_check_stats */
25336     A_UINT32 pkt_type_bitmap;  /* WMI_IP_CONNECTIVITY_STATS_RX_PKT_TYPE_BITMAP - only for DNS, TCP and ICMP */
25337     A_UINT32 tcp_src_port;  /* target will maintain TCP stats (only) for frames with this src port */
25338     A_UINT32 tcp_dst_port; /* target will maintain TCP stats (only) for frames with this dst port */
25339     A_UINT32 icmp_ipv4; /* target will maintain ICMPv4 stats (only) for frames containing this IP address */
25340 } wmi_vdev_set_connectivity_check_stats;
25341 
25342 /*  per vdev dns/icmp/tcp based stats*/
25343 typedef struct {
25344     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_connectivity_check_stats */
25345     A_UINT32 tcp_ack_recvd; /* number of tcp syn ack's received by FW */
25346     A_UINT32 icmpv4_rsp_recvd; /* number of icmpv4 responses received by FW */
25347 } wmi_vdev_get_connectivity_check_stats;
25348 
25349 typedef struct {
25350     A_UINT32 tlv_header;
25351     A_UINT32 vdev_id;
25352 #define IPSEC_NATKEEPALIVE_FILTER_DISABLE 0
25353 #define IPSEC_NATKEEPALIVE_FILTER_ENABLE 1
25354     A_UINT32 action;
25355 } WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param;
25356 typedef WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD;
25357 
25358 typedef struct {
25359     A_UINT32 tlv_header;
25360     A_UINT32 vdev_id;
25361     A_UINT32 mcc_tbttmode;
25362     wmi_mac_addr mcc_bssid;
25363 } wmi_vdev_mcc_set_tbtt_mode_cmd_fixed_param;
25364 
25365 #define WMI_MAX_VENDOR_OUI_ACTION_SUPPORTED_PER_ACTION 10
25366 #define WMI_MAX_VENDOR_OUI_DATA_LENGTH                 20
25367 
25368 typedef enum
25369 {
25370     WMI_VENDOR_OUI_ACTION_CONNECTION_1X1 = 0, /* Connect in 1X1 only */
25371     WMI_VENDOR_OUI_ACTION_ITO_EXTENSION = 1,  /* Extend the Immediate Time-Out (ITO) if data is not received from AP after beacon with TIM bit set */
25372     WMI_VENDOR_OUI_ACTION_CCKM_1X1 = 2,       /* TX (only) CCKM rates with 1 chain only */
25373     WMI_VENDOR_OUI_ACTION_ALT_ITO = 3, /* inactivity time-out */
25374     WMI_VENDOR_OUI_ACTION_SWITCH_TO_11N_MODE = 4, /* Switch from 11ac to 11n mode to avoid IOT issues with ONM frame */
25375     /* WMI_VENDOR_OUI_ACTION_CONNECTION_1X1_NUM_TX_RX_CHAINS_1
25376      * Connect in 1x1 only and Use only one chain for both Tx and Rx
25377      * to avoid IOT issues due to change in number of Tx and Rx chains
25378      */
25379     WMI_VENDOR_OUI_ACTION_CONNECTION_1X1_NUM_TX_RX_CHAINS_1 = 5,
25380 
25381     /* Disable burst and assist, and restrict A-MPDU size to 32 */
25382     WMI_VENDOR_OUI_ACTION_DISABLE_AGGRESSIVE_TX = 6,
25383 
25384     /* Disable FW triggered TWT if vendor OUI is received in beacon */
25385     WMI_VENDOR_OUI_ACTION_DISABLE_FW_TRIGGERED_TWT = 7,
25386 
25387     /* Extend ITO under WOW mode if vendor OUI is received in beacon */
25388     WMI_VENDOR_OUI_ACTION_EXTEND_WOW_ITO = 8,
25389 
25390     /*
25391      * Turn on station 80211BE feature if AP's vendor OUI is in the list
25392      * for specific customer
25393      */
25394     WMI_VENDOR_OUI_ACTION_ALLOW_11BE = 9,
25395 
25396     /*
25397      * Turn off FW's dynamic qos null tx rate if specific vendor OUI
25398      * received in beacon.
25399      */
25400     WMI_VENDOR_OUI_ACTION_DISABLE_DYNAMIC_QOS_NULL_TX_RATE = 10,
25401 
25402     /*
25403      * Enable CTS2SELF with QoS null frame if specific vendor OUI
25404      * received in beacon.
25405      */
25406     WMI_VENDOR_OUI_ACTION_ENABLE_CTS2SELF_WITH_QOS_NULL = 11,
25407 
25408     /*
25409      * Send SMPS frame following OMN frame on VHT conncection if specific
25410      * vendor OUI received in beacon.
25411      */
25412     WMI_VENDOR_OUI_ACTION_SEND_SMPS_FRAME_WITH_OMN = 12,
25413 
25414 
25415     /* Add any action before this line */
25416     WMI_VENDOR_OUI_ACTION_MAX_ACTION_ID
25417 } wmi_vendor_oui_action_id;
25418 
25419 typedef struct {
25420     A_UINT32 tlv_header;
25421     /** vendor OUI actions */
25422     A_UINT32 action_id;  /* enum wmi_vendor_oui_action_id */
25423     A_UINT32 total_num_vendor_oui; /* total number of OUI present in ini for all actions.
25424                                    ** For first command, this value will be used for allocating memory in FW accordingly */
25425     A_UINT32 num_vendor_oui_ext; /* the number of wmi_vendor_oui_ext for action_id */
25426     /* followed by TLVs, an array of structure of type wmi_vendor_oui_ext
25427     ** wmi_vendor_oui_ext vendor_oui_ext[num_vendor_oui_ext];
25428     */
25429     /* followed by A_UINT8 data[] of concatenated data for each vendor_oui_ext[] element
25430     ** first byte contains the index i of structure vendor_oui_ext[]
25431     ** for which data is coming and length of the data is extracted as
25432     ** wmi_vendor_oui_ext[i].buf_data_length. No padding between data of
25433     ** N th OUI and (N+1) th OUI.
25434     ** For example, if vendor_oui_ext[0].buf_data_length is 18, then
25435     ** data[0] will hold the index value 0, data[1] through data[17]
25436     ** will hold the OUI data for this first OUI, data[18] will hold
25437     ** the index value 1, and the OUI data for the second OUI will
25438     ** begin at data[19].
25439     */
25440 } wmi_pdev_config_vendor_oui_action_fixed_param;
25441 
25442 typedef struct {
25443     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ac_tx_queue_optimized_cmd_fixed_param */
25444     /** pdev_id for identifying the MAC
25445      * See macros starting with WMI_PDEV_ID_ for values.
25446      */
25447     A_UINT32 pdev_id;
25448     /** AC number */
25449     A_UINT32 ac; /* refer to wmi_traffic_ac */
25450     /**
25451      * Enable/disable tx queue optimizations (such as dropping stale tx frms)
25452      * for the specified AC.
25453      */
25454     A_UINT32 ac_tx_queue_optimize_enable;
25455 } wmi_pdev_set_ac_tx_queue_optimized_cmd_fixed_param;
25456 
25457 typedef struct {
25458     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rx_filter_promiscuous_cmd_fixed_param */
25459     /** pdev_id for identifying the MAC
25460      * See macros starting with WMI_PDEV_ID_ for values.
25461      */
25462     A_UINT32 pdev_id;
25463     /** Enable/disable rx filter promiscuous */
25464     A_UINT32 rx_filter_promiscuous_enable;
25465 } wmi_pdev_set_rx_filter_promiscuous_cmd_fixed_param;
25466 
25467 typedef enum {
25468     WMI_BEACON_INFO_PRESENCE_OUI_EXT            = 1 <<  0,
25469     WMI_BEACON_INFO_PRESENCE_MAC_ADDRESS        = 1 <<  1,
25470     WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_NSS  = 1 <<  2,
25471     WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_HT   = 1 <<  3,
25472     WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_VHT  = 1 <<  4,
25473     WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_BAND = 1 <<  5,
25474 } wmi_beacon_info_presence_items;
25475 
25476 typedef struct _wmi_vendor_oui_ext {
25477     A_UINT32 tlv_header;
25478     A_UINT32 buf_data_length;        /* length of data in bytes for this OUI including index byte */
25479     A_UINT32 info_presence_bit_mask; /* see enum wmi_beacon_info_presence_items */
25480     A_UINT32 oui_header_length;      /* either 3 or 5 bytes */
25481     A_UINT32 oui_data_length;        /* length of oui_data to compare in beacon which follows OUI header. Max length is capped to WMI_MAX_VENDOR_OUI_DATA_LENGTH bytes */
25482     A_UINT32 mac_address_length;     /* MAC address length in bytes
25483                                      ** (This value will always be 6,
25484                                      ** but is explicitly specified for sake
25485                                      ** of uniformity and completeness).
25486                                      */
25487     A_UINT32 capability_data_length; /* length of capability in bytes */
25488 } wmi_vendor_oui_ext;
25489 
25490 #define WMI_INFO_CAPABILITY_NSS_MASK                       0x0f
25491 #define WMI_INFO_CAPABILITY_NSS_OFFSET                     0
25492 #define WMI_INFO_CAPABILITY_HT_ENABLE_MASK                 0x10
25493 #define WMI_INFO_CAPABILITY_HT_ENABLE_OFFSET               4
25494 #define WMI_INFO_CAPABILITY_VHT_ENABLE_MASK                0x20
25495 #define WMI_INFO_CAPABILITY_VHT_ENABLE_OFFSET              5
25496 #define WMI_INFO_CAPABILITY_BAND_MASK                      0xc0
25497 #define WMI_INFO_CAPABILITY_BAND_OFFSET                    6
25498 
25499 /* definition of WMI_INFO_CAPABILITY_NSS_MASK */
25500 #define WMI_INFO_CAPABILITY_NSS_1X1                        1
25501 #define WMI_INFO_CAPABILITY_NSS_2X2                        2
25502 #define WMI_INFO_CAPABILITY_NSS_3X3                        3
25503 #define WMI_INFO_CAPABILITY_NSS_4X4                        4
25504 
25505 /* definition of WMI_INFO_CAPABILITY_BAND_MASK */
25506 #define WMI_INFO_CAPABILITY_2G_BAND_MASK                   (1 << 0)
25507 #define WMI_INFO_CAPABILITY_5G_BAND_MASK                   (1 << 1)
25508 
25509 typedef struct {
25510     A_UINT32 tlv_header;
25511     A_UINT32 vdev_id;        /* home vdev id */
25512     A_UINT32 meas_token;     /* from measure request frame */
25513     A_UINT32 dialog_token;
25514     A_UINT32 number_bursts;  /* zero keep sending until cancel, bigger than 0 means times e.g. 1,2 */
25515     A_UINT32 burst_interval; /* unit in mill seconds, interval between consecutive burst*/
25516     A_UINT32 burst_cycle;   /* times cycle through within one burst */
25517     A_UINT32 tx_power;      /* for path frame */
25518     A_UINT32 off_duration;  /* uint in mill seconds, channel off duraiton for path loss frame sending */
25519     wmi_mac_addr dest_mac; /* multicast DA, for path loss frame */
25520     A_UINT32 num_chans;
25521 /*
25522  * This fixed_param TLV is followed by other TLVs:
25523  *     A_UINT32 channel_list[num_chans]; // in MHz
25524  */
25525 } wmi_vdev_plmreq_start_cmd_fixed_param;
25526 
25527 typedef struct {
25528     A_UINT32 tlv_header;
25529     A_UINT32 vdev_id;
25530     A_UINT32 meas_token; /* same value from req*/
25531 } wmi_vdev_plmreq_stop_cmd_fixed_param;
25532 
25533 typedef struct {
25534     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_noa_cmd_fixed_param  */
25535     A_UINT32 tlv_header;
25536     /* unique id identifying the VDEV, generated by the caller */
25537     A_UINT32 vdev_id;
25538     /* enable/disable NoA */
25539     A_UINT32 enable;
25540     /** number of NoA desc. In the TLV noa_descriptor[] */
25541     A_UINT32 num_noa;
25542     /**
25543      * TLV (tag length value) parameters follow the pattern structure.
25544      * TLV  contain NoA desc with num of num_noa
25545      */
25546 } wmi_p2p_set_noa_cmd_fixed_param;
25547 
25548 typedef struct {
25549     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unit_test_cmd_fixed_param  */
25550     A_UINT32 tlv_header;
25551     /* unique id identifying the VDEV, generated by the caller */
25552     A_UINT32 vdev_id;
25553     /* Identify the wlan module */
25554     A_UINT32 module_id;
25555     /* Num of test arguments passed */
25556     A_UINT32 num_args;
25557     /* unique id identifying the unit test cmd, generated by the caller */
25558     A_UINT32 diag_token;
25559 /**
25560  * TLV (tag length value) parameters follow the wmi_unit_test_cmd_fixed_param
25561  * structure. The TLV's are:
25562  *     A_UINT32 args[];
25563  **/
25564 } wmi_unit_test_cmd_fixed_param;
25565 
25566 /** Roaming offload SYNCH_COMPLETE from host when host finished sync logic
25567  * after it received WMI_ROAM_SYNCH_EVENTID.
25568  */
25569 typedef struct {
25570     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_complete_fixed_param */
25571     /** unique id identifying the VDEV, generated by the caller */
25572     A_UINT32 vdev_id;
25573 } wmi_roam_synch_complete_fixed_param;
25574 
25575 
25576 typedef enum {
25577     RECOVERY_SIM_ASSERT = 0x01,
25578     RECOVERY_SIM_NO_DETECT = 0x02,
25579     RECOVERY_SIM_CTR_EP_FULL = 0x03,
25580     RECOVERY_SIM_EMPTY_POINT = 0x04,
25581     RECOVERY_SIM_STACK_OV = 0x05,
25582     RECOVERY_SIM_INFINITE_LOOP = 0x06,
25583     RECOVERY_SIM_PCIE_LINKDOWN = 0x07,
25584     RECOVERY_SIM_SELF_RECOVERY = 0x08,
25585     RECOVERY_SIM_BT_RECOVERY = 0x09,
25586 } RECOVERY_SIM_TYPE;
25587 
25588 /* WMI_FORCE_FW_HANG_CMDID */
25589 typedef struct {
25590     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_FORCE_FW_HANG_CMD_fixed_param */
25591     A_UINT32 type; /*0:unused 1: ASSERT, 2: not respond detect command,3:  simulate ep-full(),4:...*/
25592     A_UINT32 delay_time_ms; /*0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms)*/
25593 } WMI_FORCE_FW_HANG_CMD_fixed_param;
25594 
25595 typedef enum {
25596     WMI_MCAST_FILTER_SET = 1,
25597     WMI_MCAST_FILTER_DELETE
25598 } WMI_SET_SINGLE_MCAST_FILTER_OP;
25599 
25600 typedef struct {
25601     A_UINT32 tlv_header;
25602     A_UINT32 vdev_id;
25603     A_UINT32 index;
25604     A_UINT32 action;
25605     wmi_mac_addr mcastbdcastaddr;
25606 } WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param;
25607 
25608 typedef enum {
25609     WMI_MULTIPLE_MCAST_FILTER_CLEAR = 1, /* clear all previous mc list */
25610     WMI_MULTIPLE_MCAST_FILTER_SET,       /* clear all previous mc list, and set new list */
25611     WMI_MULTIPLE_MCAST_FILTER_DELETE,    /* delete one/multiple mc list */
25612     WMI_MULTIPLE_MCAST_FILTER_ADD        /* add one/multiple mc list */
25613 } WMI_MULTIPLE_MCAST_FILTER_OP;
25614 
25615 typedef struct {
25616     A_UINT32 tlv_header;
25617     A_UINT32 vdev_id;
25618     A_UINT32 operation;  /* refer WMI_MULTIPLE_MCAST_FILTER_OP */
25619     A_UINT32 num_mcastaddrs; /* number of elements in the subsequent mcast addr list */
25620 /**
25621  * TLV (tag length value) parameters follow the
25622  * structure. The TLV's are:
25623  * wmi_mac_addr mcastaddr_list[num_mcastaddrs];
25624  */
25625 } WMI_SET_MULTIPLE_MCAST_FILTER_CMD_fixed_param;
25626 
25627 
25628 /* WMI_DBGLOG_TIME_STAMP_SYNC_CMDID */
25629 typedef enum {
25630     WMI_TIME_STAMP_SYNC_MODE_MS, /* millisecond units */
25631     WMI_TIME_STAMP_SYNC_MODE_US, /* microsecond units */
25632 } WMI_TIME_STAMP_SYNC_MODE;
25633 
25634 typedef struct {
25635     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dbglog_time_stamp_sync_cmd_fixed_param */
25636     A_UINT32 mode; /* 0: millisec, 1: microsec (see WMI_TIME_STAMP_SYNC_MODE) */
25637     A_UINT32 time_stamp_low; /* lower 32 bits of remote time stamp */
25638     A_UINT32 time_stamp_high; /* higher 32 bits of remote time stamp */
25639 } WMI_DBGLOG_TIME_STAMP_SYNC_CMD_fixed_param;
25640 
25641 /* GPIO Command and Event data structures */
25642 
25643 /* WMI_GPIO_CONFIG_CMDID */
25644 enum {
25645     WMI_GPIO_PULL_NONE,   /** Do not specify a pull. */
25646     WMI_GPIO_PULL_UP,     /** Pull the GPIO up. */
25647     WMI_GPIO_PULL_DOWN,   /** Pull the GPIO down. */
25648     WMI_GPIO_PULL_KEEPER, /** Designate as a keeper. */
25649 };
25650 
25651 enum wmi_gpio_drive_strength {
25652     WMI_GPIO_2MA,  /** Specify a 2 mA drive. */
25653     WMI_GPIO_4MA,  /** Specify a 4 mA drive. */
25654     WMI_GPIO_6MA,  /** Specify a 6 mA drive. */
25655     WMI_GPIO_8MA,  /** Specify an 8 mA drive. */
25656     WMI_GPIO_10MA, /** Specify a 10 mA drive. */
25657     WMI_GPIO_12MA, /** Specify a 12 mA drive. */
25658     WMI_GPIO_14MA, /** Specify a 14 mA drive. */
25659     WMI_GPIO_16MA, /** Specify a 16 mA drive. */
25660 };
25661 
25662 enum wmi_tlmm_gpio_config {
25663   WMI_TLMM_GPIO_DISABLE, /** Use the internal inactive configuration. */
25664   WMI_TLMM_GPIO_ENABLE,  /** Use the configuration passed as parameter. */
25665 };
25666 
25667 enum {
25668     WMI_GPIO_INTTYPE_DISABLE,
25669     WMI_GPIO_INTTYPE_RISING_EDGE,
25670     WMI_GPIO_INTTYPE_FALLING_EDGE,
25671     WMI_GPIO_INTTYPE_BOTH_EDGE,
25672     WMI_GPIO_INTTYPE_LEVEL_LOW,
25673     WMI_GPIO_INTTYPE_LEVEL_HIGH
25674 };
25675 
25676 typedef struct {
25677     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_config_cmd_fixed_param */
25678     A_UINT32 gpio_num; /* GPIO number to be setup */
25679     A_UINT32 input; /* 0 - Output/ 1 - Input */
25680     A_UINT32 pull_type; /* Pull type defined above */
25681     A_UINT32 intr_mode; /* Interrupt mode defined above (Input) */
25682     /* mux_config_val - configure pin MUX
25683      * A value of 0x0 for this field means to use the default MUX configuration.
25684      * Valid non-zero values are as follows:
25685      * Rome:
25686      *     0x4 - use the pin as GPIO (rather than UART)
25687      */
25688     A_UINT32 mux_config_val;
25689     /*
25690      * The drive strength to use in the configuration of a GPIO.
25691      * Refer to the wmi_gpio_drive_strength enum.
25692      */
25693     A_UINT32 drive;
25694     /*
25695      * Use the internal inactive configuration or configuration passed
25696      * as parameter.
25697      * Refer to the wmi_tlmm_gpio_config enum.
25698      */
25699     A_UINT32 init_enable;
25700 } wmi_gpio_config_cmd_fixed_param;
25701 
25702 /* WMI_GPIO_OUTPUT_CMDID */
25703 typedef struct {
25704     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_output_cmd_fixed_param */
25705     A_UINT32 gpio_num; /* GPIO number to be setup */
25706     A_UINT32 set; /* Set the GPIO pin*/
25707 } wmi_gpio_output_cmd_fixed_param;
25708 
25709 /* WMI_GPIO_STATE_REQ_CMDID */
25710 typedef struct {
25711     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_state_req_cmd_fixed_param */
25712     A_UINT32 gpio_num;   /* GPIO number to get state */
25713 } wmi_gpio_state_req_cmd_fixed_param;
25714 
25715 /* WMI_GPIO_INPUT_EVENTID */
25716 typedef struct {
25717     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_input_event_fixed_param */
25718     A_UINT32 gpio_num; /* GPIO number which changed state */
25719 } wmi_gpio_input_event_fixed_param;
25720 
25721 typedef enum {
25722     /**
25723      * The following wmi_gpio_state_type is mutually exclusive.
25724      * 0:  gpio_invalid_state
25725      * 1:  gpio_state is LO
25726      * 2:  gpio_state is HIGH
25727      */
25728     WMI_GPIO_STATE_INVALID, /* GPIO state is invalid. */
25729     WMI_GPIO_STATE_LOW,     /* GPIO state is low. */
25730     WMI_GPIO_STATE_HIGH,    /* GPIO state is high. */
25731 } WMI_GPIO_STATE_TYPE;
25732 
25733 /* WMI_GPIO_STATE_RES_EVENTID */
25734 typedef struct {
25735     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_state_res_event_fixed_param */
25736     A_UINT32 gpio_num;   /* GPIO number */
25737     A_UINT32 gpio_state; /* state of GPIO pin defined in WMI_GPIO_STATE_TYPE 0 invalid 1 - LO, 2 -HI*/
25738 } wmi_gpio_state_res_event_fixed_param;
25739 
25740 /* WMI_ANT_CONTROLLER_CMDID */
25741 typedef struct {
25742     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ant_controller_cmd_fixed_param */
25743     A_UINT32 ant_controller_enable;
25744 } wmi_ant_controller_cmd_fixed_param;
25745 
25746 /* WMI_P2P_DISC_EVENTID */
25747 enum {
25748     P2P_DISC_SEARCH_PROB_REQ_HIT = 0, /* prob req hit the p2p find pattern */
25749     P2P_DISC_SEARCH_PROB_RESP_HIT, /* prob resp hit the p2p find pattern */
25750 };
25751 
25752 enum {
25753     P2P_DISC_MODE_SEARCH = 0, /* do search when p2p find offload*/
25754     P2P_DISC_MODE_LISTEN, /* do listen when p2p find offload*/
25755     P2P_DISC_MODE_AUTO, /* do listen and search when p2p find offload*/
25756 };
25757 
25758 enum {
25759     P2P_DISC_PATTERN_TYPE_BSSID = 0, /* BSSID pattern */
25760     P2P_DISC_PATTERN_TYPE_DEV_NAME, /* device name pattern */
25761 };
25762 
25763 typedef struct {
25764     A_UINT32 vdev_id;
25765     A_UINT32 reason; /* P2P DISC wake up reason*/
25766 } wmi_p2p_disc_event;
25767 
25768 typedef WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param WOW_EVENT_INFO_SECTION_GTKIGTK;
25769 
25770 typedef enum {
25771     WMI_FAKE_TXBFER_SEND_NDPA,
25772     WMI_FAKE_TXBFER_SEND_MU,
25773     WMI_FAKE_TXBFER_NDPA_FBTYPE,
25774     WMI_FAKE_TXBFER_NDPA_NCIDX,
25775     WMI_FAKE_TXBFER_NDPA_POLL,
25776     WMI_FAKE_TXBFER_NDPA_BW,
25777     WMI_FAKE_TXBFER_NDPA_PREAMBLE,
25778     WMI_FAKE_TXBFER_NDPA_RATE,
25779     WMI_FAKE_TXBFER_NDP_BW,
25780     WMI_FAKE_TXBFER_NDP_NSS,
25781     WMI_TXBFEE_ENABLE_UPLOAD_H,
25782     WMI_TXBFEE_ENABLE_CAPTURE_H,
25783     WMI_TXBFEE_SET_CBF_TBL,
25784     WMI_TXBFEE_CBF_TBL_LSIG,
25785     WMI_TXBFEE_CBF_TBL_SIGA1,
25786     WMI_TXBFEE_CBF_TBL_SIGA2,
25787     WMI_TXBFEE_CBF_TBL_SIGB,
25788     WMI_TXBFEE_CBF_TBL_PAD,
25789     WMI_TXBFEE_CBF_TBL_DUR,
25790     WMI_TXBFEE_SU_NCIDX,
25791     WMI_TXBFEE_CBIDX,
25792     WMI_TXBFEE_NGIDX,
25793 } WMI_TXBF_PARAM_ID;
25794 
25795 typedef struct {
25796     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_txbf_cmd_fixed_param */
25797     /** parameter id   */
25798     A_UINT32 param_id;
25799     /** parameter value */
25800     A_UINT32 param_value;
25801 } wmi_txbf_cmd_fixed_param;
25802 
25803 typedef struct {
25804     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_upload_h_hdr */
25805     A_UINT32 h_length;
25806     A_UINT32 cv_length;
25807 /* This TLV is followed by array of bytes:
25808  *   A_UINT8 bufp[]; <-- h_cv info buffer
25809  */
25810 } wmi_upload_h_hdr;
25811 
25812 typedef struct {
25813     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_capture_h_event_hdr */
25814     A_UINT32 svd_num;
25815     A_UINT32 tone_num;
25816     A_UINT32 reserved;
25817 } wmi_capture_h_event_hdr;
25818 
25819 typedef struct {
25820     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_range_desc */
25821     A_UINT32 start_freq; /* start frequency, not channel center freq */
25822     A_UINT32 end_freq; /* end frequency */
25823 } wmi_avoid_freq_range_desc;
25824 
25825 typedef struct {
25826     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_ranges_event_fixed_param */
25827     /* bad channel range count, multi range is allowed, 0 means all channel clear */
25828     A_UINT32 num_freq_ranges;
25829 
25830 /* The TLVs will follow.
25831  * multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc
25832  *     wmi_avoid_freq_range_desc avd_freq_range[]; <-- message buffer, NULL terminated
25833  */
25834 } wmi_avoid_freq_ranges_event_fixed_param;
25835 
25836 enum {
25837     WMI_SAR2_SUCCESS                = 0,
25838     WMI_SAR2_INVALID_ANTENNA_INDEX  = 1,
25839     WMI_SAR2_INVALID_TABLE_INDEX    = 2,
25840     WMI_SAR2_STATE_ERROR            = 4,
25841     WMI_SAR2_BDF_NO_TABLE           = 8,
25842 };
25843 
25844 typedef struct {
25845     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar2_result_event_fixed_param  */
25846     A_UINT32 result; /* refer to the above WMI_SAR2_ result definitions */
25847 } wmi_sar2_result_event_fixed_param;
25848 
25849 typedef struct {
25850     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_rekey_fail_event_fixed_param  */
25851     /** Reserved for future use */
25852     A_UINT32 reserved0;
25853     A_UINT32 vdev_id;
25854 } wmi_gtk_rekey_fail_event_fixed_param;
25855 
25856 
25857 typedef enum WLAN_COEX_EVENT {
25858     WLAN_COEX_EVENT_BT_NONE                     = 0,
25859     WLAN_COEX_EVENT_BT_A2DP_PROFILE_ADD         = 1,
25860     WLAN_COEX_EVENT_BT_A2DP_PROFILE_REMOVE      = 2,
25861     WLAN_COEX_EVENT_BT_VOICE_PROFILE_ADD        = 3,
25862     WLAN_COEX_EVENT_BT_VOICE_PROFILE_REMOVE     = 4,
25863     WLAN_COEX_EVENT_BT_SCAN_START               = 5,
25864     WLAN_COEX_EVENT_BT_SCAN_STOP                = 6,
25865     WLAN_COEX_EVENT_BT_PROFILE_CONNECTED        = 7,
25866     WLAN_COEX_EVENT_BT_PROFILE_DISCONNECTED     = 8,
25867 } WLAN_COEX_EVENT;
25868 
25869 typedef struct {
25870     A_UINT32 tlv_header;
25871     A_UINT32 coex_profile_evt; //uses the enum values from WLAN_COEX_EVENT
25872 } wmi_coex_bt_activity_event_fixed_param;
25873 
25874 enum wmm_ac_downgrade_policy {
25875     WMM_AC_DOWNGRADE_DEPRIO,
25876     WMM_AC_DOWNGRADE_DROP,
25877     WMM_AC_DOWNGRADE_INVALID,
25878 };
25879 
25880 /* WMM EDCA Params type */
25881 #define WMM_PARAM_TYPE_LEGACY        0
25882 /* Relaxed EDCA parameters for 11ax to be used in case of triggered access */
25883 #define WMM_PARAM_TYPE_11AX_EDCA     1
25884 
25885 typedef struct {
25886     A_UINT32 tlv_header;
25887     A_UINT32 cwmin;
25888     A_UINT32 cwmax;
25889     A_UINT32 aifs;
25890     union {
25891         A_UINT32 txoplimit;
25892         A_UINT32 mu_edca_timer;
25893     };
25894     A_UINT32 acm;
25895     A_UINT32 no_ack;
25896 } wmi_wmm_vparams;
25897 
25898 typedef struct {
25899     A_UINT32 tlv_header;
25900     A_UINT32 vdev_id;
25901     wmi_wmm_vparams wmm_params[4]; /* 0 be, 1 bk, 2 vi, 3 vo */
25902     A_UINT32 wmm_param_type; /* see WMM_PARAM_TYPE_xxx defs */
25903 } wmi_vdev_set_wmm_params_cmd_fixed_param;
25904 
25905 typedef struct {
25906     A_UINT32 tlv_header;
25907     A_UINT32 vdev_id;
25908     A_UINT32              gtxRTMask[2]; /* for HT and VHT rate masks */
25909     A_UINT32              userGtxMask; /* host request for GTX mask */
25910     A_UINT32              gtxPERThreshold; /* default: 10% */
25911     A_UINT32              gtxPERMargin; /* default: 2% */
25912     A_UINT32              gtxTPCstep; /* default: 1 */
25913     A_UINT32              gtxTPCMin; /* default: 5 */
25914     A_UINT32              gtxBWMask; /* 20/40/80/160 Mhz */
25915 } wmi_vdev_set_gtx_params_cmd_fixed_param;
25916 
25917 typedef struct
25918 {
25919     A_UINT32 tlv_header;
25920     A_UINT32 vdev_id;
25921     A_UINT32 ac;
25922     A_UINT32 medium_time_us; /* per second unit, the Admitted time granted, unit in micro seconds */
25923     A_UINT32 downgrade_type;
25924 } wmi_vdev_wmm_addts_cmd_fixed_param;
25925 
25926 typedef struct
25927 {
25928     A_UINT32 tlv_header;
25929     A_UINT32 vdev_id;
25930     A_UINT32 ac;
25931 } wmi_vdev_wmm_delts_cmd_fixed_param;
25932 
25933 /* DEPRECATED */
25934 typedef struct {
25935     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_enable_cmd_fixed_param  */
25936     /** Reserved for future use */
25937     A_UINT32 reserved0;
25938 } wmi_pdev_dfs_enable_cmd_fixed_param;
25939 
25940 /* DEPRECATED */
25941 typedef struct {
25942     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_disable_cmd_fixed_param  */
25943     /** pdev_id for identifying the MAC
25944      * See macros starting with WMI_PDEV_ID_ for values.
25945      */
25946     A_UINT32 pdev_id;
25947 } wmi_pdev_dfs_disable_cmd_fixed_param;
25948 
25949 typedef struct {
25950     /** TLV tag and len; tag equals
25951      *  WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_ena_cmd_fixed_param
25952      */
25953     A_UINT32 tlv_header;
25954 
25955     /** pdev_id for identifying the MAC
25956      * See macros starting with WMI_PDEV_ID_ for values.
25957      */
25958     A_UINT32 pdev_id;
25959 } wmi_dfs_phyerr_filter_ena_cmd_fixed_param;
25960 
25961 typedef struct {
25962     /** TLV tag and len; tag equals
25963      *  WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_dis_cmd_fixed_param
25964      */
25965     A_UINT32 tlv_header;
25966     /** pdev_id for identifying the MAC
25967      * See macros starting with WMI_PDEV_ID_ for values.
25968      */
25969     A_UINT32 pdev_id;
25970 } wmi_dfs_phyerr_filter_dis_cmd_fixed_param;
25971 
25972 typedef struct {
25973     A_UINT32 tlv_header;
25974     A_UINT32 pdev_id;
25975 } wmi_pdev_dfs_phyerr_offload_enable_cmd_fixed_param;
25976 
25977 typedef struct {
25978     A_UINT32 tlv_header;
25979     A_UINT32 pdev_id;
25980 } wmi_pdev_dfs_phyerr_offload_disable_cmd_fixed_param;
25981 
25982 typedef enum {
25983     QUICK_OCAC = 0,
25984     EXTENSIVE_OCAC,
25985     QUICK_RCAC,
25986 } WMI_ADFS_OCAC_MODE;
25987 
25988 typedef struct {
25989     A_UINT32  tlv_header;
25990     A_UINT32  vdev_id;
25991     A_UINT32  ocac_mode;  /* WMI_ADFS_OCAC_MODE */
25992     A_UINT32  min_duration_ms; /* in milliseconds */
25993     A_UINT32  max_duration_ms; /* in milliseconds */
25994     A_UINT32  chan_freq;   /* in MHz */
25995     A_UINT32  chan_width;  /* in MHz */
25996     /*
25997      * Two center frequencies are required since agile channel switch
25998      * has to support 160/165 MHz for products like Pine.
25999      * For agile which supports only up to 80MHz (HK),
26000      * freq2 will be 0 and ignored.
26001      */
26002     union {
26003         A_UINT32  center_freq; /* in MHz */ /* old name */
26004         A_UINT32  center_freq1; /* in MHz */ /* new name */
26005     };
26006     A_UINT32  center_freq2; /* in MHz */
26007 } wmi_vdev_adfs_ch_cfg_cmd_fixed_param;
26008 
26009 typedef struct {
26010     A_UINT32 tlv_header;
26011     A_UINT32 vdev_id;
26012 } wmi_vdev_adfs_ocac_abort_cmd_fixed_param;
26013 
26014 typedef enum {
26015     IN_SERVICE_MODE = 0,
26016     OCAC_MODE,
26017 } WMI_DFS_RADAR_DETECTION_MODE;
26018 
26019 typedef struct {
26020     A_UINT32 tlv_header;
26021     A_UINT32 pdev_id;
26022     /* In-service mode or O-CAC mode */
26023     A_UINT32 detection_mode; /* WMI_DFS_RADAR_DETECTION_MODE */
26024     A_UINT32 chan_freq;  /* in MHz */
26025     A_UINT32 chan_width; /* in MHz */
26026     A_UINT32 detector_id;
26027     A_UINT32 segment_id;
26028     A_UINT32 timestamp;
26029     A_UINT32 is_chirp;
26030     A_INT32  freq_offset; /* in MHz */
26031     A_INT32  sidx; /* segment index (where was the radar within the channel) */
26032 } wmi_pdev_dfs_radar_detection_event_fixed_param;
26033 
26034 typedef struct {
26035     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_RADAR_FLAGS */
26036     /*
26037      * Bit 0:
26038      *     0 - need check sub channel marking
26039      *     1 - full bandwidth need put to NOL
26040      *     Refer to WMI_RADAR_FLAGS_FULL_BW_NOL_GET and _SET macros
26041      * [1:31] reserved
26042      */
26043     A_UINT32 flags;
26044 }  WMI_RADAR_FLAGS;
26045 
26046 #define WMI_RADAR_FLAGS_FULL_BW_NOL_BITPOS    0
26047 #define WMI_RADAR_FLAGS_FULL_BW_NOL_NUM_BITS  1
26048 
26049 #define WMI_RADAR_FLAGS_FULL_BW_NOL_GET(flag) \
26050     WMI_GET_BITS(flag, \
26051         WMI_RADAR_FLAGS_FULL_BW_NOL_BITPOS, \
26052         WMI_RADAR_FLAGS_FULL_BW_NOL_NUM_BITS)
26053 #define WMI_RADAR_FLAGS_FULL_BW_NOL_SET(flag, val) \
26054     WMI_SET_BITS(flag, \
26055         WMI_RADAR_FLAGS_FULL_BW_NOL_BITPOS, \
26056         WMI_RADAR_FLAGS_FULL_BW_NOL_NUM_BITS, val)
26057 
26058 typedef enum {
26059     OCAC_COMPLETE = 0,
26060     OCAC_ABORT,
26061 } WMI_VDEV_OCAC_COMPLETE_STATUS;
26062 
26063 typedef struct {
26064     A_UINT32 tlv_header;
26065     A_UINT32 vdev_id;
26066     A_UINT32 chan_freq;   /* in MHz */
26067     A_UINT32 chan_width;  /* in MHz */
26068     /*
26069      * Two center frequencies are required since agile channel switch
26070      * has to support 160/165 MHz for products like Pine.
26071      * For agile which supports only up to 80MHz (HK),
26072      * freq2 will be 0 and ignored.
26073      */
26074     union {
26075         A_UINT32 center_freq; /* in MHz */ /* old name */
26076         A_UINT32 center_freq1; /* in MHz */ /* new name */
26077     };
26078     A_UINT32 status;   /* WMI_VDEV_OCAC_COMPLETE_STATUS */
26079     A_UINT32 center_freq2; /* in MHz */
26080 } wmi_vdev_adfs_ocac_complete_event_fixed_param;
26081 
26082 typedef struct {
26083     A_UINT32 tlv_header;
26084     A_UINT32 vdev_id;
26085 } wmi_vdev_dfs_cac_complete_event_fixed_param;
26086 
26087 
26088 /** TDLS COMMANDS */
26089 
26090 /* WMI_TDLS_SET_STATE_CMDID */
26091 /* TDLS State */
26092 enum wmi_tdls_state {
26093     /** TDLS disable */
26094     WMI_TDLS_DISABLE,
26095     /** TDLS enabled - no firmware connection tracking/notifications */
26096     WMI_TDLS_ENABLE_PASSIVE,
26097     /** TDLS enabled - with firmware connection tracking/notifications */
26098     WMI_TDLS_ENABLE_ACTIVE,
26099     /** TDLS enabled - firmware waits for peer mac for connection tracking */
26100     WMI_TDLS_ENABLE_ACTIVE_EXTERNAL_CONTROL,
26101     /** TDLS enabled - TDLS connection tracking is done in host */
26102     WMI_TDLS_ENABLE_CONNECTION_TRACKER_IN_HOST,
26103 };
26104 
26105 /* TDLS Options */
26106 #define WMI_TDLS_OFFCHAN_EN             (1 << 0) /** TDLS Off Channel support */
26107 #define WMI_TDLS_BUFFER_STA_EN          (1 << 1) /** TDLS Buffer STA support */
26108 #define WMI_TDLS_SLEEP_STA_EN           (1 << 2) /** TDLS Sleep STA support (not currently supported) */
26109 
26110 typedef struct {
26111     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_state_cmd_fixed_param  */
26112     A_UINT32 tlv_header;
26113     /** unique id identifying the VDEV */
26114     A_UINT32 vdev_id;
26115     /** Enable/Disable TDLS (wmi_tdls_state) */
26116     A_UINT32 state;
26117     /** Duration (in ms) over which to calculate tx/rx threshold to trigger TDLS Discovery */
26118     A_UINT32 notification_interval_ms;
26119     /** number of packets OVER which notify/suggest TDLS Discovery:
26120      *  if current tx pps counter / notification interval >= threshold
26121      *  then a notification will be sent to host to advise TDLS Discovery */
26122     A_UINT32 tx_discovery_threshold;
26123     /** number of packets UNDER which notify/suggest TDLS Teardown:
26124      *  if current tx pps counter / notification interval < threshold
26125      *  then a notification will be sent to host to advise TDLS Tear down */
26126     A_UINT32 tx_teardown_threshold;
26127     /** Absolute RSSI value under which notify/suggest TDLS Teardown */
26128     A_INT32 rssi_teardown_threshold;
26129     /** Peer RSSI < (AP RSSI + delta) will trigger a teardown */
26130     A_INT32 rssi_delta;
26131     /** TDLS Option Control
26132      * Off-Channel, Buffer STA, (later)Sleep STA support */
26133     A_UINT32 tdls_options;
26134     /* Buffering time in number of beacon intervals */
26135     A_UINT32 tdls_peer_traffic_ind_window;
26136     /* Wait time for PTR frame */
26137     A_UINT32 tdls_peer_traffic_response_timeout_ms;
26138     /* Self PUAPSD mask */
26139     A_UINT32 tdls_puapsd_mask;
26140     /* Inactivity timeout */
26141     A_UINT32 tdls_puapsd_inactivity_time_ms;
26142     /* Max of rx frame during SP */
26143     A_UINT32 tdls_puapsd_rx_frame_threshold;
26144     /**Duration (in ms) over which to check whether TDLS link needs to be torn down */
26145     A_UINT32 teardown_notification_ms;
26146     /** STA kickout threshold for TDLS peer */
26147     A_UINT32 tdls_peer_kickout_threshold;
26148     /* TDLS discovery WAKE timeout in ms.
26149      * DUT will wake until this timeout to receive TDLS discovery response
26150      * from peer.
26151      * If tdls_discovery_wake_timeout is 0x0, the DUT will choose autonomously
26152      * what wake timeout value to use.
26153      */
26154     A_UINT32 tdls_discovery_wake_timeout;
26155 } wmi_tdls_set_state_cmd_fixed_param;
26156 
26157 /* WMI_TDLS_PEER_UPDATE_CMDID */
26158 
26159 enum wmi_tdls_peer_state {
26160     /** tx peer TDLS link setup now starting, traffic to DA should be
26161      * paused (except TDLS frames) until state is moved to CONNECTED (or
26162      * TEARDOWN on setup failure) */
26163     WMI_TDLS_PEER_STATE_PEERING,
26164     /** tx peer TDLS link established, running (all traffic to DA unpaused) */
26165     WMI_TDLS_PEER_STATE_CONNECTED,
26166     /** tx peer TDLS link tear down started (link paused, any frames
26167      * queued for DA will be requeued back through the AP)*/
26168     WMI_TDLS_PEER_STATE_TEARDOWN,
26169     /** Add peer mac into connection table */
26170     WMI_TDLS_PEER_ADD_MAC_ADDR,
26171     /** Remove peer mac from connection table */
26172     WMI_TDLS_PEER_REMOVE_MAC_ADDR,
26173 };
26174 
26175 /* NB: These defines are fixed, and cannot be changed without breaking WMI compatibility */
26176 #define WMI_TDLS_MAX_SUPP_CHANNELS 128
26177 #define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
26178 typedef struct {
26179     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_capabilities  */
26180     A_UINT32 tlv_header;
26181     /* Peer's QoS Info - for U-APSD */
26182     /* AC FLAGS  - accessed through macros below */
26183     /* Ack, SP, More Data Ack - accessed through macros below */
26184     A_UINT32 peer_qos;
26185     /*TDLS Peer's U-APSD Buffer STA Support*/
26186     A_UINT32 buff_sta_support;
26187     /*TDLS off channel related params */
26188     A_UINT32 off_chan_support;
26189     A_UINT32 peer_curr_operclass;
26190     A_UINT32 self_curr_operclass;
26191     /* Number of channels available for off channel operation */
26192     A_UINT32 peer_chan_len;
26193     A_UINT32 peer_operclass_len;
26194     A_UINT8  peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
26195     /* Is peer initiator or responder of TDLS setup request */
26196     A_UINT32 is_peer_responder;
26197     /* Preferred off channel number as configured by user */
26198     A_UINT32 pref_offchan_num;
26199     /* Preferred off channel bandwidth as configured by user */
26200     A_UINT32 pref_offchan_bw;
26201     /* Preferred off channel frequency in MHz as configured by user */
26202     A_UINT32 pref_offchan_freq;
26203 
26204     /** Followed by the variable length TLV peer_chan_list:
26205      *  wmi_channel peer_chan_list[].
26206       *   Array size would be peer_chan_len.
26207      *  This array is intersected channels which is supported by both peer
26208      *  and DUT. freq1 in chan_info shall be same as mhz, freq2 shall be 0.
26209      *  FW shall compute BW for an offchan based on peer's ht/vht cap
26210      *  received in peer_assoc cmd during change STA operation
26211       */
26212  } wmi_tdls_peer_capabilities;
26213 
26214 #define WMI_TDLS_QOS_VO_FLAG           0
26215 #define WMI_TDLS_QOS_VI_FLAG           1
26216 #define WMI_TDLS_QOS_BK_FLAG           2
26217 #define WMI_TDLS_QOS_BE_FLAG           3
26218 #define WMI_TDLS_QOS_ACK_FLAG          4
26219 #define WMI_TDLS_QOS_SP_FLAG           5
26220 #define WMI_TDLS_QOS_MOREDATA_FLAG     7
26221 
26222 #define WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps,flag) do { \
26223         (ppeer_caps)->peer_qos |=  (1 << flag);      \
26224      } while (0)
26225 #define WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps,flag)   \
26226         (((ppeer_caps)->peer_qos & (1 << flag)) >> flag)
26227 
26228 #define WMI_SET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
26229     WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
26230 #define WMI_GET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
26231     WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
26232 #define WMI_SET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
26233     WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
26234 #define WMI_GET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
26235     WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
26236 #define WMI_SET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
26237     WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
26238 #define WMI_GET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
26239     WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
26240 #define WMI_SET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
26241     WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
26242 #define WMI_GET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
26243     WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
26244 #define WMI_SET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
26245     WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
26246 #define WMI_GET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
26247     WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
26248 /* SP has 2 bits */
26249 #define WMI_SET_TDLS_PEER_SP_UAPSD(ppeer_caps,val) do { \
26250      (ppeer_caps)->peer_qos |=  (((val) & 0x3) << WMI_TDLS_QOS_SP_FLAG); \
26251      } while (0)
26252 #define WMI_GET_TDLS_PEER_SP_UAPSD(ppeer_caps) \
26253     (((ppeer_caps)->peer_qos & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
26254 
26255 #define WMI_SET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
26256     WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
26257 #define WMI_GET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
26258     WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
26259 
26260 
26261 #define WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd,flag) do { \
26262         (pset_cmd)->tdls_puapsd_mask |=  (1 << flag);      \
26263      } while (0)
26264 #define WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd,flag)   \
26265         (((pset_cmd)->tdls_puapsd_mask & (1 << flag)) >> flag)
26266 
26267 #define WMI_SET_TDLS_SELF_VO_UAPSD(pset_cmd) \
26268     WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
26269 #define WMI_GET_TDLS_SELF_VO_UAPSD(pset_cmd) \
26270     WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
26271 #define WMI_SET_TDLS_SELF_VI_UAPSD(pset_cmd) \
26272     WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
26273 #define WMI_GET_TDLS_SELF_VI_UAPSD(pset_cmd) \
26274     WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
26275 #define WMI_SET_TDLS_SELF_BK_UAPSD(pset_cmd) \
26276     WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
26277 #define WMI_GET_TDLS_SELF__BK_UAPSD(pset_cmd) \
26278     WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
26279 #define WMI_SET_TDLS_SELF_BE_UAPSD(pset_cmd) \
26280     WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
26281 #define WMI_GET_TDLS_SELF_BE_UAPSD(pset_cmd) \
26282     WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
26283 #define WMI_SET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
26284     WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
26285 #define WMI_GET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
26286     WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
26287 /* SP has 2 bits */
26288 #define WMI_SET_TDLS_SELF_SP_UAPSD(pset_cmd,val) do { \
26289      (pset_cmd)->tdls_puapsd_mask |=  (((val) & 0x3) << WMI_TDLS_QOS_SP_FLAG); \
26290      } while (0)
26291 #define WMI_GET_TDLS_SELF_SP_UAPSD(pset_cmd) \
26292     (((pset_cmd)->tdls_puapsd_mask & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
26293 
26294 #define WMI_SET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
26295     WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
26296 #define WMI_GET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
26297     WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
26298 
26299 
26300 typedef struct {
26301     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_update_cmd_fixed_param  */
26302     A_UINT32    tlv_header;
26303     /** unique id identifying the VDEV */
26304     A_UINT32                    vdev_id;
26305     /** peer MAC address */
26306     wmi_mac_addr                peer_macaddr;
26307     /** new TDLS state for peer (wmi_tdls_peer_state) */
26308     A_UINT32                    peer_state;
26309     /* The TLV for wmi_tdls_peer_capabilities will follow.
26310      *     wmi_tdls_peer_capabilities  peer_caps;
26311      */
26312     /** Followed by the variable length TLV chan_info:
26313      *  wmi_channel chan_info[] */
26314 } wmi_tdls_peer_update_cmd_fixed_param;
26315 
26316 /* WMI_TDLS_SET_OFFCHAN_MODE_CMDID */
26317 
26318 
26319 /* bitmap  20, 40, 80 or 160 MHz wide channel */
26320 #define WMI_TDLS_OFFCHAN_20MHZ                  0x1   /*  20 MHz wide channel */
26321 #define WMI_TDLS_OFFCHAN_40MHZ                  0x2   /*  40 MHz wide channel */
26322 #define WMI_TDLS_OFFCHAN_80MHZ                  0x4   /*  80 MHz wide channel */
26323 #define WMI_TDLS_OFFCHAN_160MHZ                 0x8   /*  160 MHz wide channel */
26324 
26325 
26326 enum wmi_tdls_offchan_mode {
26327     WMI_TDLS_ENABLE_OFFCHANNEL,
26328     WMI_TDLS_DISABLE_OFFCHANNEL, /* passive offchannel disable */
26329     WMI_TDLS_ACTIVE_DISABLE_OFFCHANNEL,
26330 };
26331 
26332 typedef struct {
26333     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_offchan_mode_cmd_fixed_param  */
26334     A_UINT32   tlv_header;
26335     /** unique id identifying the VDEV */
26336     A_UINT32   vdev_id;
26337     /** Enable/Disable TDLS offchannel */
26338     A_UINT32 offchan_mode;
26339     /** peer MAC address */
26340     wmi_mac_addr   peer_macaddr;
26341     /* Is peer initiator or responder of TDLS setup request */
26342     A_UINT32 is_peer_responder;
26343     /* off channel number*/
26344     A_UINT32 offchan_num;
26345     /* off channel bandwidth bitmap, e.g. WMI_OFFCHAN_20MHZ */
26346     A_UINT32 offchan_bw_bitmap;
26347     /* operating class for offchan */
26348     A_UINT32 offchan_oper_class;
26349     /* off channel frequency in MHz */
26350     A_UINT32 offchan_freq;
26351 /** This fixed_param TLV is followed by the below additional TLVs:
26352  *    - wmi_channel peer_chan_info[]: optional per-peer chan_info
26353  */
26354 } wmi_tdls_set_offchan_mode_cmd_fixed_param;
26355 
26356 
26357 /** TDLS EVENTS */
26358 enum wmi_tdls_peer_notification {
26359     /** tdls discovery recommended for peer (based
26360      * on tx bytes per second > tx_discover threshold) */
26361     WMI_TDLS_SHOULD_DISCOVER,
26362     /** tdls link tear down recommended for peer
26363      * due to tx bytes per second below tx_teardown_threshold
26364      * NB: this notification sent once */
26365     WMI_TDLS_SHOULD_TEARDOWN,
26366     /** tx peer TDLS link tear down complete */
26367     WMI_TDLS_PEER_DISCONNECTED,
26368     /** TDLS/BT role change notification for connection tracker */
26369     WMI_TDLS_CONNECTION_TRACKER_NOTIFICATION,
26370 };
26371 
26372 enum wmi_tdls_peer_reason {
26373     /** tdls teardown recommended due to low transmits */
26374     WMI_TDLS_TEARDOWN_REASON_TX,
26375     /** tdls link tear down recommended due to poor RSSI */
26376     WMI_TDLS_TEARDOWN_REASON_RSSI,
26377     /** tdls link tear down recommended due to offchannel scan */
26378     WMI_TDLS_TEARDOWN_REASON_SCAN,
26379     /** tdls peer disconnected due to peer deletion */
26380     WMI_TDLS_DISCONNECTED_REASON_PEER_DELETE,
26381     /** tdls peer disconnected due to PTR timeout */
26382     WMI_TDLS_TEARDOWN_REASON_PTR_TIMEOUT,
26383     /** tdls peer disconnected due wrong PTR format */
26384     WMI_TDLS_TEARDOWN_REASON_BAD_PTR,
26385     /** tdls peer not responding */
26386     WMI_TDLS_TEARDOWN_REASON_NO_RESPONSE,
26387     /** tdls entered buffer STA role, TDLS connection tracker needs to handle this */
26388     WMI_TDLS_ENTER_BUF_STA,
26389     /** tdls exited buffer STA role, TDLS connection tracker needs to handle this */
26390     WMI_TDLS_EXIT_BUF_STA,
26391     /** BT entered busy mode, TDLS connection tracker needs to handle this */
26392     WMI_TDLS_ENTER_BT_BUSY_MODE,
26393     /** BT exited busy mode, TDLS connection tracker needs to handle this */
26394     WMI_TDLS_EXIT_BT_BUSY_MODE,
26395     /** TDLS module received a scan start event, TDLS connection tracker needs to handle this */
26396     WMI_TDLS_SCAN_STARTED_EVENT,
26397     /** TDLS module received a scan complete event, TDLS connection tracker needs to handle this */
26398     WMI_TDLS_SCAN_COMPLETED_EVENT,
26399 };
26400 
26401 /* WMI_TDLS_PEER_EVENTID */
26402 typedef struct {
26403     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_event_fixed_param  */
26404     A_UINT32    tlv_header;
26405     /** peer MAC address */
26406     wmi_mac_addr    peer_macaddr;
26407     /** TDLS peer status (wmi_tdls_peer_notification)*/
26408     A_UINT32        peer_status;
26409     /** TDLS peer reason (wmi_tdls_peer_reason) */
26410     A_UINT32        peer_reason;
26411     /** unique id identifying the VDEV */
26412     A_UINT32        vdev_id;
26413 } wmi_tdls_peer_event_fixed_param;
26414 
26415 /* NOTE: wmi_vdev_mcc_bcn_intvl_change_event_fixed_param would be deprecated. Please
26416  don't use this for any new implementations */
26417 typedef struct {
26418     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_mcc_bcn_intvl_change_event_fixed_param  */
26419     /** unique id identifying the VDEV, generated by the caller */
26420     A_UINT32 vdev_id;
26421     /* New beacon interval to be used for the specified VDEV suggested by firmware */
26422     A_UINT32 new_bcn_intvl;
26423 } wmi_vdev_mcc_bcn_intvl_change_event_fixed_param;
26424 
26425 /* WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID */
26426 typedef struct {
26427     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param */
26428     A_UINT32 tlv_header;
26429     /** 1: enable fw based adaptive ocs,
26430      *  0: disable fw based adaptive ocs
26431      */
26432     A_UINT32 enable;
26433     /** This field contains the MAC identifier in order to lookup the appropriate OCS instance. */
26434     union {
26435         A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
26436         /** pdev_id for identifying the MAC
26437          * See macros starting with WMI_PDEV_ID_ for values.
26438          */
26439         A_UINT32 pdev_id;
26440     };
26441 } wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param;
26442 
26443 /* WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID */
26444 typedef struct {
26445     /* Frequency of the channel for which the quota is set */
26446     A_UINT32 chan_mhz;
26447     /* Requested channel time quota expressed as percentage */
26448     A_UINT32 channel_time_quota;
26449 } wmi_resmgr_chan_time_quota;
26450 
26451 typedef struct {
26452     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_chan_time_quota_tlv */
26453     A_UINT32 tlv_header;
26454     wmi_resmgr_chan_time_quota chan_time_quota;
26455 } wmi_resmgr_chan_time_quota_tlv;
26456 
26457 typedef struct {
26458     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_time_quota_cmd_fixed_param */
26459     A_UINT32 tlv_header;
26460     /** number of channel time quota command structures
26461      * (wmi_resmgr_chan_time_quota) 1 or 2
26462      */
26463     A_UINT32 num_chans;
26464 /* This TLV is followed by another TLV of array of bytes
26465  * A_UINT8 data[];
26466  * This data array contains
26467  * num_chans * size of(struct wmi_resmgr_chan_time_quota)
26468  */
26469 } wmi_resmgr_set_chan_time_quota_cmd_fixed_param;
26470 
26471 typedef enum {
26472     WMI_RESMGR_QUOTA_TYPE_CLEAR   = 0,
26473     WMI_RESMGR_QUOTA_TYPE_FIXED   = 1,
26474     WMI_RESMGR_QUOTA_TYPE_DYNAMIC = 2,
26475 } wmi_resmgr_quota_type;
26476 
26477 typedef struct {
26478     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_chan_time_quota_changed_event_fixed_param */
26479     A_UINT32 tlv_header;
26480     /** quota_type: refer to wmi_resmgr_quota_type
26481      *  0 :  clear  quota
26482      *  1 :  fixed  quota
26483      *  2 : dynamic quota
26484      */
26485     A_UINT32 quota_type;
26486 
26487 /* This TLV is followed by another TLV of array of struct
26488  * wmi_resmgr_chan_time_quota_tlv chan_quota[num_chans];
26489  */
26490 } wmi_resmgr_chan_time_quota_changed_event_fixed_param;
26491 
26492 /* WMI_RESMGR_SET_CHAN_LATENCY_CMDID */
26493 typedef struct {
26494     /* Frequency of the channel for which the latency is set */
26495     A_UINT32 chan_mhz;
26496     /* Requested channel latency in milliseconds */
26497     A_UINT32 latency;
26498 } wmi_resmgr_chan_latency;
26499 
26500 typedef struct {
26501     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_latency_cmd_fixed_param */
26502     A_UINT32 tlv_header;
26503     /** number of channel latency command structures
26504      * (wmi_resmgr_chan_latency) 1 or 2
26505      */
26506     A_UINT32 num_chans;
26507 /* This TLV is followed by another TLV of array of bytes
26508  * A_UINT8 data[];
26509  * This data array contains
26510  * num_chans * size of(struct wmi_resmgr_chan_latency)
26511  */
26512 } wmi_resmgr_set_chan_latency_cmd_fixed_param;
26513 
26514 /* WMI_STA_SMPS_FORCE_MODE_CMDID */
26515 
26516 /** STA SMPS Forced Mode */
26517 typedef enum {
26518     WMI_SMPS_FORCED_MODE_NONE = 0,
26519     WMI_SMPS_FORCED_MODE_DISABLED,
26520     WMI_SMPS_FORCED_MODE_STATIC,
26521     WMI_SMPS_FORCED_MODE_DYNAMIC
26522 } wmi_sta_smps_forced_mode;
26523 
26524 typedef struct {
26525     /** TLV tag and len; tag equals
26526      *  WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_cmd_fixed_param */
26527     A_UINT32 tlv_header;
26528     /** Unique id identifying the VDEV */
26529     A_UINT32 vdev_id;
26530     /** The mode of SMPS that is to be forced in the FW. */
26531     A_UINT32 forced_mode;
26532 } wmi_sta_smps_force_mode_cmd_fixed_param;
26533 
26534 /** wlan HB commands */
26535 #define WMI_WLAN_HB_ITEM_UDP            0x1
26536 #define WMI_WLAN_HB_ITEM_TCP            0x2
26537 #define WMI_WLAN_HB_MAX_FILTER_SIZE     32 /* should be equal to WLAN_HB_MAX_FILTER_SIZE,
26538                                               must be a multiple of 4 bytes */
26539 
26540 typedef struct {
26541     /** TLV tag and len; tag equals
26542      *  WMITLV_TAG_STRUC_wmi_hb_set_enable_cmd_fixed_param */
26543     A_UINT32 tlv_header;     /** TLV header*/
26544     A_UINT32 vdev_id;        /** Vdev ID */
26545     A_UINT32 enable;         /** 1: Enable, 0: Disable`*/
26546     A_UINT32 item;           /** 1: UDP, 2: TCP */
26547     A_UINT32 session;        /** Session ID from HOST */
26548 } wmi_hb_set_enable_cmd_fixed_param;
26549 
26550 typedef struct {
26551     /** TLV tag and len; tag equals
26552      *  WMITLV_TAG_STRUC_wmi_hb_set_tcp_params_cmd_fixed_param */
26553     A_UINT32 tlv_header;      /** TLV header*/
26554     A_UINT32 vdev_id;         /** Vdev ID */
26555     A_UINT32 srv_ip;          /** Server IP address (IPv4) */
26556     A_UINT32 dev_ip;          /** Device IP address (IPv4) */
26557     A_UINT32 seq;             /** TCP Sequence no */
26558     A_UINT32 src_port;        /** Source port */
26559     A_UINT32 dst_port;        /** Destination port */
26560     A_UINT32 interval;        /** Keep alive interval */
26561     A_UINT32 timeout;         /** Timeout if keep alive fails */
26562     A_UINT32 session;         /** Session ID from HOST */
26563     wmi_mac_addr gateway_mac; /** Server Mac Address */
26564 } wmi_hb_set_tcp_params_cmd_fixed_param;
26565 
26566 typedef struct {
26567     /** TLV tag and len; tag equals
26568      *  WMITLV_TAG_STRUC_wmi_hb_set_tcp_pkt_filter_cmd_fixed_param */
26569     A_UINT32 tlv_header;
26570     A_UINT32 vdev_id;
26571     A_UINT32 length;
26572     A_UINT32 offset;
26573     A_UINT32 session;
26574     A_UINT8  filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
26575 } wmi_hb_set_tcp_pkt_filter_cmd_fixed_param;
26576 
26577 typedef struct {
26578     /** TLV tag and len; tag equals
26579      *  WMITLV_TAG_STRUC_wmi_hb_set_udp_params_cmd_fixed_param */
26580     A_UINT32 tlv_header;
26581     A_UINT32 vdev_id;
26582     A_UINT32 srv_ip;
26583     A_UINT32 dev_ip;
26584     A_UINT32 src_port;
26585     A_UINT32 dst_port;
26586     A_UINT32 interval;
26587     A_UINT32 timeout;
26588     A_UINT32 session;
26589     wmi_mac_addr gateway_mac;
26590 } wmi_hb_set_udp_params_cmd_fixed_param;
26591 
26592 typedef struct {
26593     /** TLV tag and len; tag equals
26594      *  WMITLV_TAG_STRUC_wmi_hb_set_udp_pkt_filter_cmd_fixed_param */
26595     A_UINT32 tlv_header;
26596     A_UINT32 vdev_id;
26597     A_UINT32 length;
26598     A_UINT32 offset;
26599     A_UINT32 session;
26600     A_UINT8  filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
26601 } wmi_hb_set_udp_pkt_filter_cmd_fixed_param;
26602 
26603 /** wlan HB events */
26604 typedef enum {
26605     WMI_WLAN_HB_REASON_UNKNOWN      = 0,
26606     WMI_WLAN_HB_REASON_TCP_TIMEOUT  = 1,
26607     WMI_WLAN_HB_REASON_UDP_TIMEOUT  = 2,
26608 } WMI_HB_WAKEUP_REASON;
26609 
26610 typedef struct {
26611     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hb_ind_event_fixed_param */
26612     A_UINT32 vdev_id;    /** unique id identifying the VDEV */
26613     A_UINT32 session;    /** Session ID from HOST */
26614     A_UINT32 reason;     /** wakeup reason */
26615 } wmi_hb_ind_event_fixed_param;
26616 
26617 typedef struct {
26618     /** TLV tag and len; tag equals
26619      *  WMITLV_TAG_STRUC_wmi_oic_set_enable_cmd_fixed_param */
26620     A_UINT32 tlv_header;           /** TLV Header */
26621     A_UINT32 vdev_id;              /** Vdev ID */
26622     A_UINT32 session;              /** Session number from the HOST */
26623     A_UINT32 srv_ip;               /** IPv4 address of the OCF server */
26624     A_UINT32 dev_ip;               /** IPv4 address of the device */
26625     A_UINT32 tcp_tx_seq;           /** TCP sequence number */
26626     A_UINT32 src_port;             /** Source port */
26627     A_UINT32 dst_port;             /** Destination port */
26628     A_UINT32 protocol;             /** Protocol used: TCP:0, UDP:1 */
26629     A_UINT32 wlan_hb_session;      /** Linked WLAN HB session. If a keepalive is configured for the TCP session, the session ID of the TCP keepalive */
26630     A_UINT32 timeout_retries;      /** timeout[31:16]: TCP ACK timeout, time to wait for a TCP ACK in ms
26631                                        retries[15:0]: Number of TCP level retries of OIC ping request */
26632     wmi_mac_addr peer_macaddr;     /** MAC address of the OCF server */
26633     A_UINT32 oic_ping_pkt0;        /** OIC ping packet content [Byte03:Byte00] */
26634     A_UINT32 oic_ping_pkt1;        /** OIC ping packet content [Byte07:Byte04] */
26635     A_UINT32 oic_ping_pkt2;        /** OIC ping packet content [Byte11:Byte08] */
26636     A_UINT32 oic_ping_pkt3;        /** OIC ping packet content [Byte15:Byte12] */
26637 
26638     A_UINT32 tls_cipher_suite_version; /** Cipher suite [31:16] as defined in https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml
26639                                        TLS version  [15:00] */
26640     A_UINT32 tls_tx_seq0;          /** Tx sequence number [31:00], incremented after every TLS packet transmission */
26641     A_UINT32 tls_tx_seq1;          /** Tx sequence number [63:32] */
26642     A_UINT32 tls_rx_seq0;          /** Rx sequence number [31:00], incremented after every TLS packet reception */
26643     A_UINT32 tls_rx_seq1;          /** Rx sequence number [63:32] */
26644     A_UINT32 tls_tx_key0;          /** client_write_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
26645     A_UINT32 tls_tx_key1;          /** client_write_key[Byte07:Byte04] */
26646     A_UINT32 tls_tx_key2;          /** client_write_key[Byte11:Byte08] */
26647     A_UINT32 tls_tx_key3;          /** client_write_key[Byte15:Byte12] */
26648     A_UINT32 tls_rx_key0;          /** server_write_key[Byte03:Byte00] */
26649     A_UINT32 tls_rx_key1;          /** server_write_key[Byte07:Byte04] */
26650     A_UINT32 tls_rx_key2;          /** server_write_key[Byte11:Byte08] */
26651     A_UINT32 tls_rx_key3;          /** server_write_key[Byte15:Byte12] */
26652     A_UINT32 tls_MAC_write_key0;   /** client_write_MAC_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
26653     A_UINT32 tls_MAC_write_key1;   /** client_write_MAC_key[Byte07:Byte04] */
26654     A_UINT32 tls_MAC_write_key2;   /** client_write_MAC_key[Byte11:Byte08] */
26655     A_UINT32 tls_MAC_write_key3;   /** client_write_MAC_key[Byte15:Byte12] */
26656     A_UINT32 tls_MAC_write_key4;   /** client_write_MAC_key[Byte19:Byte16] */
26657     A_UINT32 tls_MAC_write_key5;   /** client_write_MAC_key[Byte23:Byte20] */
26658     A_UINT32 tls_MAC_write_key6;   /** client_write_MAC_key[Byte27:Byte24] */
26659     A_UINT32 tls_MAC_write_key7;   /** client_write_MAC_key[Byte31:Byte28] */
26660     A_UINT32 tls_MAC_read_key0;    /** server_write_MAC_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
26661     A_UINT32 tls_MAC_read_key1;    /** server_write_MAC_key[Byte07:Byte04] */
26662     A_UINT32 tls_MAC_read_key2;    /** server_write_MAC_key[Byte11:Byte08] */
26663     A_UINT32 tls_MAC_read_key3;    /** server_write_MAC_key[Byte15:Byte12] */
26664     A_UINT32 tls_MAC_read_key4;    /** server_write_MAC_key[Byte19:Byte16] */
26665     A_UINT32 tls_MAC_read_key5;    /** server_write_MAC_key[Byte23:Byte20] */
26666     A_UINT32 tls_MAC_read_key6;    /** server_write_MAC_key[Byte27:Byte24] */
26667     A_UINT32 tls_MAC_read_key7;    /** server_write_MAC_key[Byte31:Byte28] */
26668     A_UINT32 tls_client_IV0;       /** CBC Mode: CBC_residue [Byte03:Byte00] refer section 6.2.3.2. CBC Block Cipher in RFC 5246
26669                                    GCM Mode: GCMNonce.salt [Byte03:Byte00] refer Section 3 of RFC 5288 */
26670     A_UINT32 tls_client_IV1;       /** CBC Mode: CBC_residue [Byte7:Byte4] */
26671     A_UINT32 tls_client_IV2;       /** CBC Mode: CBC_residue [Byte11:Byte8] */
26672     A_UINT32 tls_client_IV3;       /** CBC Mode: CBC_residue [Byte15:Byte12] */
26673     A_UINT32 tls_server_IV0;       /** CBC Mode: CBC_residue [Byte3:Byte0] refer section 6.2.3.2. CBC Block Cipher in RFC 5246
26674                                    GCM Mode: GCMNonce.salt [Byte4: Byte0] refer Section 3 of RFC 5288 */
26675     A_UINT32 tls_server_IV1;       /** CBC Mode: CBC_residue [Byte7:Byte4] */
26676     A_UINT32 tls_server_IV2;       /** CBC Mode: CBC_residue [Byte11:Byte8] */
26677     A_UINT32 tls_server_IV3;       /** CBC Mode: CBC_residue [Byte15:Byte12] */
26678 } wmi_oic_ping_offload_params_cmd_fixed_param;
26679 
26680 typedef struct {
26681     /** TLV tag and len; tag equals
26682      *  WMITLV_TAG_STRUC_wmi_oic_set_enable_cmd_fixed_param */
26683     A_UINT32 tlv_header; /** TLV Header*/
26684     A_UINT32 vdev_id;    /** Interface number */
26685     A_UINT32 session;    /** Session ID*/
26686     A_UINT32 enable;     /** 1: Enable , 0: Disable */
26687 } wmi_oic_ping_offload_set_enable_cmd_fixed_param;
26688 
26689 /** wlan OIC events */
26690 typedef enum {
26691     WMI_WLAN_OIC_REASON_UNKNOWN      = 0, /** Unknown */
26692     WMI_WLAN_OIC_REASON_HOST_WAKE    = 1, /** No error , but host is woken up due to other reasons */
26693     WMI_WLAN_OIC_REASON_TCP_TIMEOUT  = 2, /** TCP Timeout */
26694     WMI_WLAN_OIC_REASON_PING_TIMEOUT = 3, /** OIC Ping resposnse timeout */
26695     WMI_WLAN_OIC_REASON_TLS_ERROR    = 4, /** TLS decryption error */
26696 } WMI_OIC_WAKEUP_REASON;
26697 
26698 typedef struct {
26699     A_UINT32 tlv_header;           /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oic_ind_event_fixed_param */
26700     A_UINT32 vdev_id;              /** unique id identifying the VDEV */
26701     A_UINT32 session;              /** Session ID from driver */
26702     A_UINT32 reason;               /** wakeup reason as per WMI_OIC_WAKEUP_REASON */
26703     A_UINT32 tcp_tx_seq;           /** Current TCP sequence number */
26704     A_UINT32 tcp_ack_num;          /** Current TCP Acknowledgement number */
26705     A_UINT32 tls_tx_seq0;          /** Tx sequence number [31:00], incremented after every TLS packet transmission */
26706     A_UINT32 tls_tx_seq1;          /** Tx sequence number [63:32] */
26707     A_UINT32 tls_rx_seq0;          /** Rx sequence number [31:00], incremented after every TLS packet reception */
26708     A_UINT32 tls_rx_seq1;          /** Rx sequence number [63:32] */
26709     A_UINT32 tls_client_IV0;       /** CBC Mode: CBC_residue [Byte03:Byte00] refer section 6.2.3.2. CBC Block Cipher in RFC 5246 */
26710     A_UINT32 tls_client_IV1;       /** CBC Mode: CBC_residue [Byte7:Byte4] */
26711     A_UINT32 tls_client_IV2;       /** CBC Mode: CBC_residue [Byte11:Byte8] */
26712     A_UINT32 tls_client_IV3;       /** CBC Mode: CBC_residue [Byte15:Byte12] */
26713     A_UINT32 tls_server_IV0;       /** CBC Mode: CBC_residue [Byte3:Byte0] refer section 6.2.3.2. CBC Block Cipher in RFC 5246 */
26714     A_UINT32 tls_server_IV1;       /** CBC Mode: CBC_residue [Byte7:Byte4] */
26715     A_UINT32 tls_server_IV2;       /** CBC Mode: CBC_residue [Byte11:Byte8] */
26716     A_UINT32 tls_server_IV3;       /** CBC Mode: CBC_residue [Byte15:Byte12] */
26717 } wmi_oic_ping_handoff_event;
26718 
26719 typedef struct {
26720    /** TLV tag and len; tag equals
26721     * WMITLV_TAG_STRUC_wmi_dhcp_lease_renew_offload_fixed_param */
26722     A_UINT32 tlv_header;     /** TLV Header*/
26723     A_UINT32 vdev_id;        /** Vdev ID */
26724     A_UINT32 enable;         /** 1: Enable 0: Disable*/
26725     A_UINT32 srv_ip;         /** DHCP Server IP address (IPv4) */
26726     A_UINT32 client_ip;      /** Device IP address (IPv4) */
26727     wmi_mac_addr srv_mac;    /** DHCP Server MAC address */
26728     A_UINT32 parameter_list; /** Optional Parameter list. RFC 1533 gives the complete set of options defined for use with DHCP */
26729 } wmi_dhcp_lease_renew_offload_cmd_fixed_param;
26730 
26731 /** WLAN DHCP Lease Renew Events */
26732 typedef enum {
26733     WMI_WLAN_DHCP_RENEW_REASON_UNKNOWN  = 0, /** Unknown */
26734     WMI_WLAN_DHCP_RENEW_REASON_ACK_TIMEOUT  = 1, /** DHCP ACK Timeout */
26735     WMI_WLAN_DHCP_RENEW_REASON_NACK     = 2, /** DHCP error */
26736 } WMI_DHCP_RENEW_WAKEUP_REASON;
26737 
26738 typedef struct {
26739     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dhcp_renew_ind_event_fixed_param */
26740     A_UINT32 vdev_id;    /** unique id identifying the VDEV */
26741     A_UINT32 reason;     /** wakeup reason as per enum WMI_DHCP_RENEW_WAKEUP_REASON*/
26742 } wmi_dhcp_lease_renew_event;
26743 
26744 /** WMI_STA_SMPS_PARAM_CMDID */
26745 typedef enum {
26746     /** RSSI threshold to enter Dynamic SMPS mode from inactive mode */
26747     WMI_STA_SMPS_PARAM_UPPER_RSSI_THRESH = 0,
26748     /** RSSI threshold to enter Stalled-D-SMPS mode from D-SMPS mode or
26749      * to enter D-SMPS mode from Stalled-D-SMPS mode */
26750     WMI_STA_SMPS_PARAM_STALL_RSSI_THRESH = 1,
26751     /** RSSI threshold to disable SMPS modes */
26752     WMI_STA_SMPS_PARAM_LOWER_RSSI_THRESH = 2,
26753     /** Upper threshold for beacon-RSSI. Used to reduce RX chainmask. */
26754     WMI_STA_SMPS_PARAM_UPPER_BRSSI_THRESH = 3,
26755     /** Lower threshold for beacon-RSSI. Used to increase RX chainmask. */
26756     WMI_STA_SMPS_PARAM_LOWER_BRSSI_THRESH = 4,
26757     /** Enable/Disable DTIM 1chRx feature */
26758     WMI_STA_SMPS_PARAM_DTIM_1CHRX_ENABLE = 5
26759 } wmi_sta_smps_param;
26760 
26761 typedef struct {
26762     /** TLV tag and len; tag equals
26763      *  WMITLV_TAG_STRUC_wmi_sta_smps_param_cmd_fixed_param */
26764     A_UINT32 tlv_header;
26765     /** Unique id identifying the VDEV */
26766     A_UINT32 vdev_id;
26767     /** SMPS parameter (see wmi_sta_smps_param) */
26768     A_UINT32 param;
26769     /** Value of SMPS parameter */
26770     A_UINT32 value;
26771 } wmi_sta_smps_param_cmd_fixed_param;
26772 
26773 typedef struct {
26774     /** TLV tag and len; tag equals
26775      * WMITLV_TAG_STRUC_wmi_mcc_sched_sta_traffic_stats */
26776     A_UINT32 tlv_header;
26777     /* TX stats */
26778     A_UINT32 txBytesPushed;
26779     A_UINT32 txPacketsPushed;
26780     /* RX stats */
26781     A_UINT32 rxBytesRcvd;
26782     A_UINT32 rxPacketsRcvd;
26783     A_UINT32 rxTimeTotal;
26784     /** peer MAC address */
26785     wmi_mac_addr peer_macaddr;
26786 } wmi_mcc_sched_sta_traffic_stats;
26787 
26788 typedef struct {
26789     /** TLV tag and len; tag equals
26790      * WMITLV_TAG_STRUC_wmi_mcc_sched_traffic_stats_cmd_fixed_param */
26791     A_UINT32 tlv_header;
26792     /** Duration over which the host stats were collected */
26793     A_UINT32 duration;
26794     /** Number of stations filled in following stats array */
26795     A_UINT32 num_sta;
26796     /* Following this struct are the TLVs:
26797      * wmi_mcc_sched_sta_traffic_stats mcc_sched_sta_traffic_stats_list;
26798      */
26799 } wmi_mcc_sched_traffic_stats_cmd_fixed_param;
26800 
26801 typedef struct
26802 {
26803     A_UINT32 tlv_header;     /* TLV tag and len; tag equals  WMITLV_TAG_STRUC_wmi_batch_scan_enable_cmd_fixed_param */
26804     /* unique id identifying the VDEV, generated by the caller */
26805     A_UINT32 vdev_id;
26806     /*Batch scan enable command parameters*/
26807     A_UINT32 scanInterval;
26808     A_UINT32 numScan2Batch;
26809     A_UINT32 bestNetworks;
26810     A_UINT32 rfBand;
26811     A_UINT32 rtt;
26812 } wmi_batch_scan_enable_cmd_fixed_param;
26813 
26814 typedef struct
26815 {
26816     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enabled_event_fixed_param  */
26817     A_UINT32 supportedMscan;
26818 }  wmi_batch_scan_enabled_event_fixed_param;
26819 
26820 typedef struct
26821 {
26822     A_UINT32 tlv_header;     /* TLV tag and len; tag equals  WMITLV_TAG_STRUC_wmi_batch_scan_disable_cmd_fixed_param */
26823     /* unique id identifying the VDEV, generated by the caller */
26824     A_UINT32 vdev_id;
26825     A_UINT32   param;
26826 } wmi_batch_scan_disable_cmd_fixed_param;
26827 
26828 typedef struct
26829 {
26830     A_UINT32 tlv_header;     /* TLV tag and len; tag equals  WMITLV_TAG_STRUC_wmi_batch_scan_trigger_result_cmd_fixed_param */
26831  /** unique id identifying the VDEV, generated by the caller */
26832     A_UINT32 vdev_id;
26833     A_UINT32 param;
26834 } wmi_batch_scan_trigger_result_cmd_fixed_param;
26835 
26836 typedef struct
26837 {
26838     A_UINT32 tlv_header;
26839     wmi_mac_addr   bssid;     /* BSSID */
26840     wmi_ssid   ssid;     /* SSID */
26841     A_UINT32   ch;           /* Channel number */
26842     A_UINT32   rssi;         /* RSSI or Level */
26843     /* Timestamp when Network was found. Used to calculate age based on timestamp in GET_RSP msg header */
26844     A_UINT32  timestamp;
26845     A_UINT32  ch_freq; /* Channel frequency in MHz */
26846 } wmi_batch_scan_result_network_info;
26847 
26848 typedef struct
26849 {
26850     A_UINT32 tlv_header;
26851     A_UINT32 scanId;                         /* Scan List ID. */
26852     /* No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg */
26853     A_UINT32 numNetworksInScanList;
26854     A_UINT32 netWorkStartIndex;  /* indicate the start index of network info*/
26855 } wmi_batch_scan_result_scan_list;
26856 
26857 #define LPI_IE_BITMAP_BSSID                  0x00000001     /* if this bit is set, bssid of the scan response frame is sent as the first IE in the data buffer sent to LOWI LP. */
26858 #define LPI_IE_BITMAP_IS_PROBE               0x00000002     /* send true or false based on scan response frame being a Probe Rsp or not */
26859 #define LPI_IE_BITMAP_SSID                   0x00000004     /* send ssid from received scan response frame */
26860 #define LPI_IE_BITMAP_RSSI                   0x00000008     /* send RSSI value reported by HW for the received scan response after adjusting with noise floor */
26861 #define LPI_IE_BITMAP_CHAN                   0x00000010     /* send channel number from the received scan response */
26862 #define LPI_IE_BITMAP_AP_TX_PWR              0x00000020     /* send Tx power from TPC IE of scan rsp */
26863 #define LPI_IE_BITMAP_TX_RATE                0x00000040     /* send rate of the received frame as reported by HW. */
26864 #define LPI_IE_BITMAP_80211_MC_SUPPORT       0x00000080     /* send true or false based on the received scan rsp was from a 11mc supported AP or not. */
26865 #define LPI_IE_BITMAP_TSF_TIMER_VALUE        0x00000100     /* send timestamp reported in the received scan rsp frame. */
26866 #define LPI_IE_BITMAP_AGE_OF_MEASUREMENT     0x00000200     /* (current system time - received time) = duration of time scan rsp frame data is kept in the buffer before sending to LOWI LP. */
26867 /*
26868  * TEMPORARY alias of incorrect old name the correct name.
26869  * This alias will be removed once all references to the old name have been fixed.
26870  */
26871 #define LPI_IE_BITMAP_AGE_OF_MESAUREMENT LPI_IE_BITMAP_AGE_OF_MEASUREMENT
26872 #define LPI_IE_BITMAP_CONN_STATUS            0x00000400     /* If an infra STA is active and connected to an AP, true value is sent else false. */
26873 #define LPI_IE_BITMAP_MSAP_IE                0x00000800     /* info on the vendor specific proprietary IE MSAP */
26874 #define LPI_IE_BITMAP_SEC_STATUS             0x00001000     /* we indicate true or false based on if the AP has WPA or RSN security enabled */
26875 #define LPI_IE_BITMAP_DEVICE_TYPE            0x00002000     /* info about the beacons coming from an AP or P2P or NAN device. */
26876 #define LPI_IE_BITMAP_CHAN_IS_PASSIVE        0x00004000     /* info on whether the scan rsp was received from a passive channel */
26877 #define LPI_IE_BITMAP_DWELL_TIME             0x00008000     /* send the scan dwell time of the channel on which the current scan rsp frame was received. */
26878 #define LPI_IE_BITMAP_BAND_CENTER_FREQ1      0x00010000     /* the center frequencies in case AP is supporting wider channels than 20 MHz */
26879 #define LPI_IE_BITMAP_BAND_CENTER_FREQ2      0x00020000     /* same as above */
26880 #define LPI_IE_BITMAP_PHY_MODE               0x00040000     /* PHY mode indicates a, b, ,g, ac and other combinations */
26881 #define LPI_IE_BITMAP_SCAN_MODULE_ID         0x00080000     /* scan module id indicates the scan client who originated the scan */
26882 #define LPI_IE_BITMAP_SCAN_ID                0x00100000     /* extscan inserts the scan cycle count for this value; other scan clients can insert the scan id of the scan, if needed. */
26883 #define LPI_IE_BITMAP_FLAGS                  0x00200000     /* reserved as a bitmap to indicate more scan information; one such use being to indicate if the on-going scan is interrupted or not */
26884 #define LPI_IE_BITMAP_CACHING_REQD           0x00400000     /* extscan will use this field to indicate if this frame info needs to be cached in LOWI LP or not */
26885 #define LPI_IE_BITMAP_REPORT_CONTEXT_HUB     0x00800000     /* extscan will use this field to indicate to LOWI LP whether to report result to context hub or not. */
26886 #define LPI_IE_BITMAP_CHRE_RADIO_CHAIN       0x01000000     /* include radio chain and RSSI per chain information if this bit is set - for CHRE */
26887 
26888 /* 0x02000000, 0x04000000, and 0x08000000 are unused / available */
26889 
26890 #define LPI_IE_BITMAP_CHRE_ESS               0x10000000     /* ESS capability info for CHRE */
26891 #define LPI_IE_BITMAP_CHRE_SEC_MODE          0x20000000     /* Security capability info for CHRE */
26892 #define LPI_IE_BITMAP_CHRE_SUPPORTED_RATE    0x40000000     /* Highest MCS corresponding NCC for TX and RX */
26893 #define LPI_IE_BITMAP_ALL                    0xFFFFFFFF
26894 
26895 typedef struct {
26896     A_UINT32 tlv_header;
26897     /**A_BOOL indicates LPI mgmt snooping enable/disable*/
26898     A_UINT32 enable;
26899     /**LPI snooping mode*/
26900     A_UINT32 snooping_mode;
26901     /** LPI interested IEs in snooping context */
26902     A_UINT32 ie_bitmap;
26903 } wmi_lpi_mgmt_snooping_config_cmd_fixed_param;
26904 
26905 typedef struct {
26906     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
26907     /** Scan ID */
26908     A_UINT32 scan_id;
26909     /** Scan requestor ID */
26910     A_UINT32 scan_req_id;
26911     /** VDEV id(interface) that is requesting scan */
26912     A_UINT32 vdev_id;
26913     /** LPI interested IEs in scan context */
26914     A_UINT32 ie_bitmap;
26915     /** Scan Priority, input to scan scheduler */
26916     A_UINT32 scan_priority;
26917     /** dwell time in msec on active channels */
26918     A_UINT32 dwell_time_active;
26919     /** dwell time in msec on passive channels */
26920     A_UINT32 dwell_time_passive;
26921     /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
26922     A_UINT32 min_rest_time;
26923     /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
26924     /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
26925      *  will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
26926      *  switch to off channel. if there is activity the scanner will let the radio on the bss channel
26927      *  until max_rest_time expires.at max_rest_time scanner will switch to off channel
26928      *  irrespective of activity. activity is determined by the idle_time parameter.
26929      */
26930     A_UINT32 max_rest_time;
26931     /** time before sending next set of probe requests.
26932      *   The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
26933      *   The number of probe requests specified depends on the ssid_list and bssid_list
26934      */
26935     A_UINT32 repeat_probe_time;
26936     /** time in msec between 2 consecutive probe requests with in a set. */
26937     A_UINT32 probe_spacing_time;
26938     /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity  */
26939     A_UINT32 idle_time;
26940     /** maximum time in msec allowed for scan  */
26941     A_UINT32 max_scan_time;
26942     /** delay in msec before sending first probe request after switching to a channel */
26943     A_UINT32 probe_delay;
26944     /** Scan control flags */
26945     A_UINT32 scan_ctrl_flags;
26946     /** Burst duration time in msec*/
26947     A_UINT32 burst_duration;
26948 
26949     /** # if channels to scan. In the TLV channel_list[] */
26950     A_UINT32 num_chan;
26951     /** number of bssids. In the TLV bssid_list[] */
26952     A_UINT32 num_bssid;
26953     /** number of ssid. In the TLV ssid_list[] */
26954     A_UINT32 num_ssids;
26955     /** number of bytes in ie data. In the TLV ie_data[] */
26956     A_UINT32 ie_len;
26957     /** Scan control flags extended (see WMI_SCAN_FLAG_EXT_xxx) */
26958     A_UINT32 scan_ctrl_flags_ext;
26959 
26960 /**
26961  * TLV (tag length value) parameters follow the scan_cmd
26962  * structure. The TLV's are:
26963  *     A_UINT32 channel_list[]; // in MHz
26964  *     wmi_ssid ssid_list[];
26965  *     wmi_mac_addr bssid_list[];
26966  *     A_UINT8 ie_data[];
26967  */
26968 } wmi_lpi_start_scan_cmd_fixed_param;
26969 
26970 typedef struct {
26971     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
26972     /** Scan requestor ID */
26973     A_UINT32 scan_req_id;
26974     /** Scan ID */
26975     A_UINT32 scan_id;
26976     /**
26977      * Req Type
26978      * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
26979      * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
26980      * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
26981      * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
26982      */
26983     A_UINT32 req_type;
26984     /**
26985      * vDev ID
26986      * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
26987      */
26988     A_UINT32 vdev_id;
26989 } wmi_lpi_stop_scan_cmd_fixed_param;
26990 
26991 typedef enum {
26992    WMI_LPI_DEVICE_TYPE_AP = 1,
26993    WMI_LPI_DEVICE_TYPE_P2P = 2,
26994    WMI_LPI_DEVICE_TYPE_NAN = 3,
26995 } wmi_lpi_device_type;
26996 
26997 typedef struct
26998 {
26999     A_UINT32 tlv_header;
27000     /** Scan requestor ID */
27001     A_UINT32 scan_req_id;
27002     A_UINT32 ie_bitmap;
27003     A_UINT32 data_len;
27004 }  wmi_lpi_result_event_fixed_param;
27005 
27006 typedef enum {
27007    /** User scan Request completed */
27008    WMI_LPI_STATUS_SCAN_REQ_COMPLED = 0,
27009    /** User Request was never serviced */
27010    WMI_LPI_STATUS_DROPPED_REQ = 1,
27011    /** Illegal channel Req */
27012    WMI_LPI_STATUS_ILLEGAL_CHAN_REQ = 2,
27013    /** Illegal Operation Req */
27014    WMI_LPI_STATUS_ILLEGAL_OPER_REQ = 3,
27015    /** Request Aborted */
27016    WMI_LPI_STATUS_REQ_ABORTED = 4,
27017    /** Request Timed Out */
27018    WMI_LPI_STATUS_REQ_TIME_OUT = 5,
27019    /** Medium Busy, already there
27020     * is a scan is going on */
27021    WMI_LPI_STATUS_MEDIUM_BUSY = 6,
27022    /** Extscan is the scan client whose scan complete event is triggered */
27023    WMI_LPI_STATUS_EXTSCAN_CYCLE_AND_SCAN_REQ_COMPLETED = 7,
27024 } wmi_lpi_staus;
27025 
27026 typedef struct
27027 {
27028     A_UINT32      tlv_header;
27029     wmi_lpi_staus status;
27030     /** Scan requestor ID */
27031     A_UINT32      scan_req_id;
27032 }  wmi_lpi_status_event_fixed_param;
27033 
27034 
27035 typedef struct
27036 {
27037     A_UINT32      tlv_header;
27038     wmi_mac_addr  bssid;
27039     wmi_ssid      ssid;
27040     A_UINT32      freq;
27041     A_UINT32      rssi;
27042     A_UINT32      vdev_id;
27043 }  wmi_lpi_handoff_event_fixed_param;
27044 typedef struct
27045 {
27046     A_UINT32 tlv_header;
27047     A_UINT32 timestamp;   /*timestamp of batch scan event*/
27048     A_UINT32 numScanLists;  /*number of scan in this event*/
27049     A_UINT32 isLastResult;  /*is this event a last event of the whole batch scan*/
27050 }  wmi_batch_scan_result_event_fixed_param;
27051 
27052 typedef struct {
27053     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_event_fixed_param  */
27054     A_UINT32 vdev_id;
27055 /* This TLV is followed by p2p_noa_info for vdev :
27056  *     wmi_p2p_noa_info p2p_noa_info;
27057  */
27058 } wmi_p2p_noa_event_fixed_param;
27059 
27060 #define WMI_RFKILL_CFG_RADIO_LEVEL_OFFSET      6
27061 #define WMI_RFKILL_CFG_RADIO_LEVEL_MASK      0x1
27062 
27063 #define WMI_RFKILL_CFG_GPIO_PIN_NUM_OFFSET      0
27064 #define WMI_RFKILL_CFG_GPIO_PIN_NUM_MASK      0x3f
27065 
27066 #define WMI_RFKILL_CFG_PIN_AS_GPIO_OFFSET      7
27067 #define WMI_RFKILL_CFG_PIN_AS_GPIO_MASK      0xf
27068 
27069 typedef struct {
27070     /** TLV tag and len; tag equals
27071      * */
27072     A_UINT32 tlv_header;
27073     /** gpip pin number */
27074     A_UINT32 gpio_pin_num;
27075     /** gpio interrupt type */
27076     A_UINT32 int_type;
27077     /** RF radio status */
27078     A_UINT32 radio_state;
27079 } wmi_rfkill_mode_param;
27080 
27081 typedef enum {
27082     WMI_SET_LED_SYS_POWEROFF,
27083     WMI_SET_LED_SYS_S3_SUSPEND,
27084     WMI_SET_LED_SYS_S4_S5,
27085     WMI_SET_LED_SYS_DRIVER_DISABLE,
27086     WMI_SET_LED_SYS_WAKEUP,
27087     WMI_SET_LED_SYS_ALWAYS_ON, /* just for test! */
27088     WMI_SET_LED_SYS_POWERON,
27089 } wmi_led_sys_state_param;
27090 
27091 typedef enum {
27092     WMI_CONFIG_LED_TO_VDD = 0,
27093     WMI_CONFIG_LED_TO_GND = 1,
27094 } wmi_config_led_connect_type;
27095 
27096 typedef enum {
27097    WMI_CONFIG_LED_NOT_WITH_BT = 0,
27098    WMI_CONFIG_LED_WITH_BT = 1,
27099 } wmi_config_led_with_bt_flag;
27100 
27101 typedef enum {
27102    WMI_CONFIG_LED_DISABLE = 0,
27103    WMI_CONFIG_LED_ENABLE  = 1,
27104 } wmi_config_led_enable_flag;
27105 
27106 typedef enum {
27107     WMI_CONFIG_LED_HIGH_UNSPECIFIED = 0,
27108     WMI_CONFIG_LED_HIGH_OFF         = 1,
27109     WMI_CONFIG_LED_HIGH_ON          = 2,
27110 } wmi_config_led_on_flag;
27111 
27112 typedef enum {
27113     WMI_CONFIG_LED_UNSPECIFIED = 0,
27114     WMI_CONFIG_LED_ON          = 1,
27115     WMI_CONFIG_LED_OFF         = 2,
27116     WMI_CONFIG_LED_DIM         = 3,
27117     WMI_CONFIG_LED_BLINK       = 4,
27118     WMI_CONFIG_LED_TXRX        = 5,
27119 } wmi_config_led_operation_type;
27120 
27121 typedef struct {
27122     /** TLV tag and len; tag equals
27123      *  WMITLV_TAG_STRUC_wmi_pdev_set_led_config_cmd_fixed_param */
27124     A_UINT32 tlv_header;
27125     /* Set GPIO pin */
27126     A_UINT32 led_gpio_pin;
27127     /* Set connect type defined in wmi_config_led_connect_type */
27128     A_UINT32 connect_type;
27129     /* Set flag defined in wmi_config_led_with_bt_flag*/
27130     A_UINT32 with_bt;
27131     /* Set LED enablement defined in wmi_config_led_enable_flag */
27132     A_UINT32 led_enable;
27133     /** pdev_id for identifying the MAC
27134      * See macros starting with WMI_PDEV_ID_ for values.
27135      */
27136     A_UINT32 pdev_id;
27137     /* see wmi_config_led_operation_type enum */
27138     A_UINT32 led_operation_type;
27139     /* see wmi_config_led_on_flag enum */
27140     A_UINT32 led_on_flag;      /* configure high/low on/off sense */
27141     A_UINT32 led_on_interval;  /* for blink function; unit: ms */
27142     A_UINT32 led_off_interval; /* for blink function; unit: ms */
27143     A_UINT32 led_repeat_cnt;   /* for blink function: how many blinks */
27144 } wmi_pdev_set_led_config_cmd_fixed_param;
27145 
27146 #define WMI_WNTS_CFG_GPIO_PIN_NUM_OFFSET 0
27147 #define WMI_WNTS_CFG_GPIO_PIN_NUM_MASK   0xff
27148 
27149 /** WMI_SMARTANT_STATE_CHANGE_EVENTIDWMI_SMARTANT_STATE_CHANGE_EVENTID
27150  *    report Smart Antenna status to host */
27151 typedef struct {
27152     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_smartant_event_fixed_param */
27153     A_UINT32 tlv_header;
27154     /** whether Antenna Controller is still alive or offline. */
27155     A_UINT32 smart_ant_AC_alive;
27156 } wmi_smartant_state_param;
27157 
27158 /** WMI_PEER_INFO_REQ_CMDID
27159  *   Request FW to provide peer info */
27160 typedef struct {
27161     /** TLV tag and len; tag equals
27162      *  WMITLV_TAG_STRUC_wmi_peer_info_req_cmd_fixed_param   */
27163     A_UINT32 tlv_header;
27164     /** In order to get the peer info for a single peer, host shall
27165      *  issue the peer_mac_address of that peer. For getting the
27166      *  info all peers, the host shall issue 0xFFFFFFFF as the mac
27167      *  address. The firmware will return the peer info for all the
27168      *  peers on the specified vdev_id */
27169     wmi_mac_addr peer_mac_address;
27170     /** vdev id */
27171     A_UINT32 vdev_id;
27172 } wmi_peer_info_req_cmd_fixed_param;
27173 
27174 typedef struct {
27175     /** TLV tag and len; tag equals
27176      *  WMITLV_TAG_STRUC_wmi_peer_info */
27177     A_UINT32 tlv_header;
27178     /** mac addr of the peer */
27179     wmi_mac_addr peer_mac_address;
27180     /** data_rate of the peer */
27181     A_UINT32 data_rate;
27182     /** RSSI of the peer */
27183     A_UINT32 rssi;
27184     /** tx fail count */
27185     A_UINT32 tx_fail_cnt;
27186 } wmi_peer_info;
27187 
27188 /** FW response with the peer info */
27189 typedef struct {
27190     /** TLV tag and len; tag equals
27191      *  WMITLV_TAG_STRUC_wmi_peer_info_event_fixed_param   */
27192     A_UINT32 tlv_header;
27193     /** number of peers in peer_info */
27194     A_UINT32 num_peers;
27195     /* Set to 1 only if vdev_id field is valid */
27196     A_UINT32 valid_vdev_id;
27197     /* VDEV to which the peer belongs to */
27198     A_UINT32 vdev_id;
27199     /* This TLV is followed by another TLV of array of structs
27200      * wmi_peer_info peer_info[];
27201      */
27202 } wmi_peer_info_event_fixed_param;
27203 
27204 /** WMI_PEER_ANTDIV_INFO_REQ_CMDID
27205  *   Request FW to provide peer info */
27206 typedef struct {
27207     /** TLV tag and len; tag equals
27208      *  WMITLV_TAG_STRUC_wmi_peer_antdiv_info_req_cmd_fixed_param   */
27209     A_UINT32 tlv_header;
27210     /** In order to get the peer antdiv info for a single peer, host shall
27211      *  issue the peer_mac_address of that peer. For getting the
27212      *  info all peers, the host shall issue 0xFFFFFFFF as the mac
27213      *  address. The firmware will return the peer info for all the
27214      *  peers on the specified vdev_id */
27215     wmi_mac_addr peer_mac_address;
27216     /** vdev id */
27217     A_UINT32 vdev_id;
27218 } wmi_peer_antdiv_info_req_cmd_fixed_param;
27219 
27220 /** FW response with the peer antdiv info */
27221 typedef struct {
27222     /** TLV tag and len; tag equals
27223      *  WMITLV_TAG_STRUC_wmi_peer_antdiv_info_event_fixed_param   */
27224     A_UINT32 tlv_header;
27225     /** number of peers in peer_info */
27226     A_UINT32 num_peers;
27227     /* VDEV to which the peer belongs to */
27228     A_UINT32 vdev_id;
27229     /* This TLV is followed by another TLV of array of structs
27230      * wmi_peer_antdiv_info peer_antdiv_info[];
27231      */
27232 } wmi_peer_antdiv_info_event_fixed_param;
27233 
27234 typedef struct {
27235     /** TLV tag and len; tag equals
27236      *  WMITLV_TAG_STRUC_wmi_peer_antdiv_info */
27237     A_UINT32 tlv_header;
27238     /** mac addr of the peer */
27239     wmi_mac_addr peer_mac_address;
27240     /** per chain RSSI of the peer, for up to 8 chains.
27241      * Each chain's entry reports the RSSI for different bandwidths:
27242      * bits 7:0   -> primary 20 MHz
27243      * bits 15:8  -> secondary 20 MHz of  40 MHz channel (if applicable)
27244      * bits 23:16 -> secondary 40 MHz of  80 MHz channel (if applicable)
27245      * bits 31:24 -> secondary 80 MHz of 160 MHz channel (if applicable)
27246      * Each of these 8-bit RSSI reports is in dB units, with respect to
27247      * the noise floor.
27248      * 0x80 means invalid.
27249      * All unused bytes within used chain_rssi indices shall be set to 0x80.
27250      * All unused chain_rssi indices shall be set to 0x80808080.
27251      */
27252     A_INT32 chain_rssi[8];
27253 } wmi_peer_antdiv_info;
27254 
27255 typedef struct {
27256     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_msduq_qdepth_thresh_update */
27257 
27258     /** tid_number */
27259     A_UINT32 tid_num;
27260 
27261     /** msduq_mask to set the value
27262      * bit 0 - HI-PRI msdu flowq qdepth threshold need to update if set
27263      * bit 1 - LOW-PRI msdu flowq qdepth threshold need to update if set
27264      * bit 2 - UDP msdu flowq qdepth threshold need to update if set
27265      * bit 3 - NON-UDP msdu flowq qdepth threshold need to update if set
27266      * rest of bits are reserved and set to 0.
27267      */
27268     A_UINT32 msduq_update_mask;
27269 
27270     /** Qdepth threshold value
27271      * If number of msdus in a queue excess over qdepth_thresh_value value
27272      * while queuing msdu's then we drop new msdus.
27273      * (Though dropping older (stale) data rather than newer data might be
27274      * preferable, the dropping is performed by MAC HW, and there's no option
27275      * to configure the HW to do head dropping rather than tail dropping.)
27276      */
27277     A_UINT32 qdepth_thresh_value;
27278 } wmi_msduq_qdepth_thresh_update;
27279 
27280 /** WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID
27281  *   Request FW to update msduq qdepth threshold per TID per peer */
27282 typedef struct {
27283     /** TLV tag and len; tag equals
27284      *  WMITLV_TAG_STRUC_wmi_peer_tid_msduq_qdepth_thresh_update_cmd_fixed_param
27285      */
27286     A_UINT32 tlv_header;
27287 
27288     /** pdev id
27289      * The pdev_id can be determined from the vdev_id, but the pdev_id
27290      * is explicitly provided so it can be used for sanity checking.
27291      */
27292     A_UINT32 pdev_id;
27293 
27294     /** vdev id */
27295     A_UINT32 vdev_id;
27296 
27297     /**
27298      * To set the peer msduq qdepth threshold update for a single peer,
27299      * the host shall send mac address for which peer need to be updated.
27300      */
27301     wmi_mac_addr peer_mac_address;
27302 
27303     /** number of payload update tlvs */
27304     A_UINT32 num_of_msduq_updates;
27305 
27306     /** Followed by the variable length TLV msduq_qdepth_updates:
27307      *  wmi_msduq_qdepth_th_update msduq_qdepth_thshd_update_list[]
27308      */
27309 } wmi_peer_tid_msduq_qdepth_thresh_update_cmd_fixed_param;
27310 
27311 /**
27312  * ACK policy to be followed for the TID
27313  */
27314 typedef enum {
27315     /** Used when the host does not want to configure the ACK policy */
27316     WMI_PEER_TID_CONFIG_ACK_POLICY_IGNORE,
27317     /** Allow ACK for the TID */
27318     WMI_PEER_TID_CONFIG_ACK,
27319     /** Do not expect ACK for the TID */
27320     WMI_PEER_TID_CONFIG_NOACK,
27321 } WMI_PEER_TID_CONFIG_ACK_POLICY;
27322 
27323 /**
27324  * Aggregation control policy for the TID
27325  */
27326 typedef enum {
27327     /** Used when the host does not want to configure the aggregation policy */
27328     WMI_PEER_TID_CONFIG_AGGR_CONTROL_IGNORE,
27329     /** Enable aggregation for the TID */
27330     WMI_PEER_TID_CONFIG_AGGR_CONTROL_ENABLE,
27331     /** Disable aggregation for the TID */
27332     WMI_PEER_TID_CONFIG_AGGR_CONTROL_DISABLE,
27333 } WMI_PEER_TID_CONFIG_AGGR_CONTROL;
27334 
27335 /**
27336  * Rate control policy for the TID
27337  */
27338 typedef enum {
27339     /** Used when the host does not want to configure the rate control policy */
27340     WMI_PEER_TID_CONFIG_RATE_CONTROL_IGNORE,
27341     /** Auto rate control */
27342     WMI_PEER_TID_CONFIG_RATE_CONTROL_AUTO,
27343     /** Fixed rate control */
27344     WMI_PEER_TID_CONFIG_RATE_CONTROL_FIXED_RATE,
27345     /** Set the Default lowest rate (6Mbps in 5GHZ and 1Mbps in 2GHZ) */
27346     WMI_PEER_TID_CONFIG_RATE_CONTROL_DEFAULT_LOWEST_RATE,
27347     /**
27348      * Set the highest rate cap allowed for this TID.
27349      * Rate cap is specified in rate code format,
27350      * i.e. NSS and MCS combined as shown below:
27351      * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3, 3 - 4x4)
27352      * b'3-b'0 indicate the MCS
27353      */
27354     WMI_PEER_TID_CONFIG_RATE_UPPER_CAP,
27355 } WMI_PEER_TID_CONFIG_RATE_CONTROL;
27356 
27357 /**
27358  * SW retry threshold for the TID
27359  */
27360 typedef enum {
27361     /** Used when the host does not want to configure the SW retry threshold */
27362     WMI_PEER_TID_SW_RETRY_IGNORE = 0,
27363     WMI_PEER_TID_SW_RETRY_MIN = 1,
27364     WMI_PEER_TID_SW_RETRY_MAX = 30,
27365     /** No SW retry for the TID */
27366     WMI_PEER_TID_SW_RETRY_NO_RETRY = 0xFFFFFFFF,
27367 } WMI_PEER_TID_CONFIG_SW_RETRY_THRESHOLD;
27368 
27369 /*
27370  * values for tid_config_supported_bitmap field,
27371  * in wmi_peer_tid_configurations_cmd structure.
27372  */
27373 typedef enum {
27374     /* Used to indicate that disable_rts_cts field is valid */
27375     WMI_PEER_TID_DISABLE_RTS_CTS_VALID      = 0x00000001,
27376     WMI_PEER_TID_MAX_NUM_MPDU_IN_PPDU_VALID = 0x00000002,
27377     WMI_PEER_TID_MAX_NUM_MSDU_IN_MPDU_VALID = 0x00000004,
27378 } WMI_PEER_TID_EXT_CONFIG_VALID_BITMAP;
27379 
27380 /*
27381  * Per TID level enable/disable of RTS/CTS for that peer.
27382  * Currently applicable only for "data tids" within targets which set
27383  * the RTSCTS_FOR_UNICAST_MGMT WMI service bit.
27384  *
27385  * Enum values/Expected values for disable_rts_cts of
27386  * WMI_PEER_TID_DISABLE_RTS_CTS_VALID as below:
27387  *
27388  * 0 (WMI_RTSCTS_RESET)   - Use default RTS/CTS
27389  * 1 (WMI_RTSCTS_DISABLE) - Disable RTS/CTS for every ppdu for that
27390  *                          configured data TID
27391  * 2 (WMI_RTSCTS_ENABLE)  - Enable RTS/CTS for  every ppdu for that
27392  *                          configured data TID
27393  */
27394 typedef enum {
27395     WMI_RTSCTS_RESET   = 0,
27396     WMI_RTSCTS_DISABLE = 1,
27397     WMI_RTSCTS_ENABLE  = 2,
27398 } WMI_PEER_TID_CONFIG_RTSCTS_CONTROL;
27399 
27400 /**
27401  * MPDU Aggregate value for the TID
27402  */
27403 typedef enum {
27404     /** Set the default Aggregation value configured in FW */
27405     WMI_PEER_TID_MAX_NUM_MPDU_IN_PPDU_DEFAULT,
27406     WMI_PEER_TID_MAX_NUM_MPDU_IN_PPDU_MIN = 1,
27407     WMI_PEER_TID_MAX_NUM_MPDU_IN_PPDU_MAX = 1024,
27408 } WMI_PEER_TID_CONFIG_MAX_NUM_MPDU_IN_PPDU;
27409 
27410 /**
27411  * MSDU Aggregate value for the TID
27412  */
27413 typedef enum {
27414     /** Set the default Aggregation value configured in FW */
27415     WMI_PEER_TID_MAX_NUM_MSDU_IN_MPDU_DEFAULT,
27416     WMI_PEER_TID_MAX_NUM_MSDU_IN_MPDU_MIN = 1,
27417     WMI_PEER_TID_MAX_NUM_MSDU_IN_MPDU_MAX = 7,
27418 } WMI_PEER_TID_CONFIG_MAX_NUM_MSDU_IN_MPDU;
27419 
27420 /**
27421  * Command format for the TID configuration
27422  */
27423 typedef struct {
27424     /** TLV tag and len; tag equals
27425      *  WMITLV_TAG_STRUC_wmi_peer_tid_configurations_cmd_fixed_param
27426      */
27427     A_UINT32 tlv_header;
27428 
27429     /** vdev id */
27430     A_UINT32 vdev_id;
27431 
27432     /** peer MAC address */
27433     wmi_mac_addr peer_mac_address;
27434 
27435     /** TID number, generated by the caller.
27436      * Valid range for QoS TID : 0-15
27437      * Valid range for non QOS/Mgmt TID: 16-19
27438      * Any other TID number is invalid.
27439      */
27440     A_UINT32 tid_num;
27441 
27442     /** ACK policy - of type WMI_PEER_TID_CONFIG_ACK_POLICY */
27443     A_UINT32 ack_policy;
27444 
27445     /** Aggregation control - of type WMI_PEER_TID_CONFIG_AGGR_CONTROL */
27446     A_UINT32 aggr_control;
27447 
27448     /** Rate control - of type WMI_PEER_TID_CONFIG_RATE_CONTROL */
27449     A_UINT32 rate_control;
27450 
27451     /** Fixed rate control parameters - of type WMI_PEER_PARAM_FIXED_RATE.
27452      * This is applicable only when rate_control is
27453      * WMI_PEER_TID_CONFIG_RATE_CONTROL_FIXED_RATE
27454      */
27455     A_UINT32 rcode_rcflags;
27456 
27457     /** MPDU SW retry threshold - of type WMI_PEER_TID_CONFIG_SW_RETRY_THRESHOLD
27458      * This SW retry threshold limits the total number of retransmits of
27459      * nacked or unacked MPDUs, but it is up to the FW to decide what
27460      * tx rate to use during each retransmission.
27461      */
27462     A_UINT32 sw_retry_threshold;
27463 
27464     /*--- Start of extended structure ---*/
27465     /* Bitmap to indicate which fields in the extended structure are valid.
27466      * Bitmap values correspond to enum WMI_PEER_TID_EXT_CONFIG_VALID_BITMAP
27467      */
27468     A_UINT32 tid_config_supported_bitmap;
27469 
27470     /* Knob to enable/disable RTS/CTS per TID
27471      * Enum values/Expected values:
27472      *
27473      * 0 (WMI_RTSCTS_RESET)   - Use default RTS/CTS
27474      * 1 (WMI_RTSCTS_DISABLE) - Disable RTS/CTS for every ppdu for
27475      *                          that configured data TID
27476      * 2 (WMI_RTSCTS_ENABLE)  - Enable RTS/CTS for  every ppdu for
27477      *                          that configured data TID
27478      */
27479     A_UINT32 disable_rts_cts;
27480 
27481     /** Size for mpdu aggregation
27482      * (max MPDUs per PPDU)
27483      * Valid range : 1-1024 (refer to WMI_PEER_TID_MAX_NUM_MPDU_IN_PPDU_MIN,MAX)
27484      * When this field is set to 0, default aggregation value configured
27485      * in the fw will be used.
27486      * This is applicable only when aggr_control is
27487      * WMI_PEER_TID_CONFIG_AGGR_CONTROL_ENABLE
27488      */
27489     A_UINT32 max_num_mpdu_in_ppdu;
27490 
27491     /** Size for msdu aggregation
27492      * (max MSDUs per MPDU)
27493      * Valid range : 1-7 (refer to WMI_PEER_TID_MAX_NUM_MSDU_IN_MPDU_MIN,MAX)
27494      * When this field is set to 0, default aggregation value configured
27495      * in the fw will be used.
27496      * This is applicable only when aggr_control is
27497      * WMI_PEER_TID_CONFIG_AGGR_CONTROL_ENABLE
27498      */
27499     A_UINT32 max_num_msdu_in_mpdu;
27500 } wmi_peer_tid_configurations_cmd_fixed_param;
27501 
27502 /* The below enable/disable macros are used for both per peer CFR capture
27503  * control (as in wmi_peer_cfr_capture_cmd) and control of the entire periodic
27504  * CFR capture feature (as in WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE)
27505  */
27506 #define WMI_PEER_CFR_CAPTURE_ENABLE   1
27507 #define WMI_PEER_CFR_CAPTURE_DISABLE  0
27508 
27509 #define WMI_PEER_CFR_ONE_SHOT_REQUEST 0
27510 #define WMI_PEER_CFR_PERIODICITY_MIN  10 /* 10ms */
27511 #define WMI_PEER_CFR_PERIODICITY_MAX  10*60*1000 /* 10 minutes */
27512 
27513 /* Bandwidth of peer CFR captures */
27514 typedef enum {
27515     WMI_PEER_CFR_CAPTURE_BW_20MHZ    = 0,
27516     WMI_PEER_CFR_CAPTURE_BW_40MHZ    = 1,
27517     WMI_PEER_CFR_CAPTURE_BW_80MHZ    = 2,
27518     WMI_PEER_CFR_CAPTURE_BW_160MHZ   = 3,
27519     WMI_PEER_CFR_CAPTURE_BW_80_80MHZ = 4,
27520     WMI_PEER_CFR_CAPTURE_BW_MAX,
27521 } WMI_PEER_CFR_CAPTURE_BW;
27522 
27523 /* Peer CFR capture method */
27524 typedef enum {
27525     /* Send null frame on the requested bw and capture CFR on ACK */
27526     WMI_PEER_CFR_CAPTURE_METHOD_NULL_FRAME = 0,
27527     WMI_PEER_CFR_CAPTURE_METHOD_NULL_FRAME_WITH_PHASE = 1,
27528     WMI_PEER_CFR_CAPTURE_METHOD_PROBE_RESP = 2,
27529     /* New methods to be added here */
27530     WMI_PEER_CFR_CAPTURE_METHOD_MAX,
27531 } WMI_PEER_CFR_CAPTURE_METHOD;
27532 
27533 /*
27534  * Peer command structure to configure the CFR capture
27535  */
27536 typedef struct {
27537     /** TLV tag and len; tag equals
27538      *  WMITLV_TAG_STRUC_wmi_peer_cfr_capture_cmd_fixed_param
27539      */
27540     A_UINT32 tlv_header;
27541 
27542     /* WMI_PEER_CFR_CAPTURE_ENABLE: Enable CFR capture for the peer
27543      * WMI_PEER_CFR_CAPTURE_DISABLE: Disable CFR capture for the peer
27544      */
27545     A_UINT32 request;
27546     /* Peer MAC address. In AP mode, this is the address of the connected peer
27547      * for which CFR capture is needed. In case of STA mode, this is the address
27548      * of the AP to which the STA is connected
27549      */
27550     wmi_mac_addr mac_addr;
27551     /* vdev id */
27552     A_UINT32 vdev_id;
27553     /* Periodicity of measurement in ms.
27554      * WMI_PEER_CFR_ONE_SHOT_REQUEST: One-shot request i.e., Only one CFR
27555      * capture for the request and no periodic CFR captures.
27556      * The min value is WMI_PEER_CFR_PERIODICITY_MIN
27557      * The max value is WMI_PEER_CFR_PERIODICITY_MAX
27558      */
27559     A_UINT32 periodicity;
27560     /* BW of measurement - of type WMI_PEER_CFR_CAPTURE_BW */
27561     A_UINT32 bandwidth;
27562     /* Method used to capture CFR - of type WMI_PEER_CFR_CAPTURE_METHOD */
27563     A_UINT32 capture_method;
27564 } wmi_peer_cfr_capture_cmd_fixed_param;
27565 
27566 typedef enum {
27567     WMI_PEER_IND_SMPS = 0x0, /* spatial multiplexing power save */
27568     WMI_PEER_IND_OMN,        /* operating mode notification */
27569     WMI_PEER_IND_OMI,        /* operating mode indication */
27570 } WMI_PEER_OPER_MODE_IND;
27571 
27572 typedef struct {
27573     /** TLV tag and len; tag equals
27574      *  WMITLV_TAG_STRUC_wmi_peer_oper_mode_change */
27575     A_UINT32 tlv_header;
27576     /** mac addr of the peer */
27577     wmi_mac_addr peer_mac_address;
27578     /** Peer type indication WMI_PEER_OPER_MODE_IND. */
27579     A_UINT32 ind_type;
27580     /** new_rxnss valid for all peer_operating mode ind. */
27581     A_UINT32 new_rxnss;
27582     /** new_bw  valid for peer_operating mode ind. OMN/OMI
27583      *  value of this bw is as per 11ax/ac standard:
27584      *  0 = 20MHz,1 = 40MHz, 2= 80MHz, 3 = 160MHz
27585      */
27586     A_UINT32 new_bw;
27587     /** new_txnss valid for peer_operating mode ind. OMI */
27588     A_UINT32 new_txnss;
27589     /** new_disablemu: disable mu mode
27590      *  valid for peer_operating mode ind. OMI
27591      */
27592     A_UINT32 new_disablemu;
27593 } wmi_peer_oper_mode_change_event_fixed_param;
27594 
27595 /** FW response when tx failure count has reached threshold
27596  *  for a peer */
27597 typedef struct {
27598     /** TLV tag and len; tag equals
27599      *  WMITLV_TAG_STRUC_wmi_peer_tx_fail_cnt_thr_event_fixed_param */
27600     A_UINT32 tlv_header;
27601     /** vdev id*/
27602     A_UINT32 vdev_id;
27603     /** mac address */
27604     wmi_mac_addr peer_mac_address;
27605     /** tx failure count - will eventually be removed and not used */
27606     A_UINT32 tx_fail_cnt;
27607     /** seq number of the nth tx_fail_event */
27608     A_UINT32 seq_no;
27609 } wmi_peer_tx_fail_cnt_thr_event_fixed_param;
27610 
27611 enum wmi_rmc_mode {
27612    /** Disable RMC */
27613    WMI_RMC_MODE_DISABLED = 0,
27614    /** Enable RMC */
27615    WMI_RMC_MODE_ENABLED = 1,
27616 };
27617 
27618 /** Enable RMC transmitter functionality. Upon
27619  *  receiving this, the FW shall mutlicast frames with
27620  *  reliability. This is a vendor
27621  *  proprietary feature. */
27622 typedef struct {
27623     /** TLV tag and len; tag equals
27624      *  WMITLV_TAG_STRUC_wmi_rmc_set_mode_cmd_fixed_param   */
27625     A_UINT32 tlv_header;
27626     /** vdev id*/
27627     A_UINT32 vdev_id;
27628     /** enable_rmc contains values from enum wmi_rmc_mode;
27629      *  Default value: 0 (disabled) */
27630     A_UINT32 enable_rmc;
27631 } wmi_rmc_set_mode_cmd_fixed_param;
27632 
27633 /** Configure transmission periodicity of action frames in a
27634  *  RMC network for the multicast transmitter */
27635 typedef struct {
27636     /** TLV tag and len; tag equals
27637      *  WMITLV_TAG_STRUC_wmi_rmc_set_action_period_cmd_fixed_param */
27638     A_UINT32 tlv_header;
27639     /** vdev id */
27640     A_UINT32 vdev_id;
27641     /** time period in milliseconds. Default: 300 ms.
27642        An action frame indicating the current leader is transmitted by the
27643        RMC transmitter once every 'periodity_msec' */
27644     A_UINT32 periodicity_msec;
27645 } wmi_rmc_set_action_period_cmd_fixed_param;
27646 
27647 /** Optimise Leader selection process in RMC functionality. For
27648  *  Enhancement/Debug purposes only */
27649 typedef struct {
27650     /** TLV tag and len; tag equals
27651      *  WMITLV_TAG_STRUC_wmi_rmc_config_cmd_fixed_param   */
27652     A_UINT32 tlv_header;
27653     /** vdev id */
27654     A_UINT32 vdev_id;
27655     /** flags ::
27656      *  0x0001 - Enable beacon averaging
27657      *  0x0002 - Force leader selection
27658      *  0x0004 - Enable Timer based leader switch
27659      *  0x0008 - Use qos/NULL based for multicast reliability */
27660     A_UINT32 flags;
27661     /**  control leader change timeperiod (in seconds) */
27662     A_UINT32 peridocity_leader_switch;
27663     /** control activity timeout value for data rx (in seconds) */
27664     A_UINT32 data_activity_timeout;
27665     /** mac address of leader */
27666     wmi_mac_addr forced_leader_mac_addr;
27667 } wmi_rmc_config_cmd_fixed_param;
27668 
27669 /** MHF is generally implemented in
27670  *  the kernel. To decrease system power consumption, the
27671  *  driver can enable offloading this to the chipset. In
27672  *  order for the offload, the firmware needs the routing table.
27673  *  The host shall plumb the routing table into FW. The firmware
27674  *  shall perform an IP address lookup and forward the packet to
27675  *  the next hop using next hop's mac address. This is a vendor
27676  *  proprietary feature. */
27677 enum wmi_mhf_ofl_mode {
27678    /** Disable MHF offload */
27679    WMI_MHF_OFL_MODE_DISABLED = 0,
27680    /** Enable MHF offload */
27681    WMI_MHF_OFL_MODE_ENABLED = 1,
27682 };
27683 
27684 typedef struct {
27685     /** TLV tag and len; tag equals
27686      *  WMITLV_TAG_STRUC_wmi_mhf_offload_set_mode_cmd_fixed_param */
27687     A_UINT32 tlv_header;
27688     /** vdev id*/
27689     A_UINT32 vdev_id;
27690     /** enable_mhf_ofl contains values from enum
27691      *  wmi_mhf_ofl_mode; Default value: 0 (disabled) */
27692     A_UINT32 enable_mhf_ofl;
27693 } wmi_mhf_offload_set_mode_cmd_fixed_param;
27694 
27695 enum wmi_mhf_ofl_table_action {
27696    /** Create MHF offload table in FW */
27697    WMI_MHF_OFL_TBL_CREATE = 0,
27698    /** Append to existing MHF offload table */
27699    WMI_MHF_OFL_TBL_APPEND = 1,
27700    /** Flush entire MHF offload table in FW */
27701    WMI_MHF_OFL_TBL_FLUSH = 2,
27702 };
27703 
27704 typedef struct {
27705     /** TLV tag and len; tag equals
27706      *  WMITLV_TAG_STRUC_wmi_mhf_offload_plumb_routing_table_cmd_fixed_param */
27707     A_UINT32 tlv_header;
27708     /** vdev id*/
27709     A_UINT32 vdev_id;
27710     /** action corresponds to values from enum
27711      *  wmi_mhf_ofl_table_action */
27712     A_UINT32 action;
27713     /** number of entries in the table */
27714     A_UINT32 num_entries;
27715 /** Followed by the variable length TLV
27716  *  wmi_mhf_offload_routing_table_entry entries[] */
27717 } wmi_mhf_offload_plumb_routing_table_cmd;
27718 
27719 typedef struct {
27720     /** TLV tag and len; tag equals
27721      *  WMITLV_TAG_STRUC_wmi_mhf_offload_routing_table_entry */
27722     A_UINT32 tlv_header;
27723     /** Destination node's IP address */
27724     WMI_IPV4_ADDR dest_ipv4_addr;
27725     /** Next hop node's MAC address */
27726     wmi_mac_addr next_hop_mac_addr;
27727 } wmi_mhf_offload_routing_table_entry;
27728 
27729 enum {
27730     WMI_DFS_RADAR_PULSE_FLAG_MASK_PSIDX_DIFF_VALID = 0x00000001,
27731 };
27732 
27733 typedef struct {
27734     /** tlv tag and len, tag equals
27735       * WMITLV_TAG_STRUC_wmi_dfs_radar_event */
27736     A_UINT32 tlv_header;
27737 
27738     /** full 64 tsf timestamp get from MAC tsf timer indicates
27739      * the time that the radar event uploading to host, split
27740      * it to high 32 bit and lower 32 bit in fulltsf_high and
27741      * full_tsf_low
27742      */
27743     A_UINT32 upload_fullts_low;
27744     A_UINT32 upload_fullts_high;
27745 
27746     /** timestamp indicates the time when DFS pulse is detected
27747      * equal to ppdu_end_ts - radar_pusle_summary_ts_offset
27748      */
27749     A_UINT32 pulse_detect_ts;
27750 
27751     /** the duaration of the pulse in us */
27752     A_UINT32 pulse_duration;
27753 
27754     /** the center frequency of the radar pulse detected, KHz */
27755     A_UINT32 pulse_center_freq;
27756 
27757     /** bandwidth of current DFS channel, MHz */
27758     A_UINT32 ch_bandwidth;
27759 
27760     /** center channel frequency1 of current DFS channel, MHz */
27761     A_UINT16 ch_center_freq1;
27762 
27763     /** center channel frequency2 of current DFS channel, MHz,
27764      * reserved for 160 BW mode
27765      */
27766     A_UINT16 ch_center_freq2;
27767 
27768     /** flag to indicate if this pulse is chirp */
27769     A_UINT8  pulse_is_chirp;
27770 
27771     /** RSSI recorded in the ppdu */
27772     A_UINT8  rssi;
27773 
27774     /** extended RSSI info */
27775     A_UINT8  rssi_ext;
27776 
27777     union {
27778         A_UINT8 pmac_id; /* OBSOLETE - will be removed once all refs are gone */
27779         /** pdev_id for identifying the MAC
27780          * See macros starting with WMI_PDEV_ID_ for values.
27781          */
27782         A_UINT8 pdev_id;
27783     };
27784 
27785     /** index of peak magnitude bin (signed) */
27786     A_INT32 peak_sidx;
27787 
27788     /** Max pulse chirp velocity in delta bins over chirp FFT interval */
27789     A_INT32 pulse_delta_peak;
27790 
27791     /** Max pulse chirp velocity variance in delta bins */
27792     A_INT32 pulse_delta_diff;
27793 
27794     /** the difference in the FFT peak index between short FFT and the first long FFT
27795      * psidx_diff = (first_long_fft_psidx - 4*first_short_fft_psidx),
27796      */
27797     A_INT32 psidx_diff;
27798 
27799     /** pulse_flags: see WMI_DFS_RADAR_PULSE_FLAG_MASK enum values
27800      *  0x0001 - set if psidx_diff is valid
27801      */
27802     A_UINT32 pulse_flags;
27803 
27804 } wmi_dfs_radar_event_fixed_param;
27805 
27806 enum {
27807     /* DEFAULT - target chooses what action to take, based on its thermal
27808      * management policy
27809      * Targets which throttle tx (and potentially rx) based on thermal
27810      * management thresholds specified by the host will shut down tx
27811      * if the temperature exceeds upper_thresh_degreeC.
27812      * Targets which simply inform the host about threshold breaches will
27813      * send a notification message to the host if the temperature exceeds
27814      * upper_thresh_degreeC.
27815      * Conversely, if the temperature was above upper_thresh_degreeC but
27816      * then drops to below lower_threshold_degreeC, the target will either
27817      * resume tx, or notify the host.
27818      */
27819     WMI_THERMAL_MGMT_ACTION_DEFAULT = 0,
27820     /* HALT_TRAFFIC -
27821      * If the temperature rises above upper_thresh_degreeC, the target will
27822      * halt tx.
27823      * If the temperature falls back below lower_thresh_degreeC, the target
27824      * will resume tx.
27825      */
27826     WMI_THERMAL_MGMT_ACTION_HALT_TRAFFIC = 1,
27827     /* NOTIFY_HOST - the target will notify the host if the temperature
27828      * either rises above upper_thresh_degreeC or falls below
27829      * lower_thresh_degreeC.
27830      */
27831     WMI_THERMAL_MGMT_ACTION_NOTIFY_HOST = 2,
27832     /* CHAIN SCALING -
27833      * The target will switch tx chain mask from multi chains to single chain
27834      * if the temperature rises above upper_thresh_degreeC.
27835      * The target will switch tx chainmask back to multi chains if the
27836      * temperature drops below upper_thresh_degreeC.
27837      */
27838     WMI_THERMAL_MGMT_ACTION_CHAINSCALING = 3,
27839 };
27840 
27841 typedef struct {
27842     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_cmd_fixed_param  */
27843 
27844     /*Thermal thresholds*/
27845     A_UINT32 lower_thresh_degreeC; /* in degree C*/
27846     A_UINT32 upper_thresh_degreeC; /* in degree C*/
27847 
27848     /*Enable/Disable Thermal Monitoring for Mitigation*/
27849     A_UINT32 enable;
27850 
27851     /* action: what the target should do when a thermal upper/lower threshold
27852      * is crossed.
27853      * Refer to the WMI_THERMAL_MGMT_ACTION enum.
27854      */
27855     A_UINT32 action;
27856     A_UINT32 threshold_warning_degreeC;
27857     A_UINT32 sample_rate_ms;
27858 } wmi_thermal_mgmt_cmd_fixed_param;
27859 
27860 typedef struct {
27861     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_event_fixed_param  */
27862 
27863     A_UINT32 temperature_degreeC;/* temperature in degree C*/
27864 } wmi_thermal_mgmt_event_fixed_param;
27865 
27866 /**
27867 * This command is sent from WLAN host driver to firmware to
27868  * request firmware to configure auto shutdown timer in fw
27869  * 0 - Disable <1-19600>-Enabled and timer value is seconds (86400 seconds = 1 day maximum>
27870  */
27871 typedef struct {
27872     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_cfg_cmd_param  */
27873     A_UINT32 timer_value;   /** timer value; 0=disable */
27874 } wmi_host_auto_shutdown_cfg_cmd_fixed_param;
27875 
27876 enum wmi_host_auto_shutdown_reason {
27877     WMI_HOST_AUTO_SHUTDOWN_REASON_UNKNOWN = 0,
27878     WMI_HOST_AUTO_SHUTDOWN_REASON_TIMER_EXPIRY = 1,
27879     WMI_HOST_AUTO_SHUTDOWN_REASON_MAX,
27880 };
27881 
27882 /* WMI_HOST_AUTO_SHUTDOWN_EVENTID  */
27883 typedef struct {
27884     A_UINT32    tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_event_fixed_param  */
27885     A_UINT32    shutdown_reason; /* value: wmi_host_auto_shutdown_reason */
27886 } wmi_host_auto_shutdown_event_fixed_param;
27887 
27888 
27889 
27890 /** New WMI command to support TPC CHAINMASK ADJUSTMENT ACCORDING TO a set of conditions specified in the command.
27891  *  fw will save c tpc offset/chainmask along with conditions and adjust tpc/chainmask when condition meet.
27892  *  This command is only used by some customer for  verification test.  It is not for end-user.
27893  *
27894  *  array of wmi_tpc_chainmask_config structures are passed with the command to specify multiple conditions.
27895  *
27896  *  The set of conditions include bt status, stbc status, band, phy_mode, 1stream/2streams, channel, rate. when all these conditions meet,
27897  *  the output(tpc_offset,chainmask) will be applied on per packet basis. ack_offset is applied based on channel condition only. When multiple
27898  *  conditions has the same channel ,then the first ack_offset will be applied. It is better for host driver to make sure the
27899  *  <channel, ack_offset> pair is unique.
27900  *
27901  *  the conditions (bt status, stbc status, band, phy_mode, 1steam/2streams, tpc_offset, ack_offset, chainmask) are combinedi into a single word
27902  *  called basic_config_info by bitmap
27903  *  to save memory. And channel & rate info will be tracked by 'channel' field and 'rate0', 'rate1' field because of its large combination.
27904  *
27905  *  'rate bit' or 'channel bit' field of basic_config_info indicate validity of the channel and rate fields.if rate bit is 0 then the rate field
27906  *   is ignored.
27907  *  disable will remove preious conditions from FW.
27908  *  conditions from the later command will over write conditions stored from a previous command.
27909  *
27910  */
27911 
27912 #define WMI_TPC_CHAINMASK_CONFIG_BT_ON_OFF    0   /** dont' care the bt status */
27913 #define WMI_TPC_CHAINMASK_CONFIG_BT_ON        1   /** apply only when bt on */
27914 #define WMI_TPC_CHAINMASK_CONFIG_BT_OFF       2   /** apply only when bt off  */
27915 #define WMI_TPC_CHAINMASK_CONFIG_BT_RESV1     3   /** reserved  */
27916 
27917 #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_DONT_CARE   0   /**  don't care the chainmask */
27918 #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0      1   /**  force to use Chain0 to send */
27919 #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN1      2   /**  force to use Chain1 to send */
27920 #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0_CHAIN1  3   /** force to use Chain0 & Chain1 to send */
27921 
27922 #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON_OFF  0   /**  don't care about stbc  */
27923 #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON      1   /**  apply only when stbc on */
27924 #define WMI_TPC_CHAINMASK_CONFIG_STBC_OFF     2   /**  apply only when stbc off */
27925 #define WMI_TPC_CHAINMASK_CONFIG_STBC_RESV1   3   /**  reserved */
27926 
27927 #define WMI_TPC_CHAINMASK_CONFIG_BAND_2G      0   /**  2G */
27928 #define WMI_TPC_CHAINMASK_CONFIG_BAND_5G      1   /**  5G */
27929 
27930 #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11B_2G    0        /** 11b 2G */
27931 #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11G_2G    1        /** 11g 2G */
27932 #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_2G    2        /** 11n 2G */
27933 #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_2G   3    /** 11n + 11ac 2G */
27934 #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11A_5G    4        /** 11a 5G */
27935 #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_5G    5        /** 11n 5G */
27936 #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11AC_5G   6        /** 11ac 5G */
27937 #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_5G  7     /** 11n + 11ac 5G */
27938 
27939 #define WMI_TPC_CHAINMASK_CONFIG_STREAM_1           0    /** 1 stream  */
27940 #define WMI_TPC_CHAINMASK_CONFIG_STREAM_2           1    /** 2 streams */
27941 
27942 #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_OFF        0    /** channel field is ignored */
27943 #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_ON         1    /** channel field needs to be checked */
27944 
27945 #define WMI_TPC_CHAINMASK_CONFIG_RATE_OFF           0    /** rate field is ignored */
27946 #define WMI_TPC_CHAINMASK_CONFIG_RATE_ON            1    /** rate field needs to be checked */
27947 
27948 /**  Bit map definition for basic_config_info starts   */
27949 #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S   0
27950 #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET     (0x1f << WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S)
27951 #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_GET(x)     WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
27952 #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_SET(x,z)   WMI_F_RMW(x,(z) & 0x1f,WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
27953 
27954 #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S      5
27955 #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET        (0x1f << WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S)
27956 #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_GET(x)     WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
27957 #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_SET(x,z)   WMI_F_RMW(x, (z) & 0x1f, WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
27958 
27959 #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S  10
27960 #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK   (0x3 << WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S)
27961 #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_GET(x)   WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
27962 #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_SET(x,z)  WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
27963 
27964 #define WMI_TPC_CHAINMASK_CONFIG_BT_S       12
27965 #define WMI_TPC_CHAINMASK_CONFIG_BT         (0x3 << WMI_TPC_CHAINMASK_CONFIG_BT_S)
27966 #define WMI_TPC_CHAINMASK_CONFIG_BT_GET(x)     WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_BT)
27967 #define WMI_TPC_CHAINMASK_CONFIG_BT_SET(x,z)   WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_BT)
27968 
27969 #define WMI_TPC_CHAINMASK_CONFIG_STBC_S     14
27970 #define WMI_TPC_CHAINMASK_CONFIG_STBC       (0x3 << WMI_TPC_CHAINMASK_CONFIG_STBC_S)
27971 #define WMI_TPC_CHAINMASK_CONFIG_STBC_GET(x)     WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_STBC)
27972 #define WMI_TPC_CHAINMASK_CONFIG_STBC_SET(x,z)   WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_STBC)
27973 
27974 #define WMI_TPC_CHAINMASK_CONFIG_BAND_S     16
27975 #define WMI_TPC_CHAINMASK_CONFIG_BAND       (0x1 << WMI_TPC_CHAINMASK_CONFIG_BAND_S)
27976 #define WMI_TPC_CHAINMASK_CONFIG_BAND_GET(x)  WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_BAND)
27977 #define WMI_TPC_CHAINMASK_CONFIG_BAND_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_BAND)
27978 
27979 #define WMI_TPC_CHAINMASK_CONFIG_STREAM_S   17
27980 #define WMI_TPC_CHAINMASK_CONFIG_STREAM     (0x1 << WMI_TPC_CHAINMASK_CONFIG_STREAM_S)
27981 #define WMI_TPC_CHAINMASK_CONFIG_STREAM_GET(x)  WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_STREAM)
27982 #define WMI_TPC_CHAINMASK_CONFIG_STREAM_SET(x,z)  WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_STREAM)
27983 
27984 #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S     18
27985 #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE       (0x7 << WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S)
27986 #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
27987 #define WMI_TPC_CHAINAMSK_CONFIG_PHY_MODE_SET(x,z)  WMI_F_RMW(x, (z) & 0x7, WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
27988 
27989 #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S     21
27990 /*
27991  * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST)
27992  * is temporarily maintained as an alias for the correct name
27993  * (WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
27994  */
27995 #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST WMI_TPC_CHAINMASK_CONFIG_CHANNEL
27996 #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL       (0x1 << WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S)
27997 #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_GET(x)  WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
27998 #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_SET(x,z)  WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
27999 
28000 #define WMI_TPC_CHAINMASK_CONFIG_RATE_S  22
28001 /*
28002  * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST)
28003  * is temporarily maintained as an alias for the correct name
28004  * (WMI_TPC_CHAINMASK_CONFIG_RATE)
28005  */
28006 #define WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST WMI_TPC_CHAINMASK_CONFIG_RATE
28007 #define WMI_TPC_CHAINMASK_CONFIG_RATE    (0x1 << WMI_TPC_CHAINMASK_CONFIG_RATE_S)
28008 #define WMI_TPC_CHAINMASK_CONFIG_RATE_GET(x)   WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_RATE)
28009 #define WMI_TPC_CHAINMASK_CONFIG_RATE_SET(x,z)  WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_RATE)
28010 
28011 /**  Bit map definition for basic_config_info ends   */
28012 
28013 typedef struct {
28014     A_UINT32 tlv_header;
28015     /** Basic condition defined as bit map above, bitmap is chosen to save memory.
28016      * Bit0  ~ Bit4: tpc offset which will be adjusted if condition matches, the unit is 0.5dB.  bit4 indicates signed
28017      * Bit5  ~ Bit9: ack offset which will be adjusted if condition matches, the unit is 0.5dB.  bit9 indicates signed
28018      * Bit10 ~ Bit11: chainmask  b'00: don't care, b'01: force to use chain0, b'10: force to use chain1, b'11: force to use chain0&chain1
28019      * Bit12 ~ Bit13: bt condition  b'00: don't care, b'01: apply only when bt on, b'10: apply only when bt off,  b'11: reserved
28020      * Bit14 ~ Bit15: stbc condition  b'00: don't care, b'01: apply only when stbc on, b'10: apply only when stbc off, b'11: reserved
28021      * Bit16 : band condition  b'0: 2G,  b'1: 5G
28022      * Bit17 : stream condition:  b'0: 1 stream, b'1: 2 streams
28023      * Bit18 ~ Bit20: phy mode condition: b'000: 11b 2g, b'001: 11g 2g, b'010: 11n 2g, b'011: 11n+11ac 2g, b'100: 11a, b'101: 11n 5g, b'110: 11ac 5g, b'111: 11n+11ac 5g
28024      * Bit21 : channel bit, if this bit is 0, then the following channel field is ignored
28025      * Bit22 : rate bit, if this bit is 0, then the following rate0&rate1 is ignored.
28026      * Bit23 ~ Bit31:  reserved
28027      */
28028     A_UINT32 basic_config_info;
28029 
28030     /** channel mapping bit rule: The lower bit corresponds with smaller channel.
28031      *  it depends on Bit14 of basic_config_info
28032      *  Total 24 channels for 5G
28033      *  36    40    44    48    52    56    60    64   100   104   108   112   116   120   124   128   132   136   140   149   153   157   161   165
28034      *  Total 14 channels for 2G
28035      *  1 ~ 14
28036      */
28037     A_UINT32 channel;
28038 
28039     /** rate mapping bit rule:  The lower bit corresponds with lower rate.
28040      *  it depends on Bit16 ~ Bit18 of basic_config_info, "phy mode condition"
28041      *  Legacy rates , 11b, 11g, 11A
28042      *  11n one stream (ht20, ht40) 8+8
28043      *  11n two streams (ht20, ht40) 8+8
28044      *  11ac one stream (vht20, vht40, vht80) 10+10+10
28045      *  11ac two streams (vht20, vht40, vht80) 10+10+10
28046      */
28047     A_UINT32 rate0;
28048     /** For example, for 11b, when rate0 equals 0x3, it means if actual_rate in [ "1Mbps", "2Mbps"] connection, the rate condition is true.
28049      *  For example, for 11g/11a, when rate0 equals 0xf0,it means "54Mbps", "48Mbps", "36Mbps", "24Mb's" is selected, while "18Mbps", "12Mbps", "9Mbps", "6Mbps" is not selected
28050      */
28051 
28052     /** only used for "11n+11ac" combined phy_mode, (WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_2G , WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_5G) in this case, 11n rates begins on rate0, while 11ac rates begins on rate1
28053      */
28054     A_UINT32 rate1;
28055 } wmi_tpc_chainmask_config;
28056 
28057 #define WMI_TPC_CHAINMASK_CONFIG_DISABLE   0   /** control the off for the tpc & chainmask*/
28058 #define WMI_TPC_CHAINMASK_CONFIG_ENABLE    1   /** control the on for the tpc & chainmask*/
28059 
28060 typedef struct {
28061     A_UINT32 tlv_header;
28062     A_UINT32 enable;  /** enable to set tpc & chainmask when conditions meet, 0: disabled,   1: enabled.  */
28063     A_UINT32 num_tpc_chainmask_configs;
28064     /** following this structure is num_tpc_chainmask_configs number of wmi_tpc_chainmask_config  */
28065 } wmi_tpc_chainmask_config_cmd_fixed_param;
28066 
28067 typedef struct {
28068     A_UINT32 tlv_header;        /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_ring_cfg_req_fixed_param */
28069     A_UINT32 pdev_id;
28070     /**
28071      * Bits 31:0:   base address of ring [31:0]
28072      */
28073     A_UINT32 base_addr_lo;
28074     /**
28075      * Bits 3:0:    base address of ring [35:32]
28076      * Bits 31:4:   reserved
28077      */
28078     A_UINT32 base_addr_hi;
28079     /**
28080      * Bits 31:0:   address of head index [31:0]
28081      */
28082     A_UINT32 head_idx_addr_lo;
28083     /**
28084      * Bits 3:0:    address of head index [35:32]
28085      * Bits 31:4:   reserved
28086      */
28087     A_UINT32 head_idx_addr_hi;
28088     /**
28089      * Bits 31:0:   address of tail index [31:0]
28090      */
28091     A_UINT32 tail_idx_addr_lo;
28092     /**
28093      * Bits 3:0:    address of tail index [35:32]
28094      * Bits 31:4:   reserved
28095      */
28096     A_UINT32 tail_idx_addr_hi;
28097     A_UINT32 num_ptr;           /** Number of pointers in the ring */
28098 } wmi_oem_dma_ring_cfg_req_fixed_param;
28099 
28100 #define WMI_OEM_DMA_RING_ADDR_LO_S 0
28101 #define WMI_OEM_DMA_RING_ADDR_LO 0xffffffff
28102 
28103 #define WMI_OEM_DMA_RING_ADDR_LO_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_RING_ADDR_LO)
28104 #define WMI_OEM_DMA_RING_ADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_RING_ADDR_LO)
28105 
28106 #define WMI_OEM_DMA_RING_ADDR_HI_S 0
28107 #define WMI_OEM_DMA_RING_ADDR_HI 0xf
28108 
28109 #define WMI_OEM_DMA_RING_ADDR_HI_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_RING_ADDR_HI)
28110 #define WMI_OEM_DMA_RING_ADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_RING_ADDR_HI)
28111 
28112 typedef struct {
28113     A_UINT32 tlv_header;    /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_ring_cfg_rsp_fixed_param */
28114     A_UINT32 pdev_id;
28115     A_UINT32 cfg_status;    /** Configuration status; see A_STATUS */
28116 } wmi_oem_dma_ring_cfg_rsp_fixed_param;
28117 
28118 typedef struct {
28119     A_UINT32 tlv_header;    /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_indirect_data */
28120     A_UINT32 pdev_id;       /** ID of pdev whose OEM DMA ring produced the data */
28121     /**
28122      * Bits 31:0:   address of data [31:0]
28123      */
28124     A_UINT32 addr_lo;
28125     /**
28126      * Bits 3:0:    address of data [35:32]
28127      * Bits 11:4:   reserved
28128      * Bits 31:12:  opaque host context data [19:0]
28129      */
28130     A_UINT32 addr_hi;
28131     A_UINT32 len;           /** Length of data in bytes */
28132 } wmi_oem_indirect_data;
28133 
28134 #define WMI_OEM_DMA_DATA_ADDR_LO_S 0
28135 #define WMI_OEM_DMA_DATA_ADDR_LO 0xffffffff
28136 
28137 #define WMI_OEM_DMA_DATA_ADDR_LO_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_LO)
28138 #define WMI_OEM_DMA_DATA_ADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_DATA_ADDR_LO)
28139 
28140 #define WMI_OEM_DMA_DATA_ADDR_HI_S 0
28141 #define WMI_OEM_DMA_DATA_ADDR_HI 0xf
28142 
28143 #define WMI_OEM_DMA_DATA_ADDR_HI_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_HI)
28144 #define WMI_OEM_DMA_DATA_ADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_DATA_ADDR_HI)
28145 
28146 #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA_S 12
28147 #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA 0xfffff
28148 
28149 #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA)
28150 #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA)
28151 
28152 typedef struct {
28153     A_UINT32 tlv_header;    /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_buf_release_hdr */
28154     A_UINT32 pdev_id;       /** ID of pdev whose OEM DMA ring produced the data */
28155 } wmi_oem_dma_buf_release_fixed_param;
28156 
28157 typedef struct {
28158     /**
28159      * Bits 31:0:   address of data [31:0]
28160      */
28161     A_UINT32 addr_lo;
28162     /**
28163      * Bits 3:0:    address of data [35:32]
28164      * Bits 11:4:   reserved
28165      * Bits 31:12:  host context data [19:0]
28166      */
28167     A_UINT32 addr_hi;
28168 } wmi_oem_dma_buf_release_entry;
28169 
28170 typedef struct {
28171     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_data_cmd_fixed_param */
28172     A_UINT32 tlv_header;
28173     /** Unique id identifying the VDEV */
28174     A_UINT32 vdev_id;
28175     /** Actual length in byte of data[]. */
28176     A_UINT32 data_len;
28177     /**
28178      * pdev_vdev_flag - 0  follow old method (vdev_id is valid, ignore pdev_id)
28179      * pdev_vdev_flag - 1  pdev_id is valid
28180      */
28181     A_UINT32 pdev_vdev_flag;
28182     /** Unique id identifying the PDEV */
28183     A_UINT32 pdev_id;
28184 /** This structure is used to send OEM DATA binary blobs from
28185  * application/service to firmware where Host driver is pass through.
28186  * The OEM-specific commands from OEM-specific userspace applications
28187  * are passed to OEM-specific feature handlers in firmware as OEM DATA
28188  * binary blobs. The format of the data is per agreement between FW and
28189  * userspace applications, with the binary blob beginning with a header
28190  * that identifies to the FW the nature of the remaining data within the
28191  * blob.
28192  *
28193  * Following this structure is the TLV:
28194  *     A_UINT8 data[]; <-- actual length in byte given by field data_len.
28195  */
28196 } wmi_oem_data_cmd_fixed_param;
28197 
28198 typedef struct {
28199     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_cmd_param */
28200     A_UINT32 data_len; /** length in byte of data[]. */
28201 /* This structure is used to send REQ binary blobs
28202 * from application/service to firmware where Host drv is pass through .
28203 * Following this structure is the TLV:
28204 *     A_UINT8 data[]; <-- length in byte given by field data_len.
28205 */
28206 } wmi_nan_cmd_param;
28207 
28208 typedef enum {
28209     WMI_NAN_VENDOR1_REQ1 = 1,
28210 } WMI_NAN_OEM_DATA_TYPE;
28211 
28212 typedef struct {
28213     /** oem_data_type:
28214      * Indicate what kind of OEM-specific data is present in the
28215      * oem_data_buffer[].
28216      * Possible values are listed in the enum WMI_NAN_OEM_DATA_TYPE.
28217      */
28218     A_UINT32 oem_data_type;
28219     /** oem_data_len:
28220      * Actual length in bytes of the OEM-specific data within the
28221      * oem_data_buffer[].
28222      * Note that it is possible for a single message to contain multiple
28223      * OEM opaque data blobs.  In such cases, the oem_data_len field of
28224      * nan_oem_data_hdr[0] not only specifies the size of the first such
28225      * opaque blob, but furthermore specifies the offset in oem_data_buffer[]
28226      * where the second opaque blob begins.
28227      */
28228     A_UINT32 oem_data_len;
28229 } wmi_nan_oem_data_hdr;
28230 
28231 typedef struct {
28232     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_oem_data_cmd_fixed_param */
28233 
28234     /* Following this structure are the below TLVs:
28235      *   - wmi_nan_oem_data_hdr nan_oem_data_hdr[];
28236      *     This TLV explains the type and size of the one or more OEM NAN
28237      *     opaque data blobs carried in this message.
28238      *   - A_UINT8 nan_oem_data_buffer[];
28239      *     This TLV holds the contents of the one or more OEM NAN opaque data
28240      *     blobs carried in this message.
28241      */
28242 } wmi_nan_oem_data_cmd_fixed_param;
28243 
28244 #define WMI_NAN_GET_RANGING_INITIATOR_ROLE(flag)      WMI_GET_BITS(flag, 0, 1)
28245 #define WMI_NAN_SET_RANGING_INITIATOR_ROLE(flag, val) WMI_SET_BITS(flag, 0, 1, val)
28246 #define WMI_NAN_GET_RANGING_RESPONDER_ROLE(flag)      WMI_GET_BITS(flag, 1, 1)
28247 #define WMI_NAN_SET_RANGING_RESPONDER_ROLE(flag, val) WMI_SET_BITS(flag, 1, 1, val)
28248 #define WMI_NAN_GET_NAN_6G_DISABLE(flag)              WMI_GET_BITS(flag, 2, 1)
28249 #define WMI_NAN_SET_NAN_6G_DISABLE(flag, val)         WMI_SET_BITS(flag, 2, 1, val)
28250 
28251 typedef struct {
28252     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_host_config_param */
28253     A_UINT32 nan_2g_disc_disable:1; /** This bit when set to 1 indicate NAN 2G discovery should be disabled */
28254     A_UINT32 nan_5g_disc_disable:1; /** This bit when set to 1 indicate NAN 5G discovery should be disabled */
28255     A_UINT32 reserved:30;
28256     /** Flags: refer to WMI_NAN_GET/SET macros
28257      *  Bit   0    -> Nan ranging initiator role (0 - Disable, 1 - Enable)
28258      *  Bit   1    -> Nan ranging responder role (0 - Disable, 1 - Enable)
28259      *  Bit   2    -> Nan 6 GHz support          (1 - Disable, 0 - Enable)
28260      *  Bits  3-31 -> Reserved
28261      */
28262     A_UINT32 flags;
28263 } wmi_nan_host_config_param_PROTOTYPE;
28264 #define wmi_nan_host_config_param wmi_nan_host_config_param_PROTOTYPE
28265 
28266 typedef struct {
28267     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_hdr */
28268     A_UINT32 data_len; /** length in byte of data[]. */
28269 /* This structure is used to send REQ binary blobs
28270 * from firmware to application/service where Host drv is pass through .
28271 * Following this structure is the TLV:
28272 *     A_UINT8 data[]; <-- length in byte given by field data_len.
28273 */
28274 } wmi_nan_event_hdr;
28275 
28276 typedef struct {
28277     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_oem_data_event_fixed_param */
28278 
28279     /* Following this structure are the below TLVs:
28280      *   - wmi_nan_oem_data_hdr nan_oem_data_hdr[];
28281      *     This TLV explains the type and size of the one or more OEM NAN
28282      *     opaque data blobs carried in this message.
28283      *   - A_UINT8 nan_oem_data_buffer[];
28284      *     This TLV holds the contents of the one or more OEM NAN opaque data
28285      *     blobs carried in this message.
28286      */
28287 } wmi_nan_oem_data_event_fixed_param;
28288 
28289 typedef struct {
28290     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_info */
28291     A_UINT32 mac_id; /* MAC ID associated with NAN primary discovery channel; Valid only for NAN enable resp message identified by NAN_MSG_ID_ENABLE_RSP */
28292     A_UINT32 status:1; /** This bit when set to 0 indicates status is successful; Valid only for NAN enable resp message identified by NAN_MSG_ID_ENABLE_RSP */
28293     A_UINT32 reserved:31;
28294     A_UINT32 vdev_id; /** Unique id identifying the vdev with type OPMODE_NAN; Valid only for NAN enable resp message identified by NAN_MSG_ID_ENABLE_RSP */
28295 } wmi_nan_event_info_PROTOTYPE;
28296 
28297 #define wmi_nan_event_info wmi_nan_event_info_PROTOTYPE
28298 
28299 /**
28300  * Event to indicate NAN discovery interface created
28301  */
28302 typedef struct {
28303     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_disc_iface_created_event_fixed_param */
28304     A_UINT32 tlv_header;
28305     /** Unique id identifying the VDEV */
28306     A_UINT32 vdev_id;
28307     /** NAN interface MAC address */
28308     wmi_mac_addr nan_interface_macaddr;
28309 } wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE;
28310 
28311 #define wmi_nan_disc_iface_created_event_fixed_param wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE
28312 
28313 /**
28314  * Event to indicate NAN discovery interface deleted
28315  */
28316 typedef struct {
28317     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_disc_iface_deleted_event_fixed_param */
28318     A_UINT32 tlv_header;
28319     /** Unique id identifying the VDEV */
28320     A_UINT32 vdev_id;
28321 } wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE;
28322 
28323 #define wmi_nan_disc_iface_deleted_event_fixed_param wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE
28324 
28325 /**
28326  * Event to indicate NAN device started new cluster
28327  */
28328 typedef struct {
28329     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_started_cluster_event_fixed_param */
28330     A_UINT32 tlv_header;
28331     /** Unique id identifying the VDEV */
28332     A_UINT32 vdev_id;
28333     /** NAN Cluster ID */
28334     A_UINT32 nan_cluster_id;
28335 } wmi_nan_started_cluster_event_fixed_param_PROTOTYPE;
28336 
28337 #define wmi_nan_started_cluster_event_fixed_param wmi_nan_started_cluster_event_fixed_param_PROTOTYPE
28338 
28339 /**
28340  * Event to indicate NAN device joined to cluster
28341  */
28342 typedef struct {
28343     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_joined_cluster_event_fixed_param */
28344     A_UINT32 tlv_header;
28345     /** Unique id identifying the VDEV */
28346     A_UINT32 vdev_id;
28347     /** NAN Cluster ID */
28348     A_UINT32 nan_cluster_id;
28349 } wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE;
28350 
28351 #define wmi_nan_joined_cluster_event_fixed_param wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE
28352 
28353 typedef struct {
28354     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_dmesg_event_fixed_param */
28355     A_UINT32 tlv_header;
28356     /** length in byte of msg[]. */
28357     A_UINT32 msg_len;
28358     /* Following this structure is the TLV:
28359      *  A_UINT8 msg[]; <-- length in byte given by field data_len.
28360      * This data contains the string message which will be given to Host to dump it to kernel logs.
28361      */
28362 } wmi_nan_dmesg_event_fixed_param;
28363 
28364 typedef struct {
28365     /** TLV tag and len; tag equals WMITLV_TAG_STRUCT_wmi_nan_capabilities */
28366     A_UINT32 tlv_header;
28367     /** Maximum number of ndp sessions supported by the Firmware */
28368     A_UINT32 max_ndp_sessions;
28369     /** Maximum number of nan pairing sessions supported by the Firmware */
28370     A_UINT32 max_pairing_sessions;
28371 } wmi_nan_capabilities;
28372 
28373 /** NAN DATA CMD's */
28374 
28375 /**
28376  * NAN Data get capabilities req
28377  */
28378 typedef struct {
28379     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndi_get_cap_req_fixed_param */
28380     A_UINT32 tlv_header;
28381     /** unique id generated in upper layer for the transaction */
28382     A_UINT32 transaction_id;
28383 } wmi_ndi_get_cap_req_fixed_param_PROTOTYPE;
28384 
28385 #define wmi_ndi_get_cap_req_fixed_param wmi_ndi_get_cap_req_fixed_param_PROTOTYPE
28386 
28387 /**
28388  * NDP Response code
28389  */
28390 typedef enum {
28391     NDP_RSP_CODE_REQUEST_ACCEPT = 0x00,
28392     NDP_RSP_CODE_REQUEST_REJECT = 0x01,
28393     NDP_RSP_CODE_REQUEST_DEFER  = 0x02,
28394 } wmi_ndp_rsp_code_PROTOTYPE;
28395 
28396 #define wmi_ndp_rsp_code wmi_ndp_rsp_code_PROTOTYPE
28397 
28398 /**
28399  * NDP Channel configuration type
28400  */
28401 typedef enum {
28402     WMI_NDP_CHANNEL_NOT_REQUESTED = 0, /* Channel will not configured */
28403     WMI_NDP_REQUEST_CHANNEL_SETUP = 1, /* Channel will be provided and is optional/hint */
28404     WMI_NDP_FORCE_CHANNEL_SETUP = 2/* NDP must start on the provided channel */
28405 } wmi_ndp_channel_cfg_PROTOTYPE;
28406 
28407 /*
28408  * The WMI_NDP_IPV6_INTF_ADDR_LEN macro cannot be changed without breaking
28409  * WMI compatibility.
28410  */
28411 #define WMI_NDP_IPV6_INTF_ADDR_LEN    16
28412 
28413 typedef struct {
28414     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_transport_ip_param */
28415     /* Presence of ipv6_intf_addr */
28416     A_UINT32 ipv6_addr_present;
28417     /* Presence of transport Port */
28418     A_UINT32 trans_port_present;
28419     /* Presence of  transport Protocol */
28420     A_UINT32 trans_proto_present;
28421     /* ipv6 Interface address */
28422     A_UINT8  ipv6_intf_addr[WMI_NDP_IPV6_INTF_ADDR_LEN];
28423     /* Transport Port */
28424     A_UINT32 transport_port;
28425     /* Transport Protocol */
28426     A_UINT32 transport_protocol;
28427 } wmi_ndp_transport_ip_param;
28428 
28429 #define wmi_ndp_channel_cfg wmi_ndp_channel_cfg_PROTOTYPE
28430 
28431 typedef struct {
28432     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_channel_info */
28433     A_UINT32 mac_id; /* mac_id associated with ndp channel at same index */
28434 } wmi_ndp_channel_info_PROTOTYPE;
28435 
28436 #define wmi_ndp_channel_info wmi_ndp_channel_info_PROTOTYPE
28437 
28438 typedef struct {
28439     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_event_param */
28440     A_UINT32 vdev_id; /* NDI VDEV ID */
28441     A_UINT32 ndp_termination_in_progress:1; /** This bit when set to 1 indicates to termination of all NDPs associated with NDI vdev ID is started */
28442     A_UINT32 reserved:31;
28443 } wmi_ndp_event_param_PROTOTYPE;
28444 
28445 #define wmi_ndp_event_param wmi_ndp_event_param_PROTOTYPE
28446 
28447 /**
28448  * NDP Initiator requesting a data session
28449  */
28450 typedef struct {
28451     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_initiator_req_fixed_param */
28452     A_UINT32 tlv_header;
28453     /** Unique id identifying the VDEV */
28454     A_UINT32 vdev_id;
28455     /** unique id generated in upper layer for the transaction */
28456     A_UINT32 transaction_id;
28457     /** Unique Instance Id identifying the Responder's service */
28458     A_UINT32 service_instance_id;
28459     /** Discovery MAC addr of the publisher/peer */
28460     wmi_mac_addr peer_discovery_mac_addr;
28461     /** Actual number of bytes in TLV ndp_cfg */
28462     A_UINT32 ndp_cfg_len;
28463     /** Actual number of bytes in TLV ndp_app_info */
28464     A_UINT32 ndp_app_info_len;
28465     /** NDP channel configuration type defined in wmi_ndp_channel_cfg */
28466     A_UINT32 ndp_channel_cfg;
28467     /**  NAN Cipher Suite Shared Key */
28468     A_UINT32 nan_csid;
28469     /** Actual number of bytes in TLV ndp_pmk */
28470     A_UINT32 nan_pmk_len;
28471     /** Actual number of bytes in TLV ndp_passphrase */
28472     A_UINT32 nan_passphrase_len;
28473     /** Actual number of bytes in TLV nan_servicename */
28474     A_UINT32 nan_servicename_len;
28475     /** NAN Cipher Suite Capability field */
28476     A_UINT32 nan_csid_cap;
28477     /** GTK protection is required for the NDP */
28478     A_UINT32 nan_gtk_required;
28479     /**
28480      * TLV (tag length value) parameters follow the ndp_initiator_req
28481      * structure. The TLV's are:
28482      * wmi_channel channel;
28483      * A_UINT8 ndp_cfg[];
28484      * A_UINT8 ndp_app_info[];
28485      * A_UINT8 ndp_pmk[];
28486      * A_INT8 ndp_passphrase[];
28487      * A_INT8 nan_servicename[];
28488      * wmi_ndp_transport_ip_param ndp_transport_ip_param;
28489      */
28490 } wmi_ndp_initiator_req_fixed_param_PROTOTYPE;
28491 
28492 #define wmi_ndp_initiator_req_fixed_param wmi_ndp_initiator_req_fixed_param_PROTOTYPE
28493 
28494 /**
28495  * Initiate a data response on the responder side
28496  * for data request indication from the peer
28497  */
28498 typedef struct {
28499     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_responder_req_fixed_param */
28500     A_UINT32 tlv_header;
28501     /** Unique id identifying the VDEV */
28502     A_UINT32 vdev_id;
28503     /** unique id generated in upper layer for the transaction */
28504     A_UINT32 transaction_id;
28505     /**
28506      * Unique token Id generated on the initiator/responder
28507      * side used for a NDP session between two NAN devices
28508      */
28509     A_UINT32 ndp_instance_id;
28510     /** Response Code defined in wmi_ndp_rsp_code */
28511     A_UINT32 rsp_code;
28512     /** Number of bytes in TLV ndp_cfg */
28513     A_UINT32 ndp_cfg_len;
28514     /** Number of bytes in TLV ndp_app_info */
28515     A_UINT32 ndp_app_info_len;
28516     /**  NAN Cipher Suite Shared Key */
28517     A_UINT32 nan_csid;
28518     /** Actual number of bytes in TLV ndp_pmk */
28519     A_UINT32 nan_pmk_len;
28520     /** Actual number of bytes in TLV ndp_passphrase */
28521     A_UINT32 nan_passphrase_len;
28522     /** Actual number of bytes in TLV nan_servicename */
28523     A_UINT32 nan_servicename_len;
28524     /** NAN Cipher Suite Capability field */
28525     A_UINT32 nan_csid_cap;
28526     /** GTK protection is required for the NDP */
28527     A_UINT32 nan_gtk_required;
28528     /**
28529      * TLV (tag length value) parameters follow the ndp_responder_req
28530      * structure. The TLV's are:
28531      * A_UINT8 ndp_cfg[];
28532      * A_UINT8 ndp_app_info[];
28533      * A_UINT8 ndp_pmk[];
28534      * A_INT8 ndp_passphrase[];
28535      * A_INT8 nan_servicename[];
28536      * wmi_ndp_transport_ip_param ndp_transport_ip_param;
28537      */
28538 } wmi_ndp_responder_req_fixed_param_PROTOTYPE;
28539 
28540 #define wmi_ndp_responder_req_fixed_param wmi_ndp_responder_req_fixed_param_PROTOTYPE
28541 
28542 /**
28543  * NDP end type
28544  */
28545 typedef enum {
28546     WMI_NDP_END_TYPE_UNSPECIFIED = 0x00,
28547     WMI_NDP_END_TYPE_PEER_UNAVAILABLE = 0x01,
28548     WMI_NDP_END_TYPE_OTA_FRAME = 0x02,
28549     WMI_NDP_END_TYPE_DATA_INACTIVITY = 0x03,
28550 } wmi_ndp_end_type_PROTOTYPE;
28551 
28552 #define wmi_ndp_end_type wmi_ndp_end_type_PROTOTYPE
28553 
28554 /**
28555  * NDP end reason code
28556  */
28557 typedef enum {
28558     WMI_NDP_END_REASON_UNSPECIFIED = 0x00,
28559     WMI_NDP_END_REASON_INACTIVITY = 0x01,
28560     WMI_NDP_END_REASON_PEER_DATA_END = 0x02,
28561     WMI_NDP_END_REASON_DATA_INACTIVITY = 0x03,
28562 } wmi_ndp_end_reason_code_PROTOTYPE;
28563 
28564 #define wmi_ndp_end_reason_code wmi_ndp_end_reason_code_PROTOTYPE
28565 
28566 /**
28567  * NDP end request
28568  */
28569 typedef struct {
28570     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req */
28571     A_UINT32 tlv_header;
28572     /** NDP instance id */
28573     A_UINT32 ndp_instance_id;
28574     /** vdev_id valid flag */
28575     A_UINT32 vdev_id_valid;
28576     /** vdev id */
28577     A_UINT32 vdev_id;
28578 } wmi_ndp_end_req_PROTOTYPE;
28579 
28580 #define wmi_ndp_end_req wmi_ndp_end_req_PROTOTYPE
28581 
28582 typedef struct {
28583     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_cmd_param */
28584     A_UINT32 vdev_id; /* NDI VDEV ID */
28585     A_UINT32 ndp_disable:1; /** This bit when set to 1 indicates to terminate all NDPs associated with NDI vdev ID */
28586     A_UINT32 reserved:31;
28587 } wmi_ndp_cmd_param_PROTOTYPE;
28588 
28589 #define wmi_ndp_cmd_param wmi_ndp_cmd_param_PROTOTYPE
28590 
28591 /**
28592  * NDP End request
28593  */
28594 typedef struct {
28595     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req_fixed_param */
28596     A_UINT32 tlv_header;
28597     /** unique id generated in upper layer for the transaction */
28598     A_UINT32 transaction_id;
28599     /**
28600      * TLV (tag length value) parameters follow the ndp_end_req
28601      * structure. The TLV's are:
28602      * wmi_ndp_end_req ndp_end_req_list[];
28603      */
28604 } wmi_ndp_end_req_fixed_param_PROTOTYPE;
28605 
28606 #define wmi_ndp_end_req_fixed_param wmi_ndp_end_req_fixed_param_PROTOTYPE
28607 
28608 /* NAN DATA RSP EVENTS */
28609 
28610 /**
28611  * Event to indicate NAN Data Interface capabilities cmd
28612  */
28613 typedef struct {
28614     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndi_cap_rsp_event_fixed_param */
28615     A_UINT32 tlv_header;
28616     /** Copy of transaction_id received in wmi_ndi_get_cap_req */
28617     A_UINT32 transaction_id;
28618     /** Max ndi interface support */
28619     A_UINT32 max_ndi_interfaces;
28620     /** Max ndp sessions can support */
28621     A_UINT32 max_ndp_sessions;
28622     /** Max number of peer's per ndi */
28623     A_UINT32 max_peers_per_ndi;
28624     /** which combination of bands is supported - see NAN_DATA_SUPPORTED_BAND enums */
28625     A_UINT32 nan_data_supported_bands;
28626 } wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE;
28627 
28628 #define wmi_ndi_cap_rsp_event_fixed_param wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE
28629 
28630 /**
28631  * NDP command response code
28632  */
28633 typedef enum {
28634     NDP_CMD_RSP_STATUS_SUCCESS = 0x00,
28635     NDP_CMD_RSP_STATUS_ERROR = 0x01,
28636 } wmi_ndp_cmd_rsp_status_PROTOTYPE;
28637 
28638 #define wmi_ndp_cmd_rsp_status wmi_ndp_cmd_rsp_status_PROTOTYPE
28639 
28640 /**
28641  * Event response for wmi_ndp_initiator_req
28642  */
28643 typedef struct {
28644     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_initiator_rsp_event_fixed_param */
28645     A_UINT32 tlv_header;
28646     /** Unique id identifying the VDEV */
28647     A_UINT32 vdev_id;
28648     /** Copy of transaction_id received in wmi_ndp_initiator_req */
28649     A_UINT32 transaction_id;
28650     /** Response status defined in wmi_ndp_cmd_rsp_status*/
28651     A_UINT32 rsp_status;
28652     A_UINT32 reason_code;
28653     /**
28654      * Unique token Id generated on the initiator/responder
28655      * side used for a NDP session between two NAN devices
28656      */
28657     A_UINT32 ndp_instance_id;
28658 } wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE;
28659 
28660 #define wmi_ndp_initiator_rsp_event_fixed_param wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE
28661 
28662 /**
28663  * Event response for wmi_ndp_responder_req cmd
28664  */
28665 typedef struct {
28666     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_responder_rsp_event_fixed_param */
28667     A_UINT32 tlv_header;
28668     /** Unique id identifying the VDEV */
28669     A_UINT32 vdev_id;
28670     /** Copy of transaction_id received in wmi_ndp_responder_req */
28671     A_UINT32 transaction_id;
28672     /** Response status defined in wmi_ndp_cmd_rsp_status*/
28673     A_UINT32 rsp_status;
28674     A_UINT32 reason_code;
28675     /**
28676      * Unique token Id generated on the initiator/responder
28677      * side used for a NDP session between two NAN devices
28678      */
28679     A_UINT32 ndp_instance_id;
28680     /** NDI mac address of the peer */
28681     wmi_mac_addr peer_ndi_mac_addr;
28682     /** Host can create peer if this entry is TRUE */
28683     A_UINT32 create_peer;
28684 } wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE;
28685 
28686 #define wmi_ndp_responder_rsp_event_fixed_param wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE
28687 
28688 /**
28689  * Active ndp instance id
28690  */
28691 typedef struct {
28692     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_active_ndp_instance_id */
28693     A_UINT32 tlv_header;
28694     /** NDP instance id */
28695     A_UINT32 ndp_instance_id;
28696 } wmi_active_ndp_instance_id_PROTOTYPE;
28697 
28698 #define wmi_active_ndp_instance_id wmi_active_ndp_instance_id_PROTOTYPE
28699 
28700 /**
28701  * NDP end response per ndi
28702  */
28703 typedef struct {
28704     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_rsp_per_ndi */
28705     A_UINT32 tlv_header;
28706     /** Unique id identifying the VDEV */
28707     A_UINT32 vdev_id;
28708     /** Peer MAC addr */
28709     wmi_mac_addr peer_mac_addr;
28710     /** Number of active ndps on this ndi */
28711     A_UINT32 num_active_ndps_on_ndi;
28712 } wmi_ndp_end_rsp_per_ndi_PROTOTYPE;
28713 
28714 #define wmi_ndp_end_rsp_per_ndi wmi_ndp_end_rsp_per_ndi_PROTOTYPE
28715 
28716 /**
28717  * Event response for wmi_ndp_end_req cmd
28718  */
28719 typedef struct {
28720     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_rsp_event_fixed_param */
28721     A_UINT32 tlv_header;
28722     /** Copy of transaction_id received in wmi_ndp_end_req */
28723     A_UINT32 transaction_id;
28724     /** Response status defined in wmi_ndp_cmd_rsp_status*/
28725     A_UINT32 rsp_status;
28726     A_UINT32 reason_code;
28727     /**
28728      * TLV (tag length value) parameters follow the ndp_end_rsp
28729      * structure. The TLV's are:
28730      * wmi_ndp_end_rsp_per_ndi ndp_end_rsp_per_ndis[];
28731      * wmi_active_ndp_instance_id active_ndp_instances_id[];
28732      */
28733 } wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE;
28734 
28735 #define wmi_ndp_end_rsp_event_fixed_param wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE
28736 
28737 /** NAN DATA EVENTS */
28738 
28739 /**
28740  * NDP self role
28741  */
28742 typedef enum {
28743     WMI_NDP_INITIATOR_ROLE,
28744     WMI_NDP_RESPONDER_ROLE,
28745 } wmi_ndp_self_role_PROTOTYPE;
28746 
28747 #define wmi_ndp_self_role wmi_ndp_self_role_PROTOTYPE
28748 
28749 /**
28750  * NDP accept policy
28751  */
28752 typedef enum {
28753     WMI_NDP_ACCEPT_POLICY_NONE,
28754     WMI_NDP_ACCEPT_POLICY_ALL,
28755 } wmi_ndp_accept_policy_PROTOTYPE;
28756 
28757 #define wmi_ndp_accept_policy wmi_ndp_accept_policy_PROTOTYPE
28758 
28759 /**
28760  * Event indication received on the responder side when a NDP Initiator request/
28761  * NDP session is initiated on the Initiator side (self role will be NDP_RESPONDER_ROLE)
28762  *
28763  * Event indication received on the initiator side when a
28764  * NDP responder request on the Initiator side (self role will be NDP_INITIATOR_ROLE)
28765  */
28766 typedef struct {
28767     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_indication_event_fixed_param */
28768     A_UINT32 tlv_header;
28769     /** Unique id identifying the VDEV */
28770     A_UINT32 vdev_id;
28771     /** Self NDP Role defined in wmi_ndp_self_role */
28772     A_UINT32 self_ndp_role;
28773     /** Accept policy defined in wmi_ndp_accept_policy */
28774     A_UINT32 accept_policy;
28775     /** Unique Instance Id corresponding to a service/session. */
28776     A_UINT32 service_instance_id;
28777     /** Discovery MAC addr of the peer/initiator */
28778     wmi_mac_addr peer_discovery_mac_addr;
28779     /** NDI mac address of the peer */
28780     wmi_mac_addr peer_ndi_mac_addr;
28781     /**
28782      * Unique token Id generated on the initiator/responder
28783      * side used for a NDP session between two NAN devices
28784      */
28785     A_UINT32 ndp_instance_id;
28786     /** Number of bytes in TLV wmi_ndp_cfg */
28787     A_UINT32 ndp_cfg_len;
28788     /** Number of bytes in TLV wmi_ndp_app_info */
28789     A_UINT32 ndp_app_info_len;
28790     /** Peer NAN Cipher Suite Shared Key */
28791     A_UINT32 nan_csid;
28792     /** Actual number of bytes in TLV nan_scid */
28793     A_UINT32 nan_scid_len;
28794     /** Self NDI mac address */
28795     wmi_mac_addr self_ndi_mac_addr;
28796     /** Number of bytes in TLV service_id */
28797     A_UINT32 service_id_len;
28798     /** NAN Cipher Suite Capability field */
28799     A_UINT32 nan_csid_cap;
28800     /** GTK protection is required for the NDP */
28801     A_UINT32 nan_gtk_required;
28802     /**
28803      * TLV (tag length value) parameters follow the ndp_indication
28804      * structure. The TLV's are:
28805      * A_UINT8 ndp_cfg[];
28806      * A_UINT8 ndp_app_info[];
28807      * A_UINT8 nan_scid[];
28808      * wmi_ndp_transport_ip_param ndp_transport_ip_param;
28809      * A_UINT8 service_id[service_id_len]; <- holds a single service ID of an
28810      *     indeterminate number of bytes (most likely 6 bytes)
28811      */
28812 } wmi_ndp_indication_event_fixed_param_PROTOTYPE;
28813 
28814 #define wmi_ndp_indication_event_fixed_param wmi_ndp_indication_event_fixed_param_PROTOTYPE
28815 
28816 /**
28817  * Event indication of data confirm is received on both
28818  * initiator and responder side confirming a NDP session
28819  */
28820 typedef struct {
28821     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_confirm_event_fixed_param */
28822     A_UINT32 tlv_header;
28823     /** Unique id identifying the VDEV */
28824     A_UINT32 vdev_id;
28825     /**
28826      * Unique token Id generated on the initiator/responder
28827      * side used for a NDP session between two NAN devices
28828      */
28829     A_UINT32 ndp_instance_id;
28830     /** NDI mac address of the peer (required to derive target ipv6 address) */
28831     wmi_mac_addr peer_ndi_mac_addr;
28832     /** Response Code defined in wmi_ndp_rsp_code */
28833     A_UINT32 rsp_code;
28834     /** Number of bytes in TLV wmi_ndp_cfg */
28835     A_UINT32 ndp_cfg_len;
28836     /** Number of bytes in TLV wmi_ndp_app_info */
28837     A_UINT32 ndp_app_info_len;
28838     /** Reason Code */
28839     A_UINT32 reason_code;
28840     /** Number of active ndps on this peer */
28841     A_UINT32 num_active_ndps_on_peer;
28842     /** Number of channels on this peer */
28843     A_UINT32 num_ndp_channels;
28844     /**
28845      * TLV (tag length value) parameters follow the ndp_confirm
28846      * structure. The TLV's are:
28847      * A_UINT8 ndp_cfg[];
28848      * A_UINT8 ndp_app_info[];
28849      * wmi_channel ndp_channel_list[];
28850      * A_UINT32 nss_list[]; // Nss indexing should match with channel indexing,
28851      *                      // since Nss is associated with the channel
28852      * wmi_ndp_transport_ip_param ndp_transport_ip_param;
28853      */
28854 } wmi_ndp_confirm_event_fixed_param_PROTOTYPE;
28855 
28856 #define wmi_ndp_confirm_event_fixed_param wmi_ndp_confirm_event_fixed_param_PROTOTYPE
28857 
28858 /**
28859  * Event indication received on the initiator/responder side terminating a NDP session
28860  */
28861 typedef struct {
28862     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_indication */
28863     A_UINT32 tlv_header;
28864     /** type defined in  wmi_ndp_end_type */
28865     A_UINT32 type;
28866     /** Unique id identifying the VDEV */
28867     A_UINT32 vdev_id;
28868     /** reason_code  defined in  wmi_ndp_end_reason_code */
28869     A_UINT32 reason_code;
28870     /** NDP instance id */
28871     A_UINT32 ndp_instance_id;
28872     /** NDI MAC addr of the peer */
28873     wmi_mac_addr peer_ndi_mac_addr;
28874     /** Number of active ndps on this peer */
28875     A_UINT32 num_active_ndps_on_peer;
28876 } wmi_ndp_end_indication_PROTOTYPE;
28877 
28878 #define wmi_ndp_end_indication wmi_ndp_end_indication_PROTOTYPE
28879 
28880 typedef struct
28881 {
28882     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndl_schedule_update_fixed_param */
28883     /** Unique id identifying the VDEV */
28884     A_UINT32 vdev_id;
28885    /** peer MAC address */
28886     wmi_mac_addr peer_macaddr;
28887    /** Flags:
28888     *  Bit   0    -> Nss updated
28889     *  Bit   1    -> channel list updated
28890     *  Bits  2-31 -> Reserved
28891     */
28892     A_UINT32 flags;
28893     /** num of channels */
28894     A_UINT32 num_channels;
28895     /** num of ndp instances */
28896     A_UINT32 num_ndp_instances;
28897     /**
28898      * TLV (tag length value) parameters follow the ndl_schedule_update
28899      * structure. The TLV's are:
28900      * A_UINT32 ndp_instance_list[];
28901      * wmi_channel ndl_channel_list[];
28902      * A_UINT32 nss_list[]; // Nss indexing should match with channel indexing,
28903      *                      // since Nss is associate with a channel
28904      */
28905 } wmi_ndl_schedule_update_fixed_param_PROTOTYPE;
28906 
28907 #define wmi_ndl_schedule_update_fixed_param wmi_ndl_schedule_update_fixed_param_PROTOTYPE
28908 
28909 typedef struct {
28910     A_UINT32 tlv_header;
28911     A_UINT32 num_data;
28912     /* followed by WMITLV_TAG_ARRAY_BYTE */
28913 } wmi_diag_data_container_event_fixed_param;
28914 
28915 enum {
28916     WMI_PDEV_PARAM_TXPOWER_REASON_NONE = 0,
28917     WMI_PDEV_PARAM_TXPOWER_REASON_SAR,
28918     WMI_PDEV_PARAM_TXPOWER_REASON_MAX
28919 };
28920 
28921 #define PDEV_PARAM_TXPOWER_VALUE_MASK  0x000000FF
28922 #define PDEV_PARAM_TXPOWER_VALUE_SHIFT 0
28923 
28924 #define PDEV_PARAM_TXPOWER_REASON_MASK  0x0000FF00
28925 #define PDEV_PARAM_TXPOWER_REASON_SHIFT 8
28926 
28927 #define SET_PDEV_PARAM_TXPOWER_VALUE(txpower_param, value)     \
28928     ((txpower_param) &= ~PDEV_PARAM_TXPOWER_VALUE_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_VALUE_SHIFT))
28929 
28930 #define SET_PDEV_PARAM_TXPOWER_REASON(txpower_param, value)     \
28931     ((txpower_param) &= ~PDEV_PARAM_TXPOWER_REASON_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_REASON_SHIFT))
28932 
28933 #define GET_PDEV_PARAM_TXPOWER_VALUE(txpower_param)     \
28934     (((txpower_param) & PDEV_PARAM_TXPOWER_VALUE_MASK) >> PDEV_PARAM_TXPOWER_VALUE_SHIFT)
28935 
28936 #define GET_PDEV_PARAM_TXPOWER_REASON(txpower_param)     \
28937     (((txpower_param) & PDEV_PARAM_TXPOWER_REASON_MASK) >> PDEV_PARAM_TXPOWER_REASON_SHIFT)
28938 
28939 #define PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK 0x00000001
28940 #define PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT 0
28941 
28942 #define SET_PDEV_SMART_CHAINMASK_SCHEME_DECISION(param, value) \
28943     do { \
28944         (param) &= ~PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK; \
28945         (param) |= (value) << PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT; \
28946     } while (0)
28947 
28948 #define GET_PDEV_SMART_CHAINMASK_SCHEME_DECISION(param)     \
28949     (((param) & PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK) >> PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT)
28950 
28951 /**
28952  * This command is sent from WLAN host driver to firmware to
28953  * notify the current modem power state. Host would receive a
28954  * message from modem when modem is powered on. Host driver
28955  * would then send this command to firmware. Firmware would then
28956  * power on WCI-2 (UART) interface for LTE/MWS Coex.
28957  *
28958  * This command is only applicable for APQ platform which has
28959  * modem on the platform. If firmware doesn't support MWS Coex,
28960  * this command can be dropped by firmware.
28961  *
28962  * This is a requirement from modem team that WCN can't toggle
28963  * UART before modem is powered on.
28964  */
28965 typedef struct {
28966     /** TLV tag and len; tag equals
28967      *  WMITLV_TAG_STRUC_wmi_modem_power_state_cmd_param */
28968     A_UINT32 tlv_header;
28969 
28970     /** Modem power state parameter */
28971     A_UINT32 modem_power_state;
28972 } wmi_modem_power_state_cmd_param;
28973 
28974 enum {
28975     WMI_MODEM_STATE_OFF = 0,
28976     WMI_MODEM_STATE_ON
28977 };
28978 
28979 /**
28980  * This command is sent from WLAN host driver to firmware to
28981  * notify the updated Specific Absorption Rate (SAR) limits.
28982  * A critical regulation for FCC compliance, OEMs require methods to set
28983  * limits on TX power of WLAN/WWAN.
28984  * Host would receive instructions on what to set the limits per
28985  * band/chain/modulation to, it would then interpret and send the limits
28986  * to FW using this WMI message.
28987  * Since it is possible to have too many commands to fit into one message,
28988  * FW will keep receiving the messages, until it finds one with
28989  * commit_limits = 1, at which point it will apply all the received
28990  * specifications.
28991  */
28992 typedef struct {
28993     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_limits_cmd_param */
28994     A_UINT32 tlv_header;
28995 
28996     /** when set to WMI_SAR_FEATURE_ON_*, enable SAR feature
28997      *  with BDF (SET_0 to 4) or WMI
28998      * if set to WMI_SAR_FEATURE_OFF, disable feature;
28999      * if set to WMI_SAR_FEATURE_NO_CHANGE, do not alter state of feature;
29000      */
29001     A_UINT32 sar_enable;
29002 
29003     /** number of items in sar_limits[] */
29004     A_UINT32 num_limit_rows;
29005 
29006     /** once received and is set to 1, FW will calculate the power limits
29007      * and send set_power command to apply them.
29008      * Otherwise just update local values stored in FW until a future msg
29009      * with commit_limits=1 arrives.
29010      */
29011     A_UINT32 commit_limits;
29012 
29013     /**
29014      * TLV (tag length value) parameters follow the sar_limit_cmd_row
29015      * structure. The TLV's are:
29016      * wmi_sar_limit_cmd_row sar_limits[];
29017      */
29018 } wmi_sar_limits_cmd_fixed_param;
29019 
29020 enum wmi_sar_feature_state_flags {
29021     WMI_SAR_FEATURE_OFF = 0,
29022     WMI_SAR_FEATURE_ON_SET_0,
29023     WMI_SAR_FEATURE_ON_SET_1,
29024     WMI_SAR_FEATURE_ON_SET_2,
29025     WMI_SAR_FEATURE_ON_SET_3,
29026     WMI_SAR_FEATURE_ON_SET_4,
29027     WMI_SAR_FEATURE_NO_CHANGE,
29028     WMI_SAR_FEATURE_ON_USER_DEFINED,
29029     WMI_SAR_FEATURE_ON_SAR_V2_0,
29030     WMI_SAR_FEATURE_ON_SAR_V3,
29031 };
29032 
29033 typedef struct {
29034     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_limit_cmd_row */
29035 
29036     /** Current values: WMI_SAR_2G_ID, WMI_SAR_5G_ID. Can be extended by adding
29037      * new band_id values .
29038      */
29039     A_UINT32 band_id;
29040 
29041     A_UINT32 chain_id;
29042 
29043     /** Current values: WMI_SAR_MOD_CCK, WMI_SAR_MOD_OFDM */
29044     A_UINT32 mod_id;
29045 
29046     /**
29047      * To be backwards-compatible with older code use a union with
29048      * limit_value & limit_index as alternate names / interpretations
29049      * of the same message information element.
29050      * The older code still uses limit_value, while the new code will
29051      * use limit_index.
29052      * The interpretation of the field as value or index depends on
29053      * WMI_SAR_FEATURE_ON_*
29054      * WMI_SAR_FEATURE_ON_SAR_V2_0 will use it as index, other case
29055      * still use it as value.
29056      */
29057     union {
29058         /** actual power limit value, in steps of 0.5 dBm */
29059         A_UINT32 limit_value;
29060         A_UINT32 limit_index;
29061     };
29062 
29063     /** in case the OEM doesn't care about one of the qualifiers from above,
29064      * the bit for that qualifier within the validity_bitmap can be set to 0
29065      * so that limit is applied to all possible cases of this qualifier
29066      * (i.e. if a qualifier's validity_bitmap flag is 0, the qualifier is
29067      * treated as a wildcard).
29068      * Current masks:
29069      *     WMI_SAR_BAND_ID_VALID_MASK
29070      *     WMI_SAR_CHAIN_ID_VALID_MASK
29071      *     WMI_SAR_MOD_ID_VALID_MASK
29072      * Example: if !WMI_IS_SAR_MOD_ID_VALID(bitmap),
29073      *     it means apply same limit_value to both WMI_SAR_MOD_CCK and
29074      *     WMI_SAR_MOD_OFDM cases.
29075      */
29076     A_UINT32 validity_bitmap;
29077 } wmi_sar_limit_cmd_row;
29078 
29079 enum wmi_sar_band_id_flags {
29080     WMI_SAR_2G_ID = 0,
29081     WMI_SAR_5G_ID
29082 };
29083 
29084 enum wmi_sar_mod_id_flags {
29085     WMI_SAR_MOD_CCK = 0,
29086     WMI_SAR_MOD_OFDM
29087 };
29088 
29089 /**
29090  * This message is sent from FW to WLAN host to inform the host of the
29091  * updated Specific Absorption Rate (SAR) limits currently in use.
29092  */
29093 typedef struct {
29094     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limits_event_param */
29095     A_UINT32 tlv_header;
29096 
29097     /** when set to WMI_SAR_FEATURE_ON_*, SAR feature is enabled
29098      *  with BDF (SET_0 to 4) or WMI
29099      * if set to WMI_SAR_FEATURE_OFF, feature is disabled;
29100      */
29101     A_UINT32 sar_enable;
29102 
29103     /**
29104      * number of items in sar_limits[].
29105      *  used when sar_enable == WMI_SAR_FEATURE_ON_USER_DEFINED.
29106      *  Should be zero if any of the BDF sets is activated.
29107      */
29108     A_UINT32 num_limit_rows;
29109 
29110     /**
29111      * TLV (tag length value) parameters follow the sar_get_limit_event_row
29112      * structure. The TLV's are:
29113      * wmi_sar_get_limit_event_row sar_limits[num_limit_rows];
29114      */
29115 } wmi_sar_get_limits_event_fixed_param;
29116 
29117 typedef struct {
29118     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limit_event_row */
29119 
29120     /** Current values: WMI_SAR_2G_ID, WMI_SAR_5G_ID. Can be extended by adding
29121      * new band_id values .
29122      */
29123     A_UINT32 band_id;
29124 
29125     A_UINT32 chain_id;
29126 
29127     /** Current values: WMI_SAR_MOD_CCK, WMI_SAR_MOD_OFDM */
29128     A_UINT32 mod_id;
29129 
29130     /** actual power limit value, in steps of 0.5 dBm */
29131     A_UINT32 limit_value;
29132 } wmi_sar_get_limit_event_row;
29133 
29134 #define WMI_SAR_BAND_ID_VALID_MASK      (0x1)
29135 #define WMI_SAR_CHAIN_ID_VALID_MASK     (0x2)
29136 #define WMI_SAR_MOD_ID_VALID_MASK       (0x4)
29137 
29138 #define WMI_SET_SAR_BAND_ID_VALID(bitmap)    ((bitmap) |= WMI_SAR_BAND_ID_VALID_MASK)
29139 #define WMI_SET_SAR_CHAIN_ID_VALID(bitmap)   ((bitmap) |= WMI_SAR_CHAIN_ID_VALID_MASK)
29140 #define WMI_SET_SAR_MOD_ID_VALID(bitmap)     ((bitmap) |= WMI_SAR_MOD_ID_VALID_MASK)
29141 
29142 #define WMI_IS_SAR_BAND_ID_VALID(bitmap)     ((bitmap) & WMI_SAR_BAND_ID_VALID_MASK)
29143 #define WMI_IS_SAR_CHAIN_ID_VALID(bitmap)    ((bitmap) & WMI_SAR_CHAIN_ID_VALID_MASK)
29144 #define WMI_IS_SAR_MOD_ID_VALID(bitmap)      ((bitmap) & WMI_SAR_MOD_ID_VALID_MASK)
29145 
29146 /**
29147  * This command is sent from WLAN host driver to firmware to
29148  * get current Specific Absorption Rate (SAR) limits status from firmware.
29149  * The command does not require any parameters as of now.
29150  */
29151 typedef struct {
29152     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limits_cmd_param */
29153     A_UINT32 tlv_header;
29154     /** currently no parameters are required. Reserved bit field for future use added */
29155     /*  All bits need to be set to 0 while it is a reserved field. */
29156     A_UINT32 reserved;
29157 } wmi_sar_get_limits_cmd_fixed_param;
29158 
29159 #define WMI_ROAM_AUTH_STATUS_CONNECTED       0x1 /** connected, but not authenticated */
29160 #define WMI_ROAM_AUTH_STATUS_AUTHENTICATED   0x2 /** connected and authenticated */
29161 
29162 /** WMI_ROAM_SYNCH_EVENT: roam synch event triggering the host propagation logic
29163     generated whenever firmware roamed to new AP silently and
29164     (a) If the host is awake, FW sends the event to the host immediately .
29165     (b) If host is in sleep then either
29166         (1) FW waits until  host sends WMI_PDEV_RESUME_CMDID or WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID
29167     command to FW (part of host wake up sequence  from low power mode) before sending the event host.
29168         (2) data/mgmt frame is received from roamed AP, which needs to return to host
29169 */
29170 
29171 #define GTK_OFFLOAD_KCK_EXTENDED_BYTES 32
29172 
29173 typedef struct {
29174     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material */
29175     A_UINT32 tlv_header;
29176 
29177     A_UINT8  kck[GTK_OFFLOAD_KCK_BYTES]; /* EAPOL-Key Key Confirmation Key (KCK) */
29178     A_UINT8  kek[GTK_OFFLOAD_KEK_BYTES]; /* EAPOL-Key Key Encryption Key (KEK) */
29179     A_UINT8  replay_counter[GTK_REPLAY_COUNTER_BYTES];
29180 } wmi_key_material;
29181 
29182 typedef struct {
29183     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material_ext */
29184     A_UINT32 tlv_header;
29185     /*
29186      * key_buffer contains kck,kck2,kek,kek2,replay counter, in order.
29187      * If both the below kck_len and kek_len fields are 0x0, the split
29188      * between kck vs. kek should be inferred based on akmp.
29189      */
29190     A_UINT8  key_buffer[GTK_OFFLOAD_KEK_EXTENDED_BYTES+GTK_OFFLOAD_KCK_EXTENDED_BYTES+GTK_REPLAY_COUNTER_BYTES];
29191     /* length of kck in key_buffer */
29192     A_UINT32 kck_len;
29193     /* length of kek in key_buffer */
29194     A_UINT32 kek_len;
29195 } wmi_key_material_ext;
29196 
29197 typedef struct {
29198     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_event_fixed_param  */
29199     /** Unique id identifying the VDEV on which roaming is done by firmware */
29200     A_UINT32 vdev_id;
29201     /** auth_status: connected or authorized */
29202     A_UINT32 auth_status;
29203     /** roam_reason:
29204      * bits 0-3  roam trigger reason LSbs - see WMI_ROAM_TRIGGER_REASON_XXX
29205      * bits 4-5  subnet status - see WMI_ROAM_SUBNET_CHANGE_STATUS_XXX.
29206      * bit  6    HW mode status, set 1 to indicate host to schedule
29207      *           HW mode change, see WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE.
29208      * bit  7    0x1 to show bits 8-15 are valid
29209      * bits 8-15 full WMI_ROAM_TRIGGER_REASON_ID/WMI_ROAM_TRIGGER_EXT_REASON_ID
29210      *           since 4 bits are not enough.
29211      */
29212     A_UINT32 roam_reason;
29213     /** associated AP's RSSI calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI. not valid if roam_reason is BMISS */
29214     A_UINT32 rssi;
29215     /** MAC address of roamed AP */
29216     wmi_mac_addr bssid;     /* BSSID */
29217     /** whether the frame is beacon or probe rsp */
29218     A_UINT32 is_beacon;
29219     /** the length of beacon/probe rsp */
29220     A_UINT32 bcn_probe_rsp_len;
29221     /** the length of reassoc rsp */
29222     A_UINT32 reassoc_rsp_len;
29223     /** the length of reassoc req */
29224     A_UINT32 reassoc_req_len;
29225     /**
29226      * maximum allowed Tx power (in dBm) for this connection.
29227      * max_allowed_tx_power = 0 dBm means value is not specified.
29228      */
29229     A_INT32 max_allowed_tx_power;
29230     /** unique id to identify mac's TSF register */
29231     A_UINT32 mac_tsf_id;
29232     /** ignore mac_tsf_id unless mac_tsf_id_valid is set */
29233     A_UINT32 mac_tsf_id_valid;
29234     /**
29235      * TLV (tag length value) parameters follows roam_synch_event
29236      * The TLV's are:
29237      *     A_UINT8 bcn_probe_rsp_frame[bcn_probe_resp_len];
29238      *     A_UINT8 reassoc_rsp_frame[reassoc_rsp_len];
29239      *     wmi_channel chan;
29240      *     wmi_key_material key[];
29241      *     A_UINT32 status[]; subnet changed status not being used currently.
29242      *         Will pass the information using roam_status.
29243      *     A_UINT8 reassoc_req_frame[reassoc_req_len];
29244      *     wmi_pdev_hw_mode_transition_event_fixed_param
29245      *         hw_mode_transition_fixed_param[];
29246      *     wmi_pdev_set_hw_mode_response_vdev_mac_entry
29247      *         wmi_pdev_set_hw_mode_response_vdev_mac_mapping[];
29248      *     wmi_roam_fils_synch_tlv_param roam_fils_synch_info[];
29249      *     wmi_key_material_ext key_ext[];
29250      *     wmi_roam_pmk_cache_synch_tlv_param roam_pmk_cache_synch_info[];
29251      *     wmi_pdev_band_to_mac mac_freq_mapping[];
29252      */
29253 } wmi_roam_synch_event_fixed_param;
29254 
29255 /**
29256  * The WMI_ROAM_SYNCH_FRAME_EVENTID message is used in conjunction with the
29257  * WMI_ROAM_SYNCH_EVENTID message.  The former will be sent 1st followed by
29258  * the latter for cases where the WMI_ROAM_SYNCH_EVENTID message size would
29259  * exceed 2K.  The more_frag field in the WMI_ROAM_SYNCH_FRAME_EVENTID informs
29260  * the host whether more WMI_ROAM_SYNCH_FRAME_EVENTID messages would follow;
29261  * after the WMI_ROAM_SYNCH_FRAME_EVENTID messages the target sends the
29262  * WMI_ROAM_SYNCH_EVENTID with bcn_probe_rsp_len, reassoc_rsp_len, and
29263  * reassoc_rsp_len set to 0.
29264  */
29265 typedef struct {
29266     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_frame_event_fixed_param  */
29267     /** Unique id identifying the VDEV on which roaming is done by firmware */
29268     A_UINT32 vdev_id;
29269     /** More frags to follow? */
29270     A_UINT32 more_frag;
29271     /** whether the frame is beacon or probe rsp */
29272     A_UINT32 is_beacon;
29273     /** the length of beacon/probe rsp */
29274     A_UINT32 bcn_probe_rsp_len;
29275     /** the length of reassoc rsp */
29276     A_UINT32 reassoc_rsp_len;
29277     /** the length of reassoc req */
29278     A_UINT32 reassoc_req_len;
29279     A_INT32 bcn_probe_resp_rssi; /* RSSI units dBm */
29280     /**
29281      * TLV (tag length value) parameters follows roam_synch_event
29282      * The TLV's are:
29283      *     A_UINT8 bcn_probe_rsp_frame[bcn_probe_rsp_len];
29284      *     A_UINT8 reassoc_rsp_frame[reassoc_rsp_len];
29285      *     A_UINT8 reassoc_req_frame[reassoc_req_len];
29286      */
29287 } wmi_roam_synch_frame_event_fixed_param;
29288 
29289 typedef struct {
29290     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_frame_event_fixed_param  */
29291     /** Unique id identifying the VDEV on which roaming is done by firmware */
29292     A_UINT32 vdev_id;
29293     /* Exact frame length without considering 4 byte alignment */
29294     A_UINT32 frame_length;
29295     A_INT32  rssi; /* Units in dBm */
29296     /* The frequency on which to transmit. */
29297     A_UINT32 primary_channel_freq; /* MHz units */
29298     /**
29299      * TLV (tag length value) parameters follows roam_frame_event
29300      * The TLV's are:
29301      *     A_UINT8 frame[frame_length];
29302      */
29303 } wmi_roam_frame_event_fixed_param;
29304 
29305 #define WMI_PEER_ESTIMATED_LINKSPEED_INVALID    0xFFFFFFFF
29306 
29307 typedef struct {
29308     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_get_estimated_linkspeed_cmd_fixed_param */
29309     A_UINT32 tlv_header;
29310     /** MAC address of the peer for which the estimated link speed is required. */
29311     wmi_mac_addr peer_macaddr;
29312     /* Set to 1 only if vdev_id field is valid */
29313     A_UINT32 valid_vdev_id;
29314     /* VDEV to which the peer belongs to */
29315     A_UINT32 vdev_id;
29316 } wmi_peer_get_estimated_linkspeed_cmd_fixed_param;
29317 
29318 typedef struct {
29319     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_estimated_linkspeed_event_fixed_param */
29320     A_UINT32 tlv_header;
29321     /** MAC address of the peer for which the estimated link speed is required.
29322      */
29323     wmi_mac_addr peer_macaddr;
29324   /* Estimated link speed in kbps.
29325    * When est_linkspeed_kbps is not valid, the value is set to WMI_PEER_ESTIMATED_LINKSPEED_INVALID.
29326    */
29327     A_UINT32 est_linkspeed_kbps;
29328     /* Set to 1 only if vdev_id field is valid */
29329     A_UINT32 valid_vdev_id;
29330     /* VDEV to which the peer belongs to */
29331     A_UINT32 vdev_id;
29332 } wmi_peer_estimated_linkspeed_event_fixed_param;
29333 
29334 typedef struct {
29335     A_UINT32 tlv_header; /* TLV tag and len; tag equals */
29336     /* vdev ID */
29337     A_UINT32 vdev_id;
29338     A_UINT32 data_len; /** length in byte of data[]. */
29339 /* This structure is used to send REQ binary blobs
29340  * from application/service to firmware where Host drv is pass through .
29341  * Following this structure is the TLV:
29342  *     A_UINT8 data[]; <-- length in byte given by field data_len.
29343  *     A_UINT32 vdev_id_bitmap[];
29344  *         This array is present and non-zero length in MLO case, stats should
29345  *         only be provided from the vdev_id_bitmap in the bitmap when it is
29346  *         present.
29347  */
29348 } wmi_req_stats_ext_cmd_fixed_param;
29349 
29350 typedef struct {
29351     /** TLV tag and len; tag equals
29352      *  WMITLV_TAG_STRUC_wmi_partner_link_stats */
29353     A_UINT32 tlv_header;
29354     A_UINT32 vdev_id;
29355     A_UINT32 data_length; /* length of the stats for this vdev */
29356     A_UINT32 offset; /* offset of the stats from partner_link_data for this vdev */
29357 } wmi_partner_link_stats;
29358 
29359 typedef struct {
29360     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats1_event_fix_param */
29361     A_UINT32 vdev_id; /** vdev ID */
29362     A_UINT32 data_len; /** length in byte of data[]. */
29363     /* This structure is used to send REQ binary blobs
29364      * from firmware to application/service where Host drv is pass through .
29365      * Following this structure is the TLV:
29366      *     A_UINT8 data[]; <-- length in byte given by field data_len.
29367      */
29368     /* This structure is used to send information of partner links.
29369      * Following this structure is the TLV:
29370      *     wmi_partner_link_stats partner_link_stats[];
29371      */
29372     /* This structure is used to send REQ binary blobs of stats of partner
29373      * links from firmware to application/service where Host drv is pass
29374      * through.
29375      * Following this structure is the TLV partner_link_stats:
29376      *     A_UINT8 partner_link_stats_data[]; <-- length and offset in byte
29377      *                                            units given by TLV
29378      *                                            wmi_partner_link_stats.
29379      */
29380 } wmi_stats_ext_event_fixed_param;
29381 
29382 typedef enum {
29383     /** Default: no replay required. */
29384     WMI_PEER_DELETE_NO_REPLAY = 0,
29385     /**
29386       * Replay requested due to UMAC hang during Peer delete.
29387       * Replay done by Host SW after MLO UMAC SSR recovered the UMAC.
29388       */
29389     WMI_PEER_DELETE_REPLAY_FOR_UMAC,
29390 } WMI_PEER_DELETE_REPLAY_T;
29391 
29392 typedef struct {
29393     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_resp_event_fixed_param  */
29394     /** unique id identifying the VDEV, generated by the caller */
29395     A_UINT32 vdev_id;
29396     /** peer MAC address */
29397     wmi_mac_addr peer_macaddr;
29398     /** WMI_PEER_DELETE_REPLAY_T */
29399     A_UINT32 replay_type;
29400 } wmi_peer_delete_resp_event_fixed_param;
29401 
29402 typedef struct {
29403     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_all_peer_resp_event_fixed_param */
29404     /** unique id identifying the VDEV, generated by the caller */
29405     A_UINT32 vdev_id;
29406     /* Status of peer delete all command */
29407     /*
29408      * Values for Status:
29409      *  0 - OK; command successful
29410      *  1 - EINVAL; Requested invalid vdev_id
29411      *  2 - EFAILED; Delete all peer failed
29412      */
29413     A_UINT32 status;
29414     /** WMI_PEER_DELETE_REPLAY_T */
29415     A_UINT32 replay_type;
29416 } wmi_vdev_delete_all_peer_resp_event_fixed_param;
29417 
29418 typedef struct {
29419     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_state_event_fixed_param */
29420     A_UINT32 tlv_header;
29421     A_UINT32 vdev_id; /* vdev ID */
29422     /* MAC address of the peer for which the estimated link speed is required.*/
29423     wmi_mac_addr peer_macaddr;
29424     A_UINT32 state; /* peer state */
29425 } wmi_peer_state_event_fixed_param;
29426 
29427 typedef struct {
29428     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_conf_event_fixed_param */
29429     A_UINT32 tlv_header;
29430     /* unique id identifying the VDEV, generated by the caller */
29431     A_UINT32 vdev_id;
29432     /* peer MAC address */
29433     wmi_mac_addr peer_macaddr;
29434     /* status
29435      * 0: ok
29436      * 1: fail - peer not present
29437      */
29438     A_UINT32 status;
29439 } wmi_peer_assoc_conf_event_fixed_param;
29440 
29441 typedef struct {
29442     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_conf_event_fixed_param */
29443     A_UINT32 tlv_header;
29444     /* unique id identifying the VDEV, generated by the caller */
29445     A_UINT32 vdev_id;
29446     /* peer MAC address */
29447     wmi_mac_addr peer_macaddr;
29448     /* 0: OK.
29449      * 1: FAIL - same bss peer exist already. */
29450     A_UINT32 status;
29451 } wmi_peer_create_conf_event_fixed_param;
29452 
29453 enum {
29454     WMI_2G4_HT40_OBSS_SCAN_PASSIVE = 0,    /** scan_type: passive */
29455     WMI_2G4_HT40_OBSS_SCAN_ACTIVE, /** scan_type: active */
29456 };
29457 
29458 typedef struct {
29459     /**
29460      * TLV tag and len;
29461      * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_enable_cmd_fixed_param
29462      */
29463     A_UINT32 tlv_header;
29464     A_UINT32 vdev_id;
29465     /**
29466      * active or passive. if active all the channels are actively scanned.
29467      *  if passive then all the channels are passively scanned
29468      */
29469     A_UINT32 scan_type;
29470     /**
29471      * FW can perform multiple scans with in a  OBSS scan interval.
29472      * For each scan,
29473      *  if the scan is passive then obss_scan_passive_dwell is minimum dwell to be used for each channel  ,
29474      *  if the scan is active then obss_scan_active_dwell is minimum dwell to be used for each channel .
29475      *   The unit for these 2 parameters is TUs.
29476      */
29477     A_UINT32 obss_scan_passive_dwell;
29478     A_UINT32 obss_scan_active_dwell;
29479     /**
29480      * OBSS scan interval . FW needs to perform one or more OBSS scans within this interval and fulfill the
29481      *  both min and total per channel dwell time requirement
29482      */
29483     A_UINT32 bss_channel_width_trigger_scan_interval;
29484     /**
29485      * FW can perform multiple scans with in a  OBSS scan interval.
29486      * For each scan,
29487      * the total per channel dwell time across all scans with in OBSS scan interval should be
29488      * atleast obss_scan_passive_total_per channel for passive scas and obss_scan_active_total_per channel
29489      * for active scans and ,
29490      *   The unit for these 2 parameters is TUs.
29491      */
29492     A_UINT32 obss_scan_passive_total_per_channel;
29493     A_UINT32 obss_scan_active_total_per_channel;
29494     A_UINT32 bss_width_channel_transition_delay_factor; /** parameter to check exemption from scan */
29495     A_UINT32 obss_scan_activity_threshold; /** parameter to check exemption from scan */
29496     /** following two parameters used by FW to fill IEs when sending 20/40 coexistence action frame to AP */
29497     A_UINT32 forty_mhz_intolerant; /** STA 40M bandwidth intolerant capability */
29498     A_UINT32 current_operating_class; /** STA current operating class */
29499     /** length of 2.4GHz channel list to scan at, channel number list in tlv->channels[] */
29500     A_UINT32 channel_len;
29501     /** length of optional ie data to append to probe request when active scan, ie data in tlv->ie_field[] */
29502     A_UINT32 ie_len;
29503 
29504 /**
29505  * TLV (tag length value) parameters following the fixed param structure
29506  *     A_UINT8 channels[channel_len]; // channel numbers
29507  *     A_UINT8 ie_field[ie_len];
29508  *     A_UINT32 chan_freqs[channel_len] // in MHz
29509  */
29510 } wmi_obss_scan_enable_cmd_fixed_param;
29511 
29512 typedef struct {
29513     /**
29514     * TLV tag and len;
29515     * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_disalbe_cmd_fixed_param
29516     */
29517     A_UINT32 tlv_header;
29518     A_UINT32 vdev_id;
29519 } wmi_obss_scan_disable_cmd_fixed_param;
29520 
29521 typedef struct {
29522     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_prb_rsp_tx_status_event_fixed_param */
29523     A_UINT32 tlv_header;
29524     /** unique id identifying the VDEV */
29525     A_UINT32 vdev_id;
29526     /** prb rsp tx status, values defined in enum WMI_FRAME_TX_STATUS */
29527     A_UINT32 tx_status;
29528 } wmi_offload_prb_rsp_tx_status_event_fixed_param;
29529 
29530 typedef enum {
29531     WMI_FRAME_TX_OK,            /* frame tx ok */
29532     WMI_FRAME_TX_XRETRY,        /* excessivley retried */
29533     WMI_FRAME_TX_DROP,          /* frame dropped by FW due to resources */
29534     WMI_FRAME_TX_FILTERED,      /* frame filtered by hardware */
29535 } WMI_FRAME_TX_STATUS;
29536 
29537 /**
29538  * This command is sent from WLAN host driver to firmware to
29539  * request firmware to send the latest channel avoidance range
29540  * to host.
29541  *
29542  * This command is only applicable for APQ platform which has
29543  * modem on the platform. If firmware doesn't support MWS Coex,
29544  * this command can be dropped by firmware.
29545  *
29546  * Host would send this command to firmware to request a channel
29547  * avoidance information update.
29548  */
29549 typedef struct {
29550     /** TLV tag and len; tag equals
29551      *  WMITLV_TAG_STRUC_wmi_chan_avoid_update_cmd_param */
29552     A_UINT32 tlv_header;
29553 } wmi_chan_avoid_update_cmd_param;
29554 
29555 /* ExtScan operation mode */
29556 typedef enum {
29557    WMI_EXTSCAN_MODE_NONE          = 0x0000,
29558    WMI_EXTSCAN_MODE_START         = 0x0001, /* ExtScan/TableMonitoring operation started */
29559    WMI_EXTSCAN_MODE_STOP          = 0x0002, /* ExtScan/TableMonitoring operation stopped */
29560    WMI_EXTSCAN_MODE_IGNORED       = 0x0003, /* ExtScan command ignored due to error */
29561 } wmi_extscan_operation_mode;
29562 
29563 /* Channel Mask */
29564 typedef enum {
29565    WMI_CHANNEL_BAND_UNSPECIFIED = 0x0000,
29566    WMI_CHANNEL_BAND_24          = 0x0001, /* 2.4 channel */
29567    WMI_CHANNEL_BAND_5_NON_DFS   = 0x0002, /* 5G Channels (No DFS channels) */
29568    WMI_CHANNEL_BAND_DFS         = 0x0004, /* DFS channels */
29569 } wmi_channel_band_mask;
29570 
29571 typedef enum {
29572     WMI_EXTSCAN_CYCLE_STARTED_EVENT     = 0x0001,
29573     WMI_EXTSCAN_CYCLE_COMPLETED_EVENT   = 0x0002,
29574     WMI_EXTSCAN_BUCKET_STARTED_EVENT    = 0x0004,
29575     WMI_EXTSCAN_BUCKET_COMPLETED_EVENT  = 0x0008,
29576     WMI_EXTSCAN_BUCKET_FAILED_EVENT     = 0x0010,
29577     WMI_EXTSCAN_BUCKET_OVERRUN_EVENT    = 0x0020,
29578     WMI_EXTSCAN_THRESHOLD_NUM_SCANS     = 0x0040,
29579     WMI_EXTSCAN_THRESHOLD_PERCENT       = 0x0080,
29580 
29581     WMI_EXTSCAN_EVENT_MAX               = 0x8000
29582 } wmi_extscan_event_type;
29583 
29584 #define WMI_EXTSCAN_CYCLE_EVENTS_MASK    (WMI_EXTSCAN_CYCLE_STARTED_EVENT   | \
29585                                           WMI_EXTSCAN_CYCLE_COMPLETED_EVENT)
29586 
29587 #define WMI_EXTSCAN_BUCKET_EVENTS_MASK   (WMI_EXTSCAN_BUCKET_STARTED_EVENT   | \
29588                                           WMI_EXTSCAN_BUCKET_COMPLETED_EVENT | \
29589                                           WMI_EXTSCAN_BUCKET_FAILED_EVENT    | \
29590                                           WMI_EXTSCAN_BUCKET_OVERRUN_EVENT)
29591 
29592 typedef enum {
29593     WMI_EXTSCAN_NO_FORWARDING         = 0x0000,
29594     WMI_EXTSCAN_FORWARD_FRAME_TO_HOST = 0x0001
29595 } wmi_extscan_forwarding_flags;
29596 
29597 typedef enum {
29598     WMI_EXTSCAN_USE_MSD                 = 0x0001,    /* Use Motion Sensor Detection */
29599     WMI_EXTSCAN_EXTENDED_BATCHING_EN    = 0x0002,    /* Extscan LPASS extended batching feature is supported and enabled */
29600 } wmi_extscan_configuration_flags;
29601 
29602 typedef enum {
29603     WMI_EXTSCAN_BUCKET_CACHE_RESULTS     = 0x0001,   /* Cache the results of bucket whose configuration flags has this bit set */
29604     WMI_EXTSCAN_REPORT_EVENT_CONTEXT_HUB = 0x0002,   /* Report ext scan results to context hub or not. */
29605 } wmi_extscan_bucket_configuration_flags;
29606 
29607 typedef enum {
29608     WMI_EXTSCAN_STATUS_OK    = 0,
29609     WMI_EXTSCAN_STATUS_ERROR = 0x80000000,
29610     WMI_EXTSCAN_STATUS_INVALID_PARAMETERS,
29611     WMI_EXTSCAN_STATUS_INTERNAL_ERROR
29612 } wmi_extscan_start_stop_status;
29613 
29614 typedef struct {
29615     /** Request ID - to identify command. Cannot be 0 */
29616     A_UINT32     request_id;
29617     /** Requestor ID - client requesting ExtScan */
29618     A_UINT32     requestor_id;
29619     /** VDEV id(interface) that is requesting scan */
29620     A_UINT32     vdev_id;
29621 } wmi_extscan_command_id;
29622 
29623 typedef struct {
29624     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
29625     /** channel in MHz */
29626     A_UINT32    channel;
29627 
29628     /** dwell time in msec - use defaults if 0 */
29629     A_UINT32    min_dwell_time;
29630     A_UINT32    max_dwell_time;
29631 
29632     /** passive/active channel and other flags */
29633     A_UINT32    control_flags;                        /* 0 => active, 1 => passive scan; ignored for DFS */
29634 } wmi_extscan_bucket_channel;
29635 
29636 /* Scan Bucket specification */
29637 typedef struct {
29638     A_UINT32        tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
29639     /** Bucket ID  - 0-based */
29640     A_UINT32        bucket_id;
29641     /** ExtScan events subscription - events to be reported to client (see wmi_extscan_event_type) */
29642     A_UINT32        notify_extscan_events;
29643     /** Options to forward scan results - see wmi_extscan_forwarding_flags */
29644     A_UINT32        forwarding_flags;
29645     /** ExtScan configuration flags - wmi_extscan_bucket_configuration_flags */
29646     A_UINT32        configuration_flags;
29647     /** DEPRECATED member: multiplier to be applied to the periodic scan's base period */
29648     A_UINT32        base_period_multiplier;
29649     /** dwell time in msec on active channels - use defaults if 0 */
29650     A_UINT32        min_dwell_time_active;
29651     A_UINT32        max_dwell_time_active;
29652     /** dwell time in msec on passive channels - use defaults if 0 */
29653     A_UINT32        min_dwell_time_passive;
29654     A_UINT32        max_dwell_time_passive;
29655     /** see wmi_channel_band_mask; when equal to WMI_CHANNEL_UNSPECIFIED, use channel list */
29656     A_UINT32        channel_band;
29657     /** number of channels (if channel_band is WMI_CHANNEL_UNSPECIFIED) */
29658     A_UINT32        num_channels;
29659     /** scan period upon start or restart of the bucket - periodicity of the bucket to begin with */
29660     A_UINT32        min_period;
29661     /** period above which exponent is not applied anymore */
29662     A_UINT32        max_period;
29663     /** back off value to be applied to bucket's periodicity after exp_max_step_count scan cycles
29664       * new_bucket_period = last_bucket_period + last_exponent_period * exp_backoff
29665       */
29666     A_UINT32        exp_backoff;
29667     /** number of scans performed at a given periodicity after which exponential back off value is
29668        * applied to current periodicity to obtain a newer one
29669        */
29670     A_UINT32        exp_max_step_count;
29671 /** Followed by the variable length TLV chan_list:
29672  *  wmi_extscan_bucket_channel chan_list[] */
29673 } wmi_extscan_bucket;
29674 
29675 typedef struct {
29676     A_UINT32     tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_cmd_fixed_param */
29677     /** Request ID - to identify command. Cannot be 0 */
29678     A_UINT32     request_id;
29679     /** Requestor ID - client requesting ExtScan */
29680     A_UINT32     requestor_id;
29681     /** VDEV id(interface) that is requesting scan */
29682     A_UINT32     vdev_id;
29683     /** table ID - to allow support for multiple simultaneous requests */
29684     A_UINT32     table_id;
29685     /** Base period (milliseconds) used by scan buckets to define periodicity of the scans */
29686     A_UINT32     base_period;
29687     /** Maximum number of iterations to run - one iteration is the scanning of the least frequent bucket */
29688     A_UINT32     max_iterations;
29689     /** Options to forward scan results - see wmi_extscan_forwarding_flags */
29690     A_UINT32     forwarding_flags;
29691     /** ExtScan configuration flags - wmi_extscan_configuration_flags */
29692     A_UINT32     configuration_flags;
29693     /** ExtScan events subscription - bitmask indicating which events should be send to client (see wmi_extscan_event_type) */
29694     A_UINT32     notify_extscan_events;
29695     /** Scan Priority, input to scan scheduler */
29696     A_UINT32     scan_priority;
29697     /** Maximum number of BSSIDs to cache on each scan cycle */
29698     A_UINT32     max_bssids_per_scan_cycle;
29699     /** Minimum RSSI value to report */
29700     A_UINT32     min_rssi;
29701     /** Maximum table usage in percentage */
29702     A_UINT32     max_table_usage;
29703     /** default dwell time in msec on active channels */
29704     A_UINT32     min_dwell_time_active;
29705     A_UINT32     max_dwell_time_active;
29706     /** default dwell time in msec on passive channels */
29707     A_UINT32     min_dwell_time_passive;
29708     A_UINT32     max_dwell_time_passive;
29709     /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
29710     A_UINT32     min_rest_time;
29711     /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
29712     /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
29713      *  will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
29714      *  switch to off channel. if there is activity the scanner will let the radio on the bss channel
29715      *  until max_rest_time expires.at max_rest_time scanner will switch to off channel
29716      *  irrespective of activity. activity is determined by the idle_time parameter.
29717      */
29718     A_UINT32     max_rest_time;
29719     /** time before sending next set of probe requests.
29720      *   The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
29721      *   The number of probe requests specified depends on the ssid_list and bssid_list
29722      */
29723     /** Max number of probes to be sent */
29724     A_UINT32     n_probes;
29725     /** time in msec between 2 sets of probe requests. */
29726     A_UINT32     repeat_probe_time;
29727     /** time in msec between 2 consecutive probe requests with in a set. */
29728     A_UINT32     probe_spacing_time;
29729     /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity  */
29730     A_UINT32     idle_time;
29731     /** maximum time in msec allowed for scan  */
29732     A_UINT32     max_scan_time;
29733     /** delay in msec before sending first probe request after switching to a channel */
29734     A_UINT32     probe_delay;
29735     /** Scan control flags */
29736     A_UINT32     scan_ctrl_flags;
29737     /** Burst duration time in msec*/
29738     A_UINT32     burst_duration;
29739 
29740     /** number of bssids in the TLV bssid_list[] */
29741     A_UINT32     num_bssid;
29742     /** number of ssid in the TLV ssid_list[] */
29743     A_UINT32     num_ssids;
29744     /** number of bytes in TLV ie_data[] */
29745     A_UINT32     ie_len;
29746     /** number of buckets in the TLV bucket_list[] */
29747     A_UINT32     num_buckets;
29748     /** in number of scans, send notifications to host after these many scans */
29749     A_UINT32    report_threshold_num_scans;
29750     /** number of channels in channel_list[] determined by the
29751         sum of wmi_extscan_bucket.num_channels in array  */
29752 
29753 /**
29754  * TLV (tag length value) parameters follow the extscan_cmd
29755  * structure. The TLV's are:
29756  *     wmi_ssid                   ssid_list[];
29757  *     wmi_mac_addr               bssid_list[];
29758  *     A_UINT8                    ie_data[];
29759  *     wmi_extscan_bucket         bucket_list[];
29760  *     wmi_extscan_bucket_channel channel_list[];
29761  */
29762 } wmi_extscan_start_cmd_fixed_param;
29763 
29764 typedef struct {
29765     A_UINT32     tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_stop_cmd_fixed_param */
29766     /** Request ID - to match running command. 0 matches any request */
29767     A_UINT32     request_id;
29768     /** Requestor ID - client requesting stop */
29769     A_UINT32     requestor_id;
29770     /** VDEV id(interface) that is requesting scan */
29771     A_UINT32     vdev_id;
29772     /** table ID - to allow support for multiple simultaneous requests */
29773     A_UINT32     table_id;
29774 } wmi_extscan_stop_cmd_fixed_param;
29775 
29776 enum wmi_extscan_get_cached_results_flags {
29777     WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_NONE        = 0x0000,
29778     WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_FLUSH_TABLE = 0x0001
29779 };
29780 
29781 typedef struct {
29782     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_cached_results_cmd_fixed_param */
29783     /** request ID - used to correlate command with events */
29784     A_UINT32    request_id;
29785     /** Requestor ID - client that requested results */
29786     A_UINT32    requestor_id;
29787     /** VDEV id(interface) that is requesting scan */
29788     A_UINT32    vdev_id;
29789     /** table ID - to allow support for multiple simultaneous requests */
29790     A_UINT32    table_id;
29791     /** maximum number of results to be returned  */
29792     A_UINT32    max_results;
29793     /** flush BSSID list - wmi_extscan_get_cached_results_flags */
29794     A_UINT32    control_flags; /* enum wmi_extscan_get_cached_results_flags */
29795 } wmi_extscan_get_cached_results_cmd_fixed_param;
29796 
29797 typedef struct {
29798     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_wlan_change_results_cmd_fixed_param */
29799     /** request ID - used to correlate command with events */
29800     A_UINT32    request_id;
29801     /** Requestor ID - client that requested results */
29802     A_UINT32    requestor_id;
29803     /** VDEV id(interface) that is requesting scan */
29804     A_UINT32    vdev_id;
29805     /** table ID - to allow support for multiple simultaneous requests */
29806     A_UINT32    table_id;
29807 } wmi_extscan_get_wlan_change_results_cmd_fixed_param;
29808 
29809 typedef struct {
29810     A_UINT32        tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
29811     /** bssid */
29812     wmi_mac_addr    bssid;
29813     /** channel in MHz */
29814     A_UINT32        channel;
29815     /** upper RSSI limit */
29816     A_UINT32        upper_rssi_limit;
29817     /** lower RSSI limit */
29818     A_UINT32        lower_rssi_limit;
29819 } wmi_extscan_wlan_change_bssid_param;
29820 
29821 typedef struct {
29822     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param */
29823     /** Request ID - to identify command. Cannot be 0 */
29824     A_UINT32    request_id;
29825     /** Requestor ID - client requesting wlan change monitoring */
29826     A_UINT32    requestor_id;
29827     /** VDEV id(interface) that is requesting scan */
29828     A_UINT32    vdev_id;
29829     /** table ID - to allow support for multiple simultaneous tables */
29830     A_UINT32    table_id;
29831     /** operation mode: start/stop */
29832     A_UINT32    mode; /* wmi_extscan_operation_mode */
29833     /** number of RSSI samples to store */
29834     A_UINT32    max_rssi_samples;
29835     /** number of samples to use to calculate RSSI average */
29836     A_UINT32    rssi_averaging_samples;
29837     /** number of scans to confirm loss of contact with RSSI */
29838     A_UINT32    lost_ap_scan_count;
29839     /** number of out-of-range BSSIDs necessary to send event */
29840     A_UINT32    max_out_of_range_count;
29841 
29842     /** total number of bssid signal descriptors (in all pages) */
29843     A_UINT32    total_entries;
29844     /** index of the first bssid entry found in the TLV wlan_change_descriptor_list*/
29845     A_UINT32    first_entry_index;
29846     /** number of bssid signal descriptors in this page */
29847     A_UINT32    num_entries_in_page;
29848 /* Following this structure is the TLV:
29849  *     wmi_extscan_wlan_change_bssid_param wlan_change_descriptor_list[];
29850  *         (number of elements given by field num_page_entries)
29851  */
29852 } wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param;
29853 
29854 typedef struct {
29855     A_UINT32        tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
29856     /** bssid */
29857     wmi_mac_addr    bssid;
29858     /** RSSI min threshold for reporting */
29859     A_UINT32        min_rssi;
29860     /** Deprecated entry - channel in MHz */
29861     A_UINT32        channel;
29862     /** RSSI max threshold for reporting */
29863     A_UINT32        max_rssi;
29864 } wmi_extscan_hotlist_entry;
29865 
29866 typedef struct {
29867     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_monitor_cmd_fixed_param */
29868     /** Request ID - to identify command. Cannot be 0 */
29869     A_UINT32    request_id;
29870     /** Requestor ID - client requesting hotlist monitoring */
29871     A_UINT32    requestor_id;
29872     /** VDEV id(interface) that is requesting scan */
29873     A_UINT32    vdev_id;
29874     /** table ID - to allow support for multiple simultaneous tables */
29875     A_UINT32    table_id;
29876     /** operation mode: start/stop */
29877     A_UINT32    mode;    /* wmi_extscan_operation_mode */
29878     /** total number of bssids (in all pages) */
29879     A_UINT32    total_entries;
29880     /** index of the first bssid entry found in the TLV wmi_extscan_hotlist_entry */
29881     A_UINT32    first_entry_index;
29882     /** number of bssids in this page */
29883     A_UINT32    num_entries_in_page;
29884     /** number of consecutive scans to confirm loss of contact with AP */
29885     A_UINT32    lost_ap_scan_count;
29886 /* Following this structure is the TLV:
29887  *     wmi_extscan_hotlist_entry hotlist[]; <-- number of elements given by field num_page_entries.
29888  */
29889 } wmi_extscan_configure_hotlist_monitor_cmd_fixed_param;
29890 
29891 typedef struct {
29892     A_UINT32        tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
29893     /**ssid */
29894     wmi_ssid        ssid;
29895     /**band */
29896     A_UINT32        band;
29897     /**RSSI threshold for reporting */
29898     A_UINT32        min_rssi;
29899     A_UINT32        max_rssi;
29900 } wmi_extscan_hotlist_ssid_entry;
29901 
29902 typedef struct {
29903     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param */
29904     /** Request ID - to identify command. Cannot be 0 */
29905     A_UINT32    request_id;
29906     /** Requestor ID - client requesting hotlist ssid monitoring */
29907     A_UINT32    requestor_id;
29908     /** VDEV id(interface) that is requesting scan */
29909     A_UINT32    vdev_id;
29910     /** table ID - to allow support for multiple simultaneous tables */
29911     A_UINT32    table_id;
29912     /** operation mode: start/stop */
29913     A_UINT32    mode; /* wmi_extscan_operation_mode */
29914     /**total number of ssids (in all pages) */
29915     A_UINT32    total_entries;
29916     /**index of the first ssid entry found in the TLV wmi_extscan_hotlist_ssid_entry*/
29917     A_UINT32    first_entry_index;
29918     /**number of ssids in this page */
29919     A_UINT32    num_entries_in_page;
29920     /** number of consecutive scans to confirm loss of an ssid **/
29921     A_UINT32    lost_ap_scan_count;
29922     /* Following this structure is the TLV:
29923      *     wmi_extscan_hotlist_ssid_entry hotlist_ssid[]; <-- number of elements given by field num_page_entries.
29924      */
29925 } wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param;
29926 
29927 typedef struct {
29928     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
29929     /** table ID - to allow support for multiple simultaneous tables */
29930     A_UINT32    table_id;
29931     /** size in bytes of scan cache entry */
29932     A_UINT32    scan_cache_entry_size;
29933     /** maximum number of scan cache entries */
29934     A_UINT32    max_scan_cache_entries;
29935     /** maximum number of buckets per extscan request */
29936     A_UINT32    max_buckets;
29937     /** maximum number of BSSIDs that will be stored in each scan (best n/w as per RSSI) */
29938     A_UINT32    max_bssid_per_scan;
29939     /** table usage level at which indication must be sent to host */
29940     A_UINT32    max_table_usage_threshold;
29941 } wmi_extscan_cache_capabilities;
29942 
29943 typedef struct {
29944     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
29945     /** table ID - to allow support for multiple simultaneous tables */
29946     A_UINT32    table_id;
29947     /** size in bytes of wlan change entry */
29948     A_UINT32    wlan_change_entry_size;
29949     /** maximum number of entries in wlan change table */
29950     A_UINT32    max_wlan_change_entries;
29951     /** number of RSSI samples used for averaging RSSI */
29952     A_UINT32    max_rssi_averaging_samples;
29953     /** number of BSSID/RSSI entries (BSSID pointer, RSSI, timestamp) that device can hold */
29954     A_UINT32    max_rssi_history_entries;
29955 } wmi_extscan_wlan_change_monitor_capabilities;
29956 
29957 typedef struct {
29958     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
29959     /** table ID - to allow support for multiple simultaneous tables */
29960     A_UINT32    table_id;
29961     /** size in bytes of hotlist entry */
29962     A_UINT32    wlan_hotlist_entry_size;
29963     /** maximum number of entries in wlan change table */
29964     A_UINT32    max_hotlist_entries;
29965 } wmi_extscan_hotlist_monitor_capabilities;
29966 
29967 typedef struct {
29968     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_set_capabilities_cmd_fixed_param */
29969     /** Request ID - matches request ID used to start hot list monitoring */
29970     A_UINT32    request_id;
29971     /** Requestor ID - client requesting stop */
29972     A_UINT32    requestor_id;
29973     /** number of extscan caches */
29974     A_UINT32    num_extscan_cache_tables;
29975     /** number of wlan change lists */
29976     A_UINT32    num_wlan_change_monitor_tables;
29977     /** number of hotlists */
29978     A_UINT32    num_hotlist_monitor_tables;
29979     /** if one sided rtt data collection is supported */
29980     A_UINT32    rtt_one_sided_supported;
29981     /** if 11v data collection is supported */
29982     A_UINT32    rtt_11v_supported;
29983     /** if 11mc data collection is supported */
29984     A_UINT32    rtt_ftm_supported;
29985     /** number of extscan cache capabilities (one per table)  */
29986     A_UINT32    num_extscan_cache_capabilities;
29987     /** number of wlan change  capabilities (one per table)  */
29988     A_UINT32    num_extscan_wlan_change_capabilities;
29989     /** number of extscan hotlist capabilities (one per table)  */
29990     A_UINT32    num_extscan_hotlist_capabilities;
29991 /* Following this structure is the TLV:
29992  *     wmi_extscan_cache_capabilities               extscan_cache_capabilities; <-- number of capabilities given by num_extscan_caches
29993  *     wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities;   <-- number of capabilities given by num_wlan_change_monitor_tables
29994  *     wmi_extscan_hotlist_monitor_capabilities     hotlist_capabilities;       <-- number of capabilities given by num_hotlist_monitor_tables
29995  */
29996 } wmi_extscan_set_capabilities_cmd_fixed_param;
29997 
29998 typedef struct {
29999     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_capabilities_cmd_fixed_param */
30000     /** Request ID - matches request ID used to start hot list monitoring */
30001     A_UINT32    request_id;
30002     /** Requestor ID - client requesting capabilities */
30003     A_UINT32    requestor_id;
30004 } wmi_extscan_get_capabilities_cmd_fixed_param;
30005 
30006 typedef struct {
30007     A_UINT32     tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param */
30008     /** Request ID of the operation that was started/stopped */
30009     A_UINT32     request_id;
30010     /** Requestor ID of the operation that was started/stopped */
30011     A_UINT32     requestor_id;
30012     /** VDEV id(interface) of the operation that was started/stopped */
30013     A_UINT32     vdev_id;
30014     /** extscan WMI command */
30015     A_UINT32     command;
30016     /** operation mode: start/stop */
30017     A_UINT32     mode; /* wmi_extscan_operation_mode */
30018     /**success/failure */
30019     A_UINT32     status; /* enum wmi_extscan_start_stop_status */
30020     /** table ID - to allow support for multiple simultaneous requests */
30021     A_UINT32     table_id;
30022 } wmi_extscan_start_stop_event_fixed_param;
30023 
30024 typedef struct {
30025     A_UINT32     tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param */
30026     /** Request ID of the extscan operation that is currently running */
30027     A_UINT32     request_id;
30028     /** Requestor ID of the extscan operation that is currently running */
30029     A_UINT32     requestor_id;
30030     /** VDEV id(interface) of the extscan operation that is currently running */
30031     A_UINT32     vdev_id;
30032     /** scan event (wmi_scan_event_type) */
30033     A_UINT32     event; /* wmi_extscan_event_type */
30034     /** table ID - to allow support for multiple simultaneous requests */
30035     A_UINT32     table_id;
30036     /**number of buckets */
30037     A_UINT32     num_buckets;
30038     /* Following this structure is the TLV:
30039      *     A_UINT32    bucket_id[]; <-- number of elements given by field num_buckets.
30040      */
30041 } wmi_extscan_operation_event_fixed_param;
30042 
30043 /* Types of extscan tables */
30044 typedef enum {
30045     EXTSCAN_TABLE_NONE    = 0,
30046     EXTSCAN_TABLE_BSSID   = 1,
30047     EXTSCAN_TABLE_RSSI    = 2,
30048 } wmi_extscan_table_type;
30049 
30050 typedef struct {
30051     A_UINT32     tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param */
30052     /** Request ID of the extscan operation that is currently running */
30053     A_UINT32     request_id;
30054     /** Requestor ID of the extscan operation that is currently running */
30055     A_UINT32     requestor_id;
30056     /** VDEV id(interface) of the extscan operation that is currently running */
30057     A_UINT32     vdev_id;
30058     /** table ID - to allow support for multiple simultaneous tables */
30059     A_UINT32     table_id;
30060     /**see wmi_extscan_table_type for table reporting usage */
30061     A_UINT32     table_type;
30062     /**number of entries in use */
30063     A_UINT32     entries_in_use;
30064     /**maximum number of entries in table */
30065     A_UINT32     maximum_entries;
30066 } wmi_extscan_table_usage_event_fixed_param;
30067 
30068 typedef enum {
30069     WMI_SCAN_STATUS_INTERRUPTED = 1      /* Indicates scan got interrupted i.e. aborted or pre-empted for a long time (> 1sec)
30070                                             this can be used to discard scan results */
30071 } wmi_scan_status_flags;
30072 
30073 typedef struct {
30074     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
30075     /** RSSI */
30076     A_UINT32    rssi;
30077     /** time stamp in milliseconds */
30078     A_UINT32    tstamp;
30079     /** Extscan cycle during which this entry was scanned */
30080     A_UINT32    scan_cycle_id;
30081     /** flag to indicate if the given result was obtained as part of interrupted (aborted/large time gap preempted) scan */
30082     A_UINT32    flags;
30083     /** Bitmask of buckets (i.e. sets of channels) scanned */
30084     A_UINT32    buckets_scanned;
30085 } wmi_extscan_rssi_info;
30086 
30087 typedef struct {
30088     A_UINT32        tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
30089     /** bssid */
30090     wmi_mac_addr    bssid;
30091     /** ssid */
30092     wmi_ssid        ssid;
30093     /** channel in MHz */
30094     A_UINT32        channel;
30095     /** capabilities */
30096     A_UINT32        capabilities;
30097     /** beacon interval in TUs */
30098     A_UINT32        beacon_interval;
30099     /** time stamp in milliseconds - time last seen */
30100     A_UINT32        tstamp;
30101     /** flags - _tExtScanEntryFlags */
30102     A_UINT32        flags;
30103     /** RTT in ns */
30104     A_UINT32        rtt;
30105     /** RTT standard deviation */
30106     A_UINT32        rtt_sd;
30107     /** RSSI information */
30108     A_UINT32        number_rssi_samples;
30109     /** IE length */
30110     A_UINT32        ie_length; /* length of IE data */
30111 } wmi_extscan_wlan_descriptor;
30112 
30113 typedef struct {
30114     A_UINT32     tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param */
30115     /** Request ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
30116     A_UINT32     request_id;
30117     /** Requestor ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
30118     A_UINT32     requestor_id;
30119     /** VDEV id(interface) of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
30120     A_UINT32     vdev_id;
30121     /** Request ID of the extscan operation that is currently running */
30122     A_UINT32     extscan_request_id;
30123     /** Requestor ID of the extscan operation that is currently running */
30124     A_UINT32     extscan_requestor_id;
30125     /** VDEV id(interface) of the extscan operation that is currently running */
30126     A_UINT32     extscan_vdev_id;
30127     /** table ID - to allow support for multiple simultaneous tables */
30128     A_UINT32     table_id;
30129     /**current time stamp in seconds. Used to provide a baseline for the relative timestamps returned for each block and entry */
30130     A_UINT32     current_tstamp;
30131     /**total number of bssids (in all pages) */
30132     A_UINT32     total_entries;
30133     /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
30134     A_UINT32     first_entry_index;
30135     /**number of bssids in this page */
30136     A_UINT32     num_entries_in_page;
30137     /** number of buckets scanned**/
30138     A_UINT32     buckets_scanned;
30139     /* Followed by the variable length TLVs
30140      *     wmi_extscan_wlan_descriptor    bssid_list[]
30141      *     wmi_extscan_rssi_info          rssi_list[]
30142      *     A_UINT8                        ie_list[]
30143      */
30144 } wmi_extscan_cached_results_event_fixed_param;
30145 
30146 typedef enum {
30147     EXTSCAN_WLAN_CHANGE_FLAG_NONE         = 0x00,
30148     EXTSCAN_WLAN_CHANGE_FLAG_OUT_OF_RANGE = 0x01,
30149     EXTSCAN_WLAN_CHANGE_FLAG_AP_LOST      = 0x02,
30150 } wmi_extscan_wlan_change_flags;
30151 
30152 typedef struct {
30153     A_UINT32        tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
30154     /** bssid */
30155     wmi_mac_addr    bssid;
30156     /** time stamp in milliseconds */
30157     A_UINT32        tstamp;
30158     /** upper RSSI limit */
30159     A_UINT32        upper_rssi_limit;
30160     /** lower RSSI limit */
30161     A_UINT32        lower_rssi_limit;
30162     /** channel */
30163     A_UINT32        channel;    /* in MHz */
30164     /** current RSSI average */
30165     A_UINT32        rssi_average;
30166     /** flags - wmi_extscan_wlan_change_flags */
30167     A_UINT32        flags;
30168     /** length of RSSI history to follow (number of values) */
30169     A_UINT32        num_rssi_samples;
30170 } wmi_extscan_wlan_change_result_bssid;
30171 
30172 typedef struct {
30173     A_UINT32     tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param */
30174     /** Request ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
30175     A_UINT32     request_id;
30176     /** Requestor ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
30177     A_UINT32     requestor_id;
30178     /** VDEV id(interface) of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
30179     A_UINT32     vdev_id;
30180     /** Request ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
30181     A_UINT32     config_request_id;
30182     /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
30183     A_UINT32     config_requestor_id;
30184     /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
30185     A_UINT32     config_vdev_id;
30186     /** table ID - to allow support for multiple simultaneous tables */
30187     A_UINT32     table_id;
30188     /**number of entries with RSSI out of range or BSSID not detected */
30189     A_UINT32     change_count;
30190     /**total number of bssid signal descriptors (in all pages) */
30191     A_UINT32     total_entries;
30192     /**index of the first bssid signal descriptor entry found in the TLV wmi_extscan_wlan_descriptor*/
30193     A_UINT32     first_entry_index;
30194     /**number of bssids signal descriptors in this page */
30195     A_UINT32     num_entries_in_page;
30196 /* Following this structure is the TLV:
30197  *     wmi_extscan_wlan_change_result_bssid bssid_signal_descriptor_list[];
30198  *         (number of descriptors given by field num_entries_in_page)
30199  * Following this structure is the list of RSSI values (each is an A_UINT8):
30200  *     A_UINT8 rssi_list[]; <-- last N RSSI values.
30201  */
30202 } wmi_extscan_wlan_change_results_event_fixed_param;
30203 
30204 enum _tExtScanEntryFlags
30205 {
30206     WMI_HOTLIST_FLAG_NONE           = 0x00,
30207     WMI_HOTLIST_FLAG_PRESENCE       = 0x01,
30208     WMI_HOTLIST_FLAG_DUPLICATE_SSID = 0x80,
30209 };
30210 
30211 typedef struct {
30212     A_UINT32     tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
30213     /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
30214     A_UINT32     config_request_id;
30215     /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
30216     A_UINT32     config_requestor_id;
30217     /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
30218     A_UINT32     config_vdev_id;
30219     /** table ID - to allow support for multiple simultaneous tables */
30220     A_UINT32     table_id;
30221     /**total number of bssids (in all pages) */
30222     A_UINT32     total_entries;
30223     /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
30224     A_UINT32     first_entry_index;
30225     /**number of bssids in this page */
30226     A_UINT32     num_entries_in_page;
30227 /* Following this structure is the TLV:
30228  *     wmi_extscan_wlan_descriptor hotlist_match[]; <-- number of descriptors given by field num_entries_in_page.
30229  */
30230 } wmi_extscan_hotlist_match_event_fixed_param;
30231 
30232 typedef struct {
30233     A_UINT32     tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
30234     /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
30235     A_UINT32     config_request_id;
30236     /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
30237     A_UINT32     config_requestor_id;
30238     /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
30239     A_UINT32     config_vdev_id;
30240     /** table ID - to allow support for multiple simultaneous tables */
30241     A_UINT32     table_id;
30242     /**total number of ssids (in all pages) */
30243     A_UINT32     total_entries;
30244     /**index of the first ssid entry found in the TLV wmi_extscan_wlan_descriptor*/
30245     A_UINT32     first_entry_index;
30246     /**number of ssids in this page */
30247     A_UINT32     num_entries_in_page;
30248 /* Following this structure is the TLV:
30249  *     wmi_extscan_wlan_descriptor hotlist_match[]; <-- number of descriptors given by field num_entries_in_page.
30250  */
30251 } wmi_extscan_hotlist_ssid_match_event_fixed_param;
30252 
30253 typedef struct {
30254     A_UINT32     tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param */
30255     /** Request ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
30256     A_UINT32     request_id;
30257     /** Requestor ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
30258     A_UINT32     requestor_id;
30259     /** VDEV id(interface) of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
30260     A_UINT32     vdev_id;
30261     /** number of extscan caches */
30262     A_UINT32     num_extscan_cache_tables;
30263     /** number of wlan change lists */
30264     A_UINT32     num_wlan_change_monitor_tables;
30265     /** number of hotlists */
30266     A_UINT32     num_hotlist_monitor_tables;
30267     /** if one sided rtt data collection is supported */
30268     A_UINT32     rtt_one_sided_supported;
30269     /** if 11v data collection is supported */
30270     A_UINT32     rtt_11v_supported;
30271     /** if 11mc data collection is supported */
30272     A_UINT32     rtt_ftm_supported;
30273     /** number of extscan cache capabilities (one per table)  */
30274     A_UINT32     num_extscan_cache_capabilities;
30275     /** number of wlan change  capabilities (one per table)  */
30276     A_UINT32     num_extscan_wlan_change_capabilities;
30277     /** number of extscan hotlist capabilities (one per table)  */
30278     A_UINT32     num_extscan_hotlist_capabilities;
30279     /* max number of roaming ssid whitelist firmware can support */
30280     A_UINT32 num_roam_ssid_whitelist;
30281     /* max number of blacklist bssid firmware can support */
30282     A_UINT32 num_roam_bssid_blacklist;
30283     /* max number of preferred list firmware can support */
30284     A_UINT32 num_roam_bssid_preferred_list;
30285     /* max number of hotlist ssids firmware can support */
30286     A_UINT32 num_extscan_hotlist_ssid;
30287     /* max number of epno networks firmware can support */
30288     A_UINT32 num_epno_networks;
30289 
30290 /* Following this structure are the TLVs describing the capabilities of of the various types of lists. The FW theoretically
30291  * supports multiple lists of each type.
30292  *
30293  *     wmi_extscan_cache_capabilities               extscan_cache_capabilities[] <-- capabilities of extscan cache (BSSID/RSSI lists)
30294  *     wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities[]   <-- capabilities of wlan_change_monitor_tables
30295  *     wmi_extscan_hotlist_monitor_capabilities     hotlist_capabilities[]       <-- capabilities of hotlist_monitor_tables
30296  */
30297 } wmi_extscan_capabilities_event_fixed_param;
30298 
30299 /* WMI_D0_WOW_DISABLE_ACK_EVENTID  */
30300 typedef struct {
30301     A_UINT32    tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_disable_ack_event_fixed_param  */
30302     A_UINT32    reserved0; /* for future need */
30303 } wmi_d0_wow_disable_ack_event_fixed_param;
30304 
30305 /** WMI_PDEV_RESUME_EVENTID : generated in response to WMI_PDEV_RESUME_CMDID */
30306 typedef struct {
30307     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_event_fixed_param  */
30308     /** pdev_id for identifying the MAC
30309      * See macros starting with WMI_PDEV_ID_ for values.
30310      */
30311     A_UINT32 pdev_id;
30312 } wmi_pdev_resume_event_fixed_param;
30313 
30314 
30315 
30316 /** value representing all modules */
30317 #define WMI_DEBUG_LOG_MODULE_ALL 0xffff
30318 
30319 /* param definitions */
30320 
30321 /**
30322   * Log level for a given module. Value contains both module id and log level.
30323   * here is the bitmap definition for value.
30324   * module Id   : 16
30325   *     Flags   :  reserved
30326   *     Level   :  8
30327   * if odule Id  is WMI_DEBUG_LOG_MODULE_ALL then  log level is  applied to all modules (global).
30328   * WMI_DEBUG_LOG_MIDULE_ALL will overwrites per module level setting.
30329   */
30330 #define WMI_DEBUG_LOG_PARAM_LOG_LEVEL      0x1
30331 
30332 #define WMI_DBGLOG_SET_LOG_LEVEL(val,lvl) do { \
30333         (val) |=  (lvl & 0xff);                \
30334      } while (0)
30335 
30336 #define WMI_DBGLOG_GET_LOG_LEVEL(val) ((val) & 0xff)
30337 
30338 #define WMI_DBGLOG_SET_MODULE_ID(val,mid) do { \
30339         (val) |=  ((mid & 0xffff) << 16);        \
30340      } while (0)
30341 
30342 #define WMI_DBGLOG_GET_MODULE_ID(val) (((val) >> 16) & 0xffff)
30343 
30344 /**
30345   * Enable the debug log for a given vdev. Value is vdev id
30346   */
30347 #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE    0x2
30348 
30349 
30350 /**
30351   * Disable the debug log for a given vdev. Value is vdev id
30352   * All the log level  for a given VDEV is disabled except the ERROR log messages
30353   */
30354 
30355 #define WMI_DEBUG_LOG_PARAM_VDEV_DISABLE   0x3
30356 
30357 /**
30358   * set vdev enable bitmap. value is the vden enable bitmap
30359   */
30360 #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE_BITMAP    0x4
30361 
30362 /**
30363   * set a given log level to all the modules specified in the module bitmap.
30364   * and set the log level for all other modules to DBGLOG_ERR.
30365   *  value: log levelt to be set.
30366   *  module_id_bitmap : identifies the modules for which the log level should be set and
30367   *                      modules for which the log level should be reset to DBGLOG_ERR.
30368   */
30369 #define WMI_DEBUG_LOG_PARAM_MOD_ENABLE_BITMAP    0x5
30370 
30371 /**
30372  *  Wow mode specific logging enablement
30373  *  Wow mode module_id_bitmap : identifies the modules for which the log level
30374  *                  should be set in WOW and modules for which the log level
30375  *                  should be reset to DBGLOG_MAX_LVL.
30376  */
30377 #define WMI_DEBUG_LOG_PARAM_WOW_MOD_ENABLE_BITMAP 0x6
30378 
30379 #define NUM_MODULES_PER_ENTRY ((sizeof(A_UINT32)) << 3)
30380 
30381 #define WMI_MODULE_ENABLE(pmid_bitmap,mod_id) \
30382     ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] |= \
30383          (1 << ((mod_id)%NUM_MODULES_PER_ENTRY)))
30384 
30385 #define WMI_MODULE_DISABLE(pmid_bitmap,mod_id)     \
30386     ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] &=  \
30387       (~(1 << ((mod_id)%NUM_MODULES_PER_ENTRY))))
30388 
30389 #define WMI_MODULE_IS_ENABLED(pmid_bitmap,mod_id) \
30390     (((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] &  \
30391        (1 << ((mod_id)%NUM_MODULES_PER_ENTRY))) != 0)
30392 
30393 #define MAX_MODULE_ID_BITMAP_WORDS 16 /* 16*32=512 module ids. should be more than sufficient */
30394 typedef struct {
30395         A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_log_config_cmd_fixed_param */
30396         A_UINT32 dbg_log_param; /** param types are defined above */
30397         A_UINT32 value;
30398         /* The below array will follow this tlv ->fixed length module_id_bitmap[]
30399         A_UINT32 module_id_bitmap[MAX_MODULE_ID_BITMAP_WORDS];
30400      */
30401 } wmi_debug_log_config_cmd_fixed_param;
30402 
30403 typedef struct {
30404     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_temperature_cmd_fixed_param  */
30405     A_UINT32 param;     /* Reserved for future use */
30406     /** pdev_id for identifying the MAC
30407      * See macros starting with WMI_PDEV_ID_ for values.
30408      */
30409     A_UINT32 pdev_id;
30410 } wmi_pdev_get_temperature_cmd_fixed_param;
30411 
30412 typedef struct {
30413     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_temperature_event_fixed_param */
30414     A_INT32  value;     /* temperature value in Celcius degree */
30415     /** pdev_id for identifying the MAC
30416      * See macros starting with WMI_PDEV_ID_ for values.
30417      */
30418     A_UINT32 pdev_id;
30419 } wmi_pdev_temperature_event_fixed_param;
30420 
30421 typedef enum {
30422     ANTDIV_HW_CFG_STATUS,
30423     ANTDIV_SW_CFG_STATUS,
30424     ANTDIV_MAX_STATUS_TYPE_NUM
30425 } ANTDIV_STATUS_TYPE;
30426 
30427 typedef struct {
30428     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_antdiv_status_cmd_fixed_param  */
30429     A_UINT32 status_event_id; /* Status event ID - see ANTDIV_STATUS_TYPE */
30430     /** pdev_id for identifying the MAC
30431      * See macros starting with WMI_PDEV_ID_ for values.
30432      */
30433     A_UINT32 pdev_id;
30434 } wmi_pdev_get_antdiv_status_cmd_fixed_param;
30435 
30436 typedef struct {
30437     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_antdiv_status_event_fixed_param */
30438     A_UINT32 support;   /* ANT DIV feature enabled or not */
30439     A_UINT32 chain_num; /* how many chain supported */
30440     A_UINT32 ant_num;   /* how many ANT supported, 32 max */
30441     /*
30442      * Each entry is for a tx/rx chain, and contains a bitmap identifying
30443      * the antennas attached to that tx/rx chain.
30444      */
30445     A_UINT32 selectable_ant_mask[8];
30446     /** pdev_id for identifying the MAC
30447      * See macros starting with WMI_PDEV_ID_ for values.
30448      */
30449     A_UINT32 pdev_id;
30450 } wmi_pdev_antdiv_status_event_fixed_param;
30451 
30452 typedef struct {
30453     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_dhcp_server_offload_cmd_fixed_param */
30454     A_UINT32 vdev_id;
30455     A_UINT32 enable;
30456     A_UINT32 srv_ipv4; /* server IP */
30457     A_UINT32 start_lsb; /* starting address assigned to client */
30458     A_UINT32 num_client; /* number of clients we support */
30459 } wmi_set_dhcp_server_offload_cmd_fixed_param;
30460 
30461 typedef enum {
30462     AP_RX_DATA_OFFLOAD             = 0x00,
30463     STA_RX_DATA_OFFLOAD            = 0x01,
30464 } wmi_ipa_offload_types;
30465 
30466 /**
30467  * This command is sent from WLAN host driver to firmware for
30468  * enabling/disabling IPA data-path offload features.
30469  *
30470  *
30471  * Enabling data path offload to IPA(based on host INI configuration), example:
30472  *    when STA interface comes up,
30473  *    host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
30474  *                  (enable = 1, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
30475  *
30476  * Disabling data path offload to IPA, example:
30477  *    host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
30478  *                  (enable = 0, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
30479  *
30480  *
30481  * This command is applicable only on the PCIE LL systems
30482  *
30483  */
30484 typedef struct {
30485     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_offload_enable_disable_cmd_fixed_param */
30486     A_UINT32 offload_type; /* wmi_ipa_offload_types enum values */
30487     A_UINT32 vdev_id;
30488     A_UINT32 enable; /* 1 == enable, 0 == disable */
30489 } wmi_ipa_offload_enable_disable_cmd_fixed_param;
30490 
30491 typedef enum {
30492     WMI_LED_FLASHING_PATTERN_NOT_CONNECTED    = 0,
30493     WMI_LED_FLASHING_PATTERN_CONNECTED   = 1,
30494     WMI_LED_FLASHING_PATTERN_RESERVED    = 2,
30495 } wmi_set_led_flashing_type;
30496 
30497 /**
30498 The state of the LED GPIO control is determined by two 32 bit values(X_0 and X_1) to produce a 64 bit value.
30499 Each 32 bit value consists of 4 bytes, where each byte defines the number of 50ms intervals that the GPIO will
30500 remain at a predetermined state. The 64 bit value provides 8 unique GPIO timing intervals. The pattern starts
30501 with the MSB of X_0 and continues to the LSB of X_1. After executing the timer interval of the LSB of X_1, the
30502 pattern returns to the MSB of X_0 and repeats. The GPIO state for each timing interval  alternates from Low to
30503 High and the first interval of the pattern represents the time when the GPIO is Low. When a timing interval of
30504 Zero is reached, it is skipped and moves on to the next interval.
30505 */
30506 typedef struct {
30507     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_led_flashing_cmd_fixed_param  */
30508     A_UINT32    pattern_id; /* pattern identifier */
30509     A_UINT32    led_x0; /* led flashing parameter0 */
30510     A_UINT32    led_x1; /* led flashing parameter1 */
30511     A_UINT32    gpio_num; /* GPIO number */
30512 } wmi_set_led_flashing_cmd_fixed_param;
30513 
30514 /**
30515  * The purpose of the multicast Domain Name System (mDNS) is to resolve host names to IP addresses
30516  * within small networks that do not include a local name server.
30517  * It utilizes essentially the same programming interfaces, packet formats and operating semantics
30518  * as the unicast DNS, and the advantage is zero configuration service while no need for central or
30519  * global server.
30520  * Based on mDNS, the DNS-SD (Service Discovery) allows clients to discover a named list of services
30521  * by type in a specified domain using standard DNS queries.
30522  * Here, we provide the ability to advertise the available services by responding to mDNS queries.
30523  */
30524 typedef struct {
30525     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_offload_cmd_fixed_param */
30526     A_UINT32 vdev_id;
30527     A_UINT32 enable;
30528 } wmi_mdns_offload_cmd_fixed_param;
30529 
30530 #define WMI_MAX_MDNS_FQDN_LEN         64
30531 #define WMI_MAX_MDNS_RESP_LEN         512
30532 #define WMI_MDNS_FQDN_TYPE_GENERAL    0
30533 #define WMI_MDNS_FQDN_TYPE_UNIQUE     1
30534 
30535 typedef struct {
30536     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_fqdn_cmd_fixed_param */
30537     A_UINT32 vdev_id;
30538     /** type of fqdn, general or unique */
30539     A_UINT32 type;
30540     /** length of fqdn */
30541     A_UINT32 fqdn_len;
30542     /* Following this structure is the TLV byte stream of fqdn data of length fqdn_len
30543      * A_UINT8  fqdn_data[]; <-- fully-qualified domain name to check if match with the received queries
30544      */
30545 } wmi_mdns_set_fqdn_cmd_fixed_param;
30546 
30547 typedef struct {
30548     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_resp_cmd_fixed_param */
30549     A_UINT32 vdev_id;
30550     /** Answer Resource Record count */
30551     A_UINT32 AR_count;
30552     /** length of response */
30553     A_UINT32 resp_len;
30554     /* Following this structure is the TLV byte stream of resp data of length resp_len
30555      * A_UINT8  resp_data[]; <-- responses consisits of Resource Records
30556      */
30557 } wmi_mdns_set_resp_cmd_fixed_param;
30558 
30559 typedef struct {
30560     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_staIP_cmd_fixed_param */
30561     A_UINT32 vdev_id;
30562     A_UINT32 staIP; /* IPv4 address for STA mode */
30563 } wmi_mdns_set_staIP_cmd_fixed_param;
30564 
30565 typedef struct {
30566     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_get_stats_cmd_fixed_param */
30567     A_UINT32 vdev_id;
30568 } wmi_mdns_get_stats_cmd_fixed_param;
30569 
30570 typedef struct {
30571     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_stats_event_fixed_param */
30572     A_UINT32 vdev_id;
30573     /** curTimestamp in milliseconds */
30574     A_UINT32 curTimestamp;
30575     /** last received Query in milliseconds */
30576     A_UINT32 lastQueryTimestamp;
30577     /** last sent Response in milliseconds */
30578     A_UINT32 lastResponseTimestamp;
30579     /** stats of received queries */
30580     A_UINT32 totalQueries;
30581     /** stats of macth queries */
30582     A_UINT32 totalMatches;
30583     /** stats of responses */
30584     A_UINT32 totalResponses;
30585     /** indicate the current status of mDNS offload */
30586     A_UINT32 status;
30587 } wmi_mdns_stats_event_fixed_param;
30588 
30589 /**
30590  * The purpose of the SoftAP authenticator offload is to offload the association and 4-way handshake process
30591  * down to the firmware. When this feature is enabled, firmware can process the association/disassociation
30592  * request and create/remove connection even host is suspended.
30593  * 3 major components are offloaded:
30594  *     1. ap-mlme. Firmware will process auth/deauth, association/disassociation request and send out response.
30595  *     2. 4-way handshake. Firmware will send out m1/m3 and receive m2/m4.
30596  *     3. key installation. Firmware will generate PMK from the psk info which is sent from the host and install PMK/GTK.
30597  * Current implementation only supports WPA2 CCMP.
30598  */
30599 
30600 typedef struct {
30601     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_enable_cmd_fixed_param */
30602     /** VDEV id(interface) of the WMI_SAP_OFL_ENABLE_CMDID */
30603     A_UINT32 vdev_id;
30604     /** enable/disable sap auth offload */
30605     A_UINT32 enable;
30606     /** sap ssid */
30607     wmi_ssid ap_ssid;
30608     /** authentication mode (defined above) */
30609     A_UINT32 rsn_authmode;
30610     /** unicast cipher set */
30611     A_UINT32 rsn_ucastcipherset;
30612     /** mcast/group cipher set */
30613     A_UINT32 rsn_mcastcipherset;
30614     /** mcast/group management frames cipher set */
30615     A_UINT32 rsn_mcastmgmtcipherset;
30616     /** sap channel */
30617     A_UINT32 channel;
30618     /** length of psk */
30619     A_UINT32 psk_len;
30620     /* Following this structure is the TLV byte stream of wpa passphrase data of length psk_len
30621      * A_UINT8  psk[];
30622      */
30623 } wmi_sap_ofl_enable_cmd_fixed_param;
30624 
30625 typedef struct {
30626     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_add_sta_event_fixed_param */
30627     /** VDEV id(interface) of the WMI_SAP_OFL_ADD_STA_EVENTID */
30628     A_UINT32 vdev_id;
30629     /** aid (association id) of this station */
30630     A_UINT32 assoc_id;
30631     /** peer station's mac addr */
30632     wmi_mac_addr peer_macaddr;
30633     /** length of association request frame */
30634     A_UINT32 data_len;
30635     /* Following this structure is the TLV byte stream of a whole association request frame of length data_len
30636      * A_UINT8 bufp[];
30637      */
30638 } wmi_sap_ofl_add_sta_event_fixed_param;
30639 
30640 typedef enum {
30641     SAP_OFL_DEL_STA_FLAG_NONE       = 0x00,
30642     SAP_OFL_DEL_STA_FLAG_RECONNECT  = 0x01,
30643 } wmi_sap_ofl_del_sta_flags;
30644 
30645 typedef struct {
30646     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_del_sta_event_fixed_param */
30647     /** VDEV id(interface) of the WMI_SAP_OFL_DEL_STA_EVENTID */
30648     A_UINT32 vdev_id;
30649     /** aid (association id) of this station */
30650     A_UINT32 assoc_id;
30651     /** peer station's mac addr */
30652     wmi_mac_addr peer_macaddr;
30653     /** disassociation reason */
30654     A_UINT32 reason;
30655     /** flags - wmi_sap_ofl_del_sta_flags */
30656     A_UINT32 flags;
30657 } wmi_sap_ofl_del_sta_event_fixed_param;
30658 
30659 typedef struct {
30660     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_set_blacklist_param_cmd_fixed_param */
30661     A_UINT32 vdev_id;
30662     /* Number of client failure connection attempt */
30663     A_UINT32 num_retry;
30664     /* Time in milliseconds to record the client's failure connection attempts */
30665     A_UINT32 retry_allow_time_ms;
30666     /* Time in milliseconds to drop the connection request if client is blacklisted */
30667     A_UINT32 blackout_time_ms;
30668 } wmi_sap_set_blacklist_param_cmd_fixed_param;
30669 
30670 typedef struct {
30671     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_cmd_param */
30672     A_UINT32 data_len; /** length in byte of data[]. */
30673     /** This structure is used to send REQ binary blobs
30674      * from application/service to firmware where Host drv is pass through .
30675      * Following this structure is the TLV:
30676      *     A_UINT8 data[]; <-- length in byte given by field data_len.
30677      */
30678 } wmi_apfind_cmd_param;
30679 
30680 typedef enum apfind_event_type_e {
30681     APFIND_MATCH_EVENT = 0,
30682     APFIND_WAKEUP_EVENT,
30683 } APFIND_EVENT_TYPE;
30684 
30685 typedef struct {
30686     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_event_hdr */
30687     A_UINT32 event_type; /** APFIND_EVENT_TYPE */
30688     A_UINT32 data_len; /** length in byte of data[]. */
30689     /** This structure is used to send event binary blobs
30690      * from firmware to application/service and Host drv.
30691      * Following this structure is the TLV:
30692      *     A_UINT8 data[]; <-- length in byte given by field data_len.
30693      */
30694 } wmi_apfind_event_hdr;
30695 
30696 /* SAP obss detection offload types */
30697 typedef enum {
30698     WMI_SAP_OBSS_DETECTION_MODE_DISABLED = 0, /* fw to disable the detection */
30699     WMI_SAP_OBSS_DETECTION_MODE_PRESENT_NOTIFY = 1, /* if the matching beacon is present, notify host immediately */
30700     WMI_SAP_OBSS_DETECTION_MODE_ABSENT_TIMEOUT_NOTIFY = 2,/* if the matching beacon is absent for the timeout period, notify host */
30701 } WMI_SAP_OBSS_DETECTION_MODE;
30702 
30703 typedef struct wmi_sap_obss_detection_cfg_cmd_s {
30704     A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_sap_obss_detection_cfg_cmd_fixed_param */
30705     A_UINT32 vdev_id;
30706     A_UINT32 detect_period_ms;
30707 
30708     /* detect whether there is 11b ap/ibss */
30709     A_UINT32 b_ap_detect_mode;  /* refer WMI_SAP_OBSS_DETECTION_MODE */
30710 
30711     /* detect whether there is 11b sta connected with other APs */
30712     A_UINT32 b_sta_detect_mode;
30713 
30714     /* detect whether there is 11g AP */
30715     A_UINT32 g_ap_detect_mode;
30716 
30717     /* detect whether there is legacy 11a traffic */
30718     A_UINT32 a_detect_mode;
30719 
30720     /* detect whether there is ap which is ht legacy mode  */
30721     A_UINT32 ht_legacy_detect_mode;
30722 
30723     /* detect whether there is ap which is ht mixed mode : has 11b/11g sta */
30724     A_UINT32 ht_mixed_detect_mode;
30725 
30726     /* detect whether there is ap which has 20M only station */
30727     A_UINT32 ht_20mhz_detect_mode;
30728 
30729 } wmi_sap_obss_detection_cfg_cmd_fixed_param;
30730 
30731 typedef enum {
30732     WMI_SAP_OBSS_DETECTION_EVENT_REASON_NOT_SUPPORT = 0,
30733     WMI_SAP_OBSS_DETECTION_EVENT_REASON_PRESENT_NOTIFY,
30734     WMI_SAP_OBSS_DETECTION_EVENT_REASON_ABSENT_TIMEOUT,
30735 } WMI_SAP_OBSS_DETECTION_EVENT_REASON;
30736 
30737 /* WMI_SAP_OBSS_DETECTION_MATCH_MASK is one or more of the following shift bits */
30738 #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11B_AP_S       0
30739 #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11B_STA_S      1
30740 #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11G_AP_S       2
30741 #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11A_S          3
30742 #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_LEGACY_S    4
30743 #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_MIXED_S     5
30744 #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_20MHZ_S     6
30745 
30746 typedef struct wmi_sap_obss_detection_info_evt_s {
30747     A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_sap_obss_detection_info_evt_fixed_param */
30748     A_UINT32 vdev_id;
30749     A_UINT32 reason;   /* refer WMI_SAP_OBSS_DETECTION_EVENT_REASON */
30750     A_UINT32 matched_detection_masks;  /* bit(s) from WMI_SAP_OBSS_DETECTION_MATCH_MASK */
30751     wmi_mac_addr matched_bssid_addr;  /* valid when reason is WMI_SAP_OBSS_DETECTION_EVENT_REASON_PRESENT_NOTIFY */
30752 } wmi_sap_obss_detection_info_evt_fixed_param;
30753 
30754 /** WMI command to enable STA FW handle bss color change notification from AP */
30755 typedef struct  {
30756     A_UINT32 tlv_header; /* tag equals WMITLV_TAG_STRUC_wmi_bss_color_change_enable_fixed_param */
30757     A_UINT32 vdev_id;
30758     A_UINT32 enable;
30759 } wmi_bss_color_change_enable_fixed_param;
30760 
30761 typedef enum  {
30762     WMI_BSS_COLOR_COLLISION_DISABLE = 0,
30763     WMI_BSS_COLOR_COLLISION_DETECTION,
30764     WMI_BSS_COLOR_FREE_SLOT_TIMER_EXPIRY,
30765     WMI_BSS_COLOR_FREE_SLOT_AVAILABLE,
30766 } WMI_BSS_COLOR_COLLISION_EVT_TYPE;
30767 
30768 /** Command to enable OBSS Color collision detection for both STA and AP mode */
30769 typedef struct  {
30770     A_UINT32 tlv_header;                /* tag equals WMITLV_TAG_STRUC_wmi_obss_color_collision_det_config_fixed_param */
30771     A_UINT32 vdev_id;
30772     A_UINT32 flags;                     /* proposed for future use cases */
30773     A_UINT32 evt_type;                  /* WMI_BSS_COLOR_COLLISION_EVT_TYPE */
30774     A_UINT32 current_bss_color;
30775     A_UINT32 detection_period_ms;       /* scan interval for both AP and STA mode */
30776     A_UINT32 scan_period_ms;            /* scan period for passive scan to detect collision */
30777     A_UINT32 free_slot_expiry_time_ms;  /* FW to notify host at timer expiry after which Host disables bss color */
30778 } wmi_obss_color_collision_det_config_fixed_param;
30779 
30780 /** WMI event to notify host on OBSS Color collision detection, free slot available for AP mode */
30781 typedef struct  {
30782     A_UINT32 tlv_header;                    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_obss_color_collision_evt_fixed_param */
30783     A_UINT32 vdev_id;
30784     A_UINT32 evt_type;                      /* WMI_BSS_COLOR_COLLISION_EVT_TYPE */
30785     A_UINT32 bss_color_bitmap_bit0to31;     /* Bit set indicating BSS color present */
30786     A_UINT32 bss_color_bitmap_bit32to63;    /* Bit set indicating BSS color present */
30787 } wmi_obss_color_collision_evt_fixed_param;
30788 
30789 /*
30790  * WMI event to notify host if latency_flags/latency_level got changed
30791  * or if latency got enabled/disabled.
30792  * When latency disable is received in the beacon vendor IE and wlm
30793  * parameters are restored, latency_enable will be zero.
30794  * latency level and latency flags will be those of wlm params.
30795  * Lay out of latency flags is as follows. The field is same as flags
30796  * in wmi_wlm_config_cmd_fixed_param.
30797  *
30798  * |31 19|  18 | 17|16 14| 13 | 12| 11 | 10 |  9  |  8 |7  6|5  4|3  2| 1 | 0 |
30799  * +-----+-----+---+-----+----+---+----+----+-----+----+----+----+----+---+---+
30800  * | RSVD|SRATE|RTS| NSS |EDCA|TRY|SSLP|CSLP|DBMPS|RSVD|Roam|RSVD|DWLT|DFS|SUP|
30801  * +------------------------------+---------------+---------+-----------------+
30802  * |              WAL             |    PS         |  Roam   |     Scan        |
30803  */
30804 typedef struct  {
30805     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_bcn_latency_fixed_param */
30806     A_UINT32 vdev_id;
30807     A_UINT32 latency_enable;
30808     A_UINT32 latency_level;
30809     A_UINT32 latency_flags;
30810 } wmi_vdev_bcn_latency_fixed_param;
30811 
30812 /**
30813  * OCB DCC types and structures.
30814  */
30815 
30816 /**
30817  * DCC types as described in ETSI TS 102 687
30818  * Type                   Format            stepSize    referenceValue  numBits
30819  * -------------------------------------------------------------------------
30820  * ndlType_acPrio         INTEGER (0...7)   1           number          3
30821  * ndlType_controlLoop    INTEGER (0...7)   1           0               3
30822  * ndlType_arrivalRate    INTEGER (0..8191) 0.01 /s     0               13
30823  * ndlType_channelLoad    INTEGER (0..1000) 0.1 %       0 %             10
30824  * ndlType_channelUse     INTEGER (0..8000) 0.0125 %    0 %             13
30825  * ndlType_datarate       INTEGER (0..7)                Table 8         3
30826  * ndlType_distance       INTEGER (0..4095) 1 m         0               12
30827  * ndlType_numberElements INTEGER (0..63)               number          6
30828  * ndlType_packetDuration INTEGER (0..2047) TSYM        0               11
30829  * ndlType_packetInterval INTEGER (0..1023) 10 ms       0               10
30830  * ndlType_pathloss       INTEGER (0..31)   0.1         1.0             5
30831  * ndlType_rxPower        INTEGER (0..127)  -0.5 dB     -40 dBm         7
30832  * ndlType_snr            INTEGER (0..127)  0.5 dB      -10 dB          7
30833  * ndlType_timing         INTEGER (0..4095) 10 ms       0               12
30834  * ndlType_txPower        INTEGER (0..127)  0.5 dB      -20 dBm         7
30835  * ndlType_ratio          INTEGER (0..100)  1 %         0 %             7
30836  * ndlType_exponent       INTEGER (0..100)  0.1         0               7
30837  * ndlType_queueStatus    Enumeration                   Table A.2       1
30838  * ndlType_dccMechanism   Bitset                        Table A.2       6
30839  *
30840  * NOTE: All of following size macros (SIZE_NDLTYPE_ACPRIO through SIZE_BYTE)
30841  * cannot be changed without breaking WMI compatibility.
30842  *
30843  * NOTE: For each of the types, one additional bit is allocated. This
30844  *  leftmost bit is used to indicate that the value is invalid. */
30845 #define SIZE_NDLTYPE_ACPRIO         (1 +  3)
30846 #define SIZE_NDLTYPE_CONTROLLOOP    (1 +  3)
30847 #define SIZE_NDLTYPE_ARRIVALRATE    (1 + 13)
30848 #define SIZE_NDLTYPE_CHANNELLOAD    (1 + 10)
30849 #define SIZE_NDLTYPE_CHANNELUSE     (1 + 13)
30850 #define SIZE_NDLTYPE_DATARATE       (1 +  3)
30851 #define SIZE_NDLTYPE_DISTANCE       (1 + 12)
30852 #define SIZE_NDLTYPE_NUMBERELEMENTS (1 +  6)
30853 #define SIZE_NDLTYPE_PACKETDURATION (1 + 11)
30854 #define SIZE_NDLTYPE_PACKETINTERVAL (1 + 10)
30855 #define SIZE_NDLTYPE_PATHLOSS       (1 +  5)
30856 #define SIZE_NDLTYPE_RXPOWER        (1 +  7)
30857 #define SIZE_NDLTYPE_SNR            (1 +  7)
30858 #define SIZE_NDLTYPE_TIMING         (1 + 12)
30859 #define SIZE_NDLTYPE_TXPOWER        (1 +  7)
30860 #define SIZE_NDLTYPE_RATIO          (1 +  7)
30861 #define SIZE_NDLTYPE_EXPONENT       (1 +  7)
30862 #define SIZE_NDLTYPE_QUEUESTATUS    (1 +  1)
30863 #define SIZE_NDLTYPE_DCCMECHANISM   (1 +  6)
30864 #define SIZE_BYTE                   (8)
30865 
30866 #define INVALID_ACPRIO          ((1 << SIZE_NDLTYPE_ACPRIO) - 1)
30867 #define INVALID_CONTROLLOOP     ((1 << SIZE_NDLTYPE_CONTROLLOOP) - 1)
30868 #define INVALID_ARRIVALRATE     ((1 << SIZE_NDLTYPE_ARRIVALRATE) - 1)
30869 #define INVALID_CHANNELLOAD     ((1 << SIZE_NDLTYPE_CHANNELLOAD) - 1)
30870 #define INVALID_CHANNELUSE      ((1 << SIZE_NDLTYPE_CHANNELUSE) - 1)
30871 #define INVALID_DATARATE        ((1 << SIZE_NDLTYPE_DATARATE) - 1)
30872 #define INVALID_DISTANCE        ((1 << SIZE_NDLTYPE_DISTANCE) - 1)
30873 #define INVALID_NUMBERELEMENTS  ((1 << SIZE_NDLTYPE_NUMBERELEMENTS) - 1)
30874 #define INVALID_PACKETDURATION  ((1 << SIZE_NDLTYPE_PACKETDURATION) - 1)
30875 #define INVALID_PACKETINTERVAL  ((1 << SIZE_NDLTYPE_PACKETINTERVAL) - 1)
30876 #define INVALID_PATHLOSS        ((1 << SIZE_NDLTYPE_PATHLOSS) - 1)
30877 #define INVALID_RXPOWER         ((1 << SIZE_NDLTYPE_RXPOWER) - 1)
30878 #define INVALID_SNR             ((1 << SIZE_NDLTYPE_SNR) - 1)
30879 #define INVALID_TIMING          ((1 << SIZE_NDLTYPE_TIMING) - 1)
30880 #define INVALID_TXPOWER         ((1 << SIZE_NDLTYPE_TXPOWER) - 1)
30881 #define INVALID_RATIO           ((1 << SIZE_NDLTYPE_RATIO) - 1)
30882 #define INVALID_EXPONENT        ((1 << SIZE_NDLTYPE_EXPONENT) - 1)
30883 #define INVALID_QUEUESTATS      ((1 << SIZE_NDLTYPE_QUEUESTATUS) - 1)
30884 #define INVALID_DCCMECHANISM    ((1 << SIZE_NDLTYPE_DCCMECHANISM) - 1)
30885 
30886 /** The MCS_COUNT macro cannot be modified without breaking
30887  *  WMI compatibility. */
30888 #define MCS_COUNT               (8)
30889 
30890 /** Flags for ndlType_dccMechanism. */
30891 typedef enum {
30892     DCC_MECHANISM_TPC = 1,
30893     DCC_MECHANISM_TRC = 2,
30894     DCC_MECHANISM_TDC = 4,
30895     DCC_MECHANISM_DSC = 8,
30896     DCC_MECHANISM_TAC = 16,
30897     DCC_MECHANISM_RESERVED = 32,
30898     DCC_MECHANISM_ALL = 0x3f,
30899 } wmi_dcc_ndl_type_dcc_mechanism;
30900 
30901 /** Values for ndlType_queueStatus. */
30902 typedef enum {
30903     DCC_QUEUE_CLOSED = 0,
30904     DCC_QUEUE_OPEN = 1,
30905 } wmi_dcc_ndl_type_queue_status;
30906 
30907 /** For ndlType_acPrio, use the values in wmi_traffic_ac. */
30908 
30909 /** Values for ndlType_datarate */
30910 typedef enum {
30911     DCC_DATARATE_3_MBPS = 0,
30912     DCC_DATARATE_4_5_MBPS = 1,
30913     DCC_DATARATE_6_MBPS = 2,
30914     DCC_DATARATE_9_MBPS = 3,
30915     DCC_DATARATE_12_MBPS = 4,
30916     DCC_DATARATE_18_MBPS = 5,
30917     DCC_DATARATE_24_MBPS = 6,
30918     DCC_DATARATE_27_MBPS = 7,
30919 } wmi_dcc_ndl_type_datarate;
30920 
30921 /** Data structure for active state configuration. */
30922 typedef struct {
30923     /** TLV tag and len; tag equals
30924      * WMITLV_TAG_STRUC_wmi_dcc_ndl_active_state_config */
30925     A_UINT32 tlv_header;
30926     /**
30927      * NDL_asStateId, ndlType_numberElements, 1+6 bits.
30928      * NDL_asChanLoad, ndlType_channelLoad, 1+10 bits.
30929      */
30930     A_UINT32 state_info;
30931     /**
30932      * NDL_asDcc(AC_BK), ndlType_dccMechanism, 1+6 bits.
30933      * NDL_asDcc(AC_BE), ndlType_dccMechanism, 1+6 bits.
30934      * NDL_asDcc(AC_VI), ndlType_dccMechanism, 1+6 bits.
30935      * NDL_asDcc(AC_VO), ndlType_dccMechanism, 1+6 bits.
30936      */
30937     A_UINT32 as_dcc[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DCCMECHANISM)];
30938 
30939     /**
30940      * NDL_asTxPower(AC_BK), ndlType_txPower, 1+7 bits.
30941      * NDL_asTxPower(AC_BE), ndlType_txPower, 1+7 bits.
30942      * NDL_asTxPower(AC_VI), ndlType_txPower, 1+7 bits.
30943      * NDL_asTxPower(AC_VO), ndlType_txPower, 1+7 bits.
30944      */
30945     A_UINT32 as_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
30946     /**
30947      * NDL_asPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
30948      * NDL_asPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
30949      * NDL_asPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
30950      * NDL_asPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
30951      */
30952     A_UINT32 as_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)];
30953     /**
30954      * NDL_asDatarate(AC_BK), ndlType_datarate, 1+3 bits.
30955      * NDL_asDatarate(AC_BE), ndlType_datarate, 1+3 bits.
30956      * NDL_asDatarate(AC_VI), ndlType_datarate, 1+3 bits.
30957      * NDL_asDatarate(AC_VO), ndlType_datarate, 1+3 bits.
30958      */
30959     A_UINT32 as_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)];
30960     /**
30961      * NDL_asCarrierSense(AC_BK), ndlType_rxPower, 1+7 bits.
30962      * NDL_asCarrierSense(AC_BE), ndlType_rxPower, 1+7 bits.
30963      * NDL_asCarrierSense(AC_VI), ndlType_rxPower, 1+7 bits.
30964      * NDL_asCarrierSense(AC_VO), ndlType_rxPower, 1+7 bits.
30965      */
30966     A_UINT32 as_carrier_sense_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_RXPOWER)];
30967 } wmi_dcc_ndl_active_state_config;
30968 
30969 #define WMI_NDL_AS_STATE_ID_GET(ptr)                    WMI_GET_BITS((ptr)->state_info, 0, 7)
30970 #define WMI_NDL_AS_STATE_ID_SET(ptr,val)                WMI_SET_BITS((ptr)->state_info, 0, 7, val)
30971 #define WMI_NDL_AS_CHAN_LOAD_GET(ptr)                   WMI_GET_BITS((ptr)->state_info, 7, 11)
30972 #define WMI_NDL_AS_CHAN_LOAD_SET(ptr,val)               WMI_SET_BITS((ptr)->state_info, 7, 11, val)
30973 #define WMI_NDL_AS_DCC_GET(ptr,acprio)                  wmi_packed_arr_get_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM)
30974 #define WMI_NDL_AS_DCC_SET(ptr,acprio,val)              wmi_packed_arr_set_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM, val)
30975 #define WMI_NDL_AS_TX_POWER_GET(ptr,acprio)             wmi_packed_arr_get_bits((ptr)->as_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
30976 #define WMI_NDL_AS_TX_POWER_SET(ptr,acprio,val)         wmi_packed_arr_set_bits((ptr)->as_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER, val)
30977 #define WMI_NDL_AS_PACKET_INTERVAL_GET(ptr,acprio)      wmi_packed_arr_get_bits((ptr)->as_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
30978 #define WMI_NDL_AS_PACKET_INTERVAL_SET(ptr,acprio,val)  wmi_packed_arr_set_bits((ptr)->as_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL, val)
30979 #define WMI_NDL_AS_DATARATE_GET(ptr,acprio)             wmi_packed_arr_get_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
30980 #define WMI_NDL_AS_DATARATE_SET(ptr,acprio,val)         wmi_packed_arr_set_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
30981 #define WMI_NDL_AS_CARRIER_SENSE_GET(ptr,acprio)        wmi_packed_arr_get_bits((ptr)->as_carrier_sense_ac, acprio, SIZE_NDLTYPE_RXPOWER)
30982 #define WMI_NDL_AS_CARRIER_SENSE_SET(ptr,acprio,val)    wmi_packed_arr_set_bits((ptr)->as_carrier_sense_ac, acprio, SIZE_NDLTYPE_RXPOWER, val)
30983 
30984 /** Data structure for EDCA/QOS parameters. */
30985 typedef struct
30986 {
30987     /** TLV tag and len; tag equals
30988      * WMITLV_TAG_STRUC_wmi_qos_parameter */
30989     A_UINT32 tlv_header;
30990     /** Arbitration Inter-Frame Spacing. Range: 2-15 */
30991     A_UINT32 aifsn;
30992     /** Contention Window minimum. Range: 1 - 10 */
30993     A_UINT32 cwmin;
30994     /** Contention Window maximum. Range: 1 - 10 */
30995     A_UINT32 cwmax;
30996 } wmi_qos_parameter;
30997 
30998 /** Data structure for information specific to a channel. */
30999 typedef struct {
31000     /** TLV tag and len; tag equals
31001      * WMITLV_TAG_STRUC_wmi_ocb_channel */
31002     A_UINT32 tlv_header;
31003     A_UINT32 bandwidth; /* MHz units */
31004     wmi_mac_addr mac_address;
31005 } wmi_ocb_channel;
31006 
31007 /** Data structure for an element of the schedule array. */
31008 typedef struct {
31009     /** TLV tag and len; tag equals
31010      * WMITLV_TAG_STRUC_wmi_ocb_schedule_element */
31011     A_UINT32 tlv_header;
31012     A_UINT32 channel_freq; /* MHz units */
31013     A_UINT32 total_duration; /* ms units */
31014     A_UINT32 guard_interval; /* ms units */
31015 } wmi_ocb_schedule_element;
31016 
31017 /** Data structure for OCB configuration. */
31018 typedef struct {
31019     /** TLV tag and len; tag equals
31020      * WMITLV_TAG_STRUC_wmi_ocb_set_config_cmd_fixed_param */
31021     A_UINT32 tlv_header;
31022     /** VDEV id(interface) that is being configured */
31023     A_UINT32 vdev_id;
31024     A_UINT32 channel_count;
31025     A_UINT32 schedule_size;
31026     A_UINT32 flags;
31027     A_UINT32 ta_max_duration; /* Max duration of continuing multichannel operation without receiving a TA frame (units = seconds) */
31028 
31029     /** This is followed by a TLV array of wmi_channel. */
31030     /** This is followed by a TLV array of wmi_ocb_channel. */
31031     /** This is followed by a TLV array of wmi_qos_parameter. */
31032     /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
31033     /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
31034     /** This is followed by a TLV array of wmi_ocb_schedule_element. */
31035 } wmi_ocb_set_config_cmd_fixed_param;
31036 
31037 #define EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET     0
31038 #define EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK       1
31039 
31040 #define WMI_OCB_EXPIRY_TIME_IN_TSF(ptr)     (((ptr)->flags & EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK) >> EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET)
31041 
31042 
31043 /** Data structure for the response to the WMI_OCB_SET_CONFIG_CMDID command. */
31044 typedef struct {
31045     /** TLV tag and len; tag equals
31046      *  WMITLV_TAG_STRUC_wmi_ocb_set_config_resp_event_fixed_param */
31047     A_UINT32 tlv_header;
31048     /* VDEV identifier */
31049     A_UINT32 vdev_id;
31050     A_UINT32 status;
31051 } wmi_ocb_set_config_resp_event_fixed_param;
31052 
31053 /* SIZE_UTC_TIME and SIZE_UTC_TIME_ERROR cannot be modified without breaking
31054    WMI compatibility. */
31055 #define SIZE_UTC_TIME (10) /* The size of the utc time in bytes. */
31056 #define SIZE_UTC_TIME_ERROR (5) /* The size of the utc time error in bytes. */
31057 
31058 /** Data structure to set the UTC time. */
31059 typedef struct {
31060     /** TLV tag and len; tag equals
31061      *  WMITLV_TAG_STRUC_wmi_ocb_set_utc_time_cmd_fixed_param */
31062     A_UINT32 tlv_header;
31063     /* VDEV identifier */
31064     A_UINT32 vdev_id;
31065     /** 10 bytes of the utc time. */
31066     A_UINT32 utc_time[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME,SIZE_BYTE)];
31067     /** 5 bytes of the time error. */
31068     A_UINT32 time_error[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME_ERROR,SIZE_BYTE)];
31069 } wmi_ocb_set_utc_time_cmd_fixed_param;
31070 
31071 #define WMI_UTC_TIME_GET(ptr,byte_index)        wmi_packed_arr_get_bits((ptr)->utc_time, byte_index, SIZE_BYTE)
31072 #define WMI_UTC_TIME_SET(ptr,byte_index,val)    wmi_packed_arr_set_bits((ptr)->utc_time, byte_index, SIZE_BYTE, val)
31073 #define WMI_TIME_ERROR_GET(ptr,byte_index)      wmi_packed_arr_get_bits((ptr)->time_error, byte_index, SIZE_BYTE)
31074 #define WMI_TIME_ERROR_SET(ptr,byte_index,val)  wmi_packed_arr_set_bits((ptr)->time_error, byte_index, SIZE_BYTE, val)
31075 
31076 /** Data structure start the timing advertisement. The template for the
31077  *  timing advertisement frame follows this structure in the WMI command.
31078  */
31079 typedef struct {
31080     /** TLV tag and len; tag equals
31081      *  WMITLV_TAG_STRUC_wmi_ocb_start_timing_advert_cmd_fixed_param */
31082     A_UINT32 tlv_header;
31083     /* VDEV identifier */
31084     A_UINT32 vdev_id;
31085     /** Number of times the TA is sent every 5 seconds. */
31086     A_UINT32 repeat_rate;
31087     /** The frequency on which to transmit. */
31088     A_UINT32 channel_freq; /* MHz units */
31089     /** The offset into the template of the timestamp. */
31090     A_UINT32 timestamp_offset;
31091     /** The offset into the template of the time value. */
31092     A_UINT32 time_value_offset;
31093     /** The length of the timing advertisement template. The
31094      *  template is in the TLV data. */
31095     A_UINT32 timing_advert_template_length;
31096 
31097     /** This is followed by a binary array containing the TA template. */
31098 } wmi_ocb_start_timing_advert_cmd_fixed_param;
31099 
31100 /** Data structure to stop the timing advertisement. */
31101 typedef struct {
31102     /** TLV tag and len; tag equals
31103      *  WMITLV_TAG_STRUC_wmi_ocb_stop_timing_advert_cmd_fixed_param */
31104     A_UINT32 tlv_header;
31105     /* VDEV identifier */
31106     A_UINT32 vdev_id;
31107     A_UINT32 channel_freq; /* MHz units */
31108 } wmi_ocb_stop_timing_advert_cmd_fixed_param;
31109 
31110 /** Data structure for the request for WMI_OCB_GET_TSF_TIMER_CMDID. */
31111 typedef struct {
31112     /** TLV tag and len; tag equals
31113      *  WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_cmd_fixed_param */
31114     A_UINT32 tlv_header;
31115     /* VDEV identifier */
31116     A_UINT32 vdev_id;
31117     A_UINT32 reserved;
31118 } wmi_ocb_get_tsf_timer_cmd_fixed_param;
31119 
31120 /** Data structure for the response to WMI_OCB_GET_TSF_TIMER_CMDID. */
31121 typedef struct {
31122     /** TLV tag and len; tag equals
31123      *  WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_resp_event_fixed_param */
31124     A_UINT32 tlv_header;
31125     /* VDEV identifier */
31126     A_UINT32 vdev_id;
31127     A_UINT32 tsf_timer_high;
31128     A_UINT32 tsf_timer_low;
31129 } wmi_ocb_get_tsf_timer_resp_event_fixed_param;
31130 
31131 /** Data structure for DCC stats configuration per channel. */
31132 typedef struct {
31133     /** TLV tag and len; tag equals
31134      *  WMITLV_TAG_STRUC_wmi_dcc_ndl_stats_per_channel */
31135     A_UINT32 tlv_header;
31136 
31137     /** The channel for which this applies, 16 bits. */
31138     /** The dcc_stats_bitmap, 8 bits. */
31139     A_UINT32 chan_info;
31140 
31141     /** Demodulation model parameters. */
31142     /**
31143      * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
31144      * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
31145      * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
31146      * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
31147      * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
31148      * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
31149      * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
31150      * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
31151      */
31152     A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT,SIZE_NDLTYPE_SNR)];
31153 
31154     /** Communication ranges. */
31155     /**
31156      * tx_power, ndlType_txPower, 1+7 bits.
31157      * datarate, ndlType_datarate, 1+3 bits.
31158      */
31159     A_UINT32 tx_power_datarate;
31160     /**
31161      * NDL_carrierSenseRange, ndlType_distance, 1+12 bits.
31162      * NDL_estCommRange, ndlType_distance, 1+12 bits.
31163      */
31164     A_UINT32 carrier_sense_est_comm_range;
31165 
31166     /** Channel load measures. */
31167     /**
31168      * dccSensitivity, ndlType_rxPower, 1+7 bits.
31169      * carrierSense, ndlType_rxPower, 1+7 bits.
31170      * NDL_channelLoad, ndlType_channelLoad, 1+10 bits.
31171      */
31172     A_UINT32 dcc_stats;
31173     /**
31174      * NDL_packetArrivalRate, ndlType_arrivalRate, 1+13 bits.
31175      * NDL_packetAvgDuration, ndlType_packetDuration, 1+11 bits.
31176      */
31177     A_UINT32 packet_stats;
31178     /**
31179      * NDL_channelBusyTime, ndlType_channelLoad, 1+10 bits.
31180      */
31181     A_UINT32 channel_busy_time;
31182 
31183     /** Transmit packet statistics. */
31184     /**
31185      * NDL_txPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
31186      * NDL_txPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
31187      * NDL_txPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
31188      * NDL_txPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
31189      */
31190     A_UINT32 tx_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_ARRIVALRATE)];
31191     /**
31192      * NDL_txPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
31193      * NDL_txPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
31194      * NDL_txPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
31195      * NDL_txPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
31196      */
31197     A_UINT32 tx_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETDURATION)];
31198     /**
31199      * NDL_txChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
31200      * NDL_txChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
31201      * NDL_txChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
31202      * NDL_txChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
31203      */
31204     A_UINT32 tx_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_CHANNELUSE)];
31205     /**
31206      * NDL_txSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
31207      * NDL_txSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
31208      * NDL_txSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
31209      * NDL_txSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
31210      */
31211     A_UINT32 tx_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_TXPOWER)];
31212 } wmi_dcc_ndl_stats_per_channel;
31213 
31214 #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr,mcs)      wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
31215 #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr,mcs,val)  wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
31216 
31217 #define WMI_NDL_STATS_CHAN_FREQ_GET(ptr)            WMI_GET_BITS((ptr)->chan_info, 0, 16)
31218 #define WMI_NDL_STATS_CHAN_FREQ_SET(ptr,val)        WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
31219 #define WMI_NDL_STATS_DCC_STATS_BITMAP_GET(ptr)     WMI_GET_BITS((ptr)->chan_info, 16, 8)
31220 #define WMI_NDL_STATS_DCC_STATS_BITMAP_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 16, 8, val)
31221 
31222 #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr,mcs)      wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
31223 #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr,mcs,val)  wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
31224 
31225 #define WMI_TX_POWER_GET(ptr)                       WMI_GET_BITS((ptr)->tx_power_datarate, 0, 8)
31226 #define WMI_TX_POWER_SET(ptr,val)                   WMI_SET_BITS((ptr)->tx_power_datarate, 0, 8, val)
31227 #define WMI_TX_DATARATE_GET(ptr)                    WMI_GET_BITS((ptr)->tx_power_datarate, 0, 4)
31228 #define WMI_TX_DATARATE_SET(ptr,val)                WMI_SET_BITS((ptr)->tx_power_datarate, 0, 4, val)
31229 #define WMI_NDL_CARRIER_SENSE_RANGE_GET(ptr)        WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13)
31230 #define WMI_NDL_CARRIER_SENSE_RANGE_SET(ptr,val)    WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13, val)
31231 #define WMI_NDL_EST_COMM_RANGE_GET(ptr)             WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13)
31232 #define WMI_NDL_EST_COMM_RANGE_SET(ptr,val)         WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13, val)
31233 
31234 #define WMI_DCC_SENSITIVITY_GET(ptr)                WMI_GET_BITS((ptr)->dcc_stats, 0, 8)
31235 #define WMI_DCC_SENSITIVITY_SET(ptr,val)            WMI_SET_BITS((ptr)->dcc_stats, 0, 8, val)
31236 #define WMI_CARRIER_SENSE_GET(ptr)                  WMI_GET_BITS((ptr)->dcc_stats, 8, 8)
31237 #define WMI_CARRIER_SENSE_SET(ptr,val)              WMI_SET_BITS((ptr)->dcc_stats, 8, 8, val)
31238 #define WMI_NDL_CHANNEL_LOAD_GET(ptr)               WMI_GET_BITS((ptr)->dcc_stats, 16, 11)
31239 #define WMI_NDL_CHANNEL_LOAD_SET(ptr,val)           WMI_SET_BITS((ptr)->dcc_stats, 16, 11, val)
31240 #define WMI_NDL_PACKET_ARRIVAL_RATE_GET(ptr)        WMI_GET_BITS((ptr)->packet_stats, 0, 14)
31241 #define WMI_NDL_PACKET_ARRIVAL_RATE_SET(ptr,val)    WMI_SET_BITS((ptr)->packet_stats, 0, 14, val)
31242 #define WMI_NDL_PACKET_AVG_DURATION_GET(ptr)        WMI_GET_BITS((ptr)->packet_stats, 14, 12)
31243 #define WMI_NDL_PACKET_AVG_DURATION_SET(ptr,val)    WMI_SET_BITS((ptr)->packet_stats, 14, 12, val)
31244 #define WMI_NDL_CHANNEL_BUSY_TIME_GET(ptr)          WMI_GET_BITS((ptr)->channel_busy_time, 0, 11)
31245 #define WMI_NDL_CHANNEL_BUSY_TIME_SET(ptr,val)      WMI_SET_BITS((ptr)->channel_busy_time, 0, 11, val)
31246 
31247 #define WMI_NDL_TX_PACKET_ARRIVAL_RATE_GET(ptr,acprio)          wmi_packed_arr_get_bits((ptr)->tx_packet_arrival_rate_ac, acprio, SIZE_NDLTYPE_ARRIVALRATE)
31248 #define WMI_NDL_TX_PACKET_ARRIVAL_RATE_SET(ptr,acprio,val)      wmi_packed_arr_set_bits((ptr)->tx_packet_arrival_rate_ac, acprio, SIZE_NDLTYPE_ARRIVALRATE, val)
31249 #define WMI_NDL_TX_PACKET_AVG_DURATION_GET(ptr,acprio)          wmi_packed_arr_get_bits((ptr)->tx_packet_avg_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION)
31250 #define WMI_NDL_TX_PACKET_AVG_DURATION_SET(ptr,acprio,val)      wmi_packed_arr_set_bits((ptr)->tx_packet_avg_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION, val)
31251 #define WMI_NDL_TX_CHANNEL_USE_GET(ptr,acprio)                  wmi_packed_arr_get_bits((ptr)->tx_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
31252 #define WMI_NDL_TX_CHANNEL_USE_SET(ptr,acprio,val)              wmi_packed_arr_set_bits((ptr)->tx_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE, val)
31253 #define WMI_NDL_TX_SIGNAL_AVG_POWER_GET(ptr,acprio)             wmi_packed_arr_get_bits((ptr)->tx_signal_avg_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
31254 #define WMI_NDL_TX_SIGNAL_AVG_POWER_SET(ptr,acprio,val)         wmi_packed_arr_set_bits((ptr)->tx_signal_avg_power_ac, acprio, SIZE_NDLTYPE_TXPOWER, val)
31255 
31256 /** Bitmap for DCC stats. */
31257 typedef enum {
31258     DCC_STATS_DEMODULATION_MODEL = 1,
31259     DCC_STATS_COMMUNICATION_RANGES = 2,
31260     DCC_STATS_CHANNEL_LOAD_MEASURES = 4,
31261     DCC_STATS_TRANSMIT_PACKET_STATS = 8,
31262     DCC_STATS_TRANSMIT_MODEL_PARAMETER = 16,
31263     DCC_STATS_ALL = 0xff,
31264 } wmi_dcc_stats_bitmap;
31265 
31266 /** Data structure for getting the DCC stats. */
31267 typedef struct {
31268     /** TLV tag and len; tag equals
31269      *  WMITLV_TAG_STRUC_wmi_dcc_get_stats_cmd_fixed_param */
31270     A_UINT32 tlv_header;
31271 
31272     /* VDEV identifier */
31273     A_UINT32 vdev_id;
31274 
31275     /** The number of channels for which stats are being requested. */
31276     A_UINT32 num_channels;
31277 
31278     /** This is followed by a TLV array of wmi_dcc_channel_stats_request. */
31279 } wmi_dcc_get_stats_cmd_fixed_param;
31280 
31281 typedef struct {
31282     /** TLV tag and len; tag equals
31283      *  WMITLV_TAG_STRUC_wmi_dcc_channel_stats_request */
31284     A_UINT32 tlv_header;
31285 
31286     /** The channel for which this applies. */
31287     A_UINT32 chan_freq; /* MHz units */
31288 
31289     /** The DCC stats being requested. */
31290     A_UINT32 dcc_stats_bitmap;
31291 } wmi_dcc_channel_stats_request;
31292 
31293 /** Data structure for the response with the DCC stats. */
31294 typedef struct {
31295     /** TLV tag and len; tag equals
31296      *  WMITLV_TAG_STRUC_wmi_dcc_get_stats_resp_event_fixed_param */
31297     A_UINT32 tlv_header;
31298     /* VDEV identifier */
31299     A_UINT32 vdev_id;
31300     /** Number of channels in the response. */
31301     A_UINT32 num_channels;
31302     /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
31303 } wmi_dcc_get_stats_resp_event_fixed_param;
31304 
31305 /** Data structure for clearing the DCC stats. */
31306 typedef struct {
31307     /** TLV tag and len; tag equals
31308      *  WMITLV_TAG_STRUC_wmi_dcc_clear_stats_cmd_fixed_param */
31309     A_UINT32 tlv_header;
31310     /* VDEV identifier */
31311     A_UINT32 vdev_id;
31312     A_UINT32 dcc_stats_bitmap;
31313 } wmi_dcc_clear_stats_cmd_fixed_param;
31314 
31315 /** Data structure for the pushed DCC stats */
31316 typedef struct {
31317     /** TLV tag and len; tag equals
31318      *  WMITLV_TAG_STRUC_wmi_dcc_stats_event_fixed_param */
31319     A_UINT32 tlv_header;
31320     /* VDEV identifier */
31321     A_UINT32 vdev_id;
31322     /** The number of channels in the response. */
31323     A_UINT32 num_channels;
31324 
31325     /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
31326 } wmi_dcc_stats_event_fixed_param;
31327 
31328 /** Data structure for updating NDL per channel. */
31329 typedef struct {
31330     /** TLV tag and len; tag equals
31331      *  WMITLV_TAG_STRUC_wmi_dcc_ndl_chan */
31332     A_UINT32 tlv_header;
31333 
31334     /**
31335      * Channel frequency, 16 bits
31336      * NDL_numActiveState, ndlType_numberElements, 1+6 bits
31337      */
31338     A_UINT32 chan_info;
31339 
31340     /**
31341      *  NDL_minDccSampling, 10 bits.
31342      *      Maximum time interval between subsequent checks of the DCC rules.
31343      */
31344     A_UINT32 ndl_min_dcc_sampling;
31345 
31346     /**
31347      * dcc_enable, 1 bit.
31348      * dcc_stats_enable, 1 bit.
31349      * dcc_stats_interval, 16 bits.
31350      */
31351     A_UINT32 dcc_flags;
31352 
31353     /** General DCC configuration. */
31354     /**
31355      * NDL_timeUp, ndlType_timing, 1+12 bits.
31356      * NDL_timeDown, ndlType_timing, 1+12 bits.
31357      */
31358     A_UINT32 general_config;
31359 
31360     /** Transmit power thresholds. */
31361     /**
31362      * NDL_minTxPower, ndlType_txPower, 1+7 bits.
31363      * NDL_maxTxPower, ndlType_txPower, 1+7 bits.
31364      */
31365     A_UINT32 min_max_tx_power; /* see "ETSI TS 102 687" table above for units */
31366     /**
31367      * NDL_defTxPower(AC_BK), ndlType_txPower, 1+7 bits.
31368      * NDL_defTxPower(AC_BE), ndlType_txPower, 1+7 bits.
31369      * NDL_defTxPower(AC_VI), ndlType_txPower, 1+7 bits.
31370      * NDL_defTxPower(AC_VO), ndlType_txPower, 1+7 bits.
31371      */
31372     /* see "ETSI TS 102 687" table above for units */
31373     A_UINT32 def_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_TXPOWER)];
31374 
31375     /** Packet timing thresholds. */
31376     /**
31377      * NDL_maxPacketDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
31378      * NDL_maxPacketDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
31379      * NDL_maxPacketDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
31380      * NDL_maxPacketDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
31381      */
31382     A_UINT32 max_packet_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETDURATION)];
31383     /**
31384      * NDL_minPacketInterval, ndlType_packetInterval, 1+10 bits.
31385      * NDL_maxPacketInterval, ndlType_packetInterval, 1+10 bits.
31386      */
31387     A_UINT32 min_max_packet_interval;
31388     /**
31389      * NDL_defPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
31390      * NDL_defPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
31391      * NDL_defPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
31392      * NDL_defPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
31393      */
31394     A_UINT32 def_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETINTERVAL)];
31395 
31396     /** Packet datarate thresholds. */
31397     /**
31398      * NDL_minDatarate, ndlType_datarate, 1+3 bits.
31399      * NDL_maxDatarate, ndlType_datarate, 1+3 bits.
31400      */
31401     A_UINT32 min_max_datarate;
31402     /**
31403      * NDL_defDatarate(AC_BK), ndlType_datarate, 1+3 bits.
31404      * NDL_defDatarate(AC_BE), ndlType_datarate, 1+3 bits.
31405      * NDL_defDatarate(AC_VI), ndlType_datarate, 1+3 bits.
31406      * NDL_defDatarate(AC_VO), ndlType_datarate, 1+3 bits.
31407      */
31408     A_UINT32 def_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_DATARATE)];
31409 
31410     /** Receive signal thresholds. */
31411     /**
31412      * NDL_minCarrierSense, ndlType_rxPower, 1+7 bits.
31413      * NDL_maxCarrierSense, ndlType_rxPower, 1+7 bits.
31414      * NDL_defCarrierSense, ndlType_rxPower, 1+7 bits.
31415      */
31416     A_UINT32 min_max_def_carrier_sense;
31417 
31418     /** Receive model parameter. */
31419     /**
31420      * NDL_defDccSensitivity, ndlType_rxPower, 1+7 bits.
31421      * NDL_maxCsRange, ndlType_distance, 1+12 bits.
31422      * NDL_refPathLoss, ndlType_pathloss, 1+5 bits.
31423      */
31424     A_UINT32 receive_model_parameter;
31425 
31426     /**
31427      * NDL_minSNR, ndlType_snr, 1+7 bits.
31428      */
31429     A_UINT32 receive_model_parameter_2;
31430 
31431     /** Demodulation model parameters. */
31432     /**
31433      * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
31434      * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
31435      * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
31436      * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
31437      * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
31438      * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
31439      * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
31440      * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
31441      */
31442     A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT,SIZE_NDLTYPE_SNR)];
31443 
31444     /** Transmit model parameters. */
31445     /**
31446      * NDL_tmPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
31447      * NDL_tmPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
31448      * NDL_tmPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
31449      * NDL_tmPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
31450      */
31451     A_UINT32 tm_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)];
31452     /**
31453      * NDL_tmPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
31454      * NDL_tmPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
31455      * NDL_tmPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
31456      * NDL_tmPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
31457      */
31458     A_UINT32 tm_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
31459     /**
31460      * NDL_tmSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
31461      * NDL_tmSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
31462      * NDL_tmSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
31463      * NDL_tmSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
31464      */
31465     A_UINT32 tm_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
31466     /**
31467      * NDL_tmMaxChannelUse, ndlType_channelUse, 1+13 bits.
31468      */
31469     A_UINT32 tm_max_channel_use;
31470     /**
31471      * NDL_tmChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
31472      * NDL_tmChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
31473      * NDL_tmChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
31474      * NDL_tmChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
31475      */
31476     A_UINT32 tm_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)];
31477 
31478     /** Channel load thresholds. */
31479     /**
31480      * NDL_minChannelLoad, ndlType_channelLoad, 1+10 bits.
31481      * NDL_maxChannelLoad, ndlType_channelLoad, 1+10 bits.
31482      */
31483     A_UINT32 min_max_channel_load;
31484 
31485     /** Transmit queue parameters. */
31486     /**
31487      * NDL_numQueue, ndlType_acPrio, 1+3 bits.
31488      * NDL_refQueueStatus(AC_BK), ndlType_queueStatus, 1+1 bit.
31489      * NDL_refQueueStatus(AC_BE), ndlType_queueStatus, 1+1 bit.
31490      * NDL_refQueueStatus(AC_VI), ndlType_queueStatus, 1+1 bit.
31491      * NDL_refQueueStatus(AC_VO), ndlType_queueStatus, 1+1 bit.
31492      */
31493     A_UINT32 transmit_queue_parameters;
31494 
31495     /**
31496      * NDL_refQueueLen(AC_BK), ndlType_numberElements, 1+6 bits.
31497      * NDL_refQueueLen(AC_BE), ndlType_numberElements, 1+6 bits.
31498      * NDL_refQueueLen(AC_VI), ndlType_numberElements, 1+6 bits.
31499      * NDL_refQueueLen(AC_VO), ndlType_numberElements, 1+6 bits.
31500      */
31501     A_UINT32 numberElements[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_NUMBERELEMENTS)];
31502 
31503 } wmi_dcc_ndl_chan;
31504 
31505 #define WMI_CHAN_FREQ_GET(ptr)                  WMI_GET_BITS((ptr)->chan_info, 0, 16)
31506 #define WMI_CHAN_FREQ_SET(ptr,val)              WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
31507 #define WMI_NDL_NUM_ACTIVE_STATE_GET(ptr)       WMI_GET_BITS((ptr)->chan_info, 16, 7)
31508 #define WMI_NDL_NUM_ACTIVE_STATE_SET(ptr,val)   WMI_SET_BITS((ptr)->chan_info, 16, 7, val)
31509 
31510 #define WMI_NDL_MIN_DCC_SAMPLING_GET(ptr)       WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10)
31511 #define WMI_NDL_MIN_DCC_SAMPLING_SET(ptr,val)   WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10, val)
31512 #define WMI_NDL_MEASURE_INTERVAL_GET(ptr)       WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16)
31513 #define WMI_NDL_MEASURE_INTERVAL_SET(ptr,val)   WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16, val)
31514 
31515 #define WMI_NDL_DCC_ENABLE_GET(ptr)             WMI_GET_BITS((ptr)->dcc_flags, 0, 1)
31516 #define WMI_NDL_DCC_ENABLE_SET(ptr,val)         WMI_SET_BITS((ptr)->dcc_flags, 0, 1, val)
31517 #define WMI_NDL_DCC_STATS_ENABLE_GET(ptr)       WMI_GET_BITS((ptr)->dcc_flags, 1, 1)
31518 #define WMI_NDL_DCC_STATS_ENABLE_SET(ptr,val)   WMI_SET_BITS((ptr)->dcc_flags, 1, 1, val)
31519 #define WMI_NDL_DCC_STATS_INTERVAL_GET(ptr)     WMI_GET_BITS((ptr)->dcc_flags, 2, 16)
31520 #define WMI_NDL_DCC_STATS_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 2, 16, val)
31521 
31522 #define WMI_NDL_TIME_UP_GET(ptr)                WMI_GET_BITS((ptr)->general_config, 0, 13)
31523 #define WMI_NDL_TIME_UP_SET(ptr,val)            WMI_SET_BITS((ptr)->general_config, 0, 13, val)
31524 #define WMI_NDL_TIME_DOWN_GET(ptr)              WMI_GET_BITS((ptr)->general_config, 13, 13)
31525 #define WMI_NDL_TIME_DOWN_SET(ptr,val)          WMI_SET_BITS((ptr)->general_config, 13, 13, val)
31526 
31527 #define WMI_NDL_MIN_TX_POWER_GET(ptr)       WMI_GET_BITS((ptr)->min_max_tx_power, 0, 8)
31528 #define WMI_NDL_MIN_TX_POWER_SET(ptr,val)   WMI_SET_BITS((ptr)->min_max_tx_power, 0, 8, val)
31529 #define WMI_NDL_MAX_TX_POWER_GET(ptr)       WMI_GET_BITS((ptr)->min_max_tx_power, 8, 8)
31530 #define WMI_NDL_MAX_TX_POWER_SET(ptr,val)   WMI_SET_BITS((ptr)->min_max_tx_power, 8, 8, val)
31531 
31532 #define WMI_NDL_DEF_TX_POWER_GET(ptr,acprio)        wmi_packed_arr_get_bits((ptr)->def_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
31533 #define WMI_NDL_DEF_TX_POWER_SET(ptr,acprio,val)    wmi_packed_arr_set_bits((ptr)->def_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER, val)
31534 
31535 #define WMI_NDL_MAX_PACKET_DURATION_GET(ptr,acprio)     wmi_packed_arr_get_bits((ptr)->max_packet_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION)
31536 #define WMI_NDL_MAX_PACKET_DURATION_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->max_packet_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION, val)
31537 #define WMI_NDL_MIN_PACKET_INTERVAL_GET(ptr)            WMI_GET_BITS((ptr)->min_max_packet_interval, 0, 11)
31538 #define WMI_NDL_MIN_PACKET_INTERVAL_SET(ptr,val)        WMI_SET_BITS((ptr)->min_max_packet_interval, 0, 11, val)
31539 #define WMI_NDL_MAX_PACKET_INTERVAL_GET(ptr)            WMI_GET_BITS((ptr)->min_max_packet_interval, 11, 11)
31540 #define WMI_NDL_MAX_PACKET_INTERVAL_SET(ptr,val)        WMI_SET_BITS((ptr)->min_max_packet_interval, 11, 11, val)
31541 #define WMI_NDL_DEF_PACKET_INTERVAL_GET(ptr,acprio)     wmi_packed_arr_get_bits((ptr)->def_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
31542 #define WMI_NDL_DEF_PACKET_INTERVAL_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->def_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL, val)
31543 
31544 #define WMI_NDL_MIN_DATARATE_GET(ptr)               WMI_GET_BITS((ptr)->min_max_datarate, 0, 4)
31545 #define WMI_NDL_MIN_DATARATE_SET(ptr,val)           WMI_SET_BITS((ptr)->min_max_datarate, 0, 4, val)
31546 #define WMI_NDL_MAX_DATARATE_GET(ptr)               WMI_GET_BITS((ptr)->min_max_datarate, 4, 4)
31547 #define WMI_NDL_MAX_DATARATE_SET(ptr,val)           WMI_SET_BITS((ptr)->min_max_datarate, 4, 4, val)
31548 #define WMI_NDL_DEF_DATARATE_GET(ptr,acprio)        wmi_packed_arr_get_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
31549 #define WMI_NDL_DEF_DATARATE_SET(ptr,acprio,val)    wmi_packed_arr_set_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
31550 
31551 #define WMI_NDL_MIN_CARRIER_SENSE_GET(ptr)      WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 0, 8)
31552 #define WMI_NDL_MIN_CARRIER_SENSE_SET(ptr,val)  WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 0, 8, val)
31553 #define WMI_NDL_MAX_CARRIER_SENSE_GET(ptr)      WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 8, 8)
31554 #define WMI_NDL_MAX_CARRIER_SENSE_SET(ptr,val)  WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 8, 8, val)
31555 #define WMI_NDL_DEF_CARRIER_SENSE_GET(ptr)      WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 16, 8)
31556 #define WMI_NDL_DEF_CARRIER_SENSE_SET(ptr,val)  WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 16, 8, val)
31557 
31558 #define WMI_NDL_DEF_DCC_SENSITIVITY_GET(ptr)        WMI_GET_BITS((ptr)->receive_model_parameter, 0, 8)
31559 #define WMI_NDL_DEF_DCC_SENSITIVITY_SET(ptr,val)    WMI_SET_BITS((ptr)->receive_model_parameter, 0, 8, val)
31560 #define WMI_NDL_MAX_CS_RANGE_GET(ptr)               WMI_GET_BITS((ptr)->receive_model_parameter, 8, 13)
31561 #define WMI_NDL_MAX_CS_RANGE_SET(ptr,val)           WMI_SET_BITS((ptr)->receive_model_parameter, 8, 13, val)
31562 #define WMI_NDL_REF_PATH_LOSS_GET(ptr)              WMI_GET_BITS((ptr)->receive_model_parameter, 21, 6)
31563 #define WMI_NDL_REF_PATH_LOSS_SET(ptr,val)          WMI_SET_BITS((ptr)->receive_model_parameter, 21, 6, val)
31564 
31565 #define WMI_NDL_MIN_SNR_GET(ptr)                    WMI_GET_BITS((ptr)->receive_model_parameter_2, 0, 8)
31566 #define WMI_NDL_MIN_SNR_SET(ptr,val)                WMI_SET_BITS((ptr)->receive_model_parameter_2, 0, 8, val)
31567 
31568 #define WMI_NDL_SNR_BACKOFF_GET(ptr,mcs)        wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
31569 #define WMI_NDL_SNR_BACKOFF_SET(ptr,mcs,val)    wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
31570 
31571 #define WMI_NDL_TM_PACKET_ARRIVAL_RATE_GET(ptr,acprio)      wmi_packed_arr_get_bits((ptr)->tm_packet_arrival_rate_ac, acprio, SIZE_NDLTYPE_ARRIVALRATE)
31572 #define WMI_NDL_TM_PACKET_ARRIVAL_RATE_SET(ptr,acprio,val)  wmi_packed_arr_set_bits((ptr)->tm_packet_arrival_rate_ac, acprio, SIZE_NDLTYPE_ARRIVALRATE, val)
31573 #define WMI_NDL_TM_PACKET_AVG_DURATION_GET(ptr,acprio)      wmi_packed_arr_get_bits((ptr)->tm_packet_avg_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION)
31574 #define WMI_NDL_TM_PACKET_AVG_DURATION_SET(ptr,acprio,val)  wmi_packed_arr_set_bits((ptr)->tm_packet_avg_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION, val)
31575 #define WMI_NDL_TM_SIGNAL_AVG_POWER_GET(ptr,acprio)         wmi_packed_arr_get_bits((ptr)->tm_signal_avg_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
31576 #define WMI_NDL_TM_SIGNAL_AVG_POWER_SET(ptr,acprio,val)     wmi_packed_arr_set_bits((ptr)->tm_signal_avg_power_ac, acprio, SIZE_NDLTYPE_TXPOWER, val)
31577 #define WMI_NDL_TM_MAX_CHANNEL_USE_GET(ptr)                 WMI_GET_BITS((ptr)->tm_max_channel_use, 0, 14)
31578 #define WMI_NDL_TM_MAX_CHANNEL_USE_SET(ptr,val)             WMI_SET_BITS((ptr)->tm_max_channel_use, 0, 14, val)
31579 #define WMI_NDL_TM_CHANNEL_USE_GET(ptr,acprio)              wmi_packed_arr_get_bits((ptr)->tm_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
31580 #define WMI_NDL_TM_CHANNEL_USE_SET(ptr,acprio,val)          wmi_packed_arr_set_bits((ptr)->tm_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE, val)
31581 
31582 #define WMI_NDL_MIN_CHANNEL_LOAD_GET(ptr)       WMI_GET_BITS((ptr)->min_max_channel_load, 0, 11)
31583 #define WMI_NDL_MIN_CHANNEL_LOAD_SET(ptr,val)   WMI_SET_BITS((ptr)->min_max_channel_load, 0, 11, val)
31584 #define WMI_NDL_MAX_CHANNEL_LOAD_GET(ptr)       WMI_GET_BITS((ptr)->min_max_channel_load, 11, 11)
31585 #define WMI_NDL_MAX_CHANNEL_LOAD_SET(ptr,val)   WMI_SET_BITS((ptr)->min_max_channel_load, 11, 11, val)
31586 
31587 #define WMI_NDL_NUM_QUEUE_GET(ptr)                      WMI_GET_BITS((ptr)->transmit_queue_parameters, 0, 4)
31588 #define WMI_NDL_NUM_QUEUE_SET(ptr,val)                  WMI_SET_BITS((ptr)->transmit_queue_parameters, 0, 4, val)
31589 #define WMI_NDL_REF_QUEUE_STATUS_GET(ptr,acprio)        WMI_GET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2)
31590 #define WMI_NDL_REF_QUEUE_STATUS_SET(ptr,acprio,val)    WMI_SET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2, val)
31591 #define WMI_NDL_REF_QUEUE_LEN_GET(ptr,acprio)           wmi_packed_arr_get_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS)
31592 #define WMI_NDL_REF_QUEUE_LEN_SET(ptr,acprio,val)       wmi_packed_arr_set_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS, val)
31593 
31594 /** Data structure for updating the NDL. */
31595 typedef struct {
31596     /** TLV tag and len; tag equals
31597      *  WMITLV_TAG_STRUC_wmi_dcc_update_ndl_cmd_fixed_param */
31598     A_UINT32 tlv_header;
31599 
31600     /* VDEV identifier */
31601     A_UINT32 vdev_id;
31602 
31603     /** The number of channels in the request. */
31604     A_UINT32 num_channel;
31605 
31606     /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
31607     /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
31608 } wmi_dcc_update_ndl_cmd_fixed_param;
31609 
31610 typedef struct {
31611     /** TLV tag and len; tag equals
31612      *  WMITLV_TAG_STRUC_wmi_dcc_update_ndl_resp_event_fixed_param */
31613     A_UINT32 tlv_header;
31614     /* VDEV identifier */
31615     A_UINT32 vdev_id;
31616     A_UINT32 status;
31617 } wmi_dcc_update_ndl_resp_event_fixed_param;
31618 
31619 /* Actions for TSF timestamp */
31620 typedef enum {
31621     TSF_TSTAMP_CAPTURE_REQ = 1,
31622     TSF_TSTAMP_CAPTURE_RESET = 2,
31623     TSF_TSTAMP_READ_VALUE = 3,
31624     TSF_TSTAMP_QTIMER_CAPTURE_REQ = 4,
31625     TSF_TSTAMP_AUTO_REPORT_ENABLE = 5,
31626     TSF_TSTAMP_AUTO_REPORT_DISABLE = 6,
31627     TSF_TSTAMP_PERIODIC_REPORT_REQ = 5,
31628 } wmi_tsf_tstamp_action;
31629 
31630 typedef enum {
31631     TSF_TSTAMP_REPORT_TTIMER = 0x1, /* bit 0: TSF Timer */
31632     TSF_TSTAMP_REPORT_QTIMER = 0x2, /* bit 1: H/T common Timer */
31633 } wmi_tsf_tstamp_report_flags;
31634 
31635 #define TSF_TSTAMP_REPORT_PERIOD_MIN   1000    /* ms units */
31636 
31637 typedef struct {
31638     /** TLV tag and len; tag equals
31639      * WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param */
31640     A_UINT32 tlv_header;
31641     /** unique id identifying the VDEV, generated by the caller */
31642     A_UINT32 vdev_id;
31643     /* action type, refer to wmi_tsf_tstamp_action */
31644     A_UINT32 tsf_action;
31645     /*
31646      * The below fields are valid only when tsf_action is
31647      * TSF_TSTAMP_PERIODIC_REPORT_REQ.
31648      */
31649     A_UINT32 period; /* the period of report timestamp, ms units */
31650     A_UINT32 flags;  /* wmi_tsf_tstamp_report_flags */
31651 } wmi_vdev_tsf_tstamp_action_cmd_fixed_param;
31652 
31653 typedef struct {
31654     /* TLV tag and len; tag equals
31655      * WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param */
31656     A_UINT32 tlv_header;
31657     /* VDEV identifier */
31658     A_UINT32 vdev_id;
31659     /* low 32bit of tsf */
31660     A_UINT32 tsf_low;
31661     /* high 32 bit of tsf */
31662     A_UINT32 tsf_high;
31663     /* low 32 bits of qtimer */
31664     A_UINT32 qtimer_low;
31665     /* high 32 bits of qtimer */
31666     A_UINT32 qtimer_high;
31667     /*
31668      * tsf_id: TSF ID for the current vdev
31669      * This field should be ignored unless the tsf_id_valid flag is set.
31670      */
31671     A_UINT32 tsf_id;
31672     /*
31673      * The mac_id and tsf_id fields should be ignored unless the
31674      * tsf_id_valid flag is set.
31675      */
31676     A_UINT32 tsf_id_valid;
31677     /*
31678      * mac_id: MAC identifier
31679      * This field should be ignored unless the tsf_id_valid flag is set.
31680      */
31681     A_UINT32 mac_id;
31682     /*
31683      * The original mac_id_valid field that was originally used to specify
31684      * whether the mac_id field is valid has been repurposed to instead
31685      * specify whether this message is a TSF report or a UL delay report.
31686      */
31687     union {
31688         A_UINT32 mac_id_valid; /* original name */
31689         /* ul_delay_or_tsf_report:
31690          * New name for the field, reflecting its new purpose.
31691          * ul_delay_or_tsf_report = 1 -> UL delay
31692          * ul_delay_or_tsf_report = 0 -> TSF report
31693          */
31694         A_UINT32 ul_delay_or_tsf_report;
31695     };
31696     /* low 32 bits of wlan global tsf */
31697     A_UINT32 wlan_global_tsf_low;
31698     /* high 32 bits of wlan global tsf */
31699     A_UINT32 wlan_global_tsf_high;
31700     /* low 32 bits of tqm timer */
31701     A_UINT32 tqm_timer_low;
31702     /* high 32 bits of tqm timer */
31703     A_UINT32 tqm_timer_high;
31704     /* use tqm timer flag */
31705     A_UINT32 use_tqm_timer;
31706 } wmi_vdev_tsf_report_event_fixed_param;
31707 
31708 /* ie_id values:
31709  * 0 to 255 are used for individual IEEE802.11 Information Element types
31710  */
31711 #define WMI_SET_VDEV_IE_ID_SCAN_SET_DEFAULT_IE 256
31712 
31713 /* source values: */
31714 #define WMI_SET_VDEV_IE_SOURCE_HOST     0x0
31715 
31716 /* band values: */
31717 typedef enum {
31718     WMI_SET_VDEV_IE_BAND_ALL = 0,
31719     WMI_SET_VDEV_IE_BAND_2_4GHZ,
31720     WMI_SET_VDEV_IE_BAND_5GHZ,
31721 } wmi_set_vdev_ie_band;
31722 
31723 typedef struct {
31724     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_ie_cmd_fixed_param */
31725     A_UINT32 tlv_header;
31726     /** unique id identifying the VDEV, generated by the caller */
31727     A_UINT32 vdev_id;
31728     /** unique id to identify the ie_data as defined by ieee 802.11 spec */
31729     A_UINT32 ie_id;
31730     /** ie_len corresponds to num of bytes in ie_data[] */
31731     A_UINT32 ie_len;
31732     /** source of this command */
31733     A_UINT32 ie_source; /* see WMI_SET_VDEV_IE_SOURCE_ defs */
31734     /** band for this IE - se wmi_set_vdev_ie_band enum */
31735     A_UINT32 band;
31736    /**
31737     * Following this structure is the TLV byte stream of ie data of length ie_buf_len:
31738     * A_UINT8 ie_data[];
31739     *
31740     */
31741 } wmi_vdev_set_ie_cmd_fixed_param;
31742 
31743 /* DISA feature related data structures */
31744 #define MAX_MAC_HEADER_LEN 32
31745 typedef enum {
31746     WMI_ENCRYPT_DECRYPT_FLAG_INVALID,
31747     WMI_ENCRYPT = 1,
31748     WMI_DECRYPT = 2,
31749 } WMI_ENCRYPT_DECRYPT_FLAG;
31750 
31751 typedef struct {
31752     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param */
31753     /** unique id identifying the VDEV, generated by the caller */
31754     A_UINT32 vdev_id;
31755     A_UINT32 key_flag; /* WMI_ENCRYPT_DECRYPT_FLAG */
31756     A_UINT32 key_idx;
31757     A_UINT32 key_cipher;
31758     A_UINT32 key_len; /* units = bytes */
31759     A_UINT32 key_txmic_len; /* units = bytes */
31760     A_UINT32 key_rxmic_len; /* units = bytes */
31761     /** Key: This array needs to be provided in little-endian order */
31762     A_UINT8 key_data[WMI_MAX_KEY_LEN];
31763     /** Packet number: This array needs to be provided in little-endian order.
31764      *  If the PN is less than 8 bytes, the PN data shall be placed into this
31765      *  pn[] array starting at byte 0, leaving the MSBs empty.
31766      */
31767     A_UINT8 pn[8];
31768     /** 802.11 MAC header to be typecast to struct ieee80211_qosframe_addr4
31769      *  This array needs to be provided in little-endian order.
31770      */
31771     A_UINT8 mac_hdr[MAX_MAC_HEADER_LEN];
31772     A_UINT32 data_len; /** Payload length, units = bytes */
31773     /*
31774      * Following this struct are this TLV:
31775      *     A_UINT8  data[]; <-- actual data to be encrypted,
31776      *                          needs to be provided in little-endian order
31777      */
31778 } wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param;
31779 
31780 /* This event is generated in response to WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID from HOST.
31781  * On receiving WMI command WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID from
31782  * HOST with DISA test vectors, DISA frame will prepared and submitted to HW,
31783  * then on receiving the tx completion for the DISA frame this WMI event
31784  * will be delivered to HOST with the encrypted frame.
31785  */
31786 typedef struct {
31787     /** TLV tag and len; tag equals
31788     * WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param */
31789     A_UINT32 tlv_header;
31790     /* VDEV identifier */
31791     A_UINT32 vdev_id;
31792     A_INT32 status; /*  0: success, -1: Failure, */
31793     /* 802.11 header length + encrypted payload length (units = bytes) */
31794     A_UINT32 data_length;
31795     /*
31796      * Following this struct is this TLV:
31797      *    A_UINT8 enc80211_frame[]; <-- Encrypted 802.11 frame;
31798      *        802.11 header + encrypted payload,
31799      *        provided in little-endian order
31800      */
31801 } wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param;
31802 
31803 /* DEPRECATED - use wmi_pdev_set_pcl_cmd_fixed_param instead */
31804 typedef struct {
31805     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_pcl_cmd_fixed_param */
31806     /** Set Preferred Channel List  **/
31807 
31808     /** # of channels to scan */
31809     A_UINT32 num_chan;
31810 /**
31811  * TLV (tag length value) parameters follow the wmi_soc_set_pcl_cmd
31812  * structure. The TLV's are:
31813  *     A_UINT32 channel_list[];
31814  **/
31815 } wmi_soc_set_pcl_cmd_fixed_param;
31816 
31817 /* Values for channel_weight */
31818 typedef enum {
31819     WMI_PCL_WEIGHT_DISALLOW  = 0,
31820     WMI_PCL_WEIGHT_LOW       = 1,
31821     WMI_PCL_WEIGHT_MEDIUM    = 2,
31822     WMI_PCL_WEIGHT_HIGH      = 3,
31823     WMI_PCL_WEIGHT_VERY_HIGH = 4,
31824 } wmi_pcl_chan_weight;
31825 
31826 typedef struct {
31827     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_pcl_cmd_fixed_param */
31828     /** Set Preferred Channel List  **/
31829 
31830     /** pdev_id for identifying the MAC
31831      * See macros starting with WMI_PDEV_ID_ for values.
31832      */
31833     A_UINT32 pdev_id;
31834 
31835     /** # of channels to scan */
31836     A_UINT32 num_chan;
31837 /**
31838  * TLV (tag length value) parameters follow the wmi_soc_set_pcl_cmd
31839  * structure. The TLV's are:
31840  *     A_UINT32 channel_weight[];  channel order & size will be as per the list provided in WMI_SCAN_CHAN_LIST_CMDID
31841  **/
31842 } wmi_pdev_set_pcl_cmd_fixed_param;
31843 
31844 /* DEPRECATED - use wmi_pdev_set_hw_mode_cmd_fixed_param instead */
31845 typedef struct {
31846     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_cmd_fixed_param */
31847     /**  Set Hardware Mode  **/
31848 
31849     /* Hardware Mode Index */
31850     A_UINT32 hw_mode_index;
31851 } wmi_soc_set_hw_mode_cmd_fixed_param;
31852 
31853 typedef struct {
31854     A_UINT32 tlv_header; /* TLV tag and len tag equals WMITLV_TAG_STRUC_wmi_pdev_band_to_mac */
31855     /** pdev_id for identifying the MAC
31856       * See macros starting with WMI_PDEV_ID_ for values.
31857       */
31858     A_UINT32 pdev_id;
31859     /* start frequency in MHz */
31860     A_UINT32 start_freq;
31861     /* end frequency in MHz */
31862     A_UINT32 end_freq;
31863 } wmi_pdev_band_to_mac;
31864 
31865 typedef struct {
31866     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_cmd_fixed_param */
31867     /**  Set Hardware Mode  **/
31868 
31869     /** pdev_id for identifying the MAC
31870      * See macros starting with WMI_PDEV_ID_ for values.
31871      */
31872     A_UINT32 pdev_id;
31873 
31874     /* Hardware Mode Index */
31875     A_UINT32 hw_mode_index;
31876 
31877     /* Number of band to mac TLVs */
31878     A_UINT32 num_band_to_mac;
31879 
31880     /* Followed by TLVs of type
31881      * num_band_to_mac * wmi_pdev_band_to_mac.
31882      */
31883 } wmi_pdev_set_hw_mode_cmd_fixed_param;
31884 
31885 /* DEPRECATED - use wmi_pdev_set_dual_mac_config_cmd_fixed_param instead */
31886 typedef struct {
31887     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_cmd_fixed_param */
31888     /**  Set Dual MAC Firmware Configuration  **/
31889 
31890     /* Concurrent scan configuration bits */
31891     A_UINT32 concurrent_scan_config_bits;
31892     /* Firmware mode configuration bits */
31893     A_UINT32 fw_mode_config_bits;
31894 } wmi_soc_set_dual_mac_config_cmd_fixed_param;
31895 
31896 typedef struct {
31897     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_cmd_fixed_param */
31898     /**  Set Dual MAC Firmware Configuration  **/
31899 
31900     /** pdev_id for identifying the MAC
31901      * See macros starting with WMI_PDEV_ID_ for values.
31902      */
31903     A_UINT32 pdev_id;
31904 
31905     /* Concurrent scan configuration bits */
31906     A_UINT32 concurrent_scan_config_bits;
31907     /* Firmware mode configuration bits */
31908     A_UINT32 fw_mode_config_bits;
31909 } wmi_pdev_set_mac_config_cmd_fixed_param;
31910 
31911 typedef struct { /* DEPRECATED */
31912     A_UINT32 num_tx_chains;
31913     A_UINT32 num_rx_chains;
31914     A_UINT32 reserved[2];
31915 } soc_num_tx_rx_chains;
31916 
31917 typedef struct {
31918     A_UINT32 num_tx_chains_2g;
31919     A_UINT32 num_rx_chains_2g;
31920     A_UINT32 num_tx_chains_5g;
31921     A_UINT32 num_rx_chains_5g;
31922 } band_num_tx_rx_chains;
31923 
31924 typedef union { /* DEPRECATED */
31925     soc_num_tx_rx_chains soc_txrx_chain_setting;
31926     band_num_tx_rx_chains band_txrx_chain_setting;
31927 } antenna_num_tx_rx_chains;
31928 
31929 typedef enum {
31930     ANTENNA_MODE_DISABLED = 0x0,
31931     ANTENNA_MODE_LOW_POWER_LOCATION_SCAN = 0x01,
31932     /* reserved */
31933 } antenna_mode_reason;
31934 
31935 /* DEPRECATED - use wmi_pdev_set_antenna_mode_cmd_fixed_param instead */
31936 typedef struct {
31937     A_UINT32 tlv_header; /* TLV tag and len;  tag equals WMITLV_TAG_STRUC_wmi_soc_set_antenna_mode_cmd_fixed_param */
31938 
31939     /* the reason for setting antenna mode, refer antenna_mode_reason */
31940     A_UINT32 reason;
31941 
31942     /*
31943      * The above reason parameter will select whether the following union
31944      * is soc_num_tx_rx_chains or band_num_tx_rx_chains.
31945      */
31946     antenna_num_tx_rx_chains num_txrx_chains_setting;
31947 } wmi_soc_set_antenna_mode_cmd_fixed_param;
31948 
31949 typedef struct {
31950     A_UINT32 tlv_header; /* TLV tag and len;  tag equals WMITLV_TAG_STRUC_wmi_pdev_set_antenna_mode_cmd_fixed_param */
31951 
31952     /** pdev_id for identifying the MAC
31953      * See macros starting with WMI_PDEV_ID_ for values.
31954      */
31955     A_UINT32 pdev_id;
31956 
31957     /* Bits 0-15 is the number of RX chains and 16-31 is the number of TX chains */
31958     A_UINT32 num_txrx_chains;
31959 } wmi_pdev_set_antenna_mode_cmd_fixed_param;
31960 
31961 /** Data structure for information specific to a VDEV to MAC mapping. */
31962 /* DEPRECATED - use wmi_pdev_set_hw_mode_response_vdev_mac_entry instead */
31963 typedef struct {
31964     /** TLV tag and len; tag equals
31965      * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_vdev_mac_entry */
31966     A_UINT32 tlv_header;
31967     A_UINT32 vdev_id; /* VDEV ID */
31968     A_UINT32 mac_id; /* MAC ID */
31969 } wmi_soc_set_hw_mode_response_vdev_mac_entry;
31970 
31971 /** Data structure for information specific to a VDEV to MAC mapping. */
31972 typedef struct {
31973     /** TLV tag and len; tag equals
31974      * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_vdev_mac_entry */
31975     A_UINT32 tlv_header;
31976 
31977     /** pdev_id for identifying the MAC
31978      * See macros starting with WMI_PDEV_ID_ for values.
31979      */
31980     A_UINT32 pdev_id;
31981 
31982     A_UINT32 vdev_id;
31983 } wmi_pdev_set_hw_mode_response_vdev_mac_entry;
31984 
31985 /* DEPRECATED - use wmi_pdev_set_hw_mode_response_event_fixed_param instead */
31986 typedef struct {
31987     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_event_fixed_param */
31988     /**  Set Hardware Mode Response Event  **/
31989 
31990     /* Status of set_hw_mode command */
31991     /*
31992      * Values for Status:
31993      *  0 - OK; command successful
31994      *  1 - EINVAL; Requested invalid hw_mode
31995      *  2 - ECANCELED; HW mode change canceled
31996      *  3 - ENOTSUP; HW mode not supported
31997      *  4 - EHARDWARE; HW mode change prevented by hardware
31998      *  5 - EPENDING; HW mode change is pending
31999      *  6 - ECOEX; HW mode change conflict with Coex
32000      */
32001     A_UINT32 status;
32002     /* Configured Hardware Mode */
32003     A_UINT32 cfgd_hw_mode_index;
32004     /* Number of Vdev to Mac entries */
32005     A_UINT32 num_vdev_mac_entries;
32006 
32007 /**
32008  * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
32009  * structure. The TLV's are:
32010  *      A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
32011  */
32012 } wmi_soc_set_hw_mode_response_event_fixed_param;
32013 
32014 typedef struct {
32015     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_event_fixed_param */
32016     /**  Set Hardware Mode Response Event  **/
32017 
32018     /** pdev_id for identifying the MAC
32019      * See macros starting with WMI_PDEV_ID_ for values.
32020      */
32021     A_UINT32 pdev_id;
32022 
32023     /* Status of set_hw_mode command */
32024     /*
32025      * Values for Status:
32026      *  0 - OK; command successful
32027      *  1 - EINVAL; Requested invalid hw_mode
32028      *  2 - ECANCELED; HW mode change canceled
32029      *  3 - ENOTSUP; HW mode not supported
32030      *  4 - EHARDWARE; HW mode change prevented by hardware
32031      *  5 - EPENDING; HW mode change is pending
32032      *  6 - ECOEX; HW mode change conflict with Coex
32033      */
32034     A_UINT32 status;
32035     /* Configured Hardware Mode */
32036     A_UINT32 cfgd_hw_mode_index;
32037     /* Number of Vdev to Mac entries */
32038     A_UINT32 num_vdev_mac_entries;
32039 /**
32040  * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
32041  * structure. The TLV's are:
32042  *      A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
32043  */
32044 } wmi_pdev_set_hw_mode_response_event_fixed_param;
32045 
32046 /* DEPRECATED - use wmi_pdev_hw_mode_transition_event_fixed_param instead */
32047 typedef struct {
32048     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_hw_mode_transition_event_fixed_param */
32049     /**  Hardware Mode Transition Event **/
32050 
32051     /* Original or old Hardware mode */
32052     A_UINT32 old_hw_mode_index;
32053     /* New Hardware Mode */
32054     A_UINT32 new_hw_mode_index;
32055     /* Number of Vdev to Mac entries */
32056     A_UINT32 num_vdev_mac_entries;
32057 
32058 /**
32059  * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
32060  * structure. The TLV's are:
32061  *      A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
32062  */
32063 } wmi_soc_hw_mode_transition_event_fixed_param;
32064 
32065 typedef struct {
32066     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_hw_mode_transition_event_fixed_param */
32067     /**  Hardware Mode Transition Event **/
32068 
32069     /** pdev_id for identifying the MAC
32070      * See macros starting with WMI_PDEV_ID_ for values.
32071      */
32072     A_UINT32 pdev_id;
32073 
32074     /* Original or old Hardware mode */
32075     A_UINT32 old_hw_mode_index;
32076     /* New Hardware Mode */
32077     A_UINT32 new_hw_mode_index;
32078     /* Number of Vdev to Mac entries */
32079     A_UINT32 num_vdev_mac_entries;
32080 
32081 /**
32082  * TLV (tag length value) parameters follow the pdev_set_hw_mode_response_event
32083  * structure. The TLV's are:
32084  *     wmi_pdev_set_hw_mode_response_vdev_mac_entry
32085  *         wmi_pdev_set_hw_mode_response_vdev_mac_mapping[];
32086  *     wmi_pdev_band_to_mac mac_freq_mapping[];
32087  */
32088 } wmi_pdev_hw_mode_transition_event_fixed_param;
32089 
32090 /**
32091  * This command is sent from WLAN host driver to firmware for
32092  * plugging in reorder queue desc to lithium hw.
32093  *
32094  * Example: plug-in queue desc for TID 5
32095  *    host->target: WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
32096  *                  (vdev_id = PEER vdev id,
32097  *                   peer_macaddr = PEER mac addr,
32098  *                   tid = 5,
32099  *                   queue_ptr_lo = queue desc addr lower 32 bits,
32100  *                   queue_ptr_hi = queue desc addr higher 32 bits,
32101  *                   queue_no = 16-bit number assigned by host for queue,
32102  *                              stored in bits 15:0 of queue_no field)
32103  */
32104 typedef struct {
32105     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_reorder_queue_setup_cmd_fixed_param */
32106     A_UINT32 vdev_id;
32107     wmi_mac_addr peer_macaddr; /* peer mac address */
32108     A_UINT32 tid; /* 0 to 15 = QoS TIDs, 16 = non-qos TID */
32109     A_UINT32 queue_ptr_lo; /* lower 32 bits of queue desc address */
32110     A_UINT32 queue_ptr_hi; /* upper 32 bits of queue desc address */
32111     A_UINT32 queue_no; /* 16-bit number assigned by host for queue,
32112                           stored in bits 15:0 of queue_no field */
32113     A_UINT32 ba_window_size_valid; /* Is ba_window_size valid?
32114                                     * 0 = Invalid, 1 = Valid */
32115     A_UINT32 ba_window_size; /* Valid values: 0 to 256
32116                               * Host sends the message when BA session is
32117                               * established or terminated for the TID. */
32118 } wmi_peer_reorder_queue_setup_cmd_fixed_param;
32119 
32120 typedef struct {
32121     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_per_reorder_q_setup_params_t */
32122     A_UINT32 tid; /* 0 to 15 = QoS TIDs, 16 = non-qos TID */
32123     A_UINT32 queue_ptr_lo; /* lower 32 bits of queue desc address */
32124     A_UINT32 queue_ptr_hi; /* upper 32 bits of queue desc address */
32125     A_UINT32 queue_no; /* 16-bit number assigned by host for queue,
32126                         * stored in bits 15:0 of queue_no field */
32127     A_UINT32 ba_window_size_valid; /* Is ba_window_size valid?
32128                                     * 0 = Invalid, 1 = Valid */
32129     A_UINT32 ba_window_size; /* Valid values: 0 to 256
32130                               * Host sends the message when BA session is
32131                               * established or terminated for the TID. */
32132 } wmi_peer_per_reorder_q_setup_params_t;
32133 
32134 /**
32135  * This command is sent from WLAN host driver to firmware for
32136  * plugging in reorder queue desc to hw for multiple TIDs in one shot.
32137  *
32138  * Example: plug-in queue desc
32139  *    host->target: WMI_PEER_MULTIPLE_REORDER_QUEUE_SETUP_CMDID,
32140  *                  (vdev_id = PEER vdev id,
32141  *                   peer_macaddr = PEER mac addr)
32142  */
32143 typedef struct {
32144     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_multiple_reorder_queue_setup_cmd_fixed_param */
32145     A_UINT32 vdev_id;
32146     wmi_mac_addr peer_macaddr; /* peer mac address */
32147 /*
32148  * This struct is followed by other TLVs:
32149  *   wmi_peer_per_reorder_q_setup_params_t q_setup_params[num_queues];
32150  */
32151 } wmi_peer_multiple_reorder_queue_setup_cmd_fixed_param;
32152 
32153 /**
32154  * This command is sent from WLAN host driver to firmware for
32155  * removing one or more reorder queue desc to lithium hw.
32156  *
32157  * Example: remove queue desc for all TIDs
32158  *    host->target: WMI_PEER_REORDER_REMOVE_CMDID,
32159  *                  (vdev_id = PEER vdev id,
32160  *                   peer_macaddr = PEER mac addr,
32161  *                   tid = 0x1FFFF,
32162  */
32163 typedef struct {
32164     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_reorder_queue_remove_cmd_fixed_param */
32165     A_UINT32 vdev_id;
32166     wmi_mac_addr peer_macaddr; /* peer mac address */
32167     A_UINT32 tid_mask; /* bits 0 to 15 = QoS TIDs, bit 16 = non-qos TID */
32168 } wmi_peer_reorder_queue_remove_cmd_fixed_param;
32169 
32170 
32171 /* DEPRECATED - use wmi_pdev_set_mac_config_response_event_fixed_param instead */
32172 typedef struct {
32173     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_response_event_fixed_param */
32174     /**  Set Dual MAC Config Response Event  **/
32175 
32176     /* Status for set_dual_mac_config command */
32177     /*
32178      * Values for Status:
32179      *  0 - OK; command successful
32180      *  1 - EINVAL; Requested invalid hw_mode
32181      *  3 - ENOTSUP; HW mode not supported
32182      *  4 - EHARDWARE; HW mode change prevented by hardware
32183      *  6 - ECOEX; HW mode change conflict with Coex
32184      */
32185     A_UINT32 status;
32186 
32187 } wmi_soc_set_dual_mac_config_response_event_fixed_param;
32188 
32189 typedef struct {
32190     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_response_event_fixed_param */
32191     /**  Set Dual MAC Config Response Event  **/
32192 
32193     /** pdev_id for identifying the MAC
32194      * See macros starting with WMI_PDEV_ID_ for values.
32195      */
32196     A_UINT32 pdev_id;
32197 
32198     /* Status for set_dual_mac_config command */
32199     /*
32200      * Values for Status:
32201      *  0 - OK; command successful
32202      *  1 - EINVAL; Requested invalid hw_mode
32203      *  3 - ENOTSUP; HW mode not supported
32204      *  4 - EHARDWARE; HW mode change prevented by hardware
32205      *  6 - ECOEX; HW mode change conflict with Coex
32206      */
32207      A_UINT32 status;
32208 } wmi_pdev_set_mac_config_response_event_fixed_param;
32209 
32210 typedef enum {
32211     MAWC_MOTION_STATE_UNKNOWN,
32212     MAWC_MOTION_STATE_STATIONARY,
32213     MAWC_MOTION_STATE_WALK,
32214     MAWC_MOTION_STATE_TRANSIT,
32215 } MAWC_MOTION_STATE;
32216 
32217 typedef enum {
32218     MAWC_SENSOR_STATUS_OK,
32219     MAWC_SENSOR_STATUS_FAILED_TO_ENABLE,
32220     MAWC_SENSOR_STATUS_SHUTDOWN,
32221 } MAWC_SENSOR_STATUS;
32222 
32223 typedef struct {
32224     /* TLV tag and len; tag equals
32225      * WMITLV_TAG_STRUC_wmi_mawc_sensor_report_ind_cmd_fixed_param */
32226     A_UINT32 tlv_header;
32227     /** new motion state, MAWC_MOTION_STATE */
32228     A_UINT32 motion_state;
32229     /** status code of sensor, MAWC_SENSOR_STATUS */
32230     A_UINT32 sensor_status;
32231 } wmi_mawc_sensor_report_ind_cmd_fixed_param;
32232 
32233 /* MBO flag field definition */
32234 /* Bit 0: 0 - Allow to connect to both MBO and non-MBO AP
32235  *        1 - Allow to connect to MBO AP only
32236  * Bit 1-31 : reserved.
32237  */
32238 #define WMI_ROAM_MBO_FLAG_MBO_ONLY_MODE  (1<<0) /* DEPRECATED */
32239 
32240 typedef struct {
32241     /* TLV tag and len; tag equals
32242      * WMITLV_TAG_STRUC_wmi_roam_set_mbo_fixed_param */
32243     A_UINT32 tlv_header;
32244     /** vdev id */
32245     A_UINT32 vdev_id;
32246     /** enable or disable MBO */
32247     A_UINT32 enable;
32248     /** MBO flags, refer to definition of MBO flags*/
32249     A_UINT32 flags;
32250 } wmi_roam_set_mbo_fixed_param; /* DEPRECATED */
32251 
32252 typedef struct {
32253     /* TLV tag and len; tag equals
32254      * WMITLV_TAG_ARRAY_STRUC */
32255     A_UINT32 tlv_header;
32256     /** Current operating class number */
32257     A_UINT32 cur_op_class;
32258     /** Country string of current reg domain,
32259      * the expected value should be same as country str defined
32260      * in country IE.
32261      * 3 octets (COUNTRY_STR) + 1 octet (always 0)
32262      * The ordering of this array must be maintained,
32263      * even when a big-endian host's WMI messages undergo
32264      * automatic byte reordering for conversion to the
32265      * little-endian ordering required by the target.
32266      * On big-endian hosts, this array may need to be byte-swapped
32267      * by the host, so the subsequent automatic byte-swap
32268      * will result in the correct final byte order.
32269      * global operating class: set country_str[0]=0
32270      */
32271     A_UINT8 country_str[4];
32272     /** Supported operating class number in current regdomain */
32273     A_UINT32 supp_op_class_num;
32274     /* The TLVs will follow. */
32275     /* A_UINT32 supp_op_class_list[] */
32276 } wmi_supported_operating_class_param;
32277 
32278 typedef struct {
32279     /* TLV tag and len; tag equals
32280      * WMITLV_TAG_ARRAY_STRUC */
32281     A_UINT32 tlv_header;
32282     /** non preferred channel attribute length */
32283     A_UINT32 non_prefer_ch_attr_len;
32284     /* The TLVs will follow. */
32285     /** A_UINT8 non_prefer_ch_attr[];*/
32286 } wmi_mbo_non_preferred_channel_report_param;
32287 
32288 typedef struct {
32289     /* TLV tag and len; tag equals
32290      * WMITLV_TAG_STRUC_wmi_mawc_enable_sensor_event_fixed_param */
32291     A_UINT32 tlv_header;
32292     /* enable(1) or disable(0) */
32293     A_UINT32 enable;
32294 } wmi_mawc_enable_sensor_event_fixed_param;
32295 
32296 typedef struct {
32297     /* TLV tag and len; tag equals
32298      * WMITLV_TAG_STRUC_wmi_extscan_configure_mawc_cmd_fixed_param */
32299     A_UINT32 tlv_header;
32300     /* Unique id identifying the VDEV */
32301     A_UINT32 vdev_id;
32302     /* enable(1) or disable(0) MAWC */
32303     A_UINT32 enable;
32304     /* ratio of skipping suppressing scan, skip one out of x */
32305     A_UINT32 suppress_ratio;
32306 } wmi_extscan_configure_mawc_cmd_fixed_param;
32307 
32308 typedef struct {
32309     /* TLV tag and len; tag equals
32310      * WMITLV_TAG_STRUC_wmi_roam_per_config_fixed_param */
32311     A_UINT32 tlv_header;
32312     /* Unique id identifying the VDEV */
32313     A_UINT32 vdev_id;
32314     /* enable(1) or disable(0) packet error rate trigger for roaming */
32315     A_UINT32 enable;
32316     /* high_rate_thresh, low_rate_thresh, pkt_err_rate_thresh_pct:
32317      * If PER monitoring as a trigger for roaming is enabled,
32318      * it is controlled by high_rate_thresh, low_rate_thresh, and
32319      * pkt_err_rate_thresh_pct.
32320      * PER monitoring is performed only when the time-averaged throughput
32321      * is less than high_rate_thresh.
32322      * During PER monitoring, the target keeps track of the PHY rate for
32323      * each of the first N PPDUs within a time window.
32324      * If the number of PPDUs with PHY rate < low_rate_thresh exceeds
32325      * N * pkt_err_rate_thresh_pct / 100, roaming will be triggered.
32326      *
32327      * This PER monitoring as a trigger for roaming is performed
32328      * concurrently but independently for rx and tx.
32329      */
32330     A_UINT32 high_rate_thresh; /* units = Kbps */
32331     A_UINT32 low_rate_thresh; /* units = Kbps */
32332     A_UINT32 pkt_err_rate_thresh_pct;
32333     /*
32334      * rest time after associating to a new AP before
32335      * starting to monitor PER as a roaming trigger,
32336      * (units are seconds)
32337      */
32338     A_UINT32 per_rest_time;
32339     /* This is the total time for which PER monitoring will be run.
32340      * After completion of time windows, the average PER over the window
32341      * will be computed.
32342      * The parameter value stores specifications for both TX and RX
32343      * monitor times.
32344      * The two least-significant bytes (0 & 1) hold the RX monitor time;
32345      * the two most-significant bytes (2 & 3) hold the TX monitor time.
32346      */
32347     A_UINT32 pkt_err_rate_mon_time; /* units = seconds */
32348     /* Minimum roamable AP RSSI for candidate selection for PER based roam */
32349     A_INT32 min_candidate_rssi; /* units = dBm */
32350 } wmi_roam_per_config_fixed_param;
32351 
32352 typedef struct {
32353     /* TLV tag and len; tag equals
32354      * WMITLV_TAG_STRUC_wmi_nlo_configure_mawc_cmd_fixed_param */
32355     A_UINT32 tlv_header;
32356     /* Unique id identifying the VDEV */
32357     A_UINT32 vdev_id;
32358     /* enable(1) or disable(0) MAWC */
32359     A_UINT32 enable;
32360     /* ratio of exponential backoff, next = current + current*ratio/100 */
32361     A_UINT32 exp_backoff_ratio;
32362     /* initial scan interval(msec) */
32363     A_UINT32 init_scan_interval;
32364     /* max scan interval(msec) */
32365     A_UINT32 max_scan_interval;
32366 } wmi_nlo_configure_mawc_cmd_fixed_param;
32367 
32368 typedef struct {
32369     /* TLV tag and len; tag equals
32370      * WMITLV_TAG_STRUC_wmi_roam_configure_mawc_cmd_fixed_param */
32371     A_UINT32 tlv_header;
32372     /* Unique id identifying the VDEV */
32373     A_UINT32 vdev_id;
32374     /* enable(1) or disable(0) MAWC */
32375     A_UINT32 enable;
32376     /* data traffic load (kBps) to register CMC */
32377     A_UINT32 traffic_load_threshold;
32378     /* RSSI threshold (dBm) to scan for Best AP */
32379     A_UINT32 best_ap_rssi_threshold;
32380     /* high RSSI threshold adjustment in Stationary to suppress scan */
32381     A_UINT32 rssi_stationary_high_adjust;
32382     /* low RSSI threshold adjustment in Stationary to suppress scan */
32383     A_UINT32 rssi_stationary_low_adjust;
32384 } wmi_roam_configure_mawc_cmd_fixed_param;
32385 
32386 #define WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD     2
32387 #define WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER  5
32388 
32389 typedef enum {
32390     PACKET_FILTER_TYPE_INVALID = 0,
32391     PACKET_FILTER_TYPE_FILTER_PKT,
32392     PACKET_FILTER_TYPE_RESERVE_PKT, /* not used */
32393     PACKET_FILTER_TYPE_MAX_ENUM_SIZE
32394 } WMI_PACKET_FILTER_FILTER_TYPE;
32395 
32396 typedef enum {
32397     PACKET_FILTER_PROTO_TYPE_INVALID = 0,
32398 
32399     /* L2 header */
32400     PACKET_FILTER_PROTO_TYPE_MAC,
32401     PACKET_FILTER_PROTO_TYPE_SNAP,
32402 
32403     /* L3 header (EtherType) */
32404     PACKET_FILTER_PROTO_TYPE_IPV4,
32405     PACKET_FILTER_PROTO_TYPE_IPV6,
32406 
32407     /* L4 header (IP protocol) */
32408     PACKET_FILTER_PROTO_TYPE_UDP,
32409     PACKET_FILTER_PROTO_TYPE_TCP,
32410     PACKET_FILTER_PROTO_TYPE_ICMPV6,
32411 
32412     PACKET_FILTER_PROTO_TYPE_MAX
32413 } WMI_PACKET_FILTER_PROTO_TYPE;
32414 
32415 typedef enum {
32416     PACKET_FILTER_CMP_TYPE_INVALID = 0,
32417     PACKET_FILTER_CMP_TYPE_EQUAL,
32418     PACKET_FILTER_CMP_TYPE_MASK_EQUAL,
32419     PACKET_FILTER_CMP_TYPE_NOT_EQUAL,
32420     PACKET_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
32421     PACKET_FILTER_CMP_TYPE_ADDRTYPE,
32422     PACKET_FILTER_CMP_TYPE_MAX
32423 } WMI_PACKET_FILTER_CMP_TYPE;
32424 
32425 typedef enum {
32426     PACKET_FILTER_SET_INACTIVE = 0,
32427     PACKET_FILTER_SET_ACTIVE
32428 } WMI_PACKET_FILTER_ACTION;
32429 
32430 typedef enum {
32431     PACKET_FILTER_SET_DISABLE = 0,
32432     PACKET_FILTER_SET_ENABLE
32433 } WMI_PACKET_FILTER_RUNTIME_ENABLE;
32434 
32435 typedef struct {
32436     A_UINT32  proto_type;
32437     A_UINT32  cmp_type;
32438     A_UINT32  data_length; /* Length of the data to compare (units = bytes) */
32439     A_UINT32  data_offset; /* from start of the respective frame header (units = bytes) */
32440     A_UINT32  compareData[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; /* Data to compare, little-endian order */
32441     A_UINT32  dataMask[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; /* Mask to be applied on rcvd packet data before compare, little-endian order */
32442 } WMI_PACKET_FILTER_PARAMS_TYPE;
32443 
32444 typedef struct {
32445     A_UINT32  tlv_header;
32446     A_UINT32  vdev_id;
32447     A_UINT32  filter_id;
32448     A_UINT32  filter_action; /* WMI_PACKET_FILTER_ACTION */
32449     A_UINT32  filter_type;
32450     A_UINT32  num_params; /* how many entries in paramsData are valid */
32451     A_UINT32  coalesce_time; /* not currently used - fill with 0x0 */
32452     WMI_PACKET_FILTER_PARAMS_TYPE  paramsData[WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER];
32453     /* deprecated0:
32454      * This field simply provides filler space to retain the original message
32455      * format while reducing WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER
32456      * from 10 to 5.
32457      */
32458     WMI_PACKET_FILTER_PARAMS_TYPE  deprecated0[5];
32459 } WMI_PACKET_FILTER_CONFIG_CMD_fixed_param;
32460 
32461 /* enable / disable all filters within the specified vdev */
32462 typedef struct {
32463     A_UINT32  tlv_header;
32464     A_UINT32  vdev_id;
32465     A_UINT32  enable; /* WMI_PACKET_FILTER_RUNTIME_ENABLE */
32466 } WMI_PACKET_FILTER_ENABLE_CMD_fixed_param;
32467 
32468 #define WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS  0
32469 #define WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS 9
32470 
32471 #define WMI_LRO_INFO_TCP_FLAG_VALS_SET(tcp_flag_u32, tcp_flag_values) \
32472     WMI_SET_BITS(tcp_flag_u32, \
32473         WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
32474         WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS, \
32475         tcp_flag_values)
32476 #define WMI_LRO_INFO_TCP_FLAG_VALS_GET(tcp_flag_u32) \
32477     WMI_GET_BITS(tcp_flag_u32, \
32478         WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
32479         WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS)
32480 
32481 #define WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS  9
32482 #define WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS 9
32483 
32484 #define WMI_LRO_INFO_TCP_FLAGS_MASK_SET(tcp_flag_u32, tcp_flags_mask) \
32485     WMI_SET_BITS(tcp_flag_u32, \
32486         WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
32487         WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS, \
32488         tcp_flags_mask)
32489 #define WMI_LRO_INFO_TCP_FLAGS_MASK_GET(tcp_flag_u32) \
32490     WMI_GET_BITS(tcp_flag_u32, \
32491         WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
32492         WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS)
32493 
32494 typedef struct {
32495     A_UINT32 tlv_header;
32496     /**
32497      * @brief lro_enable - indicates whether lro is enabled
32498      * [0] LRO Enable
32499      */
32500     A_UINT32 lro_enable;
32501     /**
32502      * @brief tcp_flag_u32 - mask of which TCP flags to check and
32503      *      values to check for
32504      * [8:0] TCP flag values - If the TCP flags from the packet do not match
32505      *       the values in this field after masking with TCP flags mask below,
32506      *       LRO eligible will not be set
32507      * [17:9] TCP flags mask - Mask field for comparing the TCP values
32508      *       provided above with the TCP flags field in the received packet
32509      * Use WMI_LRO_INFO_TCP_FLAG_VALS and WMI_LRO_INFO_TCP_FLAGS_MASK
32510      * macros to isolate the mask field and values field that are packed
32511      * into this u32 "word".
32512      */
32513     A_UINT32 tcp_flag_u32;
32514     /**
32515      * @brief toeplitz_hash_ipv4 - contains seed needed to compute
32516      * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
32517      * bytes 0 to 3
32518      *
32519      * In this and all the below toeplitz_hash fields, the bytes are
32520      * specified in little-endian order.  For example:
32521      *     toeplitz_hash_ipv4_0_3 bits 7:0   holds seed byte 0
32522      *     toeplitz_hash_ipv4_0_3 bits 15:8  holds seed byte 1
32523      *     toeplitz_hash_ipv4_0_3 bits 23:16 holds seed byte 2
32524      *     toeplitz_hash_ipv4_0_3 bits 31:24 holds seed byte 3
32525      */
32526     A_UINT32 toeplitz_hash_ipv4_0_3;
32527 
32528     /**
32529      * @brief toeplitz_hash_ipv4 - contains seed needed to compute
32530      * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
32531      * bytes 4 to 7
32532      */
32533     A_UINT32 toeplitz_hash_ipv4_4_7;
32534 
32535     /**
32536      * @brief toeplitz_hash_ipv4 - contains seed needed to compute
32537      * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
32538      * bytes 8 to 11
32539      */
32540     A_UINT32 toeplitz_hash_ipv4_8_11;
32541 
32542     /**
32543      * @brief toeplitz_hash_ipv4 - contains seed needed to compute
32544      * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
32545      * bytes 12 to 15
32546      */
32547     A_UINT32 toeplitz_hash_ipv4_12_15;
32548 
32549     /**
32550      * @brief toeplitz_hash_ipv4 - contains seed needed to compute
32551      * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
32552      * byte 16
32553      */
32554     A_UINT32 toeplitz_hash_ipv4_16;
32555 
32556     /**
32557      * @brief toeplitz_hash_ipv6 - contains seed needed to compute
32558      * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
32559      * bytes 0 to 3
32560      */
32561     A_UINT32 toeplitz_hash_ipv6_0_3;
32562 
32563     /**
32564      * @brief toeplitz_hash_ipv6 - contains seed needed to compute
32565      * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
32566      * bytes 4 to 7
32567      */
32568     A_UINT32 toeplitz_hash_ipv6_4_7;
32569 
32570     /**
32571      * @brief toeplitz_hash_ipv6 - contains seed needed to compute
32572      * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
32573      * bytes 8 to 11
32574      */
32575     A_UINT32 toeplitz_hash_ipv6_8_11;
32576 
32577     /**
32578      * @brief toeplitz_hash_ipv6 - contains seed needed to compute
32579      * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
32580      * bytes 12 to 15
32581      */
32582     A_UINT32 toeplitz_hash_ipv6_12_15;
32583 
32584     /**
32585      * @brief toeplitz_hash_ipv6 - contains seed needed to compute
32586      * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
32587      * bytes 16 to 19
32588      */
32589     A_UINT32 toeplitz_hash_ipv6_16_19;
32590 
32591     /**
32592      * @brief toeplitz_hash_ipv6 - contains seed needed to compute
32593      * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
32594      * bytes 20 to 22
32595      */
32596     A_UINT32 toeplitz_hash_ipv6_20_23;
32597 
32598     /**
32599      * @brief toeplitz_hash_ipv6 - contains seed needed to compute
32600      * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
32601      * bytes 24 to 27
32602      */
32603     A_UINT32 toeplitz_hash_ipv6_24_27;
32604 
32605     /**
32606      * @brief toeplitz_hash_ipv6 - contains seed needed to compute
32607      * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
32608      * bytes 28 to 31
32609      */
32610     A_UINT32 toeplitz_hash_ipv6_28_31;
32611 
32612     /**
32613      * @brief toeplitz_hash_ipv6 - contains seed needed to compute
32614      * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
32615      * bytes 32 to 35
32616      */
32617     A_UINT32 toeplitz_hash_ipv6_32_35;
32618 
32619     /**
32620      * @brief toeplitz_hash_ipv6 - contains seed needed to compute
32621      * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
32622      * bytes 36 to 39
32623      */
32624     A_UINT32 toeplitz_hash_ipv6_36_39;
32625 
32626     /**
32627      * @brief toeplitz_hash_ipv6 - contains seed needed to compute
32628      * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
32629      * byte 40
32630      */
32631     A_UINT32 toeplitz_hash_ipv6_40;
32632 
32633     /**
32634      * @brief pdev_id - identifies the MAC
32635      * See macros starting with WMI_PDEV_ID_ for values.
32636      */
32637     A_UINT32 pdev_id;
32638 } wmi_lro_info_cmd_fixed_param;
32639 
32640 typedef struct {
32641     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_cmd_fixed_param  */
32642     A_UINT32 offset; /* flash offset to write, starting from 0 */
32643     A_UINT32 length; /* valid data length in buffer, unit: byte */
32644 } wmi_transfer_data_to_flash_cmd_fixed_param;
32645 
32646 typedef struct {
32647     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_complete_event_fixed_param */
32648     /** Return status. 0 for success, non-zero otherwise */
32649     A_UINT32 status;
32650 } wmi_transfer_data_to_flash_complete_event_fixed_param;
32651 
32652 typedef struct {
32653     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_read_data_from_flash_cmd_fixed_param  */
32654     A_UINT32 offset; /* flash offset to read, starting from 0 */
32655     A_UINT32 length; /* data length to read, unit: byte */
32656 } wmi_read_data_from_flash_cmd_fixed_param;
32657 
32658 typedef struct {
32659     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_read_data_from_flash_event_fixed_param */
32660     A_UINT32 status; /* Return status. 0 for success, non-zero otherwise */
32661     A_UINT32 offset; /* flash offset reading from, starting from 0 */
32662     A_UINT32 length; /* length of data being reported, unit: byte */
32663 } wmi_read_data_from_flash_event_fixed_param;
32664 
32665 typedef enum {
32666     ENHANCED_MCAST_FILTER_DISABLED,
32667     ENHANCED_MCAST_FILTER_ENABLED
32668 } ENHANCED_MCAST_FILTER_CONFIG;
32669 
32670 /*
32671  * Command to enable/disable filtering of multicast IP with unicast mac
32672  */
32673 typedef struct {
32674     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_config_enhanced_mcast_filter_fixed_param */
32675     /* Unique id identifying the VDEV */
32676     A_UINT32 vdev_id;
32677     /* 1 = enable 0 = disable (see ENHANCED_MCAST_FILTER_CONFIG) */
32678     A_UINT32 enable;
32679 } wmi_config_enhanced_mcast_filter_cmd_fixed_param;
32680 
32681 typedef struct {
32682     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_wisa_cmd_fixed_param */
32683     A_UINT32 tlv_header;
32684     /** unique id identifying the VDEV, generated by the caller */
32685     A_UINT32 vdev_id;
32686     /** WISA enable / disable mode */
32687     A_UINT32 wisa_mode;
32688 } wmi_vdev_wisa_cmd_fixed_param;
32689 
32690 /*
32691  * This structure is used to report SMPS force mode set complete to host.
32692  */
32693 typedef struct {
32694     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_complete_event_fixed_param */
32695     /* Unique id identifying the VDEV */
32696     A_UINT32 vdev_id;
32697     /* Return status. 0 for success, non-zero otherwise */
32698     A_UINT32 status;
32699 } wmi_sta_smps_force_mode_complete_event_fixed_param;
32700 
32701 /*
32702  * This structure is used to report SCPC calibrated data to host.
32703  */
32704 typedef struct {
32705     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scpc_event_fixed_param */
32706     /** number of BDF patches. Each patch contains offset, length and data */
32707     A_UINT32 num_patch;
32708 /*  This TLV is followed by another TLV of array of bytes
32709  *  A_UINT8 data[];
32710  *  This data array contains, for example
32711  *  patch1 offset(byte3~0),   patch1 data length(byte7~4),   patch1 data(byte11~8)
32712  *  patch2 offset(byte15~12), patch2 data length(byte19~16), patch2 data(byte47~20)
32713  *
32714  */
32715 } wmi_scpc_event_fixed_param;
32716 
32717 typedef enum {
32718     FW_ACTIVE_BPF_MODE_DISABLE =         (1 << 1),
32719     FW_ACTIVE_BPF_MODE_FORCE_ENABLE =    (1 << 2),
32720     FW_ACTIVE_BPF_MODE_ADAPTIVE_ENABLE = (1 << 3),
32721 } FW_ACTIVE_BPF_MODE;
32722 
32723 /* bpf interface structure */
32724 typedef struct wmi_bpf_get_capability_cmd_s {
32725     A_UINT32 tlv_header;
32726     A_UINT32 reserved;  /* reserved for future use - must be filled with 0x0 */
32727 } wmi_bpf_get_capability_cmd_fixed_param;
32728 
32729 typedef struct wmi_bpf_capability_info_evt_s {
32730     A_UINT32 tlv_header;
32731     A_UINT32 bpf_version; /* fw's implement version */
32732     A_UINT32 max_bpf_filters; /* max filters that fw supports */
32733     A_UINT32 max_bytes_for_bpf_inst; /* the maximum bytes that can be used as bpf instructions */
32734     A_UINT32 fw_active_bpf_support_mcbc_modes; /* multicast/broadcast - refer to FW_ACTIVE_BPF_MODE, it can be 'or' of them */
32735     A_UINT32 fw_active_bpf_support_uc_modes; /* unicast - refer to FW_ACTIVE_BPF_MODE, it can be 'or' of them */
32736 } wmi_bpf_capability_info_evt_fixed_param;
32737 
32738 /* bit 0 of flags: report counters */
32739 #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_S  0
32740 #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_M  0x1
32741 typedef struct wmi_bpf_get_vdev_stats_cmd_s {
32742     A_UINT32 tlv_header;
32743     A_UINT32 flags;
32744     A_UINT32 vdev_id;
32745 } wmi_bpf_get_vdev_stats_cmd_fixed_param;
32746 
32747 typedef struct wmi_bpf_vdev_stats_info_evt_s {
32748     A_UINT32 tlv_header;
32749     A_UINT32 vdev_id;
32750     A_UINT32 num_filters;
32751     A_UINT32 num_checked_pkts;
32752     A_UINT32 num_dropped_pkts;
32753 } wmi_bpf_vdev_stats_info_evt_fixed_param;
32754 
32755 typedef struct wmi_bpf_set_vdev_instructions_cmd_s {
32756     A_UINT32 tlv_header;
32757     A_UINT32 vdev_id;
32758     A_UINT32 filter_id;
32759     A_UINT32 bpf_version;  /* host bpf version */
32760     A_UINT32 total_length;
32761     A_UINT32 current_offset;
32762     A_UINT32 current_length;
32763 /*
32764  * The TLV follows:
32765  *    A_UINT8  buf_inst[]; <-- Variable length buffer for the instuctions
32766  */
32767 } wmi_bpf_set_vdev_instructions_cmd_fixed_param;
32768 
32769 #define BPF_FILTER_ID_ALL  0xFFFFFFFF
32770 typedef struct wmi_bpf_del_vdev_instructions_cmd_s {
32771     A_UINT32 tlv_header;
32772     A_UINT32 vdev_id;
32773     A_UINT32 filter_id;  /* BPF_FILTER_ID_ALL means delete all */
32774 } wmi_bpf_del_vdev_instructions_cmd_fixed_param;
32775 
32776 typedef struct wmi_bpf_set_vdev_active_mode_cmd_s {
32777     A_UINT32 tlv_header;
32778     A_UINT32 vdev_id;
32779     A_UINT32 mcbc_mode; /* refer to FW_ACTIVE_BPF_MODE */
32780     A_UINT32 uc_mode; /* refer to FW_ACTIVE_BPF_MODE */
32781 } wmi_bpf_set_vdev_active_mode_cmd_fixed_param;
32782 
32783 typedef struct wmi_bpf_set_vdev_enable_cmd_s {
32784     A_UINT32 tlv_header;
32785     A_UINT32 vdev_id;
32786     A_UINT32 is_enabled; /* fw assume host default enables */
32787 } wmi_bpf_set_vdev_enable_cmd_fixed_param;
32788 
32789 typedef struct wmi_bpf_set_vdev_work_memory_cmd_s {
32790     A_UINT32 tlv_header;
32791     A_UINT32 vdev_id;
32792     A_UINT32 bpf_version; /* bpf instruction version */
32793     A_UINT32 program_len; /* the program length may be changed by this command */
32794     A_UINT32 addr_offset; /* start writing addr in the working memory */
32795     A_UINT32 length;      /* the writing size of this command (byte units) */
32796 /*
32797  * The TLV follows:
32798  *  A_UINT8 buf_inst[]; <-- Variable length buffer with the data to write
32799  */
32800 } wmi_bpf_set_vdev_work_memory_cmd_fixed_param;
32801 
32802 typedef struct wmi_bpf_get_vdev_work_memory_cmd_s {
32803     A_UINT32 tlv_header;
32804     A_UINT32 vdev_id;
32805     A_UINT32 addr_offset; /* start reading addr in the working memory */
32806     A_UINT32 length;      /* reading size from addr (byte units) */
32807 } wmi_bpf_get_vdev_work_memory_cmd_fixed_param;
32808 
32809 typedef struct wmi_bpf_get_vdev_work_memory_resp_evt_s {
32810     A_UINT32 tlv_header;
32811     A_UINT32 vdev_id;
32812     A_UINT32 offset;    /* read memory offset from start_addr */
32813     A_UINT32 length;    /* read memory length of this command */
32814     A_UINT32 fragment;  /* 1 means more data will come, 0 means last fragment */
32815 /*
32816  * The TLV follows:
32817  *  A_UINT8 buf_inst[]; <-- Variable length buffer containing the read data
32818  */
32819 } wmi_bpf_get_vdev_work_memory_resp_evt_fixed_param;
32820 
32821 #define AES_BLOCK_LEN           16  /* in bytes */
32822 #define FIPS_KEY_LENGTH_128     16  /* in bytes */
32823 #define FIPS_KEY_LENGTH_256     32  /* in bytes */
32824 #define FIPS_ENCRYPT_CMD        0
32825 #define FIPS_DECRYPT_CMD        1
32826 #define FIPS_ENGINE_AES_CTR     0
32827 #define FIPS_ENGINE_AES_MIC     1
32828 #define FIPS_ERROR_OPER_TIMEOUT 1
32829 
32830 typedef enum {
32831     WMI_FIPS_KEY_CIPHER_CCM,
32832     WMI_FIPS_KEY_CIPHER_GCM
32833 } wmi_fips_key_cipher;
32834 
32835 typedef enum {
32836     WMI_FIPS_DISABLE,
32837     WMI_FIPS_ENABLE
32838 } wmi_fips_mode_set;
32839 
32840 /* WMI_PDEV_FIPS_CMDID */
32841 typedef struct {
32842     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_cmd_fixed_param */
32843 
32844     union {
32845         A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
32846         /** pdev_id for identifying the MAC
32847          * See macros starting with WMI_PDEV_ID_ for values.
32848          */
32849         A_UINT32 pdev_id;
32850     };
32851 
32852     A_UINT32 fips_cmd;            /* FIPS_ENCRYPT or FIPS_DECRYPT */
32853     A_UINT32 mode;                /* FIPS_ENGINE_AES_CTR or FIPS_ENGINE_AES_MIC */
32854     A_UINT32 key_len;             /* FIPS_KEY_LENGTH_128 or FIPS_KEY_LENGTH_256 (units = bytes) */
32855     A_UINT8 key[WMI_MAX_KEY_LEN]; /* Key */
32856     A_UINT32 data_len;            /* data length */
32857 /*
32858  * Following this structure is the TLV:
32859  * A_UINT32 data[1]; <-- In Data (keep this in the end)
32860  */
32861 } wmi_pdev_fips_cmd_fixed_param;
32862 
32863 #define MAX_IVNONCE_LEN_FIPS_EXTEND 16
32864 
32865 typedef struct {
32866     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_extend_cmd_init_params */
32867 
32868     A_UINT32 fips_cmd;            /* FIPS_ENCRYPT or FIPS_DECRYPT */
32869     A_UINT32 key_cipher;          /* CCM or GCM */
32870 
32871     A_UINT32 key_len;             /* FIPS_KEY_LENGTH_128 or FIPS_KEY_LENGTH_256: 16/32 bytes */
32872 
32873     A_UINT8 key[WMI_MAX_KEY_LEN]; /* Key if this message is sent by a big-endian host, the byte-ordering of this array needs to be maintained (by manually byte-swapping this array's contents to make up for the automatic byte-swapping done by the copy engine). */
32874     A_UINT32 nonce_iv_len;
32875     A_UINT8 nonce_iv[MAX_IVNONCE_LEN_FIPS_EXTEND]; /* if this message is sent by a big-endian host, the byte-ordering of this array needs to be maintained (by manually byte-swapping this array's contents to make up for the automatic byte-swapping done by the copy engine).*/
32876     A_UINT32 tag_len;        /* 8 or 16  */
32877     A_UINT32 aad_len;
32878     A_UINT32 payload_len;/* Plaintext length */
32879 } wmi_fips_extend_cmd_init_params;
32880 
32881 typedef struct {
32882     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_extend_cmd_fixed_param */
32883 
32884     A_UINT32 pdev_id;
32885     A_UINT32 fips_cookie;        /* Cookie value to identify test vector */
32886     A_UINT32 frag_idx;           /* Fragment Number */
32887     A_UINT32 more_bit;           /* Set to 0 for last fragment number */
32888     A_UINT32 data_len;            /* data length ()*/
32889 
32890 /*
32891  * Following this structure are the TLVs:
32892  *     wmi_fips_extend_cmd_init_params cmd_params
32893  *     A_UINT32 data[1]; <-- In Data ((aad, payload in order))
32894  */
32895 } wmi_pdev_fips_extend_cmd_fixed_param;
32896 
32897 typedef struct {
32898      A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_extend_cmd_fixed_param */
32899 
32900      A_UINT32 pdev_id;
32901      A_UINT32 fips_mode_set;        /*FIPS_MODE_ENABLE -Enable, FIPS_MODE_DISABLE -disable  */
32902 } wmi_pdev_fips_mode_set_cmd_fixed_param;
32903 
32904 typedef struct {
32905     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_featureset_cmd_fixed_param */
32906 
32907 /*
32908  * Following this structure are the TLVs:
32909  *     A_UINT32 feature_set_bitmap[];   <-- Host supported feature info,
32910  *                                          array length is equal to
32911  *                                          WMI_FEATURE_SET_BITMAP_ARRAY_LEN32.
32912  */
32913 } wmi_pdev_featureset_cmd_fixed_param;
32914 
32915 typedef struct {
32916     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_enable_cmd_fixed_param */
32917     union {
32918         A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
32919         /** pdev_id for identifying the MAC
32920          * See macros starting with WMI_PDEV_ID_ for values.
32921          */
32922         A_UINT32 pdev_id;
32923     };
32924     A_UINT32 enable;              /* 1:enable, 0:disable */
32925     A_UINT32 mode;                /* 1:GPIO parallel mode, 0:GPIO serial mode */
32926     A_UINT32 rx_antenna;          /* rx antenna */
32927     A_UINT32 tx_default_antenna;  /* tx default antenna */
32928    /*
32929     * Following this structure is the TLV:
32930     * wmi_pdev_smart_ant_gpio_handle
32931     */
32932 } wmi_pdev_smart_ant_enable_cmd_fixed_param;
32933 
32934 /** GPIO pins/function values to control antennas */
32935 typedef struct {
32936     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_gpio_handle */
32937     A_UINT32 gpio_pin;   /* For serial: index 0-strobe index 1-data, For Parallel: per stream */
32938     A_UINT32 gpio_func;  /* GPIO function values for Smart Antenna */
32939     /** pdev_id for identifying the MAC
32940      * See macros starting with WMI_PDEV_ID_ for values.
32941      */
32942     A_UINT32 pdev_id;
32943 } wmi_pdev_smart_ant_gpio_handle;
32944 
32945 typedef struct {
32946     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param */
32947     union {
32948         A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
32949         /** pdev_id for identifying the MAC
32950          * See macros starting with WMI_PDEV_ID_ for values.
32951          */
32952         A_UINT32 pdev_id;
32953     };
32954     A_UINT32 rx_antenna;
32955 } wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param;
32956 
32957 typedef struct {
32958     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param */
32959     /** unique id identifying the vdev, generated by the caller */
32960     A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
32961     /** peer MAC address */
32962     wmi_mac_addr peer_macaddr;
32963    /*
32964     * Following this structure is the TLV:
32965     * wmi_peer_smart_ant_set_tx_antenna_series
32966     */
32967 } wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param;
32968 
32969 typedef struct {
32970     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_series */
32971     /* antenna array */
32972     A_UINT32 antenna_series;
32973 } wmi_peer_smart_ant_set_tx_antenna_series;
32974 
32975 #define WMI_PER_VALID_BIT_POS     0
32976 #define WMI_PER_VALID_NUM_BITS    1
32977 
32978 #define WMI_GET_PER_VALID(per_threshold) \
32979     WMI_GET_BITS(per_threshold, WMI_PER_VALID_BIT_POS, WMI_PER_VALID_NUM_BITS)
32980 
32981 #define WMI_PER_VALID_SET(per_threshold, value) \
32982     WMI_SET_BITS(per_threshold, WMI_PER_VALID_BIT_POS, WMI_PER_VALID_NUM_BITS, value)
32983 
32984 #define WMI_PER_THRESHOLD_BIT_POS     1
32985 #define WMI_PER_THRESHOLD_NUM_BITS    8
32986 
32987 #define WMI_GET_PER_THRESHOLD(per_threshold) \
32988     WMI_GET_BITS(per_threshold, WMI_PER_THRESHOLD_BIT_POS, WMI_PER_THRESHOLD_NUM_BITS)
32989 
32990 #define WMI_PER_THRESHOLD_SET(per_threshold, value) \
32991     WMI_SET_BITS(per_threshold, WMI_PER_THRESHOLD_BIT_POS, WMI_PER_THRESHOLD_NUM_BITS, value)
32992 
32993 #define WMI_PER_MIN_TX_PKTS_BIT_POS     9
32994 #define WMI_PER_MIN_TX_PKTS_NUM_BITS    16
32995 
32996 #define WMI_GET_PER_MIN_TX_PKTS(per_threshold) \
32997     WMI_GET_BITS(per_threshold, WMI_PER_MIN_TX_PKTS_BIT_POS, WMI_PER_MIN_TX_PKTS_NUM_BITS)
32998 
32999 #define WMI_PER_MIN_TX_PKTS_SET(per_threshold, value) \
33000     WMI_SET_BITS(per_threshold, WMI_PER_MIN_TX_PKTS_BIT_POS, WMI_PER_MIN_TX_PKTS_NUM_BITS, value)
33001 
33002 #define WMI_RATE_SERIES_320_BIT_POS     0
33003 #define WMI_RATE_SERIES_320_NUM_BITS    16
33004 
33005 #define WMI_GET_RATE_SERIES_320(train_rate_series_ext) \
33006     WMI_GET_BITS(train_rate_series_ext, WMI_RATE_SERIES_320_BIT_POS, WMI_RATE_SERIES_320_NUM_BITS)
33007 
33008 #define WMI_SET_RATE_SERIES_320(train_rate_series_ext) \
33009     WMI_SET_BITS(train_rate_series_ext, WMI_RATE_SERIES_320_BIT_POS, WMI_RATE_SERIES_320_NUM_BITS, value)
33010 
33011 typedef struct {
33012     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_param */
33013     /* rate array */
33014     union {
33015         /* train_rate_series:
33016          * original name, used for 8-bit rate-code implementations
33017          */
33018         A_UINT32  train_rate_series;
33019         /* train_rate_series_lo:
33020          * Contains the lower 32 bits of rate array, for larger rate-code
33021          * implementations.  This field is paired with train_rate_series_hi.
33022          */
33023         A_UINT32  train_rate_series_lo;
33024     };
33025     /* antenna array */
33026     A_UINT32 train_antenna_series;
33027     /* Rate flags */
33028     /* TODO: For future use? */
33029     A_UINT32 rc_flags;
33030     /* rate array -- continued */
33031     A_UINT32 train_rate_series_hi; /* Higher 32 bits of rate array */
33032     /* train_rate_series_ext:
33033      * 15:0 - 320Mhz rate
33034      * 31:16 - Reserved
33035      */
33036     A_UINT32 train_rate_series_ext; /* For 320Mhz and Reserved for other */
33037 } wmi_peer_smart_ant_set_train_antenna_param;
33038 
33039 typedef struct {
33040     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param */
33041     /** unique id identifying the VDEV, generated by the caller */
33042     A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
33043     /** peer MAC address */
33044     wmi_mac_addr peer_macaddr;
33045     /* num packets; 0-stop training */
33046     A_UINT32 num_pkts;
33047     /* per_threshold:
33048      * bits  | interpretation
33049      * ------+--------------------------
33050      *    0  | PER Threshold is valid
33051      *  1:8  | Per Threshold
33052      *  9:24 | min_tx_pkts Minimum number of pkts need to be checked
33053      * 25:31 | Reserved
33054      */
33055     A_UINT32 per_threshold;
33056 /*
33057  * Following this structure is the TLV:
33058  * wmi_peer_smart_ant_set_train_antenna_param
33059  */
33060 } wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param;
33061 
33062 typedef struct {
33063     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param */
33064     /** unique id identifying the vdev, generated by the caller */
33065     A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
33066     /** peer MAC address */
33067     wmi_mac_addr peer_macaddr;
33068     /* command id*/
33069     A_UINT32 cmd_id;
33070     /* number of arguments passed */
33071     A_UINT32 args_count;
33072 /*
33073  * Following this structure is the TLV:
33074  * A_UINT32 args[]; <-- argument list
33075  */
33076 } wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param;
33077 
33078 typedef struct {
33079     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ant_ctrl_chain */
33080     A_UINT32 antCtrlChain;
33081     /** pdev_id for identifying the MAC
33082      * See macros starting with WMI_PDEV_ID_ for values.
33083      */
33084     A_UINT32 pdev_id;
33085 } wmi_pdev_set_ant_ctrl_chain;
33086 
33087 typedef struct {
33088     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ant_switch_tbl_cmd_fixed_param */
33089     A_UINT32 mac_id;     /* MAC ID */
33090     A_UINT32 antCtrlCommon1;
33091     A_UINT32 antCtrlCommon2;
33092    /*
33093     * Following this structure is the TLV:
33094     * wmi_pdev_set_ant_ctrl_chain
33095     */
33096 } wmi_pdev_set_ant_switch_tbl_cmd_fixed_param;
33097 
33098 typedef struct {
33099     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ctl_table_cmd_fixed_param */
33100     union {
33101         A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
33102         /** pdev_id for identifying the MAC
33103          * See macros starting with WMI_PDEV_ID_ for values.
33104          */
33105         A_UINT32 pdev_id;
33106     };
33107     /** len of CTL info */
33108     A_UINT32 ctl_len;
33109     /* ctl array (len adjusted to  number of words).
33110      * Following this structure is the TLV:
33111      * A_UINT32 ctl_info[1];
33112      */
33113 } wmi_pdev_set_ctl_table_cmd_fixed_param;
33114 
33115 typedef struct {
33116     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_bios_sar_cmd_fixed_param */
33117     A_UINT32    pdev_id;    /* pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
33118     A_UINT32    sar_len;
33119     /*  sar power array are stored in TLV, which follow this structure;
33120      *  sar_len is the number of valid bytes in the sar power array;
33121      *  sar power array contains 22 elements.
33122      *  Each element stores the maximum SAR power on certain band.
33123      *  Its type is A_UINT8 and its unit is 0.25 dBm.
33124      *      sar_power[0] for chain0 2g
33125      *      sar_power[1] for chain0 5g unii-1
33126      *      ...
33127      *      sar_power[4] for chain0 5g unii-4
33128      *      sar_power[5] for chain0 6g unii-5
33129      *      ...
33130      *      sar_power[10] for chain0 6g unii-10
33131      *      sar_power[11] for chain1 2g
33132      *      ...
33133      *      sar_power[21] for chain1 6g unii-10
33134      */
33135 
33136     A_UINT32    dbs_backoff_len;
33137     /*  dbs_backoff follow sar array, its type is A_UINT8;
33138      *  dbs_backoff[0] ~ dbs_backoff[5], these six elements are based on
33139      *  maximum SAR power, and make some offset adjustment in DBS mode.
33140      *  Their unit is 0.25 dB.
33141      *      dbs_backoff[0] for chain 0 2G
33142      *      dbs_backoff[1] for chain 0 5G
33143      *      dbs_backoff[2] for chain 0 6G
33144      *      dbs_backoff[3] for chain 1 2G
33145      *      dbs_backoff[4] for chain 1 5G
33146      *      dbs_backoff[5] for chain 1 6G
33147      */
33148 } wmi_pdev_set_bios_sar_table_cmd_fixed_param;
33149 
33150 typedef struct {
33151     A_UINT32    tlv_header; /*  TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_bios_sar_cmd_fixed_param */
33152     A_UINT32    pdev_id;    /*   pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
33153     A_UINT32    geo_len;
33154     /* geo offset array is in TLV, followed this structure:
33155      * A_UINT8 Geo_offset[];
33156      * Geo_offset array has 18 elements. The meaning of each element is to
33157      * adjust offset based on maximum SAR power according to different regions.
33158      * Its unit is 0.25 dB.
33159      *     Geo_offset[0] chain 0 FCC_Offset on 2G
33160      *     Geo_offset[1] chain 0 FCC_Offset on 5G
33161      *     Geo_offset[2] chain 0 FCC_Offset on 6G
33162      *     Geo_offset[3] chain 0 CE_Offset on 2G
33163      *     Geo_offset[4] chain 0 CE_Offset on 5G
33164      *     Geo_offset[5] chain 0 CE_Offset on 6G
33165      *     Geo_offset[6] chain 0 ROW_Offset on 2G
33166      *     Geo_offset[7] chain 0 ROW_Offset on 5G
33167      *     Geo_offset[8] chain 0 ROW_Offset on 6G
33168      *     Geo_offset[9] chain 1 FCC_Offset on 2G
33169      *     ...
33170      *     Geo_offset[17] chain 1 ROW_Offset on 6G
33171      *  In actual use, FW will subtract an offset value according to the region;
33172      */
33173 } wmi_pdev_set_bios_geo_table_cmd_fixed_param;
33174 
33175 typedef struct {
33176     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_bios_interface_cmd_fixed_param */
33177     A_UINT32 pdev_id;       /* pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
33178     A_UINT32 param_type_id; /* BIOS parameters type, see bios_param_type_e */
33179     /* length:
33180      * Number of valid bytes in A_UINT8 TLV array that follows this
33181      * fixed_param TLV.
33182      * The number of bytes allocated in the A_UINT8 TLV array will be a
33183      * multiple of 4.  The "length" field indicates how many of these
33184      * byte elements contain valid data; the remainder are only for
33185      * alignment padding and should be ignored.
33186      */
33187     A_UINT32 length;
33188     /*  Following this structure is TLV, bios data array */
33189 } wmi_pdev_set_bios_interface_cmd_fixed_param;
33190 
33191 typedef enum {
33192     BIOS_PARAM_CCA_THRESHOLD_TYPE,
33193     /*  CCA THR structure has 29 bytes, it includes control flag and
33194      *  CCA THR parameters;
33195      *
33196      *  If CCA_THR_Control is set 0, FW will still use
33197      *  AGC_ENERGY_DETECT_THRESHOLD.agcEnergyDetThr in BDF, and detailed
33198      *  CCA threshold do not need to be transported.
33199      *  If CCA_THR_Control is set 1, FW needs to use CCA threshold parameters
33200      *  in BIOS, and CCA THR parameters are provided in the subsequent A_UINT8
33201      *  TLV array.
33202      *
33203      *  In CCA THR parameters, ETSI / MKK / CHN use same CCA threshold,
33204      *  and FCC / KOR use same CCA threshold. Its unit is in 1db,
33205      *  which is relative to HW NF value.
33206      *
33207      *  //control flag
33208      *  A_UINT8         CCA_THR_Control
33209      *
33210      *  //5G
33211      *  A_UINT8     agcEnergyDetThr5G_thrCcaPri20dB_ETSI_MKK_CHN
33212      *  A_UINT8     agcEnergyDetThr5G_thrCcaExt20dB_ETSI_MKK_CHN
33213      *  A_UINT8     agcEnergyDetThr5G_thrCcaExt40dB_ETSI_MKK_CHN
33214      *  A_UINT8     agcEnergyDetThr5G_thrCcaExt80dB_ETSI_MKK_CHN
33215      *  A_UINT8     agcEnergyDetThr5G_thrCcaPri20dB_FCC_KOR
33216      *  A_UINT8     agcEnergyDetThr5G_thrCcaExt20dB_FCC_KOR
33217      *  A_UINT8     agcEnergyDetThr5G_thrCcaExt40dB_FCC_KOR
33218      *  A_UINT8     agcEnergyDetThr5G_thrCcaExt80dB_FCC_KOR
33219      *
33220      *  //2G
33221      *  A_UINT8     agcEnergyDetThr2G_thrCcaPri20dB_ETSI_MKK_CHN
33222      *  A_UINT8     agcEnergyDetThr2G_thrCcaExt20dB_ETSI_MKK_CHN
33223      *  A_UINT8     agcEnergyDetThr2G_thrCcaExt40dB_ETSI_MKK_CHN
33224      *  A_UINT8     agcEnergyDetThr2G_thrCcaExt80dB_ETSI_MKK_CHN
33225      *  A_UINT8     agcEnergyDetThr2G_thrCcaPri20dB_FCC_KOR
33226      *  A_UINT8     agcEnergyDetThr2G_thrCcaExt20dB_FCC_KOR
33227      *  A_UINT8     agcEnergyDetThr2G_hrCcaExt40dB_FCC_KOR
33228      *  A_UINT8     agcEnergyDetThr2G_hrCcaExt80dB_FCC_KOR
33229      *
33230      *  //6G
33231      *  A_UINT8     agcEnergyDetThr6G_thrCcaPri20dB_FCC_KOR
33232      *  A_UINT8     agcEnergyDetThr6G_thrCcaExt20dB_FCC_KOR
33233      *  A_UINT8     agcEnergyDetThr6G_thrCcaExt40dB_FCC_KOR
33234      *  A_UINT8     agcEnergyDetThr6G_thrCcaExt80dB_FCC_KOR
33235      *
33236      *  //6G-LPI/VLP
33237      *  A_UINT8     agcEnergyDetThr6GLPI.thrCcaPri20dB_ETSI_MKK_CHN
33238      *  A_UINT8     agcEnergyDetThr6GLPI thrCcaExt20dB_ETSI_MKK_CHN
33239      *  A_UINT8     agcEnergyDetThr6GLPI thrCcaExt40dB_ETSI_MKK_CHN
33240      *  A_UINT8     agcEnergyDetThr6GLPI.thrCcaExt80dB_ETSI_MKK_CHN
33241      *  A_UINT8     agcEnergyDetThr6GVLP.thrCcaPri20dB_ETSI_MKK_CHN
33242      *  A_UINT8     agcEnergyDetThr6GVLP thrCcaExt20dB_ETSI_MKK_CHN
33243      *  A_UINT8     agcEnergyDetThr6GVLP thrCcaExt40dB_ETSI_MKK_CHN
33244      *  A_UINT8     agcEnergyDetThr6GVLP.thrCcaExt80dB_ETSI_MKK_CHN
33245      */
33246 
33247     BIOS_PARAM_TAS_CONFIG_TYPE,
33248     /*
33249      *  BIOS_PARAM_TAS_CONFIG_TYPE Structure has 108 bytes. Please Note these fields of A_UINT32 or A_INT32.
33250      *  explicit endianness corrections will need to be done by any big-endian host when the little-endian target is paired with a big-endian host.
33251      *  PowerLimitIndicator points out which region(FCC OR ICNIRP) power limit value should be used.
33252      *  A bit of PowerLimitIndicator maps a country. bit value 0: ICNIRP 1: FCC
33253      *
33254      *  A_UINT8       Version
33255      *  A_UINT8       TASIsPairWith3rdPartyWwan
33256      *  A_UINT8       SARAntennaGroupingExt[6]  (6 Bytes)
33257      *  A_UINT32      TASPeakModeIndicator[8]  (32 Bytes)
33258      *  A_UINT32      TAS_FCC_ICNIRP_Indicator[8] (32 Bytes)
33259      *  A_UINT32      PowerLimitIndicator[8] (32 Bytes)
33260      *  A_UINT8       reserveMarginDb (1 Bytes)
33261      *  A_UINT8       reserved[3] (3 Bytes)
33262      */
33263 
33264     BIOS_PARAM_TAS_DATA_TYPE,
33265     /*
33266      *  BIOS_PARAM_TAS_DATA_TYPE Structure has 69 bytes as below, power limit value unit is 0.25 dBm.
33267      *  If Enable flag is 0, FW will not use power limit value of bios.
33268      *
33269      *  A_UINT8 Version
33270      *  A_UINT8 Enable Flag
33271      *  A_UINT8 Power Table Index
33272      *  ====================FCC POWER LIMIT VALUE======================
33273      *  A_INT8  FCC 2 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm)
33274      *  A_INT8  FCC 2 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm)
33275      *  A_INT8  FCC 2 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm)
33276      *  A_INT8  FCC 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-1, Ch32 ~ Ch48)
33277      *  A_INT8  FCC 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-1, Ch32 ~ Ch48)
33278      *  A_INT8  FCC 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-1, Ch32 ~ Ch48)
33279      *  A_INT8  FCC 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-2, Ch50 ~ Ch144)
33280      *  A_INT8  FCC 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-2, Ch50 ~ Ch144)
33281      *  A_INT8  FCC 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-2, Ch50 ~ Ch144)
33282      *  A_INT8  FCC 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-3, Ch149 ~ Ch161)
33283      *  A_INT8  FCC 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-3, Ch149 ~ Ch161)
33284      *  A_INT8  FCC 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-3, Ch149 ~ Ch161)
33285      *  A_INT8  FCC 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-4, Ch163 ~ Ch177)
33286      *  A_INT8  FCC 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-4, Ch163 ~ Ch177)
33287      *  A_INT8  FCC 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-4, Ch163 ~ Ch177)
33288      *  A_INT8  FCC 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch1, Ch2 ~ Ch41)
33289      *  A_INT8  FCC 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch1, Ch2 ~ Ch41)
33290      *  A_INT8  FCC 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch1, Ch2 ~ Ch41)
33291      *  A_INT8  FCC 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch45 ~ Ch93)
33292      *  A_INT8  FCC 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch45 ~ Ch93)
33293      *  A_INT8  FCC 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch45 ~ Ch93)
33294      *  A_INT8  FCC 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-6) (Ch97~ Ch113)
33295      *  A_INT8  FCC 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-6) (Ch97~ Ch113)
33296      *  A_INT8  FCC 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-6) (Ch97~ Ch113)
33297      *  A_INT8  FCC 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
33298      *  A_INT8  FCC 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
33299      *  A_INT8  FCC 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
33300      *  A_INT8  FCC 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
33301      *  A_INT8  FCC 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
33302      *  A_INT8  FCC 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
33303      *  A_INT8  FCC 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-8) (Ch117~Ch149)
33304      *  A_INT8  FCC 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-8) (Ch117~Ch149)
33305      *  A_INT8  FCC 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-8) (Ch117~Ch149)
33306      *  ====================ICNIRP POWER LIMIT VALUE======================
33307      *  A_INT8  ICNIRP 2 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm)
33308      *  A_INT8  ICNIRP 2 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm)
33309      *  A_INT8  ICNIRP 2 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm)
33310      *  A_INT8  ICNIRP 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-1, Ch32 ~ Ch48)
33311      *  A_INT8  ICNIRP 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-1, Ch32 ~ Ch48)
33312      *  A_INT8  ICNIRP 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-1, Ch32 ~ Ch48)
33313      *  A_INT8  ICNIRP 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-2, Ch50 ~ Ch144)
33314      *  A_INT8  ICNIRP 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-2, Ch50 ~ Ch144)
33315      *  A_INT8  ICNIRP 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-2, Ch50 ~ Ch144)
33316      *  A_INT8  ICNIRP 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-3, Ch149 ~ Ch161)
33317      *  A_INT8  ICNIRP 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-3, Ch149 ~ Ch161)
33318      *  A_INT8  ICNIRP 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-3, Ch149 ~ Ch161)
33319      *  A_INT8  ICNIRP 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-4, Ch163 ~ Ch177)
33320      *  A_INT8  ICNIRP 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-4, Ch163 ~ Ch177)
33321      *  A_INT8  ICNIRP 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-4, Ch163 ~ Ch177)
33322      *  A_INT8  ICNIRP 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch1, Ch2 ~ Ch41)
33323      *  A_INT8  ICNIRP 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch1, Ch2 ~ Ch41)
33324      *  A_INT8  ICNIRP 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch1, Ch2 ~ Ch41)
33325      *  A_INT8  ICNIRP 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch45 ~ Ch93)
33326      *  A_INT8  ICNIRP 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch45 ~ Ch93)
33327      *  A_INT8  ICNIRP 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch45 ~ Ch93)
33328      *  A_INT8  ICNIRP 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-6) (Ch97~ Ch113)
33329      *  A_INT8  ICNIRP 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-6) (Ch97~ Ch113)
33330      *  A_INT8  ICNIRP 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-6) (Ch97~ Ch113)
33331      *  A_INT8  ICNIRP 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
33332      *  A_INT8  ICNIRP 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
33333      *  A_INT8  ICNIRP 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
33334      *  A_INT8  ICNIRP 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
33335      *  A_INT8  ICNIRP 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
33336      *  A_INT8  ICNIRP 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
33337      *  A_INT8  ICNIRP 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-8) (Ch117~Ch149)
33338      *  A_INT8  ICNIRP 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-8) (Ch117~Ch149)
33339      *  A_INT8  ICNIRP 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-8) (Ch117~Ch149)
33340      */
33341 
33342     BIOS_PARAM_TYPE_BANDEDGE_CTL_POWER,
33343      /*
33344       *  BIOS_PARAM_TYPE_BANDEDGE_CTL_POWER Structure has 100 bytes as below, CTL limit power unit is 0.25 dBm.
33345       *  If Enable flag is 0, FW will not use power limit value of bios.
33346       *
33347       *  A_UINT8 version
33348       *  A_UINT8 enableFlag  (always 1)
33349       *  A_UINT8 reserved[2]  for 4 byte alignment,
33350 
33351       *  ====================2G CTL POWER LIMIT ======================
33352       *  A_INT8 2G 20M Channel Center Freq 2412 CTL Limit Power SU
33353       *  A_INT8 2G 20M Channel Center Freq 2412 CTL Limit Power OFDMA
33354       *  A_INT8 2G 20M Channel Center Freq 2417 CTL Limit Power SU
33355       *  A_INT8 2G 20M Channel Center Freq 2417 CTL Limit Power OFDMA
33356       *  A_INT8 2G 20M Channel Center Freq 2462 CTL Limit Power SU
33357       *  A_INT8 2G 20M Channel Center Freq 2462 CTL Limit Power OFDMA
33358       *  A_INT8 2G 20M Channel Center Freq 2467 CTL Limit Power SU
33359       *  A_INT8 2G 20M Channel Center Freq 2467 CTL Limit Power OFDMA
33360       *  A_INT8 2G 20M Channel Center Freq 2472 CTL Limit Power SU
33361       *  A_INT8 2G 20M Channel Center Freq 2472 CTL Limit Power OFDMA
33362 
33363       *  A_INT8 2G 40M Channel Center Freq 2422 CTL Limit Power SU
33364       *  A_INT8 2G 40M Channel Center Freq 2422 CTL Limit Power OFDMA
33365       *  A_INT8 2G 40M Channel Center Freq 2427 CTL Limit Power SU
33366       *  A_INT8 2G 40M Channel Center Freq 2427 CTL Limit Power OFDMA
33367       *  A_INT8 2G 40M Channel Center Freq 2452 CTL Limit Power SU
33368       *  A_INT8 2G 40M Channel Center Freq 2452 CTL Limit Power OFDMA
33369       *  A_INT8 2G 40M Channel Center Freq 2457 CTL Limit Power SU
33370       *  A_INT8 2G 40M Channel Center Freq 2457 CTL Limit Power OFDMA
33371       *  A_INT8 2G 40M Channel Center Freq 2462 CTL Limit Power SU
33372       *  A_INT8 2G 40M Channel Center Freq 2462 CTL Limit Power OFDMA
33373 
33374       *  ====================5G CTL POWER LIMIT ======================
33375       *  A_INT8 5G 20M Channel Center Freq 5180 CTL Limit Power SU
33376       *  A_INT8 5G 20M Channel Center Freq 5180 CTL Limit Power OFDMA
33377       *  A_INT8 5G 20M Channel Center Freq 5320 CTL Limit Power SU
33378       *  A_INT8 5G 20M Channel Center Freq 5320 CTL Limit Power OFDMA
33379       *  A_INT8 5G 20M Channel Center Freq 5500 CTL Limit Power SU
33380       *  A_INT8 5G 20M Channel Center Freq 5500 CTL Limit Power OFDMA
33381       *  A_INT8 5G 20M Channel Center Freq 5700 CTL Limit Power SU
33382       *  A_INT8 5G 20M Channel Center Freq 5700 CTL Limit Power OFDMA
33383       *  A_INT8 5G 20M Channel Center Freq 5745 CTL Limit Power SU
33384       *  A_INT8 5G 20M Channel Center Freq 5745 CTL Limit Power OFDMA
33385       *  A_INT8 5G 20M Channel Center Freq 5825 CTL Limit Power SU
33386       *  A_INT8 5G 20M Channel Center Freq 5825 CTL Limit Power OFDMA
33387       *  A_INT8 5G 20M Channel Center Freq 5845 CTL Limit Power SU
33388       *  A_INT8 5G 20M Channel Center Freq 5845 CTL Limit Power OFDMA
33389       *  A_INT8 5G 20M Channel Center Freq 5885 CTL Limit Power SU
33390       *  A_INT8 5G 20M Channel Center Freq 5885 CTL Limit Power OFDMA
33391 
33392       *  A_INT8 5G 40M Channel Center Freq 5190 CTL Limit Power SU
33393       *  A_INT8 5G 40M Channel Center Freq 5190 CTL Limit Power OFDMA
33394       *  A_INT8 5G 40M Channel Center Freq 5310 CTL Limit Power SU
33395       *  A_INT8 5G 40M Channel Center Freq 5310 CTL Limit Power OFDMA
33396       *  A_INT8 5G 40M Channel Center Freq 5510 CTL Limit Power SU
33397       *  A_INT8 5G 40M Channel Center Freq 5510 CTL Limit Power OFDMA
33398       *  A_INT8 5G 40M Channel Center Freq 5670 CTL Limit Power SU
33399       *  A_INT8 5G 40M Channel Center Freq 5670 CTL Limit Power OFDMA
33400       *  A_INT8 5G 40M Channel Center Freq 5755 CTL Limit Power SU
33401       *  A_INT8 5G 40M Channel Center Freq 5755 CTL Limit Power OFDMA
33402       *  A_INT8 5G 40M Channel Center Freq 5795 CTL Limit Power SU
33403       *  A_INT8 5G 40M Channel Center Freq 5795 CTL Limit Power OFDMA
33404       *  A_INT8 5G 40M Channel Center Freq 5835 CTL Limit Power SU
33405       *  A_INT8 5G 40M Channel Center Freq 5835 CTL Limit Power OFDMA
33406       *  A_INT8 5G 40M Channel Center Freq 5875 CTL Limit Power SU
33407       *  A_INT8 5G 40M Channel Center Freq 5875 CTL Limit Power OFDMA
33408 
33409       *  A_INT8 5G 80M Channel Center Freq 5210 CTL Limit Power SU
33410       *  A_INT8 5G 80M Channel Center Freq 5210 CTL Limit Power OFDMA
33411       *  A_INT8 5G 80M Channel Center Freq 5290 CTL Limit Power SU
33412       *  A_INT8 5G 80M Channel Center Freq 5290 CTL Limit Power OFDMA
33413       *  A_INT8 5G 80M Channel Center Freq 5530 CTL Limit Power SU
33414       *  A_INT8 5G 80M Channel Center Freq 5530 CTL Limit Power OFDMA
33415       *  A_INT8 5G 80M Channel Center Freq 5610 CTL Limit Power SU
33416       *  A_INT8 5G 80M Channel Center Freq 5610 CTL Limit Power OFDMA
33417       *  A_INT8 5G 80M Channel Center Freq 5775 CTL Limit Power SU
33418       *  A_INT8 5G 80M Channel Center Freq 5775 CTL Limit Power OFDMA
33419       *  A_INT8 5G 80M Channel Center Freq 5855 CTL Limit Power SU
33420       *  A_INT8 5G 80M Channel Center Freq 5855 CTL Limit Power OFDMA
33421 
33422       *  A_INT8 5G 160M Channel Center Freq 5250 CTL Limit Power SU
33423       *  A_INT8 5G 160M Channel Center Freq 5250 CTL Limit Power OFDMA
33424       *  A_INT8 5G 160M Channel Center Freq 5570 CTL Limit Power SU
33425       *  A_INT8 5G 160M Channel Center Freq 5570 CTL Limit Power OFDMA
33426       *  A_INT8 5G 160M Channel Center Freq 5815 CTL Limit Power SU
33427       *  A_INT8 5G 160M Channel Center Freq 5815 CTL Limit Power OFDMA
33428 
33429       *  A_INT8 5G 320M Channel Center Freq 5650 CTL Limit Power SU (5650 Punctured 1111_1111_1111_0000)
33430       *  A_INT8 5G 320M Channel Center Freq 5650 CTL Limit Power OFDMA (5650 Punctured 1111_1111_1111_0000)
33431 
33432       *  ====================6G CTL POWER LIMIT ======================
33433       *  A_INT8 6G 20M Channel Center Freq 5935 CTL Limit Power SU
33434       *  A_INT8 6G 20M Channel Center Freq 5935 CTL Limit Power OFDMA
33435       *  A_INT8 6G 20M Channel Center Freq 5955 CTL Limit Power SU
33436       *  A_INT8 6G 20M Channel Center Freq 5955 CTL Limit Power OFDMA
33437       *  A_INT8 6G 20M Channel Center Freq 6415 CTL Limit Power SU
33438       *  A_INT8 6G 20M Channel Center Freq 6415 CTL Limit Power OFDMA
33439       *  A_INT8 6G 20M Channel Center Freq 7115 CTL Limit Power SU
33440       *  A_INT8 6G 20M Channel Center Freq 7115 CTL Limit Power OFDMA
33441 
33442       *  A_INT8 6G 40M Channel Center Freq 5965 CTL Limit Power SU
33443       *  A_INT8 6G 40M Channel Center Freq 5965 CTL Limit Power OFDMA
33444       *  A_INT8 6G 40M Channel Center Freq 6405 CTL Limit Power SU
33445       *  A_INT8 6G 40M Channel Center Freq 6405 CTL Limit Power OFDMA
33446 
33447       *  A_INT8 6G 80M Channel Center Freq 5985 CTL Limit Power SU
33448       *  A_INT8 6G 80M Channel Center Freq 5985 CTL Limit Power OFDMA
33449       *  A_INT8 6G 80M Channel Center Freq 6385 CTL Limit Power SU
33450       *  A_INT8 6G 80M Channel Center Freq 6385 CTL Limit Power OFDMA
33451 
33452       *  A_INT8 6G 160M Channel Center Freq 6025 CTL Limit Power SU
33453       *  A_INT8 6G 160M Channel Center Freq 6025 CTL Limit Power OFDMA
33454       *  A_INT8 6G 160M Channel Center Freq 6345 CTL Limit Power SU
33455       *  A_INT8 6G 160M Channel Center Freq 6345 CTL Limit Power OFDMA
33456 
33457       *  A_INT8 6G 320M Channel Center Freq 6105 CTL Limit Power SU
33458       *  A_INT8 6G 320M Channel Center Freq 6105 CTL Limit Power OFDMA
33459       *  A_INT8 6G 320M Channel Center Freq 6265 CTL Limit Power SU
33460       *  A_INT8 6G 320M Channel Center Freq 6265 CTL Limit Power OFDMA
33461       */
33462 
33463 
33464     BIOS_PARAM_TYPE_MAX,
33465 } bios_param_type_e;
33466 
33467 typedef struct {
33468     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mimogain_table_cmd_fixed_param */
33469     union {
33470         A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
33471         /** pdev_id for identifying the MAC
33472          * See macros starting with WMI_PDEV_ID_ for values.
33473          */
33474         A_UINT32 pdev_id;
33475     };
33476     A_UINT32 mimogain_info; /* see WMI_MIMOGAIN macros */
33477     /*
33478      * Bit 7:0 len of array gain table
33479      * Bit 8   bypass multi chain gain or not
33480      */
33481     /* array gain table(s) (len adjusted to number of words).
33482      * Following this structure is the TLV:
33483      * A_UINT32 arraygain_tbl[1];
33484      */
33485 } wmi_pdev_set_mimogain_table_cmd_fixed_param;
33486 
33487 #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_S 0
33488 #define WMI_MIMOGAIN_ARRAY_GAIN_LEN (0xff << WMI_MIMOGAIN_ARRAY_GAIN_LEN_S)
33489 #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_GET(x) WMI_F_MS(x,WMI_MIMOGAIN_ARRAY_GAIN_LEN)
33490 #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_SET(x,z) WMI_F_RMW(x,z,WMI_MIMOGAIN_ARRAY_GAIN_LEN)
33491 
33492 #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S 8
33493 #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS (0x1 << WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S)
33494 #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_GET(x) WMI_F_MS(x,WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
33495 #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_SET(x,z) WMI_F_RMW(x,z,WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
33496 
33497 
33498 typedef struct {
33499     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fwtest_set_param_cmd_fixed_param */
33500     /** parameter id   */
33501     A_UINT32 param_id;
33502     /** parameter value */
33503     A_UINT32 param_value;
33504 } wmi_fwtest_set_param_cmd_fixed_param;
33505 
33506 #define WMI_ATF_DENOMINATION   1000 /* Expressed in 1 part in 1000 (permille) */
33507 
33508 #define WMI_ATF_SSID_FAIR_SCHED         0 /** fair ATF scheduling for vdev */
33509 #define WMI_ATF_SSID_STRICT_SCHED       1 /** strict ATF scheduling for vdev */
33510 #define WMI_ATF_SSID_FAIR_SCHED_WITH_UB 2 /** fair ATF scheduling with upper bound for VDEV */
33511 
33512 typedef struct {
33513     /** TLV tag and len; tag equals
33514      *  WMITLV_TAG_STRUC_wmi_atf_peer_info */
33515     A_UINT32 tlv_header;
33516     wmi_mac_addr peer_macaddr;
33517     A_UINT32 atf_units; /* Based on 1 part in 1000 (per mille) */
33518     A_UINT32 atf_groupid; /* Group Id of the peers for ATF SSID grouping */
33519     A_UINT32 atf_units_reserved; /* Peer congestion threshold for future use */
33520     A_UINT32 vdev_id;
33521     A_UINT32 pdev_id;
33522 } wmi_atf_peer_info;
33523 
33524 #define WMI_ATF_PEER_UNITS_BIT_POS        0
33525 #define WMI_ATF_PEER_UNITS_NUM_BITS       16
33526 
33527 #define WMI_ATF_GET_PEER_UNITS(atf_peer_info)  \
33528     WMI_GET_BITS(atf_peer_info,WMI_ATF_PEER_UNITS_BIT_POS,WMI_ATF_PEER_UNITS_NUM_BITS)
33529 
33530 #define WMI_ATF_SET_PEER_UNITS(atf_peer_info,val)  \
33531     WMI_SET_BITS(atf_peer_info,WMI_ATF_PEER_UNITS_BIT_POS,WMI_ATF_PEER_UNITS_NUM_BITS, val)
33532 
33533 #define WMI_ATF_GROUP_ID_BIT_POS        16
33534 #define WMI_ATF_GROUP_ID_NUM_BITS       8
33535 
33536 #define WMI_ATF_GET_GROUP_ID(atf_peer_info)  \
33537     WMI_GET_BITS(atf_peer_info,WMI_ATF_GROUP_ID_BIT_POS,WMI_ATF_GROUP_ID_NUM_BITS)
33538 
33539 #define WMI_ATF_SET_GROUP_ID(atf_peer_info,val)  \
33540     WMI_SET_BITS(atf_peer_info,WMI_ATF_GROUP_ID_BIT_POS,WMI_ATF_GROUP_ID_NUM_BITS, val)
33541 
33542 #define WMI_ATF_EXPLICIT_PEER_FLAG_BIT_POS        24
33543 #define WMI_ATF_EXPLICIT_PEER_FLAG_NUM_BITS       1
33544 
33545 #define WMI_ATF_GET_EXPLICIT_PEER_FLAG(atf_peer_info)  \
33546     WMI_GET_BITS(atf_peer_info,WMI_ATF_EXPLICIT_PEER_FLAG_BIT_POS,WMI_ATF_EXPLICIT_PEER_FLAG_NUM_BITS)
33547 
33548 #define WMI_ATF_SET_EXPLICIT_PEER_FLAG(atf_peer_info,val)  \
33549     WMI_SET_BITS(atf_peer_info,WMI_ATF_EXPLICIT_PEER_FLAG_BIT_POS,WMI_ATF_EXPLICIT_PEER_FLAG_NUM_BITS, val)
33550 
33551 typedef struct {
33552     /* The new structure is an optimized version of wmi_atf_peer_info & wmi_atf_peer_ext_info combined */
33553     A_UINT32 tlv_header;
33554     wmi_mac_addr peer_macaddr;
33555     /* atf_peer_info
33556      * Bits 0-15  - atf_units (based on 1 part in 1000 (per mille))
33557      * Bits 16-23 - atf_groupid
33558      * Bit  24    - Configured Peer Indication (0/1), this bit would be set by
33559      *              host to indicate that the peer has airtime % configured
33560      *              explicitly by user
33561      * Bits 25-31 - Reserved (Shall be zero)
33562      */
33563     A_UINT32 atf_peer_info;
33564 } wmi_atf_peer_info_v2;
33565 
33566 #define WMI_ATF_PEER_FULL_UPDATE_BIT_POS        0
33567 #define WMI_ATF_PEER_FULL_UPDATE_NUM_BITS       1
33568 
33569 #define WMI_ATF_GET_PEER_FULL_UPDATE(atf_flags)  \
33570     WMI_GET_BITS(atf_flags,WMI_ATF_PEER_FULL_UPDATE_BIT_POS,WMI_ATF_PEER_FULL_UPDATE_NUM_BITS)
33571 
33572 #define WMI_ATF_SET_PEER_FULL_UPDATE(atf_flags,val)  \
33573     WMI_SET_BITS(atf_flags,WMI_ATF_PEER_FULL_UPDATE_BIT_POS,WMI_ATF_PEER_FULL_UPDATE_NUM_BITS,val)
33574 
33575 #define WMI_ATF_PEER_PENDING_WMI_CMDS_BIT_POS        1
33576 #define WMI_ATF_PEER_PENDING_WMI_CMDS_NUM_BITS       1
33577 
33578 #define WMI_ATF_GET_PEER_PENDING_WMI_CMDS(atf_flags)  \
33579     WMI_GET_BITS(atf_flags,WMI_ATF_PEER_PENDING_WMI_CMDS_BIT_POS, WMI_ATF_PEER_PENDING_WMI_CMDS_NUM_BITS)
33580 
33581 #define WMI_ATF_SET_PEER_PENDING_WMI_CMDS(atf_flags,val)  \
33582     WMI_SET_BITS(atf_flags,WMI_ATF_PEER_PENDING_WMI_CMDS_BIT_POS, WMI_ATF_PEER_PENDING_WMI_CMDS_NUM_BITS, val)
33583 
33584 #define WMI_ATF_PEER_PDEV_ID_VALID_BIT_POS          2
33585 #define WMI_ATF_PEER_PDEV_ID_VALID_NUM_BITS         1
33586 
33587 #define WMI_ATF_GET_PEER_PDEV_ID_VALID(atf_flags)   \
33588     WMI_GET_BITS(atf_flags,WMI_ATF_PEER_PDEV_ID_VALID_BIT_POS, WMI_ATF_PEER_PDEV_ID_VALID_NUM_BITS)
33589 
33590 #define WMI_ATF_SET_PEER_PDEV_ID_VALID(atf_flags,val)   \
33591     WMI_SET_BITS(atf_flags,WMI_ATF_PEER_PDEV_ID_VALID_BIT_POS, WMI_ATF_PEER_PDEV_ID_VALID_NUM_BITS, val)
33592 
33593 typedef struct {
33594     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_atf_request_fixed_param */
33595     A_UINT32 num_peers;
33596     A_UINT32 pdev_id;
33597     /* atf_flags
33598      * Bit 0 - full or partial update;
33599      *         full update -
33600      *             indicates that this is done for all the connected peers
33601      *         partial update -
33602      *             indicates update for only the newly connected peers
33603      *             (whenever some peers gets connected/disconnected)
33604      * Bit 1 - indicates whether there are more iterations of WMI command
33605      *         incoming after the current set of cmds
33606      *         Example : If there are 500 peers present and tlv can accomodate
33607      *         only 50 peers at a time, then this will be set for all the
33608      *         instances of the WMI commands except the last one.
33609      * Bit 2 - indicates if pdev_id is valid or not
33610      * Bits 3-31 - Reserved (Shall be zero)
33611      */
33612     A_UINT32 atf_flags;
33613     /*
33614      * Following this structure is one of the following TLVs
33615      * (only one of them will have valid data in a particular message)
33616      *   - struct wmi_atf_peer_info peer_info[num_peers];
33617      *   - struct wmi_atf_peer_info_v2 peer_info_v2[num_peers];
33618      */
33619 } wmi_peer_atf_request_fixed_param;
33620 
33621 #define WMI_ATF_GROUP_SCHED_POLICY_BIT_POS        0
33622 #define WMI_ATF_GROUP_SCHED_POLICY_NUM_BITS       4
33623 
33624 #define WMI_ATF_GROUP_GET_GROUP_SCHED_POLICY(atf_group_flags)  \
33625     WMI_GET_BITS(atf_group_flags,WMI_ATF_GROUP_SCHED_POLICY_BIT_POS,WMI_ATF_GROUP_SCHED_POLICY_NUM_BITS)
33626 
33627 #define WMI_ATF_GROUP_SET_GROUP_SCHED_POLICY(atf_group_flags,val)  \
33628     WMI_SET_BITS(atf_group_flags,WMI_ATF_GROUP_SCHED_POLICY_BIT_POS,WMI_ATF_GROUP_SCHED_POLICY_NUM_BITS,val)
33629 
33630 typedef struct {
33631     /** TLV tag and len; tag equals
33632      *  WMITLV_TAG_STRUC_wmi_atf_group_info */
33633     A_UINT32 tlv_header;
33634     A_UINT32 atf_group_id; /* ID of the Air Time Management group */
33635     /* atf_group_units
33636      * Fraction of air time allowed for the group, in per mille units
33637      * (from 0-1000).
33638      * For example, to indicate that the group can use 12.3% of the air time,
33639      * the atf_group_units setting would be 123.
33640      */
33641     A_UINT32 atf_group_units;
33642     /* atf_group_flags
33643      *  Bits 4-31  - Reserved (Shall be zero)
33644      *  Bits 0-3   - Group Schedule Policy (Fair/Strict/Fair with upper bound)
33645      *               Refer to WMI_ATF_SSID_ definitions
33646      */
33647     A_UINT32 atf_group_flags;
33648 } wmi_atf_group_info;
33649 
33650 #define WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_BIT_POS    0
33651 #define WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_NUM_BITS   16
33652 
33653 #define WMI_ATF_GROUP_GET_NUM_EXPLICIT_PEERS(atf_total_num_peers)  \
33654     WMI_GET_BITS(atf_total_num_peers, WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_BIT_POS, WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_NUM_BITS)
33655 
33656 #define WMI_ATF_GROUP_SET_NUM_EXPLICIT_PEERS(atf_total_num_peers, val)  \
33657     WMI_SET_BITS(atf_total_num_peers, WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_BIT_POS, WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_NUM_BITS, val)
33658 
33659 #define WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_BIT_POS    16
33660 #define WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_NUM_BITS   16
33661 
33662 #define WMI_ATF_GROUP_GET_NUM_IMPLICIT_PEERS(atf_total_num_peers)  \
33663     WMI_GET_BITS(atf_total_num_peers, WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_BIT_POS, WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_NUM_BITS)
33664 
33665 #define WMI_ATF_GROUP_SET_NUM_IMPLICIT_PEERS(atf_total_num_peers, val)  \
33666     WMI_SET_BITS(atf_total_num_peers, WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_BIT_POS, WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_NUM_BITS, val)
33667 
33668 typedef struct {
33669     /** TLV tag and len; tag equals
33670      *  WMITLV_TAG_STRUC_wmi_atf_group_info_v2 */
33671     A_UINT32 tlv_header;
33672     A_UINT32 atf_group_id; /* ID of the Air Time Management group */
33673     /* atf_group_units
33674      * Fraction of air time allowed for the group, in per mille units
33675      * (from 0-1000).
33676      * For example, to indicate that the group can use 12.3% of the air time,
33677      * the atf_group_units setting would be 123.
33678      */
33679     A_UINT32 atf_group_units;
33680     /* atf_group_flags
33681      *  Bits 0-3  - Group Schedule Policy (Fair/Strict/Fair with upper bound)
33682      *              Refer to WMI_ATF_SSID_ definitions
33683      *  Bit  4-31 - Reserved (Shall be zero)
33684      */
33685     A_UINT32 atf_group_flags;
33686     /* atf_total_num_peers
33687      *
33688      *  Bits 0-15  - total number of explicit peers
33689      *  Bits 16-31 - total number of implicit peers
33690      *  An explicit peer has an ATF % configured by the user.
33691      *  An implicit peer has an ATF % =
33692      *      (Group_ATF_percent - Total_Explicit_Peers_ATF_Percent) /
33693      *      number of implicit peers
33694      *  This computation can be done in FW based on atf_total_num_peers.
33695      */
33696     A_UINT32 atf_total_num_peers;
33697     /* atf_total_implicit_peer_units
33698      *
33699      * Air time allocated for all the implicit peers
33700      * (from 0-1000, in per mille units)
33701      */
33702     A_UINT32 atf_total_implicit_peer_units;
33703 } wmi_atf_group_info_v2;
33704 
33705 typedef struct {
33706     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_atf_ssid_grp_request_fixed_param */
33707     A_UINT32 pdev_id;
33708     /*
33709      * Following this structure is the one of the following TLVs
33710      * (only one of them will have valid data in a particular message)
33711      *   - struct wmi_atf_group_info group_info[];
33712      *   - struct wmi_atf_group_info_v2 group_info[];
33713      */
33714 } wmi_atf_ssid_grp_request_fixed_param;
33715 
33716 /* ATF Configurations for WMM ACs of a group, value for each AC shall be in
33717  * percentage (0-100).
33718  * This perecentage is relative to the residual airtime (derived by FW)
33719  * configured for the group.
33720  * When WMM ATF is not configured for a peer all values shall be 0.
33721  */
33722 typedef struct {
33723     /** TLV tag and len; tag equals
33724      *  WMITLV_TAG_STRUC_wmi_atf_group_wmm_ac_info
33725      */
33726     A_UINT32 tlv_header;
33727     A_UINT32 atf_group_id; /* ID of the Air Time Management group */
33728     A_UINT32 atf_units_be;
33729     A_UINT32 atf_units_bk;
33730     A_UINT32 atf_units_vi;
33731     A_UINT32 atf_units_vo;
33732 } wmi_atf_group_wmm_ac_info;
33733 
33734 typedef struct {
33735     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_atf_grp_wmm_ac_cfg_request_fixed_param */
33736     A_UINT32 pdev_id;
33737     /*
33738      * Following this structure is the TLV:
33739      * struct wmi_atf_group_wmm_ac_info group_info[];
33740      */
33741 } wmi_atf_grp_wmm_ac_cfg_request_fixed_param;
33742 
33743 #define WMI_VDEV_LATENCY_TIDNUM_BIT_POS     0
33744 #define WMI_VDEV_LATENCY_TIDNUM_NUM_BITS    8
33745 
33746 #define WMI_VDEV_LATENCY_GET_TIDNUM(vdev_latency_info) \
33747     WMI_GET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_TIDNUM_BIT_POS, WMI_VDEV_LATENCY_TIDNUM_NUM_BITS)
33748 
33749 #define WMI_VDEV_LATENCY_SET_TIDNUM(vdev_latency_info,val) \
33750     WMI_SET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_TIDNUM_BIT_POS, WMI_VDEV_LATENCY_TIDNUM_NUM_BITS, val)
33751 
33752 #define WMI_VDEV_LATENCY_AC_BIT_POS     8
33753 #define WMI_VDEV_LATENCY_AC_NUM_BITS    2
33754 
33755 #define WMI_VDEV_LATENCY_GET_AC(vdev_latency_info) \
33756     WMI_GET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_AC_BIT_POS, WMI_VDEV_LATENCY_AC_NUM_BITS)
33757 
33758 #define WMI_VDEV_LATENCY_SET_AC(vdev_latency_info,val) \
33759     WMI_SET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_AC_BIT_POS, WMI_VDEV_LATENCY_AC_NUM_BITS, val)
33760 
33761 #define WMI_VDEV_LATENCY_DL_VALID_BIT_POS     10
33762 #define WMI_VDEV_LATENCY_DL_VALID_NUM_BITS    1
33763 
33764 #define WMI_VDEV_LATENCY_GET_DL_VALID(vdev_latency_info) \
33765     WMI_GET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_DL_VALID_BIT_POS, WMI_VDEV_LATENCY_DL_VALID_NUM_BITS)
33766 
33767 #define WMI_VDEV_LATENCY_SET_DL_VALID(vdev_latency_info,val) \
33768     WMI_SET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_DL_VALID_BIT_POS, WMI_VDEV_LATENCY_DL_VALID_NUM_BITS, val)
33769 
33770 #define WMI_VDEV_LATENCY_UL_VALID_BIT_POS     11
33771 #define WMI_VDEV_LATENCY_UL_VALID_NUM_BITS    1
33772 
33773 #define WMI_VDEV_LATENCY_GET_UL_VALID(vdev_latency_info) \
33774     WMI_GET_BITS(vdev_latency_info,WMI_VDEV_LATENCY_UL_VALID_BIT_POS, WMI_VDEV_LATENCY_UL_VALID_NUM_BITS)
33775 
33776 #define WMI_VDEV_LATENCY_SET_UL_VALID(vdev_latency_info,val) \
33777     WMI_SET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_UL_VALID_BIT_POS, WMI_VDEV_LATENCY_UL_VALID_NUM_BITS, val)
33778 
33779 typedef struct {
33780     /** TLV tag and len; tag equals
33781      *  WMITLV_TAG_STRUC_wmi_vdev_latency_info
33782      */
33783     A_UINT32 tlv_header;
33784     /*
33785      * Maximum expected average delay between 2 schedules in milliseconds
33786      * of given TID type when it has active traffic.
33787      * 0x0 is considered as invalid service interval.
33788      */
33789     A_UINT32 service_interval;
33790     /* burst_size:
33791      * The number of bytes transmitted (in DL TIDs) / received (in UL ACs)
33792      * in service interval.
33793      */
33794     A_UINT32 burst_size;
33795     /* max_latency:
33796      * The maximum end to end latency expectation, in milliseconds.
33797      * If this value is 0x0, it shall be ignored.
33798      */
33799     A_UINT32 max_latency;
33800     /* max_per:
33801      * The maximum PER (as a percent) for the peer-TID, in range 1 - 100.
33802      * If this value is 0x0, it shall be ignored.
33803      */
33804     A_UINT32 max_per;
33805     /* min_tput:
33806      * The minimum guaranteed throughput to the peer-TID, in Kbps.
33807      * If this value is 0x0, it shall be ignored.
33808      */
33809     A_UINT32 min_tput;
33810     /* vdev_latency_info
33811      *  Bits  12 - 31   - Reserved (Shall be zero)
33812      *  Bit   11        - UL latency config indication.
33813      *                    If this bit is set then this latency info will
33814      *                    be used when triggering UL traffic.  Until the
33815      *                    AC specified in bits 8-9 has transferred at least
33816      *                    burst_size amount of UL data within the service
33817      *                    period, the AP will continue sending UL triggers
33818      *                    when the STA has data of the specified access
33819      *                    category ready to transmit.
33820      *                    Note that the TID specified in bits 0-7 does not
33821      *                    apply to UL; the TID-to-AC mapping applied to DL
33822      *                    data that can be adjusted by the TID specified
33823      *                    in bits 0-7 and the AC specified in bits 8-9 is
33824      *                    distinct from the TID-to-AC mapping applied to
33825      *                    UL data.
33826      *  Bit   10        - DL latency config indication. If the bit is set
33827      *                    then DL TID will use this latency config.
33828      *  Bits  8 - 9     - This bit has info on the custom AC of DL TID.
33829      *                    Also if bit 11 is set, the AP will apply some
33830      *                    of these latency specs (in particular, burst_size)
33831      *                    to UL traffic for this AC, by sending UL triggers
33832      *                    until the desired amount of data has been received
33833      *                    within the service period.
33834      *  Bits  0 - 7     - Specifies the TID of interest that corresponds
33835      *                    to the AC specified in bits 8-9.  This can be
33836      *                    used to adjust the TID-to-AC mapping applied to
33837      *                    DL data (if bit 10 is set).
33838      */
33839     A_UINT32 vdev_latency_info;
33840 } wmi_vdev_latency_info;
33841 
33842 /*
33843  * Currently wmi_vdev_tid_latency_config_fixed_param will be sent per
33844  * data tid to map the AC.
33845  * Also to configure VDEV level latency config to be used by all TIDs
33846  * based on the mapping.
33847  * VDEV restart is expected during this command
33848  */
33849 
33850 typedef struct {
33851     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_tid_latency_config_fixed_param  */
33852     A_UINT32 pdev_id;
33853     A_UINT32 vdev_id;
33854     /*
33855      * Following this structure is the TLV:
33856      * struct wmi_vdev_latency_info vdev_latency_info[];
33857      */
33858 } wmi_vdev_tid_latency_config_fixed_param;
33859 
33860 #define WMI_TID_LATENCY_TIDNUM_BIT_POS     0
33861 #define WMI_TID_LATENCY_TIDNUM_NUM_BITS    8
33862 
33863 #define WMI_TID_LATENCY_GET_TIDNUM(latency_tid_info) \
33864     WMI_GET_BITS(latency_tid_info, WMI_TID_LATENCY_TIDNUM_BIT_POS, WMI_TID_LATENCY_TIDNUM_NUM_BITS)
33865 
33866 #define WMI_TID_LATENCY_SET_TIDNUM(latency_tid_info,val) \
33867     WMI_SET_BITS(latency_tid_info, WMI_TID_LATENCY_TIDNUM_BIT_POS, WMI_TID_LATENCY_TIDNUM_NUM_BITS, val)
33868 
33869 #define WMI_TID_LATENCY_AC_BIT_POS     8
33870 #define WMI_TID_LATENCY_AC_NUM_BITS    2
33871 
33872 #define WMI_TID_LATENCY_GET_AC(latency_tid_info) \
33873     WMI_GET_BITS(latency_tid_info, WMI_TID_LATENCY_AC_BIT_POS ,  WMI_TID_LATENCY_AC_NUM_BITS)
33874 
33875 #define WMI_TID_LATENCY_SET_AC(latency_tid_info,val) \
33876     WMI_SET_BITS(latency_tid_info, WMI_TID_LATENCY_AC_BIT_POS ,   WMI_TID_LATENCY_AC_NUM_BITS, val)
33877 
33878 #define WMI_TID_LATENCY_DL_ENABLE_BIT_POS     10
33879 #define WMI_TID_LATENCY_DL_ENABLE_NUM_BITS    1
33880 
33881 #define WMI_TID_LATENCY_GET_DL_ENABLE(latency_tid_info) \
33882     WMI_GET_BITS(latency_tid_info,WMI_TID_LATENCY_DL_ENABLE_BIT_POS, WMI_TID_LATENCY_DL_ENABLE_NUM_BITS)
33883 
33884 #define WMI_TID_LATENCY_SET_DL_ENABLE(latency_tid_info,val) \
33885     WMI_SET_BITS(latency_tid_info,WMI_TID_LATENCY_DL_ENABLE_BIT_POS, WMI_TID_LATENCY_DL_ENABLE_NUM_BITS, val)
33886 
33887 #define WMI_TID_LATENCY_UL_ENABLE_BIT_POS     11
33888 #define WMI_TID_LATENCY_UL_ENABLE_NUM_BITS    1
33889 
33890 #define WMI_TID_LATENCY_GET_UL_ENABLE(latency_tid_info) \
33891     WMI_GET_BITS(latency_tid_info,WMI_TID_LATENCY_UL_ENABLE_BIT_POS, WMI_TID_LATENCY_UL_ENABLE_NUM_BITS)
33892 
33893 #define WMI_TID_LATENCY_SET_UL_ENABLE(latency_tid_info,val) \
33894     WMI_SET_BITS(latency_tid_info,WMI_TID_LATENCY_UL_ENABLE_BIT_POS, WMI_TID_LATENCY_UL_ENABLE_NUM_BITS, val)
33895 
33896 #define WMI_LATENCY_BURST_SIZE_SUM_BIT_POS     12
33897 #define WMI_LATENCY_BURST_SIZE_SUM_NUM_BITS    2
33898 
33899 #define WMI_LATENCY_GET_BURST_SIZE_SUM(latency_tid_info) \
33900     WMI_GET_BITS(latency_tid_info, WMI_LATENCY_BURST_SIZE_SUM_BIT_POS, WMI_LATENCY_BURST_SIZE_SUM_NUM_BITS)
33901 
33902 #define WMI_LATENCY_SET_BURST_SIZE_SUM(latency_tid_info,val) \
33903     WMI_SET_BITS(latency_tid_info, WMI_LATENCY_BURST_SIZE_SUM_BIT_POS, WMI_LATENCY_BURST_SIZE_SUM_NUM_BITS, val)
33904 
33905 #define WMI_LATENCY_MSDUQ_ID_BIT_POS     14
33906 #define WMI_LATENCY_MSDUQ_ID_NUM_BITS    4
33907 
33908 #define WMI_LATENCY_GET_MSDUQ_ID(latency_tid_info) \
33909     WMI_GET_BITS(latency_tid_info, WMI_LATENCY_MSDUQ_ID_BIT_POS, WMI_LATENCY_MSDUQ_ID_NUM_BITS)
33910 
33911 #define WMI_LATENCY_SET_MSDUQ_ID(latency_tid_info,val) \
33912     WMI_SET_BITS(latency_tid_info, WMI_LATENCY_MSDUQ_ID_BIT_POS, WMI_LATENCY_MSDUQ_ID_NUM_BITS, val)
33913 
33914 #define WMI_LATENCY_DISABLE_UL_OFDMA_BIT_POS     18
33915 #define WMI_LATENCY_DISABLE_UL_OFDMA_NUM_BITS    1
33916 
33917 #define WMI_LATENCY_GET_DISABLE_UL_OFDMA(latency_tid_info) \
33918     WMI_GET_BITS(latency_tid_info, WMI_LATENCY_DISABLE_UL_OFDMA_BIT_POS, WMI_LATENCY_DISABLE_UL_OFDMA_NUM_BITS)
33919 
33920 #define WMI_LATENCY_SET_DISABLE_UL_OFDMA(latency_tid_info,val) \
33921     WMI_SET_BITS(latency_tid_info, WMI_LATENCY_DISABLE_UL_OFDMA_BIT_POS, WMI_LATENCY_DISABLE_UL_OFDMA_NUM_BITS, val)
33922 
33923 #define WMI_LATENCY_DISABLE_UL_MU_MIMO_BIT_POS     19
33924 #define WMI_LATENCY_DISABLE_UL_MU_MIMO_NUM_BITS    1
33925 
33926 #define WMI_LATENCY_GET_DISABLE_UL_MU_MIMO(latency_tid_info) \
33927     WMI_GET_BITS(latency_tid_info, WMI_LATENCY_DISABLE_UL_MU_MIMO_BIT_POS, WMI_LATENCY_DISABLE_UL_MU_MIMO_NUM_BITS)
33928 
33929 #define WMI_LATENCY_SET_DISABLE_UL_MU_MIMO(latency_tid_info,val) \
33930     WMI_SET_BITS(latency_tid_info, WMI_LATENCY_DISABLE_UL_MU_MIMO_BIT_POS, WMI_LATENCY_DISABLE_UL_MU_MIMO_NUM_BITS, val)
33931 
33932 #define WMI_LATENCY_SAWF_UL_PARAMS_FLAG_POS         20
33933 #define WMI_LATENCY_SAWF_UL_PARAMS_FLAG_NUM_BITS    1
33934 
33935 #define WMI_LATENCY_GET_SAWF_UL_PARAMS_BIT(latency_tid_info) \
33936     WMI_GET_BITS(latency_tid_info, WMI_LATENCY_SAWF_UL_PARAMS_FLAG_POS, WMI_LATENCY_SAWF_UL_PARAMS_FLAG_NUM_BITS)
33937 
33938 #define WMI_LATENCY_SET_SAWF_UL_PARAMS_BIT(latency_tid_info, val) \
33939     WMI_SET_BITS(latency_tid_info, WMI_LATENCY_SAWF_UL_PARAMS_FLAG_POS, WMI_LATENCY_SAWF_UL_PARAMS_FLAG_NUM_BITS, val)
33940 
33941 
33942 typedef struct {
33943     /** TLV tag and len; tag equals
33944      *  WMITLV_TAG_STRUC_wmi_tid_latency_info
33945      */
33946     A_UINT32 tlv_header;
33947     wmi_mac_addr dest_macaddr; /* Mac address of end client */
33948     /*
33949      * Maximum expected average delay between 2 schedules in milliseconds
33950      * of given TID type when it has active traffic.
33951      * 0x0 is considered as invalid service interval.
33952      */
33953     A_UINT32 service_interval;
33954     /*
33955      * Cumulative number of bytes are expected to be transmitted or
33956      * received in the service interval when this specific Peer-TID
33957      * has active traffic.
33958      * If cumulative number of bytes is 0x0, it is considered as
33959      * invalid burst size.  In that case, firmware would try to transmit
33960      * and receive as many bytes as it can for this specific Peer-TID.
33961      * This burst size will be added or subtracted from vdev burst size
33962      * based on burst size sum bit in latency tid info.
33963      * The VDEV burst size will be considered to be 0 when no VDEV latency
33964      * command is received.
33965      * If host needs to set burst size for a peer then they can use the
33966      * peer cmd and set burst size sum bit to 1.
33967      */
33968     A_UINT32 burst_size_diff;
33969     /* max_latency:
33970      * The maximum end to end latency expectation, in milliseconds.
33971      * If this value is 0x0, it shall be ignored.
33972      */
33973     A_UINT32 max_latency;
33974     /* max_per:
33975      * The maximum PER (as a percent) for the peer-TID, in range 1 - 100
33976      * If this value is 0x0, it shall be ignored.
33977      */
33978     A_UINT32 max_per;
33979     /* min_tput:
33980      * The minimum guaranteed throughput to the peer-TID, in Kbps.
33981      * If this value is 0x0, it shall be ignored.
33982      */
33983     A_UINT32 min_tput;
33984     /* latency_tid_info
33985      *  Bits 21-31      - Reserved (Shall be zero)
33986      *  Bit  20         - Flag to indicate SAWF UL params (and not mesh latency)
33987      *  Bit  19         - Disable UL MU-MIMO. If set, UL MU-MIMO is disabled
33988      *                    for the specified AC. Note that TID level control is
33989      *                    not possible for UL MU-MIMO (the granularity is AC).
33990      *  Bit  18         - Disable UL OFDMA. If set, UL OFDMA is disabled for
33991      *                    the specified AC. Note that TID level control is not
33992      *                    possible for UL OFDMA (the granularity is AC).
33993      *  Bits 14-17      - MSDU queue flow id within the TID for configuring
33994      *                    latency info per MSDU flow queue
33995      *  Bit  12-13      - burst size sum. Bit to indicate whether to add or
33996      *                    subtract burst_size_diff from vdev cmd burst size:
33997      *                    1 -> addition
33998      *                    2 -> subtraction
33999      *  Bit   11        - UL latency config indication.
34000      *                    If this bit is set then this latency info will
34001      *                    be used when triggering UL traffic.  Until the
34002      *                    AC specified in bits 8-9 has transferred at least
34003      *                    burst_size amount of UL data within the service
34004      *                    period, the AP will continue sending UL triggers
34005      *                    when the STA has data of the specified access
34006      *                    category ready to transmit.
34007      *                    Note that the TID specified in bits 0-7 does not
34008      *                    apply to UL; the TID-to-AC mapping applied to DL
34009      *                    data that can be adjusted by the TID specified
34010      *                    in bits 0-7 and the AC specified in bits 8-9 is
34011      *                    distinct from the TID-to-AC mapping applied to
34012      *                    UL data.
34013      *  Bit   10        - DL latency config indication. If the bit is set
34014      *                    then DL TID will use this latency config.
34015      *  Bits  8 - 9     - This bit has info on the custom AC of DL TID.
34016      *                    Also if bit 11 is set, the AP will apply some
34017      *                    of these latency specs (in particular, burst_size)
34018      *                    to UL traffic for this AC, by sending UL triggers
34019      *                    until the desired amount of data has been received
34020      *                    within the service period.
34021      *  Bits  0 - 7     - Specifies the TID of interest that corresponds
34022      *                    to the AC specified in bits 8-9.  This can be
34023      *                    used to adjust the TID-to-AC mapping applied to
34024      *                    DL data (if bit 10 is set).
34025      */
34026     A_UINT32 latency_tid_info;
34027 } wmi_tid_latency_info;
34028 
34029 /*
34030  * Currently wmi_peer_tid_set_latency_request_fixed_param will be sent
34031  * per TID per latency configured client.
34032  * In future this command might come for multiple latency configured
34033  * clients together.
34034  * The clients are expected to be associated while receiving this command.
34035  */
34036 
34037 typedef struct {
34038     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_latency_config_fixed_param */
34039     A_UINT32 pdev_id;
34040     /*
34041      * Following this structure is the TLV:
34042      * struct wmi_tid_latency_info latency_info[];
34043      */
34044 } wmi_peer_tid_latency_config_fixed_param;
34045 
34046 #define WMI_ATF_GROUP_CFG_PEER_BIT_POS     0
34047 #define WMI_ATF_GROUP_CFG_PEER_NUM_BITS    1
34048 
34049 #define WMI_ATF_GROUP_GET_CFG_PEER_BIT(atf_peer_flags) \
34050     WMI_GET_BITS(atf_peer_flags,WMI_ATF_GROUP_CFG_PEER_BIT_POS,WMI_ATF_GROUP_CFG_PEER_NUM_BITS)
34051 
34052 #define WMI_ATF_GROUP_SET_CFG_PEER_BIT(atf_peer_flags,val) \
34053     WMI_SET_BITS(atf_peer_flags,WMI_ATF_GROUP_CFG_PEER_BIT_POS,WMI_ATF_GROUP_CFG_PEER_NUM_BITS,val)
34054 
34055 typedef struct {
34056     /** TLV tag and len; tag equals
34057      *  WMITLV_TAG_STRUC_wmi_peer_atf_ext_info */
34058     A_UINT32 tlv_header;
34059     wmi_mac_addr peer_macaddr;
34060     A_UINT32 atf_group_id; /* Group Id of the peers for ATF SSID grouping */
34061     /* atf_peer_flags
34062      *  Bits 1-31  - Reserved (Shall be zero)
34063      *  Bit  0     - Configured Peer Indication (0/1), this bit would be set by
34064      *               host to indicate that the peer has airtime % configured
34065      *               explicitly by user.
34066      */
34067     A_UINT32 atf_peer_flags;
34068 } wmi_peer_atf_ext_info;
34069 
34070 typedef struct {
34071     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_atf_ext_request_fixed_param */
34072     A_UINT32 pdev_id;
34073     /*
34074      * Following this structure is the TLV:
34075      * struct wmi_peer_atf_ext_info peer_ext_info[];
34076      */
34077 } wmi_peer_atf_ext_request_fixed_param;
34078 
34079 /* Structure for Bandwidth Fairness peer information */
34080 typedef struct {
34081     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bwf_peer_info */
34082     A_UINT32 tlv_header;
34083     wmi_mac_addr peer_macaddr;
34084     A_UINT32 bwf_guaranteed_bandwidth; /* BWF guaranteed_bandwidth for the peers in mbps */
34085     A_UINT32 bwf_max_airtime; /* BWF Maximum airtime percentage that can be allocated to the peer to meet the guaranteed_bandwidth */
34086     A_UINT32 bwf_peer_priority; /* BWF priority of the peer to allocate the tokens dynamically */
34087     A_UINT32 vdev_id;
34088     A_UINT32 pdev_id;
34089 } wmi_bwf_peer_info;
34090 
34091 /* Structure for Bandwidth Fairness peer request */
34092 typedef struct {
34093     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_bwf_request_fixed_param */
34094     A_UINT32 num_peers;
34095     /*
34096      * Following this structure is the TLV:
34097      * struct wmi_bwf_peer_info peer_info[num_peers];
34098      */
34099 } wmi_peer_bwf_request_fixed_param;
34100 
34101 /* Equal distribution of ATF air time within an VDEV. */
34102 typedef struct {
34103     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_atf_request_fixed_param */
34104     A_UINT32 vdev_id;
34105     A_UINT32 peer_atf_units; /* Per peer ATF units (per mille). */
34106     A_UINT32 pdev_id;
34107 } wmi_vdev_atf_request_fixed_param;
34108 
34109 typedef struct {
34110     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_ani_cck_config_cmd_fixed_param */
34111     /** pdev_id for identifying the MAC
34112      * See macros starting with WMI_PDEV_ID_ for values.
34113      */
34114     A_UINT32 pdev_id;
34115     /** parameter   */
34116     A_UINT32 param;
34117 } wmi_pdev_get_ani_cck_config_cmd_fixed_param;
34118 
34119 typedef struct {
34120     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_ani_ofdm_config_cmd_fixed_param */
34121     /** pdev_id for identifying the MAC
34122      * See macros starting with WMI_PDEV_ID_ for values.
34123      */
34124     A_UINT32 pdev_id;
34125     /** parameter   */
34126     A_UINT32 param;
34127 } wmi_pdev_get_ani_ofdm_config_cmd_fixed_param;
34128 
34129 typedef struct {
34130     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_QBOOST_CFG_CMD_fixed_param */
34131     A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
34132     A_UINT32 qb_enable;
34133     wmi_mac_addr peer_macaddr;
34134 } WMI_QBOOST_CFG_CMD_fixed_param;
34135 
34136 #define WMI_INST_STATS_INVALID_RSSI 0
34137 
34138 typedef struct {
34139     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_inst_rssi_stats_resp_fixed_param */
34140     A_UINT32 iRSSI; /* dB above the noise floor */
34141     /* peer MAC address */
34142     wmi_mac_addr peer_macaddr;
34143     A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
34144 } wmi_inst_rssi_stats_resp_fixed_param;
34145 
34146 typedef struct {
34147     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_cck_ofdm_rate_info */
34148     A_UINT32 ratecode_legacy; /* Rate code for CCK OFDM */
34149 } wmi_peer_cck_ofdm_rate_info;
34150 
34151 typedef struct {
34152     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcs_rate_info */
34153     A_UINT32 ratecode_20;  /* Rate code for 20MHz BW */
34154     A_UINT32 ratecode_40;  /* Rate code for 40MHz BW */
34155     A_UINT32 ratecode_80;  /* Rate code for 80MHz BW */
34156     A_UINT32 ratecode_160; /* Rate code for 160MHz BW */
34157     A_UINT32 ratecode_320; /* Rate code for 320MHz BW */
34158 } wmi_peer_mcs_rate_info;
34159 
34160 typedef struct {
34161     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ratecode_list_event_fixed_param */
34162     wmi_mac_addr peer_macaddr;
34163     A_UINT32 ratecount; /* Max Rate count for each mode */
34164     A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
34165     A_UINT32 pdev_id; /* ID of the pdev this peer belongs to */
34166     A_UINT32 ratecount_ext; /* Max Rate count for 160, 320MHz */
34167     /*
34168      * Following this structure are the TLV:
34169      * struct wmi_peer_cck_ofdm_rate_info;
34170      * struct wmi_peer_mcs_rate_info;
34171      */
34172 } wmi_peer_ratecode_list_event_fixed_param;
34173 
34174 typedef struct wmi_wds_addr_event {
34175     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wds_addr_event_fixed_param */
34176     A_UINT32 event_type[4];
34177     wmi_mac_addr peer_mac;
34178     wmi_mac_addr dest_mac;
34179     A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
34180 } wmi_wds_addr_event_fixed_param;
34181 
34182 /*
34183  * Enum values for WMI_PEER_PS_SUPPORTED_BITMAP field,
34184  * in wmi_peer_sta_ps_statechange_event structure.
34185  */
34186 typedef enum {
34187    /* Used to indicate that peer_ps_valid is valid */
34188    WMI_PEER_PS_VALID_SUPPORTED =     0x00000001,
34189    /* Used to indicate that peer_ps_timestamp field is valid */
34190    WMI_PEER_PS_TIMESTAMP_SUPPORTED = 0x00000002,
34191 } WMI_PEER_PS_SUPPORTED_BITMAP;
34192 
34193 typedef struct {
34194     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_ps_statechange_event_fixed_param */
34195     wmi_mac_addr peer_macaddr;
34196     A_UINT32 peer_ps_state;
34197     /* Start of extended structure */
34198     /* Bitmap to indicate which fields in the extended structure are valid.
34199      * Bitmap values correspond to enum WMI_PEER_PS_SUPPORTED_BITMAP
34200      */
34201     A_UINT32 peer_ps_supported_bitmap;
34202     /* This field is used to indicate host of a valid PS state change.
34203      * 1 - indicates a valid PS state change.
34204      * 0 - indicates an invalid PS state change.
34205      * Host to ignore the power save duration calculation when peer_ps_valid = 0
34206      */
34207     A_UINT32 peer_ps_valid;
34208     /* This field indicates the time since target boot-up in MilliSeconds. */
34209     A_UINT32 peer_ps_timestamp;
34210     /* Indicates the vdev id for MLO case */
34211     wmi_vdev_id_info vdev_id_info;
34212 } wmi_peer_sta_ps_statechange_event_fixed_param;
34213 
34214 /* WMI_PDEV_FIPS_EVENTID */
34215 typedef struct {
34216     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_event_fixed_param */
34217     union {
34218         A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
34219         /** pdev_id for identifying the MAC
34220          * See macros starting with WMI_PDEV_ID_ for values.
34221          */
34222         A_UINT32 pdev_id;
34223     };
34224     A_UINT32 error_status; /* Error status: 0 (no err), 1, or OPER_TIMEOUT */
34225     A_UINT32 data_len;     /* Data length */
34226 /*
34227  * Following this structure is the TLV:
34228  *    A_UINT32 data[1]; <-- Out Data (keep this in the end)
34229  */
34230 } wmi_pdev_fips_event_fixed_param;
34231 
34232 typedef struct {
34233     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_event_fixed_param */
34234     A_UINT32 pdev_id;
34235     A_UINT32 fips_cookie;    /* Cookie value to identify test vector */
34236     A_UINT32 cmd_frag_idx;   /* Fragment Number */
34237     A_UINT32 more_bit;
34238     A_UINT32 error_status; /* Error status: 0 (no err), 1, or OPER_TIMEOUT */
34239     A_UINT32 data_len;     /* Data length CTlen+ TAGlen*/
34240 /*
34241  * Following this structure is the TLV:
34242  *    A_UINT32 data[1]; <-- Out Data (ciphertext+tag)
34243  */
34244 } wmi_pdev_fips_extend_event_fixed_param;
34245 
34246 typedef struct {
34247     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_channel_hopping_event_fixed_param */
34248     union {
34249         A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
34250         /** pdev_id for identifying the MAC
34251          * See macros starting with WMI_PDEV_ID_ for values.
34252          */
34253         A_UINT32 pdev_id;
34254     };
34255     /* Noise threshold iterations with high values */
34256     A_UINT32 noise_floor_report_iter;
34257     /* Total noise threshold iterations */
34258     A_UINT32 noise_floor_total_iter;
34259 } wmi_pdev_channel_hopping_event_fixed_param;
34260 
34261 enum {
34262     WMI_PDEV_RESERVE_AST_ENTRY_OK,
34263     WMI_PDEV_RESERVE_AST_ENTRY_HASH_COLLISION,
34264     WMI_PDEV_RESERVE_AST_ENTRY_CROSSING_AXI_BOUNDARY,
34265 };
34266 
34267 typedef struct {
34268     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_cmd_fixed_param */
34269     union {
34270         A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
34271         /** pdev_id for identifying the MAC
34272          * See macros starting with WMI_PDEV_ID_ for values.
34273          */
34274         A_UINT32 pdev_id;
34275     };
34276     A_UINT32 rate_flags;
34277     /**
34278     * FLAG_ONE_CHAIN     0x00000001  - one chain mask
34279     * FLAG_TWO_CHAIN     0x00000003  - two chain mask
34280     * FLAG_THREE_CHAIN   0x00000007  - three chain mask
34281     * FLAG_FOUR_CHAIN    0x0000000F  - four chain mask
34282     * FLAG_FIVE_CHAIN    0x0000001F  - five chain mask
34283     * FLAG_SIX_CHAIN     0x0000003F  - six chain mask
34284     * FLAG_SEVEN_CHAIN   0x0000007F  - seven chain mask
34285     * FLAG_EIGHT_CHAIN   0x000000FF  - eight chain mask
34286     * FLAG_STBC          0x00000100  - STBC is set
34287     * FLAG_40MHZ         0x00000200  - bits 9-10 used for BW:
34288     * FLAG_80MHZ         0x00000400    (bw >> 9) & 3 will give
34289     * FLAG_160MHZ        0x00000600    1 -> 40 MHz, 2 -> 80 MHz, 3 -> 160 MHz
34290     * FLAG_TXBF          0x00000800 - Tx Bf enabled
34291     * FLAG_RTSENA        0x00001000 - RTS enabled
34292     * FLAG_CTSENA        0x00002000 - CTS enabled
34293     * FLAG_LDPC          0x00004000 - LDPC set
34294     * FLAG_SGI           0x00008000 - Short guard interval
34295     *                   (0x00010000-0x00080000 unused)
34296     *------------------
34297     * 0x00100000-0x00700000 used for SU/MU/OFDMA tx mode
34298     * FLAG_SU            0x00100000 - SU Data
34299     * FLAG_DL_MU_MIMO_AC 0x00200000 - DL AC MU data
34300     * FLAG_DL_MU_MIMO_AX 0x00300000 - DL AX MU data
34301     * FLAG_DL_OFDMA      0x00400000 - DL OFDMA data
34302     * FLAG_UL_OFDMA      0x00500000 - UL OFDMA data
34303     * FLAG_UL_MU_MIMO    0x00600000 - UL MU data
34304     *------------------
34305     * */
34306     A_UINT32 nss;
34307     /**
34308     * NSS 0x0 - 0x7
34309     * */
34310     A_UINT32 preamble;
34311     /**
34312     * PREAM_OFDM - 0x0
34313     * PREAM_CCK  - 0x1
34314     * PREAM_HT   - 0x2
34315     * PREAM_VHT  - 0x3
34316     * PREAM_HE   - 0x4
34317     * */
34318     A_UINT32 hw_rate;
34319     /**
34320      * *** HW_OFDM_RATE ***
34321      * OFDM_48_MBPS - 0x0
34322      * OFDM_24_MBPS - 0x1
34323      * OFDM_12_MBPS - 0x2
34324      * OFDM_6_MBPS  - 0x3
34325      * OFDM_54_MBPS - 0x4
34326      * OFDM_36_MBPS - 0x5
34327      * OFDM_18_MBPS - 0x6
34328      * OFDM_9_MBPS  - 0x7
34329      *
34330      * *** HW_CCK_RATE ***
34331      * CCK_11_LONG_MBPS   - 0x0
34332      * CCK_5_5_LONG_MBPS  - 0x1
34333      * CCK_2_LONG_MBPS    - 0x2
34334      * CCK_1_LONG_MBPS    - 0x3
34335      * CCK_11_SHORT_MBPS  - 0x4
34336      * CCK_5_5_SHORT_MBPS - 0x5
34337      * CCK_2_SHORT_MBPS   - 0x6
34338      *
34339      * *** HW_HT / VHT_RATE ***
34340      * MCS 0x0 - 0xb
34341      * */
34342 } wmi_pdev_get_tpc_cmd_fixed_param;
34343 
34344 typedef struct {
34345     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_chip_power_stats_cmd_fixed_param */
34346     /** pdev_id for identifying the MAC
34347      * See macros starting with WMI_PDEV_ID_ for values.
34348      */
34349     A_UINT32 pdev_id;
34350 } wmi_pdev_get_chip_power_stats_cmd_fixed_param;
34351 
34352 typedef struct {
34353     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_bcn_recv_stats_cmd_fixed_param */
34354     /** VDEV identifier */
34355     A_UINT32 vdev_id;
34356 } wmi_vdev_get_bcn_recv_stats_cmd_fixed_param;
34357 
34358 typedef struct {
34359     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_xgap_enable_cmd_fixed_param */
34360     A_UINT32 beacon_interval; /* in TU */
34361     A_UINT32 sap_lp_flag;     /* bit 0 : set/unset for enter/exit XGAP */
34362     A_UINT32 dialog_token;
34363     A_UINT32 duration;        /* in us : sap LP enter/exit duration, 0 for permanent exit */
34364 } wmi_xgap_enable_cmd_fixed_param;
34365 
34366 typedef struct {
34367     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_xgap_enable_complete_event_fixed_param */
34368     A_UINT32 dialog_token;
34369     A_UINT32 next_tsf_low32;
34370     A_UINT32 next_tsf_high32;
34371 } wmi_xgap_enable_complete_event_fixed_param;
34372 
34373 /*
34374  * wmi mws-coex command IDs
34375  */
34376 typedef enum {
34377     WMI_MWS_COEX_STATE = 0x01,
34378     WMI_MWS_COEX_DPWB_STATE,
34379     WMI_MWS_COEX_TDM_STATE,
34380     WMI_MWS_COEX_IDRX_STATE,
34381     WMI_MWS_COEX_ANTENNA_SHARING_STATE,
34382 } wmi_mws_coex_cmd_id;
34383 
34384 typedef struct {
34385     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_state_cmd_fixed_param */
34386     /** VDEV identifier */
34387     A_UINT32 vdev_id;
34388     /** Command ID (type: wmi_mws_coex_cmd_id) */
34389     A_UINT32 cmd_id;
34390 } wmi_vdev_get_mws_coex_info_cmd_fixed_param;
34391 
34392 typedef struct {
34393     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_tpc_event_fixed_param */
34394     /** pdev_id for identifying the MAC
34395      * See macros starting with WMI_PDEV_ID_ for values.
34396      */
34397     A_UINT32 pdev_id;
34398    /*
34399     * Following this structure is the TLV:
34400     *    A_UINT32 tpc[2];
34401     *    tpc[0] - maximum power per rate
34402     *    tpc[1] - minimum power per rate
34403     *    Currently this event only provides max and min power limits
34404     *    for a single rate.  In the future this event may be expanded
34405     *    to provide the information for multiple rates.
34406     *    At that time, the format of the data will be provided.
34407     */
34408 } wmi_pdev_tpc_event_fixed_param;
34409 
34410 typedef struct {
34411     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_event_fixed_param */
34412     union {
34413         A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
34414         /** pdev_id for identifying the MAC
34415          * See macros starting with WMI_PDEV_ID_ for values.
34416          */
34417         A_UINT32 pdev_id;
34418     };
34419     A_UINT32 nfdBr_len;
34420     A_UINT32 nfdBm_len;
34421     A_UINT32 freqNum_len;
34422    /*
34423     * Following this structure is the TLV:
34424     * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr;
34425     * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm;
34426     * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum;
34427     */
34428 } wmi_pdev_nfcal_power_all_channels_event_fixed_param;
34429 
34430 typedef struct {
34431     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr */
34432     A_UINT32 nfdBr;
34433 } wmi_pdev_nfcal_power_all_channels_nfdBr;
34434 
34435 typedef struct {
34436     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm */
34437     A_UINT32 nfdBm;
34438 } wmi_pdev_nfcal_power_all_channels_nfdBm;
34439 
34440 typedef struct {
34441     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum */
34442     A_UINT32 freqNum;
34443 } wmi_pdev_nfcal_power_all_channels_freqNum;
34444 
34445 /* Bit set/unset definitions for valid_bitmap field in ani_cck_event */
34446 #define WMI_ANI_CCK_EVENT_PDEV_ID_SET(bitmap, val) \
34447     WMI_SET_BITS(bitmap, 0, 8, val)
34448 #define WMI_ANI_CCK_EVENT_PDEV_ID_GET(bitmap) \
34449     WMI_GET_BITS(bitmap, 0, 8)
34450 
34451 #define WMI_ANI_CCK_EVENT_PDEV_ID_VALID_BIT_SET(bitmap, val) \
34452     WMI_SET_BITS(bitmap, 31, 1, val)
34453 #define WMI_ANI_CCK_EVENT_PDEV_ID_VALID_BIT_GET(bitmap) \
34454     WMI_GET_BITS(bitmap, 31, 1)
34455 
34456 typedef struct {
34457     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ani_cck_event_fixed_param */
34458     A_UINT32 cck_level;
34459     union {
34460         A_UINT32 pdev_id_valid__pdev_id__word;
34461         struct {
34462             /**
34463              * word containng the pdev_id for identifying the MAC
34464              * Contents:
34465              *     bits  7:0 - pdev ID
34466              *     bits 30:8 - reserved
34467              *     bit  31   - pdev ID valid flag
34468              * See macros starting with WMI_ANI_CCK_EVENT_PDEV_ID_ for values.
34469              * pdev_id is valid when pdev_id_valid is set.
34470              */
34471             A_UINT32 pdev_id: 8,
34472                      reserved: 23,
34473                      pdev_id_valid: 1;
34474         };
34475     };
34476 } wmi_ani_cck_event_fixed_param;
34477 
34478 typedef enum wmi_power_debug_reg_fmt_type {
34479     /* WMI_POWER_DEBUG_REG_FMT_TYPE_ROME -> Dumps following 12 Registers
34480      *     SOC_SYSTEM_SLEEP
34481      *     WLAN_SYSTEM_SLEEP
34482      *     RTC_SYNC_FORCE_WAKE
34483      *     MAC_DMA_ISR
34484      *     MAC_DMA_TXRX_ISR
34485      *     MAC_DMA_ISR_S1
34486      *     MAC_DMA_ISR_S2
34487      *     MAC_DMA_ISR_S3
34488      *     MAC_DMA_ISR_S4
34489      *     MAC_DMA_ISR_S5
34490      *     MAC_DMA_ISR_S6
34491      *     MAC_DMA_ISR_S7
34492      */
34493     WMI_POWER_DEBUG_REG_FMT_TYPE_ROME,
34494 
34495     WMI_POWER_DEBUG_REG_FMT_TYPE_MAX = 0xf,
34496 } WMI_POWER_DEBUG_REG_FMT_TYPE;
34497 
34498 typedef struct {
34499     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chip_power_stats_event_fixed_param */
34500     A_UINT32 cumulative_sleep_time_ms; /* maximum range is 35 hours, due to conversion from internal 0.03215 ms units to ms */
34501     A_UINT32 cumulative_total_on_time_ms; /* maximum range is 35 hours, due to conversion from internal 0.03215 ms units to ms */
34502     A_UINT32 deep_sleep_enter_counter; /* count of number of times chip enterred deep sleep */
34503     A_UINT32 last_deep_sleep_enter_tstamp_ms; /* Last Timestamp when Chip went to deep sleep */
34504     A_UINT32 debug_register_fmt; /* WMI_POWER_DEBUG_REG_FMT_TYPE enum, describes debug registers being dumped as part of the event */
34505     A_UINT32 num_debug_register; /* number of debug registers being sent to host */
34506     /*
34507      * Following this structure is the TLV:
34508      *    A_UINT32 debug_registers[num_debug_registers];
34509      */
34510 } wmi_pdev_chip_power_stats_event_fixed_param;
34511 
34512 typedef struct {
34513     A_UINT32 tlv_header;  /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_bcn_recv_stats_fixed_param */
34514     A_UINT32 vdev_id;
34515     /* total_bcn_cnt
34516      * total beacon count (tbtt instances)
34517      * After this value reaches 255 it saturates and stays at 255.
34518      * This field is used to determine which of the 256 bits in the
34519      * bmiss_bitmap field are valid.
34520      */
34521     A_UINT32 total_bcn_cnt;
34522     /* total_bmiss_cnt
34523      * Total beacon miss count in last 255 beacons, max value is 255.
34524      * This value is the number of bits set within bmiss_bitmap.
34525      */
34526     A_UINT32 total_bmiss_cnt;
34527     /* bmiss_bitmap
34528      * This bitmap indicates the status of the last 255 beacons.
34529      * If a bit is set, that means the corresponding beacon was missed.
34530      * Bit 0 of bmiss_bitmap[0] represents the most recent beacon.
34531      * The total_bcn_cnt field indicates how many bits within bmiss_bitmap
34532      * are valid.
34533      */
34534     A_UINT32 bmiss_bitmap[8];
34535 } wmi_vdev_bcn_recv_stats_fixed_param;
34536 
34537 typedef struct {
34538     A_UINT32 tlv_header;  /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_state_fixed_param */
34539     A_UINT32 vdev_id;
34540 
34541     /* LTE-WLAN coexistence scheme bitmap
34542      * Indicates the final schemes applied for the current Coex scenario.
34543      * Bit 0 - TDM policy
34544      * Bit 1 - Forced TDM policy
34545      * Bit 2 - Dynamic Power Back-off policy
34546      * Bit 3 - Channel Avoidance policy
34547      * Bit 4 - Static Power Back-off policy
34548      */
34549     A_UINT32 coex_scheme_bitmap;
34550 
34551     /* Active conflict count
34552      * Indicates the number of Active conflicts for the current WLAN and LTE frequency combinations.
34553      */
34554     A_UINT32 active_conflict_count;
34555 
34556     /* Potential conflict count
34557      * Indicates the number of Potential conflicts for the current WLAN and LTE frequency combinations.
34558      */
34559     A_UINT32 potential_conflict_count;
34560 
34561     /* Bitmap of the group-0 WLAN channels to be avoided during LTE-WLAN coex operation.
34562      * Indicates the WLAN channels to be avoided in b/w WLAN CH-1 and WLAN CH-14.
34563      */
34564     A_UINT32 chavd_group0_bitmap;
34565 
34566     /* Bitmap of the group-1 WLAN channels to be avoided during LTE-WLAN coex operation.
34567      * Indicates the WLAN channels to be avoided in b/w WLAN CH-36 and WLAN CH-64.
34568      */
34569     A_UINT32 chavd_group1_bitmap;
34570 
34571     /* Bitmap of the group-2 WLAN channels to be avoided during LTE-WLAN coex operation.
34572      * Indicates the WLAN channels to be avoided in b/w WLAN CH-100 and WLAN CH-140.
34573      */
34574     A_UINT32 chavd_group2_bitmap;
34575 
34576     /* Bitmap of the group-3 WLAN channels to be avoided during LTE-WLAN coex operation.
34577      * Indicates the WLAN channels to be avoided in b/w WLAN CH-149 and WLAN CH-165.
34578      */
34579     A_UINT32 chavd_group3_bitmap;
34580 } wmi_vdev_get_mws_coex_state_fixed_param;
34581 
34582 typedef struct {
34583     A_UINT32 tlv_header;  /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_dpwb_state_fixed_param */
34584     A_UINT32 vdev_id;
34585 
34586     /* Current state of the Dynamic Power Back-off state machine
34587      * MWSCOEX_PWB_UNINIT_STATE                        = 0, PWB state machine is in un-intialized state.
34588      * MWSCOEX_PWB_WLAN_ON_SINR_START_STATE            = 1, SINR measurement starts when WLAN is on
34589      * MWSCOEX_PWB_WLAN_ON_WAIT_RESP_STATE             = 2, Waiting for SINR response when WLAN is on
34590      * MWSCOEX_PWB_WLAN_OFF_AWAIT_STATE                = 3, WLAN off state for buffer between SINR on/off measurement.
34591      * MWSCOEX_PWB_WLAN_OFF_SINR_START_STATE           = 4, SINR measurement starts when WLAN is off
34592      * MWSCOEX_PWB_WLAN_OFF_WAIT_RESP_STATE            = 5, Waiting for SINR response when WLAN is off
34593      * MWSCOEX_PWB_WLAN_OFF_SINR_STOP_STATE            = 6, SINR measurement stops when WLAN is off
34594      * MWSCOEX_PWB_FORCED_TDM_STATE                    = 7, Entered Forced TDM state.
34595      * MWSCOEX_PWB_HALTED_STATE                        = 8, Power back-off algorithm halted.
34596      * MWSCOEX_PWB_WLAN_ALWAYS_ON_SINR_START_STATE     = 9, SINR measurement starts in WLAN always on state.
34597      * MWSCOEX_PWB_WLAN_ALWAYS_ON_SINR_STOP_STATE      = 10, SINR measurement stops in WLAN always on state.
34598      */
34599     A_UINT32 current_dpwb_state;
34600 
34601     /* P(N+1) value in dBm i.e. Tx power to be applied in the next Dynamic Power Back-off cycle,
34602      * where P(N) is the power applied during current cycle.
34603      * ranges from 3dBm to 21 dBM
34604      */
34605     A_INT32 pnp1_value;
34606 
34607     /* Indicates the duty cycle of current LTE frame.
34608      * Duty cycle: Number of UL slots with uplink data and allocated RBs.
34609      */
34610     A_UINT32 lte_dutycycle;
34611 
34612     /* LTE SINR value in dB, when WLAN is ON. */
34613     A_INT32 sinr_wlan_on;
34614 
34615     /* LTE SINR value in dB, when WLAN is OFF. */
34616     A_INT32 sinr_wlan_off;
34617 
34618     /* LTE blocks with error for the current bler report.
34619      * Number of LTE blocks with error for a given number (block_count)  of LTE blocks.
34620      */
34621     A_UINT32 bler_count;
34622 
34623     /* Number of LTE blocks considered for bler count report.
34624      * Bler repot will be generated after the reception of every "block_count" number of blocks.
34625      */
34626     A_UINT32 block_count;
34627 
34628     /* WLAN RSSI level
34629      * WLAN RSSI is divided in to 3 levels i.e. Good/Moderate/Low (configurable inside f/w)
34630      * 0-Good, 1-Moderate, 2-Low
34631      */
34632     A_UINT32 wlan_rssi_level;
34633 
34634     /* WLAN RSSI value in dBm considered in Dynamic Power back-off algorithm
34635      * Dynamic power back-off algorithm considers either Rx data frame RSSI/Beacon RSSI based on some constraints.
34636      */
34637     A_INT32 wlan_rssi;
34638 
34639     /* Indicates whether any TDM policy triggered from Dynamic power back-off policy.
34640      * 1 - TDM triggered.
34641      * 0 - TDM not triggered.
34642      */
34643     A_UINT32 is_tdm_running;
34644 } wmi_vdev_get_mws_coex_dpwb_state_fixed_param;
34645 
34646 typedef struct {
34647     A_UINT32 tlv_header;  /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_tdm_state_fixed_param */
34648     A_UINT32 vdev_id;
34649     /* Time Division Multiplexing (TDM) LTE-Coex Policy type.
34650      * There are totally 4 types of TDM policies(1-SINR TDM, 2-RSSI TDM, 3-LOW RX RATE TDM, 4-STICKY TDM)
34651      * Bit 0 - SINR TDM policy.
34652      * Bit 1 - RSSI TDM policy.
34653      * Bit 2 - Low Rx rate TDM policy
34654      * Bit 3 - Sticky TDM policy
34655      */
34656     A_UINT32 tdm_policy_bitmap;
34657 
34658     /* TDM LTE/WLAN sub-frame bitmap
34659      * Indicates the bitmap of LTE/WLAN sub-frames.
34660      * value 0: WLAN slot.
34661      * value 1: LTE slot.
34662      */
34663     A_UINT32 tdm_sf_bitmap;
34664 } wmi_vdev_get_mws_coex_tdm_state_fixed_param;
34665 
34666 typedef struct {
34667     A_UINT32 tlv_header;  /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_idrx_state_fixed_param */
34668     A_UINT32 vdev_id;
34669 
34670     /* SUB0 LTE-coex tech.
34671      *------------------------
34672      * TECH          TECH_ID
34673      *------------------------
34674      * LTE              0
34675      * TDSCDMA          1
34676      * GSM1             2
34677      * ONEX             3
34678      * HDR              4
34679      * WCDMA            5
34680      * GSM2             6
34681      * GSM3             7
34682      * WCDMA2           8
34683      * LTE2             9
34684      * Indicates the type of WWAN technology used as SUB0 i.e. SIM slot 1
34685      */
34686     A_UINT32 sub0_techid;
34687 
34688     /* SUB0 mitigation policy.
34689      * Indicates the mitigation policy used to coexist with WLAN.
34690      * 1 - Tx blanking
34691      * 2 - Static power back-off
34692      */
34693     A_UINT32 sub0_policy;
34694 
34695     /* Set if SUB0 is in link critical state.
34696      * Link critical will be set, if continuous page miss happens or RSSI is below -100 dBm at LTE side.
34697      */
34698     A_UINT32 sub0_is_link_critical;
34699 
34700     /* LTE SUB0 imposed static power applied to WLAN due to LTE-WLAN coex.
34701      * Value of static power applied during LTE page cycle ranges from 3-21 dBm.
34702      */
34703     A_INT32 sub0_static_power;
34704 
34705     /* LTE SUB0 RSSI value in dBm */
34706     A_INT32 sub0_rssi;
34707 
34708     /* SUB1 LTE-coex tech.
34709      *------------------------
34710      * TECH          TECH_ID
34711      *------------------------
34712      * LTE              0
34713      * TDSCDMA          1
34714      * GSM1             2
34715      * ONEX             3
34716      * HDR              4
34717      * WCDMA            5
34718      * GSM2             6
34719      * GSM3             7
34720      * WCDMA2           8
34721      * LTE2             9
34722      * Indicates the type of WWAN technology used as SUB1 i.e. SIM slot 2
34723      */
34724     A_UINT32 sub1_techid;
34725 
34726     /* SUB1 mitigation policy.
34727      * Indicates the mitigation policy used to coexist with WLAN.
34728      * 1 - Tx blanking
34729      * 2 - Static power back-off
34730      */
34731     A_UINT32 sub1_policy;
34732 
34733     /* Set if SUB1 is in link critical state.
34734      * Link critical will be set, if continuous page miss happens or RSSI is below -100 dBm at LTE side.
34735      */
34736     A_UINT32 sub1_is_link_critical;
34737 
34738     /* LTE SUB1 imposed static power applied to WLAN due to LTE-WLAN coex.
34739      * Value of static power applied during LTE page cycle ranges from 3-21 dBm.
34740      */
34741     A_INT32 sub1_static_power;
34742 
34743     /* LTE SUB1 RSSI value in dBm */
34744     A_INT32 sub1_rssi;
34745 } wmi_vdev_get_mws_coex_idrx_state_fixed_param;
34746 
34747 typedef struct {
34748     A_UINT32 tlv_header;  /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_antenna_sharing_state_fixed_param */
34749     A_UINT32 vdev_id;
34750 
34751     /* BDF values of Coex flags.
34752      * coexflag 0x1 = MWS Coex enabled
34753      * coexflag 0x3 = MWS Coex enabled + Antenna sharing enabled for WLAN operating in 2.4GHz band.
34754      */
34755     A_UINT32 coex_flags;
34756 
34757     /* BDF values of Coex Antenna sharing config
34758      * coex_config 0x0 = no Antenna sharing
34759      * coexconfig 0x1 = switched based Antenna sharing
34760      * coexconfig 0x2 = splitter based Antenna sharing
34761      */
34762     A_UINT32 coex_config;
34763 
34764     /* Tx Chain mask value
34765      * Bit 0: Tx chain-0
34766      * Bit 1: Tx Chain-1
34767      * value: 0x1 - Operating in 1X1
34768      * value: 0x3 - Operating in 2X2
34769      */
34770     A_UINT32 tx_chain_mask;
34771 
34772     /* Rx Chain mask value
34773      * Bit 0: Rx chain-0
34774      * Bit 1: Rx Chain-1
34775      * value: 0x1 - Operating in 1X1
34776      * value: 0x3 - Operating in 2X2
34777      */
34778     A_UINT32 rx_chain_mask;
34779 
34780     /* Currently active Rx Spatial streams
34781      * Bit 0: Rx Spatial Stream-0
34782      * Bit 1: Rx Spatial Stream-1
34783      */
34784     A_UINT32 rx_nss;
34785 
34786     /* Forced MRC policy type
34787      * BTC_FORCED              (0x01)
34788      * RSSI_FORCED             (0x02)
34789      * MODEM_ACQ_FORCED        (0x04)
34790      */
34791     A_UINT32 force_mrc;
34792 
34793     /* RSSI value considered for MRC
34794      * 1: Data RSSI
34795      * 2: Beacon RSSI
34796      */
34797     A_UINT32 rssi_type;
34798 
34799     /* RSSI value measured at Chain-0 in dBm */
34800     A_INT32 chain0_rssi;
34801 
34802     /* RSSI value measured at Chain-1 in dBm */
34803     A_INT32 chain1_rssi;
34804 
34805     /* RSSI value of two chains combined in dBm */
34806     A_INT32 combined_rssi;
34807 
34808     /* Absolute imbalance between two Rx chains in dB */
34809     A_UINT32 imbalance;
34810 
34811     /* RSSI threshold defined for the above imbalance value in dBm.
34812      * Based on the degree of imbalance between the rx chains, different
34813      * RSSI thresholds are used to determine whether MRC (Maximum-Ratio
34814      * Combining) use of multiple rx chains is suitable.
34815      * This field shows the RSSI threshold below which MRC is used.
34816      */
34817     A_INT32 mrc_threshold;
34818 
34819     /* Antenna grant duration to WLAN, in milliseconds */
34820     A_UINT32 grant_duration;
34821 } wmi_vdev_get_mws_coex_antenna_sharing_state_fixed_param;
34822 
34823 typedef enum wmi_chip_power_save_failure_reason_code_type {
34824     WMI_PROTOCOL_POWER_SAVE_FAILURE_REASON,
34825     WMI_HW_POWER_SAVE_FAILURE_REASON,
34826     WMI_CSS_LOCKED_POWER_FAILURE_REASON,
34827     WMI_MAC0_LOCKED_POWER_FAILURE_REASON,
34828     WMI_MAC1_LOCKED_POWER_FAILURE_REASON,
34829     WMI_POWER_SAVE_FAILURE_REASON_MAX = 0xf,
34830 } WMI_POWER_SAVE_FAILURE_REASON_TYPE;
34831 
34832 typedef struct {
34833     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chip_power_save_failure_detected_fixed_param */
34834     A_UINT32 power_save_failure_reason_code; /* Chip power save failuire reason as defined in WMI_POWER_SAVE_FAILURE_REASON_TYPE */
34835     A_UINT32 protocol_wake_lock_bitmap[4]; /* bitmap with bits set for modules (from WLAN_MODULE_ID enum) voting against sleep for prolonged duration */
34836 } wmi_chip_power_save_failure_detected_fixed_param;
34837 
34838 /* Bit set/unset definitions for valid_bitmap field in ani_ofdm_event */
34839 #define WMI_ANI_OFDM_EVENT_PDEV_ID_BIT_SET(bitmap, val) \
34840     WMI_SET_BITS(bitmap, 0, 8, val)
34841 #define WMI_ANI_OFDM_EVENT_PDEV_ID_BIT_GET(bitmap) \
34842     WMI_GET_BITS(bitmap, 0, 8)
34843 
34844 #define WMI_ANI_OFDM_EVENT_PDEV_ID_VALID_BIT_SET(bitmap, val) \
34845     WMI_SET_BITS(bitmap, 31, 1, val)
34846 #define WMI_ANI_OFDM_EVENT_PDEV_ID_VALID_BIT_GET(bitmap) \
34847     WMI_GET_BITS(bitmap, 31, 1)
34848 
34849 typedef struct {
34850     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ani_ofdm_event_fixed_param */
34851     A_UINT32 ofdm_level;
34852     union {
34853         A_UINT32 pdev_id_valid__pdev_id__word;
34854         struct {
34855             /**
34856              * word containng the pdev_id for identifying the MAC
34857              * Contents:
34858              *     bits  7:0 - pdev ID
34859              *     bits 30:8 - reserved
34860              *     bit  31   - pdev ID valid flag
34861              * See macros starting with WMI_ANI_OFDM_EVENT_PDEV_ID_ for values.
34862              * pdev_id is valid when pdev_id_valid is set.
34863              */
34864             A_UINT32 pdev_id: 8,
34865                      reserved: 23,
34866                      pdev_id_valid: 1;
34867         };
34868     };
34869 } wmi_ani_ofdm_event_fixed_param;
34870 
34871 /* When a bit is set it specifies the particular WLAN traffic type is high priority.
34872  * BT low priority traffic has higher priority than WLAN low priority traffic and has
34873  * lower priority when compared to WLAN high priority traffic.
34874  * BT high priority traffic has higher priority than WLAN low/high priority traffic.
34875  */
34876 #define WMI_PDEV_BE_PRIORITY_BIT     (1<<0)
34877 #define WMI_PDEV_BK_PRIORITY_BIT     (1<<1)
34878 #define WMI_PDEV_VI_PRIORITY_BIT     (1<<2)
34879 #define WMI_PDEV_VO_PRIORITY_BIT     (1<<3)
34880 #define WMI_PDEV_BEACON_PRIORITY_BIT (1<<4)
34881 #define WMI_PDEV_MGMT_PRIORITY_BIT   (1<<5)
34882 #define WMI_PDEV_IS_BE_PRIORITY_SET(val) ((val) & WMI_PDEV_BE_PRIORITY_BIT)
34883 #define WMI_PDEV_IS_BK_PRIORITY_SET(val) ((val) & WMI_PDEV_BK_PRIORITY_BIT)
34884 #define WMI_PDEV_IS_VI_PRIORITY_SET(val) ((val) & WMI_PDEV_VI_PRIORITY_BIT)
34885 #define WMI_PDEV_IS_VO_PRIORITY_SET(val) ((val) & WMI_PDEV_VO_PRIORITY_BIT)
34886 #define WMI_PDEV_IS_BEACON_PRIORITY_SET(val) ((val) & WMI_PDEV_BEACON_PRIORITY_BIT)
34887 #define WMI_PDEV_IS_MGMT_PRIORITY_SET(val) ((val) & WMI_PDEV_MGMT_PRIORITY_BIT)
34888 
34889 /*
34890  * For Maple 3-way coex, The interface will have following configurable
34891  * priority bits to set relative priorities of WLAN/BT/3-radio PTA.
34892  * To send below config host will use WMI_COEX_CONFIG_CMD command with
34893  * config type WMI_COEX_CONFIG_THREE_WAY_COEX_START
34894  * WMI_COEX_CONFIG_THREE_WAY_COEX_RESET
34895  *
34896  ** Bits 0 to 7 corresponds to Wifi
34897  * Bit - 0: QCA_WIFI_BE
34898  * Bit - 1: QCA_WIFI_BK
34899  * Bit - 2: QCA_WIFI_VI
34900  * Bit - 3: QCA_WIFI_VO
34901  * Bit - 4: QCA_WIFI_BEACON
34902  * Bit - 5: QCA_WIFI_MGMT
34903  * Bits 6 - 7: Reserved
34904  *
34905  ** Bits 8 to 15 corresponds to BT
34906  * Bit - 8: QCA_BT_ADVERTISER
34907  * Bit - 9: QCA_BT_SCANNER
34908  * Bit - 10: QCA_BT_BLE_CONNECTION
34909  * Bits 11 to 15: Reserved
34910  *
34911  ** Bits 16 to 24 corresponds to 3-radio PTA,
34912  * It can be anything BT/ZigBee connected to 802.15.4 radio
34913  * Bit - 16: QCA_PTA_THIRD_RADIO_LOW
34914  * Bit - 17: QCA_PTA_THIRD_RADIO_HIGH
34915  * Bits 18 to 24: Reserved
34916  *
34917  ** Bits 25 to 31 Reserved for future use
34918  */
34919 #define WMI_PDEV_BT_ADVERTISER_PRIORITY_BIT      (1 <<  8)
34920 #define WMI_PDEV_BT_SCANNER_PRIORITY_BIT         (1 <<  9)
34921 #define WMI_PDEV_BT_BLE_CONNECTION_PRIORITY_BIT  (1 << 10)
34922 #define WMI_PDEV_IS_BT_ADVERTISER_PRIORITY_SET(val) \
34923     ((val) & WMI_PDEV_BT_ADVERTISER_PRIORITY_BIT)
34924 #define WMI_PDEV_IS_BT_SCANNER_PRIORITY_SET(val) \
34925     ((val) & WMI_PDEV_BT_SCANNER_PRIORITY_BIT)
34926 #define WMI_PDEV_IS_BT_BLE_CONNECTION_PRIORITY_SET(val) \
34927     ((val) & WMI_PDEV_BT_BLE_CONNECTION_PRIORITY_BIT)
34928 
34929 #define WMI_PDEV_PTA_THIRD_RADIO_LOW_PRIORITY_BIT  (1 << 16)
34930 #define WMI_PDEV_PTA_THIRD_RADIO_HIGH_PRIORITY_BIT (1 << 17)
34931 #define WMI_PDEV_IS_PTA_THIRD_RADIO_LOW_PRIORITY_SET(val) \
34932     ((val) & WMI_PDEV_PTA_THIRD_RADIO_LOW_PRIORITY_BIT)
34933 #define WMI_PDEV_IS_PTA_THIRD_RADIO_HIGH_PRIORITY_SET(val) \
34934     ((val) & WMI_PDEV_PTA_THIRD_RADIO_HIGH_PRIORITY_BIT)
34935 
34936 typedef enum wmi_coex_algo_type  {
34937     WMI_COEX_ALGO_UNCONS_FREERUN  = 0,
34938     WMI_COEX_ALGO_FREERUN         = 1,
34939     WMI_COEX_ALGO_OCS             = 2,
34940 } WMI_COEX_ALGO_TYPE;
34941 
34942 typedef enum wmi_coex_config_type {
34943     WMI_COEX_CONFIG_PAGE_P2P_TDM        =  1, /* config interval (arg1 BT, arg2 WLAN) for P2P + PAGE */
34944     WMI_COEX_CONFIG_PAGE_STA_TDM        =  2, /* config interval (arg1 BT, arg2 WLAN) for STA + PAGE */
34945     WMI_COEX_CONFIG_PAGE_SAP_TDM        =  3, /* config interval (arg1 BT, arg2 WLAN) for SAP + PAGE */
34946     WMI_COEX_CONFIG_DURING_WLAN_CONN    =  4, /* config during WLAN connection */
34947     WMI_COEX_CONFIG_BTC_ENABLE          =  5, /* config to enable/disable BTC */
34948     WMI_COEX_CONFIG_COEX_DBG            =  6, /* config of COEX debug setting */
34949     WMI_COEX_CONFIG_PAGE_P2P_STA_TDM    =  7, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + STA + PAGE */
34950     WMI_COEX_CONFIG_INQUIRY_P2P_TDM     =  8, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + INQUIRY */
34951     WMI_COEX_CONFIG_INQUIRY_STA_TDM     =  9, /* config interval (ms units) (arg1 BT, arg2 WLAN) for STA + INQUIRY */
34952     WMI_COEX_CONFIG_INQUIRY_SAP_TDM     = 10, /* config interval (ms units) (arg1 BT, arg2 WLAN) for SAP + INQUIRY */
34953     WMI_COEX_CONFIG_INQUIRY_P2P_STA_TDM = 11, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + STA + INQUIRY */
34954     WMI_COEX_CONFIG_TX_POWER            = 12, /* config wlan total tx power when bt coex (arg1 is wlan_tx_power_limit, in 0.5 dBm units) */
34955     WMI_COEX_CONFIG_PTA_CONFIG          = 13, /* config  whether enable PTA and GPIO number (arg1 is pta_enable, arg2 is GPIO number used as /BT_ACTIVE/BT_PRIORITY/WLAN_DENY,8 bit for each) */
34956     WMI_COEX_CONFIG_AP_TDM              = 14, /* config interval (arg1 duty cycle in ms, arg2 WLAN duration in ms) for AP */
34957     WMI_COEX_CONFIG_WLAN_SCAN_PRIORITY  = 15, /* config to set WLAN priority during Off Channel Scan */
34958     WMI_COEX_CONFIG_WLAN_PKT_PRIORITY   = 16, /* config to set WLAN priority for BE/BK/VO/VI/Beacon/Management frame */
34959     WMI_COEX_CONFIG_PTA_INTERFACE       = 17, /* config PTA interface,
34960                                                  arg1 PTA num,
34961                                                  arg2 mode (2-wire/3-wire/PTA),
34962                                                  arg3 first slot time in microsec,
34963                                                  arg4 BT priority time in microsec,
34964                                                  arg5 PTA algorithm (WMI_COEX_ALGO_TYPE),
34965                                                  arg6 PTA priority */
34966     WMI_COEX_CONFIG_BTC_DUTYCYCLE       = 18, /* config interval (ms units) (arg1 WLAN pause duration, arg2 WLAN unpause duration) for WLAN UL + BT Rx */
34967     WMI_COEX_CONFIG_HANDOVER_RSSI       = 19, /* config to set WLAN RSSI (dBm units) at which device switches from Hybrid to TDD coex mode */
34968     WMI_COEX_CONFIG_PTA_BT_INFO         = 20, /* get BT information,
34969                                                  arg1 BT info type: WMI_COEX_PTA_BT_INFO_TYPE_T, scan/advertise/connection info,
34970                                                  arg2-arg5: BT information parameters */
34971     WMI_COEX_CONFIG_SINK_WLAN_TDM       = 21, /* config interval (ms units) (arg1 BT, arg2 WLAN) for A2DP SINK + WLAN */
34972     WMI_COEX_CONFIG_COEX_ENABLE_MCC_TDM = 22, /* config disable/enable COEX TDM for MCC */
34973     WMI_COEX_CONFIG_LOWRSSI_A2DPOPP_TDM = 23, /* config interval (ms units) (arg1 BT, arg2 WLAN) for STA + A2dp + OPP + LOWRSSI */
34974     WMI_COEX_CONFIG_BTC_MODE            = 24, /* config BTC mode, arg1 mode: 0 TDD/1 FDD/2 Hybrid*/
34975     WMI_COEX_CONFIG_ANTENNA_ISOLATION   = 25, /* config isolation between BT and WLAN chains
34976                                                * The arguments are interpreted differently
34977                                                * depending on whether the target supports
34978                                                * WMI_SERVICE_COEX_SUPPORT_UNEQUAL_ISOLATION
34979                                                * If (not COEX_SUPPORT_UNEQUAL_ISOLATION) or arg2 == 0:
34980                                                *     arg1 => isolation between BT and WLAN chains,
34981                                                *             dB units,
34982                                                *             same isolation for all chains
34983                                                * Else:
34984                                                *     arg1 bits  7:0  - chain 0 isolation, in dB
34985                                                *     arg1 bits 15:8  - chain 1 isolation, in dB
34986                                                *     arg1 bits 23:16 - chain 2 isolation, in dB
34987                                                *     arg1 bits 31:24 - chain 3 isolation, in dB
34988                                                * arg2 - 0 => Equal isolation b/w BT and each WLAN chain (default)
34989                                                *        1 => Different isolation b/w BT and each WLAN chain
34990                                                */
34991     WMI_COEX_CONFIG_BT_LOW_RSSI_THRESHOLD = 26, /* config BT low RSSI threshold (dBm units) */
34992     WMI_COEX_CONFIG_BT_INTERFERENCE_LEVEL = 27, /* config BT interference level (dBm units)
34993                                                  arg1 low - lower limit
34994                                                  arg2 low - upper limit
34995                                                  arg3 medium - lower limit
34996                                                  arg4 medium - upper limit
34997                                                  arg5 high - lower limit
34998                                                  arg6 high - upper limit */
34999     WMI_COEX_CONFIG_WLAN_OVER_ZBLOW        = 28, /* config to boost WiFi traffic over 15.4 Low prio traffic */
35000     WMI_COEX_CONFIG_WLAN_MGMT_OVER_BT_A2DP = 29, /* config to raise WLAN priority higher than BT in coex scenario of SAP + BT or 15.4 */
35001     WMI_COEX_CONFIG_WLAN_CONN_OVER_LE      = 30, /* config to elevate Wifi priority over BLE during WLAN association */
35002     WMI_COEX_CONFIG_LE_OVER_WLAN_TRAFFIC   = 31, /* config to elevate BLE traffic over WiFi traffic */
35003     WMI_COEX_CONFIG_THREE_WAY_COEX_RESET   = 32, /* config to reset the weights to default  */
35004     /* WMI_COEX_CONFIG_THREE_WAY_DELAY_PARA
35005      * config to T_PRIO T_DELAY parameter for each case
35006      *   arg1 - wlan/bt state
35007      *       0: beacon tx
35008      *       1: wlan connecting
35009      *       2: wlan in dhcp
35010      *       3: a2dp critical
35011      *       4: eSCO
35012      *   arg2 - t_prio for low priority traffic (microsecond units)
35013      *   arg3 - t_delay for low priority traffic (microsecond units)
35014      *   arg4 - t_prio for high priority traffic (microsecond units)
35015      *   arg5 - t_delay for high priority traffic (microsecond units)
35016      */
35017     WMI_COEX_CONFIG_THREE_WAY_DELAY_PARA   = 33,
35018     /* WMI_COEX_CONFIG_THREE_WAY_COEX_START
35019      * config to set coex parameters from WLAN host to adjust priorities
35020      * among wlan/bt/zb
35021      * arg1 - priority level 1, the serialized coex scenorio ID will be put here
35022      * arg2 - priority level 2, same parameters rules as arg1
35023      * arg3 - priority level 3, same parameters rules as arg1
35024      * arg4 - priority level 4, same parameters rules as arg1
35025      */
35026     WMI_COEX_CONFIG_THREE_WAY_COEX_START   = 34,
35027     /* WMI_COEX_CONFIG_MPTA_HELPER_ENABLE
35028      * config to enable(1)/disable(0) mpta-helper function
35029      */
35030     WMI_COEX_CONFIG_MPTA_HELPER_ENABLE     = 35,
35031     /* WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_STATE
35032      * config zigbee state
35033      * arg1: zigbee state
35034      *       (idle form-network wait-join join-network network-up HMI)
35035      */
35036     WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_STATE = 36,
35037     /* WMI_COEX_CONFIG_MPTA_HELPER_INT_OCS_PARAMS
35038      * config ocs wlan/nonwlan params after MPTA interrupt fired
35039      * arg1: wlan duration (ms units) in Shape-OCS
35040      * arg2: nonwlan duration (ms units) in Shape-OCS
35041      */
35042     WMI_COEX_CONFIG_MPTA_HELPER_INT_OCS_PARAMS = 37,
35043     /* WMI_COEX_CONFIG_MPTA_HELPER_MON_OCS_PARAMS
35044      * config ocs wlan/nonwlan params during monitor period after
35045      * interrupt period finished
35046      * arg1: wlan duration (ms units) in Shape-OCS
35047      * arg2: nonwlan duration (ms units) in Shape-OCS
35048      */
35049     WMI_COEX_CONFIG_MPTA_HELPER_MON_OCS_PARAMS   = 38,
35050     /* WMI_COEX_CONFIG_MPTA_HELPER_INT_MON_DURATION
35051      * config ocs duration in interrupt period and monitor period
35052      * arg1: duration (ms units) in interrupt period
35053      * arg2: duration (ms units) in monitor period
35054      */
35055     WMI_COEX_CONFIG_MPTA_HELPER_INT_MON_DURATION = 39,
35056     /* WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_CHANNEL
35057      * config zigbee channel 11 - 26
35058      */
35059     WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_CHANNEL   = 40,
35060     /* WMI_COEX_CONFIG_MPTA_HELPER_WLAN_MUTE_DURATION
35061      * config msw mute duration (ms units) after MPTA interrupt fired
35062      */
35063     WMI_COEX_CONFIG_MPTA_HELPER_WLAN_MUTE_DURATION   = 41,
35064     /* WMI_COEX_CONFIG_BT_SCO_ALLOW_WLAN_2G_SCAN
35065      * allow WLAN scan on 2.4G channel when BT SCO connectivity is alive
35066      */
35067     WMI_COEX_CONFIG_BT_SCO_ALLOW_WLAN_2G_SCAN   = 42,
35068     /* WMI_COEX_CONFIG_ENABLE_2ND_HARMONIC_WAR
35069      * config to enable(1)/disable(0) WAR of BT 2nd harmonic issue function
35070      */
35071     WMI_COEX_CONFIG_ENABLE_2ND_HARMONIC_WAR     = 43,
35072     /* WMI_COEX_CONFIG_BTCOEX_SEPARATE_CHAIN_MODE
35073      * config BTC separate chain mode or shared mode
35074      */
35075     WMI_COEX_CONFIG_BTCOEX_SEPARATE_CHAIN_MODE  = 44,
35076     /* WMI_COEX_CONFIG_ENABLE_TPUT_SHAPING
35077      * enable WLAN throughput shaping while BT scanning
35078      */
35079     WMI_COEX_CONFIG_ENABLE_TPUT_SHAPING = 45,
35080     /* WMI_COEX_CONFIG_ENABLE_TXBF
35081      * enable WLAN tx beamforming during coex case
35082      */
35083     WMI_COEX_CONFIG_ENABLE_TXBF = 46,
35084     /* WMI_COEX_CONFIG_FORCED_ALGO
35085      * config to select coex algorithm
35086      * arg1: select fixed coex algorithm
35087      */
35088     WMI_COEX_CONFIG_FORCED_ALGO = 47,
35089     /* WMI_COEX_CONFIG_LE_SCAN_POLICY
35090      * BLE scan Coex policy hint
35091      * 0 to place more emphasis on BLE Scan results
35092      * 1 to place more emphasis on WLAN performance
35093      */
35094     WMI_COEX_CONFIG_LE_SCAN_POLICY = 48,
35095     /* WMI_COEX_CONFIG_BT_RX_PER_THRESHOLD
35096      * config BT RX PER threshold
35097      */
35098     WMI_COEX_CONFIG_BT_RX_PER_THRESHOLD = 49,
35099     /* WMI_COEX_SET_TRAFFIC_SHAPING_MODE
35100      * arg1: 0 (WMI_COEX_TRAFFIC_SHAPING_MODE_DISABLED)
35101      *         Disable coex policies and set fixed arbitration config.
35102      *       1 (WMI_COEX_TRAFFIC_SHAPING_MODE_ENABLED)
35103      *         Enable all coex policies.
35104      */
35105     WMI_COEX_SET_TRAFFIC_SHAPING_MODE = 50,
35106     /* WMI_COEX_CONFIG_ENABLE_CONT_INFO
35107      * enable contention info log
35108      * arg1:
35109      *     0: disable both cont/sched log
35110      *     1: enable cont log
35111      *     2: enable sched log
35112      *     3: enable both cont and sched log
35113      */
35114     WMI_COEX_CONFIG_ENABLE_CONT_INFO = 51,
35115 } WMI_COEX_CONFIG_TYPE;
35116 
35117 typedef struct {
35118     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_COEX_CONFIG_CMD_fixed_param */
35119     A_UINT32 vdev_id;
35120     A_UINT32 config_type; /* wmi_coex_config_type enum */
35121     A_UINT32 config_arg1;
35122     A_UINT32 config_arg2;
35123     A_UINT32 config_arg3;
35124     A_UINT32 config_arg4;
35125     A_UINT32 config_arg5;
35126     A_UINT32 config_arg6;
35127 } WMI_COEX_CONFIG_CMD_fixed_param;
35128 
35129 typedef struct {
35130     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_coex_multiple_config_cmd_fixed_param */
35131     /*
35132      * This struct is followed by other TLVs:
35133      *   WMI_COEX_CONFIG_CMD_fixed_param config_list[num_config];
35134      */
35135 } wmi_coex_multiple_config_cmd_fixed_param;
35136 
35137 typedef enum wmi_coex_dbam_mode_type {
35138     WMI_COEX_DBAM_DISABLE = 0,
35139     WMI_COEX_DBAM_ENABLE = 1,
35140     WMI_COEX_DBAM_FORCED = 2,
35141 } WMI_COEX_DBAM_MODE_TYPE;
35142 
35143 typedef enum {
35144     WMI_COEX_TRAFFIC_SHAPING_MODE_DISABLED = 0,
35145     WMI_COEX_TRAFFIC_SHAPING_MODE_ENABLED = 1,
35146 } WMI_COEX_TRAFFIC_SHAPING_MODE;
35147 
35148 typedef struct {
35149     A_UINT32 tlv_header;
35150     A_UINT32 vdev_id;
35151     A_UINT32 dbam_mode; /* wmi_coex_dbam_mode_type enum */
35152 } wmi_coex_dbam_cmd_fixed_param;
35153 
35154 /**
35155  * Host get current TAS buffer from FW or set last TAS buffer to FW
35156  */
35157 typedef enum wmi_tas_power_history_cmd_type {
35158     WMI_TAS_POWER_HISTORY_CMD_GET = 0, /* before WLAN off, host trigger this cmd to get power history */
35159     WMI_TAS_POWER_HISTORY_CMD_SET = 1, /* after WLAN reboot, host trigger this cmd to set power history of last life cycle */
35160 } WMI_TAS_POWER_HISTORY_CMD_TYPE;
35161 
35162 typedef struct {
35163     A_UINT32    tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tas_power_history_cmd_fixed_param */
35164     A_UINT32    sub_type;       /* refer to WMI_TAS_POWER_HISTORY_TYPE */
35165     A_UINT32    time_diff;      /* time of wlan on - time of wlan off after wlan reboot. unit: millisecond*/
35166 } wmi_tas_power_history_cmd_fixed_param;
35167 
35168 /**
35169  * This command is sent from WLAN host driver to firmware to
35170  * request firmware to enable/disable channel avoidance report
35171  * to host.
35172  *
35173  */
35174 enum {
35175     WMI_MWSCOEX_CHAN_AVD_RPT_DISALLOW = 0,
35176     WMI_MWSCOEX_CHAN_AVD_RPT_ALLOW = 1
35177 };
35178 
35179 typedef struct {
35180     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param */
35181     /** Allow/disallow flag - see WMI_MWSCOEX_CHAN_AVD_RPT enum */
35182     A_UINT32 rpt_allow;
35183 } WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param;
35184 
35185 /*
35186  * Periodic channel stats WMI command structure
35187  * WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID
35188  */
35189 typedef struct {
35190     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_periodic_channel_stats_config_fixed_param */
35191     /** 1 = enable, 0 = disable */
35192     A_UINT32 enable;
35193     /** periodic stats duration (units are milliseconds) */
35194     A_UINT32 stats_period;
35195     /** pdev_id for identifying the MAC
35196      * See macros starting with WMI_PDEV_ID_ for values.
35197      */
35198     A_UINT32 pdev_id;
35199 } wmi_set_periodic_channel_stats_config_fixed_param;
35200 
35201 typedef struct {
35202     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_wal_power_debug_cmd_fixed_param */
35203     /** pdev_id for identifying the MAC
35204      * See macros starting with WMI_PDEV_ID_ for values.
35205      */
35206     A_UINT32 pdev_id;
35207     /* Identify the wlan module */
35208     A_UINT32 module_id;
35209     /* Num of elements in the following args[] array */
35210     A_UINT32 num_args;
35211 /**
35212  * Following this structure are the TLVs:
35213  *   A_UINT32 args[];
35214  **/
35215 } wmi_pdev_wal_power_debug_cmd_fixed_param;
35216 
35217 typedef struct {
35218     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_reorder_timeout_val_cmd_fixed_param */
35219     /**
35220      * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
35221      * @details
35222      *     Each WMM access category (voice, video, best-effort, background)
35223      *     will have its own timeout value to dictate how long to wait for
35224      *     missing rx MPDUs to arrive before releasing subsequent MPDUs that
35225      *     have already been received.
35226      *     This parameter specifies the timeout in milliseconds for each
35227      *     access category.
35228      *     The array elements are indexed by the WMI_AC enum to identify
35229      *     which array element corresponds to which AC / traffic type.
35230      */
35231     A_UINT32 rx_timeout_pri[WMI_AC_MAX];
35232 } wmi_pdev_set_reorder_timeout_val_cmd_fixed_param;
35233 
35234 /**
35235  * wlan stats shall be understood as per period.
35236  * Generally, it is reported periodically based on the period specified by host.
35237  * But if the variation of one stats of compared to the
35238  * previous notification exceeds a threshold,
35239  * FW will report the wlan stats immediately.
35240  * The values of the stats becomes the new reference to compute variations.
35241  * This threshold can be a global setting or per category.
35242  * Host can enable/disable the mechanism for any stats per bitmap.
35243  * TX/RX thresholds (percentage value) are shared across ACs,
35244  * and TX/RX stats comprisons are processed per AC of each peer.
35245  * For example, if bit 0 (stand for tx_mpdus) of tx_thresh_bitmap is set to 1,
35246  * and the detailed tx_mpdus threshold value is set to 10%,
35247  * suppose tx_mpdus value of BE of peer 0 is 100 in first period,
35248  * and it reaches 110 during the second period,
35249  * FW will generate and send out a wlan stats event immediately.
35250  */
35251 typedef struct {
35252     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_stats_threshold_cmd_fixed_param */
35253     /** Indicate if threshold mechanism is enabled or disabled.
35254      *  It is disabled by default.
35255      *  Host can enable and disable it dynamically.
35256      */
35257     A_UINT32 enable_thresh;
35258     /** use_thresh_bitmap equals 0 means gbl_thresh is used.
35259      *  when use_thresh_bitmap equals 1, ignore gbl_thresh and use stats bitmap indicated thresholds.
35260      */
35261     A_UINT32 use_thresh_bitmap;
35262     /** global threshold, valid when use_thresh_bitmap equals 0.
35263      *  It takes effect for all counters.
35264      *  If use_thresh_bitmap ==0 && gbl_thresh == 0, disable threshold mechanism.
35265      */
35266     A_UINT32 gbl_thresh;
35267     /** Enable/disable bitmap for threshold mechanism of CCA stats */
35268     A_UINT32 cca_thresh_enable_bitmap;
35269     /** Enable/disable bitmap for threshold mechanism of signal stats */
35270     A_UINT32 signal_thresh_enable_bitmap;
35271     /** Enable/disable bitmap for threshold mechanism of TX stats */
35272     A_UINT32 tx_thresh_enable_bitmap;
35273     /** Enable/disable bitmap for threshold mechanism of RX stats */
35274     A_UINT32 rx_thresh_enable_bitmap;
35275     /* This TLV is followed by TLVs below:
35276      *    wmi_chan_cca_stats_thresh     cca_thresh;
35277      *    wmi_peer_signal_stats_thresh  signal_thresh;
35278      *    wmi_tx_stats_thresh           tx_thresh;
35279      *    wmi_rx_stats_thresh           rx_thresh;
35280      */
35281 } wmi_pdev_set_stats_threshold_cmd_fixed_param;
35282 
35283 typedef enum {
35284     WMI_REQUEST_WLAN_TX_STAT     = 0x01,
35285     WMI_REQUEST_WLAN_RX_STAT     = 0x02,
35286     WMI_REQUEST_WLAN_CCA_STAT    = 0x04,
35287     WMI_REQUEST_WLAN_SIGNAL_STAT = 0x08,
35288 } wmi_wlan_stats_id;
35289 
35290 typedef struct {
35291     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_wlan_stats_cmd_fixed_param */
35292     wmi_wlan_stats_id stats_id;
35293 } wmi_request_wlan_stats_cmd_fixed_param;
35294 
35295 typedef enum {
35296     WMI_REQUEST_ONE_PEER_STATS_INFO = 0x01, /* request stats of one specified peer */
35297     WMI_REQUEST_VDEV_ALL_PEER_STATS_INFO = 0x02, /* request stats of all peers belong to specified VDEV */
35298 } wmi_peer_stats_info_request_type;
35299 
35300 /** It is required to issue WMI_PDEV_PARAM_PEER_STATS_INFO_ENABLE
35301  *  (with a non-zero value) before issuing the first REQUEST_PEER_STATS_INFO.
35302  */
35303 typedef struct {
35304     /** TLV tag and len; tag equals
35305      * WMITLV_TAG_STRUC_wmi_request_peer_stats_info_cmd_fixed_param */
35306     A_UINT32 tlv_header;
35307     /** request_type to indicate if only stats of
35308      *  one peer or all peers of the VDEV are requested,
35309      *  see wmi_peer_stats_info_request_type.
35310      */
35311     A_UINT32 request_type;
35312     /** VDEV identifier */
35313     A_UINT32 vdev_id;
35314     /** this peer_macaddr is only used if request_type == ONE_PEER_STATS_INFO */
35315     wmi_mac_addr peer_macaddr;
35316     /** flag to indicate if FW needs to reset requested peers stats */
35317     A_UINT32 reset_after_request;
35318 } wmi_request_peer_stats_info_cmd_fixed_param;
35319 
35320 typedef enum {
35321     /*
35322      * Multiple stats type can be requested together, so each value
35323      * within this enum represents a bit position within a stats bitmap.
35324      */
35325     /* bit 0 is currently unused / reserved */
35326     WMI_REQUEST_CTRL_PATH_PDEV_TX_STAT      = 1,
35327     WMI_REQUEST_CTRL_PATH_VDEV_EXTD_STAT    = 2,
35328     WMI_REQUEST_CTRL_PATH_MEM_STAT          = 3,
35329     WMI_REQUEST_CTRL_PATH_TWT_STAT          = 4,
35330     WMI_REQUEST_CTRL_PATH_CALIBRATION_STAT  = 5,
35331     WMI_REQUEST_CTRL_PATH_DFS_CHANNEL_STAT  = 6,
35332     WMI_REQUEST_CTRL_PATH_AWGN_STAT         = 7,
35333     WMI_REQUEST_CTRL_PATH_BTCOEX_STAT       = 8,
35334     WMI_REQUEST_CTRL_PATH_BMISS_STAT        = 9,
35335     WMI_REQUEST_CTRL_PATH_ODD_ADDR_READ     = 10,
35336     WMI_REQUEST_CTRL_PATH_AFC_STAT          = 11,
35337     WMI_REQUEST_CTRL_PATH_PMLO_STAT         = 12,
35338     WMI_REQUEST_CTRL_PATH_CFR_STAT          = 13,
35339     WMI_REQUEST_CTRL_PATH_T2LM_STAT         = 14,
35340     WMI_REQUEST_CTRL_PATH_BLANKING_STAT     = 15,
35341     WMI_REQUEST_CTRL_PATH_PEER_STAT         = 16,
35342     WMI_REQUEST_CTRL_PATH_VDEV_DEBUG_STAT   = 17,
35343     WMI_REQUEST_CTRL_STA_RRM_STAT           = 18,
35344 } wmi_ctrl_path_stats_id;
35345 
35346 typedef enum {
35347     /* bit 0 is currently unused / reserved */
35348     WMI_HALPHY_CTRL_PATH_PDEV_TX_STAT = 1,
35349 } wmi_halphy_ctrl_path_stats_id;
35350 
35351 typedef enum {
35352     /*
35353      * The following stats actions are mutually exclusive.
35354      * A single stats request message can only specify one action.
35355      */
35356     WMI_REQUEST_CTRL_PATH_STAT_GET              = 1,
35357     WMI_REQUEST_CTRL_PATH_STAT_RESET            = 2,
35358     WMI_REQUEST_CTRL_PATH_STAT_START            = 3,
35359     WMI_REQUEST_CTRL_PATH_STAT_STOP             = 4,
35360     WMI_REQUEST_CTRL_PATH_STAT_PERIODIC_PUBLISH = 5,
35361 } wmi_ctrl_path_stats_action;
35362 
35363 typedef enum {
35364     WMI_HALPHY_CTRL_PATH_SU_STATS = 0,
35365     WMI_HALPHY_CTRL_PATH_SUTXBF_STATS,
35366     WMI_HALPHY_CTRL_PATH_MU_STATS,
35367     WMI_HALPHY_CTRL_PATH_MUTXBF_STATS,
35368 } wmi_halphy_ctrl_path_subid;
35369 
35370 typedef struct {
35371     /** TLV tag and len; tag equals
35372      *  WMITLV_TAG_STRUC_wmi_request_ctrl_path_stats_cmd_fixed_param */
35373     A_UINT32 tlv_header;
35374     /** Bitmask showing which of stats IDs 0-31 have been requested.
35375      *  These stats ids are defined in enum wmi_ctrl_path_stats_id.
35376      */
35377     A_UINT32 stats_id_mask;
35378     /** request ID to store the cookies in wifistats */
35379     A_UINT32 request_id;
35380     /** action
35381      *  get/reset/start/stop based on stats id
35382      *  defined as a part of wmi_ctrl_path_stats_action
35383      **/
35384     A_UINT32 action; /* refer to wmi_ctrl_path_stats_action */
35385 
35386     /**
35387      * The stat_periodicity field is relevant only when action is set to
35388      * WMI_REQUEST_CTRL_PATH_STAT_PERIODIC_PUBLISH.
35389      * The units of this periodicity are milliseconds.
35390      * Periodically send WMI ctrl-path stats event with the specified stats
35391      * periodicity for the stats whose IDs are set in stats_id_mask.
35392      * Periodic WMI ctrl-path stats events are enabled by setting value > 0,
35393      * Previously onngoing periodic WMI ctrl-path stats events become
35394      * disabled when action is WMI_REQUEST_CTRL_PATH_STAT_PERIODIC_PUBLISH
35395      * and stat_periodicity = 0.
35396      */
35397     A_UINT32 stat_periodicity;
35398 
35399     /** The below TLV arrays optionally follow this fixed_param TLV structure:
35400      *  1.  A_UINT32 pdev_ids[];
35401      *      If this array is present and non-zero length, stats should only
35402      *      be provided from the pdevs identified in the array.
35403      *  2.  A_UINT32 vdev_ids[];
35404      *      If this array is present and non-zero length, stats should only
35405      *      be provided from the vdevs identified in the array.
35406      *  3.  wmi_mac_addr peer_macaddr[];
35407      *      If this array is present and non-zero length, stats should only
35408      *      be provided from the peers with the MAC addresses specified
35409      *      in the array.
35410      */
35411 } wmi_request_ctrl_path_stats_cmd_fixed_param;
35412 
35413 typedef struct {
35414     /** TLV tag and len; tag equals
35415      *  WMITLV_TAG_STRUC_wmi_request_halphy_ctrl_path_stats_cmd_fixed_param */
35416     A_UINT32 tlv_header;
35417 
35418     /** Bitmask showing which of stats IDs 0-31 have been requested.
35419      *  These stats ids are defined in enum wmi_halphy_ctrl_path_stats_id.
35420      */
35421     A_UINT32 stats_id_mask;
35422     /** process id requested */
35423     A_UINT32 request_id;
35424     /** action
35425      *  get/reset based on stats id
35426      *  defined as a part of wmi_ctrl_path_stats_action
35427      **/
35428     A_UINT32 action; /* refer to wmi_ctrl_path_stats_action */
35429 
35430     /** Request Halphy subid stats
35431      * According to the requested stats_id_mask this halphy_subid varies
35432      * For stats_id = 1, the possible values could be enum
35433      * wmi_halphy_ctrl_path_halphyid
35434      */
35435     A_UINT32 halphy_subid;
35436 
35437     /** The below TLV arrays optionally follow this fixed_param TLV structure:
35438      *  1.  A_UINT32 pdev_ids[];
35439      *      If this array is present and non-zero length, stats should only
35440      *      be provided from the pdevs identified in the array.
35441      *  2.  A_UINT32 vdev_ids[];
35442      *      If this array is present and non-zero length, stats should only
35443      *      be provided from the vdevs identified in the array.
35444      *  3.  wmi_mac_addr peer_macaddr[];
35445      *      If this array is present and non-zero length, stats should only
35446      *      be provided from the peers with the MAC addresses specified
35447      *      in the array.
35448      */
35449 } wmi_request_halphy_ctrl_path_stats_cmd_fixed_param;
35450 
35451 typedef enum {
35452     WMI_REQUEST_ONE_RADIO_CHAN_STATS = 0x01, /* request stats of one specified channel */
35453     WMI_REQUEST_ALL_RADIO_CHAN_STATS = 0x02, /* request stats of all channels */
35454 } wmi_radio_chan_stats_request_type;
35455 
35456 /** It is required to issue WMI_PDEV_PARAM_RADIO_CHAN_STATS_ENABLE
35457  *  (with a non-zero value) before issuing the first REQUEST_RADIO_CHAN_STATS.
35458  */
35459 typedef struct {
35460     /** TLV tag and len; tag equals
35461      * WMITLV_TAG_STRUC_wmi_request_radio_chan_stats_cmd_fixed_param */
35462     A_UINT32 tlv_header;
35463     /** request_type to indicate if only stats of
35464      *  one channel or all channels are requested,
35465      *  see wmi_radio_chan_stats_request_type.
35466      */
35467     A_UINT32 request_type;
35468     /** Frequency of channel whose stats is requested,
35469      *  only used when request_type == WMI_REQUEST_ONE_RADIO_CHAN_STATS
35470      */
35471     A_UINT32 chan_mhz;
35472     /** flag to indicate if FW needs to reset requested stats of specified channel/channels */
35473     A_UINT32 reset_after_request;
35474 } wmi_request_radio_chan_stats_cmd_fixed_param;
35475 
35476 typedef struct {
35477     /** TLV tag and len; tag equals
35478      * WMITLV_TAG_STRUC_wmi_rmc_set_leader_cmd_fixed_param */
35479     A_UINT32 tlv_header;
35480     /* VDEV identifier */
35481     A_UINT32 vdev_id;
35482     /* Leader's mac address */
35483     wmi_mac_addr leader_mac_addr;
35484 } wmi_rmc_set_leader_cmd_fixed_param;
35485 
35486 typedef struct {
35487     /** TLV tag and len; tag equals
35488     * WMITLV_TAG_STRUC_wmi_rmc_manual_leader_event_fixed_param */
35489     A_UINT32 tlv_header;
35490     /* VDEV identifier */
35491     A_UINT32 vdev_id;
35492     /*  0: success
35493      *  1: selected leader not found in network, able to find using auto selection
35494      * -1: error
35495      * non zero value should be return to userspace in case of failure */
35496     A_INT32 status;
35497     /* bssid of new leader */
35498     wmi_mac_addr leader_mac_addr;
35499 } wmi_rmc_manual_leader_event_fixed_param;
35500 
35501 typedef struct {
35502     /** TLV tag and len; tag equals
35503      * WMITLV_TAG_STRUC_wmi_audio_sync_start_event_fixed_param
35504      */
35505     A_UINT32 tlv_header;
35506     /* VDEV identifier */
35507     A_UINT32 vdev_id;
35508     /* periodicity:
35509      * How frequently (in msec) FW wants host to capture the Q_TIMER.
35510      * periodicity = 0 indicates to the host to stop capturing the QTIMERs.
35511      */
35512     A_UINT32 periodicity;
35513     /* No of Qtimer captures FW wants */
35514     A_UINT32 reads_needed;
35515     /* Lower 32 bits of the mac timer. Value is valid only if periodicity = 0 */
35516     A_UINT32 mac_timer_l32;
35517     /* Upper 32 bits of the mac timer. Value is valid only if periodicity = 0 */
35518     A_UINT32 mac_timer_u32;
35519     /* Lower 32 bits of the Qtimer. Value is valid only if periodicity = 0 */
35520     A_UINT32 qtimer_l32;
35521     /* Upper 32 bits of the Qtimer. Value is valid only if periodicity = 0 */
35522     A_UINT32 qtimer_u32;
35523 } wmi_audio_sync_start_stop_event_fixed_param;
35524 
35525 typedef struct {
35526     /** TLV tag and len; tag equals
35527     * WMITLV_TAG_STRUC_wmi_audio_sync_q_mac_relation_event_fixed_param */
35528     A_UINT32 tlv_header;
35529     /* VDEV identifier */
35530     A_UINT32 vdev_id;
35531     /* Lower 32 bits of the offset between Qmaster and Qslave */
35532     A_UINT32 offset_l32;
35533     /* Upper 32 bits of the offset between Qmaster and Qslave */
35534     A_UINT32 offset_u32;
35535 } wmi_audio_sync_q_master_slave_offset_event_fixed_param;
35536 
35537 typedef struct {
35538     /** TLV tag and len; tag equals
35539     * WMITLV_TAG_STRUC_wmi_audio_sync_q_mac_relation_event_fixed_param */
35540     A_UINT32 tlv_header;
35541     /* Lower 32 bits of the Qtimer of master */
35542     A_UINT32 qmaster_l32;
35543     /* Upper 32 bits of the Qtimer of master */
35544     A_UINT32 qmaster_u32;
35545     /* Lower 32 bits of the Qtimer of slave*/
35546     A_UINT32 qslave_l32;
35547     /* Upper 32 bits of the Qtimer of slave*/
35548     A_UINT32 qslave_u32;
35549 } wmi_audio_sync_q_master_slave_times;
35550 
35551 /** Set Preferred Channel List  **/
35552 typedef struct {
35553     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_pcl_cmd_fixed_param */
35554     /** vdev_id */
35555     A_UINT32 vdev_id;
35556 /**
35557  * TLV (tag length value) parameters follow the wmi_vdev_set_pcl_cmd
35558  * structure. The TLV's are:
35559  *
35560  *     A_UINT32 channel_weight[];
35561  *         values defined by enum 'wmi_pcl_chan_weight'
35562  *         channel order & size will be as per the list provided in WMI_SCAN_CHAN_LIST_CMDID
35563  **/
35564 } wmi_vdev_set_pcl_cmd_fixed_param;
35565 
35566 /** command type for WMI_PDEV_TBTT_OFFSET_SYNC_CMDID */
35567 enum pdev_tbtt_offset_cmd_type
35568 {
35569     WMI_PDEV_GET_TBTT_OFFSET,
35570     WMI_PDEV_SET_TBTT_OFFSET,
35571 };
35572 
35573 /** Per neighbour TBTT offset information */
35574 typedef struct
35575 {
35576     /** TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_pdev_tbtt_offset_info */
35577     A_UINT32 tlv_header;
35578     /* neighbour bss mac address */
35579     wmi_mac_addr bss_mac;
35580     /* neighbour bss beacon interval in TU */
35581     A_UINT32 beacon_intval;
35582     /* neighbour bss operating class as defined in Annex E, IEEE80211 standard */
35583     A_UINT32 opclass;
35584     /* neighbour bss operating channel index */
35585     A_UINT32 chan_idx;
35586     /* neighbour bss next QTIME TBTT high 32 bit value */
35587     A_UINT32 next_qtime_tbtt_high;
35588     /* neighbour bss next QTIME TBTT low 32 bit value */
35589     A_UINT32 next_qtime_tbtt_low;
35590 } wmi_pdev_rnr_bss_tbtt_info;
35591 
35592 typedef struct {
35593     /** TLV tag and len; tag equals
35594      * WMITLV_TAG_STRUC_wmi_pdev_tbtt_offset_sync_cmd_fixed_param */
35595     A_UINT32 tlv_header;
35596     /*
35597      * PDEV identifier. Value WMI_PDEV_ID_SOC implies applicable to all pdevs
35598      * on SoC else applicable only to specified pdev
35599      */
35600     A_UINT32 pdev_id;
35601     /* command_type from enum pdev_tbtt_offset_cmd_type */
35602     A_UINT32 cmd_type;
35603     /*
35604      * Following this structure is the TLV:
35605      * struct wmi_pdev_rnr_bss_tbtt_info rnr_tbtt_info[num_rnr_tbtt_info];
35606      */
35607 } wmi_pdev_tbtt_offset_sync_cmd_fixed_param;
35608 
35609 typedef enum {
35610     WLAN_2G_CAPABILITY = 0x1,
35611     WLAN_5G_CAPABILITY = 0x2,
35612 } WLAN_BAND_CAPABILITY;
35613 
35614 typedef enum wmi_hw_mode_config_type {
35615     WMI_HW_MODE_SINGLE      = 0, /* Only one PHY is active. */
35616     WMI_HW_MODE_DBS         = 1, /* Both PHYs are active in different bands, PHYB in 2G and PHYA in 5G. */
35617     WMI_HW_MODE_SBS_PASSIVE = 2, /* Both PHYs are in passive mode (only rx) in same band; no tx allowed. */
35618     WMI_HW_MODE_SBS         = 3, /* Both PHYs are active in the same band.
35619                                   * Support for both PHYs within one band is planned for 5G only
35620                                   * (as indicated in WMI_MAC_PHY_CAPABILITIES),
35621                                   * but could be extended to other bands in the future.
35622                                   * The separation of the band between the two PHYs needs to be communicated separately.
35623                                   */
35624     WMI_HW_MODE_DBS_SBS     = 4, /* 3 PHYs, with 2 on the same band doing SBS
35625                                   * as in WMI_HW_MODE_SBS, and 3rd on the other band
35626                                   */
35627     WMI_HW_MODE_DBS_OR_SBS  = 5, /* One PHY is on 5G and the other PHY can be in 2G or 5G. */
35628     WMI_HW_MODE_DBS_2G_5G   = 6, /* Both PHYs are active in different bands. PhyA 2G and PhyB 5G */
35629     WMI_HW_MODE_2G_PHYB     = 7, /* Only PhyB 2G active */
35630     WMI_HW_MODE_EMLSR       = 8, /* Both PHYs are active in listen mode in 1x1
35631                                   * and Tx/Rx trigger on any PHY will switch
35632                                   * from 1x1 to 2x2 on that Phy
35633                                   */
35634     WMI_HW_MODE_AUX_EMLSR_SINGLE = 9, /* PHYA0 and AUX are active in listen mode
35635                                        * in 1x1 and Tx/Rx trigger on any.
35636                                        * PHY will switch from 1x1 to 2x2
35637                                        * on that Phy.
35638                                        */
35639     WMI_HW_MODE_AUX_EMLSR_SPLIT = 10, /* PHYA1 and AUX are active in listen mode
35640                                        * in 1x1 and Tx/Rx trigger on any.
35641                                        * PHY will switch from 1x1 to 2x2
35642                                        * on that Phy.
35643                                        */
35644 } WMI_HW_MODE_CONFIG_TYPE;
35645 
35646 /*
35647  * Per HW mode MLO capability flags
35648  * use bits 31:27 of A_UINT32 hw_mode_config_type for Per HW mode MLO
35649  * capability flags...
35650  * WMI_MLO_CAP_FLAG_NONE:           Do not support MLO for the specific HW mode
35651  * WMI_MLO_CAP_FLAG_NON_STR_IN_DBS: Support STR MLO when DBS for the specific
35652  *                                  HW mode
35653  * WMI_MLO_CAP_FLAG_STR_IN_DBS:     Support Non-STR MLO when DBS for the
35654  *                                  specific HW mode
35655  * WMI_MLO_CAP_FLAG_NON_STR_IN_SBS: Support STR MLO when SBS for the specific
35656  *                                  HW mode
35657  * WMI_MLO_CAP_FLAG_STR_IN_SBS:     Support Non-STR MLO when SBS for the
35658  *                                  specific HW mode
35659  * WMI_MLO_CAP_FLAG_STR:            Support STR for the specific HW mode.
35660  *
35661  * WMI_MLO_CAP_FLAG_EMLSR:          Support eMLSR mode.
35662  */
35663 #define WMI_MLO_CAP_FLAG_NONE           0x00
35664 #define WMI_MLO_CAP_FLAG_NON_STR_IN_DBS 0x01
35665 #define WMI_MLO_CAP_FLAG_STR_IN_DBS     0x02
35666 #define WMI_MLO_CAP_FLAG_NON_STR_IN_SBS 0x04
35667 #define WMI_MLO_CAP_FLAG_STR_IN_SBS     0x08
35668 #define WMI_MLO_CAP_FLAG_STR            0x10
35669 #define WMI_MLO_CAP_FLAG_EMLSR          0x20
35670 
35671 /*
35672  * hw_mode_config_type sub-fields for chips that support 802.11BE/MLO:
35673  * bits 26:0  - hw_mode_config
35674  * bits 31:27 - per HW mode MLO capability flags
35675  */
35676 #define WMI_BECAP_PHY_GET_HW_MODE_CFG(hw_mode_config_type) WMI_GET_BITS(hw_mode_config_type, 0, 27)
35677 #define WMI_BECAP_PHY_SET_HW_MODE_CFG(hw_mode_config_type, value) WMI_SET_BITS(hw_mode_config_type, 0, 27, value)
35678 #define WMI_BECAP_PHY_GET_MLO_CAP(hw_mode_config_type) WMI_GET_BITS(hw_mode_config_type, 27, 5)
35679 #define WMI_BECAP_PHY_SET_MLO_CAP(hw_mode_config_type, value) WMI_SET_BITS(hw_mode_config_type, 27, 5, value)
35680 
35681 /*
35682  * pdev_id sub-fields for chips that support 802.11BE/MLO
35683  * as part of WMI_MAC_PHY_CAPABILITIES and WMI_MAC_PHY_CAPABILITIES_EXT:
35684  * bits 16:0  - pdev_id
35685  * bits 32:16 - Unique link id across SOCs, got as part of QMI handshake.
35686  */
35687 #define WMI_PHY_GET_PDEV_ID(pdev_id) WMI_GET_BITS(pdev_id, 0, 16)
35688 #define WMI_PHY_SET_PDEV_ID(pdev_id, value) WMI_SET_BITS(pdev_id, 0, 16, value)
35689 #define WMI_PHY_GET_HW_LINK_ID(pdev_id) WMI_GET_BITS(pdev_id, 16, 16)
35690 #define WMI_PHY_SET_HW_LINK_ID(pdev_id, value) WMI_SET_BITS(pdev_id, 16, 16, value)
35691 
35692 #define WMI_SUPPORT_11B_GET(flags) WMI_GET_BITS(flags, 0, 1)
35693 #define WMI_SUPPORT_11B_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
35694 
35695 #define WMI_SUPPORT_11G_GET(flags) WMI_GET_BITS(flags, 1, 1)
35696 #define WMI_SUPPORT_11G_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
35697 
35698 #define WMI_SUPPORT_11A_GET(flags) WMI_GET_BITS(flags, 2, 1)
35699 #define WMI_SUPPORT_11A_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
35700 
35701 #define WMI_SUPPORT_11N_GET(flags) WMI_GET_BITS(flags, 3, 1)
35702 #define WMI_SUPPORT_11N_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
35703 
35704 #define WMI_SUPPORT_11AC_GET(flags) WMI_GET_BITS(flags, 4, 1)
35705 #define WMI_SUPPORT_11AC_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
35706 
35707 #define WMI_SUPPORT_11AX_GET(flags) WMI_GET_BITS(flags, 5, 1)
35708 #define WMI_SUPPORT_11AX_SET(flags, value) WMI_SET_BITS(flags, 5, 1, value)
35709 
35710 #define WMI_SUPPORT_11BE_GET(flags) WMI_GET_BITS(flags, 6, 1)
35711 #define WMI_SUPPORT_11BE_SET(flags, value) WMI_SET_BITS(flags, 6, 1, value)
35712 
35713 #define WMI_MAX_MUBFEE_GET(flags) WMI_GET_BITS(flags, 28, 4)
35714 #define WMI_MAX_MUBFEE_SET(flags, value) WMI_SET_BITS(flags, 28, 4, value)
35715 
35716 /*
35717  * +-----------------------------+------------------------------------+
35718  * | Transmitted VHT Capabilities|         NSS Support of STA         |
35719  * |       Information Field     |    transmitted VHT Capabilites     |
35720  * +---------------+-------------+------+------+------+------+--------+
35721  * |   Supported   |   Extended  |      |      |      |      |        |
35722  * |   Channel     |   NSS BW    |      |      |      |      |        |
35723  * |   WidthSet    |   Support   |20 Mhz|40 Mhz|80 Mhz|160Mhz|80+80Mhz|
35724  * +---------------+-------------+------+------+------+------+--------+
35725  * |        0      |      0      |  1   |  1   |  1   |      |        |
35726  * +---------------+-------------+------+------+------+------+--------+
35727  * |        0      |      1      |  1   |  1   |  1   | 1/2  |        |
35728  * +---------------+-------------+------+------+------+------+--------+
35729  * |        0      |      2      |  1   |  1   |  1   | 1/2  |  1/2   |
35730  * +---------------+-------------+------+------+------+------+--------+
35731  * |        0      |      3      |  1   |  1   |  1   | 3/4  |  3/4   |
35732  * +---------------+-------------+------+------+------+------+--------+
35733  * |        1      |      0      |  1   |  1   |  1   |  1   |        |
35734  * +---------------+-------------+------+------+------+------+--------+
35735  * |        1      |      1      |  1   |  1   |  1   |  1   |  1/2   |
35736  * +---------------+-------------+------+------+------+------+--------+
35737  * |        1      |      2      |  1   |  1   |  1   |  1   |  3/4   |
35738  * +---------------+-------------+------+------+------+------+--------+
35739  * |        1      |      3      |  2   |  2   |  2   |  2   |   1    |
35740  * +---------------+-------------+------+------+------+------+--------+
35741  * |        2      |      0      |  1   |  1   |  1   |  1   |   1    |
35742  * +---------------+-------------+------+------+------+------+--------+
35743  * |        2      |      3      |  2   |  2   |  2   |  1   |   1    |
35744  * +---------------+-------------+------+------+------+------+--------+
35745  */
35746 
35747 /*
35748  *  [0]   : WMI_NSS_RATIO_ENABLE_DISABLE_BITPOS
35749  *  [4:1] : WMI_NSS_RATIO_INFO_BITPOS
35750  */
35751 #define  WMI_NSS_RATIO_ENABLE_DISABLE_BITPOS        0x0
35752 #define  WMI_NSS_RATIO_INFO_BITPOS                  0x1
35753 
35754 /*
35755  * WMI_NSS_RATIO_ENABLE_DISABLE values:
35756  * [0] : 0 - WMI_NSS_RATIO_DISABLE
35757  * [0] : 1 - WMI_NSS_RATIO_ENABLE
35758  */
35759 #define  WMI_NSS_RATIO_DISABLE                      0x0
35760 #define  WMI_NSS_RATIO_ENABLE                       0x1
35761 
35762 /*
35763  * WMI_NSS_RATIO_INFO values:
35764  *  [4:1] : 0000 - WMI_NSS_RATIO_1BY2_NSS
35765  *  [4:1] : 0001 - WMI_NSS_RATIO_3BY4_NSS
35766  *  [4:1] : 0010 - WMI_NSS_RATIO_1_NSS
35767  *  [4:1] : 0011 - WMI_NSS_RATIO_2_NSS
35768  */
35769 #define  WMI_NSS_RATIO_1BY2_NSS                     0x0
35770 #define  WMI_NSS_RATIO_3BY4_NSS                     0x1
35771 #define  WMI_NSS_RATIO_1_NSS                        0x2
35772 #define  WMI_NSS_RATIO_2_NSS                        0x3
35773 
35774 #define WMI_NSS_RATIO_ENABLE_DISABLE_SET(param, value) \
35775     WMI_SET_BITS(param, WMI_NSS_RATIO_ENABLE_DISABLE_BITPOS, 1, value)
35776 #define WMI_NSS_RATIO_ENABLE_DISABLE_GET(dword) \
35777     WMI_GET_BITS(dword, WMI_NSS_RATIO_ENABLE_DISABLE_BITPOS, 1)
35778 
35779 #define WMI_NSS_RATIO_INFO_SET(param, value) \
35780     WMI_SET_BITS(param, WMI_NSS_RATIO_INFO_BITPOS, 4, value)
35781 #define WMI_NSS_RATIO_INFO_GET(dword) \
35782     WMI_GET_BITS(dword, WMI_NSS_RATIO_INFO_BITPOS, 4)
35783 
35784 /*
35785  * 11BE EML Capability Set and Get macros
35786  */
35787 #define WMI_SUPPORT_EMLSR_GET(eml_capability) WMI_GET_BITS(eml_capability, 0, 1)
35788 #define WMI_SUPPORT_EMLSR_SET(eml_capability, value) WMI_SET_BITS(eml_capability, 0, 1, value)
35789 
35790 #define WMI_EMLSR_PADDING_DELAY_GET(eml_capability) WMI_GET_BITS(eml_capability, 1, 3)
35791 #define WMI_EMLSR_PADDING_DELAY_SET(eml_capability, value) WMI_SET_BITS(eml_capability, 1, 3, value)
35792 
35793 #define WMI_EMLSR_TRANSITION_DELAY_GET(eml_capability) WMI_GET_BITS(eml_capability, 4, 3)
35794 #define WMI_EMLSR_TRANSITION_DELAY_SET(eml_capability, value) WMI_SET_BITS(eml_capability, 4, 3, value)
35795 
35796 #define WMI_SUPPORT_EMLMR_GET(eml_capability) WMI_GET_BITS(eml_capability, 7, 1)
35797 #define WMI_SUPPORT_EMLMR_SET(eml_capability, value) WMI_SET_BITS(eml_capability, 7, 1, value)
35798 
35799 #define WMI_EMLMR_DELAY_GET(eml_capability) WMI_GET_BITS(eml_capability, 8, 3)
35800 #define WMI_EMLMR_DELAY_SET(eml_capability, value) WMI_SET_BITS(eml_capability, 8, 3, value)
35801 
35802 #define WMI_TRANSITION_TIMEOUT_GET(eml_capability) WMI_GET_BITS(eml_capability, 11, 4)
35803 #define WMI_TRANSITION_TIMEOUT_SET(eml_capability, value) WMI_SET_BITS(eml_capability, 11, 4, value)
35804 
35805 /*
35806  * 11BE MLD Capability Set and Get macros
35807  */
35808 #define WMI_MAX_NUM_SIMULTANEOUS_LINKS_GET(mld_capability) WMI_GET_BITS(mld_capability, 0, 4)
35809 #define WMI_MAX_NUM_SIMULTANEOUS_LINKS_SET(mld_capability, value) WMI_SET_BITS(mld_capability, 0, 4, value)
35810 
35811 #define WMI_SUPPORT_SRS_GET(mld_capability) WMI_GET_BITS(mld_capability, 4, 1)
35812 #define WMI_SUPPORT_SRS_SET(mld_capability, value) WMI_SET_BITS(mld_capability, 4, 1, value)
35813 
35814 #define WMI_TID_TO_LINK_NEGOTIATION_GET(mld_capability) WMI_GET_BITS(mld_capability, 5, 2)
35815 #define WMI_TID_TO_LINK_NEGOTIATION_SET(mld_capability, value) WMI_SET_BITS(mld_capability, 5, 2, value)
35816 
35817 #define WMI_FREQ_SEPERATION_STR_GET(mld_capability) WMI_GET_BITS(mld_capability, 7, 5)
35818 #define WMI_FREQ_SEPERATION_STR_SET(mld_capability, value) WMI_SET_BITS(mld_capability, 7, 5, value)
35819 
35820 #define WMI_SUPPORT_AAR_GET(mld_capability) WMI_GET_BITS(mld_capability, 12, 1)
35821 #define WMI_SUPPORT_AAR_SET(mld_capability, value) WMI_SET_BITS(mld_capability, 12, 1, value)
35822 
35823 /*
35824  * 11BE Ext MLD Capability Set and Get macros
35825  */
35826 #define WMI_EXT_MLD_OPERATION_PARAMETER_UPDATE_SUPP_GET(ext_mld_capability) WMI_GET_BITS(ext_mld_capability, 0, 1)
35827 #define WMI_EXT_MLD_OPERATION_PARAMETER_UPDATE_SUPP_SET(ext_mld_capability, value) WMI_SET_BITS(ext_mld_capability, 0, 1, value)
35828 
35829 /*
35830  * 11BE MSD Capability Set and Get macros
35831  */
35832 #define WMI_MEDIUM_SYNC_DURATION_GET(msd_capability) WMI_GET_BITS(msd_capability, 0, 8)
35833 #define WMI_MEDIUM_SYNC_DURATION_SET(msd_capability,value) WMI_SET_BITS(msd_capability, 0, 8, value)
35834 
35835 #define WMI_MEDIUM_SYNC_OFDM_ED_THRESHOLD_GET(msd_capability) WMI_GET_BITS(msd_capability, 8, 4)
35836 #define WMI_MEDIUM_SYNC_OFDM_ED_THRESHOLD_SET(msd_capability, value) WMI_SET_BITS(msd_capability, 8, 4, value)
35837 
35838 #define WMI_MEDIUM_SYNC_MAX_NO_TXOPS_GET(msd_capability) WMI_GET_BITS(msd_capability, 12, 4)
35839 #define WMI_MEDIUM_SYNC_MAX_NO_TXOPS_SET(msd_capability, value) WMI_SET_BITS(msd_capability, 12, 4, value)
35840 
35841 typedef struct {
35842     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CAPABILITIES */
35843     /* hw_mode_id - identify a particular set of HW characteristics, as specified
35844      * by the subsequent fields. WMI_MAC_PHY_CAPABILITIES element must be mapped
35845      * to its parent WMI_HW_MODE_CAPABILITIES element using hw_mode_id.
35846      * No particular ordering of WMI_MAC_PHY_CAPABILITIES elements should be assumed,
35847      * though in practice the elements may always be ordered by hw_mode_id */
35848     A_UINT32 hw_mode_id;
35849     /*
35850      * pdev_id starts with 1. pdev_id 1 => phy_id 0, pdev_id 2 => phy_id 1
35851      * hw_link_id: Unique link id across SOCs, got as part of QMI handshake.
35852      * For legacy chips which do not support MLO, these top bits will always
35853      * be set to 0, so it won't impact the legacy chips which treat pdev_id
35854      * as 32 bits.
35855      */
35856     union {
35857         struct {
35858             A_UINT32 pdev_id:16,
35859                      hw_link_id:16;
35860         } wmi_pdev_to_link_map;
35861         A_UINT32 pdev_id;
35862     };
35863     /* phy id. Starts with 0 */
35864     A_UINT32 phy_id;
35865     /* supported modulations and number of MU beamformees */
35866     union {
35867         struct {
35868             A_UINT32 supports_11b:1,
35869                      supports_11g:1,
35870                      supports_11a:1,
35871                      supports_11n:1,
35872                      supports_11ac:1,
35873                      supports_11ax:1,
35874                      supports_11be:1,
35875 
35876                      unused: 21,
35877 
35878                      max_mubfee: 4; /* max MU beamformees supported per MAC */
35879         };
35880         A_UINT32 supported_flags;
35881     };
35882     /* supported bands, enum WLAN_BAND_CAPABILITY */
35883     A_UINT32 supported_bands;
35884     /* ampdu density 0 for no restriction, 1 for 1/4 us, 2 for 1/2 us,
35885      * 3 for 1 us,4 for 2 us, 5 for 4 us, 6 for 8 us,7 for 16 us */
35886     A_UINT32 ampdu_density;
35887     /* max bw supported 2G, enum wmi_channel_width */
35888     A_UINT32 max_bw_supported_2G;
35889     /* WMI HT Capability, WMI_HT_CAP defines */
35890     A_UINT32 ht_cap_info_2G;
35891     /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
35892     A_UINT32 vht_cap_info_2G;
35893     /* VHT Supported MCS Set field Rx/Tx same
35894      * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as follows
35895      * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
35896      * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
35897      * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
35898      * - 3 indicates that n spatial streams is not supported
35899      * - bit [15:0] Each NSS takes 2 bit.
35900      * - bit [23:16] Indicates support for VHT-MCS 10 and 11 for
35901      *   n spatial streams
35902      *       - bit 16 - for NSS 1
35903      *       - bit 17 - for NSS 2
35904      *       - .
35905      *       - .
35906      *       - bit 23 - for NSS 8
35907      *       - bit 24 - indicate whether the VHT-MCS 10-11 specs in bits 23:16
35908      *                  are valid
35909      *   Refer to the WMI_VHT_MAX_MCS_EXT_SS_GET/SET macros.
35910      */
35911     A_UINT32 vht_supp_mcs_2G;
35912     /*HE capability info field of 802.11ax, WMI_HE_CAP defines */
35913     A_UINT32 he_cap_info_2G;
35914     /* HE Supported MCS Set field Rx/Tx same
35915      * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
35916      *     bit 2-0 indicating max HE MCS of NSS1
35917      *     bit 5-3 indicating max HE MCS of NSS2 and so on
35918      * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
35919      *     HE BW less than or equal to 80MHZ is encoded as follows
35920      * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
35921      * - 1 indicates support for VHT-MCS 0-9 for n spatial streams
35922      * - 2 indicates support for VHT-MCS 0-11 for n spatial streams
35923      * - 3 indicates that n spatial streams is not supported
35924      * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
35925      */
35926     A_UINT32 he_supp_mcs_2G;
35927     /* Valid Transmit chain mask */
35928     A_UINT32 tx_chain_mask_2G;
35929     /* Valid Receive chain mask */
35930     A_UINT32 rx_chain_mask_2G;
35931     /* max bw supported 5G, enum wmi_channel_width */
35932     A_UINT32 max_bw_supported_5G;
35933     /* WMI HT Capability, WMI_HT_CAP defines */
35934     A_UINT32 ht_cap_info_5G;
35935     /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
35936     A_UINT32 vht_cap_info_5G;
35937     /* VHT Supported MCS Set field Rx/Tx same
35938      * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as follows
35939      * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
35940      * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
35941      * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
35942      * - 3 indicates that n spatial streams is not supported
35943      * - bit [15:0] Each NSS takes 2 bit.
35944      * - bit [23:16] Indicates support for VHT-MCS 10 and 11 for
35945      *   n spatial streams
35946      *       - bit 16 - for NSS 1
35947      *       - bit 17 - for NSS 2
35948      *       - .
35949      *       - .
35950      *       - bit 23 - for NSS 8
35951      *       - bit 24 - indicate whether the VHT-MCS 10-11 specs in bits 23:16
35952      *                  are valid
35953      *   Refer to the WMI_VHT_MAX_MCS_EXT_SS_GET/SET macros.
35954      */
35955     A_UINT32 vht_supp_mcs_5G;
35956     /*HE capability info field of 802.11ax, WMI_HE_CAP defines */
35957     A_UINT32 he_cap_info_5G;
35958     /* HE Supported MCS Set field Rx/Tx same
35959      * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
35960      *     bit 2-0 indicating max HE MCS of NSS1
35961      *     bit 5-3 indicating max HE MCS of NSS2 and so on
35962      * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
35963      *     HE BW less than or equal to 80MHZ is encoded as follows
35964      * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
35965      * - 1 indicates support for VHT-MCS 0-9 for n spatial streams
35966      * - 2 indicates support for VHT-MCS 0-11 for n spatial streams
35967      * - 3 indicates that n spatial streams is not supported
35968      * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
35969      * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
35970      *     HE BW equal to 80+80 or 160 MHZ encoding is same as above just the
35971      *     lower 16 bits are used for lower 80MHz NSS-MCS supported combo and
35972      *     upper 16 bits are used for upper 80MHz NSS-MCS supported combo
35973      */
35974     A_UINT32 he_supp_mcs_5G;
35975     /* Valid Transmit chain mask */
35976     A_UINT32 tx_chain_mask_5G;
35977     /* Valid Receive chain mask */
35978     A_UINT32 rx_chain_mask_5G;
35979     /* HE capability phy field of 802.11ax, WMI_HE_CAP defines */
35980     A_UINT32 he_cap_phy_info_2G[WMI_MAX_HECAP_PHY_SIZE];
35981     A_UINT32 he_cap_phy_info_5G[WMI_MAX_HECAP_PHY_SIZE];
35982     wmi_ppe_threshold he_ppet2G;
35983     wmi_ppe_threshold he_ppet5G;
35984     /* chainmask table to be used for the MAC */
35985     A_UINT32 chainmask_table_id;
35986     /* PDEV ID to LMAC ID mapping */
35987     A_UINT32 lmac_id;
35988     /* 2nd DWORD of HE capability info field of 802.11ax, support Draft 3+ */
35989     A_UINT32 he_cap_info_2G_ext;
35990     A_UINT32 he_cap_info_5G_ext;
35991     /*
35992      * bit 0     : Indicated support for RX 1xLTF + 0.4us
35993      * bit 1     : Indicates support for RX 2xLTF + 0.4us
35994      * bit 2     : Indicates support for 2xLTF in 160/80+80 MHz HE PPDU
35995      * bit[31:3] : Reserved
35996      * Refer to WMI_HE_CAP_xx_LTF_xxx_SUPPORT_GET/SET macros
35997      */
35998     A_UINT32 he_cap_info_internal;
35999 
36000     A_UINT32 wireless_modes; /* REGDMN MODE, see REGDMN_MODE_ enum */
36001     A_UINT32 low_2ghz_chan_freq;  /* units = MHz */
36002     A_UINT32 high_2ghz_chan_freq; /* units = MHz */
36003     A_UINT32 low_5ghz_chan_freq;  /* units = MHz */
36004     A_UINT32 high_5ghz_chan_freq; /* units = MHz */
36005 
36006     /*
36007      * NSS ratio to be sent to Host during boot-up capabilities negotiation
36008      *
36009      * Bit 0 - refer to WMI_NSS_RATIO_ENABLE_DISABLE_ definitions
36010      * [0]    :  0 - WMI_NSS_RATIO_DISABLE
36011      * [0]    :  1 - WMI_NSS_RATIO_ENABLE
36012      *
36013      * Bits 4:1 - refer to WMI_NSS_RATIO_INFO_ definitions
36014      * [4:1]  : 0000 - WMI_NSS_RATIO_1BY2_NSS
36015      * [4:1]  : 0001 - WMI_NSS_RATIO_3BY4_NSS
36016      * [4:1]  : 0010 - WMI_NSS_RATIO_1_NSS
36017      * [4:1]  : 0011 - WMI_NSS_RATIO_2_NSS
36018      *
36019      * [31:5] : Reserved
36020      */
36021     A_UINT32 nss_ratio;
36022     /**************************************************************************
36023      * DON'T ADD ANY FURTHER FIELDS HERE -
36024      * It would cause the size of the READY_EXT message within some targets
36025      * to exceed the size of the buffer used for the message.
36026      **************************************************************************/
36027 } WMI_MAC_PHY_CAPABILITIES;
36028 
36029 typedef struct {
36030     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CAPABILITIES_EXT */
36031     /* hw_mode_id - identify a particular set of HW characteristics, as specified
36032      * by the subsequent fields. WMI_MAC_PHY_CAPABILITIES element must be mapped
36033      * to its parent WMI_HW_MODE_CAPABILITIES element using hw_mode_id.
36034      * No particular ordering of WMI_MAC_PHY_CAPABILITIES elements should be assumed,
36035      * though in practice the elements may always be ordered by hw_mode_id */
36036     A_UINT32 hw_mode_id;
36037     /*
36038      * pdev_id starts with 1. pdev_id 1 => phy_id 0, pdev_id 2 => phy_id 1
36039      * hw_link_id: Unique link id across SOCs, got as part of QMI handshake.
36040      * For legacy chips which do not support MLO, these top bits will always
36041      * be set to 0, so it won't impact the legacy chips which treat pdev_id
36042      * as 32 bits.
36043      */
36044     union {
36045         struct {
36046             A_UINT32 pdev_id:16,
36047                      hw_link_id:16;
36048         } wmi_pdev_to_link_map;
36049         A_UINT32 pdev_id;
36050     };
36051     /* phy id. Starts with 0 */
36052     A_UINT32 phy_id;
36053     A_UINT32 wireless_modes_ext; /* REGDMN MODE EXT, see REGDMN_MODE_ enum */
36054 
36055     /**************************************************************************
36056      * following new params for 802.11be, but under development
36057      **************************************************************************/
36058     /* EHT capability mac info field of 802.11be */
36059     A_UINT32 eht_cap_mac_info_2G[WMI_MAX_EHTCAP_MAC_SIZE];
36060     A_UINT32 eht_cap_mac_info_5G[WMI_MAX_EHTCAP_MAC_SIZE];
36061     A_UINT32 eht_supp_mcs_2G; /* deprecated (c.f. eht_supp_mcs_ext_2G) */
36062     A_UINT32 eht_supp_mcs_5G; /* deprecated (c.f. eht_supp_mcs_ext_5G) */
36063     /* EHT capability phy field of 802.11be, WMI_EHT_CAP defines */
36064     A_UINT32 eht_cap_phy_info_2G[WMI_MAX_EHTCAP_PHY_SIZE];
36065     A_UINT32 eht_cap_phy_info_5G[WMI_MAX_EHTCAP_PHY_SIZE];
36066     wmi_ppe_threshold eht_ppet2G;
36067     wmi_ppe_threshold eht_ppet5G;
36068     A_UINT32 eht_cap_info_internal;
36069     /* eht_supp_mcs_ext_2G, eht_supp_mcs_ext_5G:
36070      * array index interpretation:
36071      * 0 – index indicated EHT-MCS map for 20Mhz only sta (4 bytes valid)
36072      * 1 – index for <= 80MHz bw (only 3 bytes are valid and other is reserved)
36073      * 2 – index for 160Mhz bw (only 3 bytes are valid and other is reserved)
36074      * 3 – index for 320Mhz bw (only 3 bytes are valid and other is reserved)
36075      *
36076      * The format of the data stored in each array index element is defined
36077      * by IEEE802.11 9.4.2.295c.4
36078      * For example, for the 20 MHz / index 0 element:
36079      *     B0 -- B3: Rx Max Nss that Supports EHT-MCS 0–7
36080      *     B4 -- B7: Tx Max Nss that Supports EHT-MCS 0–7
36081      *     B8 -- B11: Rx Max Nss that Supports EHT-MCS 8–9
36082      *     B12 -- B15: Tx Max Nss that Supports EHT-MCS 8–9
36083      *     B16 -- B19: Rx Max Nss that Supports EHT-MCS 10–11
36084      *     B20 -- B23: Tx Max Nss that Supports EHT-MCS 10–11
36085      *     B24 -- B27: Rx Max Nss that Supports EHT-MCS 12–13
36086      *     B28 -- B31: Tx Max Nss that Supports EHT-MCS 12–13
36087      */
36088     A_UINT32 eht_supp_mcs_ext_2G[WMI_MAX_EHT_SUPP_MCS_2G_SIZE];
36089     A_UINT32 eht_supp_mcs_ext_5G[WMI_MAX_EHT_SUPP_MCS_5G_SIZE];
36090     union {
36091         struct {
36092             A_UINT32 emlsr_support:1,
36093                      emlsr_padding_delay:3,
36094                      emlsr_transition_delay:3,
36095                      emlmr_support:1,
36096                      emlmr_delay:3,
36097                      transition_timeout:4,
36098                      reserved: 17;
36099         };
36100         A_UINT32 eml_capability;
36101     };
36102     union {
36103         struct {
36104             A_UINT32 max_num_simultaneous_links:4,
36105                      srs_support:1,
36106                      tid_to_link_negotiation_support:2, /* Set to 0 if TID-to-link mapping is not supported by the MLD.
36107                                                          * Set to 1 if MLD supports the mapping of each TID to the same or different link set.
36108                                                          * Set to 2 if MLD only supports the mapping of all TIDs to the same link set.
36109                                                          * Value  3 is reserved */
36110                      freq_separation_str:5,
36111                      aar_support:1,
36112                      reserved2: 19;
36113         };
36114         A_UINT32 mld_capability;
36115     };
36116     union {
36117         struct {
36118             A_UINT32
36119                 op_update_para_support:1, /* Indicates support of operation parameter update negotiation */
36120                 reserved3: 31;
36121         };
36122         A_UINT32 ext_mld_capability;
36123     };
36124     union {
36125         struct {
36126             A_UINT32 medium_sync_duration:8,
36127                      medium_sync_ofdm_ed_threshold:4,
36128                      medium_sync_max_no_txops:4,
36129                      reserved4: 16;
36130         };
36131         A_UINT32 msd_capability;
36132     };
36133 } WMI_MAC_PHY_CAPABILITIES_EXT;
36134 
36135 typedef struct {
36136     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HW_MODE_CAPABILITIES */
36137     /* hw_mode_id - identify a particular set of HW characteristics,
36138      * as specified by the subsequent fields */
36139     A_UINT32 hw_mode_id;
36140     /* BIT0 represents phy_id 0, BIT1 represent phy_id 1 and so on
36141      * number of bits set in phy_id_map represents number of WMI_MAC_PHY_CAPABILITIES TLV's
36142      * one for each active PHY for current HW mode identified by hw_mode_id. For example for
36143      * DBS/SBS mode there will be 2 WMI_MAC_PHY_CAPABILITIES TLVs and for single MAC modes it
36144      * will be 1 WMI_MAC_PHY_CAPABILITIES TLVs */
36145     A_UINT32 phy_id_map;
36146     /* hw_mode_config_type
36147      * Identify a particular type of HW mode such as SBS, DBS etc.
36148      * Refer to WMI_HW_MODE_CONFIG_TYPE values.
36149      *
36150      * Use bits 31:27 of hw_mode_config_type for Per HW mode MLO capability
36151      * flags.
36152      * Refer to WMI_MLO_CAP_FLAG_XXX. For legacy chips which do not support
36153      * MLO, these top bits will always be set to 0, so it won't impact the
36154      * legacy chips which treat hw_mode_config_type as 32 bits.
36155      */
36156     union {
36157         struct {
36158             A_UINT32 hw_mode_config   :27,
36159                      mlo_cap_flag     :5; /* see WMI_MLO_CAP_FLAG_ defs */
36160         };
36161         A_UINT32 hw_mode_config_type;
36162     };
36163 
36164     /**************************************************************************
36165      * DON'T ADD ANY FURTHER FIELDS HERE -
36166      * It would cause the size of the READY_EXT message within some targets
36167      * to exceed the size of the buffer used for the message.
36168      **************************************************************************/
36169 } WMI_HW_MODE_CAPABILITIES;
36170 
36171 /*
36172  * The following macros are for the bitfields witihin the supported flags field
36173  * of WMI_MAC_PHY_CHAINMASK_CAPABILITY:
36174  * Capabilities for the chainmask
36175  */
36176 
36177 #define WMI_SUPPORT_CHAN_WIDTH_20_GET(flags) WMI_GET_BITS(flags, 0, 1)
36178 #define WMI_SUPPORT_CHAN_WIDTH_20_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
36179 
36180 #define WMI_SUPPORT_CHAN_WIDTH_40_GET(flags) WMI_GET_BITS(flags, 1, 1)
36181 #define WMI_SUPPORT_CHAN_WIDTH_40_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
36182 
36183 #define WMI_SUPPORT_CHAN_WIDTH_80_GET(flags) WMI_GET_BITS(flags, 2, 1)
36184 #define WMI_SUPPORT_CHAN_WIDTH_80_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
36185 
36186 #define WMI_SUPPORT_CHAN_WIDTH_160_GET(flags) WMI_GET_BITS(flags, 3, 1)
36187 #define WMI_SUPPORT_CHAN_WIDTH_160_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
36188 
36189 #define WMI_SUPPORT_CHAN_WIDTH_80P80_GET(flags) WMI_GET_BITS(flags, 4, 1)
36190 #define WMI_SUPPORT_CHAN_WIDTH_80P80_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
36191 
36192 #define WMI_SUPPORT_AGILE_SPECTRAL_GET(flags) WMI_GET_BITS(flags, 5, 1)
36193 #define WMI_SUPPORT_AGILE_SPECTRAL_SET(flags, value) WMI_SET_BITS(flags, 5, 1, value)
36194 
36195 #define WMI_SUPPORT_AGILE_SPECTRAL_160_GET(flags) WMI_GET_BITS(flags, 6, 1)
36196 #define WMI_SUPPORT_AGILE_SPECTRAL_160_SET(flags, value) WMI_SET_BITS(flags, 6, 1, value)
36197 
36198 #define WMI_SUPPORT_ADFS_160_GET(flags) WMI_GET_BITS(flags, 7, 1)
36199 #define WMI_SUPPORT_ADFS_160_SET(flags, value) WMI_SET_BITS(flags, 7, 1, value)
36200 
36201 #define WMI_SUPPORT_CHAN_WIDTH_320_GET(flags) WMI_GET_BITS(flags, 8, 1)
36202 #define WMI_SUPPORT_CHAN_WIDTH_320_SET(flags, value) WMI_SET_BITS(flags, 8, 1, value)
36203 
36204 #define WMI_SUPPORT_ADFS_320_GET(flags) WMI_GET_BITS(flags, 9, 1)
36205 #define WMI_SUPPORT_ADFS_320_SET(flags, value) WMI_SET_BITS(flags, 9, 1, value)
36206 
36207 #define WMI_SUPPORT_AGILE_SPECTRAL_320_GET(flags) WMI_GET_BITS(flags, 10, 1)
36208 #define WMI_SUPPORT_AGILE_SPECTRAL_320_SET(flags, value) WMI_SET_BITS(flags, 10, 1, value)
36209 
36210 #define WMI_SUPPORT_CHAIN_MASK_2G_GET(flags) WMI_GET_BITS(flags, 27, 1)
36211 #define WMI_SUPPORT_CHAIN_MASK_2G_SET(flags, value) WMI_SET_BITS(flags, 27, 1, value)
36212 
36213 #define WMI_SUPPORT_CHAIN_MASK_5G_GET(flags) WMI_GET_BITS(flags, 28, 1)
36214 #define WMI_SUPPORT_CHAIN_MASK_5G_SET(flags, value) WMI_SET_BITS(flags, 28, 1, value)
36215 
36216 #define WMI_SUPPORT_CHAIN_MASK_TX_GET(flags) WMI_GET_BITS(flags, 29, 1)
36217 #define WMI_SUPPORT_CHAIN_MASK_TX_SET(flags, value) WMI_SET_BITS(flags, 29, 1, value)
36218 
36219 #define WMI_SUPPORT_CHAIN_MASK_RX_GET(flags) WMI_GET_BITS(flags, 30, 1)
36220 #define WMI_SUPPORT_CHAIN_MASK_RX_SET(flags, value) WMI_SET_BITS(flags, 30, 1, value)
36221 
36222 #define WMI_SUPPORT_CHAIN_MASK_ADFS_GET(flags) WMI_GET_BITS(flags, 31, 1)
36223 #define WMI_SUPPORT_CHAIN_MASK_ADFS_SET(flags, value) WMI_SET_BITS(flags, 31, 1, value)
36224 
36225 /** Definition of valid chainmask and associated capabilities */
36226 typedef struct {
36227     A_UINT32 tlv_header;/* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CHAINMASK_CAPABILITY */
36228      /* supported flags: Capabilities for this chianmask*/
36229     union {
36230         struct {
36231             A_UINT32 supports_chan_width_20:1,
36232                      supports_chan_width_40:1,
36233                      supports_chan_width_80:1,
36234                      supports_chan_width_160:1,
36235                      supports_chan_width_80P80:1,
36236                      supports_agile_spectral:1,
36237                      supports_agile_spectral_160:1,
36238                      supports_aDFS_160:1,
36239                      supports_chan_width_320:1,
36240                      supports_aDFS_320:1,
36241                      supports_agile_spectral_320:1,
36242                      reserved:16, /* bits 26:11 */
36243                      chain_mask_2G:1,
36244                      chain_mask_5G:1,
36245                      chain_mask_tx:1,
36246                      chain_mask_rx:1,
36247                      supports_aDFS:1; /* agile DFS */
36248         };
36249         A_UINT32 supported_flags;
36250     };
36251     A_UINT32 chainmask;
36252 
36253     /**************************************************************************
36254      * DON'T ADD ANY FURTHER FIELDS HERE -
36255      * It would cause the size of the READY_EXT message within some targets
36256      * to exceed the size of the buffer used for the message.
36257      **************************************************************************/
36258 } WMI_MAC_PHY_CHAINMASK_CAPABILITY;
36259 
36260 typedef struct {
36261     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CHAINMASK_COMBO */
36262     A_UINT32 chainmask_table_id;
36263     /* Number of valid Chainmask in the table */
36264     A_UINT32 num_valid_chainmask;
36265 
36266     /**************************************************************************
36267      * DON'T ADD ANY FURTHER FIELDS HERE -
36268      * It would cause the size of the READY_EXT message within some targets
36269      * to exceed the size of the buffer used for the message.
36270      **************************************************************************/
36271 /*
36272  * This TLV is followed by the below TLVs:
36273  * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask]
36274  */
36275 } WMI_MAC_PHY_CHAINMASK_COMBO;
36276 
36277 typedef struct {
36278     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SOC_MAC_PHY_HW_MODE_CAPS */
36279     /* num HW modes */
36280     A_UINT32 num_hw_modes;
36281     /* number of unique chainmask combo tables */
36282     A_UINT32 num_chainmask_tables;
36283 
36284     /**************************************************************************
36285      * DON'T ADD ANY FURTHER FIELDS HERE -
36286      * It would cause the size of the READY_EXT message within some targets
36287      * to exceed the size of the buffer used for the message.
36288      **************************************************************************/
36289 
36290 /*
36291  * This TLV is followed by the below TLVs:
36292  *
36293  * WMI_HW_MODE_CAPABILITIES soc_hw_mode_caps[num_hw_modes]
36294  *
36295  * (intervening TLVs, e.g. HW_MODE_CAPS, MAC_PHY_CAPS, HAL_REG_CAPS)
36296  *
36297  * WMI_MAC_PHY_CHAINMASK_COMBO mac_phy_chainmask_combo[num_chainmask_tables]
36298  * // number of chainmasks specified in mac_phy_chainmask_combo[0]
36299  * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask0]
36300  * // number of chainmasks specified in mac_phy_chainmask_combo[1]
36301  * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask1]
36302  * // number of chainmasks specified in mac_phy_chainmask_combo[2]
36303  * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask2]
36304  * etc.
36305  */
36306 } WMI_SOC_MAC_PHY_HW_MODE_CAPS;
36307 
36308 /*Below are Reg caps per PHY. Please note PHY ID starts with 0.*/
36309 typedef struct {
36310     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HAL_REG_CAPABILITIES_EXT */
36311     /* phy id */
36312     A_UINT32 phy_id;
36313     /* regdomain value specified in EEPROM */
36314     A_UINT32 eeprom_reg_domain;
36315     /* regdomain */
36316     A_UINT32 eeprom_reg_domain_ext;
36317     /* CAP1 capabilities bit map, see REGDMN_CAP1_ defines */
36318     A_UINT32 regcap1;
36319     /* REGDMN EEPROM CAP, see REGDMN_EEPROM_EEREGCAP_ defines */
36320     A_UINT32 regcap2;
36321     /* REGDMN MODE, see REGDMN_MODE_ enum */
36322     A_UINT32 wireless_modes;
36323     A_UINT32 low_2ghz_chan;  /* freq in MHz */
36324     A_UINT32 high_2ghz_chan; /* freq in MHz */
36325     A_UINT32 low_5ghz_chan;  /* freq in MHz */
36326     A_UINT32 high_5ghz_chan; /* freq in MHz */
36327     /**************************************************************************
36328      * DON'T ADD ANY FURTHER FIELDS HERE -
36329      * It would cause the size of the READY_EXT message within some targets
36330      * to exceed the size of the buffer used for the message.
36331      **************************************************************************/
36332 } WMI_HAL_REG_CAPABILITIES_EXT;
36333 
36334 typedef struct {
36335     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HAL_REG_CAPABILITIES_EXT2 */
36336     /* phy id */
36337     A_UINT32 phy_id;
36338     /* regdomain value specified in EEPROM */
36339     A_UINT32 wireless_modes_ext;
36340     A_UINT32 low_2ghz_chan_ext;  /* freq in MHz */
36341     A_UINT32 high_2ghz_chan_ext; /* freq in MHz */
36342     A_UINT32 low_5ghz_chan_ext;  /* freq in MHz */
36343     A_UINT32 high_5ghz_chan_ext; /* freq in MHz */
36344 } WMI_HAL_REG_CAPABILITIES_EXT2;
36345 
36346 /*
36347  * TWT service capability bitmap in wmi_twt_caps_params TLV
36348  * within WMI_SERVICE_READY_EXT2_EVENTID message
36349  */
36350 typedef enum {
36351     WMI_TWT_STA_SYNC_EVENT_CAP = 1, /* STA TWT: FW internal errors reported using sync WMI_TWT_ACK_EVENTID */
36352 
36353     /* Add new TWT Caps above */
36354     WMI_TWT_MAX_CAP = 32,
36355 } WMI_TWT_CAPS_BITMAP;
36356 
36357 typedef struct {
36358     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_caps_param */
36359 
36360     /* twt_capability_bitmap
36361      * TWT Capabilities - refer to WMI_TWT_CAPS_BITMAP for the meaning of
36362      * the bits within the bitmap
36363      */
36364     A_UINT32 twt_capability_bitmap;
36365 } wmi_twt_caps_params;
36366 
36367 /*
36368  * This TLV used for Scan Radio RDP
36369  * We have an RDP which supports Multiband-Frequency (2 GHz, 5 GHz and 6 GHz)
36370  * on a single radio.
36371  * The AP acts as a special VAP. There will not be WMI_VDEV_UP_CMD.
36372  * This radio is used only for scanning purpose and to send few MGMT frames.
36373  * The DFS feature is disabled on this scan radio, since there will not be
36374  * much TX traffic.
36375  * The Host has to disable CAC timer because DFS feature not supported here.
36376  * In order to know about the scan radio RDP, DFS disabled case and
36377  * SCAN BLANKING support, the target has to send this information to Host
36378  * per pdev via WMI_SERVICE_READY_EXT2_EVENT.
36379  * The target is notified of the special scan VAP by the flags variable
36380  * in the WMI_CREATE_CMD.
36381  */
36382 typedef struct {
36383     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SCAN_RADIO_CAPABILITIES_EXT2 */
36384     A_UINT32 phy_id;
36385     /*
36386      * Bit 0:
36387      *     1 - SCAN_RADIO supported  0 - SCAN_RADIO  not supported
36388      *     Refer to WMI_SCAN_RADIO_CAP_SCAN_RADIO_FLAG_SET, GET macros
36389      * Bit 1:
36390      *     1 - DFS enabled           0 - DFS disabled
36391      *     Refer to WMI_SCAN_RADIO_CAP_DFS_FLAG_SET, GET macros
36392      * Bit 2:
36393      *     1 - SCAN RADIO blanking supported
36394      *     0 - SCAN RADIO blanking not supported
36395      *     Refer to WMI_SCAN_RADIO_CAP_BLANKING_SUPPORT_SET, GET macros
36396      * [3:31] reserved
36397      */
36398     A_UINT32 flags;
36399 } WMI_SCAN_RADIO_CAPABILITIES_EXT2;
36400 
36401 #define WMI_SCAN_RADIO_CAP_SCAN_RADIO_FLAG_GET(flag)         WMI_GET_BITS(flag, 0, 1)
36402 #define WMI_SCAN_RADIO_CAP_SCAN_RADIO_FLAG_SET(flag, val)    WMI_SET_BITS(flag, 0, 1, val)
36403 
36404 #define WMI_SCAN_RADIO_CAP_DFS_FLAG_GET(flag)                WMI_GET_BITS(flag, 1, 1)
36405 #define WMI_SCAN_RADIO_CAP_DFS_FLAG_SET(flag, val)           WMI_SET_BITS(flag, 1, 1, val)
36406 
36407 #define WMI_SCAN_RADIO_CAP_BLANKING_SUPPORT_GET(flag)        WMI_GET_BITS(flag, 2, 1)
36408 #define WMI_SCAN_RADIO_CAP_BLANKING_SUPPORT_SET(flag, val)   WMI_SET_BITS(flag, 2, 1, val)
36409 
36410 typedef struct {
36411     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SOC_HAL_REG_CAPABILITIES */
36412     A_UINT32 num_phy;
36413     /* num_phy WMI_HAL_REG_CAPABILITIES_EXT TLV's */
36414 
36415     /**************************************************************************
36416      * DON'T ADD ANY FURTHER FIELDS HERE -
36417      * It would cause the size of the READY_EXT message within some targets
36418      * to exceed the size of the buffer used for the message.
36419      **************************************************************************/
36420 } WMI_SOC_HAL_REG_CAPABILITIES;
36421 
36422 typedef struct {
36423     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_OEM_DMA_RING_CAPABILITIES */
36424     A_UINT32 pdev_id;
36425     A_UINT32 min_num_ptr;
36426     /* Minimum number of pointers in the OEM DMA ring for this pdev */
36427     A_UINT32 min_buf_size;
36428     /* Minimum size in bytes of each buffer in the OEM DMA ring */
36429     A_UINT32 min_buf_align;
36430     /* Minimum alignment in bytes of each buffer in the OEM DMA ring */
36431 
36432     /**************************************************************************
36433      * DON'T ADD ANY FURTHER FIELDS HERE -
36434      * It would cause the size of the READY_EXT message within some targets
36435      * to exceed the size of the buffer used for the message.
36436      **************************************************************************/
36437 } WMI_OEM_DMA_RING_CAPABILITIES;
36438 
36439 typedef enum {
36440     WMI_SAR_VERSION_0_ORIGINAL    = 0x00,
36441     WMI_SAR_VERSION_1_FULL_TABLE  = 0x01,
36442     WMI_SAR_VERSION_2_DBS_SAR     = 0x02,
36443     WMI_SAR_VERSION_3_SBS_SAR     = 0x03,
36444 
36445     WMI_SAR_VERSION_SMART_TX      = 0x04,
36446     WMI_SAR_VERSION_TAS           = 0x05,
36447 
36448     WMI_SAR_VERSION_INVALID       = 0x80
36449 } wmi_sar_version_t;
36450 
36451 typedef struct {
36452     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SAR_CAPABILITIES*/
36453     /* sar version in bdf */
36454     A_UINT32 active_version; /* contains a wmi_sar_version_t value */
36455 
36456     /**************************************************************************
36457      * DON'T ADD ANY FURTHER FIELDS HERE -
36458      * It would cause the size of the READY_EXT message within some targets
36459      * to exceed the size of the buffer used for the message.
36460      **************************************************************************/
36461 } WMI_SAR_CAPABILITIES;
36462 
36463 typedef enum {
36464     WMI_SAR_FLAG_NONE = 0,
36465     WMI_SAR_SET_CTL_GROUPING_DISABLE,
36466     WMI_SAR_DBS_WITH_BT_DISABLE,
36467     WMI_SAR_FLAG_MAX,
36468 } wmi_sar_flags;
36469 
36470 typedef struct {
36471     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_flags*/
36472     /* sar flags in bdf */
36473     A_UINT32 sar_flags; /* refer to enum wmi_sar_flags */
36474 } wmi_sar_flag_tlv_param;
36475 
36476 typedef struct {
36477     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_parameters_tlv */
36478     /** global default adaptive dwell mode, used when WMI_SCAN_DWELL_MODE_DEFAULT */
36479     A_UINT32 default_adaptive_dwell_mode;
36480    /** the weight to calculate the average low pass filter for channel congestion. 0-100 */
36481     A_UINT32 adapative_lpf_weight;
36482    /** interval to monitor passive scan in msec */
36483     A_UINT32 passive_monitor_interval_ms;
36484    /** % of wifi activity to switch from passive to active 0-100 */
36485     A_UINT32 wifi_activity_threshold_pct;
36486 } wmi_scan_adaptive_dwell_parameters_tlv;
36487 
36488 typedef struct {
36489     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_config_fixed_param */
36490     /* globally enable/disable adaptive dwell */
36491     A_UINT32 enable;
36492     /** pdev_id for identifying the MAC
36493      * See macros starting with WMI_PDEV_ID_ for values.
36494      * In non-DBDC case host should set it to 0
36495      */
36496     A_UINT32 pdev_id;
36497 /**
36498  * followed by TLV (tag length value) parameters array
36499  * The TLV's are:
36500  * wmi_scan_adaptive_dwell_parameters_tlv param[]; (0 or 1 elements)
36501  */
36502 } wmi_scan_adaptive_dwell_config_fixed_param;
36503 
36504 typedef struct {
36505     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_dbs_duty_cycle_param_tlv */
36506     /**  module_id **/
36507     A_UINT32 module_id;
36508    /** number of dbs scans */
36509     A_UINT32 num_dbs_scans;
36510    /** number of non-dbs scans */
36511     A_UINT32 num_non_dbs_scans;
36512 } wmi_scan_dbs_duty_cycle_tlv_param;
36513 
36514 typedef struct {
36515     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_dbs_duty_cycle_fixed_param */
36516     /* number of scan client dutycycle param elements */
36517     A_UINT32 num_clients;
36518     /** pdev_id for identifying the MAC
36519      * See macros starting with WMI_PDEV_ID_ for values.
36520      * In non-DBDC case host should set it to 0
36521      */
36522     A_UINT32 pdev_id;
36523 /**
36524  * followed by TLV (tag length value) parameters array
36525  * The TLV's are:
36526  * wmi_scan_selection_duty_cycle_tlv_param[num_clients];
36527  */
36528 } wmi_scan_dbs_duty_cycle_fixed_param;
36529 
36530 typedef struct {
36531     /** TLV tag and len; tag equals
36532      *  WMITLV_TAG_STRUC_wmi_therm_throt_level_config_info */
36533     A_UINT32 tlv_header;
36534     /**
36535       * temperature sensor value in celsius when to exit to lower zone,
36536       * this value can be lower than HWM of lower zone as zone overlapping
36537       * is permitted by design to provide hysteresis
36538       */
36539     A_UINT32 temp_lwm;
36540     /**
36541       * temperature sensor value in celsius when to exit to higher zone,
36542       * this value can be higher than LWM of higher zone as zone overlapping
36543       * is permitted by design to provide hysteresis
36544       */
36545     A_UINT32 temp_hwm;
36546     A_UINT32 dc_off_percent; /* duty cycle off percent 0-100. 0 means no off, 100 means no on (shutdown the phy) */
36547     /** Disable only the transmit queues in firmware that have lower priority than value defined by prio
36548        *    Prioritization:
36549        *    0 = disable all data tx queues, No Prioritization defined
36550        *    1 = disable BK tx queue
36551        *    2 = disable BK+BE tx queues
36552        *    3 = disable BK+BE+VI tx queues
36553        */
36554     A_UINT32 prio;
36555 } wmi_therm_throt_level_config_info;
36556 
36557 typedef enum {
36558     WMI_THERMAL_TEMP_RANGE_STATS_NONE = 0,
36559     WMI_THERMAL_TEMP_RANGE_STATS_INIT,
36560     WMI_THERMAL_TEMP_RANGE_STATS_REQUEST,
36561     WMI_THERMAL_TEMP_RANGE_STATS_CLEAR,
36562     WMI_THERMAL_STATS_CURRENT_ALL_SENSORS_TEMP,
36563 } wmi_thermal_stats_action;
36564 
36565 typedef struct {
36566     /** TLV tag and len; tag equals
36567      * WMITLV_TAG_STRUC_wmi_thermal_stats_cmd_fixed_param
36568      */
36569     A_UINT32 tlv_header;
36570     /*
36571      * Configure thermal temperature offset value for capturing
36572      * thermal stats in thermal range.
36573      * FW already has thermal throttling threshold temperature in BDF.
36574      * Thermal STATS start capturing from temperature threshold to
36575      * temperature threshold + offset.
36576      * If thermal offset is 0 then thermal STATS capture is disabled.
36577      *
36578      * Units of thermal_offset are degrees Celsius.
36579      */
36580     A_UINT32 thermal_offset;
36581     A_UINT32 thermal_action; /* refer to enum wmi_thermal_stats_action */
36582 } wmi_thermal_stats_cmd_fixed_param;
36583 
36584 typedef enum {
36585     WMI_THERMAL_CLIENT_UNSPECIFIED = 0,
36586     WMI_THERMAL_CLIENT_APPS        = 1,
36587     WMI_THERMAL_CLIENT_WPSS        = 2,
36588     WMI_THERMAL_CLIENT_FW          = 3,
36589     WMI_THERMAL_CLIENT_MAX
36590 } WMI_THERMAL_MITIGATION_CLIENTS;
36591 
36592 #define WMI_THERMAL_CLIENT_MAX_PRIORITY 10
36593 
36594 typedef struct {
36595     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_therm_throt_config_request_fixed_param */
36596     A_UINT32 pdev_id;          /* config for each pdev */
36597     A_UINT32 enable;           /* 0:disable, 1:enable */
36598     A_UINT32 dc;               /* duty cycle in ms */
36599     A_UINT32 dc_per_event;     /* how often (after how many duty cycles) the FW sends stats to host */
36600     A_UINT32 therm_throt_levels; /* Indicates the number of thermal zone configuration */
36601     A_UINT32 client_id;        /* Indicates the client from whom the request is being forwarded to FW. Refer to WMI_THERMAL_MITIGATION_CLIENTS. */
36602     A_UINT32 priority;         /* Indicates the priority, higher the value, higher the priority. Varies from 1 to WMI_THERMAL_CLIENT_MAX_PRIORITY. */
36603     /*
36604      * Following this structure is the TLV:
36605      * struct wmi_therm_throt_level_config_info therm_throt_level_config_info[therm_throt_levels];
36606      */
36607 } wmi_therm_throt_config_request_fixed_param;
36608 
36609 typedef enum {
36610     /* no throttling */
36611     WMI_THERMAL_FULLPERF        = 0,
36612     /* throttling tx to do thermal mitigation */
36613     WMI_THERMAL_MITIGATION      = 1,
36614     /* shut down the tx completely */
36615     WMI_THERMAL_SHUTOFF         = 2,
36616     /* THERMAL_SHUTDOWN_TGT
36617      * The target is over the temperature limit even with tx shut off.
36618      * The target will be shut down entirely to control the temperature.
36619      */
36620     WMI_THERMAL_SHUTDOWN_TGT    = 3,
36621 } WMI_THERMAL_THROT_LEVEL;
36622 
36623 #define WMI_THERMAL_STATS_TEMP_THRESH_LEVEL_MAX 5
36624 
36625 /** FW response with the stats event id for every pdev and zones */
36626 typedef struct {
36627     /*  TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_therm_throt_stats_event_fixed_param */
36628     A_UINT32 tlv_header;
36629     A_UINT32 pdev_id;            /* stats for corresponding pdev*/
36630     A_UINT32 temp;               /* Temperature reading in celsius */
36631     A_UINT32 level;              /* Current thermal throttling level -
36632                                   * contains a WMI_THERMAL_THROT_LEVEL value. */
36633     A_UINT32 therm_throt_levels; /* number of levels in therm_throt_level_stats_info */
36634     /* This TLV is followed by another TLV of array of structs
36635      * wmi_therm_throt_level_stats_info therm_throt_level_stats_info[therm_throt_levels];
36636      * wmi_thermal_throt_temp_range_stats temp_range_stats[therm_throt_levels];
36637      */
36638 } wmi_therm_throt_stats_event_fixed_param;
36639 
36640 typedef struct {
36641     /** TLV tag and len; tag equals
36642      *  WMITLV_TAG_STRUC_wmi_therm_throt_level_stats_info */
36643     A_UINT32 tlv_header;
36644     A_UINT32 level_count; /* count of each time thermal throttling entered this state */
36645     A_UINT32 dc_count;    /* total number of duty cycles spent in this state. */
36646                           /* this number increments by one each time we are in this state and we finish one full duty cycle. */
36647 } wmi_therm_throt_level_stats_info;
36648 
36649 typedef struct {
36650     /** TLV tag and len; tag equals
36651      *  WMITLV_TAG_STRUC_wmi_thermal_throt_temp_range_stats
36652      */
36653     A_UINT32 tlv_header;
36654     /**
36655      * Temperature range to capture thermal stats between start to end
36656      * temperature level.
36657      */
36658     A_UINT32 start_temp_level; /* unit in degC */
36659     A_UINT32 end_temp_level;   /* unit in degC */
36660 
36661     /** Total time spent on each thermal stats level, units are milliseconds. */
36662     A_UINT32 total_time_ms_lo;
36663     A_UINT32 total_time_ms_hi;
36664     /**
36665      * Thermal stats counter for every time thermal stats level enters
36666      * this temperature range.
36667      */
36668     A_UINT32 num_entry;
36669 } wmi_thermal_throt_temp_range_stats;
36670 
36671 
36672 typedef enum {
36673     WMI_REG_EXT_FCC_MIDBAND = 0,
36674     WMI_REG_EXT_JAPAN_MIDBAND = 1,
36675     WMI_REG_EXT_FCC_DFS_HT40 = 2,
36676     WMI_REG_EXT_JAPAN_NONDFS_HT40 = 3,
36677     WMI_REG_EXT_JAPAN_DFS_HT40 = 4,
36678     WMI_REG_EXT_FCC_CH_144 = 5,
36679 } WMI_REG_EXT_BITMAP;
36680 
36681 #ifdef WMI_CMD_STRINGS
36682 static INLINE A_UINT8 *wmi_id_to_name(A_UINT32 wmi_command)
36683 {
36684     switch (wmi_command) {
36685         /* initialize the wlan sub system */
36686          WMI_RETURN_STRING(WMI_INIT_CMDID);
36687 
36688         /* Scan specific commands */
36689 
36690         /* start scan request to FW  */
36691         WMI_RETURN_STRING(WMI_START_SCAN_CMDID);
36692         /* stop scan request to FW  */
36693         WMI_RETURN_STRING(WMI_STOP_SCAN_CMDID);
36694         /* full list of channels as defined by the regulatory
36695          * that will be used by scanner   */
36696         WMI_RETURN_STRING(WMI_SCAN_CHAN_LIST_CMDID);
36697         /* overwrite default priority table in scan scheduler */
36698         WMI_RETURN_STRING(WMI_SCAN_SCH_PRIO_TBL_CMDID);
36699         /* This command to adjust the priority and min.max_rest_time
36700          * of an on ongoing scan request.
36701          */
36702         WMI_RETURN_STRING(WMI_SCAN_UPDATE_REQUEST_CMDID);
36703 
36704         /* PDEV(physical device) specific commands */
36705         /* set regulatorty ctl id used by FW to determine the exact
36706          * ctl power limits */
36707         WMI_RETURN_STRING(WMI_PDEV_SET_REGDOMAIN_CMDID);
36708         /* set channel. mainly used for supporting monitor mode */
36709         WMI_RETURN_STRING(WMI_PDEV_SET_CHANNEL_CMDID);
36710         /* set pdev specific parameters */
36711         WMI_RETURN_STRING(WMI_PDEV_SET_PARAM_CMDID);
36712         /* enable packet log */
36713         WMI_RETURN_STRING(WMI_PDEV_PKTLOG_ENABLE_CMDID);
36714         /* disable packet log*/
36715         WMI_RETURN_STRING(WMI_PDEV_PKTLOG_DISABLE_CMDID);
36716         /* set wmm parameters */
36717         WMI_RETURN_STRING(WMI_PDEV_SET_WMM_PARAMS_CMDID);
36718         /* set HT cap ie that needs to be carried probe requests
36719          * HT/VHT channels */
36720         WMI_RETURN_STRING(WMI_PDEV_SET_HT_CAP_IE_CMDID);
36721         /* set VHT cap ie that needs to be carried on probe
36722          * requests on VHT channels */
36723         WMI_RETURN_STRING(WMI_PDEV_SET_VHT_CAP_IE_CMDID);
36724 
36725         /* Command to send the DSCP-to-TID map to the target */
36726         WMI_RETURN_STRING(WMI_PDEV_SET_DSCP_TID_MAP_CMDID);
36727         /* set quiet ie parameters. primarily used in AP mode */
36728         WMI_RETURN_STRING(WMI_PDEV_SET_QUIET_MODE_CMDID);
36729         /* Enable/Disable Green AP Power Save  */
36730         WMI_RETURN_STRING(WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID);
36731         /* get TPC config for the current operating channel */
36732         WMI_RETURN_STRING(WMI_PDEV_GET_TPC_CONFIG_CMDID);
36733 
36734         /* set the base MAC address for the physical device before
36735          * a VDEV is created. For firmware that does not support
36736          * this feature and this command, the pdev MAC address will
36737          * not be changed. */
36738         WMI_RETURN_STRING(WMI_PDEV_SET_BASE_MACADDR_CMDID);
36739 
36740         /* eeprom content dump , the same to bdboard data */
36741         WMI_RETURN_STRING(WMI_PDEV_DUMP_CMDID);
36742 
36743         /* VDEV(virtual device) specific commands */
36744         /* vdev create */
36745         WMI_RETURN_STRING(WMI_VDEV_CREATE_CMDID);
36746         /* vdev delete */
36747         WMI_RETURN_STRING(WMI_VDEV_DELETE_CMDID);
36748         /* vdev start request */
36749         WMI_RETURN_STRING(WMI_VDEV_START_REQUEST_CMDID);
36750         /* vdev restart request (RX only, NO TX, used for CAC period)*/
36751         WMI_RETURN_STRING(WMI_VDEV_RESTART_REQUEST_CMDID);
36752         /* vdev up request */
36753         WMI_RETURN_STRING(WMI_VDEV_UP_CMDID);
36754         /* vdev stop request */
36755         WMI_RETURN_STRING(WMI_VDEV_STOP_CMDID);
36756         /* vdev down request */
36757         WMI_RETURN_STRING(WMI_VDEV_DOWN_CMDID);
36758         /* set a vdev param */
36759         WMI_RETURN_STRING(WMI_VDEV_SET_PARAM_CMDID);
36760         /* set a key (used for setting per peer unicast
36761          * and per vdev multicast) */
36762         WMI_RETURN_STRING(WMI_VDEV_INSTALL_KEY_CMDID);
36763         /* Set bss max idle time */
36764         WMI_RETURN_STRING(WMI_VDEV_BSS_MAX_IDLE_TIME_CMDID);
36765 
36766         /* wnm sleep mode command */
36767         WMI_RETURN_STRING(WMI_VDEV_WNM_SLEEPMODE_CMDID);
36768         WMI_RETURN_STRING(WMI_VDEV_WMM_ADDTS_CMDID);
36769         WMI_RETURN_STRING(WMI_VDEV_WMM_DELTS_CMDID);
36770         WMI_RETURN_STRING(WMI_VDEV_SET_WMM_PARAMS_CMDID);
36771         WMI_RETURN_STRING(WMI_VDEV_SET_GTX_PARAMS_CMDID);
36772         WMI_RETURN_STRING(WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID);
36773 
36774         WMI_RETURN_STRING(WMI_VDEV_PLMREQ_START_CMDID);
36775         WMI_RETURN_STRING(WMI_VDEV_PLMREQ_STOP_CMDID);
36776         WMI_RETURN_STRING(WMI_VDEV_TSF_TSTAMP_ACTION_CMDID);
36777         WMI_RETURN_STRING(WMI_VDEV_SET_IE_CMDID);
36778 
36779         /* peer specific commands */
36780 
36781         /** create a peer */
36782         WMI_RETURN_STRING(WMI_PEER_CREATE_CMDID);
36783         /** delete a peer */
36784         WMI_RETURN_STRING(WMI_PEER_DELETE_CMDID);
36785         /** delete all peer (excluding bss peer) */
36786         WMI_RETURN_STRING(WMI_VDEV_DELETE_ALL_PEER_CMDID);
36787         /** flush specific  tid queues of a peer */
36788         WMI_RETURN_STRING(WMI_PEER_FLUSH_TIDS_CMDID);
36789         /** set a parameter of a peer */
36790         WMI_RETURN_STRING(WMI_PEER_SET_PARAM_CMDID);
36791         /* set peer to associated state. will cary all parameters
36792          * determined during assocication time */
36793         WMI_RETURN_STRING(WMI_PEER_ASSOC_CMDID);
36794         /* add a wds  (4 address ) entry. used only for testing
36795          * WDS feature on AP products */
36796         WMI_RETURN_STRING(WMI_PEER_ADD_WDS_ENTRY_CMDID);
36797         /* remove wds  (4 address ) entry. used only for testing WDS
36798          * feature on AP products */
36799         WMI_RETURN_STRING(WMI_PEER_REMOVE_WDS_ENTRY_CMDID);
36800         /* set up mcast info for multicast to unicast conversion */
36801         WMI_RETURN_STRING(WMI_PEER_MCAST_GROUP_CMDID);
36802         /* request peer info from FW to get PEER_INFO_EVENTID */
36803         WMI_RETURN_STRING(WMI_PEER_INFO_REQ_CMDID);
36804         /* unmap response for a peer */
36805         WMI_RETURN_STRING(WMI_PEER_UNMAP_RESPONSE_CMDID);
36806 
36807         /* beacon/management specific commands */
36808 
36809         /* transmit beacon by reference. used for transmitting beacon
36810          * on low latency interface like pcie */
36811         WMI_RETURN_STRING(WMI_BCN_TX_CMDID);
36812         /* transmit beacon by value */
36813         WMI_RETURN_STRING(WMI_PDEV_SEND_BCN_CMDID);
36814         /* set the beacon template. used in beacon offload mode to setup
36815          * the common beacon template with the FW to be used by FW to
36816          * generate beacons */
36817         WMI_RETURN_STRING(WMI_BCN_TMPL_CMDID);
36818         /* set beacon filter with FW */
36819         WMI_RETURN_STRING(WMI_BCN_FILTER_RX_CMDID);
36820         /* enable/disable filtering of probe requests in the firmware */
36821         WMI_RETURN_STRING(WMI_PRB_REQ_FILTER_RX_CMDID);
36822         /* transmit management frame by value. will be deprecated */
36823         WMI_RETURN_STRING(WMI_MGMT_TX_CMDID);
36824         /* set the probe response template. used in beacon offload mode
36825          * to setup the common probe response template with the FW to
36826          * be used by FW to generate probe responses */
36827         WMI_RETURN_STRING(WMI_PRB_TMPL_CMDID);
36828         /** set FILS Discovery frame template for FW to generate FD frames */
36829         WMI_RETURN_STRING(WMI_FD_TMPL_CMDID);
36830 
36831         /* commands to directly control ba negotiation directly from
36832          * host. only used in test mode */
36833 
36834         /* turn off FW Auto addba mode and let host control addba */
36835         WMI_RETURN_STRING(WMI_ADDBA_CLEAR_RESP_CMDID);
36836         /* send add ba request */
36837         WMI_RETURN_STRING(WMI_ADDBA_SEND_CMDID);
36838         WMI_RETURN_STRING(WMI_ADDBA_STATUS_CMDID);
36839         /* send del ba */
36840         WMI_RETURN_STRING(WMI_DELBA_SEND_CMDID);
36841         /* set add ba response will be used by FW to generate
36842          * addba response*/
36843         WMI_RETURN_STRING(WMI_ADDBA_SET_RESP_CMDID);
36844         /* send single VHT MPDU with AMSDU */
36845         WMI_RETURN_STRING(WMI_SEND_SINGLEAMSDU_CMDID);
36846 
36847         /* Station power save specific config */
36848         /* enable/disable station powersave */
36849         WMI_RETURN_STRING(WMI_STA_POWERSAVE_MODE_CMDID);
36850         /* set station power save specific parameter */
36851         WMI_RETURN_STRING(WMI_STA_POWERSAVE_PARAM_CMDID);
36852         /* set station mimo powersave mode */
36853         WMI_RETURN_STRING(WMI_STA_MIMO_PS_MODE_CMDID);
36854 
36855         /* DFS-specific commands */
36856         /* enable DFS (radar detection)*/
36857         WMI_RETURN_STRING(WMI_PDEV_DFS_ENABLE_CMDID);
36858         /* disable DFS (radar detection)*/
36859         WMI_RETURN_STRING(WMI_PDEV_DFS_DISABLE_CMDID);
36860         /* enable DFS phyerr/parse filter offload */
36861         WMI_RETURN_STRING(WMI_DFS_PHYERR_FILTER_ENA_CMDID);
36862         /* enable DFS phyerr/parse filter offload */
36863         WMI_RETURN_STRING(WMI_DFS_PHYERR_FILTER_DIS_CMDID);
36864 
36865         /* Roaming specific  commands */
36866         /* set roam scan mode */
36867         WMI_RETURN_STRING(WMI_ROAM_SCAN_MODE);
36868         /* set roam scan RSSI threshold below which roam
36869          * scan is enabled  */
36870         WMI_RETURN_STRING(WMI_ROAM_SCAN_RSSI_THRESHOLD);
36871         /* set roam scan period for periodic roam scan mode  */
36872         WMI_RETURN_STRING(WMI_ROAM_SCAN_PERIOD);
36873         /* set roam scan trigger RSSI change threshold   */
36874         WMI_RETURN_STRING(WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD);
36875         /* set roam AP profile   */
36876         WMI_RETURN_STRING(WMI_ROAM_AP_PROFILE);
36877         /* set channel list for roam scans */
36878         WMI_RETURN_STRING(WMI_ROAM_CHAN_LIST);
36879         /* offload scan specific commands */
36880         /* set offload scan AP profile   */
36881         WMI_RETURN_STRING(WMI_OFL_SCAN_ADD_AP_PROFILE);
36882         /* remove offload scan AP profile   */
36883         WMI_RETURN_STRING(WMI_OFL_SCAN_REMOVE_AP_PROFILE);
36884         /* set offload scan period   */
36885         WMI_RETURN_STRING(WMI_OFL_SCAN_PERIOD);
36886 
36887         /* P2P specific commands */
36888         /* set P2P device info. FW will used by FW to create P2P IE
36889          * to be carried in probe response generated during p2p listen
36890          * and for p2p discoverability  */
36891         WMI_RETURN_STRING(WMI_P2P_DEV_SET_DEVICE_INFO);
36892         /* enable/disable p2p discoverability on STA/AP VDEVs  */
36893         WMI_RETURN_STRING(WMI_P2P_DEV_SET_DISCOVERABILITY);
36894         /* set p2p ie to be carried in beacons generated by FW for GO */
36895         WMI_RETURN_STRING(WMI_P2P_GO_SET_BEACON_IE);
36896         /* set p2p ie to be carried in probe response frames generated
36897          * by FW for GO  */
36898         WMI_RETURN_STRING(WMI_P2P_GO_SET_PROBE_RESP_IE);
36899         /* set the vendor specific p2p ie data.
36900          * FW will use this to parse the P2P NoA
36901          * attribute in the beacons/probe responses received.
36902          */
36903         WMI_RETURN_STRING(WMI_P2P_SET_VENDOR_IE_DATA_CMDID);
36904         /* set the configure of p2p find offload */
36905         WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID);
36906         /* set the vendor specific p2p ie data for p2p find offload */
36907         WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_APPIE_CMDID);
36908         /* set the BSSID/device name pattern of p2p find offload */
36909         WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID);
36910         /* set OppPS related parameters **/
36911         WMI_RETURN_STRING(WMI_P2P_SET_OPPPS_PARAM_CMDID);
36912 
36913         /* AP power save specific config
36914          * set AP power save specific param */
36915         WMI_RETURN_STRING(WMI_AP_PS_PEER_PARAM_CMDID);
36916         /* set AP UAPSD coex specific param */
36917         WMI_RETURN_STRING(WMI_AP_PS_PEER_UAPSD_COEX_CMDID);
36918 
36919         /* Rate-control specific commands */
36920         WMI_RETURN_STRING(WMI_PEER_RATE_RETRY_SCHED_CMDID);
36921 
36922         /* WLAN Profiling commands. */
36923         WMI_RETURN_STRING(WMI_WLAN_PROFILE_TRIGGER_CMDID);
36924         WMI_RETURN_STRING(WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID);
36925         WMI_RETURN_STRING(WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID);
36926         WMI_RETURN_STRING(WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID);
36927         WMI_RETURN_STRING(WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID);
36928 
36929         /* Suspend resume command Ids */
36930         WMI_RETURN_STRING(WMI_PDEV_SUSPEND_CMDID);
36931         WMI_RETURN_STRING(WMI_PDEV_RESUME_CMDID);
36932 
36933         /* Beacon filter commands */
36934         /* add a beacon filter */
36935         WMI_RETURN_STRING(WMI_ADD_BCN_FILTER_CMDID);
36936         /* remove a  beacon filter */
36937         WMI_RETURN_STRING(WMI_RMV_BCN_FILTER_CMDID);
36938 
36939         /* WOW Specific WMI commands */
36940         /* add pattern for awake */
36941         WMI_RETURN_STRING(WMI_WOW_ADD_WAKE_PATTERN_CMDID);
36942         /* deleta a wake pattern */
36943         WMI_RETURN_STRING(WMI_WOW_DEL_WAKE_PATTERN_CMDID);
36944         /* enable/deisable wake event  */
36945         WMI_RETURN_STRING(WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID);
36946         /* enable WOW  */
36947         WMI_RETURN_STRING(WMI_WOW_ENABLE_CMDID);
36948         /* host woke up from sleep event to FW. Generated in response
36949          * to WOW Hardware event */
36950         WMI_RETURN_STRING(WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID);
36951 
36952         /* RTT measurement related cmd */
36953         /* request to make an RTT measurement */
36954         WMI_RETURN_STRING(WMI_RTT_MEASREQ_CMDID);
36955         /* request to report a tsf measurement */
36956         WMI_RETURN_STRING(WMI_RTT_TSF_CMDID);
36957 
36958         /* spectral scan command */
36959         /* configure spectral scan */
36960         WMI_RETURN_STRING(WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID);
36961         /* enable/disable spectral scan and trigger */
36962         WMI_RETURN_STRING(WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID);
36963 
36964         /* F/W stats */
36965         /* one time request for stats */
36966         WMI_RETURN_STRING(WMI_REQUEST_STATS_CMDID);
36967         /* Push MCC Adaptive Scheduler Stats to Firmware */
36968         WMI_RETURN_STRING(WMI_MCC_SCHED_TRAFFIC_STATS_CMDID);
36969 
36970         /* ARP OFFLOAD REQUEST*/
36971         WMI_RETURN_STRING(WMI_SET_ARP_NS_OFFLOAD_CMDID);
36972 
36973         /* Proactive ARP Response Add Pattern Command*/
36974         WMI_RETURN_STRING(WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID);
36975 
36976         /* Proactive ARP Response Del Pattern Command*/
36977         WMI_RETURN_STRING(WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID);
36978 
36979         /* NS offload confid*/
36980         WMI_RETURN_STRING(WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID);
36981 
36982         /* GTK offload Specific WMI commands */
36983         WMI_RETURN_STRING(WMI_GTK_OFFLOAD_CMDID);
36984 
36985         /* CSA offload Specific WMI commands */
36986         /* csa offload enable */
36987         WMI_RETURN_STRING(WMI_CSA_OFFLOAD_ENABLE_CMDID);
36988         /* chan switch command */
36989         WMI_RETURN_STRING(WMI_CSA_OFFLOAD_CHANSWITCH_CMDID);
36990 
36991         /* Chatter commands */
36992         /* Change chatter mode of operation */
36993         WMI_RETURN_STRING(WMI_CHATTER_SET_MODE_CMDID);
36994         /* chatter add coalescing filter command */
36995         WMI_RETURN_STRING(WMI_CHATTER_ADD_COALESCING_FILTER_CMDID);
36996         /* chatter delete coalescing filter command */
36997         WMI_RETURN_STRING(WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID);
36998         /* chatter coalecing query command */
36999         WMI_RETURN_STRING(WMI_CHATTER_COALESCING_QUERY_CMDID);
37000 
37001         /* addba specific commands */
37002         /* start the aggregation on this TID */
37003         WMI_RETURN_STRING(WMI_PEER_TID_ADDBA_CMDID);
37004         /* stop the aggregation on this TID */
37005         WMI_RETURN_STRING(WMI_PEER_TID_DELBA_CMDID);
37006 
37007         /* set station mimo powersave method */
37008         WMI_RETURN_STRING(WMI_STA_DTIM_PS_METHOD_CMDID);
37009         /* Configure the Station UAPSD AC Auto Trigger Parameters */
37010         WMI_RETURN_STRING(WMI_STA_UAPSD_AUTO_TRIG_CMDID);
37011         /* Configure the Keep Alive Parameters */
37012         WMI_RETURN_STRING(WMI_STA_KEEPALIVE_CMDID);
37013 
37014         /* Request ssn from target for a sta/tid pair */
37015         WMI_RETURN_STRING(WMI_BA_REQ_SSN_CMDID);
37016         /* misc command group */
37017         /* echo command mainly used for testing */
37018         WMI_RETURN_STRING(WMI_ECHO_CMDID);
37019 
37020         /* !!IMPORTANT!!
37021          * If you need to add a new WMI command to the
37022          * WMI_RETURN_STRING(WMI_GRP_MISC) sub-group,
37023          * please make sure you add it BEHIND
37024          * WMI_RETURN_STRING(WMI_PDEV_UTF_CMDID);
37025          * as we MUST have a fixed value here to maintain compatibility between
37026          * UTF and the ART2 driver
37027          */
37028         /* UTF WMI commands */
37029         WMI_RETURN_STRING(WMI_PDEV_UTF_CMDID);
37030 
37031         /* set debug log config */
37032         WMI_RETURN_STRING(WMI_DBGLOG_CFG_CMDID);
37033         /* QVIT specific command id */
37034         WMI_RETURN_STRING(WMI_PDEV_QVIT_CMDID);
37035         /* Factory Testing Mode request command
37036          * used for integrated chipsets */
37037         WMI_RETURN_STRING(WMI_PDEV_FTM_INTG_CMDID);
37038         /* set and get keepalive parameters command */
37039         WMI_RETURN_STRING(WMI_VDEV_SET_KEEPALIVE_CMDID);
37040         WMI_RETURN_STRING(WMI_VDEV_GET_KEEPALIVE_CMDID);
37041         /* For fw recovery test command */
37042         WMI_RETURN_STRING(WMI_FORCE_FW_HANG_CMDID);
37043         /* Set Mcast/Bdcast filter */
37044         WMI_RETURN_STRING(WMI_SET_MCASTBCAST_FILTER_CMDID);
37045         /* set thermal management params */
37046         WMI_RETURN_STRING(WMI_THERMAL_MGMT_CMDID);
37047         WMI_RETURN_STRING(WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID);
37048         WMI_RETURN_STRING(WMI_LRO_CONFIG_CMDID);
37049         WMI_RETURN_STRING(WMI_TRANSFER_DATA_TO_FLASH_CMDID);
37050         WMI_RETURN_STRING(WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID);
37051         WMI_RETURN_STRING(WMI_VDEV_WISA_CMDID);
37052         WMI_RETURN_STRING(WMI_SCAN_ADAPTIVE_DWELL_CONFIG_CMDID);
37053         WMI_RETURN_STRING(WMI_WOW_SET_ACTION_WAKE_UP_CMDID);
37054         WMI_RETURN_STRING(WMI_MAWC_SENSOR_REPORT_IND_CMDID);
37055         WMI_RETURN_STRING(WMI_ROAM_CONFIGURE_MAWC_CMDID);
37056         WMI_RETURN_STRING(WMI_NLO_CONFIGURE_MAWC_CMDID);
37057         WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_MAWC_CMDID);
37058         /* GPIO Configuration */
37059         WMI_RETURN_STRING(WMI_GPIO_CONFIG_CMDID);
37060         WMI_RETURN_STRING(WMI_GPIO_OUTPUT_CMDID);
37061 
37062         /* Txbf configuration command */
37063         WMI_RETURN_STRING(WMI_TXBF_CMDID);
37064 
37065         /* FWTEST Commands */
37066         WMI_RETURN_STRING(WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID);
37067         /* set NoA descs */
37068         WMI_RETURN_STRING(WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID);
37069 
37070         /* TDLS Configuration */
37071         /* enable/disable TDLS */
37072         WMI_RETURN_STRING(WMI_TDLS_SET_STATE_CMDID);
37073         /* set tdls peer state */
37074         WMI_RETURN_STRING(WMI_TDLS_PEER_UPDATE_CMDID);
37075 
37076         /* Resmgr Configuration */
37077         /* Adaptive OCS is enabled by default in the FW.
37078          * This command is used to disable FW based adaptive OCS.
37079          */
37080         WMI_RETURN_STRING
37081             (WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID);
37082         /* set the requested channel time quota for the home channels */
37083         WMI_RETURN_STRING(WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID);
37084         /* set the requested latency for the home channels */
37085         WMI_RETURN_STRING(WMI_RESMGR_SET_CHAN_LATENCY_CMDID);
37086 
37087         /* STA SMPS Configuration */
37088         /* force SMPS mode */
37089         WMI_RETURN_STRING(WMI_STA_SMPS_FORCE_MODE_CMDID);
37090         /* set SMPS parameters */
37091         WMI_RETURN_STRING(WMI_STA_SMPS_PARAM_CMDID);
37092 
37093         /* Wlan HB commands */
37094         /* enable/disable wlan HB */
37095         WMI_RETURN_STRING(WMI_HB_SET_ENABLE_CMDID);
37096         /* set tcp parameters for wlan HB */
37097         WMI_RETURN_STRING(WMI_HB_SET_TCP_PARAMS_CMDID);
37098         /* set tcp pkt filter for wlan HB */
37099         WMI_RETURN_STRING(WMI_HB_SET_TCP_PKT_FILTER_CMDID);
37100         /* set udp parameters for wlan HB */
37101         WMI_RETURN_STRING(WMI_HB_SET_UDP_PARAMS_CMDID);
37102         /* set udp pkt filter for wlan HB */
37103         WMI_RETURN_STRING(WMI_HB_SET_UDP_PKT_FILTER_CMDID);
37104 
37105         /* Wlan RMC commands*/
37106         /* enable/disable RMC */
37107         WMI_RETURN_STRING(WMI_RMC_SET_MODE_CMDID);
37108         /* configure action frame period */
37109         WMI_RETURN_STRING(WMI_RMC_SET_ACTION_PERIOD_CMDID);
37110         /* For debug/future enhancement purposes only,
37111          * configures/finetunes RMC algorithms */
37112         WMI_RETURN_STRING(WMI_RMC_CONFIG_CMDID);
37113 
37114         /* WLAN MHF offload commands */
37115         /* enable/disable MHF offload */
37116         WMI_RETURN_STRING(WMI_MHF_OFFLOAD_SET_MODE_CMDID);
37117         /* Plumb routing table for MHF offload */
37118         WMI_RETURN_STRING(WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID);
37119 
37120         /* location scan commands */
37121         /* start batch scan */
37122         WMI_RETURN_STRING(WMI_BATCH_SCAN_ENABLE_CMDID);
37123         /* stop batch scan */
37124         WMI_RETURN_STRING(WMI_BATCH_SCAN_DISABLE_CMDID);
37125         /* get batch scan result */
37126         WMI_RETURN_STRING(WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID);
37127         /* OEM related cmd */
37128         WMI_RETURN_STRING(WMI_OEM_REQ_CMDID);
37129         WMI_RETURN_STRING(WMI_OEM_REQUEST_CMDID);
37130         /* NAN request cmd */
37131         WMI_RETURN_STRING(WMI_NAN_CMDID);
37132         /* Modem power state cmd */
37133         WMI_RETURN_STRING(WMI_MODEM_POWER_STATE_CMDID);
37134         WMI_RETURN_STRING(WMI_REQUEST_STATS_EXT_CMDID);
37135         WMI_RETURN_STRING(WMI_OBSS_SCAN_ENABLE_CMDID);
37136         WMI_RETURN_STRING(WMI_OBSS_SCAN_DISABLE_CMDID);
37137         WMI_RETURN_STRING(WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID);
37138         WMI_RETURN_STRING(WMI_ROAM_SCAN_CMD);
37139         WMI_RETURN_STRING(WMI_PDEV_SET_LED_CONFIG_CMDID);
37140         WMI_RETURN_STRING(WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID);
37141         WMI_RETURN_STRING(WMI_CHAN_AVOID_UPDATE_CMDID);
37142         WMI_RETURN_STRING(WMI_COEX_CONFIG_CMDID);
37143         WMI_RETURN_STRING(WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID);
37144         WMI_RETURN_STRING(WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID);
37145         WMI_RETURN_STRING(WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID);
37146         WMI_RETURN_STRING(WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID);
37147         WMI_RETURN_STRING(WMI_REQUEST_LINK_STATS_CMDID);
37148         WMI_RETURN_STRING(WMI_START_LINK_STATS_CMDID);
37149         WMI_RETURN_STRING(WMI_CLEAR_LINK_STATS_CMDID);
37150         WMI_RETURN_STRING(WMI_GET_FW_MEM_DUMP_CMDID);
37151         WMI_RETURN_STRING(WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID);
37152         WMI_RETURN_STRING(WMI_LPI_START_SCAN_CMDID);
37153         WMI_RETURN_STRING(WMI_LPI_STOP_SCAN_CMDID);
37154         WMI_RETURN_STRING(WMI_EXTSCAN_START_CMDID);
37155         WMI_RETURN_STRING(WMI_EXTSCAN_STOP_CMDID);
37156         WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID);
37157         WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID);
37158         WMI_RETURN_STRING(WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID);
37159         WMI_RETURN_STRING(WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID);
37160         WMI_RETURN_STRING(WMI_EXTSCAN_SET_CAPABILITIES_CMDID);
37161         WMI_RETURN_STRING(WMI_EXTSCAN_GET_CAPABILITIES_CMDID);
37162         WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID);
37163         WMI_RETURN_STRING(WMI_ROAM_SYNCH_COMPLETE);
37164         WMI_RETURN_STRING(WMI_D0_WOW_ENABLE_DISABLE_CMDID);
37165         WMI_RETURN_STRING(WMI_EXTWOW_ENABLE_CMDID);
37166         WMI_RETURN_STRING(WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID);
37167         WMI_RETURN_STRING(WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID);
37168         WMI_RETURN_STRING(WMI_UNIT_TEST_CMDID);
37169         WMI_RETURN_STRING(WMI_ROAM_SET_RIC_REQUEST_CMDID);
37170         WMI_RETURN_STRING(WMI_PDEV_GET_TEMPERATURE_CMDID);
37171         WMI_RETURN_STRING(WMI_SET_DHCP_SERVER_OFFLOAD_CMDID);
37172         WMI_RETURN_STRING(WMI_TPC_CHAINMASK_CONFIG_CMDID);
37173         WMI_RETURN_STRING(WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID);
37174         WMI_RETURN_STRING(WMI_SCAN_PROB_REQ_OUI_CMDID);
37175         WMI_RETURN_STRING(WMI_TDLS_SET_OFFCHAN_MODE_CMDID);
37176         WMI_RETURN_STRING(WMI_PDEV_SET_LED_FLASHING_CMDID);
37177         WMI_RETURN_STRING(WMI_MDNS_OFFLOAD_ENABLE_CMDID);
37178         WMI_RETURN_STRING(WMI_MDNS_SET_FQDN_CMDID);
37179         WMI_RETURN_STRING(WMI_MDNS_SET_RESPONSE_CMDID);
37180         WMI_RETURN_STRING(WMI_MDNS_GET_STATS_CMDID);
37181         WMI_RETURN_STRING(WMI_MDNS_SET_STAIP_CMDID);
37182         WMI_RETURN_STRING(WMI_ROAM_INVOKE_CMDID);
37183         WMI_RETURN_STRING(WMI_SET_ANTENNA_DIVERSITY_CMDID);
37184         WMI_RETURN_STRING(WMI_SAP_OFL_ENABLE_CMDID);
37185         WMI_RETURN_STRING(WMI_APFIND_CMDID);
37186         WMI_RETURN_STRING(WMI_PASSPOINT_LIST_CONFIG_CMDID);
37187         WMI_RETURN_STRING(WMI_OCB_SET_SCHED_CMDID);
37188         WMI_RETURN_STRING(WMI_OCB_SET_CONFIG_CMDID);
37189         WMI_RETURN_STRING(WMI_OCB_SET_UTC_TIME_CMDID);
37190         WMI_RETURN_STRING(WMI_OCB_START_TIMING_ADVERT_CMDID);
37191         WMI_RETURN_STRING(WMI_OCB_STOP_TIMING_ADVERT_CMDID);
37192         WMI_RETURN_STRING(WMI_OCB_GET_TSF_TIMER_CMDID);
37193         WMI_RETURN_STRING(WMI_DCC_GET_STATS_CMDID);
37194         WMI_RETURN_STRING(WMI_DCC_CLEAR_STATS_CMDID);
37195         WMI_RETURN_STRING(WMI_DCC_UPDATE_NDL_CMDID);
37196         WMI_RETURN_STRING(WMI_ROAM_FILTER_CMDID);
37197         WMI_RETURN_STRING(WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID);
37198         WMI_RETURN_STRING(WMI_DEBUG_MESG_FLUSH_CMDID);
37199         WMI_RETURN_STRING(WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID);
37200         WMI_RETURN_STRING(WMI_SOC_SET_PCL_CMDID);
37201         WMI_RETURN_STRING(WMI_SOC_SET_HW_MODE_CMDID);
37202         WMI_RETURN_STRING(WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID);
37203         WMI_RETURN_STRING(WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID);
37204         WMI_RETURN_STRING(WMI_DIAG_EVENT_LOG_CONFIG_CMDID);
37205         WMI_RETURN_STRING(WMI_PACKET_FILTER_CONFIG_CMDID);
37206         WMI_RETURN_STRING(WMI_PACKET_FILTER_ENABLE_CMDID);
37207         WMI_RETURN_STRING(WMI_SAP_SET_BLACKLIST_PARAM_CMDID);
37208         WMI_RETURN_STRING(WMI_WOW_UDP_SVC_OFLD_CMDID);
37209         WMI_RETURN_STRING(WMI_MGMT_TX_SEND_CMDID);
37210         WMI_RETURN_STRING(WMI_SOC_SET_ANTENNA_MODE_CMDID);
37211         WMI_RETURN_STRING(WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID);
37212         WMI_RETURN_STRING(WMI_AP_PS_EGAP_PARAM_CMDID);
37213         WMI_RETURN_STRING(WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID);
37214         WMI_RETURN_STRING(WMI_BPF_GET_CAPABILITY_CMDID);
37215         WMI_RETURN_STRING(WMI_BPF_GET_VDEV_STATS_CMDID);
37216         WMI_RETURN_STRING(WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID);
37217         WMI_RETURN_STRING(WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID);
37218         WMI_RETURN_STRING(WMI_NDI_GET_CAP_REQ_CMDID);
37219         WMI_RETURN_STRING(WMI_NDP_INITIATOR_REQ_CMDID);
37220         WMI_RETURN_STRING(WMI_NDP_RESPONDER_REQ_CMDID);
37221         WMI_RETURN_STRING(WMI_NDP_END_REQ_CMDID);
37222         WMI_RETURN_STRING(WMI_PEER_UPDATE_WDS_ENTRY_CMDID);
37223         WMI_RETURN_STRING(WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID);
37224         WMI_RETURN_STRING(WMI_PDEV_FIPS_CMDID);
37225         WMI_RETURN_STRING(WMI_PDEV_SMART_ANT_ENABLE_CMDID);
37226         WMI_RETURN_STRING(WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID);
37227         WMI_RETURN_STRING(WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID);
37228         WMI_RETURN_STRING(WMI_PDEV_SET_CTL_TABLE_CMDID);
37229         WMI_RETURN_STRING(WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID);
37230         WMI_RETURN_STRING(WMI_PDEV_GET_TPC_CMDID);
37231         WMI_RETURN_STRING(WMI_MIB_STATS_ENABLE_CMDID);
37232         WMI_RETURN_STRING(WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID);
37233         WMI_RETURN_STRING(WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID);
37234         WMI_RETURN_STRING(WMI_VDEV_RATEMASK_CMDID);
37235         WMI_RETURN_STRING(WMI_VDEV_ATF_REQUEST_CMDID);
37236         WMI_RETURN_STRING(WMI_VDEV_SET_DSCP_TID_MAP_CMDID);
37237         WMI_RETURN_STRING(WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID);
37238         WMI_RETURN_STRING(WMI_VDEV_SET_QUIET_MODE_CMDID);
37239         WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID);
37240         WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID);
37241         WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID);
37242         WMI_RETURN_STRING(WMI_PEER_ATF_REQUEST_CMDID);
37243         WMI_RETURN_STRING(WMI_FWTEST_CMDID);
37244         WMI_RETURN_STRING(WMI_QBOOST_CFG_CMDID);
37245         WMI_RETURN_STRING(WMI_PDEV_GET_NFCAL_POWER_CMDID);
37246         WMI_RETURN_STRING(WMI_PDEV_SET_PCL_CMDID);
37247         WMI_RETURN_STRING(WMI_PDEV_SET_HW_MODE_CMDID);
37248         WMI_RETURN_STRING(WMI_PDEV_SET_MAC_CONFIG_CMDID);
37249         WMI_RETURN_STRING(WMI_PDEV_SET_ANTENNA_MODE_CMDID);
37250         WMI_RETURN_STRING(WMI_ROAM_SET_MBO_PARAM_CMDID);
37251         WMI_RETURN_STRING(WMI_CHAN_AVOID_RPT_ALLOW_CMDID);
37252         WMI_RETURN_STRING(WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID);
37253         WMI_RETURN_STRING(WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID);
37254         WMI_RETURN_STRING(WMI_PDEV_WAL_POWER_DEBUG_CMDID);
37255         WMI_RETURN_STRING(WMI_PEER_BWF_REQUEST_CMDID);
37256         WMI_RETURN_STRING(WMI_DBGLOG_TIME_STAMP_SYNC_CMDID);
37257         WMI_RETURN_STRING(WMI_P2P_LISTEN_OFFLOAD_START_CMDID);
37258         WMI_RETURN_STRING(WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID);
37259         WMI_RETURN_STRING(WMI_PEER_REORDER_QUEUE_SETUP_CMDID);
37260         WMI_RETURN_STRING(WMI_PEER_REORDER_QUEUE_REMOVE_CMDID);
37261         WMI_RETURN_STRING(WMI_SET_MULTIPLE_MCAST_FILTER_CMDID);
37262         WMI_RETURN_STRING(WMI_READ_DATA_FROM_FLASH_CMDID);
37263         WMI_RETURN_STRING(WMI_PDEV_SET_REORDER_TIMEOUT_VAL_CMDID);
37264         WMI_RETURN_STRING(WMI_PEER_SET_RX_BLOCKSIZE_CMDID);
37265         WMI_RETURN_STRING(WMI_PDEV_SET_WAKEUP_CONFIG_CMDID);
37266         WMI_RETURN_STRING(WMI_PDEV_GET_ANTDIV_STATUS_CMDID);
37267         WMI_RETURN_STRING(WMI_PEER_ANTDIV_INFO_REQ_CMDID);
37268         WMI_RETURN_STRING(WMI_MNT_FILTER_CMDID);
37269         WMI_RETURN_STRING(WMI_PDEV_GET_CHIP_POWER_STATS_CMDID);
37270         WMI_RETURN_STRING(WMI_COEX_GET_ANTENNA_ISOLATION_CMDID);
37271         WMI_RETURN_STRING(WMI_PDEV_SET_STATS_THRESHOLD_CMDID);
37272         WMI_RETURN_STRING(WMI_REQUEST_WLAN_STATS_CMDID);
37273         WMI_RETURN_STRING(WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID);
37274         WMI_RETURN_STRING(WMI_REQUEST_PEER_STATS_INFO_CMDID);
37275         WMI_RETURN_STRING(WMI_REQUEST_RADIO_CHAN_STATS_CMDID);
37276         WMI_RETURN_STRING(WMI_ROAM_PER_CONFIG_CMDID);
37277         WMI_RETURN_STRING(WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_CMDID);
37278         WMI_RETURN_STRING(WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID);
37279         WMI_RETURN_STRING(WMI_HW_DATA_FILTER_CMDID);
37280         WMI_RETURN_STRING(WMI_PDEV_MULTIPLE_VDEV_RESTART_REQUEST_CMDID);
37281         WMI_RETURN_STRING(WMI_LPI_OEM_REQ_CMDID);
37282         WMI_RETURN_STRING(WMI_PDEV_UPDATE_PKT_ROUTING_CMDID);
37283         WMI_RETURN_STRING(WMI_PDEV_CHECK_CAL_VERSION_CMDID);
37284         WMI_RETURN_STRING(WMI_PDEV_SET_DIVERSITY_GAIN_CMDID);
37285         WMI_RETURN_STRING(WMI_VDEV_SET_ARP_STAT_CMDID);
37286         WMI_RETURN_STRING(WMI_VDEV_GET_ARP_STAT_CMDID);
37287         WMI_RETURN_STRING(WMI_VDEV_GET_TX_POWER_CMDID);
37288         WMI_RETURN_STRING(WMI_OFFCHAN_DATA_TX_SEND_CMDID);
37289         WMI_RETURN_STRING(WMI_SET_INIT_COUNTRY_CMDID);
37290         WMI_RETURN_STRING(WMI_SET_SCAN_DBS_DUTY_CYCLE_CMDID);
37291         WMI_RETURN_STRING(WMI_THERM_THROT_SET_CONF_CMDID);
37292         WMI_RETURN_STRING(WMI_OEM_DMA_RING_CFG_REQ_CMDID);
37293         WMI_RETURN_STRING(WMI_PDEV_BSS_CHAN_INFO_REQUEST_CMDID);
37294         WMI_RETURN_STRING(WMI_VDEV_LIMIT_OFFCHAN_CMDID);
37295         WMI_RETURN_STRING(WMI_ROAM_BTM_CONFIG_CMDID);
37296         WMI_RETURN_STRING(WMI_WLM_CONFIG_CMDID);
37297         WMI_RETURN_STRING(WMI_PDEV_UPDATE_CTLTABLE_REQUEST_CMDID);
37298         WMI_RETURN_STRING(WMI_PDEV_CONFIG_VENDOR_OUI_ACTION_CMDID);
37299         WMI_RETURN_STRING(WMI_PDEV_SEND_FD_CMDID);
37300         WMI_RETURN_STRING(WMI_ENABLE_FILS_CMDID);
37301         WMI_RETURN_STRING(WMI_PDEV_SET_AC_TX_QUEUE_OPTIMIZED_CMDID);
37302         WMI_RETURN_STRING(WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID);
37303         WMI_RETURN_STRING(WMI_PDEV_SET_RX_FILTER_PROMISCUOUS_CMDID);
37304         WMI_RETURN_STRING(WMI_SAP_OBSS_DETECTION_CFG_CMDID);
37305         WMI_RETURN_STRING(WMI_PDEV_DMA_RING_CFG_REQ_CMDID);
37306         WMI_RETURN_STRING(WMI_11K_OFFLOAD_REPORT_CMDID);
37307         WMI_RETURN_STRING(WMI_11K_INVOKE_NEIGHBOR_REPORT_CMDID);
37308         WMI_RETURN_STRING(WMI_BPF_SET_VDEV_ENABLE_CMDID);
37309         WMI_RETURN_STRING(WMI_BPF_SET_VDEV_WORK_MEMORY_CMDID);
37310         WMI_RETURN_STRING(WMI_BPF_GET_VDEV_WORK_MEMORY_CMDID);
37311         WMI_RETURN_STRING(WMI_BSS_COLOR_CHANGE_ENABLE_CMDID);
37312         WMI_RETURN_STRING(WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID);
37313         WMI_RETURN_STRING(WMI_RUNTIME_DPD_RECAL_CMDID);
37314         WMI_RETURN_STRING(WMI_TWT_ENABLE_CMDID);
37315         WMI_RETURN_STRING(WMI_TWT_DISABLE_CMDID);
37316         WMI_RETURN_STRING(WMI_TWT_ADD_DIALOG_CMDID);
37317         WMI_RETURN_STRING(WMI_TWT_DEL_DIALOG_CMDID);
37318         WMI_RETURN_STRING(WMI_TWT_PAUSE_DIALOG_CMDID);
37319         WMI_RETURN_STRING(WMI_TWT_RESUME_DIALOG_CMDID);
37320         WMI_RETURN_STRING(WMI_REQUEST_ROAM_SCAN_STATS_CMDID);
37321         WMI_RETURN_STRING(WMI_PEER_TID_CONFIGURATIONS_CMDID);
37322         WMI_RETURN_STRING(WMI_VDEV_SET_CUSTOM_SW_RETRY_TH_CMDID);
37323         WMI_RETURN_STRING(WMI_GET_TPC_POWER_CMDID);
37324         WMI_RETURN_STRING(WMI_MOTION_DET_CONFIG_PARAM_CMDID);
37325         WMI_RETURN_STRING(WMI_MOTION_DET_BASE_LINE_CONFIG_PARAM_CMDID);
37326         WMI_RETURN_STRING(WMI_MOTION_DET_START_STOP_CMDID);
37327         WMI_RETURN_STRING(WMI_MOTION_DET_BASE_LINE_START_STOP_CMDID);
37328         WMI_RETURN_STRING(WMI_SAR_LIMITS_CMDID);
37329         WMI_RETURN_STRING(WMI_SAR_GET_LIMITS_CMDID);
37330         WMI_RETURN_STRING(WMI_PEER_CHAN_WIDTH_SWITCH_CMDID);
37331         WMI_RETURN_STRING(WMI_PDEV_OBSS_PD_SPATIAL_REUSE_SET_DEF_OBSS_THRESH_CMDID);
37332         WMI_RETURN_STRING(WMI_PDEV_HE_TB_ACTION_FRM_CMDID);
37333         WMI_RETURN_STRING(WMI_HPCS_PULSE_START_CMDID);
37334         WMI_RETURN_STRING(WMI_VDEV_CHAINMASK_CONFIG_CMDID);
37335         WMI_RETURN_STRING(WMI_VDEV_BCN_OFFLOAD_QUIET_CONFIG_CMDID);
37336         WMI_RETURN_STRING(WMI_NDP_CMDID);
37337         WMI_RETURN_STRING(WMI_PDEV_PKTLOG_FILTER_CMDID);
37338         WMI_RETURN_STRING(WMI_SET_CURRENT_COUNTRY_CMDID);
37339         WMI_RETURN_STRING(WMI_VDEV_GET_BCN_RECEPTION_STATS_CMDID);
37340         WMI_RETURN_STRING(WMI_PEER_TX_PN_REQUEST_CMDID);
37341         WMI_RETURN_STRING(WMI_ROAM_BSS_LOAD_CONFIG_CMDID);
37342         WMI_RETURN_STRING(WMI_VDEV_GET_MWS_COEX_INFO_CMDID);
37343         WMI_RETURN_STRING(WMI_REQUEST_WLM_STATS_CMDID);
37344         WMI_RETURN_STRING(WMI_PDEV_SET_RAP_CONFIG_CMDID);
37345         WMI_RETURN_STRING(WMI_STA_TDCC_CONFIG_CMDID);
37346         WMI_RETURN_STRING(WMI_ROAM_DEAUTH_CONFIG_CMDID);
37347         WMI_RETURN_STRING(WMI_ROAM_IDLE_CONFIG_CMDID);
37348         WMI_RETURN_STRING(WMI_IDLE_TRIGGER_MONITOR_CMDID);
37349         WMI_RETURN_STRING(WMI_PDEV_DSM_FILTER_CMDID);
37350         WMI_RETURN_STRING(WMI_TWT_BTWT_INVITE_STA_CMDID);
37351         WMI_RETURN_STRING(WMI_TWT_BTWT_REMOVE_STA_CMDID);
37352         WMI_RETURN_STRING(WMI_OEM_DATA_CMDID);
37353         WMI_RETURN_STRING(WMI_ROAM_PREAUTH_STATUS_CMDID);
37354         WMI_RETURN_STRING(WMI_SET_ELNA_BYPASS_CMDID);
37355         WMI_RETURN_STRING(WMI_GET_ELNA_BYPASS_CMDID);
37356         WMI_RETURN_STRING(WMI_AUDIO_AGGR_ENABLE_CMDID);
37357         WMI_RETURN_STRING(WMI_AUDIO_AGGR_ADD_GROUP_CMDID);
37358         WMI_RETURN_STRING(WMI_AUDIO_AGGR_DEL_GROUP_CMDID);
37359         WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_GROUP_RATE_CMDID);
37360         WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_GROUP_RETRY_CMDID);
37361         WMI_RETURN_STRING(WMI_AUDIO_AGGR_UPDATE_STA_GROUP_INFO_CMDID);
37362         WMI_RETURN_STRING(WMI_CFR_CAPTURE_FILTER_CMDID);
37363         WMI_RETURN_STRING(WMI_ATF_SSID_GROUPING_REQUEST_CMDID);
37364         WMI_RETURN_STRING(WMI_ATF_GROUP_WMM_AC_CONFIG_REQUEST_CMDID);
37365         WMI_RETURN_STRING(WMI_PEER_ATF_EXT_REQUEST_CMDID);
37366         WMI_RETURN_STRING(WMI_GET_CHANNEL_ANI_CMDID);
37367         WMI_RETURN_STRING(WMI_SET_OCL_CMDID);
37368         WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_GROUP_AUTO_RATE_CMDID);
37369         WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_GROUP_PROBE_CMDID);
37370         WMI_RETURN_STRING(WMI_VDEV_AUDIO_SYNC_TRIGGER_CMDID);
37371         WMI_RETURN_STRING(WMI_VDEV_AUDIO_SYNC_QTIMER_CMDID);
37372         WMI_RETURN_STRING(WMI_ROAM_GET_SCAN_CHANNEL_LIST_CMDID);
37373         WMI_RETURN_STRING(WMI_VDEV_GET_BIG_DATA_CMDID);
37374         WMI_RETURN_STRING(WMI_PDEV_FRAME_INJECT_CMDID);
37375         WMI_RETURN_STRING(WMI_PDEV_TBTT_OFFSET_SYNC_CMDID);
37376         WMI_RETURN_STRING(WMI_VDEV_GET_BIG_DATA_P2_CMDID);
37377         WMI_RETURN_STRING(WMI_AUDIO_AGGR_GET_STATISTICS_CMDID);
37378         WMI_RETURN_STRING(WMI_AUDIO_AGGR_RESET_STATISTICS_CMDID);
37379         WMI_RETURN_STRING(WMI_ANT_CONTROLLER_CMDID);
37380         WMI_RETURN_STRING(WMI_SIMULATION_TEST_CMDID);
37381         WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_RTSCTS_CONFIG_CMDID);
37382         WMI_RETURN_STRING(WMI_REQUEST_CTRL_PATH_STATS_CMDID);
37383         WMI_RETURN_STRING(WMI_PDEV_GET_TPC_STATS_CMDID);
37384         WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_SCHED_METHOD_CMDID);
37385         WMI_RETURN_STRING(WMI_AUDIO_AGGR_GET_SCHED_METHOD_CMDID);
37386         WMI_RETURN_STRING(WMI_REQUEST_UNIFIED_LL_GET_STA_CMDID);
37387         WMI_RETURN_STRING(WMI_QOS_NULL_FRAME_TX_SEND_CMDID);
37388         WMI_RETURN_STRING(WMI_PDEV_ENABLE_DURATION_BASED_TX_MODE_SELECTION_CMDID);
37389         WMI_RETURN_STRING(WMI_TWT_NUDGE_DIALOG_CMDID);
37390         WMI_RETURN_STRING(WMI_VDEV_SET_TPC_POWER_CMDID);
37391         WMI_RETURN_STRING(WMI_VDEV_TID_LATENCY_CONFIG_CMDID);
37392         WMI_RETURN_STRING(WMI_PEER_TID_LATENCY_CONFIG_CMDID);
37393         WMI_RETURN_STRING(WMI_MLO_LINK_SET_ACTIVE_CMDID);
37394         WMI_RETURN_STRING(WMI_PDEV_GET_DPD_STATUS_CMDID);
37395         WMI_RETURN_STRING(WMI_MLO_SETUP_CMDID);
37396         WMI_RETURN_STRING(WMI_MLO_READY_CMDID);
37397         WMI_RETURN_STRING(WMI_MLO_TEARDOWN_CMDID);
37398         WMI_RETURN_STRING(WMI_VDEV_IGMP_OFFLOAD_CMDID);
37399         WMI_RETURN_STRING(WMI_MGMT_RX_REO_FILTER_CONFIGURATION_CMDID);
37400         WMI_RETURN_STRING(WMI_PDEV_SET_BIOS_SAR_TABLE_CMDID);
37401         WMI_RETURN_STRING(WMI_PDEV_SET_BIOS_GEO_TABLE_CMDID);
37402         WMI_RETURN_STRING(WMI_PDEV_GET_HALPHY_CAL_STATUS_CMDID);
37403         WMI_RETURN_STRING(WMI_PDEV_SET_HALPHY_CAL_BMAP_CMDID);
37404         WMI_RETURN_STRING(WMI_AFC_CMDID);
37405         WMI_RETURN_STRING(WMI_PDEV_MULTIPLE_VDEV_SET_PARAM_CMDID);
37406         WMI_RETURN_STRING(WMI_PDEV_MEC_AGING_TIMER_CONFIG_CMDID);
37407         WMI_RETURN_STRING(WMI_PEER_CONFIG_PPE_DS_CMDID);
37408         WMI_RETURN_STRING(WMI_VDEV_ENABLE_DISABLE_INTRA_BSS_CMDID);
37409         WMI_RETURN_STRING(WMI_PEER_ENABLE_DISABLE_INTRA_BSS_CMDID);
37410         WMI_RETURN_STRING(WMI_ROAM_MLO_CONFIG_CMDID);
37411         WMI_RETURN_STRING(WMI_REQUEST_THERMAL_STATS_CMDID);
37412         WMI_RETURN_STRING(WMI_PDEV_SET_BIOS_INTERFACE_CMDID);
37413         WMI_RETURN_STRING(WMI_VDEV_SET_MU_SNIF_CMDID);
37414         WMI_RETURN_STRING(WMI_VDEV_ICMP_OFFLOAD_CMDID);
37415         WMI_RETURN_STRING(WMI_ROAM_SET_PARAM_CMDID);
37416         WMI_RETURN_STRING(WMI_PDEV_FIPS_EXTEND_CMDID);
37417         WMI_RETURN_STRING(WMI_PDEV_FIPS_MODE_SET_CMDID);
37418         WMI_RETURN_STRING(WMI_SAWF_SVC_CLASS_CFG_CMDID);
37419         WMI_RETURN_STRING(WMI_SAWF_SVC_CLASS_DISABLE_CMDID);
37420         WMI_RETURN_STRING(WMI_VDEV_UPDATE_MAC_ADDR_CMDID);
37421         WMI_RETURN_STRING(WMI_SOC_TQM_RESET_ENABLE_DISABLE_CMDID);
37422         WMI_RETURN_STRING(WMI_VDEV_MULTIPLE_PEER_GROUP_CMDID);
37423         WMI_RETURN_STRING(WMI_VDEV_SET_LTF_KEY_SEED_CMDID);
37424         WMI_RETURN_STRING(WMI_RTT_PASN_AUTH_STATUS_CMD);
37425         WMI_RETURN_STRING(WMI_RTT_PASN_DEAUTH_CMD);
37426         WMI_RETURN_STRING(WMI_VDEV_PN_MGMT_RX_FILTER_CMDID);
37427         WMI_RETURN_STRING(WMI_PEER_RX_PN_REQUEST_CMDID);
37428         WMI_RETURN_STRING(WMI_SET_MULTIPLE_PDEV_VDEV_PARAM_CMDID);
37429         WMI_RETURN_STRING(WMI_PMM_SCRATCH_REG_ALLOCATION_CMDID);
37430         WMI_RETURN_STRING(WMI_MLO_PEER_TID_TO_LINK_MAP_CMDID);
37431         WMI_RETURN_STRING(WMI_ROAM_ENABLE_VENDOR_CONTROL_CMDID);
37432         WMI_RETURN_STRING(WMI_ROAM_GET_VENDOR_CONTROL_PARAM_CMDID);
37433         WMI_RETURN_STRING(WMI_REQUEST_HALPHY_CTRL_PATH_STATS_CMDID);
37434         WMI_RETURN_STRING(WMI_PEER_FLUSH_POLICY_CMDID);
37435         WMI_RETURN_STRING(WMI_WOW_COAP_ADD_PATTERN_CMDID);
37436         WMI_RETURN_STRING(WMI_WOW_COAP_DEL_PATTERN_CMDID);
37437         WMI_RETURN_STRING(WMI_WOW_COAP_ADD_KEEPALIVE_PATTERN_CMDID);
37438         WMI_RETURN_STRING(WMI_WOW_COAP_DEL_KEEPALIVE_PATTERN_CMDID);
37439         WMI_RETURN_STRING(WMI_WOW_COAP_GET_BUF_INFO_CMDID);
37440         WMI_RETURN_STRING(WMI_COEX_DBAM_CMDID);
37441         WMI_RETURN_STRING(WMI_PDEV_FEATURESET_CMDID);
37442         WMI_RETURN_STRING(WMI_VDEV_PARAM_ENABLE_SR_PROHIBIT_CMDID);
37443         WMI_RETURN_STRING(WMI_XGAP_ENABLE_CMDID);
37444         WMI_RETURN_STRING(WMI_PDEV_MESH_RX_FILTER_ENABLE_CMDID);
37445         WMI_RETURN_STRING(WMI_MLO_LINK_REMOVAL_CMDID);
37446         WMI_RETURN_STRING(WMI_MLO_AP_VDEV_TID_TO_LINK_MAP_CMDID);
37447         WMI_RETURN_STRING(WMI_PDEV_DIV_GET_RSSI_ANTID_CMDID);
37448         WMI_RETURN_STRING(WMI_PDEV_UPDATE_PMK_CACHE_CMDID);
37449         WMI_RETURN_STRING(WMI_PDEV_UPDATE_FILS_HLP_PKT_CMDID);
37450         WMI_RETURN_STRING(WMI_PDEV_SET_SRG_BSS_COLOR_BITMAP_CMDID);
37451         WMI_RETURN_STRING(WMI_PDEV_SET_SRG_PARTIAL_BSSID_BITMAP_CMDID);
37452         WMI_RETURN_STRING(WMI_PDEV_SET_SRG_OBSS_COLOR_ENABLE_BITMAP_CMDID);
37453         WMI_RETURN_STRING(WMI_PDEV_SET_SRG_OBSS_BSSID_ENABLE_BITMAP_CMDID);
37454         WMI_RETURN_STRING(WMI_PDEV_SET_NON_SRG_OBSS_COLOR_ENABLE_BITMAP_CMDID);
37455         WMI_RETURN_STRING(WMI_PDEV_SET_NON_SRG_OBSS_BSSID_ENABLE_BITMAP_CMDID);
37456         WMI_RETURN_STRING(WMI_VDEV_SET_PCL_CMDID);
37457         WMI_RETURN_STRING(WMI_PEER_RESERVED0_CMDID);
37458         WMI_RETURN_STRING(WMI_PEER_CFR_CAPTURE_CMDID);
37459         WMI_RETURN_STRING(WMI_PEER_CONFIG_VLAN_CMDID);
37460         WMI_RETURN_STRING(WMI_PEER_TX_FILTER_CMDID);
37461         WMI_RETURN_STRING(WMI_BCN_OFFLOAD_CTRL_CMDID);
37462         WMI_RETURN_STRING(WMI_PDEV_DFS_PHYERR_OFFLOAD_ENABLE_CMDID);
37463         WMI_RETURN_STRING(WMI_PDEV_DFS_PHYERR_OFFLOAD_DISABLE_CMDID);
37464         WMI_RETURN_STRING(WMI_VDEV_ADFS_CH_CFG_CMDID);
37465         WMI_RETURN_STRING(WMI_VDEV_ADFS_OCAC_ABORT_CMDID);
37466         WMI_RETURN_STRING(WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON_CMDID);
37467         WMI_RETURN_STRING(WMI_REQUEST_RCPI_CMDID);
37468         WMI_RETURN_STRING(WMI_WFA_CONFIG_CMDID);
37469         WMI_RETURN_STRING(WMI_HB_OIC_PING_OFFLOAD_PARAM_CMDID);
37470         WMI_RETURN_STRING(WMI_HB_OIC_PING_OFFLOAD_SET_ENABLE_CMDID);
37471         WMI_RETURN_STRING(WMI_HB_DHCP_LEASE_RENEW_OFFLOAD_CMDID);
37472         WMI_RETURN_STRING(WMI_RMC_SET_MANUAL_LEADER_CMDID);
37473         WMI_RETURN_STRING(WMI_11D_SCAN_START_CMDID);
37474         WMI_RETURN_STRING(WMI_11D_SCAN_STOP_CMDID);
37475         WMI_RETURN_STRING(WMI_VENDOR_PDEV_CMDID);
37476         WMI_RETURN_STRING(WMI_VENDOR_VDEV_CMDID);
37477         WMI_RETURN_STRING(WMI_VENDOR_PEER_CMDID);
37478         WMI_RETURN_STRING(WMI_VDEV_SET_TWT_EDCA_PARAMS_CMDID); /* XPAN TWT */
37479         WMI_RETURN_STRING(WMI_ESL_EGID_CMDID);
37480         WMI_RETURN_STRING(WMI_TDMA_SCHEDULE_REQUEST_CMDID);
37481         WMI_RETURN_STRING(WMI_HPA_CMDID);
37482         WMI_RETURN_STRING(WMI_PDEV_SET_TGTR2P_TABLE_CMDID); /* To set target rate to power table */
37483         WMI_RETURN_STRING(WMI_MLO_VDEV_GET_LINK_INFO_CMDID);
37484         WMI_RETURN_STRING(WMI_VDEV_SET_ULOFDMA_MANUAL_SU_TRIG_CMDID);
37485         WMI_RETURN_STRING(WMI_VDEV_SET_ULOFDMA_MANUAL_MU_TRIG_CMDID);
37486         WMI_RETURN_STRING(WMI_VDEV_STANDALONE_SOUND_CMDID);
37487         WMI_RETURN_STRING(WMI_PDEV_SET_RF_PATH_CMDID); /* set RF path of PHY */
37488         WMI_RETURN_STRING(WMI_VDEV_PAUSE_CMDID);
37489         WMI_RETURN_STRING(WMI_GPIO_STATE_REQ_CMDID);
37490         WMI_RETURN_STRING(WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_CMDID);
37491         WMI_RETURN_STRING(WMI_MLO_LINK_RECOMMENDATION_CMDID);
37492         WMI_RETURN_STRING(WMI_NAN_OEM_DATA_CMDID);
37493         WMI_RETURN_STRING(WMI_PDEV_WSI_STATS_INFO_CMDID);
37494         WMI_RETURN_STRING(WMI_CSA_EVENT_STATUS_INDICATION_CMDID);
37495         WMI_RETURN_STRING(WMI_VDEV_SCHED_MODE_PROBE_REQ_CMDID);
37496         WMI_RETURN_STRING(WMI_VDEV_OOB_CONNECTION_REQ_CMDID);
37497         WMI_RETURN_STRING(WMI_AUDIO_TRANSPORT_SWITCH_RESP_STATUS_CMDID);
37498         WMI_RETURN_STRING(WMI_PEER_MULTIPLE_REORDER_QUEUE_SETUP_CMDID);
37499         WMI_RETURN_STRING(WMI_COEX_MULTIPLE_CONFIG_CMDID);
37500         WMI_RETURN_STRING(WMI_PDEV_ENABLE_LED_BLINK_DOWNLOAD_TABLE_CMDID);
37501         WMI_RETURN_STRING(WMI_PDEV_ENABLE_WIFI_RADAR_CMDID);
37502         WMI_RETURN_STRING(WMI_VDEV_GET_TWT_SESSION_STATS_INFO_CMDID);
37503         WMI_RETURN_STRING(WMI_PDEV_ENABLE_XLNA_CMDID);
37504         WMI_RETURN_STRING(WMI_PDEV_SET_CUSTOM_TX_POWER_PER_MCS_CMDID);
37505     }
37506 
37507     return (A_UINT8 *) "Invalid WMI cmd";
37508 }
37509 #endif /* WMI_CMD_STRINGS */
37510 
37511 /**  WMI commands/events for the regulatory offload  */
37512 
37513 /** Host indicating current country code to FW */
37514 typedef struct {
37515     A_UINT32  tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_current_country_cmd_fixed_param */
37516     A_UINT32  pdev_id;
37517     A_UINT32  new_alpha2; /** alpha2 characters representing the country code */
37518 } wmi_set_current_country_cmd_fixed_param;
37519 
37520 typedef enum {
37521     WMI_COUNTRYCODE_ALPHA2,
37522     WMI_COUNTRYCODE_COUNTRY_ID,
37523     WMI_COUNTRYCODE_DOMAIN_CODE,
37524 } WMI_COUNTRYCODE_TYPE;
37525 
37526 typedef struct {
37527     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_init_country_cmd_fixed_param */
37528     A_UINT32 pdev_id;
37529     A_UINT32 countrycode_type; /* WMI_COUNTRYCODE_TYPE */
37530     union {
37531         struct {
37532             /* Three character for alpha2. The first two is ISO name for country the last one
37533             present if it is indoor and out door.  First char in bits 7:0 and second char in bits 15:8 ... */
37534             A_UINT32  alpha2:24,
37535                       unused:8;
37536         };
37537         A_UINT32 country_id;   /* Country ID */
37538         A_UINT32 domain_code;  /* Domain code */
37539     } country_code;
37540 } wmi_set_init_country_cmd_fixed_param;
37541 
37542 typedef enum {
37543     /**
37544      * serv_resp_format_type will indicate the format in which afc_serv data
37545      * is written into host/target shared memory
37546      * This type can be expanded in future as per requirements.
37547      */
37548     AFC_SERV_RESP_FORMAT_JSON = 0,
37549     AFC_SERV_RESP_FORMAT_BINARY = 1,
37550     AFC_SERV_RESP_FORMAT_IGNORE = 2, /* When cmd type is reset,server response is set to FORMAT_IGNORE */
37551 } WMI_AFC_SERV_RESP_FORMAT_TYPE;
37552 
37553 typedef enum {
37554     /**
37555      * wmi_afc_cmd_type will indicate type of AFC command sent to FW.
37556      * Once AFC server writes data at TZ memory location SERV_RESP_READY
37557      * type command is sent to FW.
37558      * This type can be expanded in future as per requirements.
37559      */
37560     WMI_AFC_CMD_SERV_RESP_READY = 1,
37561     WMI_AFC_CMD_RESET = 2, /* Added cmd type to handle AFC reset */
37562     WMI_AFC_CMD_CLEAR_PAYLOAD = 3, /* Added cmd type to clear AFC response payload in proxy mode */
37563 } WMI_AFC_CMD_TYPE;
37564 
37565 /** Host indicating AFC info availability to FW */
37566 typedef struct {
37567      A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_afc_cmd_fixed_param */
37568      A_UINT32 pdev_id;
37569      A_UINT32 cmd_type; /* refer WMI_AFC_CMD_TYPE */
37570      A_UINT32 serv_resp_format; /* refer WMI_AFC_SERV_RESP_FORMAT_TYPE */
37571 } wmi_afc_cmd_fixed_param;
37572 
37573 /** Host indicates AFC info availability to FW using WMI_AFC_CMD
37574  * This AFC info is written by AFC application/ server in host/target
37575  * shared memory reserved during bootup.
37576  * The structure is placeholder, indicating way afc_serv_resp is written in FW.
37577  * This structure will not be attach as input to WMI command.
37578  * This structure will be common to both host and FW.
37579  * The structure of this WMI AFC info is as follows.
37580  */
37581 typedef struct {
37582     A_UINT32 tlv_header;   /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_afc_serv_resp_struct */
37583     A_UINT32 status;       /* validity flag to be updated by TZ/ PF stub layer,
37584                             * to indicate if payload is valid or not.
37585                             * status = 1 will indicate payload is valid. */
37586     A_UINT32 time_to_live; /* Total time for which this AFC info is valid in seconds */
37587     A_UINT32 length;       /* length of the payload, in bytes */
37588     A_UINT32 payload_format; /* The format of payload written in FW memory:
37589                               * 0 -> JSON format
37590                               * 1 -> Binary format
37591                               * Refer to WMI_AFC_SERV_RESP_FORMAT_TYPE.
37592                               */
37593     /*
37594      * The structure above is followed by array of char which will have
37595      * JSON string or binary data, as specified by the payload_format field.
37596      * A_CHAR bufp[];    AFC payload (JSON string or binary data)
37597      */
37598 } wmi_afc_serv_resp_struct;
37599 
37600 /*
37601  * The following structures define the format used for AFC binary data objects
37602  * shared by the host SW and target FW.
37603  * FW expects these structures to be written in shared memory in little-endian
37604  * format. If the host/AFC app uses big endian format, Host/APP needs to
37605  * byteswap the data, so FW will get data in the expected little-endian format.
37606  */
37607 typedef struct {
37608     A_UINT32 freq_info; /* bits 15:0  = u16 start_freq,
37609                          * bits 31:16 = u16 end_freq
37610                          * both in MHz units
37611                          */
37612     A_INT32 max_psd;     /* Maximum PSD in dBm/MHz, value is stored in 0.01 dBm/MHz steps */
37613 } afc_freq_info;
37614 
37615 typedef struct {
37616     A_UINT32 channel_cfi;  /* channel center frequency index */
37617     /*
37618      * maximum permissible EIRP available for above CFI in dBm,
37619      * value is stored in 0.01 dBm steps.
37620      * Note: This A_UINT32 field can receive negative EIRP value from AFC
37621      * server. These negative EIRP value cases are handled internally.
37622      */
37623     A_UINT32 max_eirp_pwr;
37624 } afc_eirp_info;
37625 
37626 typedef struct {
37627     A_UINT32 global_operating_class;
37628     A_UINT32 num_channels; /* num of valid channels for above global operating class */
37629     /* This structure is followed by (num_channels*sizeof(afc_eirp_info))
37630      * bytes array:
37631      *     afc_eirp_info eirp_info[num_channels];
37632      *     List of channel cfi and eirp power values,
37633      *     Total size will be num_channels * sizeof(afc_eirp_info)
37634      */
37635 } afc_channel_info;
37636 
37637 /*
37638  * For case of afc_server_resp containing binary payload, the buf pointer
37639  * in wmi_afc_serv_resp_struct will be poiniting to binary format payload
37640  * which is in the format defined below.
37641  */
37642 typedef struct {
37643     A_UINT32 local_error_code;   /* Internal error code between AFC app and target success = 0, General failure = 1 */
37644     A_UINT32 version;            /* Internal version between AFC app and Target for structure pattern */
37645     A_UINT32 afc_wfa_version;    /* Version defined in AFC spec document. bits 15:0 -- minor version & bits 31:16 -- major version */
37646     A_UINT32 request_id;         /* AFC unique request ID */
37647     A_UINT32 avail_exp_time_d;   /* avail_exp_time_d and avail_exp_time_t are in UTC
37648                                   * Availability expiry time date format: YYYY-MM-DD,
37649                                   * bits 7:0 -DD - Day (expected values 1-31)
37650                                   * bits 15:8 -MM - Month (expected values 1-12)
37651                                   * bits 31:16 -YYYY - Year
37652                                   */
37653     A_UINT32 avail_exp_time_t;   /* Availability expiry time format HH-MM-SS
37654                                   * bits 7:0 -SS - Time in Sec (expected values 0-59)
37655                                   * bits 15:8 -MM - Minute (expected values 0-59)
37656                                   * bits 23:16 -HH - Hour (expected values 0-23)
37657                                   * bits 31:24 -reserved
37658                                   */
37659     A_INT32 afc_serv_resp_code;   /* response code defined in afc wfa document, refer WMI_AFC_SERV_RESP_CODE */
37660     A_UINT32 num_frequency_obj;   /* Total number of frequency objects */
37661     A_UINT32 num_channel_obj;     /* Total number of frequency objects */
37662     char shortdesc[64];           /* This field represents a short description related to the result indicated by the response_code
37663                                    * field. End of description will be indicated by 0 */
37664     A_UINT32 reserved[2];         /* reserve space for future fields - needs to be set to 0x0 */
37665 
37666     /*
37667      * This structure is followed by an array of frequency info and
37668      * channel info array:
37669      *   - afc_freq_info freq_info[num_frequency_obj];
37670      *     List of frequency power values, total size will be
37671      *     num_frequency_obj * sizeof(afc_freq_info)
37672      *   - afc_channel_info chan_info[num_channel_obj];
37673      *     List of channel power values, total size will be
37674      *     num_channel_obj * sizeof(afc_channel_info)
37675      */
37676 } afc_spectrum_inquiry_resp_bin_type;
37677 
37678 typedef struct {
37679     /** TLV tag and len; tag equals
37680      * WMITLV_TAG_STRUC_wmi_vdev_enable_disable_intra_bss_cmd_fixed_param
37681      */
37682     A_UINT32 tlv_header;
37683     /** The corresponding vdev_id.
37684      */
37685     A_UINT32 vdev_id;
37686     /* Enable/Disable intra_bss.
37687      */
37688     A_UINT32 enable;
37689 } wmi_vdev_enable_disable_intra_bss_cmd_fixed_param;
37690 
37691 typedef struct {
37692     /** TLV tag and len; tag equals
37693      * WMITLV_TAG_STRUC_wmi_peer_enable_disable_intra_bss_cmd_fixed_param
37694      */
37695     A_UINT32 tlv_header;
37696     /** Mac Address of the peer.
37697      */
37698     wmi_mac_addr mac_addr;
37699     /** The corresponding vdev_id.
37700      */
37701     A_UINT32 vdev_id;
37702     /* Enable/Disable intra_bss.
37703      */
37704     A_UINT32 enable;
37705 } wmi_peer_enable_disable_intra_bss_cmd_fixed_param;
37706 
37707 /* Freq units in MHz */
37708 #define WMI_REG_RULE_START_FREQ_GET(freq_info)                     WMI_GET_BITS(freq_info, 0, 16)
37709 #define WMI_REG_RULE_START_FREQ_SET(freq_info, value)              WMI_SET_BITS(freq_info, 0, 16, value)
37710 #define WMI_REG_RULE_END_FREQ_GET(freq_info)                       WMI_GET_BITS(freq_info, 16, 16)
37711 #define WMI_REG_RULE_END_FREQ_SET(freq_info, value)                WMI_SET_BITS(freq_info, 16, 16, value)
37712 
37713 /* BW in MHz */
37714 #define WMI_REG_RULE_MAX_BW_GET(bw_pwr_info)                       WMI_GET_BITS(bw_pwr_info, 0, 16)
37715 #define WMI_REG_RULE_MAX_BW_SET(bw_pwr_info, value)                WMI_SET_BITS(bw_pwr_info, 0, 16, value)
37716 /* regpower in dBm */
37717 #define WMI_REG_RULE_REG_POWER_GET(bw_pwr_info)                    WMI_GET_BITS(bw_pwr_info, 16, 8)
37718 #define WMI_REG_RULE_REG_POWER_SET(bw_pwr_info, value)             WMI_SET_BITS(bw_pwr_info, 16, 8, value)
37719 /* antenna gain */
37720 #define WMI_REG_RULE_ANTENNA_GAIN_GET(bw_pwr_info)                 WMI_GET_BITS(bw_pwr_info, 24, 8)
37721 #define WMI_REG_RULE_ANTENNA_GAIN_SET(bw_pwr_info, value)          WMI_SET_BITS(bw_pwr_info, 24, 8, value)
37722 
37723 typedef enum {
37724     WMI_REG_FLAG_CHAN_NO_IR           = 0x0001, /* passive channel */
37725     WMI_REG_FLAG_CHAN_RADAR           = 0x0002, /* dfs channel */
37726     WMI_REG_FLAG_CHAN_NO_OFDM         = 0x0004, /* no ofdm channel */
37727     WMI_REG_FLAG_CHAN_INDOOR_ONLY     = 0x0008, /* indoor only channel */
37728 } WMI_REGULATORY_FLAGS;
37729 
37730 #define WMI_REG_RULE_FLAGS_GET(flag_info)                    WMI_GET_BITS(flag_info, 0, 16)
37731 #define WMI_REG_RULE_FLAGS_SET(flag_info, value)             WMI_SET_BITS(flag_info, 0, 16, value)
37732 
37733 typedef struct {
37734     A_UINT32  tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_rule_struct */
37735     A_UINT32  freq_info;       /* bits 15:0  = u16 start_freq,
37736                                 * bits 31:16 = u16 end_freq
37737                                 * (both in MHz units) */
37738     A_UINT32  bw_pwr_info;     /* bits 15:0  = u16 max_bw (MHz units),
37739                                   bits 23:16 = u8 reg_power (dBm units),
37740                                   bits 31:24 = u8 ant_gain (dB units) */
37741     A_UINT32  flag_info;       /* bits 15:0  = u16 flags,
37742                                   bits 31:16 reserved */
37743 } wmi_regulatory_rule_struct;
37744 
37745 #define WMI_REG_RULE_PSD_FLAG_GET(psd_power_info) \
37746     WMI_GET_BITS(psd_power_info, 0, 1)
37747 #define WMI_REG_RULE_PSD_FLAG_SET(psd_power_info, value) \
37748     WMI_SET_BITS(psd_power_info, 0, 1, value)
37749 
37750 #define WMI_REG_RULE_PSD_EIRP_GET(psd_power_info) \
37751     WMI_GET_BITS(psd_power_info, 16, 16)
37752 #define WMI_REG_RULE_PSD_EIRP_SET(psd_power_info, value) \
37753     WMI_SET_BITS(psd_power_info, 16, 16, value)
37754 
37755 typedef struct {
37756     A_UINT32  tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_rule_ext_struct */
37757     A_UINT32  freq_info;       /* bits 15:0  = u16 start_freq,
37758                                   bits 31:16 = u16 end_freq
37759                                   (both in MHz units)
37760                                   use same MACRO as wmi_regulatory_rule_struct
37761                                 */
37762     A_UINT32  bw_pwr_info;     /* bits 15:0  = u16 max_bw (MHz units),
37763                                   bits 23:16 = u8 reg_power (dBm units),
37764                                   bits 31:24 = u8 ant_gain (dB units)
37765                                   use same MACRO as wmi_regulatory_rule_struct
37766                                 */
37767     A_UINT32  flag_info;       /* bits 15:0  = u16 flags,
37768                                   bits 31:16 reserved
37769                                   use same MACRO as wmi_regulatory_rule_struct
37770                                 */
37771     A_UINT32  psd_power_info;  /* bits 0     - whether PSD power,
37772                                   bits 15:1  - reserved
37773                                   bits 31:16 - maximum PSD EIRP (dB/MHz)
37774                                 */
37775 /*
37776  * NOTE: no further fields can be added into this struct, due to
37777  * message buffer size limitations in certain targets for the
37778  * WMI_REG_CHAN_LIST_CC_EXT_EVENT message.
37779  */
37780 } wmi_regulatory_rule_ext_struct;
37781 
37782 #define WMI_REG_CHAN_PRIORITY_FREQ_GET(freq_info)        WMI_GET_BITS(freq_info, 0, 16)
37783 #define WMI_REG_CHAN_PRIORITY_FREQ_SET(freq_info, value) WMI_SET_BITS(freq_info, 0, 16, value)
37784 
37785 typedef struct {
37786     A_UINT32  tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_chan_priority_struct */
37787     A_UINT32  freq_info;
37788     /* freq_info:
37789      * bits 15:0 = u16 Cutoff Frequency value for Prioritization (in MHz units)
37790      *             The frequencies above this value will be prioritized and
37791      *             the frequencies below this value will be de-prioritized.
37792      * bits 31:16 = reserved for future
37793      */
37794 /*
37795  * NOTE: no further fields can be added into this struct, due to
37796  * message buffer size limitations in certain targets for the
37797  * WMI_REG_CHAN_LIST_CC_EXT_EVENT message.
37798  */
37799 } wmi_regulatory_chan_priority_struct;
37800 
37801 #define WMI_REG_FCC_RULE_CHAN_FREQ_GET(freq_info)           WMI_GET_BITS(freq_info, 0, 16)
37802 #define WMI_REG_FCC_RULE_CHAN_FREQ_SET(freq_info, value)    WMI_SET_BITS(freq_info, 0, 16, value)
37803 #define WMI_REG_FCC_RULE_FCC_TX_POWER_GET(freq_info)        WMI_GET_BITS(freq_info, 16, 8)
37804 #define WMI_REG_FCC_RULE_FCC_TX_POWER_SET(freq_info, value) WMI_SET_BITS(freq_info, 16, 8, value)
37805 
37806 typedef struct {
37807     A_UINT32  tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_fcc_rule_struct */
37808     A_UINT32  freq_info;
37809     /* freq_info:
37810      * bits 15:0  = u16 channel frequency (in MHz units)
37811      * bits 23:16 = u8 FCC_Tx_power (dBm units)
37812      * bits 31:24 = u8 reserved for future
37813      */
37814 /*
37815  * NOTE: no further fields can be added into this struct, due to
37816  * message buffer size limitations in certain targets for the
37817  * WMI_REG_CHAN_LIST_CC_EXT_EVENT message.
37818  */
37819 } wmi_regulatory_fcc_rule_struct;
37820 
37821 typedef enum {
37822     WMI_REG_DFS_UNINIT_REGION = 0,
37823     WMI_REG_DFS_FCC_REGION    = 1,
37824     WMI_REG_DFS_ETSI_REGION   = 2,
37825     WMI_REG_DFS_MKK_REGION    = 3,
37826     WMI_REG_DFS_CN_REGION     = 4,
37827     WMI_REG_DFS_KR_REGION     = 5,
37828 
37829     /* Add new items above */
37830     WMI_REG_DFS_UNDEF_REGION = 0xFFFF,
37831 } WMI_REG_DFS_REGION;
37832 
37833 typedef enum {
37834     WMI_REGULATORY_PHYMODE_NO11A    = 0x0001,  /* NO 11A */
37835     WMI_REGULATORY_PHYMODE_NO11B    = 0x0002,  /* NO 11B */
37836     WMI_REGULATORY_PHYMODE_NO11G    = 0x0004,  /* NO 11G */
37837     WMI_REGULATORY_PHYMODE_NO11N    = 0x0008,  /* NO 11N */
37838     WMI_REGULATORY_PHYMODE_NO11AC   = 0x0010,  /* NO 11AC */
37839     WMI_REGULATORY_PHYMODE_NO11AX   = 0x0020,  /* NO 11AX */
37840     WMI_REGULATORY_PHYMODE_NO11BE   = 0x0040,  /* NO 11BE */
37841 } WMI_REGULATORY_PHYBITMAP;
37842 
37843 typedef enum {
37844     WMI_REG_SET_CC_STATUS_PASS = 0,
37845     WMI_REG_CURRENT_ALPHA2_NOT_FOUND = 1,
37846     WMI_REG_INIT_ALPHA2_NOT_FOUND = 2,
37847     WMI_REG_SET_CC_CHANGE_NOT_ALLOWED = 3,
37848     WMI_REG_SET_CC_STATUS_NO_MEMORY = 4,
37849     WMI_REG_SET_CC_STATUS_FAIL = 5,
37850 } WMI_REG_SET_CC_STATUS_CODE;
37851 
37852 typedef struct {
37853     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_reg_chan_list_cc_event_fixed_param */
37854     A_UINT32 status_code; /* WMI_REG_SET_CC_STATUS_CODE */
37855     A_UINT32 phy_id;
37856     A_UINT32 alpha2;
37857     A_UINT32 num_phy;
37858     A_UINT32 country_id;
37859     A_UINT32 domain_code;
37860     A_UINT32 dfs_region;  /* WMI_REG_DFS_REGION */
37861     A_UINT32 phybitmap;   /* WMI_REGULATORY_PHYBITMAP */
37862     A_UINT32 min_bw_2g;   /* BW in MHz */
37863     A_UINT32 max_bw_2g;   /* BW in MHz */
37864     A_UINT32 min_bw_5g;   /* BW in MHz */
37865     A_UINT32 max_bw_5g;   /* BW in MHz */
37866     A_UINT32 num_2g_reg_rules;
37867     A_UINT32 num_5g_reg_rules;
37868 /*
37869  * followed by wmi_regulatory_rule_struct TLV array. First 2G and then 5G
37870  * - wmi_regulatory_fcc_rule_struct reg_fcc_rule[]
37871  */
37872 } wmi_reg_chan_list_cc_event_fixed_param;
37873 
37874 typedef enum {
37875     WMI_REG_CLIENT_REGULAR = 0,
37876     WMI_REG_CLIENT_SUBORDINATE = 1,
37877     /* 2 and 3 are reserved for future growth */
37878     WMI_REG_CLIENT_MAX = 4, /* can't expand, b/c used as array length below */
37879 } wmi_reg_client_type;
37880 
37881 typedef struct {
37882     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_reg_chan_list_cc_event_ext_fixed_param */
37883     A_UINT32 status_code; /* WMI_REG_SET_CC_STATUS_CODE */
37884     A_UINT32 phy_id;
37885     A_UINT32 alpha2;
37886     A_UINT32 num_phy;
37887     A_UINT32 country_id;  /* uses CountryCode enum values */
37888     A_UINT32 domain_code; /* used EnumRd enum values */
37889     A_UINT32 dfs_region;  /* WMI_REG_DFS_REGION */
37890     A_UINT32 phybitmap;   /* WMI_REGULATORY_PHYBITMAP */
37891     A_UINT32 min_bw_2g;   /* BW in MHz */
37892     A_UINT32 max_bw_2g;   /* BW in MHz */
37893     A_UINT32 min_bw_5g;   /* BW in MHz */
37894     A_UINT32 max_bw_5g;   /* BW in MHz */
37895     A_UINT32 num_2g_reg_rules;
37896     A_UINT32 num_5g_reg_rules;
37897     A_UINT32 client_type;            /* populated if device can function as client */
37898     A_UINT32 rnr_tpe_usable;         /* If RNR TPE Octet usable for that country   */
37899     A_UINT32 unspecified_ap_usable;  /* If unspecified AP usable for that country  */
37900     A_UINT32 domain_code_6g_ap_lpi;
37901     A_UINT32 domain_code_6g_ap_sp;
37902     A_UINT32 domain_code_6g_ap_vlp;
37903     A_UINT32 domain_code_6g_client_lpi[WMI_REG_CLIENT_MAX];
37904     A_UINT32 domain_code_6g_client_sp[WMI_REG_CLIENT_MAX];
37905     A_UINT32 domain_code_6g_client_vlp[WMI_REG_CLIENT_MAX];
37906     A_UINT32 domain_code_6g_super_id;
37907     A_UINT32 min_bw_6g_ap_sp; /* MHz */
37908     A_UINT32 max_bw_6g_ap_sp;
37909     A_UINT32 min_bw_6g_ap_lpi;
37910     A_UINT32 max_bw_6g_ap_lpi;
37911     A_UINT32 min_bw_6g_ap_vlp;
37912     A_UINT32 max_bw_6g_ap_vlp;
37913     A_UINT32 min_bw_6g_client_sp[WMI_REG_CLIENT_MAX];
37914     A_UINT32 max_bw_6g_client_sp[WMI_REG_CLIENT_MAX];
37915     A_UINT32 min_bw_6g_client_lpi[WMI_REG_CLIENT_MAX];
37916     A_UINT32 max_bw_6g_client_lpi[WMI_REG_CLIENT_MAX];
37917     A_UINT32 min_bw_6g_client_vlp[WMI_REG_CLIENT_MAX];
37918     A_UINT32 max_bw_6g_client_vlp[WMI_REG_CLIENT_MAX];
37919     A_UINT32 num_6g_reg_rules_ap_sp;
37920     A_UINT32 num_6g_reg_rules_ap_lpi;
37921     A_UINT32 num_6g_reg_rules_ap_vlp;
37922     A_UINT32 num_6g_reg_rules_client_sp[WMI_REG_CLIENT_MAX];
37923     A_UINT32 num_6g_reg_rules_client_lpi[WMI_REG_CLIENT_MAX];
37924     A_UINT32 num_6g_reg_rules_client_vlp[WMI_REG_CLIENT_MAX];
37925 /*
37926  * NOTE: no further fields can be added into this struct, due to
37927  * message buffer size limitations in certain targets for the
37928  * WMI_REG_CHAN_LIST_CC_EXT_EVENT message.
37929  */
37930 /*
37931  * This fixed_param TLV is followed by the following TLVs:
37932  *   - wmi_regulatory_rule_ext reg_rule_array[] struct TLV array.
37933  *     Within the reg rule ext TLV array, the 2G elements occur first,
37934  *     then the 5G elements, then the 6G elements (AP LPI, AP SP, AP VLP,
37935  *     client LPI x4, client SP x4, client VLP x4).
37936  *   - wmi_regulatory_chan_priority_struct reg_chan_priority[]
37937  *   - wmi_regulatory_fcc_rule_struct reg_fcc_rule[]
37938  */
37939 } wmi_reg_chan_list_cc_event_ext_fixed_param;
37940 
37941 typedef struct {
37942     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_reg_chan_list_cc_event_ext2_fixed_param */
37943     A_UINT32 is_c2c_supported;
37944     A_UINT32 domain_code_6ghz_c2c_lpi;
37945     A_UINT32 domain_code_6ghz_c2c_sp;
37946     A_UINT32 min_bw_6ghz_c2c_lpi;
37947     A_UINT32 max_bw_6ghz_c2c_lpi;
37948     A_UINT32 min_bw_6ghz_c2c_sp;
37949     A_UINT32 max_bw_6ghz_c2c_sp;
37950     A_UINT32 num_6ghz_reg_rules_c2c_lpi;
37951     A_UINT32 num_6ghz_reg_rules_c2c_sp;
37952 
37953 /*
37954  * This fixed_param TLV is followed by the following TLVs:
37955  *   - wmi_regulatory_rule_ext reg_rule_array[] struct TLV array.
37956  */
37957 } wmi_reg_chan_list_cc_event_ext2_fixed_param;
37958 
37959 /* WFA AFC Version */
37960 #define WMI_AFC_WFA_MINOR_VERSION_GET(afc_wfa_version)             WMI_GET_BITS(afc_wfa_version, 0, 16)
37961 #define WMI_AFC_WFA_MINOR_VERSION_SET(afc_wfa_version, value)      WMI_SET_BITS(afc_wfa_version, 0, 16, value)
37962 #define WMI_AFC_WFA_MAJOR_VERSION_GET(afc_wfa_version)             WMI_GET_BITS(afc_wfa_version, 16, 16)
37963 #define WMI_AFC_WFA_MAJOR_VERSION_SET(afc_wfa_version, value)      WMI_SET_BITS(afc_wfa_version, 16, 16, value)
37964 
37965 /* avail_exp_time_d time is expected as YYYY-MM-DD */
37966 #define WMI_AVAIL_EXPIRY_TIME_DAY_GET(avail_exp_time_d)             WMI_GET_BITS(avail_exp_time_d, 0, 8)
37967 #define WMI_AVAIL_EXPIRY_TIME_DAY_SET(avail_exp_time_d, value)      WMI_SET_BITS(avail_exp_time_d, 0, 8, value)
37968 #define WMI_AVAIL_EXPIRY_TIME_MONTH_GET(avail_exp_time_d)           WMI_GET_BITS(avail_exp_time_d, 8, 8)
37969 #define WMI_AVAIL_EXPIRY_TIME_MONTH_SET(avail_exp_time_d, value)    WMI_SET_BITS(avail_exp_time_d, 8, 8, value)
37970 #define WMI_AVAIL_EXPIRY_TIME_YEAR_GET(avail_exp_time_d)            WMI_GET_BITS(avail_exp_time_d, 16, 16)
37971 #define WMI_AVAIL_EXPIRY_TIME_YEAR_SET(avail_exp_time_d, value)     WMI_SET_BITS(avail_exp_time_d, 16, 16, value)
37972 
37973 /* avail_exp_time_t time is expected as HH-MM-SS */
37974 #define WMI_AVAIL_EXPIRY_TIME_SEC_GET(avail_exp_time_t)             WMI_GET_BITS(avail_exp_time_t, 0, 8)
37975 #define WMI_AVAIL_EXPIRY_TIME_SEC_SET(avail_exp_time_t, value)      WMI_SET_BITS(avail_exp_time_t, 0, 8, value)
37976 #define WMI_AVAIL_EXPIRY_TIME_MINUTE_GET(avail_exp_time_t)          WMI_GET_BITS(avail_exp_time_t, 8, 8)
37977 #define WMI_AVAIL_EXPIRY_TIME_MINUTE_SET(avail_exp_time_t, value)   WMI_SET_BITS(avail_exp_time_t, 8, 8, value)
37978 #define WMI_AVAIL_EXPIRY_TIME_HOUR_GET(avail_exp_time_t)            WMI_GET_BITS(avail_exp_time_t, 16, 8)
37979 #define WMI_AVAIL_EXPIRY_TIME_HOUR_SET(avail_exp_time_t, value)     WMI_SET_BITS(avail_exp_time_t, 16, 8, value)
37980 
37981 typedef enum {
37982     /**
37983      * The following event type is mutually exclusive.
37984      * afc_event_type will indicate type of AFC event sent from FW to host.
37985      * 1. For sending Power Info WMI_AFC_EVENT_POWER_INFO event is used.
37986      * 2. For sending AFC expiry use WMI_AFC_EVENT_TIMER_EXPIRY
37987      * This type can be expanded in future as per requirements.
37988      */
37989     WMI_AFC_EVENT_POWER_INFO   = 1,
37990     WMI_AFC_EVENT_TIMER_EXPIRY = 2,
37991 } WMI_AFC_EVENT_TYPE;
37992 
37993 typedef enum {
37994     /**
37995      * The following afc_expiry_event_subtype is mutually exclusive
37996      * and is a part of expiry event.
37997      * 1. At boot up AFC expiry will contain AFC start.
37998      * 2. If AFC timer expires AFC_RENEW status code will be sent to host
37999      *    with expiry event.
38000      * 3. If AFC server is not responding to FW in specified time, FW will
38001      *    indicate host to switch to LPI.
38002      * 4. In SP mode, if AFC server is not responding to FW in
38003      *    specified time then FW will indicate host to stop TX since
38004      *    there are no lower power mode available.
38005      */
38006     WMI_AFC_EXPIRY_EVENT_START                    = 1,
38007     WMI_AFC_EXPIRY_EVENT_RENEW                    = 2,
38008     WMI_AFC_EXPIRY_EVENT_SWITCH_TO_LOW_POWER_MODE = 3,
38009         /* retain the deprecated old name as an alias for the new name */
38010         WMI_AFC_EXPIRY_EVENT_SWITCH_TO_LPI =
38011             WMI_AFC_EXPIRY_EVENT_SWITCH_TO_LOW_POWER_MODE,
38012     WMI_AFC_EXPIRY_EVENT_STOP_TX                  = 4,
38013 } WMI_AFC_EXPIRY_EVENT_SUBTYPE;
38014 
38015 typedef enum {
38016     /**
38017      * The following fw_status_code is mutually exclusive
38018      * and is used in power event.
38019      * 0. AFC power event is success.
38020      * 1. If Host does not indicate AFC indication cmd within certain time
38021      *    of AFC expiry FW_AFC_POWER_EVENT_RESP_NOT_RECEIVED will be used.
38022      * 2. If FW is not able to parse afc_info, parsing_failure will be
38023      *    indicated using WMI_FW_AFC_POWER_EVENT_RESP_NOT_RECEIVED.
38024      * 3. If due to some local reason AFC event is failed, AFC event failure
38025      *    is indicated using WMI_FW_AFC_POWER_EVENT_FAILURE.
38026      */
38027     WMI_FW_AFC_POWER_EVENT_SUCCESS              = 0,
38028     WMI_FW_AFC_POWER_EVENT_RESP_NOT_RECEIVED    = 1,
38029     WMI_FW_AFC_POWER_EVENT_RESP_PARSING_FAILURE = 2,
38030     WMI_FW_AFC_POWER_EVENT_FAILURE              = 3,
38031 } WMI_FW_AFC_POWER_EVENT_STATUS_CODE;
38032 
38033 typedef enum {
38034     /**
38035      * The following afc_server_resp_code is mutually exclusive.
38036      * This response code will be indicated to AFC server.
38037      * These codes are defined in WIFI spec doc for AFC as follows
38038      * -1: General Failure
38039      * 0:  Success
38040      * 100 - 199: General errors related to the protocol
38041      * 300 - 399: Error events specific to message exchange for the
38042      *            Available Spectrum Inquiry
38043      */
38044     WMI_AFC_SERV_RESP_GENERAL_FAILURE        = -1,
38045     WMI_AFC_SERV_RESP_SUCCESS                = 0,
38046     WMI_AFC_SERV_RESP_VERSION_NOT_SUPPORTED  = 100,
38047     WMI_AFC_SERV_RESP_DEVICE_UNALLOWED       = 101,
38048     WMI_AFC_SERV_RESP_MISSING_PARAM          = 102,
38049     WMI_AFC_SERV_RESP_INVALID_VALUE          = 103,
38050     WMI_AFC_SERV_RESP_UNEXPECTED_PARAM       = 106,
38051     WMI_AFC_SERV_RESP_UNSUPPORTED_SPECTRUM   = 300,
38052 } WMI_AFC_SERV_RESP_CODE;
38053 
38054 typedef struct {
38055     /** TLV tag and len;
38056      *  tag equals WMITLV_TAG_STRUC_wmi_afc_event_fixed_param */
38057     A_UINT32 tlv_header;
38058     A_UINT32 phy_id;
38059     A_UINT32 event_type; /* refer to WMI_AFC_EVENT_TYPE */
38060 
38061     /** This TLV is (optionally) followed by TLV and TLV arrays containing
38062      *  different afc_event:
38063      *  1.  wmi_afc_expiry_event_param expiry_evt;
38064      *      This TLV contains afc_expiry_event_param of fixed size.
38065      *  2.  wmi_reg_afc_power_event_param afc_power_event;
38066      *      This TLV contains afc_power_info_param of fixed size.
38067      *  3.  wmi_6g_afc_frequency_info freq_info[]
38068      *      This TLV array contains zero or more TLVs of freq_info,
38069      *      which contain freq range and PSD.
38070      *  4.  wmi_6g_afc_channel_info channel_info[]
38071      *      This TLV array contains zero or more TLVs of global_operating
38072      *      class and number of channel
38073      *      in each global operating class
38074      *  5.  wmi_afc_chan_eirp_power_info chan_eirp_power_info[]
38075      *      This TLV array contains zero or more TLVs of channel CFI and
38076      *      EIRP power values for each of the total number of channels
38077      *      per global operating class.
38078      */
38079 } wmi_afc_event_fixed_param;
38080 
38081 typedef struct {
38082     /** TLV tag and len;
38083      *  tag equals WMITLV_TAG_STRUC_wmi_afc_expiry_event_param.
38084      */
38085     A_UINT32 tlv_header;
38086     A_UINT32 request_id; /* AFC unique Request ID for AFC expiry event, This is Nonce generated by FW for freshness */
38087     A_UINT32 event_subtype; /* refer to WMI_AFC_EXPIRY_EVENT_SUBTYPE */
38088     A_UINT32 afc_wfa_version;    /* bits 15:0  -- minor version
38089                                   * bits 31:16 -- major version
38090                                   * WMI_AFC_WFA_MINOR_VERSION_GET &
38091                                   * WMI_AFC_WFA_MAJOR_VERSION_GET
38092                                   */
38093 } wmi_afc_expiry_event_param;
38094 
38095 typedef struct {
38096     /** TLV tag and len;
38097       *tag equals WMITLV_TAG_STRUC_wmi_afc_power_event_param */
38098     A_UINT32 tlv_header;
38099     A_UINT32 fw_status_code;     /* refer WMI_FW_AFC_POWER_EVENT_STATUS_CODE */
38100     A_UINT32 resp_id;            /* AFC unique response ID, in case of fw_status_code as WMI_FW_AFC_POWER_EVENT_RESP_PARSING_FAILURE resp id may be invalid. */
38101     A_INT32  afc_serv_resp_code; /* refer WMI_AFC_SERV_RESP_CODE, This field and following all fields are valid if fw_status_code is a success. */
38102     A_UINT32 afc_wfa_version;    /* bits 15:0  -- minor version
38103                                   * bits 31:16 -- major version
38104                                   * WMI_AFC_WFA_MINOR_VERSION_GET &
38105                                   * WMI_AFC_WFA_MAJOR_VERSION_GET
38106                                   */
38107     A_UINT32 avail_exp_time_d;   /* avail_exp_time_d and avail_exp_time_t are
38108                                   * in UTC
38109                                   * Availability expiry time date format:
38110                                   * YYYY-MM-DD,
38111                                   * bits 7:0 -DD - Day (expected values 1-31)
38112                                   * bits 15:8 -MM - Month (expected values 1-12)
38113                                   * bits 31:16 -YYYY - Year
38114                                   */
38115     A_UINT32 avail_exp_time_t;   /* Availability expiry time format HH-MM-SS
38116                                   * bits 7:0 -SS - Time in Sec (expected values 0-59)
38117                                   * bits 15:8 -MM - Minute (expected values 0-59)
38118                                   * bits 23:16 -HH - Hour (expected values 0-23)
38119                                   * bits 31:24 -reserved
38120                                   */
38121 } wmi_afc_power_event_param;
38122 
38123 typedef struct {
38124     /** TLV tag and len;
38125      * tag equals WMITLV_TAG_STRUC_wmi_6g_afc_frequency_info */
38126     A_UINT32  tlv_header;
38127     A_UINT32  freq_info;     /* bits 15:0  = u16 start_freq,
38128                               * bits 31:16 = u16 end_freq
38129                               * (both in MHz units)
38130                               * use MACRO as WMI_REG_RULE_START_FREQ_GET &
38131                               * WMI_REG_RULE_START_FREQ_SET
38132                               */
38133     A_INT32   psd_power_info; /* Maximum PSD in dBm/MHz, value is stored in 0.01 dBm/MHz steps */
38134 } wmi_6g_afc_frequency_info;
38135 
38136 typedef struct {
38137     /** TLV tag and len;
38138      * tag equals WMITLV_TAG_STRUC_wmi_6g_afc_channel_info  */
38139     A_UINT32  tlv_header;
38140     A_UINT32  global_operating_class;
38141     A_UINT32  num_channels; /* num of valid channels for above global operating class */
38142     /* This TLV will be followed by array of
38143      * num_channels times wmi_afc_chan_eirp_power_info
38144      * wmi_afc_chan_eirp_power_info power_info[]
38145      * EIRP power array has chunks of elements corresponding to each channel
38146      * in the channel array.
38147      * i.e. the EIRP power array will contain
38148      * (suppose N1 and N2 are number of valid channels from channel_info[0]
38149      * and channel_info[1] respectively)
38150      * eirp_power[0] power for channel 0 from channel_info[0]
38151      * eirp_power[1] power for channel 1 from channel_info[0]
38152      * ...
38153      * eirp_power[N1-1] power for channel N1-1 from channel_info[0]
38154      * eirp_power[N1] power for channel 0 from channel_info[1]
38155      * eirp_power[N1+1] power for channel 1 from channel_info[1]
38156      * ...
38157      * eirp_power[N1+N2-1] power for channel N2-1 channel_info[1]
38158      * ...
38159      */
38160 } wmi_6g_afc_channel_info;
38161 
38162 typedef struct {
38163     /** TLV tag and len;
38164      * tag equals WMITLV_TAG_STRUC_wmi_afc_chan_eirp_power_info */
38165     A_UINT32 tlv_header ;
38166     A_UINT32 channel_cfi; /* channel center frequency indices */
38167     A_UINT32 eirp_pwr;    /* maximum permissible EIRP available for above CFI in dBm, value is stored in 0.01 dBm steps */
38168 } wmi_afc_chan_eirp_power_info;
38169 
38170 typedef struct {
38171     A_UINT32  tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_scan_start_cmd_fixed_param */
38172     A_UINT32  vdev_id;
38173     A_UINT32  scan_period_msec;   /** scan duration in milli-seconds */
38174     A_UINT32  start_interval_msec; /** offset duration to start the scan in milli-seconds */
38175 } wmi_11d_scan_start_cmd_fixed_param;
38176 
38177 typedef struct {
38178     A_UINT32  tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_scan_stop_cmd_fixed_param */
38179     A_UINT32  vdev_id;
38180 } wmi_11d_scan_stop_cmd_fixed_param;
38181 
38182 /** FW indicating new current country code to Host */
38183 typedef struct {
38184     A_UINT32  tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_new_country_event_fixed_param */
38185     A_UINT32  new_alpha2; /** alpha2 characters representing the country code */
38186 } wmi_11d_new_country_event_fixed_param;
38187 
38188 typedef struct {
38189     /** TLV tag and len; tag equals
38190      * WMITLV_TAG_STRUC_wmi_coex_get_antenna_isolation_cmd_fixed_param */
38191     A_UINT32 tlv_header;
38192     /* Currently there are no parameters for this message. */
38193 } wmi_coex_get_antenna_isolation_cmd_fixed_param;
38194 
38195 typedef struct {
38196     /** TLV tag and len; tag equals
38197      * WMITLV_TAG_STRUC_wmi_pdev_get_nfcal_power_fixed_param */
38198     A_UINT32 tlv_header;
38199     /** pdev_id for identifying the MAC
38200      * See macros starting with WMI_PDEV_ID_ for values.
38201      */
38202     A_UINT32 pdev_id;
38203 } wmi_pdev_get_nfcal_power_fixed_param;
38204 
38205 typedef struct {
38206     /** TLV tag and len; tag equals
38207      * WMITLV_TAG_STRUC_wmi_coex_report_isolation_event_fixed_param */
38208     A_UINT32 tlv_header;
38209     /** Antenna isolation value in dB units, none zero value is valid while 0 means failed to do isolation measurement or corresponding chain is not active.
38210      *  Currently the HW descriptor only supports 4 chains at most.
38211      *  Further isolation_chainX elements can be added in the future
38212      *  for additional chains, if needed.
38213      */
38214     A_UINT32 isolation_chain0:8, /* [7:0],   isolation value for chain 0 */
38215              isolation_chain1:8, /* [15:8],  isolation value for chain 1 */
38216              isolation_chain2:8, /* [23:16], isolation value for chain 2 */
38217              isolation_chain3:8; /* [31:24], isolation value for chain 3 */
38218 } wmi_coex_report_isolation_event_fixed_param;
38219 
38220 typedef enum {
38221     WMI_COEX_DBAM_COMP_SUCCESS          = 0, /* success, mode is applied */
38222     WMI_COEX_DBAM_COMP_ONGOING          = 1, /* success, mode is applied */
38223     WMI_COEX_DBAM_COMP_DELAYED          = 2, /* DBAM is delayed and TDD is selected temporarily */
38224     WMI_COEX_DBAM_COMP_NOT_SUPPORT      = 3, /* DBAM is not supported */
38225     WMI_COEX_DBAM_COMP_TEST_MODE        = 4, /* ignore due to test mode */
38226     WMI_COEX_DBAM_COMP_INVALID_PARAM    = 5, /* invalid parameter is received */
38227     WMI_COEX_DBAM_COMP_FAIL             = 6, /* command failed */
38228 } wmi_coex_dbam_comp_status;
38229 
38230 typedef struct {
38231     /** TLV tag and len; tag equals
38232      * WMITLV_TAG_STRUC_wmi_coex_dbam_complete_event_fixed_param */
38233     A_UINT32 tlv_header;
38234     A_UINT32 comp_status;    /* wmi_coex_dbam_comp_status */
38235 } wmi_coex_dbam_complete_event_fixed_param;
38236 
38237 typedef enum wmi_tas_power_history_event_type {
38238     WMI_TAS_POWER_HISTORY_EVENT_SAVE_FAILURE  = 0, /* Power history save fail, it will caused by: TAS Feature Not enable or get remote address fail */
38239     WMI_TAS_POWER_HISTORY_EVENT_SAVE_COMPLETE = 1, /* Power history save complete */
38240 } WMI_TAS_POWER_HISTORY_EVENT_TYPE;
38241 
38242 typedef struct {
38243     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tas_power_history_event_fixed_param */
38244     A_UINT32    tlv_header;
38245     A_UINT32    sub_type;     /* refer to WMI_TAS_POWER_HISTORY_EVENT_TYPE */
38246 } wmi_tas_power_history_event_fixed_param;
38247 
38248 typedef enum {
38249     WMI_RCPI_MEASUREMENT_TYPE_AVG_MGMT  = 1,
38250     WMI_RCPI_MEASUREMENT_TYPE_AVG_DATA  = 2,
38251     WMI_RCPI_MEASUREMENT_TYPE_LAST_MGMT = 3,
38252     WMI_RCPI_MEASUREMENT_TYPE_LAST_DATA = 4,
38253 } wmi_rcpi_measurement_type;
38254 
38255 typedef struct {
38256     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_rcpi_cmd_fixed_param */
38257     A_UINT32 tlv_header;
38258     /* VDEV identifier */
38259     A_UINT32 vdev_id;
38260     /* peer MAC address */
38261     wmi_mac_addr peer_macaddr;
38262     /* measurement type - defined in enum wmi_rcpi_measurement_type */
38263     A_UINT32 measurement_type;
38264 } wmi_request_rcpi_cmd_fixed_param;
38265 
38266 typedef struct {
38267     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_rcpi_event_fixed_param */
38268     A_UINT32 tlv_header;
38269     /* VDEV identifier */
38270     A_UINT32 vdev_id;
38271     /* peer MAC address */
38272     wmi_mac_addr peer_macaddr;
38273     /* measurement type - defined in enum wmi_rcpi_measurement_type */
38274     A_UINT32 measurement_type;
38275     /* Measured RCPI in dBm of the peer requested by host */
38276     A_INT32 rcpi;
38277     /** status
38278      *  0 - Requested peer RCPI available
38279      *  1 - Requested peer RCPI not available
38280      */
38281     A_UINT32 status;
38282 } wmi_update_rcpi_event_fixed_param;
38283 
38284 /* Definition of mask for various package id */
38285 #define WMI_PKGID_MASK_AUTO 0x00000080
38286 
38287 typedef struct {
38288     /** TLV tag and len; tag equals*/
38289     A_UINT32 tlv_header;
38290     /**
38291      * The value field is filled with WMI_PKGID_MASK values.
38292      * Currently, the only flag used within values is
38293      * WMI_PKGID_MASK_AUTO, where bit7=1 for automotive systems.
38294      */
38295     A_UINT32 value;
38296 } wmi_pkgid_event_fixed_param;
38297 
38298 typedef struct {
38299     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_add_mac_addr_to_rx_filter_cmd_fixed_params */
38300     A_UINT32 vdev_id; /* vdev id whose mac to be randomized */
38301     /* enable is set to 1 if mac randomization to be enabled */
38302     A_UINT32 enable;
38303     /* randomization mac address if randomization is enabled */
38304     wmi_mac_addr mac_addr;
38305     /* To get the PMAC from freq param */
38306     A_UINT32 freq;  /* units in MHz */
38307 } wmi_vdev_add_mac_addr_to_rx_filter_cmd_fixed_param;
38308 
38309 typedef struct {
38310     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_add_mac_addr_to_rx_filter_event_fixed_params */
38311     A_UINT32 vdev_id; /* vdev of id whose mac address was randomized */
38312     A_UINT32 status; /* status is 1 if success and 0 if failed */
38313 } wmi_vdev_add_mac_addr_to_rx_filter_status_event_fixed_param;
38314 
38315 /* Definition of HW data filtering */
38316 typedef enum {
38317     WMI_HW_DATA_FILTER_DROP_NON_ARP_BC = 0x01,
38318     WMI_HW_DATA_FILTER_DROP_NON_ICMPV6_MC = 0x02,
38319 } WMI_HW_DATA_FILTER_BITMAP_TYPE;
38320 
38321 typedef struct {
38322     A_UINT32 tlv_header;
38323     A_UINT32 vdev_id;
38324     A_UINT32 enable;  /* 1 . enable, 0- disable */
38325     A_UINT32 hw_filter_bitmap; /* see WMI_HW_DATA_FILTER_BITMAP_TYPE */
38326 } wmi_hw_data_filter_cmd_fixed_param;
38327 
38328 /** values for multiple_vdev_restart_request flags */
38329 /* Host is expecting consolidated Multiple Vdev Restart Response(MVRR) event. */
38330 #define WMI_MULTIPLE_VDEV_RESTART_FLAG_IS_MVRR_EVENT_SUPPORT(flag)  WMI_GET_BITS(flag, 0, 1)
38331 #define WMI_MULTIPLE_VDEV_RESTART_FLAG_SET_MVRR_EVENT_SUPPORT(flag,val)  WMI_SET_BITS(flag, 0, 1, val)
38332 /* Host is sending phymode_list for each vdev. */
38333 #define WMI_MULTIPLE_VDEV_RESTART_FLAG_IS_PHYMODE_PRESENT(flag)  WMI_GET_BITS(flag, 1, 1)
38334 #define WMI_MULTIPLE_VDEV_RESTART_FLAG_SET_PHYMODE_PRESENT(flag,val)  WMI_SET_BITS(flag, 1, 1, val)
38335 #define WMI_MULTIPLE_VDEV_RESTART_FLAG_GET_PHYMODE(phymode) WMI_GET_BITS(phymode, 0, 6)
38336 #define WMI_MULTIPLE_VDEV_RESTART_FLAG_SET_PHYMODE(phymode, val) WMI_SET_BITS(phymode, 0, 6, val)
38337 
38338 /** Indicates that VDEV ID is in bit-map format
38339  *  If this flag is set, FW will determine the vdev IDs from the positions
38340  *  of the bits that are set, and use these vdev IDs for vdev restart.
38341  *
38342  *  This flag should not be set from host unless FW has set the service bit
38343  *  WMI_SERVICE_MULTIPLE_VDEV_RESTART_BITMAP_SUPPORT to indicate it supports
38344  *  this interpretation of the vdev IDs as a bitmap.
38345  *
38346  *  If this flag is set then below is the way it will be parsed
38347  *  vdev_ids[0] = 53 (0011 0101) -> indicates vdev 0,2,4,5 is set
38348  *  vdev_ids[1] = 53 (0000 0101) -> indicates vdev 32,34 is set
38349  *  similar to this the value can be extended in feature for more vdev's
38350  *
38351  *  If flag is not se then default parsing will be as below
38352  *  vdev_ids[0] = 0
38353  *  vdev_ids[1] = 2
38354  *  vdev_ids[2] = 4
38355  *  .
38356  *  .
38357  *  vdev_ids[5] = 34
38358  */
38359 #define WMI_MULTIPLE_VDEV_RESTART_FLAG_BITMAP_SUPPORT(flag)  WMI_GET_BITS(flag, 2, 1)
38360 #define WMI_MULTIPLE_VDEV_RESTART_FLAG_SET_BITMAP_SUPPORT(flag,val)  WMI_SET_BITS(flag, 2, 1, val)
38361 
38362 
38363 /* This command is used whenever host wants to restart multiple
38364  * VDEVs using single command and the VDEV that are restarted will
38365  * need to have same properties they had before restart except for the
38366  * operating channel
38367  */
38368 typedef struct {
38369     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_multiple_vdev_restart_request_cmd_fixed_param */
38370     /** pdev_id for identifying the MAC
38371      * See macros starting with WMI_PDEV_ID_ for values.
38372      * In non-DBDC case host should set it to 0
38373      */
38374     A_UINT32 pdev_id;
38375     /** unique id identifying the module, generated by the caller */
38376     A_UINT32 requestor_id;
38377     /** Disable H/W ack.
38378      * During CAC, Our HW shouldn't ack directed frames
38379      */
38380     A_UINT32 disable_hw_ack;
38381     /* Determine the duration of CAC on the given channel 'chan' */
38382     A_UINT32 cac_duration_ms;
38383     A_UINT32 num_vdevs;
38384     /*
38385      * Flags to indicate which parameters are sent as part of the request.
38386      * This field is filled with the bitwise combination of the flag values
38387      * defined by WMI_MULTIPLE_VDEV_RESTART_FLAG_xxx
38388      */
38389     A_UINT32 flags;
38390     A_UINT32 puncture_20mhz_bitmap; /* each bit indicates one 20 MHz BW punctured */
38391 
38392     /* The TLVs follows this structure:
38393      * A_UINT32 vdev_ids[]; <--- Array of vdev IDs, or bitmap of vdev IDs
38394      *     In flags if WMI_MULTIPLE_VDEV_RESTART_FLAG_BITMAP_SUPPORT is set
38395      *     FW will interpret the vdev_ids values as a bitmap, and will use the
38396      *     position of all the bits set within the bitmap to determine the
38397      *     vdev IDs to use for vdev restart.
38398      *     If this flag is set then below is the way it will be parsed
38399      *         vdev_ids[0] = 53 (0011 0101) -> indicates vdev 0,2,4,5 is set
38400      *         vdev_ids[1] = 53 (0000 0101) -> indicates vdev 32,34 is set
38401      *         The array can be extended in feature for more vdevs.
38402      *     If this flag is not se then default parsing will be as below
38403      *         vdev_ids[0] = 0
38404      *         vdev_ids[1] = 2
38405      *         vdev_ids[2] = 4
38406      *         .
38407      *         .
38408      *         vdev_ids[5] = 34
38409      * wmi_channel chan; <------ WMI channel
38410      * A_UINT32 phymode_list[]; <-- Array of Phymode list, with
38411      *    each phymode value stored in bits 5:0 of the A_UINT32.
38412      *    Use the WMI_MULTIPLE_VDEV_RESTART_FLAG_GET/SET_PHYMODE macros
38413      *    to access the phymode value from within each A_UINT32 element.
38414      * A_UINT32 preferred_tx_streams[]; <-- Array of preferred_tx_streams
38415      *    with vdev ID as index.
38416      * A_UINT32 preferred_rx_streams[]; <-- Array of preferred_rx_streams
38417      *    with vdev ID as index.
38418      * wmi_channel dbw_chan; <-- WMI channel
38419      *     optional TLV for dbw_chan
38420      * wmi_dbw_chan_info dbw_chan_info
38421      *     optional TLV used for dbw_chan_info
38422      */
38423 } wmi_pdev_multiple_vdev_restart_request_cmd_fixed_param;
38424 
38425 typedef struct {
38426     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_csa_switch_count_status_event_fixed_param */
38427     A_UINT32 tlv_header;
38428     /** pdev_id for identifying the MAC
38429      * See macros starting with WMI_PDEV_ID_ for values.
38430      * In non-DBDC case host should set it to 0
38431      */
38432     A_UINT32 pdev_id;
38433     /** CSA switch count value in the last transmitted beacon */
38434     A_UINT32 current_switch_count;
38435     A_UINT32 num_vdevs;
38436 
38437     /* The TLVs follows this structure:
38438      * A_UINT32 vdev_ids[]; <--- Array of VDEV ids.
38439      */
38440 } wmi_pdev_csa_switch_count_status_event_fixed_param;
38441 
38442 typedef struct {
38443     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csc_vdev_list */
38444     A_UINT32 vdev_id;
38445     A_UINT32 current_switch_count; /** CSC switch count value in the last transmitted beacon */
38446 } wmi_csc_vdev_list;
38447 
38448 typedef struct {
38449     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_csc_switch_count_status_event_fixed_param */
38450     A_UINT32 tlv_header;
38451     /** pdev_id for identifying the MAC
38452      * See macros starting with WMI_PDEV_ID_ for values.
38453      * In non-DBDC case host should set it to 0
38454      */
38455     A_UINT32 pdev_id;
38456     /** CSC switch count value in the last transmitted beacon */
38457     A_UINT32 current_switch_count;
38458 
38459     /* The TLVs follows this structure:
38460      * struct wmi_csc_vdev_list vdev_info[]; // IDs of vdevs and their current switch countdown values
38461      */
38462 } wmi_pdev_csc_switch_count_status_event_fixed_param;
38463 
38464 /* Operation types for packet routing command */
38465 typedef enum {
38466     WMI_PDEV_ADD_PKT_ROUTING,
38467     WMI_PDEV_DEL_PKT_ROUTING,
38468 } wmi_pdev_pkt_routing_op_code;
38469 
38470 /* Packet routing types based on specific data types */
38471 typedef enum {
38472     WMI_PDEV_ROUTING_TYPE_ARP_IPV4,
38473     WMI_PDEV_ROUTING_TYPE_NS_IPV6,
38474     WMI_PDEV_ROUTING_TYPE_IGMP_IPV4,
38475     WMI_PDEV_ROUTING_TYPE_MLD_IPV6,
38476     WMI_PDEV_ROUTING_TYPE_DHCP_IPV4,
38477     WMI_PDEV_ROUTING_TYPE_DHCP_IPV6,
38478     WMI_PDEV_ROUTING_TYPE_DNS_TCP_IPV4,
38479     WMI_PDEV_ROUTING_TYPE_DNS_TCP_IPV6,
38480     WMI_PDEV_ROUTING_TYPE_DNS_UDP_IPV4,
38481     WMI_PDEV_ROUTING_TYPE_DNS_UDP_IPV6,
38482     WMI_PDEV_ROUTING_TYPE_ICMP_IPV4,
38483     WMI_PDEV_ROUTING_TYPE_ICMP_IPV6,
38484     WMI_PDEV_ROUTING_TYPE_TCP_IPV4,
38485     WMI_PDEV_ROUTING_TYPE_TCP_IPV6,
38486     WMI_PDEV_ROUTING_TYPE_UDP_IPV4,
38487     WMI_PDEV_ROUTING_TYPE_UDP_IPV6,
38488     WMI_PDEV_ROUTING_TYPE_IPV4,
38489     WMI_PDEV_ROUTING_TYPE_IPV6,
38490     WMI_PDEV_ROUTING_TYPE_EAP,
38491     WMI_PDEV_ROUTING_TYPE_VLAN,
38492 } wmi_pdev_pkt_routing_type;
38493 
38494 typedef enum {
38495     WMI_PDEV_WIFIRXCCE_USE_CCE_E  = 0,
38496     WMI_PDEV_WIFIRXCCE_USE_ASPT_E = 1,
38497     WMI_PDEV_WIFIRXCCE_USE_FT_E   = 2,
38498     WMI_PDEV_WIFIRXCCE_USE_CCE2_E = 3,
38499 } wmi_pdev_dest_ring_handler_type;
38500 
38501 /* This command shall be sent only when no VDEV is up. If the command is sent after any VDEV is up, target will ignore the command */
38502 typedef struct {
38503     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_update_pkt_routing_cmd_fixed_param */
38504     A_UINT32 tlv_header;
38505     /** Identifies pdev on which routing needs to be applied */
38506     A_UINT32 pdev_id;
38507     /** Indicates the routing operation type: add/delete */
38508     A_UINT32 op_code; /* wmi_pdev_pkt_routing_op_code */
38509     /** Bitmap of multiple pkt routing types for a given destination ring and meta data */
38510     A_UINT32 routing_type_bitmap; /* see wmi_pdev_pkt_routing_type */
38511     /** 5 bits [4:0] are used to specify the destination ring where the CCE matched
38512       * packet needs to be routed.
38513       */
38514     A_UINT32 dest_ring;
38515     /** 16 bits [15:0] meta data can be passed to CCE. When the superrule matches,
38516       * CCE copies this back in RX_MSDU_END_TLV.
38517       */
38518     A_UINT32 meta_data;
38519     /**
38520      * Indicates the dest ring handler type: CCE, APST, FT, CCE2
38521      * Refer to wmi_pdev_dest_ring_handler_type / WMI_PDEV_WIFIRXCCE_USE_xxx
38522      */
38523     A_UINT32 dest_ring_handler;
38524 } wmi_pdev_update_pkt_routing_cmd_fixed_param;
38525 
38526 typedef enum {
38527     WMI_CALIBRATION_NO_FEATURE = 0, /* The board was calibrated with a meta which did not have this feature */
38528     WMI_CALIBRATION_OK,             /* The calibration status is OK */
38529     WMI_CALIBRATION_NOT_OK,         /* The calibration status is NOT OK */
38530 } WMI_CALIBRATION_STATUS;
38531 
38532 #define WMI_BOARD_MCN_STRING_MAX_SIZE 19
38533 
38534 /**
38535  * WMI_BOARD_MCN_STRING_BUF_SIZE : represents the number of elements in board_mcn_detail.
38536  * Since board_mcn_detail is of type A_UINT8, the value of WMI_BOARD_MCN_STRING_BUF_SIZE
38537  * should be multiple of 4 for alignment reason. And the last byte byte is reserved for
38538  * null-terminator
38539  */
38540 #define WMI_BOARD_MCN_STRING_BUF_SIZE (WMI_BOARD_MCN_STRING_MAX_SIZE+1) /* null-terminator */
38541 
38542 typedef struct {
38543     A_UINT32 tlv_header;            /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_check_cal_version_event_fixed_param  */
38544     A_UINT32 software_cal_version;  /* Current software level calibration data version */
38545     A_UINT32 board_cal_version;     /* Calibration data version programmed on chip */
38546     A_UINT32 cal_status;            /* filled with WMI_CALIBRATION_STATUS enum value */
38547 
38548     /* board_mcn_detail:
38549      * Provides board's MCN (Material Control Number) information for the host
38550      * to display. This is used to track the Hardware level revisions/versions.
38551      * This array carries the ASCII values of the MCN to the host. And host
38552      * would just print this in a string format whenever user requests.
38553      * Note: On a big-endian host, the 4 bytes within each A_UINT32 portion
38554      * of a WMI message will be automatically byteswapped by the copy engine
38555      * as the messages are transferred between host and target, to convert
38556      * between the target's little-endianness and the host's big-endianness.
38557      * Consequently, a big-endian host will have to manually unswap the bytes
38558      * within the board_mcn_detail string buffer to get the bytes back into
38559      * the desired natural order.
38560      */
38561     A_UINT8 board_mcn_detail[WMI_BOARD_MCN_STRING_BUF_SIZE];
38562     /** pdev_id for identifying the MAC
38563      * See macros starting with WMI_PDEV_ID_ for values.
38564      */
38565     A_UINT32 pdev_id;
38566 } wmi_pdev_check_cal_version_event_fixed_param;
38567 
38568 typedef struct {
38569     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_check_cal_version_cmd_fixed_param */
38570     /** pdev_id for identifying the MAC
38571      * See macros starting with WMI_PDEV_ID_ for values.
38572      */
38573     A_UINT32 pdev_id;
38574 } wmi_pdev_check_cal_version_cmd_fixed_param;
38575 
38576 typedef struct {
38577     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_diversity_gain_cmd_fixed_param */
38578     /** Identifies pdev on which diversity gain to be applied */
38579     A_UINT32 pdev_id;
38580     /** The number of spatial stream */
38581     A_UINT32 nss;
38582     /** The number of gains */
38583     A_UINT32 num_gains;
38584     /*
38585      * This fixed_param TLV is followed by other TLVs:
38586      *    A_UINT8 diversity_gains[num_gains]; (gain is in dB units)
38587      */
38588 } wmi_pdev_set_diversity_gain_cmd_fixed_param;
38589 
38590 /* flags for unit_test_event  */
38591 #define WMI_UNIT_TEST_EVENT_FLAG_STATUS         0   /* 0 = success, 1 = fail */
38592 #define WMI_UNIT_TEST_EVENT_FLAG_DONE           1   /* 0 = not done, 1 = done  */
38593 
38594 /* from bit 2 to bit 31 are reserved */
38595 
38596 #define WMI_SET_UNIT_TEST_EVENT_FLAG_STATUS_SUCCESS(flag) do { \
38597         (flag) |= (1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS); \
38598      } while (0)
38599 
38600 #define WMI_SET_UNIT_TEST_EVENT_FLAG_STATUS_FAIL(flag) do { \
38601         (flag) &= ~(1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS); \
38602      } while (0)
38603 
38604 #define WMI_GET_UNIT_TEST_EVENT_FLAG_STSTUS(flag) \
38605         ((flag) & (1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS))
38606 
38607 #define WMI_SET_UNIT_TEST_EVENT_FLAG_DONE(flag) do { \
38608         (flag) |= (1 << WMI_UNIT_TEST_EVENT_FLAG_DONE); \
38609      } while (0)
38610 
38611 #define WMI_CLR_UNIT_TEST_EVENT_FLAG_DONE(flag) do { \
38612         (flag) &= ~(1 << WMI_UNIT_TEST_EVENT_FLAG_DONE); \
38613      } while (0)
38614 
38615 #define WMI_GET_UNIT_TEST_EVENT_FLAG_DONE(flag) \
38616         ((flag) & (1 << WMI_UNIT_TEST_EVENT_FLAG_DONE))
38617 
38618 typedef struct {
38619     /* TLV tag and len; tag equals WMI_UNIT_TEST_EVENTID */
38620     A_UINT32 tlv_header;
38621     /* unique id identifying the VDEV, generated by the caller */
38622     A_UINT32 vdev_id;
38623     /* Identify the wlan module */
38624     A_UINT32 module_id;
38625     /* unique id identifying the unit test cmd, generated by the caller */
38626     A_UINT32 diag_token;
38627     /* flag for the status of the unit_test_cmd */
38628     A_UINT32 flag;
38629     /* data length number of bytes for current dump */
38630     A_UINT32 payload_len;
38631     /* TLV/Payload after this structure is sent in little endian
38632      * format for the length mentioned in this structure.
38633      * A_UINT8 payload[1];
38634      */
38635 } wmi_unit_test_event_fixed_param;
38636 
38637 /* Definition of latency levels */
38638 typedef enum {
38639     WMI_WLM_LL_NORMAL = 0x0,
38640     /* DEPRECATED */ WMI_WLM_LL_MODERATE = 0x1,
38641     WMI_WLM_LL_XR = 0x1,
38642     WMI_WLM_LL_LOW = 0x2,
38643     WMI_WLM_LL_ULTRA_LOW = 0x3,
38644 } WMI_WLM_LATENCY_LEVEL;
38645 
38646 typedef struct {
38647     A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_vdev_latency_event_fixed_param */
38648     /** The latency level for specified vdev_id */
38649     A_UINT32 vdev_id;
38650     /** latency level enum WMI_WLM_LATENCY_LEVEL honored by FW */
38651     A_UINT32 latency_level;
38652 } wmi_vdev_latency_event_fixed_param;
38653 
38654 /*
38655 * Lay out of flags in wmi_wlm_config_cmd_fixed_param
38656 *
38657 * |31 19|  18 | 17|16 14| 13 | 12| 11 | 10 |  9  |  8 |7  6|5  4|3  2| 1 | 0 |
38658 * +-----+-----+---+-----+----+---+----+----+-----+----+----+----+----+---+---+
38659 * | RSVD|SRATE|RTS| NSS |EDCA|TRY|SSLP|CSLP|DBMPS|RSVD|Roam|RSVD|DWLT|DFS|SUP|
38660 * +------------------------------+---------------+---------+-----------------+
38661 * |              WAL             |    PS         |  Roam   |     Scan        |
38662 *
38663 * Flag values:
38664 *     TRY: (1) enable short limit for retrying unacked tx, where the limit is
38665 *              based on the traffic's latency level
38666 *          (0) default tx retry behavior
38667 *    EDCA: (1) Apply VO parameters on BE
38668 *          (0) default behavior
38669 *     NSS: (0) no Nss limits, other than those negotiatied during association
38670 *          (1) during 2-chain operation, tx only a single spatial stream
38671 *          (2) - (7) reserved / invalid
38672 *     RTS: (0) default protection
38673 *          (1) always enable RTS/CTS protection
38674 *   SRATE: (0) default secondary rate policy
38675 *          (1) disable secondary rate
38676 */
38677 /* bit 0-3 of flags is used for scan operation */
38678 /* bit 0: Avoid scan request from HLOS if bit is set */
38679 
38680 #define WLM_FLAGS_SCAN_SUPPRESS  1  /* suppress all scan request */
38681 
38682 /* bit 1: WLM_FLAGS_SCAN_SKIP_DFS, skip dfs channel if bit is set */
38683 
38684 #define WLM_FLAGS_SCAN_SKIP_DFS  1  /* skip dfs channel operation */
38685 
38686 /* bit 2-3: define policy of dwell time/duration of each foreign channel
38687    (b3 b2)
38688    (0  0 ): Default dwell time
38689    (0  1 ): WLM_FLAGS_STICK_SCAN_DWELL_TIME : Stick to original active/passive dwell time, but split
38690    foreign channel dwell times into fitting into min (dl_latency, ul_latency). Note it can increase
38691    overall scan duration.
38692    (1  0 ): WLM_FLAGS_SHRINK_SCAN_DWELL_TIME: Shrink active/passive dwell time to
38693    min(dl_latency, ul_latency, dwell_time). It may reduce overall scan duration, but it may decrease
38694    the accuracy of scan result.
38695    (1  1 ): reserved
38696 */
38697 #define WLM_FLAGS_DEFAULT_SCAN_DWELL_TIME   0 /* Default scan dwell time */
38698 #define WLM_FLAGS_STICK_SCAN_DWELL_TIME     1 /* Shrink off channel time but extend overall scan duration */
38699 #define WLM_FLAGS_SHRINK_SCAN_DWELL_TIME    2 /* Shrink scan off channel time */
38700 
38701 /* bit 4-5: reserved for scan */
38702 
38703 /* bit 6-7 of flags is used for roaming operation */
38704 /* bit 6-7: define roaming policy:
38705    (b7 b6)
38706    (0  0 ): WLM_FLAGS_ROAM_ALLOW: Default behavior, allow roaming in all scenarios
38707    (0  1 ): WLM_FLAGS_ROAM_SUPPRESS: Disallow all roaming
38708    (1  0 ): WLM_FLAGS_ALLOW_FINAL_BMISS_ROAM: Allow final bmiss roaming only
38709    (1  1 ): reserved
38710 */
38711 #define WLM_FLAGS_ROAM_ALLOW     0
38712 #define WLM_FLAGS_ROAM_SUPPRESS  1
38713 #define WLM_FLAGS_ALLOW_FINAL_BMISS_ROAM 2
38714 
38715 /* bit 8: reserved for roaming */
38716 
38717 /* bit 9-11 of flags is used for powersave operation */
38718 /* bit 9: WLM_FLAGS_PS_DISABLE_BMPS, disable BMPS if bit is set */
38719 
38720 #define WLM_FLAGS_PS_DISABLE_BMPS 1 /* disable BMPS */
38721 
38722 /* bit 10: WLM_FLAGS_PS_DISABLE_CSS_COLLAPSE, disable css power collapse if bit is set */
38723 
38724 #define WLM_FLAGS_PS_DISABLE_CSS_COLLAPSE  1  /* disable css power collapse */
38725 
38726 /* bit 11: WLM_FLAGS_PS_DISABLE_SYS_SLEEP, disable sys sleep if bit is set */
38727 
38728 #define WLM_FLAGS_PS_DISABLE_SYS_SLEEP  1  /* disable sys sleep */
38729 
38730 
38731 /* bit 17-31 of flags is reserved for powersave and WAL */
38732 /* bit 23: WLM_FLAGS_PS_DISABLE_MLO_PROBE_SCAN,
38733  *     disable MLO probe scan if bit is set
38734  */
38735 #define WLM_FLAGS_PS_DISABLE_MLO_PROBE_SCAN  1  /* disable MLO probe scan */
38736 
38737 /* bit 24: WLM_FLAGS_PS_DISABLE_ULL_FORCED_MLMR,
38738  *     disable forced MLMR on ULL if bit is set
38739  */
38740 #define WLM_FLAGS_PS_DISABLE_ULL_FORCED_MLMR  1 /* disable forced MLMR on ULL */
38741 
38742 #define WLM_FLAGS_SCAN_IS_SUPPRESS(flag)                  WMI_GET_BITS(flag, 0, 1)
38743 #define WLM_FLAGS_SCAN_SET_SUPPRESS(flag, val)            WMI_SET_BITS(flag, 0, 1, val)
38744 #define WLM_FLAGS_SCAN_IS_SKIP_DFS(flag)                  WMI_GET_BITS(flag, 1, 1)
38745 #define WLM_FLAGS_SCAN_SET_SKIP_DFS(flag, val)            WMI_SET_BITS(flag, 1, 1, val)
38746 #define WLM_FLAGS_SCAN_GET_DWELL_TIME_POLICY(flag)        WMI_GET_BITS(flag, 2, 2)
38747 #define WLM_FLAGS_SCAN_SET_DWELL_TIME_POLICY(flag, val)   WMI_SET_BITS(flag, 2, 2, val)
38748 #define WLM_FLAGS_TSF_LATENCY_COMPENSATE_ENABLED_GET(flag) WMI_GET_BITS(flag, 4, 1)
38749 #define WLM_FLAGS_TSF_LATENCY_COMPENSATE_ENABLED_SET(flag) WMI_SET_BITS(flag, 4, 1, val)
38750 #define WLM_FLAGS_ROAM_GET_POLICY(flag)                   WMI_GET_BITS(flag, 6, 2)
38751 #define WLM_FLAGS_ROAM_SET_POLICY(flag, val)              WMI_SET_BITS(flag, 6, 2, val)
38752 #define WLM_FLAGS_PS_IS_BMPS_DISABLED(flag)               WMI_GET_BITS(flag, 9, 1)
38753 #define WLM_FLAGS_PS_IS_CSS_CLPS_DISABLED(flag)           WMI_GET_BITS(flag, 10, 1)
38754 #define WLM_FLAGS_PS_SET_CSS_CLPS_DISABLE(flag, val)      WMI_SET_BITS(flag, 10, 1, val)
38755 #define WLM_FLAGS_PS_IS_SYS_SLP_DISABLED(flag)            WMI_GET_BITS(flag, 11, 1)
38756 #define WLM_FLAGS_PS_SET_SYS_SLP_DISABLE(flag, val)       WMI_SET_BITS(flag, 11, 1, val)
38757 #define WLM_FLAGS_WAL_LIMIT_TRY_ENABLED(flag)             WMI_GET_BITS(flag, 12, 1)
38758 #define WLM_FLAGS_WAL_LIMIT_TRY_SET(flag, val)            WMI_SET_BITS(flag, 12, 1, val)
38759 #define WLM_FLAGS_WAL_ADJUST_EDCA_ENABLED(flag)           WMI_GET_BITS(flag, 13, 1)
38760 #define WLM_FLAGS_WAL_ADJUST_EDCA_SET(flag, val)          WMI_SET_BITS(flag, 13, 1, val)
38761 #define WLM_FLAGS_WAL_1NSS_ENABLED(flag)                 (WMI_GET_BITS(flag, 14, 3) & 0x1)
38762 #define WLM_FLAGS_WAL_NSS_SET(flag, val)                  WMI_SET_BITS(flag, 14, 3, val)
38763 #define WLM_FLAGS_WAL_ALWAYS_RTS_PROTECTION(flag)         WMI_GET_BITS(flag, 17, 1)
38764 #define WLM_FLAGS_WAL_RTS_PROTECTION_SET(flag, val)       WMI_SET_BITS(flag, 17, 1, val)
38765 #define WLM_FLAGS_WAL_DISABLE_SECONDARY_RATE(flag)        WMI_GET_BITS(flag, 18, 1)
38766 #define WLM_FLAGS_WAL_SECONDARY_RATE_SET(flag, val)       WMI_SET_BITS(flag, 18, 1, val)
38767 #define WLM_FLAGS_PS_IS_PCIE_L11_ENABLED(flag)            WMI_GET_BITS(flag, 19, 1)
38768 #define WLM_FLAGS_PS_SET_PCIE_L11_ENABLE(flag, val)       WMI_SET_BITS(flag, 19, 1, val)
38769 #define WLM_FLAGS_PS_IS_PHYRF_PS_ENABLED(flag)            WMI_GET_BITS(flag, 20, 1)
38770 #define WLM_FLAGS_PS_SET_PHYRF_PS_ENABLE(flag, val)       WMI_SET_BITS(flag, 20, 1, val)
38771 #define WLM_FLAGS_SCAN_IS_SPLIT_PAS_CH_ENABLED(flag)      WMI_GET_BITS(flag, 21, 1)
38772 #define WLM_FLAGS_SCAN_SET_SPLIT_PAS_CH_ENABLE(flag, val) WMI_SET_BITS(flag, 21, 1, val)
38773 #define WLM_FLAGS_SCAN_IS_ADAPT_SCAN_ENABLED(flag)        WMI_GET_BITS(flag, 22, 1)
38774 #define WLM_FLAGS_SCAN_SET_ADAPT_SCAN_ENABLE(flag, val)   WMI_SET_BITS(flag, 22, 1, val)
38775 #define WLM_FLAGS_PS_IS_MLO_PROBE_SCAN_DISABLED(flag)      WMI_GET_BITS(flag, 23, 1)
38776 #define WLM_FLAGS_PS_SET_MLO_PROBE_SCAN_DISABLE(flag, val) WMI_SET_BITS(flag, 23, 1, val)
38777 #define WLM_FLAGS_PS_IS_ULL_FORCED_MLMR_DISABLED(flag)      WMI_GET_BITS(flag, 24, 1)
38778 #define WLM_FLAGS_PS_SET_ULL_FORCED_MLMR_DISABLE(flag, val) WMI_SET_BITS(flag, 24, 1, val)
38779 #define WLM_FLAGS_SET_FORCE_DEFAULT_LATENCY(flag, val)    WMI_SET_BITS(flag, 0, 1, val)
38780 #define WLM_FLAGS_GET_FORCE_DEFAULT_LATENCY(flag)         WMI_GET_BITS(flag, 0, 1)
38781 
38782 #define WLM_MAX_HOST_CLIENTS 5
38783 
38784 typedef struct {
38785     /** TLV tag and len; tag equals WMI_WLM_CONFIG_CMD_fixed_param */
38786     A_UINT32 tlv_header;
38787     /* VDEV identifier */
38788     A_UINT32 vdev_id;
38789     /*
38790      * Refer to WMI_WLM_LATENCY_LEVEL
38791      * Once latency change detected, WLM will notify modules e.g. STAPS or SCAN/ROAM,
38792      * who subscribed this event. And subscribers, like SCAN, may disable/cutoff offchan
38793      * operation to support lower latency of WLAN.
38794      */
38795     A_UINT32 latency_level;
38796     /*
38797      * represent uplink latency in ms
38798      * This parameter will be used by STAPS module to decide timing parameters, like
38799      * ITO or SPEC wakeup interval. For SCAN/ROAM, it may used to calculate offchan
38800      * durations.
38801      * For host and FW with multi client LL feature enabled, this field is obsolete.
38802      */
38803     A_UINT32 ul_latency;
38804     /*
38805      * represent downlink latency in ms
38806      * Similar usage as ul_latency
38807      * For host and FW with multi client LL feature enabled, this field is obsolete.
38808      */
38809     A_UINT32 dl_latency;
38810     /*
38811      * flags for each client of WLM, refer to WLM_FLAGS_ definitions above.
38812      * For host and FW with multi client LL feature enabled, this field is obsolete.
38813      */
38814     A_UINT32 flags;
38815     /*
38816      * bit 0 used as force reset:
38817      * to override the latency level as default
38818      * for all the wlm clients
38819      */
38820     A_UINT32 flags_ext;
38821     /*
38822      * clients of WLM Arbiter
38823      * WLM_MAX_HOST_CLIENTS 5
38824      */
38825     A_UINT32 client_id_bitmask;
38826 } wmi_wlm_config_cmd_fixed_param;
38827 
38828 /* Broadcast TWT enable/disable for both REQUESTER and RESPONDER */
38829 #define TWT_EN_DIS_FLAGS_GET_BTWT(flag)         WMI_GET_BITS(flag, 0, 1)
38830 #define TWT_EN_DIS_FLAGS_SET_BTWT(flag, val)    WMI_SET_BITS(flag, 0, 1, val)
38831 
38832 /* legacy MBSSID enable/disable */
38833 #define TWT_EN_DIS_FLAGS_GET_L_MBSSID(flag)       WMI_GET_BITS(flag, 1, 1)
38834 #define TWT_EN_DIS_FLAGS_SET_L_MBSSID(flag, val)  WMI_SET_BITS(flag, 1, 1, val)
38835 
38836 /* 11ax MBSSID enable/disable */
38837 #define TWT_EN_DIS_FLAGS_GET_AX_MBSSID(flag)      WMI_GET_BITS(flag, 2, 1)
38838 #define TWT_EN_DIS_FLAGS_SET_AX_MBSSID(flag, val) WMI_SET_BITS(flag, 2, 1, val)
38839 
38840 /* Configuration of TWT Modes,
38841  * If this BIT is set BIT4/5 will be used in FW, else BIT4/5 will be ignored.
38842  * Which means when we receive WMI_TWT_ENABLE_CMDID command from host,
38843  * without BIT3 set we will enable both REQUESTER/RESPONDER.
38844  *
38845  * Same interpretation is used in WMI_TWT_DISABLE_CMDID, if BIT3 is not set
38846  * we will disable both REQUESTER and RESPONDER.
38847  */
38848 #define TWT_EN_DIS_FLAGS_GET_SPLIT_CONFIG(flag)      WMI_GET_BITS(flag, 3, 1)
38849 #define TWT_EN_DIS_FLAGS_SET_SPLIT_CONFIG(flag, val) WMI_SET_BITS(flag, 3, 1, val)
38850 
38851 /*
38852  * The flags are used both in WMI_TWT_ENABLE_CMDID and WMI_TWT_DISABLE_CMDID.
38853  *
38854  * BIT4 represents whether the it is for REQUESTER or RESPONDER.
38855  * BIT5 represents whether it is individual or broadcast mode.
38856  *
38857  * For instance, in WMI_TWT_ENABLE_CMDID if BIT4=0 and BIT5=0, then we will
38858  * enable only Requester, we will not change any configuration of RESPONDER.
38859  *
38860  * Same way in WMI_TWT_DISABLE_CMDID if BIT4=0 and BIT5=0, then we will only
38861  * disable Individual and Broadcast REQUESTER, we will not alter any RESPONDER
38862  * configuration.
38863  *
38864  * If host is enabling or disabling both REQUESTER and RESPONDER host will
38865  * send two WMI commands, one for REQUESTER and one for RESPONDER.
38866  *
38867  * WMI_TWT_ENABLE_CMDID command flags description,
38868  * |----------------------------------------------------------------------|
38869  * |BIT4=0, BIT5=0  | Enable Individual TWT requester                     |
38870  * |----------------------------------------------------------------------|
38871  * |BIT4=0, BIT5=1  | Enable both Individual and Broadcast TWT requester  |
38872  * |----------------------------------------------------------------------|
38873  * |BIT4=1, BIT5=0  | Enable Individual TWT responder                     |
38874  * |----------------------------------------------------------------------|
38875  * |BIT4=1, BIT5=1  | Enable both Individual and Broadcast TWT responder  |
38876  * |----------------------------------------------------------------------|
38877  *
38878  *
38879  * WMI_TWT_DISABLE_CMDID command flags description,
38880  * |----------------------------------------------------------------------|
38881  * |BIT4=0, BIT5=0  | Disable both Individual and Broadcast TWT requester |
38882  * |----------------------------------------------------------------------|
38883  * |BIT4=0, BIT5=1  | Disable Broadcast TWT requester                     |
38884  * |----------------------------------------------------------------------|
38885  * |BIT4=1, BIT5=0  | Disable both Individual and broadcast TWT responder |
38886  * |----------------------------------------------------------------------|
38887  * |BIT4=1, BIT5=1  | Disable Broadcast TWT responder                     |
38888  * |----------------------------------------------------------------------|
38889  *
38890  * If user has enabled only individual requester at any point and after
38891  * sometime if user wants to enable broadcast requester then user cannot
38892  * directly send another WMI_TWT_ENABLE_CMDID with broadcast configuration,
38893  * user has to disable TWT requester first and then enable both individual
38894  * requester and broadcast requester. Same way for RESPONDER.
38895  *
38896  */
38897 /* 0: requester; 1: responder */
38898 #define TWT_EN_DIS_FLAGS_GET_REQ_RESP(flag)      WMI_GET_BITS(flag, 4, 1)
38899 #define TWT_EN_DIS_FLAGS_SET_REQ_RESP(flag, val) WMI_SET_BITS(flag, 4, 1, val)
38900 
38901 /* 0: iTWT; 1: bTWT */
38902 #define TWT_EN_DIS_FLAGS_GET_I_B_TWT(flag)      WMI_GET_BITS(flag, 5, 1)
38903 #define TWT_EN_DIS_FLAGS_SET_I_B_TWT(flag, val) WMI_SET_BITS(flag, 5, 1, val)
38904 
38905 /* 0: bTWT; 1: rTWT */
38906 #define TWT_EN_DIS_FLAGS_GET_B_R_TWT(flag)      WMI_GET_BITS(flag, 6, 1)
38907 #define TWT_EN_DIS_FLAGS_SET_B_R_TWT(flag, val) WMI_SET_BITS(flag, 6, 1, val)
38908 
38909 /*
38910  * disable autonomous bTWT session delete feature
38911  * This feature will delete client triggered session when number of clients
38912  * joined decreases to 0.
38913  */
38914 #define TWT_EN_DIS_FLAGS_GET_DIS_BTWT_AUTO_DELETE(flag) \
38915     WMI_GET_BITS(flag, 7, 1)
38916 #define TWT_EN_DIS_FLAGS_SET_DIS_BTWT_AUTO_DELETE(flag, val) \
38917     WMI_SET_BITS(flag, 7, 1, val)
38918 
38919 typedef struct {
38920     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_enable_cmd_fixed_param  */
38921     /** pdev_id for identifying the MAC.  See macros starting with WMI_PDEV_ID_ for values. In non-DBDC case host should set it to 0
38922      */
38923     A_UINT32 pdev_id;
38924     A_UINT32 sta_cong_timer_ms;     /* STA TWT congestion timer TO value in terms of ms */
38925     A_UINT32 mbss_support;          /* Reserved */
38926     A_UINT32 default_slot_size;              /* This is the default value for the TWT slot setup by AP (units = microseconds) */
38927     A_UINT32 congestion_thresh_setup;        /* Minimum congestion required to start setting up TWT sessions */
38928     /*
38929      * The congestion parameters below are in percent of occupied airtime.
38930      */
38931     A_UINT32 congestion_thresh_teardown;     /* Minimum congestion below which TWT will be torn down */
38932     A_UINT32 congestion_thresh_critical;     /* Threshold above which TWT will not be active */
38933     /*
38934      * The interference parameters below use an abstract method of evaluating
38935      * interference.  The parameters are in percent, ranging from 0 for no
38936      * interference, to 100 for interference extreme enough to completely
38937      * block the signal of interest.
38938      */
38939     A_UINT32 interference_thresh_teardown;   /* Minimum interference above that TWT will not be active */
38940     A_UINT32 interference_thresh_setup;      /* Minimum interference below that TWT session can be setup */
38941     A_UINT32 min_no_sta_setup;               /* Minimum no of STA required to start TWT setup */
38942     A_UINT32 min_no_sta_teardown;            /* Minimum no of STA below which TWT will be torn down */
38943     A_UINT32 no_of_bcast_mcast_slots;        /* Number of default slot sizes reserved for BCAST/MCAST delivery */
38944     A_UINT32 min_no_twt_slots;               /* Minimum no of available slots for TWT to be operational */
38945     A_UINT32 max_no_sta_twt;                 /* Max no of STA with which TWT is possible (must be <= the wmi_resource_config's twt_ap_sta_count value) */
38946     /*
38947      * The below interval parameters have units of milliseconds.
38948      */
38949     A_UINT32 mode_check_interval;            /* Interval between two successive check to decide the mode of TWT */
38950     A_UINT32 add_sta_slot_interval;          /* Interval between decisions making to create TWT slots for STAs */
38951     A_UINT32 remove_sta_slot_interval;       /* Interval between decisions making to remove TWT slot of STAs */
38952     A_UINT32 flags;                          /* enable/disable flags, refer to MACROs TWT_EN_DIS_FLAGS_* (TWT_EN_DIS_FLAGS_GET_BTWT etc.) */
38953 } wmi_twt_enable_cmd_fixed_param;
38954 
38955 /* status code of enabling TWT */
38956 typedef enum _WMI_ENABLE_TWT_STATUS_T {
38957     WMI_ENABLE_TWT_STATUS_OK,              /* enabling TWT successfully completed */
38958     WMI_ENABLE_TWT_STATUS_ALREADY_ENABLED, /* TWT already enabled */
38959     WMI_ENABLE_TWT_STATUS_NOT_READY,       /* FW not ready for enabling TWT */
38960     WMI_ENABLE_TWT_INVALID_PARAM,          /* invalid parameters */
38961     WMI_ENABLE_TWT_STATUS_UNKNOWN_ERROR,   /* enabling TWT failed with an unknown reason */
38962 } WMI_ENABLE_TWT_STATUS_T;
38963 
38964 typedef struct {
38965     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_enable_complete_event_fixed_param */
38966     /** pdev_id for identifying the MAC.  See macros starting with WMI_PDEV_ID_ for values. In non-DBDC case host should set it to 0 */
38967     A_UINT32 pdev_id;
38968     A_UINT32 status;        /* WMI_ENABLE_TWT_STATUS_T */
38969 } wmi_twt_enable_complete_event_fixed_param;
38970 
38971 typedef struct {
38972     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_disable_cmd_fixed_param  */
38973     /** pdev_id for identifying the MAC.  See macros starting with WMI_PDEV_ID_ for values. In non-DBDC case host should set it to 0 */
38974     A_UINT32 pdev_id;       /* host should never set it to WMI_PDEV_ID_SOC  */
38975     A_UINT32 flags;         /* enable/disable flags, refer to MACROs TWT_EN_DIS_FLAGS_* (TWT_EN_DIS_FLAGS_GET_BTWT etc.) */
38976     A_UINT32 reason_code;   /* refer to WMI_DISABLE_TWT_REASON_T */
38977 } wmi_twt_disable_cmd_fixed_param;
38978 
38979 typedef struct {
38980     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_disable_complete_event_fixed_param */
38981     A_UINT32 pdev_id;
38982     A_UINT32 status; /* refer to WMI_DISABLE_TWT_STATUS_T enum */
38983 } wmi_twt_disable_complete_event_fixed_param;
38984 
38985 /* status code of TWT Disable */
38986 typedef enum _WMI_DISABLE_TWT_STATUS_T {
38987     WMI_DISABLE_TWT_STATUS_OK,                  /*  Disabling TWT successfully completed */
38988     WMI_DISABLE_TWT_STATUS_ROAM_IN_PROGRESS,    /* Roaming in progress */
38989     WMI_DISABLE_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
38990     WMI_DISABLE_TWT_STATUS_SCAN_IN_PROGRESS,    /* Scan in progress */
38991 } WMI_DISABLE_TWT_STATUS_T;
38992 
38993 /* Host reason code of TWT Disable command : Set by Host */
38994 typedef enum _WMI_DISABLE_TWT_REASON_T {
38995     /* Host will set one of below reason code while disabling TWT */
38996     WMI_DISABLE_TWT_REASON_NONE,                        /* Normal case */
38997     WMI_DISABLE_TWT_REASON_CONCURRENCY_SCC,             /* Concurrency case SCC */
38998     WMI_DISABLE_TWT_REASON_CONCURRENCY_MCC,             /* Concurrency case MCC */
38999     WMI_DISABLE_TWT_REASON_CHANGE_CONGESTION_TIMEOUT,   /* To change congestion time */
39000     WMI_DISABLE_TWT_REASON_P2P_GO_NOA,                  /* P2P GO NOA reason */
39001 } WMI_DISABLE_TWT_REASON_T;
39002 
39003 /* Notification event ID to Host */
39004 typedef enum _WMI_TWT_NOTIFICATION_ID_T {
39005     WMI_TWT_NOTIFY_EVENT_READY = 1,
39006     WMI_TWT_NOTIFY_EVENT_AP_TWT_REQ_BIT_SET = 2,
39007     WMI_TWT_NOTIFY_EVENT_AP_TWT_REQ_BIT_CLEAR = 3,
39008 } WMI_TWT_NOTIFICATION_ID_T;
39009 
39010 typedef struct {
39011     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_notify_event_fixed_param */
39012     A_UINT32 vdev_id;      /* vdev id of TWT notify event */
39013     A_UINT32 event_id;     /* refer to WMI_TWT_NOTIFICATION_ID_T */
39014 } wmi_twt_notify_event_fixed_param;
39015 
39016 /* from IEEE 802.11ah section 9.4.2.200 */
39017 typedef enum _WMI_TWT_COMMAND_T {
39018     WMI_TWT_COMMAND_REQUEST_TWT    = 0,
39019     WMI_TWT_COMMAND_SUGGEST_TWT    = 1,
39020     WMI_TWT_COMMAND_DEMAND_TWT     = 2,
39021     WMI_TWT_COMMAND_TWT_GROUPING   = 3,
39022     WMI_TWT_COMMAND_ACCEPT_TWT     = 4,
39023     WMI_TWT_COMMAND_ALTERNATE_TWT  = 5,
39024     WMI_TWT_COMMAND_DICTATE_TWT    = 6,
39025     WMI_TWT_COMMAND_REJECT_TWT     = 7,
39026 } WMI_TWT_COMMAND_T;
39027 
39028 /* TWT command, refer to WMI_TWT_COMMAND_T */
39029 #define TWT_FLAGS_GET_CMD(flag)                 WMI_GET_BITS(flag, 0, 8)
39030 #define TWT_FLAGS_SET_CMD(flag, val)            WMI_SET_BITS(flag, 0, 8, val)
39031 
39032 /* 0 means Individual TWT, 1 means Broadcast TWT */
39033 #define TWT_FLAGS_GET_BROADCAST(flag)           WMI_GET_BITS(flag, 8, 1)
39034 #define TWT_FLAGS_SET_BROADCAST(flag, val)      WMI_SET_BITS(flag, 8, 1, val)
39035 
39036 /* 0 means non-Trigger-enabled TWT, 1 means  means Trigger-enabled TWT */
39037 #define TWT_FLAGS_GET_TRIGGER(flag)             WMI_GET_BITS(flag, 9, 1)
39038 #define TWT_FLAGS_SET_TRIGGER(flag, val)        WMI_SET_BITS(flag, 9, 1, val)
39039 
39040 /* flow type 0 means announced TWT, 1 means un-announced TWT */
39041 #define TWT_FLAGS_GET_FLOW_TYPE(flag)           WMI_GET_BITS(flag, 10, 1)
39042 #define TWT_FLAGS_SET_FLOW_TYPE(flag, val)      WMI_SET_BITS(flag, 10, 1, val)
39043 
39044 /* 0 means TWT protection is required, 1 means TWT protection is not required */
39045 #define TWT_FLAGS_GET_PROTECTION(flag)          WMI_GET_BITS(flag, 11, 1)
39046 #define TWT_FLAGS_SET_PROTECTION(flag, val)     WMI_SET_BITS(flag, 11, 1, val)
39047 
39048 /* B-TWT ID 0: 0 means non-0 B-TWT ID or I-TWT, 1 means B-TWT ID 0 */
39049 #define TWT_FLAGS_GET_BTWT_ID0(flag)            WMI_GET_BITS(flag, 12, 1)
39050 #define TWT_FLAGS_SET_BTWT_ID0(flag, val)       WMI_SET_BITS(flag, 12, 1, val)
39051 
39052 /* 0 means TWT Information frame is enabled, 1 means TWT Information frame is disabled */
39053 #define TWT_FLAGS_GET_TWT_INFO_FRAME_DISABLED(flag)      WMI_GET_BITS(flag, 13, 1)
39054 #define TWT_FLAGS_SET_TWT_INFO_FRAME_DISABLED(flag, val) WMI_SET_BITS(flag, 13, 1, val)
39055 
39056 /*
39057  * 1 means PM_RESPONDER_MODE information sent in BIT15 is valid, 0 means it is not valid.
39058  * Will be used for backward compatibility if host uses older FW versions
39059  * then value will be 0 so host will not consider the BIT15 value.
39060  */
39061 #define TWT_FLAGS_GET_PM_RESPONDER_MODE_VALID(flag)      WMI_GET_BITS(flag, 14, 1)
39062 #define TWT_FLAGS_SET_PM_RESPONDER_MODE_VALID(flag, val) WMI_SET_BITS(flag, 14, 1, val)
39063 
39064 /* 1 means PM_RESPONDER_MODE supported, 0 means not supported */
39065 #define TWT_FLAGS_GET_PM_RESPONDER_MODE(flag)      WMI_GET_BITS(flag, 15, 1)
39066 #define TWT_FLAGS_SET_PM_RESPONDER_MODE(flag, val) WMI_SET_BITS(flag, 15, 1, val)
39067 
39068 typedef struct {
39069     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_ack_event_fixed_param */
39070     A_UINT32 vdev_id;       /* VDEV identifier */
39071     wmi_mac_addr peer_macaddr; /* peer MAC address */
39072     A_UINT32 dialog_id;     /* TWT dialog ID */
39073     A_UINT32 twt_cmd;       /* TWT command for which this ack is sent */
39074     A_UINT32 status;        /* Status code corresponding to twt_cmd.
39075                              * This status field contains a value from the
39076                              * status enum corresponding to the twt_cmd type
39077                              * (WMI_ADD_TWT_STATUS_T, WMI_DEL_TWT_STATUS_T,
39078                              * WMI_PAUSE_TWT_STATUS_T, etc.)
39079                              */
39080 } wmi_twt_ack_event_fixed_param;
39081 
39082 typedef struct {
39083     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_add_dialog_cmd_fixed_param  */
39084     A_UINT32 vdev_id;       /* VDEV identifier */
39085     wmi_mac_addr peer_macaddr;      /* peer MAC address */
39086     A_UINT32 dialog_id; /* TWT dialog_id (< 0xFF) is per peer, I-TWT & B-TWT use different diaglog ID */
39087 
39088     /* 1. wake_intvl_mantis must be <= 0xFFFF
39089      * 2. wake_intvl_us must be divided evenly by wake_intvl_mantis,
39090      *    i.e., wake_intvl_us % wake_intvl_mantis == 0
39091      * 3. the quotient of wake_intvl_us/wake_intvl_mantis must be 2 to N-th(0<=N<=31) power,
39092      *    i.e., wake_intvl_us/wake_intvl_mantis == 2^N, 0<=N<=31
39093      */
39094     A_UINT32 wake_intvl_us;         /* TWT Wake Interval in units of us */
39095     A_UINT32 wake_intvl_mantis;     /* TWT Wake Interval Mantissa */
39096 
39097     /* wake_dura_us must be divided evenly by 256, i.e., wake_dura_us % 256 == 0 */
39098     A_UINT32 wake_dura_us;          /* TWT Wake Duration in units of us, must be <= 65280 (0xFF00) */
39099 
39100     A_UINT32 sp_offset_us;          /* this long time after TWT setup the 1st SP will start */
39101     A_UINT32 flags;                 /* TWT flags, refer to MACROs TWT_FLAGS_*(TWT_FLAGS_GET_CMD etc) */
39102 
39103     /* Broadcast TWT(B-TWT) Persistence, when used in Add/update Dialog,
39104      * indicates for how long(in units of TBTTs) current B-TWT session
39105      * parameters will not be changed.
39106      * Refer to 11ax spec session "9.4.2.199 TWT element" for more info.
39107      */
39108     A_UINT32 b_twt_persistence;
39109 
39110     /* Broadcast TWT(B-TWT) Recommendation, refer to section
39111      * "9.4.2.199 TWT element" of latest 11ax draft
39112      */
39113     A_UINT32 b_twt_recommendation;
39114 
39115     /* Min tolerance limit of wake interval.
39116      * If this variable is set to 0 by host, FW will ignore it.
39117      */
39118     A_UINT32 min_wake_intvl_us;
39119 
39120    /* Max tolerance limit of wake interval.
39121     * If this variable is set to 0 by host, FW will ignore it.
39122     */
39123     A_UINT32 max_wake_intvl_us;
39124 
39125    /* Min tolerance limit of wake duration.
39126     * If this variable is set to 0 by host, FW will ignore it.
39127     */
39128     A_UINT32 min_wake_dura_us;
39129 
39130    /* Max tolerance limit of wake duration.
39131     * If this variable is set to 0 by host, FW will ignore it.
39132     */
39133     A_UINT32 max_wake_dura_us;
39134 
39135     /*
39136      * Service period start TSF (absolute)
39137      * If sp_start_tsf_lo == sp_start_tsf_hi == 0, the specification
39138      * is invalid, and shall be ignored.
39139      */
39140     A_UINT32 sp_start_tsf_lo; /* bits 31:0 */
39141     A_UINT32 sp_start_tsf_hi; /* bits 63:32 */
39142 
39143     /*
39144      * In announced mode, wait for announce timeout before explicit announce
39145      * using QoS NULL.
39146      * If set to 0, FW will send QoS NULL immediately.
39147      */
39148     A_UINT32 announce_timeout_us;
39149 
39150     A_UINT32 link_id_bitmap;
39151 
39152     /* parameters required for R-TWT feature */
39153     A_UINT32 r_twt_dl_tid_bitmap;
39154     A_UINT32 r_twt_ul_tid_bitmap;
39155 } wmi_twt_add_dialog_cmd_fixed_param;
39156 
39157 /* status code of adding TWT dialog */
39158 typedef enum _WMI_ADD_TWT_STATUS_T {
39159     WMI_ADD_TWT_STATUS_OK,                  /* adding TWT dialog successfully completed */
39160     WMI_ADD_TWT_STATUS_TWT_NOT_ENABLED,     /* TWT not enabled */
39161     WMI_ADD_TWT_STATUS_USED_DIALOG_ID,      /* TWT dialog ID is already used */
39162     WMI_ADD_TWT_STATUS_INVALID_PARAM,       /* invalid parameters */
39163     WMI_ADD_TWT_STATUS_NOT_READY,           /* FW not ready */
39164     WMI_ADD_TWT_STATUS_NO_RESOURCE,         /* FW resource exhausted */
39165     WMI_ADD_TWT_STATUS_NO_ACK,              /* peer AP/STA did not ACK the request/response frame */
39166     WMI_ADD_TWT_STATUS_NO_RESPONSE,         /* peer AP did not send the response frame */
39167     WMI_ADD_TWT_STATUS_DENIED,              /* AP did not accept the request */
39168     WMI_ADD_TWT_STATUS_UNKNOWN_ERROR,       /* adding TWT dialog failed with an unknown reason */
39169     WMI_ADD_TWT_STATUS_AP_PARAMS_NOT_IN_RANGE,  /* peer AP wake interval, duration not in range */
39170     WMI_ADD_TWT_STATUS_AP_IE_VALIDATION_FAILED, /* peer AP IE Validation Failed */
39171     WMI_ADD_TWT_STATUS_ROAM_IN_PROGRESS,    /* Roaming in progress */
39172     WMI_ADD_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
39173     WMI_ADD_TWT_STATUS_SCAN_IN_PROGRESS,    /* Scan in progress */
39174     WMI_ADD_TWT_STATUS_DIALOG_ID_BUSY,      /* FW is in the process of handling this dialog */
39175     WMI_ADD_TWT_STATUS_BTWT_NOT_ENBABLED,   /* Broadcast TWT is not enabled */
39176     WMI_ADD_TWT_STATUS_RTWT_NOT_ENBABLED,   /* Restricted TWT is not enabled */
39177     WMI_ADD_TWT_STATUS_LINK_SWITCH_IN_PROGRESS, /* Link switch is ongoing */
39178     WMI_ADD_TWT_STATUS_UNSUPPORTED_MODE_MLMR,   /* Unsupported in MLMR mode */
39179 } WMI_ADD_TWT_STATUS_T;
39180 
39181 typedef struct {
39182     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_add_dialog_additional_params */
39183     A_UINT32 flags;         /* TWT flags, refer to MACROs TWT_FLAGS_*(TWT_FLAGS_GET_CMD etc) */
39184     A_UINT32 wake_dur_us;   /* Wake duration in uS */
39185     A_UINT32 wake_intvl_us; /* Wake Interval in uS */
39186     A_UINT32 sp_offset_us;  /* SP Starting Offset */
39187     A_UINT32 sp_tsf_us_lo;  /* SP start TSF bits 31:0 */
39188     A_UINT32 sp_tsf_us_hi;  /* SP start TSF bits 63:32 */
39189 } wmi_twt_add_dialog_additional_params;
39190 
39191 typedef struct {
39192     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_add_dialog_complete_event_fixed_param */
39193     A_UINT32 vdev_id;       /* VDEV identifier */
39194     wmi_mac_addr peer_macaddr; /* peer MAC address */
39195     A_UINT32 dialog_id;     /* TWT dialog ID */
39196     A_UINT32 status;        /* refer to WMI_ADD_TWT_STATUS_T */
39197 /*
39198  * This fixed_param TLV is followed by the below TLVs:
39199  * wmi_twt_add_dialog_additional_params twt_params[]; // TWT params received
39200  *                                                    // from peer
39201  */
39202 } wmi_twt_add_dialog_complete_event_fixed_param;
39203 
39204 typedef struct {
39205     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_del_dialog_cmd_fixed_param  */
39206     A_UINT32 vdev_id;       /* VDEV identifier */
39207     wmi_mac_addr peer_macaddr; /* peer MAC address */
39208     A_UINT32 dialog_id;     /* TWT dialog ID */
39209     /* Broadcast TWT(B-TWT) Persistence, when used in Del Dialog,
39210      * indicates for how long(in units of TBTTs) current B-TWT session
39211      * parameters will be present.
39212      * Refer to 11ax spec session "9.4.2.199 TWT element" for more info.
39213      */
39214     A_UINT32 b_twt_persistence;
39215     A_UINT32 is_bcast_twt;
39216 } wmi_twt_del_dialog_cmd_fixed_param;
39217 
39218 /* status code of deleting TWT dialog */
39219 typedef enum _WMI_DEL_TWT_STATUS_T {
39220     WMI_DEL_TWT_STATUS_OK,                  /* deleting TWT dialog successfully completed */
39221     WMI_DEL_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
39222     WMI_DEL_TWT_STATUS_INVALID_PARAM,       /* invalid parameters */
39223     WMI_DEL_TWT_STATUS_DIALOG_ID_BUSY,      /* FW is in the process of handling this dialog */
39224     WMI_DEL_TWT_STATUS_NO_RESOURCE,         /* FW resource exhausted */
39225     WMI_DEL_TWT_STATUS_NO_ACK,              /* peer AP/STA did not ACK the request/response frame */
39226     WMI_DEL_TWT_STATUS_UNKNOWN_ERROR,       /* deleting TWT dialog failed with an unknown reason */
39227     WMI_DEL_TWT_STATUS_PEER_INIT_TEARDOWN,  /* Peer Initiated Teardown */
39228     WMI_DEL_TWT_STATUS_ROAMING,             /* Reason Roaming Start*/
39229     WMI_DEL_TWT_STATUS_CONCURRENCY,         /* Teardown due to concurrency */
39230     WMI_DEL_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
39231     WMI_DEL_TWT_STATUS_SCAN_IN_PROGRESS,    /* Reason Scan in progress */
39232     WMI_DEL_TWT_STATUS_CHANGE_CONGESTION_TIMEOUT,   /* Congestion timeout changed */
39233     WMI_DEL_TWT_STATUS_P2P_GO_NOA,                  /* P2P GO NOA */
39234 } WMI_DEL_TWT_STATUS_T;
39235 
39236 typedef struct {
39237     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_del_dialog_complete_event_fixed_param */
39238     A_UINT32 vdev_id;       /* VDEV identifier */
39239     wmi_mac_addr peer_macaddr; /* peer MAC address */
39240     A_UINT32 dialog_id;     /* TWT dialog ID */
39241     A_UINT32 status;        /* refer to WMI_DEL_TWT_STATUS_T */
39242 } wmi_twt_del_dialog_complete_event_fixed_param;
39243 
39244 typedef struct {
39245     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_pause_dialog_cmd_fixed_param  */
39246     A_UINT32 vdev_id;       /* VDEV identifier */
39247     wmi_mac_addr peer_macaddr; /* peer MAC address */
39248     A_UINT32 dialog_id;     /* TWT dialog ID */
39249 } wmi_twt_pause_dialog_cmd_fixed_param;
39250 
39251 /* status code of pausing TWT dialog */
39252 typedef enum _WMI_PAUSE_TWT_STATUS_T {
39253     WMI_PAUSE_TWT_STATUS_OK,                  /* pausing TWT dialog successfully completed */
39254     WMI_PAUSE_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
39255     WMI_PAUSE_TWT_STATUS_INVALID_PARAM,       /* invalid parameters */
39256     WMI_PAUSE_TWT_STATUS_DIALOG_ID_BUSY,      /* FW is in the process of handling this dialog */
39257     WMI_PAUSE_TWT_STATUS_NO_RESOURCE,         /* FW resource exhausted */
39258     WMI_PAUSE_TWT_STATUS_NO_ACK,              /* peer AP/STA did not ACK the request/response frame */
39259     WMI_PAUSE_TWT_STATUS_UNKNOWN_ERROR,       /* pausing TWT dialog failed with an unknown reason */
39260     WMI_PAUSE_TWT_STATUS_ALREADY_PAUSED,      /* The TWT dialog is already paused */
39261     WMI_PAUSE_TWT_STATUS_TWT_INFO_FRM_NOT_SUPPORTED, /* TWT information frame is not supported by AP */
39262     WMI_PAUSE_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
39263     WMI_PAUSE_TWT_STATUS_ROAM_IN_PROGRESS,    /* Roam in progress */
39264     WMI_PAUSE_TWT_STATUS_SCAN_IN_PROGRESS,    /* Scan in progress */
39265 } WMI_PAUSE_TWT_STATUS_T;
39266 
39267 typedef struct {
39268     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_pause_dialog_complete_event_fixed_param */
39269     A_UINT32 vdev_id;       /* VDEV identifier */
39270     wmi_mac_addr peer_macaddr; /* peer MAC address */
39271     A_UINT32 dialog_id;     /* TWT dialog ID */
39272     A_UINT32 status;        /* refer to WMI_PAUSE_TWT_STATUS_T */
39273 } wmi_twt_pause_dialog_complete_event_fixed_param;
39274 
39275 typedef struct {
39276     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_resume_dialog_cmd_fixed_param  */
39277     A_UINT32 vdev_id;       /* VDEV identifier */
39278     wmi_mac_addr peer_macaddr; /* peer MAC address */
39279     A_UINT32 dialog_id;     /* TWT dialog ID */
39280     A_UINT32 sp_offset_us;  /* this long time after TWT resumed the 1st SP will start */
39281     A_UINT32 next_twt_size; /* Next TWT subfield Size, refer to IEEE 802.11ax section "9.4.1.60 TWT Information field" */
39282 } wmi_twt_resume_dialog_cmd_fixed_param;
39283 
39284 /* status code of resuming TWT dialog */
39285 typedef enum _WMI_RESUME_TWT_STATUS_T {
39286     WMI_RESUME_TWT_STATUS_OK,                  /* resuming TWT dialog successfully completed */
39287     WMI_RESUME_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
39288     WMI_RESUME_TWT_STATUS_INVALID_PARAM,       /* invalid parameters */
39289     WMI_RESUME_TWT_STATUS_DIALOG_ID_BUSY,      /* FW is in the process of handling this dialog */
39290     WMI_RESUME_TWT_STATUS_NOT_PAUSED,          /* dialog not paused currently */
39291     WMI_RESUME_TWT_STATUS_NO_RESOURCE,         /* FW resource exhausted */
39292     WMI_RESUME_TWT_STATUS_NO_ACK,              /* peer AP/STA did not ACK the request/response frame */
39293     WMI_RESUME_TWT_STATUS_UNKNOWN_ERROR,       /* resuming TWT dialog failed with an unknown reason */
39294     WMI_RESUME_TWT_STATUS_TWT_INFO_FRM_NOT_SUPPORTED, /* TWT information frame is not supported by AP */
39295     WMI_RESUME_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
39296     WMI_RESUME_TWT_STATUS_ROAM_IN_PROGRESS,    /* Roam in progress */
39297     WMI_RESUME_TWT_STATUS_SCAN_IN_PROGRESS,    /* Scan in progress */
39298 } WMI_RESUME_TWT_STATUS_T;
39299 
39300 typedef struct {
39301     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_resume_dialog_complete_event_fixed_param */
39302     A_UINT32 vdev_id;       /* VDEV identifier */
39303     wmi_mac_addr peer_macaddr; /* peer MAC address */
39304     A_UINT32 dialog_id;     /* TWT dialog ID */
39305     A_UINT32 status;        /* refer to WMI_RESUME_TWT_STATUS_T */
39306 } wmi_twt_resume_dialog_complete_event_fixed_param;
39307 
39308 typedef struct {
39309     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_nudge_dialog_cmd_fixed_param  */
39310     A_UINT32 vdev_id;       /* VDEV identifier */
39311     wmi_mac_addr peer_macaddr; /* peer MAC address */
39312     A_UINT32 dialog_id;     /* TWT dialog ID */
39313     A_UINT32 suspend_duration_ms;  /* this long time after TWT paused the 1st SP will start (millisecond) */
39314     A_UINT32 next_twt_size; /* Next TWT subfield Size, refer to IEEE 802.11ax section "9.4.1.60 TWT Information field" */
39315     A_INT32 sp_start_offset; /* Next TWT service period will be offset by this time (microsecond) */
39316 } wmi_twt_nudge_dialog_cmd_fixed_param;
39317 
39318 /* status code of nudging TWT dialog */
39319 typedef enum _WMI_TWT_NUDGE_STATUS_T {
39320     WMI_NUDGE_TWT_STATUS_OK,                  /* nudging TWT dialog successfully completed */
39321     WMI_NUDGE_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID doesn't exist */
39322     WMI_NUDGE_TWT_STATUS_INVALID_PARAM,       /* invalid parameters */
39323     WMI_NUDGE_TWT_STATUS_DIALOG_ID_BUSY,      /* FW is in the process of handling this dialog */
39324     WMI_NUDGE_TWT_STATUS_NO_RESOURCE,         /* FW resource exhausted */
39325     WMI_NUDGE_TWT_STATUS_NO_ACK,              /* peer AP/STA did not ACK the request/response frame */
39326     WMI_NUDGE_TWT_STATUS_UNKNOWN_ERROR,       /* nudging TWT dialog failed with an unknown reason */
39327     WMI_NUDGE_TWT_STATUS_ALREADY_PAUSED,      /* The TWT dialog is already paused */
39328     WMI_NUDGE_TWT_STATUS_TWT_INFO_FRM_NOT_SUPPORTED, /* TWT information frame is not supported by AP */
39329     WMI_NUDGE_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
39330     WMI_NUDGE_TWT_STATUS_ROAM_IN_PROGRESS,    /* Roam in progress */
39331     WMI_NUDGE_TWT_STATUS_SCAN_IN_PROGRESS,    /* Scan in progress */
39332 } WMI_TWT_NUDGE_STATUS_T;
39333 
39334 typedef struct {
39335     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_nudge_dialog_complete_event_fixed_param */
39336     A_UINT32 vdev_id;       /* VDEV identifier */
39337     wmi_mac_addr peer_macaddr; /* peer MAC address */
39338     A_UINT32 dialog_id;     /* TWT dialog ID */
39339     A_UINT32 status;        /* refer to WMI_NUDGE_TWT_STATUS_T */
39340     A_UINT32 sp_tsf_us_lo;  /* SP resume TSF bits 31:0 */
39341     A_UINT32 sp_tsf_us_hi;  /* SP resume TSF bits 63:32 */
39342 } wmi_twt_nudge_dialog_complete_event_fixed_param;
39343 
39344 typedef struct {
39345     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_btwt_invite_sta_cmd_fixed_param  */
39346     A_UINT32 vdev_id;       /* VDEV identifier */
39347     wmi_mac_addr peer_macaddr; /* peer MAC address */
39348     A_UINT32 dialog_id;     /* TWT dialog ID */
39349     /* parameters required for R-TWT feature */
39350     A_UINT32 r_twt_dl_tid_bitmap;
39351     A_UINT32 r_twt_ul_tid_bitmap;
39352 } wmi_twt_btwt_invite_sta_cmd_fixed_param;
39353 
39354 /* status code of inviting STA to B-TWT dialog */
39355 typedef enum _WMI_TWT_BTWT_INVITE_STA_STATUS_T {
39356     WMI_TWT_BTWT_INVITE_STA_STATUS_OK,                  /* inviting STA to B-TWT successfully completed */
39357     WMI_TWT_BTWT_INVITE_STA_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
39358     WMI_TWT_BTWT_INVITE_STA_STATUS_INVALID_PARAM,       /* invalid parameters */
39359     WMI_TWT_BTWT_INVITE_STA_STATUS_DIALOG_ID_BUSY,      /* FW is in the process of handling this dialog */
39360     WMI_TWT_BTWT_INVITE_STA_STATUS_ALREADY_JOINED,      /* peer STA already joined the session */
39361     WMI_TWT_BTWT_INVITE_STA_STATUS_NO_RESOURCE,         /* FW resource exhausted */
39362     WMI_TWT_BTWT_INVITE_STA_STATUS_NO_ACK,              /* peer STA did not ACK the request/response frame */
39363     WMI_TWT_BTWT_INVITE_STA_STATUS_UNKNOWN_ERROR,       /* failed with an unknown reason */
39364 } WMI_TWT_BTWT_INVITE_STA_STATUS_T;
39365 
39366 typedef struct {
39367     A_UINT32 tlv_header;    /* TLV tag and len; tag equals wmi_twt_btwt_invite_sta_complete_event_fixed_param */
39368     A_UINT32 vdev_id;       /* VDEV identifier */
39369     wmi_mac_addr peer_macaddr; /* peer MAC address */
39370     A_UINT32 dialog_id;     /* TWT dialog ID */
39371     A_UINT32 status;        /* refer to WMI_TWT_BTWT_INVITE_STA_STATUS_T */
39372 } wmi_twt_btwt_invite_sta_complete_event_fixed_param;
39373 
39374 typedef struct {
39375     A_UINT32 tlv_header;    /* TLV tag and len; tag equals wmi_twt_btwt_remove_sta_cmd_fixed_param  */
39376     A_UINT32 vdev_id;       /* VDEV identifier */
39377     wmi_mac_addr peer_macaddr; /* peer MAC address */
39378     A_UINT32 dialog_id;     /* TWT dialog ID */
39379     /* parameters required for R-TWT feature */
39380     A_UINT32 r_twt_dl_tid_bitmap;
39381     A_UINT32 r_twt_ul_tid_bitmap;
39382 } wmi_twt_btwt_remove_sta_cmd_fixed_param;
39383 
39384 /* status code of removing STA from B-TWT dialog */
39385 typedef enum _WMI_TWT_BTWT_REMOVE_STA_STATUS_T {
39386     WMI_TWT_BTWT_REMOVE_STA_STATUS_OK,                  /* removing STA from B-TWT successfully completed */
39387     WMI_TWT_BTWT_REMOVE_STA_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
39388     WMI_TWT_BTWT_REMOVE_STA_STATUS_INVALID_PARAM,       /* invalid parameters */
39389     WMI_TWT_BTWT_REMOVE_STA_STATUS_DIALOG_ID_BUSY,      /* FW is in the process of handling this dialog */
39390     WMI_TWT_BTWT_REMOVE_STA_STATUS_NOT_JOINED,          /* peer STA not joined yet */
39391     WMI_TWT_BTWT_REMOVE_STA_STATUS_NO_RESOURCE,         /* FW resource exhausted */
39392     WMI_TWT_BTWT_REMOVE_STA_STATUS_NO_ACK,              /* peer STA did not ACK the request/response frame */
39393     WMI_TWT_BTWT_REMOVE_STA_STATUS_UNKNOWN_ERROR,       /* failed with an unknown reason */
39394 } WMI_TWT_BTWT_REMOVE_STA_STATUS_T;
39395 
39396 typedef struct {
39397     A_UINT32 tlv_header;    /* TLV tag and len; tag equals wmi_twt_btwt_remove_sta_complete_event_fixed_param */
39398     A_UINT32 vdev_id;       /* VDEV identifier */
39399     wmi_mac_addr peer_macaddr; /* peer MAC address */
39400     A_UINT32 dialog_id;     /* TWT dialog ID */
39401     A_UINT32 status;        /* refer to WMI_TWT_BTWT_REMOVE_STA_STATUS_T */
39402 } wmi_twt_btwt_remove_sta_complete_event_fixed_param;
39403 
39404 typedef enum {
39405     WMI_DMA_RING_CONFIG_MODULE_SPECTRAL,
39406     WMI_DMA_RING_CONFIG_MODULE_RTT,
39407     WMI_DMA_RING_CONFIG_MODULE_CV_UPLOAD,
39408     WMI_DMA_RING_CONFIG_MODULE_WIFI_RADAR,
39409 } WMI_DMA_RING_SUPPORTED_MODULE;
39410 
39411 typedef struct {
39412     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_DMA_RING_CAPABILITIES */
39413     A_UINT32 pdev_id;
39414     A_UINT32 mod_id;     /* see WMI_DMA_RING_SUPPORTED_MODULE */
39415     A_UINT32 ring_elems_min; /* minimum spaces in the DMA ring for this pdev */
39416     A_UINT32 min_buf_size; /* minimum size in bytes of each buffer in the DMA ring */
39417     A_UINT32 min_buf_align; /* minimum alignment in bytes of each buffer in the DMA ring */
39418 
39419     /**************************************************************************
39420      * DON'T ADD ANY FURTHER FIELDS HERE -
39421      * It would cause the size of the READY_EXT message within some targets
39422      * to exceed the size of the buffer used for the message.
39423      **************************************************************************/
39424 } WMI_DMA_RING_CAPABILITIES;
39425 
39426 typedef struct {
39427     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUCT_ wmi_chan_rf_characterization_info */
39428 
39429     /**
39430      * [7:0]  : channel metric -  0 = unusable, 1 = worst, 100 = best
39431      * [11:8] : channel BW - This bit-field uses values compatible with
39432      *          enum definitions used internally within the target's
39433      *          halphy code.  This bit field uses wmi_channel_width.
39434      * [15:12]: Reserved
39435      * [31:16]: Frequency - Center frequency of the channel for which
39436      *          the RF characterisation info applies (MHz)
39437      */
39438     A_UINT32 freq_info;
39439 
39440     /**************************************************************************
39441      * DON'T ADD ANY FURTHER FIELDS HERE -
39442      * It would cause the size of the READY_EXT message within some targets
39443      * to exceed the size of the buffer used for the message.
39444      **************************************************************************/
39445 } WMI_CHAN_RF_CHARACTERIZATION_INFO;
39446 
39447 #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC   0x000000ff
39448 #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC_S 0
39449 #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW            0x00000f00
39450 #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW_S          8
39451 #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ          0xffff0000
39452 #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ_S        16
39453 
39454 #define WMI_CHAN_RF_CHARACTERIZATION_CHAN_METRIC_SET(dword,val) \
39455             WMI_F_RMW((dword)->freq_info,(val), \
39456             WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC)
39457 #define WMI_CHAN_RF_CHARACTERIZATION_CHAN_METRIC_GET(dword) \
39458             WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC)
39459 
39460 #define WMI_CHAN_RF_CHARACTERIZATION_BW_SET(dword, val) \
39461             WMI_F_RMW((dword)->freq_info,(val), \
39462             WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW)
39463 #define WMI_CHAN_RF_CHARACTERIZATION_BW_GET(dword) \
39464             WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW)
39465 
39466 #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_SET(dword, val) \
39467             WMI_F_RMW((dword)->freq_info,(val), \
39468             WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ)
39469 
39470 #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_GET(dword) \
39471             WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ)
39472 
39473 typedef struct {
39474     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_COEX_FIX_CHANNEL_CAPABILITIES */
39475     /**************************************************************************
39476     * 1: SAP fix channel has higher priority than ACS
39477     * 0: SAP fix channel has lower priority than ACS
39478     **************************************************************************/
39479     A_UINT32 fix_channel_priority;
39480 } WMI_COEX_FIX_CHANNEL_CAPABILITIES;
39481 
39482 
39483 
39484 #define WMI_DMA_RING_PADDR_LO_S 0
39485 #define WMI_DMA_RING_PADDR_LO   0xffffffff
39486 
39487 #define WMI_DMA_RING_BASE_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
39488 #define WMI_DMA_RING_BASE_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
39489 
39490 #define WMI_DMA_RING_HEAD_IDX_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
39491 #define WMI_DMA_RING_HEAD_IDX_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
39492 
39493 #define WMI_DMA_RING_TAIL_IDX_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
39494 #define WMI_DMA_RING_TAIL_IDX_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
39495 
39496 #define WMI_DMA_RING_PADDR_HI_S 0
39497 #define WMI_DMA_RING_PADDR_HI   0xffff
39498 
39499 #define WMI_DMA_RING_BASE_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
39500 #define WMI_DMA_RING_BASE_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
39501 
39502 #define WMI_DMA_RING_HEAD_IDX_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
39503 #define WMI_DMA_RING_HEAD_IDX_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
39504 
39505 #define WMI_DMA_RING_TAIL_IDX_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
39506 #define WMI_DMA_RING_TAIL_IDX_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
39507 
39508 typedef struct {
39509     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_ring_cfg_req_fixed_param */
39510     A_UINT32 pdev_id;
39511     A_UINT32 mod_id;            /* see WMI_DMA_RING_SUPPORTED_MODULE */
39512     /**
39513      * Bits 31:0:   base address of ring [31:0]
39514      */
39515     A_UINT32 base_paddr_lo;
39516     /**
39517      * Bits 15:0:   base address of ring [47:32]
39518      * Bits 31:16:  reserved (set to 0x0)
39519      */
39520     A_UINT32 base_paddr_hi;
39521     /**
39522      * Bits 31:0:   address of head index [31:0]
39523      */
39524     A_UINT32 head_idx_paddr_lo;
39525     /**
39526      * Bits 15:0:   address of head index [47:32]
39527      * Bits 31:16:  reserved (set to 0x0)
39528      */
39529     A_UINT32 head_idx_paddr_hi;
39530     /**
39531      * Bits 31:0:   address of tail index [31:0]
39532      */
39533     A_UINT32 tail_idx_paddr_lo;
39534     /**
39535      * Bits 15:0:   address of tail index [47:32]
39536      * Bits 31:16:  reserved (set to 0x0)
39537      */
39538     A_UINT32 tail_idx_paddr_hi;
39539     A_UINT32 num_elems;          /** Number of elems in the ring */
39540     A_UINT32 buf_size;           /** size of allocated buffer in bytes */
39541 
39542     A_UINT32 num_resp_per_event; /** Number of wmi_dma_buf_release_entry packed together */
39543 
39544     /**
39545      * This parameter specifies the timeout in milliseconds.
39546      * Target should timeout and send whatever resp it has if this time expires.
39547      */
39548     A_UINT32 event_timeout_ms;
39549 } wmi_dma_ring_cfg_req_fixed_param;
39550 
39551 typedef struct {
39552     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_ring_cfg_rsp_fixed_param */
39553     A_UINT32 pdev_id;
39554     A_UINT32 mod_id;        /* see WMI_DMA_RING_SUPPORTED_MODULE */
39555     A_UINT32 cfg_status;    /** Configuration status; see A_STATUS */
39556 } wmi_dma_ring_cfg_rsp_fixed_param;
39557 
39558 typedef struct {
39559     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_fixed_param */
39560     A_UINT32 pdev_id;       /** ID of pdev whose DMA ring produced the data */
39561     A_UINT32 mod_id;        /* see WMI_DMA_RING_SUPPORTED_MODULE */
39562     A_UINT32 num_buf_release_entry;
39563     A_UINT32 num_meta_data_entry;
39564     /* This TLV is followed by another TLV of array of structs.
39565      * wmi_dma_buf_release_entry entries[num_buf_release_entry];
39566      * wmi_dma_buf_release_spectral_meta_data meta_datat[num_meta_data_entry];
39567      * wmi_dma_buf_release_cv_upload_meta_data cv_meta_data[num_meta_data_entry]
39568      * wmi_dma_buf_release_cqi_upload_meta_data
39569      *     cqi_meta_data[num_meta_data_entry]
39570      * wmi_dma_buf_release_wifi_radar_meta_data
39571      *     wifi_radar_meta_data[num_meta_data_entry]
39572      */
39573 } wmi_dma_buf_release_fixed_param;
39574 
39575 typedef struct {
39576     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_entry */
39577     /**
39578      * Bits 31:0:   address of data [31:0]
39579      */
39580     A_UINT32 paddr_lo;
39581     /**
39582      * Bits 11:0:   address of data [43:32]
39583      * Bits 31:12:  host context data [19:0]
39584      */
39585     A_UINT32 paddr_hi;
39586 } wmi_dma_buf_release_entry;
39587 
39588 typedef struct {
39589     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_spectral_meta_data */
39590     /**
39591      * meta data information.
39592      * Host uses the noise floor values as one of the major parameter
39593      * to classify the spectral data.
39594      * This information will not be provided by ucode unlike the fft reports
39595      * which gets DMAed to DDR buffer.
39596      * Hence sending the NF values in dBm units as meta data information.
39597      */
39598     A_INT32 noise_floor[WMI_MAX_CHAINS];
39599     /**
39600      * The time taken by target in micro seconds to complete the reset routine
39601      * and re-initiate the spectral scan.
39602      * If the delay is 0, the WAR to bookkeep the timestamp won't be exercised
39603      * in HOST.
39604      */
39605     A_UINT32 reset_delay;
39606     /**
39607      * Current center freq1 (MHz units)
39608      */
39609     A_UINT32 freq1;
39610     /**
39611      * Current center freq2 (MHz units)
39612      */
39613     A_UINT32 freq2;
39614     /**
39615      * Channel Width (MHz units)
39616      */
39617     A_UINT32 ch_width;
39618 } wmi_dma_buf_release_spectral_meta_data;
39619 
39620 typedef enum {
39621     NO_SCALING = 0, /* No bin scaling*/
39622     /**
39623      * scaled_bin_mag = bin_mag *
39624      *                  sqrt(10^(max(legacy_max_gain - default_agc_max_gain + low_level_offset - RSSI_corr,
39625      *                  (agc_total_gain_db < default_agc_max_gain) * high_level_offset)/10)) *
39626      *                  2^(DET{0,1,2}_SPECTRAL_SCAN_BIN_SCALE - legacy_spectral_scan_bin_scale)
39627      */
39628     AGC_GAIN_RSSI_CORR_BASED = 1,
39629 } WMI_SPECTRAL_SCALING_FORMULA_ID;
39630 
39631 typedef struct {
39632     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_spectral_bin_scaling_params */
39633     A_UINT32 pdev_id;   /* ID of pdev to which the scaling parameters are to be applied */
39634     WMI_SPECTRAL_SCALING_FORMULA_ID formula_id; /* Represets the formula to be used */
39635     A_UINT32 low_level_offset; /* low level offset for fine tuning the scaling factor based on RSSI and AGC gain */
39636     A_UINT32 high_level_offset; /* high level offset for fine tuning the scaling factor based on RSSI and AGC gain */
39637     A_UINT32 rssi_thr; /* RSSI threshold to be used to adjust the inband power of the given spectral report */
39638     A_UINT32 default_agc_max_gain;/* DEFAULT AGC MAX GAIN used. Fetched from register RXTD_RADAR_SBS_CTRL_1_L bits20:13 */
39639 
39640     /**************************************************************************
39641      * DON'T ADD ANY FURTHER FIELDS HERE -
39642      * It would cause the size of the READY_EXT message within some targets
39643      * to exceed the size of the buffer used for the message.
39644      **************************************************************************/
39645 } wmi_spectral_bin_scaling_params;
39646 
39647 #define WMI_SPECTRAL_BW_CAPS_GET(bw_caps, index) WMI_GET_BITS(bw_caps, index, 1)
39648 #define WMI_SPECTRAL_BW_CAPS_SET(bw_caps, index, value) WMI_SET_BITS(bw_caps, index, 1, value)
39649 
39650 #define WMI_SPECTRAL_FFT_SIZE_CAPS_GET(fft_size_caps, index) WMI_GET_BITS(ft_size_caps, index, 1)
39651 #define WMI_SPECTRAL_FFT_SIZE_CAPS_SET(fft_size_caps, index, value) WMI_SET_BITS(fft_size_caps, index, 1, value)
39652 
39653 typedef struct {
39654     A_UINT32 tlv_header;   /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_spectral_scan_bw_capabilities */
39655     A_UINT32 pdev_id;      /* ID of pdev for which the bandwidth capabilities are advertised */
39656     A_UINT32 sscan_mode;   /* scan mode to denote whether this is a normal/agile scan (refer to wmi_spectral_scan_mode) */
39657     A_UINT32 operating_bw; /* Operating bandwidth which supports the bandwidth capabilities,  as per enum wmi_channel_width */
39658     union {
39659         struct {           /* To indicate the scan bandwidths support for the operating bandwidth and scan mode */
39660             A_UINT32 supports_sscan_bw_20:1,
39661                      supports_sscan_bw_40:1,
39662                      supports_sscan_bw_80:1,
39663                      supports_sscan_bw_160:1,
39664                      supports_sscan_bw_80p80:1,
39665                      supports_sscan_bw_320:1,
39666                      reserved:26;
39667         };
39668         A_UINT32 supported_flags;
39669     };
39670 } wmi_spectral_scan_bw_capabilities;
39671 
39672 typedef struct {
39673     A_UINT32 tlv_header;  /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_spectral_fft_size_capabilities */
39674     A_UINT32 pdev_id;     /* ID of pdev for which the bandwidth capabilities are advertised */
39675     A_UINT32 sscan_bw;    /* sscan bandwidth, as per enum wmi_channel_width */
39676     union {
39677         struct {          /* To indicate the scan FFT sizes supported in the sscan bandwidth */
39678             A_UINT32 supports_fft_size_1:1,
39679                      supports_fft_size_2:1,
39680                      supports_fft_size_3:1,
39681                      supports_fft_size_4:1,
39682                      supports_fft_size_5:1,
39683                      supports_fft_size_6:1,
39684                      supports_fft_size_7:1,
39685                      supports_fft_size_8:1,
39686                      supports_fft_size_9:1,
39687                      supports_fft_size_10:1,
39688                      supports_fft_size_11:1,
39689                      reserved:21;
39690         };
39691         A_UINT32 supported_flags;
39692     };
39693 } wmi_spectral_fft_size_capabilities;
39694 
39695 typedef struct {
39696     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_ctl_failsafe_event_params */
39697     A_UINT32 pdev_id;   /* ID of pdev to which ctl failsafe status is sent */
39698     A_UINT32 ctl_FailsafeStatus; /* To indicate if Failsafe value is imposed on CTL. 0- Success, 1- Failsafe imposed */
39699 } wmi_pdev_ctl_failsafe_check_fixed_param;
39700 
39701 typedef struct {
39702     A_UINT32 tlv_header;  /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_runtime_dpd_recal_cmd_fixed_param  */
39703     A_UINT32 enable;      /* Enable/disable */
39704 
39705     /* Thermal Thresholds,
39706      * DPD recalibration will be triggered, when current temperature is
39707      * either greater than (tmpt_base_c + dlt_tmpt_c_h),
39708      * or less than (tmpt_base_c + dlt_tmpt_c_l).
39709      * Here tmpt_base_c is the temperature in centigrade when first run dpd calibration.
39710      */
39711     A_UINT32 dlt_tmpt_c_h;
39712     A_UINT32 dlt_tmpt_c_l;
39713 
39714     /* cooling_time_ms
39715      * The time (in milliseconds) expected to be needed for the unit
39716      * to cool from dlt_tmpt_c_h to dlt_tmpt_c_l.
39717      */
39718     A_UINT32 cooling_time_ms;
39719 
39720     /*  Max duration for dpd re-cal. Unit: ms */
39721     A_UINT32 dpd_dur_max_ms;
39722 } wmi_runtime_dpd_recal_cmd_fixed_param;
39723 
39724 typedef enum {
39725     WMI_ROAM_TRIGGER_REASON_NONE = 0,
39726     WMI_ROAM_TRIGGER_REASON_PER,
39727     WMI_ROAM_TRIGGER_REASON_BMISS,
39728     WMI_ROAM_TRIGGER_REASON_LOW_RSSI,
39729     WMI_ROAM_TRIGGER_REASON_HIGH_RSSI,
39730     WMI_ROAM_TRIGGER_REASON_PERIODIC,
39731     WMI_ROAM_TRIGGER_REASON_MAWC,
39732     WMI_ROAM_TRIGGER_REASON_DENSE,
39733     WMI_ROAM_TRIGGER_REASON_BACKGROUND,
39734     WMI_ROAM_TRIGGER_REASON_FORCED,
39735     WMI_ROAM_TRIGGER_REASON_BTM,
39736     WMI_ROAM_TRIGGER_REASON_UNIT_TEST,
39737     WMI_ROAM_TRIGGER_REASON_BSS_LOAD,
39738     WMI_ROAM_TRIGGER_REASON_DEAUTH,
39739     WMI_ROAM_TRIGGER_REASON_IDLE,
39740     /*
39741      * NOTE: don't add any more ROAM_TRIGGER_REASON values here.
39742      * There are checks in the FW that require the value of
39743      * WMI_ROAM_TRIGGER_REASON_MAX to be < 16.
39744      * Add new ROAM_TRIGGER_REASON values below, inside the
39745      * WMI_ROAM_TRIGGER_EXT_REASON_ID enum.
39746      */
39747     WMI_ROAM_TRIGGER_REASON_MAX,
39748 } WMI_ROAM_TRIGGER_REASON_ID;
39749 
39750 /*
39751  * The WMI_ROAM_TRIGGER_REASON_ID enum cannot be expanded with new values,
39752  * due to checks in the FW that require WMI_ROAM_TRIGGER_REASON_MAX to be
39753  * less than 16.
39754  * The WMI_ROAM_TRIGGER_EXT_REASON_ID enum is used to hold further roam
39755  * trigger reasons.
39756  */
39757 typedef enum {
39758     WMI_ROAM_TRIGGER_REASON_STA_KICKOUT = WMI_ROAM_TRIGGER_REASON_MAX,
39759     WMI_ROAM_TRIGGER_REASON_ESS_RSSI,
39760     WMI_ROAM_TRIGGER_REASON_WTC_BTM,
39761     WMI_ROAM_TRIGGER_REASON_PMK_TIMEOUT,
39762     WMI_ROAM_TRIGGER_REASON_BTC,
39763 
39764     WMI_ROAM_TRIGGER_EXT_REASON_MAX
39765 } WMI_ROAM_TRIGGER_EXT_REASON_ID;
39766 
39767 /* value for DENSE roam trigger */
39768 #define WMI_RX_TRAFFIC_ABOVE_THRESHOLD 0x1
39769 #define WMI_TX_TRAFFIC_ABOVE_THRESHOLD 0x2
39770 
39771 typedef struct {
39772     A_UINT32 trigger_id; /* id from WMI_ROAM_TRIGGER_REASON_ID */
39773     /* interpretation of trigger value is as follows, for different trigger IDs
39774      * ID = PER -> value = PER percentage
39775      * ID = LOW_RSSI -> value = RSSI in dB wrt noise floor,
39776      * ID = HIGH_RSSI -> value = RSSI in dB wrt to noise floor,
39777      * ID = DENSE -> value = specification if it is tx or rx traffic threshold,
39778      *      (see WMI_[RX,TX]_TRAFFIC_ABOVE_THRESHOLD)
39779      * ID = PERIODIC -> value = periodicity in ms
39780      *
39781      * for other IDs trigger_value would be 0 (invalid)
39782      */
39783     A_UINT32 trigger_value;
39784 } wmi_roam_scan_trigger_reason;
39785 
39786 typedef struct {
39787     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_roam_scan_stats_cmd_fixed_param */
39788     A_UINT32 vdev_id;
39789 } wmi_request_roam_scan_stats_cmd_fixed_param;
39790 
39791 /** BSS load configuration parameters for roam trigger */
39792 typedef struct {
39793     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_bss_load_cmd_fixed_param */
39794     A_UINT32 vdev_id;
39795     /** Minimum number of beacons to be consider for calculating average AP BSS load within time monitor_time_window */
39796     A_UINT32 beacons_min_count;
39797     /** Monitor time window in seconds */
39798     A_UINT32 monitor_time_window;
39799     /** BSS load threshold after which roam scan should trigger */
39800     A_UINT32 bss_load_threshold;
39801     /** rssi_2g_threshold
39802      * If connected AP is in 2.4 GHz, then consider bss load roam triggered
39803      * only if load % > bss_load_threshold && connected AP RSSI is worse
39804      * than rssi_2g_threshold.
39805      */
39806     A_INT32 rssi_2g_threshold; /* units = dBm */
39807     /** rssi_5g_threshold
39808      * If connected AP is in 5 GHz, then consider bss load roam triggered
39809      * only if load % > bss_load_threshold && connected AP RSSI is worse
39810      * than rssi_5g_threshold.
39811      */
39812     A_INT32 rssi_5g_threshold; /* units = dBm */
39813     /** rssi_6g_threshold
39814      * If connected AP is in 6 GHz, then consider bss load roam triggered
39815      * only if load % > bss_load_threshold && connected AP RSSI is worse
39816      * than rssi_6g_threshold. If rssi_6g_threshold is 0, it should be ignored.
39817      */
39818     A_INT32 rssi_6g_threshold; /* units = dBm */
39819 } wmi_roam_bss_load_config_cmd_fixed_param;
39820 
39821 /** Deauth roam trigger parameters */
39822 typedef struct {
39823     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_deauth_config_cmd_fixed_param */
39824     A_UINT32 vdev_id;
39825     /* 1-Enable, 0-Disable */
39826     A_UINT32 enable;
39827 } wmi_roam_deauth_config_cmd_fixed_param;
39828 
39829 /** IDLE roam trigger parameters */
39830 typedef struct {
39831     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_idle_config_cmd_fixed_param */
39832     A_UINT32 vdev_id;
39833     /* 1: Enable, 0: Disable */
39834     A_UINT32 enable;
39835     /* Connected AP band. 0: Any Band, 1: 2.4 GHz Band, 2: 5 GHz Band */
39836     A_UINT32 band;
39837     /* Trigger Idle roaming only if RSSI change of connected AP is within rssi_delta during idle time */
39838     A_UINT32 rssi_delta; /* units = dB */
39839     /* Trigger idle roam only if connected RSSI is better than min_rssi */
39840     A_INT32 min_rssi; /* units = dBm */
39841     /* Inactive/Idle time duration
39842      * After screen is OFF (or whatever condition is suitable in a given
39843      * system as an indication that the system is likely idle)
39844      * and if below conditions are met then idle roaming will be triggered.
39845      * 1. Connected AP band is matching with band value configured
39846      * 2. No TX/RX data for more than idle_time configured
39847      *    or TX/RX data packets count is less than data_packet_count
39848      *    during idle_time
39849      * 3. Connected AP RSSI change is not more than rssi_delta
39850      * 4. Connected AP RSSI is better than min_rssi.
39851      *    The purpose of this trigger for idle scan is to issue the scan
39852      *    even if (moreover, particularly if) the connection to the
39853      *    existing AP is still good, to keep the STA from getting locked
39854      *    onto the current good AP and thus missing out on an available
39855      *    even better AP.  This min_rssi threshold can be used to adjust
39856      *    the connection quality level at which the STA considers doing an
39857      *    idle scan.
39858      */
39859     A_UINT32 idle_time; /* units = seconds */
39860     /* Maximum allowed data packets count during idle time */
39861     A_UINT32 data_packet_count;
39862 } wmi_roam_idle_config_cmd_fixed_param;
39863 
39864 /** trigger to start/stop monitoring if system is idle command parameters */
39865 typedef struct {
39866     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_idle_trigger_monitor_cmd_fixed_param */
39867     /* idle_trigger_monitor values are from WMI_IDLE_TRIGGER_MONITOR_ID */
39868     A_UINT32 idle_trigger_monitor;
39869 } wmi_idle_trigger_monitor_cmd_fixed_param;
39870 
39871 typedef enum {
39872     WMI_IDLE_TRIGGER_MONITOR_NONE = 0, /* no-op */
39873     /* IDLE_TRIGGER_MONITOR_ON
39874      * The host's screen has turned off (or some other event indicating that
39875      * the system is likely idle) -
39876      * start monitoring to check if the system is idle.
39877      */
39878     WMI_IDLE_TRIGGER_MONITOR_ON,
39879     /* IDLE_TRIGGER_MONITOR_OFF
39880      * The host's screen has turned on (or some other event indicating that
39881      * the system is not idle)
39882      */
39883     WMI_IDLE_TRIGGER_MONITOR_OFF,
39884 } WMI_SCREEN_STATUS_NOTIFY_ID;
39885 
39886 typedef struct {
39887     /** TLV tag and len; tag equals wmi_pdev_dsm_filter_fixed_param */
39888     A_UINT32 tlv_header;
39889     /**
39890      * TLV (tag length value) parameter's following pdev_dsm_filter_cmd are,
39891      *
39892      *  wmi_pdev_bssid_disallow_list_config_param bssid_disallow_list[];
39893      *      i.e array containing all disallow AP filter lists including
39894      *      the new DSM lists (avoidlist / driver_blacklist) and existing
39895      *      lists (supplicant_blacklist / rssi_rejectlist etc.)
39896      */
39897 } wmi_pdev_dsm_filter_fixed_param;
39898 
39899 typedef struct {
39900     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_bssid_disallow_list_config_param */
39901     A_UINT32 tlv_header;
39902     /** bssid type i.e whether bssid falls in avoid list or driver_blacklist etc.
39903       see WMI_BSSID_DISALLOW_LIST_TYPE **/
39904     A_UINT32 bssid_type;
39905     /** mac address of disallow BSSID */
39906     wmi_mac_addr bssid;
39907     /** Disallow AP for certain duration, in units of milliseconds */
39908     A_UINT32 remaining_disallow_duration;
39909     /** AP will be allowed for candidate, when AP RSSI better than expected RSSI units in dBm */
39910     A_INT32 expected_rssi;
39911     /* Blacklist reason from WMI_BLACKLIST_REASON_ID */
39912     A_UINT32 reason;
39913     /* Source of adding AP to BL from WMI_BLACKLIST_SOURCE_ID */
39914     A_UINT32 source;
39915     /*
39916      * timestamp is the absolute time w.r.t host timer which is synchronized
39917      * between the host and target.
39918      * This timestamp indicates the time when AP added to blacklist.
39919      */
39920     A_UINT32 timestamp;
39921     /* Original timeout value in milli seconds when AP added to BL */
39922     A_UINT32 original_timeout;
39923     /*
39924      * If disallow_linkid_bitmap is not 0, then means current entity
39925      * is for MLD AP and bssid field is standing for MLD address.
39926      * If all links for MLD AP is disallow, then the value shall be 0xffffffff
39927      */
39928     A_UINT32 disallow_linkid_bitmap;
39929 } wmi_pdev_bssid_disallow_list_config_param;
39930 
39931 typedef enum {
39932     /* USER_SPACE_BLACK_LIST
39933      * Black Listed AP's by host's user space
39934      */
39935     WMI_BSSID_DISALLOW_USER_SPACE_BLACK_LIST = 1,
39936     /* DRIVER_BLACK_LIST
39937      * Black Listed AP's by host driver
39938      * used for data stall migitation
39939      */
39940     WMI_BSSID_DISALLOW_DRIVER_BLACK_LIST,
39941     /* USER_SPACE_AVOID_LIST
39942      * Avoid List AP's by host's user space
39943      * used for data stall migitation
39944      */
39945     WMI_BSSID_DISALLOW_USER_SPACE_AVOID_LIST,
39946     /* DRIVER_AVOID_LIST
39947      * Avoid List AP's by host driver
39948      * used for data stall migitation
39949      */
39950     WMI_BSSID_DISALLOW_DRIVER_AVOID_LIST,
39951     /* RSSI_REJECT_LIST
39952      * OCE AP's
39953      */
39954     WMI_BSSID_DISALLOW_RSSI_REJECT_LIST,
39955 } WMI_BSSID_DISALLOW_LIST_TYPE;
39956 
39957 /* WLAN_PDEV_MAX_NUM_BSSID_DISALLOW_LIST:
39958  * Maximum number of BSSID disallow entries which host is allowed to send
39959  * to firmware within the WMI_PDEV_DSM_FILTER_CMDID message.
39960  */
39961 #define WLAN_PDEV_MAX_NUM_BSSID_DISALLOW_LIST  28
39962 
39963 /** Roam Pre-Authentication completion status */
39964 typedef struct {
39965     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_preauth_status_cmd_fixed_param */
39966     A_UINT32 vdev_id;
39967     /* preauth_status, 0 - Success, Non Zero - Failure
39968      * Refer to IEEE Std 802.11-2016 Table 9-46 for meaning of status values.
39969      */
39970     A_UINT32 preauth_status;
39971     /* AP BSSID for which pre-authentication is completed */
39972     wmi_mac_addr candidate_ap_bssid;
39973     /**
39974      * This fixed_param TLV is followed by the below TLVs:
39975      *
39976      * PMKID computed after successful pre-authentication. This is valid only if preauth_status is success
39977      * A_UINT8 pmkid[];
39978      *
39979      * PMK computed after successful pre-authentication. This is valid only if preauth_status is success
39980      * A_UINT8 pmk[];
39981      */
39982 } wmi_roam_preauth_status_cmd_fixed_param;
39983 
39984 /** Roam Pre-Authentication start event */
39985 typedef struct {
39986     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_preauth_start_event_fixed_param */
39987     A_UINT32 vdev_id;
39988     /* AP BSSID for which host needs to start pre-authentication */
39989     wmi_mac_addr candidate_ap_bssid;
39990     /*
39991      * Transmit address for which host needs to start pre-authentication
39992      * in MLO case.  In non MLO cases, transmit_addr will be filled with 0x0.
39993      */
39994     wmi_mac_addr transmit_addr;
39995     /* AKM suite type (as defined in the IEEE 802.11 spec) */
39996     A_UINT32 akm_suite_type;
39997 } wmi_roam_preauth_start_event_fixed_param;
39998 
39999 typedef struct {
40000     /*
40001      * The timestamp is in units of ticks of a 19.2MHz clock.
40002      * The timestamp is taken at roam scan start.
40003      */
40004     A_UINT32 lower32bit;
40005     A_UINT32 upper32bit;
40006 } wmi_roaming_timestamp;
40007 
40008 typedef struct {
40009     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_stats_event_fixed_param */
40010     A_UINT32 vdev_id;
40011     /* number of roam scans */
40012     A_UINT32 num_roam_scans;
40013     /* This TLV is followed by TLV's:
40014      *   A_UINT32 client_id[num_roam_scans]; based on WMI_SCAN_CLIENT_ID
40015      *   wmi_roaming_timestamp timestamp[num_roam_scans]; clock ticks at the time of scan start
40016      *   A_UINT32 num_channels[num_roam_scans]; number of channels that are scanned
40017      *   A_UINT32 chan_info[]; channel frequencies (MHz) in each scan
40018      *       The num_channels[] elements specify how many elements there are
40019      *       within chan_info[] for each scan.
40020      *       For example, if num_channels = [2, 3] then chan_info will have 5
40021      *       elements, with the first 2 elements from the first scan, and
40022      *       the last 3 elements from the second scan.
40023      *   wmi_mac_addr old_bssid[num_roam_scans]; bssid we are connected to at the time of roaming
40024      *   A_UINT32 is_roaming_success[num_roam_scans]; value is 1 if roaming is successful, 0 if roaming failed
40025      *   wmi_mac_addr new_bssid[num_roam_scans]; bssid after roaming
40026      *   A_UINT32 num_of_roam_candidates[num_roam_scans]; number of candidates found in each roam scan
40027      *   roam_scan_trigger_reason roam_reason[num_roam_scans]; reason for each roam scan
40028      *   wmi_mac_addr bssid[]; bssids of candidates in each roam scan
40029      *       The num_of_roam_candidates[] elements specify how many elements
40030      *       there are within bssid[] for each scan.
40031      *       For example, if num_of_roam_candidates = [2, 3] then bssid will
40032      *       have 5 elements, with the first 2 elements from the first scan,
40033      *       and the last 3 elements from the second scan.
40034      *   A_UINT32 score[]; score of candidates in each roam scan
40035      *       The num_of_roam_candidates[] elements specify how many elements
40036      *       there are within score[] for each scan.
40037      *       For example, if num_of_roam_candidates = [2, 3] then score will
40038      *       have 5 elements, with the first 2 elements from the first scan,
40039      *       and the last 3 elements from the second scan.
40040      *   A_UINT32 channel[]; channel frequency (MHz) of candidates in each roam scan
40041      *       The num_of_roam_candidates[] elements specify how many elements
40042      *       there are within channel[] for each scan.
40043      *       For example, if num_of_roam_candidates = [2, 3] then channel will
40044      *       have 5 elements, with the first 2 elements from the first scan,
40045      *       and the last 3 elements from the second scan.
40046      *   A_UINT32 rssi[]; RSSI in dB w.r.t. noise floor of candidates
40047      *       in each roam scan.
40048      *       The num_of_roam_candidates[] elements specify how many elements
40049      *       there are within rssi[] for each scan.
40050      *       For example, if num_of_roam_candidates = [2, 3] then rssi will
40051      *       have 5 elements, with the first 2 elements from the first scan,
40052      *       and the last 3 elements from the second scan.
40053      */
40054 } wmi_roam_scan_stats_event_fixed_param;
40055 
40056 typedef enum {
40057     WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER = 1, /* Roam scan triggered due to periodic timer expiry */
40058     WMI_ROAM_TRIGGER_SUB_REASON_INACTIVITY_TIMER,   /* Roam scan triggered due to inactivity detection */
40059     /* INACTIVITY_TIMER_LOW_RSSI - alias for INACTIVITY_TIMER */
40060     WMI_ROAM_TRIGGER_SUB_REASON_INACTIVITY_TIMER_LOW_RSSI =
40061         WMI_ROAM_TRIGGER_SUB_REASON_INACTIVITY_TIMER,
40062     WMI_ROAM_TRIGGER_SUB_REASON_BTM_DI_TIMER,       /* Roam scan triggered due to BTM Disassoc Imminent timeout */
40063     WMI_ROAM_TRIGGER_SUB_REASON_FULL_SCAN,          /* Roam scan triggered due to partial scan failure */
40064     WMI_ROAM_TRIGGER_SUB_REASON_LOW_RSSI_PERIODIC,  /* Roam scan triggered due to Low RSSI periodic timer */
40065     WMI_ROAM_TRIGGER_SUB_REASON_CU_PERIODIC,        /* Roam scan triggered due to CU periodic timer */
40066     /* PERIODIC_TIMER_AFTER_INACTIVITY:
40067      * Roam scan triggered due to periodic timer after device in
40068      * inactivity state.
40069      * This timer is enabled/used for roaming in a vendor-specific manner.
40070      */
40071     WMI_ROAM_TRIGGER_SUB_REASCON_PERIODIC_TIMER_AFTER_INACTIVITY,
40072     WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER_AFTER_INACTIVITY =
40073         WMI_ROAM_TRIGGER_SUB_REASCON_PERIODIC_TIMER_AFTER_INACTIVITY,
40074     /*
40075      * PERIODIC_TIMER_AFTER_INACTIVITY_LOW_RSSI - alias for
40076      * PERIODIC_TIMER_AFTER_INACTIVITY
40077      */
40078     WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER_AFTER_INACTIVITY_LOW_RSSI =
40079         WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER_AFTER_INACTIVITY,
40080     WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER_AFTER_INACTIVITY_CU,
40081     WMI_ROAM_TRIGGER_SUB_REASON_INACTIVITY_TIMER_CU,
40082 } WMI_ROAM_TRIGGER_SUB_REASON_ID;
40083 
40084 typedef enum wmi_roam_invoke_status_error {
40085     WMI_ROAM_INVOKE_STATUS_SUCCESS = 0,
40086     WMI_ROAM_INVOKE_STATUS_VDEV_INVALID = 0x11,    /* Invalid VDEV */
40087     WMI_ROAM_INVOKE_STATUS_BSS_INVALID,            /* Invalid VDEV BSS */
40088     WMI_ROAM_INVOKE_STATUS_VDEV_DOWN,              /* VDEV is not UP */
40089     WMI_ROAM_INVOKE_STATUS_ROAM_HANDLE_INVALID,    /* VDEV ROAM handle is invalid */
40090     WMI_ROAM_INVOKE_STATUS_OFFLOAD_DISABLE,        /* Roam offload is not enabled */
40091     WMI_ROAM_INVOKE_STATUS_AP_SSID_LENGTH_INVALID, /* Connected AP profile SSID length is zero */
40092     WMI_ROAM_INVOKE_STATUS_HO_DISALLOW,            /* Already FW internal roaming is in progress */
40093     WMI_ROAM_INVOKE_STATUS_ALREADY_RUNNING,        /* Roam Invoke already in progress either from internal FW BTM request or from host*/
40094     WMI_ROAM_INVOKE_STATUS_NON_ROAMABLE_AP,        /* Roam HO is not triggered due to non roamable AP */
40095     WMI_ROAM_INVOKE_STATUS_HO_INTERNAL_FAIL,       /* Candidate AP save failed */
40096     WMI_ROAM_INVOKE_STATUS_DISALLOW,               /* Roam invoke trigger is not enabled */
40097     WMI_ROAM_INVOKE_STATUS_SCAN_FAIL,              /* Scan start fail */
40098     WMI_ROAM_INVOKE_STATUS_START_HO_FAIL,          /* Roam HO start fail */
40099     WMI_ROAM_INVOKE_STATUS_INVALID_PARAMS,         /* Roam invoke params are invalid */
40100     WMI_ROAM_INVOKE_STATUS_INVALID_SCAN_MODE,      /* Roam scan mode is invalid */
40101     WMI_ROAM_INVOKE_STATUS_NO_CAND_AP,             /* No candidate AP found to roam to */
40102     WMI_ROAM_INVOKE_STATUS_HO_FAIL,                /* handoff failed */
40103 } wmi_roam_invoke_status_error_t;
40104 
40105 typedef struct {
40106     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_reason_tlv_param */
40107     /*
40108      * timestamp is the absolute time w.r.t host timer which is synchronized
40109      * between the host and target.
40110      * This timestamp indicates the time when roam trigger happened.
40111      */
40112     A_UINT32 timestamp;      /* Timestamp in milli seconds */
40113     /* trigger_reason:
40114      * Roam trigger reason from WMI_ROAM_TRIGGER_REASON_ID
40115      */
40116     A_UINT32 trigger_reason;
40117     /* trigger_sub_reason:
40118      * Reason for each roam scan from WMI_ROAM_TRIGGER_SUB_REASON_ID,
40119      * if multiple scans are triggered for a single roam trigger.
40120      */
40121     A_UINT32 trigger_sub_reason;
40122     A_UINT32 current_rssi;   /* Connected AP RSSI in dBm */
40123     /* roam_rssi_threshold:
40124      * RSSI threshold value in dBm for low RSSI roam trigger.
40125      */
40126     A_UINT32 roam_rssi_threshold;
40127     A_UINT32 cu_load;        /* Connected AP CU load percentage (0-100) */
40128     /* deauth_type:
40129      * 1 -> De-authentication
40130      * 2 -> Disassociation
40131      */
40132     A_UINT32 deauth_type;
40133     /* deauth_reason:
40134      * De-authentication or disassociation reason.
40135      * De-authentication / disassociation Values are enumerated in the
40136      * 802.11 spec.
40137      */
40138     A_UINT32 deauth_reason;
40139     /* btm_request_mode:
40140      * Mode Values are enumerated in the 802.11 spec.
40141      */
40142     A_UINT32 btm_request_mode;
40143     A_UINT32 disassoc_imminent_timer;  /* in Milli seconds */
40144     /* validity_internal:
40145      * Preferred candidate list validity interval in Milli seconds.
40146      */
40147     A_UINT32 validity_internal;
40148     /* candidate_list_count:
40149      * Number of preferred candidates from BTM request.
40150      */
40151     A_UINT32 candidate_list_count;
40152     /* btm_response_status_code:
40153      * Response status Values are enumerated in the 802.11 spec.
40154      */
40155     A_UINT32 btm_response_status_code;
40156 
40157     union {
40158         /*
40159          * If a definition of these vendor-specific files has been provided,
40160          * use the vendor-specific names for these fields as an alias for
40161          */
40162         #ifdef WMI_ROAM_TRIGGER_REASON_VENDOR_SPECIFIC1
40163         WMI_ROAM_TRIGGER_REASON_VENDOR_SPECIFIC1;
40164         #endif
40165         struct {
40166             /* opaque space reservation for vendor-specific fields */
40167             A_UINT32 vendor_specific1[7];
40168         };
40169     };
40170     /* BTM BSS termination timeout value in milli seconds */
40171     A_UINT32 btm_bss_termination_timeout;
40172     /* BTM MBO assoc retry timeout value in milli seconds */
40173     A_UINT32 btm_mbo_assoc_retry_timeout;
40174     union {
40175         /*
40176          * If a definition of these vendor-specific files has been provided,
40177          * use the vendor-specific names for these fields as an alias for
40178          */
40179         #ifdef WMI_ROAM_TRIGGER_REASON_VENDOR_SPECIFIC2
40180         WMI_ROAM_TRIGGER_REASON_VENDOR_SPECIFIC2;
40181         #endif
40182         struct {
40183             /* opaque space reservation for vendor-specific fields */
40184             A_UINT32 vendor_specific2[4];
40185         };
40186     };
40187     /* btm_req_dialog_token: dialog token number in BTM request frame */
40188     A_UINT32 btm_req_dialog_token;
40189     /* data RSSI in dBm when abort to roam scan */
40190     A_INT32 data_rssi;
40191     /* data RSSI threshold in dBm */
40192     A_INT32 data_rssi_threshold;
40193     /* rx linkspeed status, 0:good linkspeed, 1:bad */
40194     A_UINT32 rx_linkspeed_status;
40195 } wmi_roam_trigger_reason;
40196 
40197 #define WMI_GET_BTCONNECT_STATUS(flags)      WMI_GET_BITS(flags, 0, 1)
40198 #define WMI_SET_BTCONNECT_STATUS(flags, val) WMI_SET_BITS(flags, 0, 1, val)
40199 
40200 #define WMI_GET_MLO_BAND(flags)      WMI_GET_BITS(flags, 1, 3)
40201 #define WMI_SET_MLO_BAND(flags, val) WMI_SET_BITS(flags, 1, 3, val)
40202 
40203 typedef enum wmi_mlo_band_info {
40204     WMI_MLO_BAND_NO_MLO = 0,
40205     WMI_MLO_BAND_2GHZ_MLO,
40206     WMI_MLO_BAND_5GHZ_MLO,
40207     WMI_MLO_BAND_6GHZ_MLO,
40208 } wmi_mlo_band_info_t;
40209 
40210 typedef struct {
40211     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_info_tlv_param */
40212     /* roam_scan_type:
40213      * 0 -> Partial roam scan
40214      * 1 -> Full roam scan
40215      */
40216     A_UINT32 roam_scan_type;
40217     /* next_rssi_trigger_threshold:
40218      * Updated RSSI threshold value in dBm for next roam trigger.
40219      */
40220     A_UINT32 next_rssi_trigger_threshold;
40221     A_UINT32 roam_scan_channel_count; /* Number of channels scanned during roam scan */
40222     A_UINT32 roam_ap_count; /* Number of roamable APs */
40223     A_UINT32 frame_info_count; /* Number of frame info */
40224     /*
40225      * scan_complete_timestamp is the absolute time w.r.t host timer
40226      * which is synchronized between the host and target.
40227      * This timestamp indicates the time when roam scan finished.
40228      */
40229     A_UINT32 scan_complete_timestamp;   /* milli second units */
40230     /*
40231      * Flags capturing factors involved during roam scan:
40232      * Bit 0    : Bluetooth connect status, 0(not connected) or 1(connected).
40233      * Bit 1-3  : Indicates which link triggered roaming in MLD cases.
40234      *            The value is one of the wmi_mlo_band_info_t enum constants.
40235      *            Refer to WMI_[GET,SET]_MLO_BAND macros.
40236      * Bit 4-31 : reserved for future use.
40237      */
40238     A_UINT32 flags;
40239 } wmi_roam_scan_info;
40240 
40241 typedef struct {
40242     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_channel_info_tlv_param */
40243     A_UINT32 channel;    /* Channel frequency in MHz */
40244     A_UINT32 ch_dwell_type; /* indicates channel dwell type:
40245                              * 0 -> unspecified
40246                              * 1 -> active
40247                              * 2 -> passive
40248                              */
40249 } wmi_roam_scan_channel_info;
40250 
40251 #define WMI_GET_AP_INFO_MLO_STATUS(flags)      WMI_GET_BITS(flags, 0, 1)
40252 #define WMI_SET_AP_INFO_MLO_STATUS(flags, val) WMI_SET_BITS(flags, 0, 1, val)
40253 
40254 typedef struct {
40255     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ap_info_tlv_param */
40256     /*
40257      * timestamp is the absolute time w.r.t host timer which is synchronized
40258      * between the host and target.
40259      * This timestamp indicates the time when candidate AP is found
40260      * during roam scan.
40261      */
40262     A_UINT32 timestamp;      /* Timestamp in milli seconds */
40263     A_UINT32 candidate_type; /* 0 - Candidate AP, 1 - Connected AP */
40264     wmi_mac_addr bssid;      /* AP MAC address */
40265     A_UINT32 channel;        /* AP channel frequency in MHz */
40266     A_UINT32 rssi;           /* AP current RSSI in dBm */
40267     A_UINT32 cu_load;        /* AP current cu load percentage (0-100) */
40268     /*
40269      * The score fields below don't have a pre-determined range,
40270      * but use the sense that a higher score indicates a better
40271      * roam candidate.
40272      */
40273     A_UINT32 rssi_score;     /* AP current RSSI score */
40274     A_UINT32 cu_score;       /* AP current cu score */
40275     A_UINT32 total_score;    /* AP total score */
40276     A_UINT32 etp;            /* AP Estimated Throughput (ETP) value in mbps */
40277     /* Blacklist reason from WMI_BLACKLIST_REASON_ID */
40278     A_UINT32 bl_reason;
40279     /* Source of adding AP to BL from WMI_BLACKLIST_SOURCE_ID */
40280     A_UINT32 bl_source;
40281     /*
40282      * timestamp is the absolute time w.r.t host timer which is synchronized
40283      * between the host and target.
40284      * This timestamp indicates the time when AP added to blacklist.
40285      */
40286     A_UINT32 bl_timestamp;
40287     /* Original timeout value in milli seconds when AP added to BL */
40288     A_UINT32 bl_original_timeout;
40289     /* flags:
40290      * bit 0:    MLD AP FLAG -> 1: MLD AP, 0: non-MLD AP
40291      *           Refer to WMI_[GET,SET]_AP_INFO_MLO_STATUS macros.
40292      * bit 1-31: reserved.
40293      */
40294     A_UINT32 flags;
40295     wmi_mac_addr mld_addr;
40296 } wmi_roam_ap_info;
40297 
40298 typedef enum {
40299     /* Failures reasons for not triggering roaming */
40300     WMI_ROAM_FAIL_REASON_NO_SCAN_START = 1, /* Roam scan not started */
40301     WMI_ROAM_FAIL_REASON_SCAN_NOT_ALLOWED = WMI_ROAM_FAIL_REASON_NO_SCAN_START, /* Roam scan is not allowed to start */
40302     WMI_ROAM_FAIL_REASON_NO_AP_FOUND,       /* No roamable APs found during roam scan */
40303     WMI_ROAM_FAIL_REASON_NO_CAND_AP_FOUND,  /* No candidate APs found during roam scan */
40304 
40305     /* Failure reasons after roaming is triggered */
40306     WMI_ROAM_FAIL_REASON_HOST,              /* Roam fail due to VDEV STOP issued from Host */
40307     WMI_ROAM_FAIL_REASON_AUTH_SEND,         /* Unable to send auth request frame */
40308     WMI_ROAM_FAIL_REASON_AUTH_RECV,         /* Received auth response with error status code */
40309     WMI_ROAM_FAIL_REASON_NO_AUTH_RESP,      /* Not receiving auth response frame */
40310     WMI_ROAM_FAIL_REASON_REASSOC_SEND,      /* Unable to send reassoc request frame */
40311     WMI_ROAM_FAIL_REASON_REASSOC_RECV,      /* Received reassoc response with error status code */
40312     WMI_ROAM_FAIL_REASON_NO_REASSOC_RESP,   /* Not receiving reassoc response frame */
40313     WMI_ROAM_FAIL_REASON_EAPOL_TIMEOUT,     /* EAPOL TIMEOUT */
40314     WMI_ROAM_FAIL_REASON_EAPOL_M1_TIMEOUT = WMI_ROAM_FAIL_REASON_EAPOL_TIMEOUT, /* EAPOL M1 is not received */
40315     WMI_ROAM_FAIL_REASON_MLME,              /* MLME internal error */
40316     WMI_ROAM_FAIL_REASON_INTERNAL_ABORT,    /* Internal abort */
40317     WMI_ROAM_FAIL_REASON_SCAN_START,        /* Unable to start roam scan */
40318     WMI_ROAM_FAIL_REASON_AUTH_NO_ACK,       /* No ACK is received for Auth request */
40319     WMI_ROAM_FAIL_REASON_AUTH_INTERNAL_DROP, /* Auth request is dropped internally */
40320     WMI_ROAM_FAIL_REASON_REASSOC_NO_ACK,    /* No ACK is received for Reassoc request */
40321     WMI_ROAM_FAIL_REASON_REASSOC_INTERNAL_DROP, /* Reassoc request is dropped internally */
40322     WMI_ROAM_FAIL_REASON_EAPOL_M2_SEND,     /* Unable to send EAPOL M2 frame */
40323     WMI_ROAM_FAIL_REASON_EAPOL_M2_INTERNAL_DROP,   /* EAPOL M2 frame dropped internally */
40324     WMI_ROAM_FAIL_REASON_EAPOL_M2_NO_ACK,   /* No Ack is received for EAPOL M2 frame */
40325     WMI_ROAM_FAIL_REASON_EAPOL_M3_TIMEOUT,  /* M3 is not received */
40326     WMI_ROAM_FAIL_REASON_EAPOL_M4_SEND,     /* Unable to send EAPOL M4 frame */
40327     WMI_ROAM_FAIL_REASON_EAPOL_M4_INTERNAL_DROP,   /* EAPOL M4 frame dropped internally */
40328     WMI_ROAM_FAIL_REASON_EAPOL_M4_NO_ACK,   /* No Ack is received for EAPOL M4 frame */
40329     WMI_ROAM_FAIL_REASON_NO_SCAN_FOR_FINAL_BMISS, /* Roam scan is not started for Final Bmiss case */
40330     WMI_ROAM_FAIL_REASON_DISCONNECT,        /* Deauth or Disassoc received from AP during roaming handoff */
40331     WMI_ROAM_FAIL_REASON_SYNC,              /* when host wakes-up during roaming in-progress, abort current roaming if previous sync is pending */
40332     WMI_ROAM_FAIL_REASON_SAE_INVALID_PMKID, /* WPA3-SAE invalid PMKID */
40333     WMI_ROAM_FAIL_REASON_SAE_PREAUTH_TIMEOUT, /* WPA3-SAE pre-authentication timeout */
40334     WMI_ROAM_FAIL_REASON_SAE_PREAUTH_FAIL, /* WPA3-SAE pre-authentication failed */
40335     WMI_ROAM_FAIL_REASON_UNABLE_TO_START_ROAM_HO, /* Roam HO is not started due to FW internal issue */
40336 
40337     /* Failure reasons to indicate no candidate and final bmiss event sent */
40338     WMI_ROAM_FAIL_REASON_NO_AP_FOUND_AND_FINAL_BMISS_SENT, /* No roamable APs found during roam scan and final bmiss event sent */
40339     WMI_ROAM_FAIL_REASON_NO_CAND_AP_FOUND_AND_FINAL_BMISS_SENT, /* No candidate APs found during roam scan and final bmiss event sent */
40340     WMI_ROAM_FAIL_REASON_CURR_AP_STILL_OK, /* Roam scan not happen due to current network condition is fine */
40341     WMI_ROAM_FAIL_REASON_SCAN_CANCEL,      /* Roam scan canceled */
40342 
40343     WMI_ROAM_FAIL_REASON_UNKNOWN = 255,
40344 } WMI_ROAM_FAIL_REASON_ID;
40345 
40346 typedef enum {
40347     WMI_ROAM_ABORT_UNSPECIFIED = 0,            /* Target did not specify detailed reason for roam scan being aborted */
40348     WMI_ROAM_ABORT_LOWRSSI_DATA_RSSI_HIGH = 1, /* Roam scan is not started due to high data RSSI during low-RSSI roaming */
40349     WMI_ROAM_ABORT_LOWRSSI_LINK_SPEED_GOOD,    /* Roam scan is not started due to good link speed during low-RSSI roaming */
40350     WMI_ROAM_ABORT_BG_DATA_RSSI_HIGH,          /* Roam scan is not started due to high data RSSI during background roaming */
40351     WMI_ROAM_ABORT_BG_RSSI_ABOVE_THRESHOLD,    /* Roam scan is not started due to high beacon RSSI during background roaming */
40352     WMI_ROAM_SCAN_CANCEL_IDLE_SCREEN_ON,       /* Idle roam scan is canceled due to screen on */
40353     WMI_ROAM_SCAN_CANCEL_OTHER_PRIORITY_ROAM_SCAN, /* Roam scan is canceled due to other high priority roam scan */
40354 } WMI_ROAM_FAIL_SUB_REASON_ID;
40355 
40356 typedef struct {
40357     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_result_tlv_param */
40358     /*
40359      * timestamp is the absolute time w.r.t host timer which is synchronized
40360      * between the host and target.
40361      * This timestamp indicates the time when roaming is completed.
40362      */
40363     A_UINT32 timestamp;     /* Timestamp in milli seconds */
40364     A_UINT32 roam_status;   /* 0 - Roaming is success, 1 - Roaming is failed */
40365     A_UINT32 roam_fail_reason; /* from WMI_ROAM_FAIL_REASON_ID */
40366     wmi_mac_addr bssid; /* bssid corresponds to roam_fail_reason */
40367     A_UINT32 roam_abort_reason; /* Detail reason for roam scan not start, from WMI_ROAM_FAIL_SUB_REASON_ID */
40368 } wmi_roam_result;
40369 
40370 #define WMI_ROAM_NEIGHBOR_REPORT_INFO_REQUEST_TOKEN_GET(detail)         WMI_GET_BITS(detail, 0, 8)
40371 #define WMI_ROAM_NEIGHBOR_REPORT_INFO_REQUEST_TOKEN_SET(detail,val)     WMI_SET_BITS(detail, 0, 8, val)
40372 #define WMI_ROAM_NEIGHBOR_REPORT_INFO_RESPONSE_TOKEN_GET(detail)        WMI_GET_BITS(detail, 8, 8)
40373 #define WMI_ROAM_NEIGHBOR_REPORT_INFO_RESPONSE_TOKEN_SET(detail,val)    WMI_SET_BITS(detail, 8, 8, val)
40374 #define WMI_ROAM_NEIGHBOR_REPORT_INFO_NUM_OF_NRIE_GET(detail)           WMI_GET_BITS(detail, 16, 8)
40375 #define WMI_ROAM_NEIGHBOR_REPORT_INFO_NUM_OF_NRIE_SET(detail,val)       WMI_SET_BITS(detail, 16, 8, val)
40376 #define WMI_ROAM_NEIGHBOR_REPORT_INFO_MLO_BAND_INFO_GET(detail)         WMI_GET_BITS(detail, 24, 3)
40377 #define WMI_ROAM_NEIGHBOR_REPORT_INFO_MLO_BAND_INFO_SET(detail,val)     WMI_SET_BITS(detail, 24, 3, val)
40378 
40379 typedef struct {
40380     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_neighbor_report_info_tlv_param */
40381     /* request_type:
40382      * 1 -> BTM query
40383      * 2 -> 11K neighbor report request
40384      */
40385     A_UINT32 request_type;
40386     /* neighbor_report_request_timestamp:
40387      * timestamp is the absolute time w.r.t host timer which is synchronized
40388      * between the host and target.
40389      * This timestamp indicates the time when neighbor report request
40390      * is received.
40391      */
40392     A_UINT32 neighbor_report_request_timestamp;  /* in milli seconds */
40393     /* neighbor_report_response_timestamp:
40394      * This timestamp indicates the time when neighbor report response is sent.
40395      */
40396     A_UINT32 neighbor_report_response_timestamp; /* in milli seconds */
40397     A_UINT32 neighbor_report_channel_count; /* Number of channels received in neighbor report response */
40398     A_UINT32 btm_query_token; /* btm query dialog token */
40399     /* btm_query_reason_code:
40400      * Transition Query Reasons are enumerated in table 7-43x
40401      * of the 802.11v spec.
40402      */
40403     A_UINT32 btm_query_reason_code;
40404     /* neighbor_report_detail:
40405      * [7:0]     : neighbor report request token
40406      * [15:8]    : neighbor report response token
40407      * [23:16]   : the number of neighbor report elements in response frame
40408      * [26:24]   : band on which frame is sent; the value will be one of the
40409      *             wmi_mlo_band_info enum constants
40410      *             Refer to WMI_ROAM_NEIGHBOR_REPORT_INFO_MLO_BAND_INFO_GET,SET
40411      *             macros.
40412      * [31:27]   : reserved
40413      * Refer to the above WMI_ROAM_NEIGHBOR_REPORT_INFO_*_GET,_SET macros for
40414      * reading and writing these bitfields.
40415      */
40416     A_UINT32 neighbor_report_detail;
40417 } wmi_roam_neighbor_report_info;
40418 
40419 #define WMI_ROAM_BTM_RESP_MLO_BAND_INFO_GET(detail)         WMI_GET_BITS(detail, 0, 3)
40420 #define WMI_ROAM_BTM_RESP_MLO_BAND_INFO_SET(detail,val)     WMI_SET_BITS(detail, 0, 3, val)
40421 
40422 typedef struct {
40423     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_btm_response_info_tlv_param */
40424 
40425     /*enum STATUS_CODE_WNM_BTM defined in ieee80211_defs.h*/
40426     A_UINT32 btm_status;
40427 
40428     /* AP MAC address */
40429     wmi_mac_addr target_bssid;
40430 
40431     /* vsie_reason value:
40432      *  0x00    Will move to Cellular
40433      *  0x01    Unspecified
40434      *  0x02    Not supported
40435      *  0x03    No Cellular Network
40436      *  0x04    Controlled by framework
40437      *  0x05    Roam to better AP
40438      *  0x06    Suspend mode
40439      *  0x07    RSSI is strong enough
40440      *  0x08-0xFF    TBD
40441      */
40442     A_UINT32 vsie_reason;
40443     /*
40444      * timestamp is the absolute time w.r.t host timer which is synchronized
40445      * between the host and target.
40446      * This timestamp indicates the time when btm response is sent.
40447      */
40448     A_UINT32 timestamp; /* milli second units */
40449     A_UINT32 btm_resp_dialog_token; /* dialog_token in btm response frame */
40450     /* btm_resp_bss_termination_delay:
40451      * bss_termination_delay in btm response frame is the number of minutes
40452      * that the responding STA requests the BSS to delay termination.
40453      */
40454     A_UINT32 btm_resp_bss_termination_delay;
40455     /* info:
40456      * Bit[0:2]   - band on which frame is sent, band value will be one of the
40457      *              wmi_mlo_band_info_t enum constants
40458      *              Refer to WMI_ROAM_BTM_RESP_MLO_BAND_INFO_GET,SET macros.
40459      * Bit[3:31]  - reserved.
40460      */
40461     A_UINT32 info;
40462 } wmi_roam_btm_response_info;
40463 
40464 typedef struct {
40465     A_UINT32 tlv_header;                /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_btm_request_candidate_info_tlv_param */
40466     wmi_mac_addr btm_candidate_bssid;   /* BTM candidate MAC address */
40467     A_UINT32 preference;                /* preference in Preference IE */
40468 } wmi_roam_btm_request_candidate_info;
40469 
40470 typedef struct {
40471     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_neighbor_report_channel_info_tlv_param */
40472     A_UINT32 channel;    /* Channel frequency in MHz */
40473 } wmi_roam_neighbor_report_channel_info;
40474 
40475 #define WMI_GET_ASSOC_ID(frame_info_ext)      WMI_GET_BITS(frame_info_ext, 0, 16)
40476 #define WMI_SET_ASSOC_ID(frame_info_ext, val) WMI_SET_BITS(frame_info_ext, 0, 16, val)
40477 
40478 #define WMI_GET_MLO_BITMAP_BAND_INFO(frame_info_ext)      WMI_GET_BITS(frame_info_ext, 16, 5)
40479 #define WMI_SET_MLO_BITMAP_BAND_INFO(frame_info_ext, val) WMI_SET_BITS(frame_info_ext, 16, 5, val)
40480 
40481 #define WMI_GET_RX_INDICATE(frame_info_ext)      WMI_GET_BITS(frame_info_ext, 21, 1)
40482 #define WMI_SET_RX_INDICATE(frame_info_ext, val) WMI_SET_BITS(frame_info_ext, 21, 1, val)
40483 
40484 #define WMI_GET_TX_FAILED_REASON(frame_info_ext)         WMI_GET_BITS(frame_info_ext, 22, 4)
40485 #define WMI_SET_TX_FAILED_REASON(frame_info_ext, val)    WMI_SET_BITS(frame_info_ext, 22, 4, val)
40486 
40487 #define WMI_GET_MAP_ID(frame_info_ext)          WMI_GET_BITS(frame_info_ext, 26, 6)
40488 #define WMI_SET_MAP_ID(frame_info_ext, val)     WMI_SET_BITS(frame_info_ext, 26, 6, val)
40489 
40490 typedef struct {
40491     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_frame_info_tlv_param */
40492     /* timestamp is the absolute time w.r.t host timer which is synchronized between the host and target */
40493     A_UINT32 timestamp;      /* Timestamp when frame is sent or received */
40494     /*
40495      * frame_info = frame_type | (frame_subtype << 2) | (request_or_response << 6) | (auth_algo_num << 7) | (seq_num << 16)
40496      * frame_type(2 bits), frame_subtype(4 bits) are from 802.11 spec.
40497      *     If frame_type is WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT, frame_subtype
40498      *     should be one of value in WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE.
40499      * request_or_response(1 bit) - Valid if frame_subtype is authentication.
40500      *      0 - Authentication request 1 - Authentication response
40501      * auth_algo_num(5bits) : Lower 5 bits of 9.4.1.1 Authentication Algorithm
40502      *     Number field
40503      *     The auth_algo_num bits shall be ignored unless
40504      *     WMI_SERVICE_ROAM_STAT_PER_CANDIDATE_FRAME_INFO_SUPPORT is set and
40505      *     frame_subtype is auth frame.
40506      * seq_num(16 bits) - frame sequence number
40507      */
40508     A_UINT32 frame_info;
40509 
40510     /* status_code:
40511      * For Rx frames : Status code from 802.11 spec, section 9.4.1.9
40512      * For Rx frames (deauth / disassoc) : Reason code from 802.11 spec,
40513      *     section 9.4.1.7
40514      * For Tx frames : Status_code should be one of value in
40515      *     WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_STATUS
40516      */
40517     A_UINT32 status_code;
40518     /*
40519      * rssi_dbm_abs
40520      * Last known RSSI of the current BSSID at the moment when the frame
40521      * was sent and received.
40522      * This RSSI value is valid for deauth / disassoc frame only.
40523      * The rssi_dbm_abs value is the absolute value of the RSSI in dBm units.
40524      * For example, if the RSSI is -40 dBm, rssi_dbm_abs will be 40.
40525      */
40526     A_UINT32 rssi_dbm_abs;
40527     /* retry_count
40528      * To show how many times the same frame (but with different
40529      * sequence number) is retransmitted, in protocol level.
40530      */
40531     A_UINT32 retry_count;
40532     wmi_mac_addr bssid;      /* AP MAC address */
40533     /*
40534      * frame_info_ext captures below fields:
40535      * Bit 0-15  : (re)assoc id of (re)association response frame,
40536      *             section 9.4.1.8 AID field.
40537      * Bit 16-20 : MLO bitmap band info,
40538      *             bit0: 2GHz, bit1: 5GHz, bit2: 6GHz, bits 3-4: reserved
40539      *             Refer to WMI_[GET,SET]_MLO_BITMAP_BAND_INFO macros.
40540      * Bit 21    : indicate whether this frame is rx :0-not rx; 1-rx
40541      *             Refer to WMI_[GET,SET]_RX_INDICATE macros.
40542      * Bit 22-25 : opaque tx failure reason
40543      *             Refer to WMI_[GET,SET]_TX_FAILED_REASON macros.
40544      * Bit 26-31 : Indicate the map id, used to identify the all the
40545      *             ML link info corresponding to current roaming candidate.
40546      */
40547     A_UINT32 frame_info_ext;
40548 } wmi_roam_frame_info;
40549 
40550 typedef enum {
40551     WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT = 3,
40552 } WMI_ROAM_FRAME_INFO_FRAME_TYPE;
40553 
40554 typedef enum {
40555     WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_M1 = 1,
40556     WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_M2,
40557     WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_M3,
40558     WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_M4,
40559     WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_GTK_M1,
40560     WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_GTK_M2,
40561 } WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE;
40562 
40563 typedef enum {
40564     WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_STATUS_ACK = 0,
40565     WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_STATUS_NO_ACK,
40566     WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_STATUS_TX_FAIL,
40567 } WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_STATUS;
40568 
40569 typedef struct {
40570     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_initial_info_tlv_param */
40571 
40572     /* count of full scan */
40573     A_UINT32 roam_full_scan_count;
40574     A_INT32  rssi_th; /* unit: dBm */
40575     A_UINT32 cu_th; /* channel utilization threshold: uses units of percent */
40576     /* timer_canceled:
40577      * bit0: timer1 canceled
40578      * bit1: timer2 canceled
40579      * bit2: inactive timer canceled
40580      */
40581     A_UINT32 timer_canceled;
40582 } wmi_roam_initial_info;
40583 
40584 typedef enum {
40585     WMI_ROAM_MSG_RSSI_RECOVERED = 1, /* Connected AP RSSI is recovered to good region */
40586 } WMI_ROAM_MSG_ID;
40587 
40588 typedef struct {
40589     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_msg_info_tlv_param */
40590     /*
40591      * timestamp is the absolute time (in milliseconds) w.r.t host timer
40592      * which is synchronized between the host and target
40593      */
40594     A_UINT32 timestamp;
40595     A_UINT32 msg_id; /* Message ID from WMI_ROAM_MSG_ID */
40596     /* msg_param values are interpreted differently for different msg_id values.
40597      * if msg_id == WMI_ROAM_MSG_RSSI_RECOVERED:
40598      *     msg_param1 contains current AP RSSI in dBm
40599      *         (unsigned -> signed conversion is required)
40600      *     msg_param2 contains next trigger RSSI threshold in dBm
40601      *         (unsigned -> signed conversion is required)
40602      */
40603     A_UINT32 msg_param1;
40604     A_UINT32 msg_param2;
40605 } wmi_roam_msg_info;
40606 
40607 typedef struct {
40608     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_stats_event_fixed_param */
40609     A_UINT32 vdev_id;
40610     A_UINT32 roam_scan_trigger_count; /* Number of roam scans triggered */
40611 } wmi_roam_stats_event_fixed_param;
40612 
40613 typedef struct {
40614     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_reason_cmm_tlv_param */
40615     /*
40616      * timestamp is the absolute time w.r.t host timer which is synchronized
40617      * between the host and target.
40618      * This timestamp indicates the time when roam trigger happened.
40619      */
40620     A_UINT32 timestamp;      /* Timestamp in milli seconds */
40621     /* trigger_reason:
40622      * Roam trigger reason from WMI_ROAM_TRIGGER_REASON_ID
40623      */
40624     A_UINT32 trigger_reason;
40625     /* trigger_sub_reason:
40626      * Reason for each roam scan from WMI_ROAM_TRIGGER_SUB_REASON_ID,
40627      * if multiple scans are triggered for a single roam trigger.
40628      */
40629     A_UINT32 trigger_sub_reason;
40630     A_UINT32 current_rssi;   /* Connected AP RSSI in dBm */
40631 } wmi_roam_trigger_reason_cmm;
40632 
40633 typedef struct {
40634     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_rssi_tlv_param */
40635     /* roam_rssi_threshold:
40636      * RSSI threshold value in dBm for low RSSI roam trigger.
40637      */
40638     A_UINT32 roam_rssi_threshold;
40639     /* data RSSI in dBm */
40640     A_UINT32 data_rssi;
40641     /* data RSSI threshold in dBm */
40642     A_UINT32 data_rssi_threshold;
40643     /* rx linkspeed status, 0:good linkspeed, 1:bad */
40644     A_UINT32 rx_linkspeed_status;
40645 } wmi_roam_trigger_rssi;
40646 
40647 typedef struct {
40648     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_bss_load_tlv_param */
40649     A_UINT32 cu_load;        /* Connected AP CU load percentage (0-100) */
40650 } wmi_roam_trigger_bss_load;
40651 
40652 typedef struct {
40653     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_deauth_tlv_param */
40654     /* deauth_type:
40655      * 1 -> De-authentication
40656      * 2 -> Disassociation
40657      */
40658     A_UINT32 deauth_type;
40659     /* deauth_reason:
40660      * De-authentication or disassociation reason.
40661      * De-authentication / disassociation Values are enumerated in the
40662      * 802.11 spec.
40663      */
40664     A_UINT32 deauth_reason;
40665 } wmi_roam_trigger_deauth;
40666 
40667 typedef struct {
40668     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_btm_tlv_param */
40669     /* btm_request_mode:
40670      * Mode Values are enumerated in the 802.11 spec.
40671      */
40672     A_UINT32 btm_request_mode;
40673     A_UINT32 disassoc_imminent_timer;  /* in Milli seconds */
40674     /* validity_internal:
40675      * Preferred candidate list validity interval in Milli seconds.
40676      */
40677     A_UINT32 validity_internal;
40678     /* candidate_list_count:
40679      * Number of preferred candidates from BTM request.
40680      */
40681     A_UINT32 candidate_list_count;
40682     /* btm_response_status_code:
40683      * Response status Values are enumerated in the 802.11 spec.
40684      */
40685     A_UINT32 btm_response_status_code;
40686 
40687     /* BTM BSS termination timeout value in milli seconds */
40688     A_UINT32 btm_bss_termination_timeout;
40689     /* BTM MBO assoc retry timeout value in milli seconds */
40690     A_UINT32 btm_mbo_assoc_retry_timeout;
40691 
40692     /* btm_req_dialog_token: dialog token number in BTM request frame */
40693     A_UINT32 btm_req_dialog_token;
40694 } wmi_roam_trigger_btm;
40695 
40696 typedef struct {
40697     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_bmiss_tlv_param */
40698     /* B[0-6]: final bmiss cnt.
40699      * B[7-23]: consecutive bmiss cnt
40700      * B[24]: isQosNullSuccess: 0: success, 1:fail
40701      */
40702     A_UINT32 bmiss_status;
40703 } wmi_roam_trigger_bmiss;
40704 
40705 typedef struct {
40706     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_dense_tlv_param */
40707     /* RX Throughput in bytes per second in dense env */
40708     A_UINT32 rx_tput;
40709     /* TX Throughput in bytes per second in dense env */
40710     A_UINT32 tx_tput;
40711     /* dense_status: b[0-7]: roamable AP count info in dense env */
40712     A_UINT32 dense_status;
40713 } wmi_roam_trigger_dense;
40714 
40715 typedef struct {
40716     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_force_tlv_param */
40717     A_UINT32 invoke_reason; /* from wlan_roam_invoke_reason */
40718 } wmi_roam_trigger_force;
40719 
40720 typedef struct {
40721     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_kickout_tlv_param */
40722     /* consecutive tx failure threshold */
40723     A_UINT32 kickout_th;
40724     A_UINT32 kickout_reason; /* from PEER_KICKOUT_REASON */
40725 } wmi_roam_trigger_kickout;
40726 
40727 typedef struct {
40728     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_per_tlv_param */
40729     /*  For PER roam,
40730      *  If the number of PPDUs with PHY rate < low_rate_thresh exceeds
40731      *  N * tx/rx_rate_thresh_percnt / 100, roaming will be triggered.
40732      *  b[0-7]:  tx_rate_thresh_percnt
40733      *  b[16-23]:rx_rate_thresh_percnt
40734      */
40735     A_UINT32 rate_thresh_percnt;
40736 } wmi_roam_trigger_per;
40737 
40738 typedef struct {
40739     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_periodic_tlv_param */
40740     /*  roam scan periodic :   units = milliseconds*/
40741     A_UINT32 periodic_timer_ms;
40742 } wmi_roam_trigger_periodic;
40743 
40744 typedef struct {
40745     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_hi_rssi_tlv_param */
40746     /*  roam High RSSI threshold */
40747     A_UINT32 hi_rssi_threshold;
40748 } wmi_roam_trigger_hi_rssi;
40749 
40750 #define WMI_MLO_LINK_INFO_GET_MAP_ID(link_info)            WMI_GET_BITS(link_info, 0, 6)
40751 #define WMI_MLO_LINK_INFO_SET_MAP_ID(link_info, val)       WMI_SET_BITS(link_info, 0, 6, val)
40752 
40753 #define WMI_MLO_LINK_INFO_GET_STATUS(link_info)            WMI_GET_BITS(link_info, 6, 1)
40754 #define WMI_MLO_LINK_INFO_SET_STATUS(link_info, val)       WMI_SET_BITS(link_info, 6, 1, val)
40755 
40756 #define WMI_MLO_LINK_INFO_GET_BAND(link_info)              WMI_GET_BITS(link_info, 7, 3)
40757 #define WMI_MLO_LINK_INFO_SET_BAND(link_info, val)         WMI_SET_BITS(link_info, 7, 3, val)
40758 
40759 #define WMI_MLO_LINK_INFO_GET_IEEE_LINK_ID(link_info)      WMI_GET_BITS(link_info, 10, 4)
40760 #define WMI_MLO_LINK_INFO_SET_IEEE_LINK_ID(link_info, val) WMI_SET_BITS(link_info, 10, 4, val)
40761 
40762 typedef struct {
40763     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_info_tlv_param */
40764     wmi_mac_addr link_addr;
40765     A_UINT32 link_info;
40766     /*
40767      * b[0-5]   : Map Id - maps the corresponding candidate AP for which
40768      *            re-assoc resp received.
40769      * b[6]     : Status - link status, AP accepted/rejected this link
40770      *            0 - accepted
40771      *            1 - rejected
40772      * b[7-9]   : Band - link band info (band value is from wmi_mlo_band_info)
40773      * b[10-13] : IEEE link id - Link id associated with AP
40774      */
40775 } wmi_mlo_link_info;
40776 
40777 typedef struct {
40778     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_get_scan_channel_list_cmd_fixed_param */
40779     A_UINT32 vdev_id;
40780 } wmi_roam_get_scan_channel_list_cmd_fixed_param;
40781 
40782 typedef struct {
40783     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_channel_list_event_fixed_param */
40784     A_UINT32 vdev_id;
40785     wmi_ssid ssid; /* SSID of connected AP */
40786     /*
40787      * This event can be sent as a response to
40788      * WMI_ROAM_GET_SCAN_CHANNEL_LIST_CMDID or
40789      * can be sent asynchronously during disconnection.
40790      * command_response = 1, when it is sent as a response to
40791      *                       WMI_ROAM_GET_SCAN_CHANNEL_LIST_CMDID
40792      *                  = 0, for other cases
40793      */
40794     A_UINT32 command_response;
40795 /*
40796  * This fixed_param TLV is followed by the below TLVs:
40797  *
40798  * List of roam scan channel frequencies in MHz
40799  * A_UINT32 channel_list[];
40800  */
40801 } wmi_roam_scan_channel_list_event_fixed_param;
40802 
40803 typedef enum {
40804     WMI_ROAM_CND_RSSI_SCORING             = 0x00000001, /* FW considers RSSI scoring */
40805     WMI_ROAM_CND_HT_SCORING               = 0x00000002, /* FW considers HT scoring */
40806     WMI_ROAM_CND_VHT_SCORING              = 0x00000004, /* FW considers VHT scoring */
40807     WMI_ROAM_CND_HE_SCORING               = 0x00000008, /* FW considers 11ax scoring */
40808     WMI_ROAM_CND_BW_SCORING               = 0x00000010, /* FW considers Bandwidth scoring */
40809     WMI_ROAM_CND_BAND_SCORING             = 0x00000020, /* FW considers Band(2G/5G) scoring */
40810     WMI_ROAM_CND_NSS_SCORING              = 0x00000040, /* FW considers NSS(1x1 / 2x2) scoring */
40811     WMI_ROAM_CND_CHAN_CONGESTION_SCORING  = 0x00000080, /* FW considers ESP/QBSS scoring */
40812     WMI_ROAM_CND_BEAMFORMING_SCORING      = 0x00000100, /* FW considers Beamforming scoring */
40813     WMI_ROAM_CND_PCL_SCORING              = 0x00000200, /* FW considers PCL scoring */
40814     WMI_ROAM_CND_OCE_WAN_SCORING          = 0x00000400, /* FW considers OCE WAN metrics scoring */
40815     WMI_ROAM_CND_OCE_AP_TX_PWR_SCORING    = 0x00000800, /* FW considers OCE AP Tx power scoring */
40816     WMI_ROAM_CND_OCE_AP_SUBNET_ID_SCORING = 0x00001000, /* FW considers OCE AP subnet id scoring */
40817     WMI_ROAM_CND_SAE_PK_AP_SCORING        = 0x00002000, /* FW considers SAE-PK enabled AP scoring */
40818     WMI_ROAM_CND_SECURITY_SCORING         = 0x00004000, /* FW considers security scoring */
40819 } WMI_ROAM_CND_SCORING_PARAMS;
40820 
40821 typedef struct {
40822     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_capability_report_event_fixed_param */
40823     /*
40824      * This event is sent asynchronously during FW init.
40825      * It indicates FW roam related capabilities to host.
40826      *
40827      * scoring_capability_bitmap = Indicates firmware candidate scoring
40828      *                             capabilities. It's a bitmap of values
40829      *                             from enum WMI_ROAM_CND_SCORING_PARAMS.
40830      */
40831     A_UINT32 scoring_capability_bitmap;
40832 } wmi_roam_capability_report_event_fixed_param;
40833 
40834 /*
40835  * Definition of disallow connection modes.
40836  */
40837 typedef enum {
40838     /* Bit 0: roam to 5GL+5GH MLSR is not allowed if the bit is set. */
40839     WMI_ROAM_MLO_CONNECTION_MODE_5GL_5GH_MLSR = 0x1,
40840 } WMI_ROAM_MLO_CONNECTION_MODES;
40841 
40842 typedef struct {
40843     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_mlo_config_cmd_fixed_param */
40844     wmi_mac_addr partner_link_addr; /* Assigned link address which can be used as self link addr when vdev is not created */
40845 
40846     A_UINT32 vdev_id;
40847 
40848     /*
40849      * Configure max number of link mlo connection supports.
40850      * Invalid value or 0 will use max supported value by fw.
40851      */
40852     A_UINT32 support_link_num;
40853 
40854     /*
40855      * Bit 0: 2G band support if 1
40856      * Bit 1: 5G band support if 1
40857      * Bit 2: 6G band support if 1
40858      */
40859     A_UINT32 support_link_band; /* Configure the band bitmap of mlo connection supports. */
40860     A_UINT32 max_active_links; /* Max active links supported for STA */
40861 
40862     /*
40863      * Disallow the specified connection mode(s) when roaming to MLD AP.
40864      * Refer to the WMI_ROAM_MLO_CONNECTION_MODES enum for the connection mode
40865      * each bit represents.
40866      */
40867     A_UINT32 disallow_connect_modes;
40868 } wmi_roam_mlo_config_cmd_fixed_param;
40869 
40870 typedef struct {
40871     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_param_cmd_fixed_param */
40872     /** unique id identifying the VDEV, generated by the caller */
40873     A_UINT32 vdev_id;
40874     /** parameter id - see WMI_ROAM_PARAM */
40875     A_UINT32 param_id;
40876     /** parameter value */
40877     A_UINT32 param_value;
40878 } wmi_roam_set_param_cmd_fixed_param;
40879 
40880 typedef struct {
40881     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_enable_vendor_cmd_fixed_param */
40882     /** unique id identifying the VDEV, generated by the caller */
40883     A_UINT32 vdev_id;
40884     /** abstract mechanism for differentiating vendors */
40885     A_UINT32 vendor_id;
40886     /** 1 - Enable, 0 - Disable */
40887     A_UINT32 enable;
40888 } wmi_roam_enable_vendor_control_cmd_fixed_param;
40889 
40890 typedef enum {
40891     ROAM_VENDOR_CONTROL_PARAM_TRIGGER = 1,
40892     ROAM_VENDOR_CONTROL_PARAM_DELTA,
40893     ROAM_VENDOR_CONTROL_PARAM_FULL_SCANPERIOD,
40894     ROAM_VENDOR_CONTROL_PARAM_PARTIAL_SCANPERIOD,
40895     ROAM_VENDOR_CONTROL_PARAM_ACTIVE_CH_DWELLTIME,
40896     ROAM_VENDOR_CONTROL_PARAM_PASSIVE_CH_DWELLTIME,
40897     ROAM_VENDOR_CONTROL_PARAM_HOME_CH_TIME,
40898     ROAM_VENDOR_CONTROL_PARAM_AWAY_TIME,
40899     /* Sending query for all roam_vendor_control_param */
40900     ROAM_VENDOR_CONTROL_PARAM_ALL = 0xFFFFFFFF,
40901 } WMI_ROAM_GET_VENDOR_CONTROL_PARAM_ID;
40902 
40903 typedef struct {
40904     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_vendor_param_cmd_fixed_param */
40905     /** unique id identifying the VDEV, generated by the caller */
40906     A_UINT32 vdev_id;
40907     /** Vendor Control Param ID from enum WMI_ROAM_GET_VENDOR_CONTROL_PARAM_ID */
40908     A_UINT32 param_id;
40909 } wmi_roam_get_vendor_control_param_cmd_fixed_param;
40910 
40911 /* WMI_ROAM_GET_VENDOR_CONTROL_PARAM_EVENTID - No need to make this event as wakeable event
40912  * Host ensures to take wakelock after sending WMI_ROAM_GET_VENDOR_CONTROL_PARAM_CMDID command */
40913 typedef struct {
40914     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_get_vendor_control_param_event_fixed_param */
40915     /** unique id identifying the VDEV, generated by the caller */
40916     A_UINT32 vdev_id;
40917     /**
40918      * Vendor Control Param ID from enum WMI_ROAM_GET_VENDOR_CONTROL_PARAM_ID
40919      * If param_id is ROAM_VENDOR_CONTROL_PARAM_ALL, send all vendor control
40920      * param value defined in enum WMI_ROAM_GET_VENDOR_CONTROL_PARAM_ID
40921      * using wmi_vendor_control_param tlv
40922      */
40923     A_UINT32 param_id;
40924     /** Vendor control param value */
40925     A_UINT32 param_value;
40926 } wmi_roam_get_vendor_control_param_event_fixed_param;
40927 
40928 typedef struct {
40929     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vendor_control_param */
40930     /** Vendor Control Param ID from enum WMI_ROAM_GET_VENDOR_CONTROL_PARAM_ID */
40931     A_UINT32 param_id;
40932     /** Vendor control param value */
40933     A_UINT32 param_value;
40934 } wmi_vendor_control_param;
40935 
40936 /** the definition of different ROAM parameters */
40937 typedef enum {
40938     /*
40939      * roam param to configure below roam events
40940      * Bit : 0 disabled - do not send WMI_ROAM_NOTIF_SCAN_END in WMI_ROAM_EVENTID
40941      * Bit : 0 enabled  - send WMI_ROAM_NOTIF_SCAN_END in WMI_ROAM_EVENTID
40942      * Bit : 1 disabled - do not send 1) WMI_ROAM_STATS_EVENTID 2) WMI_ROAM_NOTIF_SCAN_START and WMI_ROAM_NOTIF_SCAN_END notifs in WMI_ROAM_EVENTID in suspend mode
40943      * Bit : 1 enabled  - send 1) WMI_ROAM_STATS_EVENTID 2) WMI_ROAM_NOTIF_SCAN_START and WMI_ROAM_NOTIF_SCAN_END notifs in WMI_ROAM_EVENTID in suspend mode
40944      * Bit : 2-31  - reserved
40945      */
40946     WMI_ROAM_PARAM_ROAM_EVENTS_CONFIG = 1,
40947 
40948     /*
40949      * Bit : 0 if unset, POOR_LINKSPEED
40950      * Bit : 0 if set, GOOD_LINKSPEED
40951      */
40952     WMI_ROAM_PARAM_LINKSPEED_STATE = 2,
40953 
40954     /*
40955      * roam param to configure roam scan params for DFS jitter reduction
40956      * Bit : 0 enabled   - DFS channel jitter reduction is enabled.
40957      * Bit : 0 disabled  - DFS channel jitter reduction is disabled.
40958      *
40959      * Bit : 1-7         - To indicate the passive-to-active conversion timeout
40960      *                     with range 40 to 70 in ms, default value is 50ms.
40961      *                     If an invalid (out of range) value is provided, the
40962      *                     default value will be used.
40963      * Bit : 8-13        - To indicate the DFS RSSI threshold for current AP
40964      *                     with range 0 to 58, default value is 0 dB
40965      *                     (DFS RSSI threshold = -70 dBm + 0 dB = -70 dBm).
40966      *                     The specified value (in dB) is added to the -70 dBm
40967      *                     baseline value to get the RSSI threshold in dBm.
40968      *                     If an invalid (out of range) value is provided, the
40969      *                     default value will be used.
40970      * Bit : 14-19       - To indicate the DFS RSSI threshold for candidate AP
40971      *                     with range 0 to 58, default value is 0 dB
40972      *                     (DFS RSSI threshold = -70 - 0 = -70 dBm).
40973      *                     The specified value (in dB) is added to the -70 dBm
40974      *                     baseline value to get the RSSI threshold in dBm.
40975      *                     If an invalid (out of range) value is provided, the
40976      *                     default value will be used.
40977      * Bit : 20 disabled - To indicate DFS roam scan policy is AGILE
40978      * Bit : 20 enabled  - To indicate DFS roam scan policy is Legacy
40979      *
40980      * Bit : 21-31 are reserved
40981      */
40982     WMI_ROAM_PARAM_ROAM_SCAN_DFS_CONFIG_BITMAP = 3,
40983 
40984     /*
40985      * roam param to configure HO_DELAY_RX value at runtime
40986      * The configured value of ho_delay_rx will be in milliseconds
40987      * Maximum value which user can configure using this Param ID is 1000 msec.
40988      *
40989      * If any value beyond this Maximum value is provided by user, FW will
40990      * configure the ho_delay_rx value to Maximum allowed value i.e. 1000 msec.
40991      */
40992     WMI_ROAM_PARAM_ROAM_HO_DELAY_RUNTIME_CONFIG = 4,
40993 
40994     /*
40995      * Roam param to enable/disable full scan channel optimization
40996      * As per current implementation of roam scan, if there are no APs found
40997      * during partial scan, immediately a full scan will be initiated as a
40998      * fallback. This includes all channels that were already scanned as part
40999      * of partial scan.
41000      * This flag controls the optimization, to exclude all channels, which are
41001      * already scanned as part of partial scan.
41002      */
41003     WMI_ROAM_PARAM_ROAM_CONTROL_FULL_SCAN_CHANNEL_OPTIMIZATION = 5,
41004 
41005     /*
41006      * Roam param to enable/disable scanning of 6 GHz PSC channels
41007      * As per current implementation, Wi-Fi STA scans on all 6 GHz PSC channels
41008      * as part of full scan during a roam scan irrespective of whether APs are
41009      * present in 6 GHz or not.
41010      * This flag controls the optimization to do the scan in 6 GHz PSC channels
41011      * only if channel map or newly received RNR indicates 6 GHz APs during
41012      * current 2.4 GHz or 5 GHz scanning of Roam Full scan.
41013      */
41014     WMI_ROAM_PARAM_ROAM_CONTROL_FULL_SCAN_6GHZ_PSC_ONLY_WITH_RNR = 6,
41015 
41016     /*
41017      * Flag to tell whether MCC is disallowed or not in sta + sta currrent case.
41018      * If flag is unset, then no limitation for channels which sta can roam to.
41019      * If flag is set, then the channels which one of STA roam to cause MCC with other STA, it will be disallowed.
41020      */
41021      WMI_ROAM_PARAM_ROAM_MCC_DISALLOW = 7,
41022 
41023     /*
41024      * Roam param to provide additional RSSI Boost for 6 GHz Candidate AP
41025      * during Roam Scan in case any 6 GHz candidate has better Roam score
41026      * but fails RSSI Delta Check.
41027      * This configurable RSSI Boost value for 6GHz Candidate AP will be
41028      * configured via ini RoamRssiDiff6GHz
41029      * This configured RSSI boost value will only be applicable for 6GHz
41030      * Candidate AP when the STA is connected to 2.4/5 GHz Band AP and will
41031      * not impact if STA is connected to 6GHz Band AP
41032      */
41033     WMI_ROAM_PARAM_ROAM_RSSI_BOOST_FOR_6GHZ_CAND_AP = 8,
41034 
41035     /*
41036      * Roam param to indicate unsupported Power Type for 6 GHz Candidate AP
41037      * found during Roam Scan. If AP operates on the power type disabled by
41038      * the host, then that candidate should not be selected.
41039      * This unsupported Power Type will be configured based
41040      * on disabled 6GHz Power Types in Regdomain
41041      *
41042      * If below bits in the obtianed Bitmap is set then any AP
41043      * broadcasting these Power Types should not be selected
41044      * BIT 0   - Indoor Access Point
41045      * BIT 1   - Standard Power (SP) Access Point
41046      * BIT 2   - Very Low Power (VLP) Access Point
41047      * BIT 3-7 - Reserved
41048      */
41049     WMI_ROAM_PARAM_ROAM_UNSUPPORTED_6GHZ_POWERTYPE = 9,
41050 
41051     /*
41052      * crypto params to allow EHT/MLO in WPA2/WPA3 security.
41053      * BITMAP of wlan_crypto_roam_eht_config
41054      */
41055     WMI_ROAM_PARAM_CRYPTO_EHT_CONFIG = 10,
41056 
41057 
41058     /*=== END ROAM_PARAM_PROTOTYPE SECTION ===*/
41059 } WMI_ROAM_PARAM;
41060 
41061 typedef enum {
41062     /*
41063      * BIT 0 - WLAN_CRYPTO_WPA2_ALLOW_NON_MLO_EHT:
41064      *         Connect to non-MLO/MLO WPA2 EHT APs in EHT without PMF support.
41065      *
41066      * BIT 1 - WLAN_CRYPTO_WPA2_ALLOW_MLO:
41067      *         Connect to MLO WPA2 EHT APs in MLO without PMF support.
41068      *
41069      * BIT 2 - WLAN_CRYPTO_WPA2_ALLOW_NON_MLO_EHT_MFPC_SET:
41070      *         Connect to non-MLO/MLO WPA2 EHT APs in EHT.
41071      *         (PMF capable is mandatory).
41072      *
41073      * BIT 3 - WLAN_CRYPTO_WPA2_ALLOW_MLO_MFPC_SET:
41074      *         Connect to MLO WPA2 EHT APs in MLO
41075      *         (PMF capable is mandatory).
41076      *
41077      * BIT 4 - 15 - reserved for future WPA2 security configs
41078      *
41079      * BIT 16 - WLAN_CRYPTO_WPA3_SAE_ALLOW_NON_MLO_EHT_HNP:
41080      *          Connect to non-MLO/MLO WPA3-SAE without support for H2E
41081      *          (or no RSNXE IE in beacon) in non-MLO EHT.
41082      *
41083      * BIT 17 - WLAN_CRYPTO_WPA3_SAE_ALLOW_MLO_HNP:
41084      *          Connect to MLO WPA3-SAE without support for H2E
41085      *          (or no RSNXE IE in beacon).
41086      */
41087     WLAN_CRYPTO_WPA2_ALLOW_NON_MLO_EHT          = 0x00000001,
41088     WLAN_CRYPTO_WPA2_ALLOW_MLO                  = 0x00000002,
41089     WLAN_CRYPTO_WPA2_ALLOW_NON_MLO_EHT_MFPC_SET = 0x00000004,
41090     WLAN_CRYPTO_WPA2_ALLOW_MLO_MFPC_SET         = 0x00000008,
41091 
41092     WLAN_CRYPTO_WPA3_SAE_ALLOW_NON_MLO_EHT_HNP  = 0x00010000,
41093     WLAN_CRYPTO_WPA3_SAE_ALLOW_MLO_HNP          = 0x00020000,
41094 } wlan_crypto_roam_eht_config;
41095 
41096 typedef struct {
41097     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_big_data_cmd_fixed_param */
41098     A_UINT32 vdev_id;
41099 } wmi_vdev_get_big_data_cmd_fixed_param;
41100 
41101 typedef struct {
41102     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_send_big_data_event_fixed_param */
41103     A_UINT32 vdev_id;
41104     /** param list **/
41105     /* Target power (dBm units) - 2.4G/5G */
41106     A_UINT32 target_power_2g_dsss;
41107     A_UINT32 target_power_2g_ofdm;
41108     A_UINT32 target_power_2g_mcs0;
41109     A_UINT32 target_power_5g_ofdm;
41110     A_UINT32 target_power_5g_mcs0;
41111 
41112     /* ANI level from hal-phy */
41113     A_UINT32 ani_level;
41114 
41115     /* Number of probe requests sent while roaming after BMISS */
41116     A_UINT32 tx_probe_req;
41117 
41118     /* Number of probe responses received while roaming after BMISS */
41119     A_UINT32 rx_probe_response;
41120 
41121     /*
41122      * Number of retries (both by HW and FW) for tx data MPDUs sent by this vdev
41123      */
41124     A_UINT32 num_data_retries;
41125 
41126     /* Number of tx data MPDUs dropped from this vdev due to tx retry limit */
41127     A_UINT32 num_tx_data_fail;
41128 
41129     /* Number of aggregated unicast tx expecting response ppdu */
41130     A_UINT32 data_tx_ppdu_count;
41131 
41132     /* Number of aggregated unicast tx expecting response mpdu */
41133     A_UINT32 data_tx_mpdu_count;
41134 
41135     /* number of rx frames with good PCLP */
41136     A_UINT32 rx_frame_good_pclp_count;
41137 
41138     /* Number of occasions that no valid delimiter is detected by ampdu parser */
41139     A_UINT32 invalid_delimiter_count;
41140 
41141     /* Number of frames for which the CRC check failed in the MAC */
41142     A_UINT32 rx_crc_check_fail_count;
41143 
41144     /* tx fifo overflows count for transmissions by this vdev */
41145     A_UINT32 txpcu_fifo_overflows_count;
41146 
41147     /* Number of ucast ACKS received good FCS (doesn't include block acks) */
41148     A_UINT32 successful_acks_count;
41149 
41150     /*
41151      * RX BlockACK Counts
41152      * Note that this counts the number of block acks received by this vdev,
41153      * not the number of MPDUs acked by block acks.
41154      */
41155     A_UINT32 rx_block_ack_count;
41156 
41157     /* Beacons received from member of BSS */
41158     A_UINT32 member_bss_beacon_count;
41159 
41160     /* Beacons received from other BSS */
41161     A_UINT32 non_bss_beacon_count;
41162 
41163     /* Number of RX Data multicast frames dropped by the HW */
41164     A_UINT32 rx_data_mc_frame_filtered_count;
41165 } wmi_vdev_send_big_data_event_fixed_param;
41166 
41167 typedef struct {
41168     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_big_data_p2_cmd_fixed_param */
41169     A_UINT32 vdev_id;
41170 } wmi_vdev_get_big_data_p2_cmd_fixed_param;
41171 
41172 typedef struct {
41173     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_send_big_data_p2_event_fixed_param */
41174     A_UINT32 vdev_id;
41175     /** param list **/
41176     /* total number of TSF out of sync */
41177     A_UINT32 tsf_out_of_sync;
41178 
41179     /**
41180      * ANI (noise interference) level corresponding to the channel.
41181      * The range of values is different for chips of different target
41182      * architectures.  Helium values range from 0 to 9, while Lithium
41183      * and Beryllium values range from -5 to 15.
41184      * In all cases, higher values indicate more noise interference.
41185      */
41186     A_INT32 ani_level;
41187 
41188     /*
41189      * This fixed_param TLV is followed by the below TLVs:
41190      * List of datapath big data stats. This stat is not interpreted by
41191      * host. This gets directly updated on big data server and later FW
41192      * team will analyze this data.
41193      *
41194      * A_UINT32 bd_datapath_stats[]; // DEPRECATED
41195      * wmi_big_data_dp_stats_tlv_param big_data_dp_stats[];
41196      */
41197 } wmi_vdev_send_big_data_p2_event_fixed_param;
41198 
41199 typedef struct {
41200     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bd_datapath_stats_tlv_param */
41201     A_UINT32 tlv_header;
41202 
41203     /* Tx power before disconnection.
41204      * The units of the following tx power fields are 0.5 dBm for Helium
41205      * architecture target (e.g. a value of 1 means tx power = 0.5 dBm),
41206      * and are 0.25 dBm for subsequent target architectures.
41207      */
41208     A_UINT32 last_data_tx_pwr;
41209     A_UINT32 target_power_dsss;
41210     A_UINT32 target_power_ofdm;
41211 
41212     /* Rate index of last data frame before disconnection */
41213     A_UINT32 last_tx_data_rix;
41214 
41215     /* Tx rate (in kbps) of last data frame before disconnection */
41216     A_UINT32 last_tx_data_rate_kbps;
41217 } wmi_big_data_dp_stats_tlv_param;
41218 
41219 typedef enum {
41220     WMI_6GHZ_REG_PWRMODE_LPI = 0, /* LPI mode for AP and client products */
41221     WMI_6GHZ_REG_PWRMODE_SP = 1, /* SP mode for AP and client products */
41222     WMI_6GHZ_REG_PWRMODE_VLP = 2, /* VLP mode for AP and client products */
41223     WMI_6GHZ_REG_PWRMODE_SP_STA = 3, /* SP client mode for AP products */
41224 
41225     WMI_6GHZ_REG_PWRMODE_MAX = 5
41226 } WMI_6GHZ_REG_PWRMODE_TYPE;
41227 
41228 typedef struct {
41229     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_tpc_power_fixed_param */
41230     A_UINT32 vdev_id;
41231     A_UINT32 psd_power;  /* Value: 0 or 1, is PSD power or not */
41232     A_UINT32 eirp_power; /* Maximum EIRP power (dDm units), valid only if power is PSD */
41233     A_UINT32 power_type_6ghz; /* Type: WMI_6GHZ_REG_TYPE, used for halphy CTL lookup */
41234 
41235     /*
41236      * This fixed_param TLV is followed by the below TLVs:
41237      *
41238      * Based on power_type_6ghz sent in fixed param, the array TLVs
41239      * will be interpreted as described below:
41240      *
41241      * For power_type_6ghz - LPI and VLP power mode:
41242      *   num_pwr_levels of wmi_vdev_ch_power_info
41243      *     This array TLV will be filled based on psd_power field in
41244      *     fixed param.
41245      *       If psd_power = 1, TLV carries 20MHz sub-channel center frequency
41246      *       and PSD-power values.
41247      *       If psd_power = 0, TLV carries Cfreq and EIRP for all BWs
41248      *       (<= current channel BSS BW).
41249      *   wmi_vdev_ch_power_psd_info & wmi_vdev_ch_power_eirp_info are not used
41250      *   for LPI and VLP power mode.
41251      *
41252      * For power_type_6ghz SP and SP_CLIENT power mode:
41253      *     num_pwr_levels of wmi_vdev_ch_power_psd_info is filled as below
41254      *         Holds BSS sub-channel center frequency and OOBE PSD-power values.
41255      *         OOBE PSD values for AP and STA are filled in below manner:
41256      *         AP case:
41257      *             For example, DUT is operating in 160 MHz and pri20
41258      *             lies in first sub-channel,
41259      *                 OOBE_PSD_20 | MIN_OOBE_PSD_40 | MIN_OOBE_PSD_80 |
41260      *                 MIN_OOBE_PSD_80 | MIN_OOBE_PSD_160 | MIN_OOBE__PSD_160 |
41261      *                 MIN_OOBE_PSD_160 | MIN_OOBE_PSD_160
41262      *         STA case:
41263      *             For example,STA is operating in 160 MHz
41264      *                 OOBE_PSD_20 | OOBE_PSD_20 | OOBE_PSD_20 | OOBE_PSD_20 |
41265      *                 OOBE_PSD_20 | OOBE_PSD_20 | OOBE_PSD_20 | OOBE_PSD_20
41266      *
41267      *     num_pwr_levels of wmi_vdev_ch_power_eirp_info
41268      *         Carries Cfreq and EIRP for all BWs (<= current channel BSS BW).
41269      *         For both AP and STA, EIRP are filled in below manner:
41270      *         Example: If operating BW is 160 MHz
41271      *                  EIRP_20 | EIRP_40 | EIRP_80 | EIRP_160
41272      *
41273      *     If the wmi_vdev_ch_power_psd_info or wmi_vdev_ch_power_eirp_info TLV
41274      *     arrays are not both present, check for older TLV
41275      *     (wmi_vdev_ch_power_info) as explained for LPI and VLP.
41276      */
41277 } wmi_vdev_set_tpc_power_fixed_param;
41278 
41279 typedef struct {
41280     A_UINT32 tlv_header;
41281     A_UINT32 chan_cfreq; /* Channel center frequency (MHz) */
41282     A_UINT32 tx_power;   /* Unit: dBm, either PSD/EIRP power for this frequency or incremental for non-PSD BW */
41283 } wmi_vdev_ch_power_info;
41284 
41285 typedef struct {
41286     A_UINT32 tlv_header;
41287     A_UINT32 chan_cfreq; /* Channel center frequency (MHz) of all BSS Sub-channel */
41288     /* psd_power:
41289      * Unit: 0.25dBm/MHz, OOBE PSD power of sub-channel
41290      * Example: a power spectral density of 1 dBm / MHz will be reported
41291      * as the value 4.
41292      */
41293     A_INT32 psd_power;
41294 } wmi_vdev_ch_power_psd_info;
41295 
41296 typedef struct {
41297     A_UINT32 tlv_header;
41298     A_UINT32 chan_cfreq; /* Channel center frequency (MHz) for all BWs (<= current channel BSS BW) */
41299     /* eirp_power:
41300      * Unit: 0.25dBm, EIRP power for all BWs (<= current channel BSS BW)
41301      * Example: a power of 1 dBm will be reported as the value 4.
41302      */
41303     A_INT32 eirp_power;
41304  } wmi_vdev_ch_power_eirp_info;
41305 
41306 typedef struct {
41307     A_UINT32 tlv_header;    /* TLV tag and len; tag equals wmi_txpower_query_cmd_fixed_param  */
41308     A_UINT32 request_id;    /* unique request ID to distinguish the command / event set */
41309 
41310     /* The mode value has the following meaning :
41311      * 0  : 11a
41312      * 1  : 11bg
41313      * 2  : 11b
41314      * 3  : 11g only
41315      * 4  : 11a HT20
41316      * 5  : 11g HT20
41317      * 6  : 11a HT40
41318      * 7  : 11g HT40
41319      * 8  : 11a VHT20
41320      * 9  : 11a VHT40
41321      * 10 : 11a VHT80
41322      * 11 : 11g VHT20
41323      * 12 : 11g VHT40
41324      * 13 : 11g VHT80
41325      * 14 : unknown
41326      */
41327     A_UINT32 mode;
41328     A_UINT32 rate;          /* rate index */
41329     A_UINT32 nss;           /* number of spatial stream */
41330     A_UINT32 beamforming;   /* beamforming parameter 0:disabled, 1:enabled */
41331     A_UINT32 chain_mask;    /* mask for the antenna set to get power */
41332     A_UINT32 chain_index;   /* index for the antenna */
41333 } wmi_get_tpc_power_cmd_fixed_param;
41334 
41335 typedef struct {
41336     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_tpc_power_evt_fixed_param  */
41337     A_UINT32 request_id;    /* request ID set by the command */
41338     A_INT32  tx_power;      /* TX power for the specified HALPHY parameters in half dBm unit */
41339 } wmi_get_tpc_power_evt_fixed_param;
41340 
41341 typedef struct {
41342     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_dpd_status_cmd_fixed_param */
41343     A_UINT32 pdev_id;        /* PDEV ID set by the command */
41344 } wmi_pdev_get_dpd_status_cmd_fixed_param;
41345 
41346 typedef enum {
41347     WMI_DPD_STATUS_DISABLE = 0,
41348     WMI_DPD_STATUS_ENABLE = 1,
41349     WMI_DPD_STATUS_INVALID = 2,
41350 } WMI_DPD_STATUS;
41351 
41352 typedef struct {
41353     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_dpd_status_evt_fixed_param  */
41354     A_UINT32 pdev_id;        /* PDEV Id set by the command */
41355     A_UINT32 dpd_status;    /* DPD status obtained from HALPHY, refer to WMI_DPD_STATUS */
41356 } wmi_pdev_get_dpd_status_evt_fixed_param;
41357 
41358 typedef struct {
41359     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_halphy_cal_status_cmd_fixed_param */
41360     A_UINT32 pdev_id;       /* PDEV ID set by the command */
41361 } wmi_pdev_get_halphy_cal_status_cmd_fixed_param;
41362 
41363 typedef struct {
41364     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_aoa_phasedelta_evt_fixed_param  */
41365     A_UINT32 pdev_id; /* PDEV Id set by the command */
41366     A_UINT32 freq; /* Current channel in MHz */
41367 
41368     /*
41369      * Chain Info
41370      * LSB 16 bits - Max chain supported,
41371      * MSB 16 bits - Chain pair which has phase values:
41372      *        0x0003 - chain 0 and 1
41373      *        0x000c - chain 2 and 3
41374      *        0x0030 - chain 4 and 5
41375      *        0x00c0 - chain 6 and 7
41376      */
41377     A_UINT32 chainInfo;
41378 
41379     /*
41380      * Phase Delta values:
41381      * Two phase delta values are packed into each A_UINT32 word
41382      * LSB 16-bit is 1st value and MSB 16-bit is 2nd value
41383      * Phasedelta values will be 0-1023 (mapped to 0-360 degree)
41384      * Each gain from 0 to 61 has a phasedelta value, e.g.
41385      * gain 0's phase delta occupies bits 15:0 of phasedelta[chain][0],
41386      * gain 1's phase delta occupies bits 31:16 of phasedelta[chain][0],
41387      * gain 2's phase delta occupies bits 15:0 of phasedelta[chain][1], etc.
41388      */
41389     A_UINT32 phasedelta[WMI_MAX_CHAINS_FOR_AOA_RCC][MAX_AOA_PHASEDELTA];
41390 
41391     /*
41392      * IBF cal values:
41393      * Used for final AoA calculation
41394      * [AoAPhase =  ( PhaseDeltaValue + IBFcalValue )   %   1024]
41395      */
41396     A_UINT32 perChainIbfCalVal[WMI_MAX_CHAINS_FOR_AOA_RCC];
41397 } wmi_pdev_aoa_phasedelta_evt_fixed_param;
41398 
41399 #define WMI_AOA_MAX_SUPPORTED_CHAINS_GET(chain_data) \
41400     WMI_GET_BITS(chain_data, 0, 16)
41401 #define WMI_AOA_MAX_SUPPORTED_CHAINS_SET(chain_data, value) \
41402     WMI_SET_BITS(chain_data, 0, 16, value)
41403 
41404 #define WMI_AOA_SUPPORTED_CHAINMASK_GET(chain_data) \
41405     WMI_GET_BITS(chain_data, 16, 16)
41406 #define WMI_AOA_SUPPORTED_CHAINMASK_SET(chain_data, value) \
41407     WMI_SET_BITS(chain_data, 16, 16, value)
41408 
41409 typedef struct {
41410     /** TLV tag and len; tag equals
41411       * WMITLV_TAG_STRUC_wmi_pdev_enhanced_aoa_phasedelta_eventid */
41412     A_UINT32 tlv_header;
41413     /* Current Operating Channel Frequency in MHz */
41414     A_UINT32 freq;
41415     /** pdev_id:
41416      * Identify the MAC.
41417      * See macros starting with WMI_PDEV_ID_ for values.
41418      * In non-DBDC case host should set it to 0.
41419      */
41420     A_UINT32 pdev_id;
41421     /** chain_info:
41422      * B0 -- B15 : Max number of chains supported
41423      * B16 --B31 : Data shared for chainmask -
41424      *             indicates the chains to which the data shared.
41425      */
41426     union {
41427         struct {
41428             A_UINT32 max_supported_chains:16,
41429                      data_for_chainmask:16;
41430         };
41431         A_UINT32 chain_info;
41432     };
41433     /** XBAR configuration to get RF2BB/BB2RF chain mapping
41434      * Samples of xbar_config,
41435      * If xbar_config is 0xFAC688(hex):
41436      *     RF chains 0-7 are connected to BB chains 0-7
41437      *     here,
41438      *         bits 0 to 2 = 0, maps BB chain 0 for RF chain 0
41439      *         bits 3 to 5 = 1, maps BB chain 1 for RF chain 1
41440      *         bits 6 to 8 = 2, maps BB chain 2 for RF chain 2
41441      *         bits 9 to 11 = 3, maps BB chain 3 for RF chain 3
41442      *         bits 12 to 14 = 4, maps BB chain 4 for RF chain 4
41443      *         bits 15 to 17 = 5, maps BB chain 5 for RF chain 5
41444      *         bits 18 to 20 = 6, maps BB chain 6 for RF chain 6
41445      *         bits 21 to 23 = 7, maps BB chain 7 for RF chain 7
41446      *
41447      * If xbar_config is 0x688FAC(hex):
41448      *     RF chains 0-3 are connected to BB chains 4-7
41449      *     RF chains 4-7 are connected to BB chains 0-3
41450      *     here,
41451      *         bits 0 to 2 = 4, maps BB chain 4 for RF chain 0
41452      *         bits 3 to 5 = 5, maps BB chain 5 for RF chain 1
41453      *         bits 6 to 8 = 6, maps BB chain 6 for RF chain 2
41454      *         bits 9 to 11 = 7, maps BB chain 7 for RF chain 3
41455      *         bits 12 to 14 = 0, maps BB chain 0 for RF chain 4
41456      *         bits 15 to 17 = 1, maps BB chain 1 for RF chain 5
41457      *         bits 18 to 20 = 2, maps BB chain 2 for RF chain 6
41458      *         bits 21 to 23 = 3, maps BB chain 3 for RF chain 7
41459      */
41460     A_UINT32 xbar_config;
41461     /**
41462      * IBF cal values:
41463      * Used for final AoA calculation
41464      * [AoAPhase =  ( PhaseDeltaValue + IBFcalValue )   %   1024]
41465      */
41466     A_UINT32 per_chain_ibf_cal_val[WMI_MAX_CHAINS];
41467     /**
41468      * This TLV is followed by TLV arrays containing
41469      * different types of data header and data buffer TLVs:
41470      * 1.  wmi_enhanced_aoa_gain_phase_data_hdr.
41471      *     This TLV contains the array of structure fields which indicate
41472      *     the type and format of data carried in the following data buffer
41473      *     TLV.
41474      * 2.  aoa_data_buf[] - Data buffer TLV.
41475      *     TLV header contains the total buffer size.
41476      *     Data buffer contains the phase_delta_array[Chains][GainEntries]
41477      *     in absolute phase values ranging 0-1024 and
41478      *     gain_delta_array[Chains][GainEntries] are gain index values.
41479      */
41480 } wmi_pdev_enhanced_aoa_phasedelta_evt_fixed_param;
41481 
41482 #define WMI_AOA_DATA_TYPE_GET(data_info) \
41483     WMI_GET_BITS(data_info, 0, 8)
41484 #define WMI_AOA_DATA_TYPE_SET(data_info,value) \
41485     WMI_SET_BITS(data_info, 0, 8, value)
41486 
41487 #define WMI_AOA_NUM_ENTIRES_GET(data_info) \
41488     WMI_GET_BITS(data_info, 8, 8)
41489 #define WMI_AOA_NUM_DATA_ENTRIES_SET(data_info,value) \
41490     WMI_SET_BITS(data_info, 8, 8, value)
41491 
41492 typedef enum _WMI_AOA_EVENT_DATA_TYPE {
41493     WMI_PHASE_DELTA_ARRAY = 0x0,
41494     WMI_GAIN_GROUP_STOP_ARRAY = 0x1,
41495     /* add new types here */
41496     WMI_MAX_DATA_TYPE_ARRAY,
41497 } WMI_AOA_EVENT_DATA_TYPE;
41498 
41499 typedef struct {
41500     /** TLV tag and len; tag equals
41501       * WMITLV_TAG_STRUC_wmi_pdev_enhanced_aoa_phasedelta_eventid */
41502     A_UINT32 tlv_header;
41503     /** data_info:
41504      * Data follows the LSB first and MSB second order in a 32bit word
41505      * bit mapping:
41506      * B0 -- B7  : Data type
41507      * B8 -- B15 : Number of entries to be parsed in terms of 32bit word
41508      *
41509      * If data is Phase delta values - Data type is 0x0
41510      * group stop gain index values - Data type is 0x1
41511      *
41512      * num_entries - Total number of data entries in uint32
41513      */
41514     union {
41515         struct {
41516             A_UINT32 data_type:8,
41517                      num_entries:8,
41518                      reserved:16;
41519         };
41520         A_UINT32 data_info;
41521     };
41522 } wmi_enhanced_aoa_gain_phase_data_hdr;
41523 
41524 typedef enum _WMI_AGC_GAIN_TABLE_IDX {
41525     WMI_AGC_DG_TABLE_IDX = 0,
41526     WMI_AGC_LG_TABLE_IDX,
41527     WMI_AGC_VLG_TABLE_IDX,
41528     WMI_AGC_MAX_GAIN_TABLE_IDX = 8,
41529 } WMI_AGC_GAIN_TABLE_IDX;
41530 
41531 #define WMI_AOA_BDF_NUM_GAIN_TBL_ELEMS_PER_WORD 4
41532 #define WMI_AOA_NUM_GAIN_TBL_ELEMS_PER_WORD 2
41533 #define WMI_AOA_NUM_BYTES_FOR_BDF_GAIN_TBL_ELEM 1
41534 #define WMI_AOA_NUM_BYTES_FOR_GAIN_TBL_ELEM 2
41535 
41536 /* Number of words required to store max number of gain table elements = ((max number of gain table elements)/(number of gain table elements per word)) */
41537 /* 2 bytes (at most)used to store each gain table elements */
41538 #define WMI_AOA_NUM_WORD_ENTRIES_FOR_MAX_NUM_AGC_TBL_ELEMS (WMI_AGC_MAX_GAIN_TABLE_IDX / WMI_AOA_NUM_GAIN_TBL_ELEMS_PER_WORD)
41539 
41540 /* 1 byte (at most) used to store each gain table elements obtained from BDF  */
41541 #define WMI_AOA_BDF_NUM_WORD_ENTRIES_FOR_MAX_NUM_AGC_TBL_ELEMS (WMI_AGC_MAX_GAIN_TABLE_IDX / WMI_AOA_BDF_NUM_GAIN_TBL_ELEMS_PER_WORD)
41542 
41543 typedef enum {
41544     WMI_AOA_2G = 0,
41545     WMI_AOA_5G,
41546     WMI_AOA_6G,
41547     WMI_AOA_MAX_BAND,
41548 } WMI_AOA_SUPPORTED_BANDS;
41549 
41550 #define WMI_AOA_MAX_AGC_GAIN_GET(pcap_var, tbl_idx, output) \
41551     do { \
41552         A_UINT8 word_idx = 0; \
41553         A_UINT8 bit_index = 0; \
41554         A_UINT8 nth_byte = 0; \
41555         word_idx = tbl_idx >> 1; \
41556         nth_byte = (tbl_idx % WMI_AOA_NUM_GAIN_TBL_ELEMS_PER_WORD); \
41557         bit_index = nth_byte * 8 * WMI_AOA_NUM_BYTES_FOR_GAIN_TBL_ELEM; \
41558         output = WMI_GET_BITS(*(pcap_var + word_idx), bit_index, 16); \
41559     } while (0)
41560 
41561 #define WMI_AOA_MAX_AGC_GAIN_SET(pcap_var, tbl_idx, value) \
41562     do { \
41563         A_UINT8 word_idx = 0; \
41564         A_UINT8 bit_index = 0; \
41565         A_UINT8 nth_byte = 0; \
41566         word_idx = tbl_idx >> 1; \
41567         nth_byte = (tbl_idx % WMI_AOA_NUM_GAIN_TBL_ELEMS_PER_WORD); \
41568         bit_index = nth_byte * 8 * WMI_AOA_NUM_BYTES_FOR_GAIN_TBL_ELEM; \
41569         WMI_SET_BITS(*(pcap_var+word_idx), bit_index, 16, value); \
41570     } while (0)
41571 
41572 #define WMI_AOA_MAX_BDF_ENTRIES_GET(pcap_var, tbl_idx, output) \
41573     do { \
41574         A_UINT8 word_idx = 0; \
41575         A_UINT8 bit_index = 0; \
41576         A_UINT8 nth_byte = 0; \
41577         word_idx = tbl_idx >> 2; \
41578         nth_byte = (tbl_idx % WMI_AOA_BDF_NUM_GAIN_TBL_ELEMS_PER_WORD); \
41579         bit_index = nth_byte * 8 * WMI_AOA_NUM_BYTES_FOR_BDF_GAIN_TBL_ELEM; \
41580         output = WMI_GET_BITS(*(pcap_var+word_idx), bit_index, 8); \
41581     } while (0)
41582 
41583 #define WMI_AOA_MAX_BDF_ENTRIES_SET(pcap_var, tbl_idx, value) \
41584     do { \
41585         A_UINT8 word_idx = 0; \
41586         A_UINT8 nth_byte = 0; \
41587         A_UINT8 bit_index = 0; \
41588         word_idx = tbl_idx >> 2; \
41589         nth_byte = (tbl_idx % WMI_AOA_BDF_NUM_GAIN_TBL_ELEMS_PER_WORD); \
41590         bit_index = nth_byte * 8 * WMI_AOA_NUM_BYTES_FOR_BDF_GAIN_TBL_ELEM; \
41591         WMI_SET_BITS(*(pcap_var+word_idx), bit_index, 8, value); \
41592     } while (0)
41593 
41594 typedef struct {
41595     /** TLV tag and len; tag equals
41596       * WMITLV_TAG_STRUC_wmi_enhanced_aoa_caps_param */
41597     A_UINT32 tlv_header;
41598 
41599     /* Maximum number of Rx AGC gain tables supported */
41600     A_UINT32 max_agc_gain_tbls;
41601 
41602     /* 1 byte is used to store bdf max number of elements in each gain tables */
41603     A_UINT32 max_bdf_gain_entries[WMI_AOA_BDF_NUM_WORD_ENTRIES_FOR_MAX_NUM_AGC_TBL_ELEMS];
41604 
41605     /** This TLV is followed by TLV array - wmi_enhanced_aoa_per_band_caps_param
41606      * containing band specifc agc gain table information.
41607      */
41608 } wmi_enhanced_aoa_caps_param;
41609 
41610 typedef struct {
41611     /** TLV tag and len; tag equals
41612      * WMITLV_TAG_STRUC_wmi_enhanced_aoa_per_band_caps_param */
41613     A_UINT32 tlv_header;
41614 
41615     /* Band information - WMI_AOA_SUPPORTED_BANDS */
41616     A_UINT32 band_info;
41617 
41618     /* 2 bytes are used to store agc max number of elements in each gain tables */
41619     A_UINT32 max_agc_gain[WMI_AOA_NUM_WORD_ENTRIES_FOR_MAX_NUM_AGC_TBL_ELEMS];
41620 } wmi_enhanced_aoa_per_band_caps_param;
41621 
41622 /* WMI_HALPHY_CAL_LIST:
41623  *
41624  * Below is the list of HALPHY online CAL currently enabled in
41625  * WIN chipsets
41626  */
41627 typedef enum {
41628     WMI_HALPHY_CAL_ADC = 0,
41629     WMI_HALPHY_CAL_BWFILTER,
41630     WMI_HALPHY_CAL_PDET_AND_PAL,
41631     WMI_HALPHY_CAL_RXDCO,
41632     WMI_HALPHY_CAL_COMB_TXLO_TXIQ_RXIQ,
41633     WMI_HALPHY_CAL_IBF,
41634     WMI_HALPHY_CAL_PA_DROOP,
41635     WMI_HALPHY_CAL_DAC,
41636     WMI_HALPHY_CAL_ANI,
41637     WMI_HALPHY_CAL_NOISE_FLOOR,
41638 
41639     WMI_HALPHY_CAL_MAX_CAL_LIST
41640 } WMI_HALPHY_CAL_LIST;
41641 
41642 /* WMI_HALPHY_CAL_VALID_BITMAP_STATUS
41643  *
41644  * In WMI wmi_pdev_get_halphy_cal_status_evt_fixed_param
41645  * (halphy_cal_valid_bmap member), below enum list must be used
41646  * to get which calibration status indication is sent by FW to HOST.
41647  * Only if that particular bit it set, corresponding bit of the
41648  * halphy_cal_status variable will be valid.
41649  */
41650 typedef enum {
41651     WMI_HALPHY_CAL_ADC_BMAP                 = (1 << WMI_HALPHY_CAL_ADC),
41652     WMI_HALPHY_CAL_BWFILTER_BMAP            = (1 << WMI_HALPHY_CAL_BWFILTER),
41653     WMI_HALPHY_CAL_PDET_AND_PAL_BMAP        = (1 << WMI_HALPHY_CAL_PDET_AND_PAL),
41654     WMI_HALPHY_CAL_RXDCO_BMAP               = (1 << WMI_HALPHY_CAL_RXDCO),
41655     WMI_HALPHY_CAL_COMB_TXLO_TXIQ_RXIQ_BMAP = (1 << WMI_HALPHY_CAL_COMB_TXLO_TXIQ_RXIQ),
41656     WMI_HALPHY_CAL_IBF_BMAP                 = (1 << WMI_HALPHY_CAL_IBF),
41657     WMI_HALPHY_CAL_PA_DROOP_BMAP            = (1 << WMI_HALPHY_CAL_PA_DROOP),
41658     WMI_HALPHY_CAL_DAC_BMAP                 = (1 << WMI_HALPHY_CAL_DAC),
41659     WMI_HALPHY_CAL_ANI_BMAP                 = (1 << WMI_HALPHY_CAL_ANI),
41660     WMI_HALPHY_CAL_NOISE_FLOOR_BMAP         = (1 << WMI_HALPHY_CAL_NOISE_FLOOR),
41661 } WMI_HALPHY_CAL_VALID_BITMAP_STATUS;
41662 
41663 typedef struct {
41664     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_halphy_cal_status_evt_fixed_param  */
41665     A_UINT32 pdev_id;       /* PDEV Id set by the command */
41666 
41667     /*
41668      * Calibration valid bitmap from HALPHY, refer to
41669      * WMI_HALPHY_CAL_VALID_BITMAP_STATUS.
41670      * Only if this particular bit it set, corresponding bit of the
41671      * halphy_cal_status variable will be valid.
41672      */
41673     A_UINT32 halphy_cal_valid_bmap;
41674 
41675     /* Calibration result status bitmap from HALPHY.
41676      * The WMI_HALPHY_CAL_VALID_BITMAP_STATUS enum identifies which bit
41677      * in the bitmap corresponds to which cal type.
41678      * Each valid bit uses the following settings:
41679      *     1 - SUCCESS
41680      *     0 - FAILURE
41681     */
41682     A_UINT32 halphy_cal_status;
41683 } wmi_pdev_get_halphy_cal_status_evt_fixed_param;
41684 
41685 typedef struct {
41686     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_halphy_cal_bmap_cmd_fixed_param */
41687     A_UINT32 pdev_id;       /* PDEV ID set by the command */
41688 
41689     /*
41690      * Calibration valid bitmap from HOST, refer to
41691      * WMI_HALPHY_CAL_VALID_BITMAP_STATUS.
41692      * Based on the bitmap value, HALPHY will set corresponding mask values
41693      * to each of the online calibrations
41694      */
41695     A_UINT32 online_halphy_cals_bmap;
41696 
41697     /* Calibration enable/disable support for home/scan channel
41698      *     0 - home channel
41699      *     1 - scan channel
41700      *     2 - both home and scan channel
41701      */
41702     A_UINT32 home_scan_channel;
41703 } wmi_pdev_set_halphy_cal_bmap_cmd_fixed_param;
41704 
41705 typedef struct {
41706     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_halphy_cal_bmap_evt_fixed_param */
41707     A_UINT32 pdev_id;       /* PDEV Id set by the command */
41708 
41709     /* Status indication for calibration
41710      *     0 - SUCCESS
41711      *     1 - FAIL
41712      * This WMI command will by sent from HOST dynamically but only one
41713      * at a time. So no need of cookie/request handshake.
41714      */
41715     A_UINT32 status;
41716 } wmi_pdev_set_halphy_cal_bmap_evt_fixed_param;
41717 
41718 /* below structures are related to Motion Detection. */
41719 typedef struct {
41720     /** TLV tag and len; tag equals
41721      *  WMITLV_TAG_STRUC_wmi_motion_det_config_params_cmd_fixed_param */
41722     A_UINT32 tlv_header;         /** TLV Header */
41723     A_UINT32 vdev_id;            /** Vdev ID */
41724     A_UINT32 time_t1;            /** Time gap of successive bursts of
41725                                   * measurement frames during coarse
41726                                   * motion detection (in ms) */
41727     A_UINT32 time_t2;            /** Time gap of successive bursts of
41728                                   * measurement frames during fine
41729                                   * motion detection (in ms) */
41730     A_UINT32 n1;                 /** number of measurement frames in one
41731                                   * burst, for coarse detection */
41732     A_UINT32 n2;                 /** number of measurement frames in one
41733                                   * burst, for fine detection */
41734     A_UINT32 time_t1_gap;        /** gap between measurement frames in
41735                                   * course detection (in ms) */
41736     A_UINT32 time_t2_gap;        /** gap between measurement frames in
41737                                   * fine detection (in ms) */
41738     A_UINT32 coarse_K;           /** number of times motion detection has to
41739                                   * be performed for coarse detection */
41740     A_UINT32 fine_K;             /** number of times motion detection has to
41741                                   * be performed for fine detection */
41742     A_UINT32 coarse_Q;           /** number of times motion is expected
41743                                   * to be detected for success case in
41744                                   * coarse detection */
41745     A_UINT32 fine_Q;             /** number of times motion is expected
41746                                   * to be detected for success case in
41747                                   * fine detection */
41748     A_UINT32 md_coarse_thr_high; /** higher threshold value (in percent)
41749                                   * from host to FW, which will be used in
41750                                   * coarse detection phase of motion detection.
41751                                   * This is the threshold for the correlation
41752                                   * of the old RF local-scattering environment
41753                                   * with the current RF local-scattering
41754                                   * environment.  A value of 100(%) indicates
41755                                   * that neither the transceiver nor any
41756                                   * nearby objects have changed position. */
41757     A_UINT32 md_fine_thr_high;   /** higher threshold value (in percent)
41758                                   * from host to FW, which will be used in
41759                                   * fine detection phase of motion detection.
41760                                   * This is the threshold for correlation
41761                                   * between the old and current RF environments,
41762                                   * as explained above. */
41763     A_UINT32 md_coarse_thr_low;  /** lower threshold value (in percent)
41764                                   * for immediate detection of motion in
41765                                   * coarse detection phase.
41766                                   * This is the threshold for correlation
41767                                   * between the old and current RF environments,
41768                                   * as explained above. */
41769     A_UINT32 md_fine_thr_low;    /** lower threshold value (in percent)
41770                                   * for immediate detection of motion in
41771                                   * fine detection phase.
41772                                   * This is the threshold for correlation
41773                                   * between the old and current RF environments,
41774                                   * as explained above. */
41775 } wmi_motion_det_config_params_cmd_fixed_param;
41776 
41777 typedef struct {
41778     /** TLV tag and len; tag equals
41779      *  WMITLV_TAG_STRUC_wmi_motion_det_base_line_config_params_cmd_fixed_param */
41780     A_UINT32 tlv_header;    /** TLV Header */
41781     A_UINT32 vdev_id;       /** Vdev ID */
41782     A_UINT32 bl_time_t;     /** time T for baseline (in ms)
41783                              * Every bl_time_t, bl_n packets are sent */
41784     A_UINT32 bl_packet_gap; /** gap between measurement frames for baseline
41785                              * (in ms) */
41786     A_UINT32 bl_n;          /** number of measurement frames to be sent
41787                              * during one baseline */
41788     A_UINT32 bl_num_meas;   /** number of times the baseline measurement
41789                              * to be done */
41790 } wmi_motion_det_base_line_config_params_cmd_fixed_param;
41791 
41792 typedef struct {
41793     /** TLV tag and len; tag equals
41794      *  WMITLV_TAG_STRUC_wmi_motion_det_start_stop_cmd_fixed_param */
41795     A_UINT32 tlv_header; /** TLV Header */
41796     A_UINT32 vdev_id;    /** Vdev ID */
41797     A_UINT32 enable;     /** start = 1, stop =0 */
41798 } wmi_motion_det_start_stop_cmd_fixed_param;
41799 
41800 typedef struct {
41801     /** TLV tag and len; tag equals
41802      *  WMITLV_TAG_STRUC_wmi_motion_det_base_line_start_stop_cmd_fixed_param */
41803     A_UINT32 tlv_header; /** TLV Header */
41804     A_UINT32 vdev_id;    /** Vdev ID */
41805     A_UINT32 enable;     /** start = 1, stop =0 */
41806 } wmi_motion_det_base_line_start_stop_cmd_fixed_param;
41807 
41808 typedef struct {
41809     /** TLV tag and len; tag equals
41810      *  WMITLV_TAG_STRUC_wmi_motion_det_event */
41811     A_UINT32 tlv_header; /** TLV Header */
41812     A_UINT32 vdev_id;    /** Vdev ID */
41813     A_UINT32 status;     /** status = 1 -> motion detected */
41814 } wmi_motion_det_event;
41815 
41816 typedef struct {
41817     /** TLV tag and len; tag equals
41818      *  WMITLV_TAG_STRUC_wmi_motion_det_base_line_event */
41819     A_UINT32 tlv_header;           /** TLV Header */
41820     A_UINT32 vdev_id;              /** Vdev ID */
41821     A_UINT32 bl_baseline_value;    /** baseline correlation value calculated
41822                                     * during baselining phase (in %) */
41823     A_UINT32 bl_max_corr_reserved; /** max corr value obtained during baselining
41824                                     * phase (in %); reserved for future */
41825     A_UINT32 bl_min_corr_reserved; /** min corr value obtained during baselining
41826                                     * phase (in %); reserved for future */
41827 } wmi_motion_det_base_line_event;
41828 
41829 /* Below structures are related to OBSS_PD_SPATIAL Reuse */
41830 typedef struct {
41831     /** TLV tag and len; tag equals
41832     * WMITLV_TAG_STRUC_wmi_obss_set_cmd_fixed_param */
41833     A_UINT32 tlv_header;
41834     /** Enable/Disable Spatial Reuse */
41835     A_UINT32 enable;
41836     /*
41837      * In the below fields, "OBSS level" refers to the power of the
41838      * signals received from "Other BSS".
41839      * Spatial reuse will only be permitted if the Other BSS's signal power
41840      * is within the min to max range specified by the below fields.
41841      */
41842     /** Minimum OBSS level to use */
41843     A_INT32 obss_min; /* RSSI in dBm */
41844     /** Maximum OBSS level to use */
41845     A_INT32 obss_max; /* RSSI in dBm */
41846     /** Vdev id*/
41847     A_UINT32 vdev_id;
41848 } wmi_obss_spatial_reuse_set_cmd_fixed_param;
41849 
41850 /*
41851  * Below structure is related to WMI CMD that configures the default
41852  * minimum (OBSS_MIN) and maximum (OBSS_MAX) Other BSS levels (RSSI in dBm)
41853  * for VDEV of a give type (STA or AP). These thresholds are configured
41854  * within the Host and passed down to the FW. FW will use these
41855  * default OBSS_MIN and OBSS_MAX values during roaming if the assoc response
41856  * from the AP does not include spatial reuse parameter set Info Element.
41857  */
41858 typedef struct {
41859     /** TLV tag and len; tag equals
41860     *   WMITLV_TAG_STRUC_wmi_obss_spatial_reuse_set_def_obss_thresh_cmd_fixed_param
41861     */
41862     A_UINT32 tlv_header;
41863     /*
41864      * In the below fields, "OBSS level" refers to the power of the
41865      * signals received from "Other BSS".
41866      * Spatial reuse will only be permitted if the Other BSS's signal power
41867      * is within the min to max range specified by the below fields.
41868      */
41869     /** Minimum OBSS level to use */
41870     A_INT32 obss_min; /* RSSI in dBm */
41871     /** Maximum OBSS level to use */
41872     A_INT32 obss_max; /* RSSI in dBm */
41873     /** Type of VDEV for which these threshold are applicable.
41874      *  vdev_type should be one of WMI_VDEV_TYPE_STA or WMI_VDEV_TYPE_AP
41875      */
41876     A_UINT32 vdev_type;
41877 } wmi_obss_spatial_reuse_set_def_obss_thresh_cmd_fixed_param;
41878 
41879 typedef struct {
41880     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUCT_wmi_chan_width_peer_list */
41881     wmi_mac_addr peer_macaddr;
41882     A_UINT32 chan_width; /* wmi_channel_width */
41883     A_UINT32 puncture_20mhz_bitmap; /* per peer wmi puncture_bitmap,
41884                                      * each bit indicates one 20 MHz BW
41885                                      * punctured.
41886                                      * This variable should be read from left,
41887                                      * LSb will point to the lowest-frequency
41888                                      * 20 MHz frequency slice.
41889                                      * bit value:
41890                                      *     0 - 20 MHz BW is punctured
41891                                      *     1 - not punctured
41892                                      */
41893 } wmi_chan_width_peer_list;
41894 
41895 #define WMI_PEER_CHAN_WIDTH_SWITCH_SET_VALID_VDEV_ID(comp) WMI_SET_BITS(comp, 31,1, 1)
41896 #define WMI_PEER_CHAN_WIDTH_SWITCH_GET_VALID_VDEV_ID(comp) WMI_GET_BITS(comp, 31, 1)
41897 
41898 #define WMI_PEER_CHAN_WIDTH_SWITCH_SET_VALID_PUNCTURE_BITMAP(comp) WMI_SET_BITS(comp, 30, 1, 1)
41899 #define WMI_PEER_CHAN_WIDTH_SWITCH_GET_VALID_PUNCTURE_BITMAP(comp) WMI_GET_BITS(comp, 30, 1)
41900 
41901 /* bits 29:8 currently unused */
41902 
41903 #define WMI_PEER_CHAN_WIDTH_SWITCH_SET_VDEV_ID(comp, value) WMI_SET_BITS(comp, 0, 8, value)
41904 #define WMI_PEER_CHAN_WIDTH_SWITCH_GET_VDEV_ID(comp) WMI_GET_BITS(comp, 0, 8)
41905 
41906 typedef struct {
41907     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_chan_width_switch_cmd_fixed_param */
41908     A_UINT32 num_peers;
41909     /* vdev_var:
41910      * The MSb (bit 31) indicates that the vdev_id is valid.
41911      * Bit 30 indicates that the puncture bitmap is valid.
41912      * The LSB (bits 0-7) is used to infer the actual vdev_id.
41913      * The other bits can be used for future enhancements.
41914      */
41915     A_UINT32 vdev_var;
41916     /*
41917      * Following this structure is the TLV:
41918      * struct wmi_chan_width_peer_list chan_width_peer_info[num_peers];
41919      */
41920 } wmi_peer_chan_width_switch_cmd_fixed_param;
41921 
41922 #define WMI_PEER_BULK_SET_VDEV_ID(comp, value) WMI_SET_BITS(comp, 0, 8, value)
41923 #define WMI_PEER_BULK_GET_VDEV_ID(comp) WMI_GET_BITS(comp, 0, 8)
41924 /* bits 30:8 currently unused */
41925 #define WMI_PEER_BULK_SET_VALID_VDEV_ID(comp) WMI_SET_BITS(comp, 31, 1, 1)
41926 #define WMI_PEER_BULK_GET_VALID_VDEV_ID(comp) WMI_GET_BITS(comp, 31, 1)
41927 
41928 typedef struct {
41929      A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUCT_wmi_peer_list */
41930      wmi_mac_addr peer_macaddr;
41931      /** parameter id */
41932      A_UINT32 param_id;
41933      A_UINT32 param_value;
41934 } wmi_peer_list;
41935 
41936 /* WMI_PEER_BULK_SET_CMDID */
41937 typedef struct {
41938     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_bulk_set_cmd_fixed_param */
41939     /* vdev_var:
41940      * The MSb (bit 31) indicates that the vdev_id is valid.
41941      * The LSB (bits 0-7) is used to infer the actual vdev_id.
41942      * The other bits can be used for future enhancements.
41943      */
41944     A_UINT32 vdev_var;
41945 
41946     /*
41947      * Following this structure is the TLV array:
41948      *     struct wmi_peer_list peer_info[];
41949      */
41950 } wmi_peer_bulk_set_cmd_fixed_param;
41951 
41952 typedef struct {
41953     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_he_tb_action_frm_cmd_fixed_param */
41954     A_UINT32 tlv_header;
41955     /* enable or disable HE TB Action frame */
41956     A_UINT32 enable;
41957     /* length of action frame body in bytes */
41958     A_UINT32 data_len;
41959 /* This TLV is followed by another TLV of array of bytes
41960  * A_UINT8 data[];
41961  * This data array contains the action frame raw data
41962  */
41963 } wmi_pdev_he_tb_action_frm_cmd_fixed_param;
41964 
41965 typedef struct {
41966     /** TLV tag and len; tag equals
41967      *  WMITLV_TAG_STRUC_wmi_hpcs_pulse_start_cmd_fixed_param */
41968     A_UINT32 tlv_header;            /** TLV Header */
41969     A_UINT32 vdev_id;               /** Vdev ID */
41970     A_UINT32 start;                 /** Start/Stop */
41971     A_UINT32 sync_time;             /** Lower 32-bit of the TSF at which the
41972                                      * pulse should be synced. */
41973     A_UINT32 pulse_interval;        /** Periodicity of pulses in micro seconds */
41974     A_UINT32 active_sync_period;    /** Number of beacons to sync before generating
41975                                      * pulse in units of beacon interval.
41976                                      * Valid for clock slaves only. */
41977     A_UINT32 gpio_pin;              /** GPIO Pin number to be used */
41978     A_UINT32 pulse_width;           /** Duration of pulse in micro seconds */
41979 } wmi_hpcs_pulse_start_cmd_fixed_param;
41980 
41981 typedef struct {
41982      /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_muedca_params_config_event_fixed_param */
41983      A_UINT32 tlv_header;                          /** TLV Header */
41984      A_UINT32 pdev_id;
41985      /*
41986       * The following per-AC arrays are indexed using the
41987       * WMI_AC_xxx / wmi_traffic_ac enum values.
41988       */
41989      /* aifsn
41990       * Arbitration inter frame spacing number (AIFSN)
41991       * Values are integers used for back off computation.
41992       */
41993      A_UINT32 aifsn[WMI_AC_MAX];
41994      /* ecwmin
41995       * Exponent form of ContentionWindow min (ECWmin)
41996       * Values are integers used for back off computation.
41997       */
41998      A_UINT32 ecwmin[WMI_AC_MAX];
41999      /* ecwmax
42000       * Exponent form of ContentionWindow max (ECWmax)
42001       * Values are integers used for back off computation.
42002       */
42003      A_UINT32 ecwmax[WMI_AC_MAX];
42004      /* muedca_expiration_time
42005       * MU EDCA Expiration time refers to the length of time after the most
42006       * recent UL trigger time. The MU EDCA Timer field indicates the time
42007       * limit, in units of 8 TUs
42008       */
42009      A_UINT32 muedca_expiration_time[WMI_AC_MAX];
42010  } wmi_muedca_params_config_event_fixed_param;
42011 
42012 /* Default PE Duration subfield indicates the PE duration in units of 4 us */
42013 #define WMI_HEOPS_DEFPE_GET_D3(he_ops) WMI_GET_BITS(he_ops, 0, 3)
42014 #define WMI_HEOPS_DEFPE_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 0, 3, value)
42015 
42016 /* TWT required */
42017 #define WMI_HEOPS_TWT_REQUIRED_GET_D3(he_ops) WMI_GET_BITS(he_ops, 3, 1)
42018 #define WMI_HEOPS_TWT_REQUIRED_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 3, 1, value)
42019 
42020 /* RTS threshold in units of 32 us,0 - always use RTS 1023 - this is disabled */
42021 #define WMI_HEOPS_RTSTHLD_GET_D3(he_ops) WMI_GET_BITS(he_ops, 4, 10)
42022 #define WMI_HEOPS_RTSTHLD_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 4, 10, value)
42023 
42024 /* VHT Operation Information Present */
42025 #define WMI_HEOPS_VHTOPSPRSNT_GET_D3(he_ops) WMI_GET_BITS(he_ops, 14, 1)
42026 #define WMI_HEOPS_VHTOPSPRSNT_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 14, 1, value)
42027 
42028 /* Co-Located BSS */
42029 #define WMI_HEOPS_COLOCBSS_GET_D3(he_ops) WMI_GET_BITS(he_ops, 15, 1)
42030 #define WMI_HEOPS_COLOCBSS_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 15, 1, value)
42031 
42032 /* ER SU Disable */
42033 #define WMI_HEOPS_ERSUDIS_GET_D3(he_ops) WMI_GET_BITS(he_ops, 16, 1)
42034 #define WMI_HEOPS_ERSUDIS_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 16, 1, value)
42035 
42036 /* bit17 - bit23 are reserved */
42037 
42038 /* BSS color */
42039 #define WMI_HEOPS_COLOR_GET_D3(he_ops) WMI_GET_BITS(he_ops, 24, 6)
42040 #define WMI_HEOPS_COLOR_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 24, 6, value)
42041 
42042 /* Partial BSS Color field indicates whether BSS applies an AID assignment rule using partial BSS color bits */
42043 #define WMI_HEOPS_PARTBSSCOLOR_GET_D3(he_ops) WMI_GET_BITS(he_ops, 30, 1)
42044 #define WMI_HEOPS_PARTBSSCOLOR_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 30, 1, value)
42045 
42046 /* when set to 1 disables use of BSS color */
42047 #define WMI_HEOPS_BSSCOLORDISABLE_GET_D3(he_ops) WMI_GET_BITS(he_ops, 31, 1)
42048 #define WMI_HEOPS_BSSCOLORDISABLE_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 31, 1, value)
42049 
42050 /* PHY Capabilities Information field */
42051 
42052 
42053 /* bit 0 reserved */
42054 
42055 /*
42056  * B0: Indicates STA support 40 MHz channel width in 2.4 GHz
42057  * B1: Indicates STA support 40 MHz and 80 MHz channel width in 5 GHz
42058  * B2: Indicates STA supports 160 MHz channel width in 5 GHz
42059  * B3: Indicates STA supports 160/80+80 MHz channel width in 5 GHz
42060  * B4: If B1 is set to 0, then B5 indicates support of 242/106/52/26-tone
42061  *     RU mapping in 40 MHz channel width in 2.4 GHz. Otherwise Reserved.
42062  * B5: If B2, B3, and B4 are set to 0, then B6 indicates support of
42063  *     242-tone RU mapping in 40 MHz and 80
42064  * MHz channel width in 5 GHz. Otherwise Reserved.
42065  * B6: Reserved
42066  */
42067 #define WMI_HECAP_PHY_CBW_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 1, 7)
42068 #define WMI_HECAP_PHY_CBW_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 1, 7, value)
42069 
42070 /*
42071  * B0: Indicates STA supports reception of preamble puncturing in 80 MHz,
42072  *     where in the preamble only the secondary 20 MHz is punctured
42073  * B1: Indicates STA supports reception of preamble puncturing in 80 MHz,
42074  *     where in the preamble only one of the two 20 MHz sub-channels in the
42075  *     secondary 40 MHz is punctured
42076  * B2: Indicates STA supports reception of preamble puncturing in 160 MHz
42077  *     or 80+80 MHz, where in the primary 80 MHz of the preamble only the
42078  *     secondary 20 MHz is punctured
42079  * B3: Indicates STA supports reception of preamble puncturing in 160 MHz
42080  *     or 80+80 MHz, where in the primary 80 MHz of the preamble, the
42081  *     primary 40 MHz is present
42082  */
42083 #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 8, 4)
42084 #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 8, 4, value)
42085 
42086 /* Indicates transmitting STA is a Class A (1) or a Class B (0) device */
42087 #define WMI_HECAP_PHY_COD_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 12, 1)
42088 #define WMI_HECAP_PHY_COD_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 12, 1, value)
42089 
42090 /* Indicates support of transmission and reception of LDPC encoded packets */
42091 #define WMI_HECAP_PHY_LDPC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 13, 1)
42092 #define WMI_HECAP_PHY_LDPC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 13, 1, value)
42093 
42094 /*
42095  * B0: Indicates support of reception of 1x LTF and 0.8us guard interval duration for HE SU PPDUs.
42096  */
42097 #define WMI_HECAP_PHY_LTFGIFORHE_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 14, 1)
42098 #define WMI_HECAP_PHY_LTFGIFORHE_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 14, 1, value)
42099 
42100 /*
42101  * If the Doppler Rx subfield is 1, indicates the maximum number of space-time streams supported for reception
42102  *     when a midamble is present in the Data field.
42103  * If the Doppler Tx subfield is 1, indicates the maximum number of space-time streams supported for transmission
42104  *     when a midamble is present in the Data field.
42105  * If both Doppler Rx and Doppler Tx subfields are 1, indicates the maximum number of space-time streams
42106  *     supported for transmission and reception when a midamble is present in the Data field.
42107  */
42108 #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 15, 2)
42109 #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 15, 2, value)
42110 
42111 /*
42112  * B0: For a transmitting STA acting as beamformee, it indicates support of
42113  *     NDP reception using 4x LTF and 3.2 us guard interval duration
42114  */
42115 #define WMI_HECAP_PHY_LTFGIFORNDP_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 17, 1)
42116 #define WMI_HECAP_PHY_LTFGIFORNDP_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 17, 1, value)
42117 
42118 /*
42119  * indicates support for the transmission of an HE TB PPDU that has a
42120  * bandwidth less than or equal to 80 MHz and is using STBC and with
42121  * one spatial stream
42122  */
42123 #define WMI_HECAP_PHY_TXSTBC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 18, 1)
42124 #define WMI_HECAP_PHY_TXSTBC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 18, 1, value)
42125 
42126 /* indicates support for the reception of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx */
42127 #define WMI_HECAP_PHY_RXSTBC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 19, 1)
42128 #define WMI_HECAP_PHY_RXSTBC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 19, 1, value)
42129 
42130 /* indicates transmitting STA supports transmitting HE PPDUs with Doppler procedure */
42131 #define WMI_HECAP_PHY_TXDOPPLER_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 20, 1)
42132 #define WMI_HECAP_PHY_TXDOPPLER_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 20, 1, value)
42133 
42134 /* indicates transmitting STA supports receiving HE PPDUs with Doppler procedure */
42135 #define WMI_HECAP_PHY_RXDOPPLER_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 21, 1)
42136 #define WMI_HECAP_PHY_RXDOPPLER_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 21, 1, value)
42137 
42138 /*
42139  * If the transmitting STA is an AP:
42140  *     indicates STA supports of reception of full bandwidth UL MU-MIMO
42141  *     transmission.
42142  * If the transmitting STA is a non-AP STA:
42143  *     indicates STA supports of transmission of full bandwidth UL MU-MIMO
42144  *     transmission.
42145  */
42146 #define WMI_HECAP_PHY_UL_MU_MIMO_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 22, 1)
42147 #define WMI_HECAP_PHY_UL_MU_MIMO_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 22, 1, value)
42148 
42149 /*
42150  * If the transmitting STA is an AP:
42151  *     indicates STA supports of reception of UL MUMIMO transmission on an
42152  *     RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
42153  * If the transmitting STA is a non-AP STA:
42154  *     indicates STA supports of transmission of UL MU-MIMO transmission on an
42155  *     RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
42156  */
42157 #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 23, 1)
42158 #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 23, 1, value)
42159 
42160 /* Tx DCM
42161  * B0:B1
42162  *     00: Does not support DCM
42163  *     01: BPSK
42164  *     10: QPSK
42165  *     11: 16-QAM
42166  * B2 signals maximum number of spatial streams with DCM
42167  *     0: 1 spatial stream
42168  *     1: 2 spatial streams
42169  */
42170 #define WMI_HECAP_PHY_DCMTX_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 24, 3)
42171 #define WMI_HECAP_PHY_DCMTX_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 24, 3, value)
42172 
42173 /* Rx DCM
42174  * B0:B1
42175  *     00: Does not support DCM
42176  *     01: BPSK
42177  *     10: QPSK
42178  *     11: 16-QAM
42179  * B2 signals maximum number of spatial streams with DCM
42180  *     0: 1 spatial stream
42181  *     1: 2 spatial streams
42182  */
42183 #define WMI_HECAP_PHY_DCMRX_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 27, 3)
42184 #define WMI_HECAP_PHY_DCMRX_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 27, 3, value)
42185 
42186 
42187 /*
42188  * Indicates that the STA supports the reception of an HE MU PPDU payload
42189  * over full bandwidth and partial bandwidth (106-tone RU within 20 MHz).
42190  */
42191 #define WMI_HECAP_PHY_ULHEMU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 30, 1)
42192 #define WMI_HECAP_PHY_ULHEMU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 30, 1, value)
42193 
42194 /* Indicates support for operation as an SU beamformer */
42195 #define WMI_HECAP_PHY_SUBFMR_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 31, 1)
42196 #define WMI_HECAP_PHY_SUBFMR_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 31, 1, value)
42197 
42198 /* Indicates support for operation as an SU beamformee */
42199 #define WMI_HECAP_PHY_SUBFME_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 0, 1)
42200 #define WMI_HECAP_PHY_SUBFME_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 0, 1, value)
42201 
42202 /* Indicates support for operation as an MU Beamformer */
42203 #define WMI_HECAP_PHY_MUBFMR_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 1, 1)
42204 #define WMI_HECAP_PHY_MUBFMR_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 1, 1, value)
42205 
42206 /*
42207  * Num STS -1 for <= 80MHz (min val 3)
42208  * The maximum number of space-time streams minus 1 that the STA can
42209  * receive in an HE NDP
42210  */
42211 #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 2, 3)
42212 #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 2, 3, value)
42213 
42214 
42215 /*
42216  * Num STS -1 for > 80MHz (min val 3)
42217  * The maximum number of space-time streams minus 1 that the STA can
42218  * receive in an HE NDP
42219  */
42220 #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
42221 #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
42222 
42223 
42224 /*
42225  * Number Of Sounding Dimensions For <= 80 MHz
42226  * If SU beamformer capable, set to the maximum supported value of the
42227  * TXVECTOR parameter NUM_STS minus 1.
42228  * Otherwise, reserved.
42229  */
42230 #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
42231 #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
42232 
42233 /*
42234  * Number Of Sounding Dimensions For > 80 MHz
42235  * If SU beamformer capable, set to the maximum supported value of the
42236  * TXVECTOR parameter NUM_STS minus 1.
42237  * Otherwise, reserved.
42238  */
42239 #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 11, 3)
42240 #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 11, 3, value)
42241 
42242 /*
42243  * Indicates if the HE beamformee is capable of feedback with tone
42244  * grouping of 16 in the HE Compressed Beamforming Report field for
42245  * a SU-type feedback.
42246  */
42247 #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 14, 1)
42248 #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 14, 1, value)
42249 
42250 /*
42251  * Indicates if the HE beamformee is capable of feedback with tone
42252  * grouping of 16 in the HE Compressed Beamforming Report field for
42253  * a MU-type feedback.
42254  */
42255 #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 15, 1)
42256 #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 15, 1, value)
42257 
42258 /*
42259  * Indicates if HE beamformee is capable of feedback with codebook
42260  * size {4, 2} in the HECompressed Beamforming Report field for
42261  * a SU-type feedback.
42262  */
42263 #define WMI_HECAP_PHY_CODBK42SU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 16, 1)
42264 #define WMI_HECAP_PHY_CODBK42SU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 16, 1, value)
42265 
42266 /*
42267  * Indicates if HE beamformee is capable of feedback with codebook
42268  * size {7, 5} in the HE Compressed Beamforming Report field for
42269  * a MU-type feedback.
42270  */
42271 #define WMI_HECAP_PHY_CODBK75MU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 17, 1)
42272 #define WMI_HECAP_PHY_CODBK75MU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 17, 1, value)
42273 
42274 /*
42275  * Beamforming Feedback With Trigger Frame
42276  * If the transmitting STA is an AP STA:
42277  * B0: indicates support of reception of SU-Type partial(1) and full bandwidth feedback(0)
42278  * B1: indicates support of reception of MU-Type partial(1) bandwidth feedback
42279  * B2: indicates support of reception of CQI-Only partial and full bandwidth feedback
42280  * If the transmitting STA is a non-AP STA:
42281  * B0: indicates support of transmission of SU-Type partial(1) and full bandwidth(0) feedback
42282  * B1: indicates support of transmission of MU-Type partial(1) bandwidth feedback
42283  * B2: indicates support of transmission of CQI-Onlypartial (1)and full bandwidth feedback
42284  */
42285 #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 18, 3)
42286 #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 18, 3, value)
42287 
42288 /* Indicates the support of transmission and reception of an HE extended range SU PPDU payload transmitted
42289  * over the right 106-tone RU or partial BW ER
42290  */
42291 #define WMI_HECAP_PHY_HEERSU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 21, 1)
42292 #define WMI_HECAP_PHY_HEERSU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 21, 1, value)
42293 
42294 /* Indicates that the non-AP STA supports reception of a DL MU-MIMO transmission on an RU in an HE MU PPDU
42295  * where the RU does not span the entire PPDU bandwidth.
42296  */
42297 #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 22, 1)
42298 #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 22, 1, value)
42299 
42300 /* Indicates whether or not the PPE Threshold field is present */
42301 #define WMI_HECAP_PHY_PETHRESPRESENT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 23, 1)
42302 #define WMI_HECAP_PHY_PETHRESPRESENT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 23, 1, value)
42303 
42304 /* Indicates that the STA supports SRP-based SR operation */
42305 #define WMI_HECAP_PHY_SRPSPRESENT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 24, 1)
42306 #define WMI_HECAP_PHY_SRPPRESENT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 24, 1, value)
42307 
42308 /* Indicates that the STA supports a power boost factor ar for the r-th RU in the range [0.5, 2] */
42309 #define WMI_HECAP_PHY_PWRBOOSTAR_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 25, 1)
42310 #define WMI_HECAP_PHY_PWRBOOSTAR_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 25, 1, value)
42311 
42312 /* Indicates support for the reception of 4x LTF and 0.8us guard interval duration for HE SU PPDUs. */
42313 #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 26, 1)
42314 #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 26, 1, value)
42315 
42316 /* For a transmitting STA acting as a beamformee, it indicates the maximum Nc for beamforming sounding
42317  * feedback supported If SU beamformee capable, then set to the maximum Nc for beamforming sounding feedback
42318  * minus 1. Otherwise, reserved.
42319  */
42320 #define WMI_HECAP_PHY_MAXNC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 27, 3)
42321 #define WMI_HECAP_PHY_MAXNC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 27, 3, value)
42322 
42323 /* Indicates support for the transmission of an HE PPDU that has a bandwidth greater than 80 MHz and is using
42324  * STBC with one spatial stream
42325  */
42326 #define WMI_HECAP_PHY_STBCTXGT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 30, 1)
42327 #define WMI_HECAP_PHY_STBCTXGT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 30, 1, value)
42328 
42329 /* Indicates support for the reception of an HE PPDU that has a bandwidth greater than 80 MHz and is using
42330  * STBC with one spatial stream
42331  */
42332 #define WMI_HECAP_PHY_STBCRXGT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 31, 1)
42333 #define WMI_HECAP_PHY_STBCRXGT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 31, 1, value)
42334 
42335 /* Indicates support for the reception of an HE ER SU PPDU with 4x LTF and 0.8 us guard interval duration */
42336 #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 0, 1)
42337 #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 0, 1, value)
42338 
42339 /*
42340  * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
42341  * receiver of a 40 MHz HE MU PPDU in 2.4 GHz band, or the transmitter of a 40 MHz HE TB PPDU in 2.4GHz band.
42342  */
42343 #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 1, 1)
42344 #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 1, 1, value)
42345 
42346 /*
42347  * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
42348  * receiver of a 80+80 MHz or a 160 MHz HE MU PPDU, or the transmitter of a 80+80 MHz or 160 MHz HE TB PPDU.
42349  */
42350 #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 2, 1)
42351 #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 2, 1, value)
42352 
42353 /*
42354  * Indicates supports of 160 MHz OFDMA for a non-AP HE STA that sets bit B1 of Channel Width Set to 1, and
42355  * sets B2 and B3 of Channel Width Set each to 0, when operating with 80 MHz channel width. The capability
42356  * bit is applicable while receiving a 80+80 MHz or a 160 MHz HE MU PPDU, or transmitting a 80+80 MHz or a
42357  * 160 MHz HE TB PPDU.
42358  */
42359 #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 3, 1)
42360 #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 3, 1, value)
42361 
42362 /* Indicates support for the reception of an HE ER SU PPDU with 1x LTF and 0.8 us guard interval duration */
42363 #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 4, 1)
42364 #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 4, 1, value)
42365 
42366 /*
42367  * If the Doppler Rx subfield is 1, indicates support for receiving midambles with 2x HE-LTF, 1x HE-LTF in
42368  * HE SU PPDU if the HE SU PPDU With 1x HE-LTF And 0.8 s GI subfield is set to 1, and 1x HE-LTF in
42369  * HE ER SU PPDU if the HE ER SU PPDU With 1x HELTF And 0.8 s GI subfield is set to 1.
42370  *
42371  * If the Doppler Tx subfield is 1, indicates support for transmitting midambles with 2x HE-LTF, 1x HE-LTF
42372  * in HE TB PPDU when allowed.
42373 
42374  * If both the Doppler Rx and Doppler Tx subfields are 1, indicates support for receiving midambles with 2x HELTF,
42375  * 1x HE-LTF in HE SU PPDU if the HE SU PPDU With 1x HE-LTF And 0.8 s GI subfield is set to 1, and
42376  * 1x HE-LTF in HE ER SU PPDU if the HE ER SU PPDU With 1x HE-LTF And 0.8 s GI subfield is set
42377  * to 1; and also support for transmitting midambles with 2x HE-LTF, 1x HE-LTF in HE TB PPDU when allowed.
42378  */
42379 #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 5, 1)
42380 #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 5, 1, value)
42381 
42382 /*
42383  * If the DCM Max Constellation Tx subfield is greater than 0, then the DCM Max BW subfield indicates the
42384  * maximum bandwidth of a PPDU that the STA might transmit with DCM applied.
42385  *
42386  * If the DCM Max Constellation Rx subfield is greater than 0, then the DCM Max BW subfield indicates the
42387  * maximum bandwidth of a PPDU with DCM applied that the STA can receive.
42388  *
42389  * If both the DCM Max Constellation Tx subfield and DCM Max Constellation Rx subfield are 0, then this
42390  * subfield is reserved.
42391  *
42392  * 0=20MHz, 1=40Mhz, 2=80Mhz, 3=160Mhz or 80+80Mhz
42393  */
42394 #define WMI_HECAP_PHY_DCMMAXBW_GET_D3(he_cap_phy)  WMI_GET_BITS(he_cap_phy[2], 6, 2)
42395 #define WMI_HECAP_PHY_DCMMAXBW_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 6, 2, value)
42396 
42397 /*
42398  * For a non-AP STA, indicates support for receiving a DL HE MU PPDU where the number of OFDM symbols
42399  * in the HE SIG-B field is greater than 16.
42400  */
42401 #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_GET_D3(he_cap_phy)  WMI_GET_BITS(he_cap_phy[2], 8, 1)
42402 #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 8, 1, value)
42403 
42404 /*
42405  * For an AP, indicates support for the reception of full bandwidth non-triggered CQI-only feedback.
42406  * For a non-AP STA, indicates support for the transmission of full bandwidth non-triggered CQI-only feedback.
42407  */
42408 #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_GET_D3(he_cap_phy)  WMI_GET_BITS(he_cap_phy[2], 9, 1)
42409 #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 9, 1, value)
42410 
42411 /*
42412  * For a non-AP STA, indicates support for the transmission of 1024-QAM on a 26-, 52-, and 106-tone RU.
42413  * Reserved for an AP.
42414  */
42415 #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_GET_D3(he_cap_phy)  WMI_GET_BITS(he_cap_phy[2], 10, 1)
42416 #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 10, 1, value)
42417 
42418 /*
42419  * Indicates support for the reception of 1024-QAM on a 26-, 52-, and 106-tone RU.
42420  */
42421 #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_GET_D3(he_cap_phy)  WMI_GET_BITS(he_cap_phy[2], 11, 1)
42422 #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 11, 1, value)
42423 
42424 /*
42425  * Indicates support for reception of an HE MU PPDU with an RU spanning the entire PPDU bandwidth and a
42426  * compressed HE-SIG-B format.
42427  */
42428 #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_GET_D3(he_cap_phy)  WMI_GET_BITS(he_cap_phy[2], 12, 1)
42429 #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 12, 1, value)
42430 
42431 /*
42432  * Indicates support for reception of an HE MU PPDU with a bandwidth less than or equal to 80 MHz, an RU
42433  * spanning the entire PPDU bandwidth and a non-compressed HE-SIG-B format.
42434  */
42435 #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_GET_D3(he_cap_phy)  WMI_GET_BITS(he_cap_phy[2], 13, 1)
42436 #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 13, 1, value)
42437 
42438 /* HE MAC Capabilities Information field format */
42439 
42440 /* HTC + HE Support  Set to 1 if STA supports reception of HE Variant HT control Field */
42441 #define WMI_HECAP_MAC_HECTRL_GET_D3(he_cap) WMI_GET_BITS(he_cap, 0, 1)
42442 #define WMI_HECAP_MAC_HECTRL_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 0, 1, value)
42443 
42444 /* set to 1 to for TWT Requestor support */
42445 #define WMI_HECAP_MAC_TWTREQ_GET_D3(he_cap) WMI_GET_BITS(he_cap, 1, 1)
42446 #define WMI_HECAP_MAC_TWTREQ_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 1, 1, value)
42447 
42448 /* set to 1 to for TWT Responder support */
42449 #define WMI_HECAP_MAC_TWTRSP_GET_D3(he_cap) WMI_GET_BITS(he_cap, 2, 1)
42450 #define WMI_HECAP_MAC_TWTRSP_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 2, 1, value)
42451 
42452 /* Level of frag support
42453    Set to 0 for no support for dynamic fragmentation.
42454    Set to 1 for support for dynamic fragments that are contained within a S-MPDU
42455    Set to 2 for support for dynamic fragments that are contained within a Single MPDU and support for up to
42456         one dynamic fragment for each MSDU and each MMPDU within an A-MPDU or multi-TID A-MPDU.
42457    Set to 3 for support for dynamic fragments that are contained within a Single MPDU and support for multiple
42458         dynamic fragments for each MSDU within an AMPDU or multi-TID AMPDU and up to one dynamic fragment
42459         for each MMPDU in a multi-TID A-MPDU that is not a Single MPDU
42460 */
42461 #define WMI_HECAP_MAC_HEFRAG_GET_D3(he_cap) WMI_GET_BITS(he_cap, 3, 2)
42462 #define WMI_HECAP_MAC_HEFRAG_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 3, 2, value)
42463 
42464 /* The maximum number of fragmented MSDUs, Nmax,defined by this field is Nmax = 2 Maximum Number Of FMPDUs */
42465 #define WMI_HECAP_MAC_MAXFRAGMSDU_GET_D3(he_cap) WMI_GET_BITS(he_cap, 5, 3)
42466 #define WMI_HECAP_MAC_MAXFRAGMSDU_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 5, 3, value)
42467 
42468 
42469 /* 0 =  no restriction on the minimum payload , 1 = 128 octets min, 2 = 256 octets min, 3 = 512 octets min */
42470 #define WMI_HECAP_MAC_MINFRAGSZ_GET_D3(he_cap) WMI_GET_BITS(he_cap, 8, 2)
42471 #define WMI_HECAP_MAC_MINFRAGSZ_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 8, 2, value)
42472 
42473 /*0 = no additional processing time, 1 = 8us,2 = 16us */
42474 #define WMI_HECAP_MAC_TRIGPADDUR_GET_D3(he_cap) WMI_GET_BITS(he_cap, 10, 2)
42475 #define WMI_HECAP_MAC_TRIGPADDUR_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 10, 2, value)
42476 
42477 /* Indicates the number of TIDs of QoS Data frames that an HE STA can receive in a multi-TID AMPDU */
42478 #define WMI_HECAP_MAC_MTID_RX_GET_D3(he_cap) WMI_GET_BITS(he_cap, 12, 3)
42479 #define WMI_HECAP_MAC_MTID_RX_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 12, 3, value)
42480 
42481 /* Indicates support for link adaptation using the HLA Control subfield. */
42482 #define WMI_HECAP_MAC_HELINK_ADPT_GET_D3(he_cap) WMI_GET_BITS(he_cap, 15, 2)
42483 #define WMI_HECAP_MAC_HELINK_ADPT_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 15, 2, value)
42484 
42485 /* Set to 1 for reception of AllAck support */
42486 #define WMI_HECAP_MAC_AACK_GET_D3(he_cap) WMI_GET_BITS(he_cap, 17, 1)
42487 #define WMI_HECAP_MAC_AACK_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 17, 1, value)
42488 
42489 /* Set to 1 if the STA supports reception of the UL MU Response Scheduling A-Control field */
42490 #define WMI_HECAP_MAC_TRS_GET_D3(he_cap) WMI_GET_BITS(he_cap, 18, 1)
42491 #define WMI_HECAP_MAC_TRS_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 18, 1, value)
42492 
42493 /* Set to 1 if the STA supports the BSR A-Control field functionality.*/
42494 #define WMI_HECAP_MAC_BSR_GET_D3(he_cap) WMI_GET_BITS(he_cap, 19, 1)
42495 #define WMI_HECAP_MAC_BSR_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 19, 1, value)
42496 
42497 /* Set to 1 when the STA supports broadcast TWT functionality.*/
42498 #define WMI_HECAP_MAC_BCSTTWT_GET_D3(he_cap) WMI_GET_BITS(he_cap, 20, 1)
42499 #define WMI_HECAP_MAC_BCSTTWT_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 20, 1, value)
42500 
42501 /* Set to 1 if STA supports rx of Multi-STA BA that has 32-bit Block Ack Bitmap */
42502 #define WMI_HECAP_MAC_32BITBA_GET_D3(he_cap) WMI_GET_BITS(he_cap, 21, 1)
42503 #define WMI_HECAP_MAC_32BITBA_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 21, 1, value)
42504 
42505 /* Set to 1 if the STA supports MU cascading operation */
42506 #define WMI_HECAP_MAC_MUCASCADE_GET_D3(he_cap) WMI_GET_BITS(he_cap, 22, 1)
42507 #define WMI_HECAP_MAC_MUCASCADE_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 22, 1, value)
42508 
42509 /* Set to 1 when the STA supports reception of this multi-TID A-MPDU format */
42510 #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D3(he_cap) WMI_GET_BITS(he_cap, 23, 1)
42511 #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 23, 1, value)
42512 
42513 /* bit 24 - reserved */
42514 
42515 /* Set to 1 if the STA supports reception of the OMI A-Control field */
42516 #define WMI_HECAP_MAC_OMI_GET_D3(he_cap) WMI_GET_BITS(he_cap, 25, 1)
42517 #define WMI_HECAP_MAC_OMI_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 25, 1, value)
42518 
42519 /*1 if OFDMA Random Access Supported */
42520 #define WMI_HECAP_MAC_OFDMARA_GET_D3(he_cap) WMI_GET_BITS(he_cap, 26, 1)
42521 #define WMI_HECAP_MAC_OFDMARA_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 26, 1, value)
42522 
42523 /* Maximum AMPDU Length Exponent.
42524  * If the HE STA includes a VHT Capabilities element, the Maximum A-MPDU Length Exponent subfield in
42525  * HE Capabilities element combined with the Maximum A-MPDU Length Exponent subfield in VHT
42526  * Capabilities element indicate the maximum length of A-MPDU that the STA can Receive where EOF
42527  * padding is not included in this limit.
42528 */
42529 #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D3(he_cap) WMI_GET_BITS(he_cap, 27, 2)
42530 #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 27, 2, value)
42531 
42532 
42533 /* A-MSDU Fragmentation Support */
42534 #define WMI_HECAP_MAC_AMSDUFRAG_GET_D3(he_cap) WMI_GET_BITS(he_cap, 29, 1)
42535 #define WMI_HECAP_MAC_AMSDUFRAG_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 29, 1, value)
42536 
42537 /* Flexible TWT Schedule Support */
42538 #define WMI_HECAP_MAC_FLEXTWT_GET_D3(he_cap) WMI_GET_BITS(he_cap, 30, 1)
42539 #define WMI_HECAP_MAC_FLEXTWT_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 30, 1, value)
42540 
42541 /* Rx Control Frame to MultiBSS */
42542 #define WMI_HECAP_MAC_MBSS_GET_D3(he_cap) WMI_GET_BITS(he_cap, 31, 1)
42543 #define WMI_HECAP_MAC_MBSS_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 31, 1, value)
42544 
42545 /* 2nd DWORD of HE MAC Capabilities */
42546 
42547 /* BSRP A-MPDU Aggregation
42548  * maintaining compatibility since we don't support this now so not wasting memory
42549  */
42550 #define WMI_HECAP_MAC_BSRPAMPDU_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 0, 1)
42551 #define WMI_HECAP_MAC_BSRPAMPDU_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 0, 1, value)
42552 
42553 /* Quiet Time Period (QTP) operation
42554  * maintaining compatibility since we don't support this now so not wasting memory
42555  */
42556 #define WMI_HECAP_MAC_QTP_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 1, 1)
42557 #define WMI_HECAP_MAC_QTP_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 1, 1, value)
42558 
42559 /* support by an AP for receiving an (A-)MPDU that contains a BQR in the
42560  * A-Control subfield and support by a non-AP STA for generating an (A-)MPDU
42561  * that contains a BQR in the A-Control subfield
42562  * maintaining compatibility since we don't support this now so not wasting memory
42563  */
42564 #define WMI_HECAP_MAC_ABQR_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 2, 1)
42565 #define WMI_HECAP_MAC_ABQR_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 2, 1, value)
42566 
42567 /* Indicates support by the STA for the role of SRP Responder.*/
42568 #define WMI_HECAP_MAC_SRPRESP_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 3, 1)
42569 #define WMI_HECAP_MAC_SRPRESP_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 3, 1, value)
42570 
42571 /* Indicates support for a non-AP STA to follow the NDP feedback report procedure and respond to
42572  * the NDP Feedback Report Poll Trigger frame.
42573  */
42574 #define WMI_HECAP_MAC_NDPFDBKRPT_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 4, 1)
42575 #define WMI_HECAP_MAC_NDPFDBKRPT_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 4, 1, value)
42576 
42577 /* Indicates support for an AP to encode OPS information to TIM element of the FILS Discovery
42578  * frames or TIM frames as described in AP operation for opportunistic power save.
42579  * Indicates support for a non-AP STA to receive the opportunistic power save encoded TIM elements
42580  */
42581 #define WMI_HECAP_MAC_OPS_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 5, 1)
42582 #define WMI_HECAP_MAC_OPS_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 5, 1, value)
42583 
42584 /* Indicates support by a STA to receive an ack-enabled A-MPDU in which an A-MSDU is carried in
42585  * a QoS Data frame for which no block ack agreement exists.
42586  */
42587 #define WMI_HECAP_MAC_AMSDUINAMPDU_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 6, 1)
42588 #define WMI_HECAP_MAC_AMSDUINAMPDU_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 6, 1, value)
42589 
42590 /* Indicates the number of TIDs of QoS Data frames that an HE STA can transmit in a multi-TID AMPDU */
42591 #define WMI_HECAP_MAC_MTID_TX_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 7, 3)
42592 #define WMI_HECAP_MAC_MTID_TX_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 7, 3, value)
42593 
42594 /* Indicates whether an HE STA supports an HE subchannel selective transmission operation */
42595 #define WMI_HECAP_MAC_SUBCHANSELTX_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 10, 1)
42596 #define WMI_HECAP_MAC_SUBCHANSELTX_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 10, 1, value)
42597 
42598 /* Indicates support by a STA to receive a TRS Control subfield or a Trigger frame with a User Info
42599  * field addressed to the STA with the RU Allocation subfield of the TRS Control subfield or the User
42600  * Info field indicating 2x996-tone.
42601  */
42602 #define WMI_HECAP_MAC_UL2X996RU_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 11, 1)
42603 #define WMI_HECAP_MAC_UL2X996RU_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 11, 1, value)
42604 
42605 /* Indicates whether an AP supports interpretation of the UL MU Data Disable subfield of the OM Control subfield */
42606 #define WMI_HECAP_MAC_OMCULMUDDIS_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 12, 1)
42607 #define WMI_HECAP_MAC_OMCULMUDDIS_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 12, 1, value)
42608 
42609 /* Indicates the spatial multiplexing power save mode after receiving a
42610  * Trigger frame that is in operation immediately after (re)association.
42611  */
42612 #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 13, 1)
42613 #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 13, 1, value)
42614 
42615 /* Indicates support for Punctured Sounding */
42616 #define WMI_HECAP_MAC_PUNCSOUNDING_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 14, 1)
42617 #define WMI_HECAP_MAC_PUNCSOUNDING_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 14, 1, value)
42618 
42619 /* Indicates support for receiving a Trigger frame in an HT PPDU and
42620  * receiving a Trigger frame in a VHT PPDU
42621  */
42622 #define WMI_HECAP_MAC_HTVHTTRIGRX_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 15, 1)
42623 #define WMI_HECAP_MAC_HTVHTTRIGRX_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 15, 1, value)
42624 
42625 /*
42626  * The following conditionally-defined macros can be used in systems
42627  * which only support either 802.11ax draft 2 or 802.11ax draft 3,
42628  * but not both, and which make this D2 vs. D3 selection at build time.
42629  */
42630 #ifdef SUPPORT_11AX_D3
42631   #define WMI_HEOPS_COLOR_GET WMI_HEOPS_COLOR_GET_D3
42632   #define WMI_HEOPS_COLOR_SET WMI_HEOPS_COLOR_SET_D3
42633   #define WMI_HEOPS_DEFPE_GET WMI_HEOPS_DEFPE_GET_D3
42634   #define WMI_HEOPS_DEFPE_SET WMI_HEOPS_DEFPE_SET_D3
42635   #define WMI_HEOPS_TWT_REQUIRED_GET WMI_HEOPS_TWT_REQUIRED_GET_D3
42636   #define WMI_HEOPS_TWT_REQUIRED_SET WMI_HEOPS_TWT_REQUIRED_SET_D3
42637   #define WMI_HEOPS_TWT_GET WMI_HEOPS_TWT_REQUIRED_GET_D3  /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_GET */
42638   #define WMI_HEOPS_TWT_SET WMI_HEOPS_TWT_REQUIRED_SET_D3  /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_SET */
42639   #define WMI_HEOPS_RTSTHLD_GET WMI_HEOPS_RTSTHLD_GET_D3
42640   #define WMI_HEOPS_RTSTHLD_SET WMI_HEOPS_RTSTHLD_SET_D3
42641   #define WMI_HEOPS_PARTBSSCOLOR_GET WMI_HEOPS_PARTBSSCOLOR_GET_D3
42642   #define WMI_HEOPS_PARTBSSCOLOR_SET WMI_HEOPS_PARTBSSCOLOR_SET_D3
42643   #define WMI_HEOPS_COLOCBSS_GET WMI_HEOPS_COLOCBSS_GET_D3
42644   #define WMI_HEOPS_COLOCBSS_SET WMI_HEOPS_COLOCBSS_SET_D3
42645   #define WMI_HEOPS_VHTOPSPRSNT_GET WMI_HEOPS_VHTOPSPRSNT_GET_D3
42646   #define WMI_HEOPS_VHTOPSPRSNT_SET WMI_HEOPS_VHTOPSPRSNT_SET_D3
42647   #define WMI_HEOPS_ERSUDIS_GET WMI_HEOPS_ERSUDIS_GET_D3
42648   #define WMI_HEOPS_ERSUDIS_SET WMI_HEOPS_ERSUDIS_SET_D3
42649   #define WMI_HEOPS_BSSCOLORDISABLE_GET WMI_HEOPS_BSSCOLORDISABLE_GET_D3
42650   #define WMI_HEOPS_BSSCOLORDISABLE_SET WMI_HEOPS_BSSCOLORDISABLE_SET_D3
42651   #define WMI_HEOPS_TXBSSID_GET(he_ops) (0)       /* DEPRECATED - DO NOT USE */
42652   #define WMI_HEOPS_TXBSSID_SET(he_ops, value)    /* DEPRECATED - DO NOT USE */
42653 
42654   #define WMI_HECAP_PHY_CBW_GET WMI_HECAP_PHY_CBW_GET_D3
42655   #define WMI_HECAP_PHY_CBW_SET WMI_HECAP_PHY_CBW_SET_D3
42656   #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D3
42657   #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D3
42658   #define WMI_HECAP_PHY_COD_GET WMI_HECAP_PHY_COD_GET_D3
42659   #define WMI_HECAP_PHY_COD_SET WMI_HECAP_PHY_COD_SET_D3
42660   #define WMI_HECAP_PHY_LDPC_GET WMI_HECAP_PHY_LDPC_GET_D3
42661   #define WMI_HECAP_PHY_LDPC_SET WMI_HECAP_PHY_LDPC_SET_D3
42662   #define WMI_HECAP_PHY_TXLDPC_GET WMI_HECAP_PHY_LDPC_GET /* Deprecated use WMI_HECAP_PHY_LDPC */
42663   #define WMI_HECAP_PHY_TXLDPC_SET WMI_HECAP_PHY_LDPC_SET /* Deprecated use WMI_HECAP_PHY_LDPC */
42664   #define WMI_HECAP_PHY_RXLDPC_GET WMI_HECAP_PHY_LDPC_GET /* Deprecated use WMI_HECAP_PHY_LDPC */
42665   #define WMI_HECAP_PHY_RXLDPC_SET WMI_HECAP_PHY_LDPC_SET /* Deprecated use WMI_HECAP_PHY_LDPC */
42666   #define WMI_HECAP_PHY_LTFGIFORHE_GET WMI_HECAP_PHY_LTFGIFORHE_GET_D3
42667   #define WMI_HECAP_PHY_LTFGIFORHE_SET WMI_HECAP_PHY_LTFGIFORHE_SET_D3
42668   #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET_D3
42669   #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET_D3
42670   #define WMI_HECAP_PHY_LTFGIFORNDP_GET WMI_HECAP_PHY_LTFGIFORNDP_GET_D3
42671   #define WMI_HECAP_PHY_LTFGIFORNDP_SET WMI_HECAP_PHY_LTFGIFORNDP_SET_D3
42672   #define WMI_HECAP_PHY_TXSTBC_GET WMI_HECAP_PHY_TXSTBC_GET_D3
42673   #define WMI_HECAP_PHY_TXSTBC_SET WMI_HECAP_PHY_TXSTBC_SET_D3
42674   #define WMI_HECAP_PHY_RXSTBC_GET WMI_HECAP_PHY_RXSTBC_GET_D3
42675   #define WMI_HECAP_PHY_RXSTBC_SET WMI_HECAP_PHY_RXSTBC_SET_D3
42676   #define WMI_HECAP_PHY_TXDOPPLER WMI_HECAP_PHY_TXDOPPLER_GET_D3
42677   #define WMI_HECAP_PHY_TXDOPPLER_SET WMI_HECAP_PHY_TXDOPPLER_SET_D3
42678   #define WMI_HECAP_PHY_RXDOPPLER_GET WMI_HECAP_PHY_RXDOPPLER_GET_D3
42679   #define WMI_HECAP_PHY_RXDOPPLER_SET WMI_HECAP_PHY_RXDOPPLER_SET_D3
42680   #define WMI_HECAP_PHY_UL_MU_MIMO_GET WMI_HECAP_PHY_UL_MU_MIMO_GET_D3
42681   #define WMI_HECAP_PHY_UL_MU_MIMO_SET WMI_HECAP_PHY_UL_MU_MIMO_SET_D3
42682   #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D3
42683   #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D3
42684   #define WMI_HECAP_PHY_DCMTX_GET WMI_HECAP_PHY_DCMTX_GET_D3
42685   #define WMI_HECAP_PHY_DCMTX_SET WMI_HECAP_PHY_DCMTX_SET_D3
42686   #define WMI_HECAP_PHY_DCMRX_GET WMI_HECAP_PHY_DCMRX_GET_D3
42687   #define WMI_HECAP_PHY_DCMRX_SET WMI_HECAP_PHY_DCMRX_SET_D3
42688   /* DEPRECATED - use WMI_HECAP_PHY_DCMRX or WMI_HECAP_PHY_DCMTX */
42689   #define WMI_HECAP_PHY_DCM_GET WMI_HECAP_PHY_DCMRX_GET_D3
42690   #define WMI_HECAP_PHY_DCM_SET WMI_HECAP_PHY_DCMRX_SET_D3
42691   #define WMI_HECAP_PHY_ULHEMU_GET WMI_HECAP_PHY_ULHEMU_GET_D3
42692   #define WMI_HECAP_PHY_ULHEMU_SET WMI_HECAP_PHY_ULHEMU_SET_D3
42693   #define WMI_HECAP_PHY_SUBFMR_GET WMI_HECAP_PHY_SUBFMR_GET_D3
42694   #define WMI_HECAP_PHY_SUBFMR_SET WMI_HECAP_PHY_SUBFMR_SET_D3
42695   #define WMI_HECAP_PHY_SUBFME_GET WMI_HECAP_PHY_SUBFME_GET_D3
42696   #define WMI_HECAP_PHY_SUBFME_SET WMI_HECAP_PHY_SUBFME_SET_D3
42697   #define WMI_HECAP_PHY_MUBFMR_GET WMI_HECAP_PHY_MUBFMR_GET_D3
42698   #define WMI_HECAP_PHY_MUBFMR_SET WMI_HECAP_PHY_MUBFMR_SET_D3
42699   #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D3
42700   #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D3
42701   #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D3
42702   #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D3
42703   #define WMI_HECAP_PHY_NSTSLT80MHZ_GET WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D3
42704   #define WMI_HECAP_PHY_NSTSLT80MHZ_SET WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D3
42705   #define WMI_HECAP_PHY_NSTSGT80MHZ_GET WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D3
42706   #define WMI_HECAP_PHY_NSTSGT80MHZ_SET WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D3
42707   #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D3
42708   #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D3
42709   #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D3
42710   #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D3
42711   #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D3
42712   #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D3
42713   #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D3
42714   #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D3
42715   #define WMI_HECAP_PHY_CODBK42SU_GET WMI_HECAP_PHY_CODBK42SU_GET_D3
42716   #define WMI_HECAP_PHY_CODBK42SU_SET WMI_HECAP_PHY_CODBK42SU_SET_D3
42717   #define WMI_HECAP_PHY_CODBK75MU_GET WMI_HECAP_PHY_CODBK75MU_GET_D3
42718   #define WMI_HECAP_PHY_CODBK75MU_SET WMI_HECAP_PHY_CODBK75MU_SET_D3
42719   #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D3
42720   #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D3
42721   #define WMI_HECAP_PHY_HEERSU_GET WMI_HECAP_PHY_HEERSU_GET_D3
42722   #define WMI_HECAP_PHY_HEERSU_SET WMI_HECAP_PHY_HEERSU_SET_D3
42723   #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D3
42724   #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D3
42725   #define WMI_HECAP_PHY_PETHRESPRESENT_GET WMI_HECAP_PHY_PETHRESPRESENT_GET_D3
42726   #define WMI_HECAP_PHY_PETHRESPRESENT_SET WMI_HECAP_PHY_PETHRESPRESENT_SET_D3
42727   #define WMI_HECAP_PHY_SRPSPRESENT_GET WMI_HECAP_PHY_SRPSPRESENT_GET_D3
42728   #define WMI_HECAP_PHY_SRPPRESENT_SET WMI_HECAP_PHY_SRPPRESENT_SET_D3
42729   #define WMI_HECAP_PHY_PWRBOOSTAR_GET WMI_HECAP_PHY_PWRBOOSTAR_GET_D3
42730   #define WMI_HECAP_PHY_PWRBOOSTAR_SET WMI_HECAP_PHY_PWRBOOSTAR_SET_D3
42731   #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D3
42732   #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D3
42733   #define WMI_HECAP_PHY_MAXNC_GET WMI_HECAP_PHY_MAXNC_GET_D3
42734   #define WMI_HECAP_PHY_MAXNC_SET WMI_HECAP_PHY_MAXNC_SET_D3
42735   #define WMI_HECAP_PHY_STBCTXGT80_GET WMI_HECAP_PHY_STBCTXGT80_GET_D3
42736   #define WMI_HECAP_PHY_STBCTXGT80_SET WMI_HECAP_PHY_STBCTXGT80_SET_D3
42737   #define WMI_HECAP_PHY_STBCRXGT80_GET WMI_HECAP_PHY_STBCRXGT80_GET_D3
42738   #define WMI_HECAP_PHY_STBCRXGT80_SET WMI_HECAP_PHY_STBCRXGT80_SET_D3
42739   #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D3
42740   #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D3
42741   #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D3
42742   #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D3
42743   #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D3
42744   #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D3
42745   #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D3
42746   #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D3
42747   #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D3
42748   #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D3
42749   #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET_D3
42750   #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET_D3
42751   #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET  /* DEPRECATED */
42752   #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET  /* DEPRECATED */
42753   #define WMI_HECAP_PHY_DCMMAXBW_GET WMI_HECAP_PHY_DCMMAXBW_GET_D3
42754   #define WMI_HECAP_PHY_DCMMAXBW_SET WMI_HECAP_PHY_DCMMAXBW_SET_D3
42755   #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_GET WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_GET_D3
42756   #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_SET WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_SET_D3
42757   #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_GET WMI_HECAP_PHY_NONTRIGCQIFEEDBK_GET_D3
42758   #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_SET WMI_HECAP_PHY_NONTRIGCQIFEEDBK_SET_D3
42759   #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_GET WMI_HECAP_PHY_TX1024QAM242RUSUPRT_GET_D3
42760   #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_SET WMI_HECAP_PHY_TX1024QAM242RUSUPRT_SET_D3
42761   #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_GET WMI_HECAP_PHY_RX1024QAM242RUSUPRT_GET_D3
42762   #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_SET WMI_HECAP_PHY_RX1024QAM242RUSUPRT_SET_D3
42763   #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_GET WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_GET_D3
42764   #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_SET WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_SET_D3
42765   #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_GET WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_GET_D3
42766   #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_SET WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_SET_D3
42767   #define WMI_HECAP_PHY_DB_GET(he_phy_cap) (0)        /* DEPRECATED - DO NOT USE */
42768   #define WMI_HECAP_PHY_DB_SET(he_phy_cap, value)     /* DEPRECATED - DO NOT USE */
42769   #define WMI_HECAP_MAC_HECTRL_GET WMI_HECAP_MAC_HECTRL_GET_D3
42770   #define WMI_HECAP_MAC_HECTRL_SET WMI_HECAP_MAC_HECTRL_SET_D3
42771   #define WMI_HECAP_MAC_TWTREQ_GET WMI_HECAP_MAC_TWTREQ_GET_D3
42772   #define WMI_HECAP_MAC_TWTREQ_SET WMI_HECAP_MAC_TWTREQ_SET_D3
42773   #define WMI_HECAP_MAC_TWTRSP_GET WMI_HECAP_MAC_TWTRSP_GET_D3
42774   #define WMI_HECAP_MAC_TWTRSP_SET WMI_HECAP_MAC_TWTRSP_SET_D3
42775   #define WMI_HECAP_MAC_HEFRAG_GET WMI_HECAP_MAC_HEFRAG_GET_D3
42776   #define WMI_HECAP_MAC_HEFRAG_SET WMI_HECAP_MAC_HEFRAG_SET_D3
42777   #define WMI_HECAP_MAC_MAXFRAGMSDU_GET WMI_HECAP_MAC_MAXFRAGMSDU_GET_D3
42778   #define WMI_HECAP_MAC_MAXFRAGMSDU_SET WMI_HECAP_MAC_MAXFRAGMSDU_SET_D3
42779   #define WMI_HECAP_MAC_MINFRAGSZ_GET WMI_HECAP_MAC_MINFRAGSZ_GET_D3
42780   #define WMI_HECAP_MAC_MINFRAGSZ_SET WMI_HECAP_MAC_MINFRAGSZ_SET_D3
42781   #define WMI_HECAP_MAC_TRIGPADDUR_GET WMI_HECAP_MAC_TRIGPADDUR_GET_D3
42782   #define WMI_HECAP_MAC_TRIGPADDUR_SET WMI_HECAP_MAC_TRIGPADDUR_SET_D3
42783   #define WMI_HECAP_MAC_MTID_RX_GET WMI_HECAP_MAC_MTID_RX_GET_D3
42784   #define WMI_HECAP_MAC_MTID_RX_SET WMI_HECAP_MAC_MTID_RX_SET_D3
42785   #define WMI_HECAP_MAC_HELINK_ADPT_GET WMI_HECAP_MAC_HELINK_ADPT_GET_D3
42786   #define WMI_HECAP_MAC_HELINK_ADPT_SET WMI_HECAP_MAC_HELINK_ADPT_SET_D3
42787   #define WMI_HECAP_MAC_AACK_GET WMI_HECAP_MAC_AACK_GET_D3
42788   #define WMI_HECAP_MAC_AACK_SET WMI_HECAP_MAC_AACK_SET_D3
42789   #define WMI_HECAP_MAC_TRS_GET WMI_HECAP_MAC_TRS_GET_D3
42790   #define WMI_HECAP_MAC_TRS_SET WMI_HECAP_MAC_TRS_SET_D3
42791   #define WMI_HECAP_MAC_ULMURSP_GET(he_cap) (0)    /* DEPRECATED, DO NOT USE */
42792   #define WMI_HECAP_MAC_ULMURSP_SET(he_cap, value) /* DEPRECATED, DO NOT USE */
42793   #define WMI_HECAP_MAC_BSR_GET WMI_HECAP_MAC_BSR_GET_D3
42794   #define WMI_HECAP_MAC_BSR_SET WMI_HECAP_MAC_BSR_SET_D3
42795   #define WMI_HECAP_MAC_BCSTTWT_GET WMI_HECAP_MAC_BCSTTWT_GET_D3
42796   #define WMI_HECAP_MAC_BCSTTWT_SET WMI_HECAP_MAC_BCSTTWT_SET_D3
42797   #define WMI_HECAP_MAC_32BITBA_GET WMI_HECAP_MAC_32BITBA_GET_D3
42798   #define WMI_HECAP_MAC_32BITBA_SET WMI_HECAP_MAC_32BITBA_SET_D3
42799   #define WMI_HECAP_MAC_MUCASCADE_GET WMI_HECAP_MAC_MUCASCADE_GET_D3
42800   #define WMI_HECAP_MAC_MUCASCADE_SET WMI_HECAP_MAC_MUCASCADE_SET_D3
42801   #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D3
42802   #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D3
42803   #define WMI_HECAP_MAC_GROUPMSTABA_GET(he_cap) (0)    /* DEPRECATED, DO NOT USE */
42804   #define WMI_HECAP_MAC_GROUPMSTABA_SET(he_cap, value) /* DEPRECATED, DO NOT USE */
42805   #define WMI_HECAP_MAC_OMI_GET WMI_HECAP_MAC_OMI_GET_D3
42806   #define WMI_HECAP_MAC_OMI_SET WMI_HECAP_MAC_OMI_SET_D3
42807   #define WMI_HECAP_MAC_OFDMARA_GET WMI_HECAP_MAC_OFDMARA_GET_D3
42808   #define WMI_HECAP_MAC_OFDMARA_SET WMI_HECAP_MAC_OFDMARA_SET_D3
42809   #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D3
42810   #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D3
42811   #define WMI_HECAP_MAC_AMSDUFRAG_GET WMI_HECAP_MAC_AMSDUFRAG_GET_D3
42812   #define WMI_HECAP_MAC_AMSDUFRAG_SET WMI_HECAP_MAC_AMSDUFRAG_SET_D3
42813   #define WMI_HECAP_MAC_FLEXTWT_GET WMI_HECAP_MAC_FLEXTWT_GET_D3
42814   #define WMI_HECAP_MAC_FLEXTWT_SET WMI_HECAP_MAC_FLEXTWT_SET_D3
42815   #define WMI_HECAP_MAC_MBSS_GET WMI_HECAP_MAC_MBSS_GET_D3
42816   #define WMI_HECAP_MAC_MBSS_SET WMI_HECAP_MAC_MBSS_SET_D3
42817   #define WMI_HECAP_MAC_BSRPAMPDU_GET WMI_HECAP_MAC_BSRPAMPDU_GET_D3
42818   #define WMI_HECAP_MAC_BSRPAMPDU_SET WMI_HECAP_MAC_BSRPAMPDU_SET_D3
42819   #define WMI_HECAP_MAC_QTP_GET WMI_HECAP_MAC_QTP_GET_D3
42820   #define WMI_HECAP_MAC_QTP_SET WMI_HECAP_MAC_QTP_SET_D3
42821   #define WMI_HECAP_MAC_ABQR_GET WMI_HECAP_MAC_ABQR_GET_D3
42822   #define WMI_HECAP_MAC_ABQR_SET WMI_HECAP_MAC_ABQR_SET_D3
42823   #define WMI_HECAP_MAC_SRPRESP_GET WMI_HECAP_MAC_SRPRESP_GET_D3
42824   #define WMI_HECAP_MAC_SRPRESP_SET WMI_HECAP_MAC_SRPRESP_SET_D3
42825   #define WMI_HECAP_MAC_SRRESP_GET(he_cap2) (0)    /* DEPRECATED, DO NOT USE */
42826   #define WMI_HECAP_MAC_SRRESP_SET(he_cap2, value) /* DEPRECATED, DO NOT USE */
42827   #define WMI_HECAP_MAC_NDPFDBKRPT_GET WMI_HECAP_MAC_NDPFDBKRPT_GET_D3
42828   #define WMI_HECAP_MAC_NDPFDBKRPT_SET WMI_HECAP_MAC_NDPFDBKRPT_SET_D3
42829   #define WMI_HECAP_MAC_OPS_GET WMI_HECAP_MAC_OPS_GET_D3
42830   #define WMI_HECAP_MAC_OPS_SET WMI_HECAP_MAC_OPS_SET_D3
42831   #define WMI_HECAP_MAC_AMSDUINAMPDU_GET WMI_HECAP_MAC_AMSDUINAMPDU_GET_D3
42832   #define WMI_HECAP_MAC_AMSDUINAMPDU_SET WMI_HECAP_MAC_AMSDUINAMPDU_SET_D3
42833   #define WMI_HECAP_MAC_MTID_TX_GET WMI_HECAP_MAC_MTID_TX_GET_D3
42834   #define WMI_HECAP_MAC_MTID_TX_SET WMI_HECAP_MAC_MTID_TX_SET_D3
42835   #define WMI_HECAP_MAC_SUBCHANSELTX_GET WMI_HECAP_MAC_SUBCHANSELTX_GET_D3
42836   #define WMI_HECAP_MAC_SUBCHANSELTX_SET WMI_HECAP_MAC_SUBCHANSELTX_SET_D3
42837   #define WMI_HECAP_MAC_UL2X996RU_GET WMI_HECAP_MAC_UL2X996RU_GET_D3
42838   #define WMI_HECAP_MAC_UL2X996RU_SET WMI_HECAP_MAC_UL2X996RU_SET_D3
42839   #define WMI_HECAP_MAC_OMCULMUDDIS_GET WMI_HECAP_MAC_OMCULMUDDIS_GET_D3
42840   #define WMI_HECAP_MAC_OMCULMUDDIS_SET WMI_HECAP_MAC_OMCULMUDDIS_SET_D3
42841   #define WMI_HECAP_MAC_HELKAD_GET(he_cap) (0)           /* DEPRECATED, DO NOT USE */
42842   #define WMI_HECAP_MAC_HELKAD_SET(he_cap, value)        /* DEPRECATED, DO NOT USE */
42843   #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET_D3 /* DEPRECATED - DO NOT USE */
42844   #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET_D3 /* DEPRECATED - DO NOT USE */
42845   #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D3
42846   #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D3
42847   #define WMI_HECAP_MAC_PUNCSOUNDING_GET WMI_HECAP_MAC_PUNCSOUNDING_GET_D3
42848   #define WMI_HECAP_MAC_PUNCSOUNDING_SET WMI_HECAP_MAC_PUNCSOUNDING_SET_D3
42849   #define WMI_HECAP_MAC_HTVHTTRIGRX_GET WMI_HECAP_MAC_HTVHTTRIGRX_GET_D3
42850   #define WMI_HECAP_MAC_HTVHTTRIGRX_SET WMI_HECAP_MAC_HTVHTTRIGRX_SET_D3
42851 #else /* SUPPORT_11AX_D3 vs. D2 */
42852   /* D2 and D2- */
42853   #define WMI_HEOPS_COLOR_GET WMI_HEOPS_COLOR_GET_D2
42854   #define WMI_HEOPS_COLOR_SET WMI_HEOPS_COLOR_SET_D2
42855   #define WMI_HEOPS_DEFPE_GET WMI_HEOPS_DEFPE_GET_D2
42856   #define WMI_HEOPS_DEFPE_SET WMI_HEOPS_DEFPE_SET_D2
42857   #define WMI_HEOPS_TWT_REQUIRED_GET WMI_HEOPS_TWT_REQUIRED_GET_D2
42858   #define WMI_HEOPS_TWT_REQUIRED_SET WMI_HEOPS_TWT_REQUIRED_SET_D2
42859   #define WMI_HEOPS_TWT_GET WMI_HEOPS_TWT_GET_D2     /* Deprecated */
42860   #define WMI_HEOPS_TWT_SET WMI_HEOPS_TWT_SET_D2     /* Deprecated */
42861   #define WMI_HEOPS_RTSTHLD_GET WMI_HEOPS_RTSTHLD_GET_D2
42862   #define WMI_HEOPS_RTSTHLD_SET WMI_HEOPS_RTSTHLD_SET_D2
42863   #define WMI_HEOPS_PARTBSSCOLOR_GET WMI_HEOPS_PARTBSSCOLOR_GET_D2
42864   #define WMI_HEOPS_PARTBSSCOLOR_SET WMI_HEOPS_PARTBSSCOLOR_SET_D2
42865   #define WMI_HEOPS_MAXBSSID_GET WMI_HEOPS_MAXBSSID_GET_D2
42866   #define WMI_HEOPS_MAXBSSID_SET WMI_HEOPS_MAXBSSID_SET_D2
42867   #define WMI_HEOPS_TXBSSID_GET WMI_HEOPS_TXBSSID_GET_D2
42868   #define WMI_HEOPS_TXBSSID_SET WMI_HEOPS_TXBSSID_SET_D2
42869   #define WMI_HEOPS_BSSCOLORDISABLE_GET WMI_HEOPS_BSSCOLORDISABLE_GET_D2
42870   #define WMI_HEOPS_BSSCOLORDISABLE_SET WMI_HEOPS_BSSCOLORDISABLE_SET_D2
42871   #define WMI_HEOPS_DUALBEACON_GET WMI_HEOPS_DUALBEACON_GET_D2
42872   #define WMI_HEOPS_DUALBEACON_SET WMI_HEOPS_DUALBEACON_SET_D2
42873   #define WMI_HECAP_PHY_DB_GET WMI_HECAP_PHY_DB_GET_D2
42874   #define WMI_HECAP_PHY_DB_SET WMI_HECAP_PHY_DB_SET_D2
42875   #define WMI_HECAP_PHY_CBW_GET WMI_HECAP_PHY_CBW_GET_D2
42876   #define WMI_HECAP_PHY_CBW_SET WMI_HECAP_PHY_CBW_SET_D2
42877   #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D2
42878   #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D2
42879   #define WMI_HECAP_PHY_COD_GET WMI_HECAP_PHY_COD_GET_D2
42880   #define WMI_HECAP_PHY_COD_SET WMI_HECAP_PHY_COD_SET_D2
42881   #define WMI_HECAP_PHY_LDPC_GET WMI_HECAP_PHY_LDPC_GET_D2
42882   #define WMI_HECAP_PHY_LDPC_SET WMI_HECAP_PHY_LDPC_SET_D2
42883   #define WMI_HECAP_PHY_TXLDPC_GET WMI_HECAP_PHY_TXLDPC_GET_D2
42884   #define WMI_HECAP_PHY_TXLDPC_SET WMI_HECAP_PHY_TXLDPC_SET_D2
42885   #define WMI_HECAP_PHY_RXLDPC_GET WMI_HECAP_PHY_RXLDPC_GET_D2
42886   #define WMI_HECAP_PHY_RXLDPC_SET WMI_HECAP_PHY_RXLDPC_SET_D2
42887   #define WMI_HECAP_PHY_LTFGIFORHE_GET WMI_HECAP_PHY_LTFGIFORHE_GET_D2
42888   #define WMI_HECAP_PHY_LTFGIFORHE_SET WMI_HECAP_PHY_LTFGIFORHE_SET_D2
42889   #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET_D2
42890   #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET_D2
42891   #define WMI_HECAP_PHY_LTFGIFORNDP_GET WMI_HECAP_PHY_LTFGIFORNDP_GET_D2
42892   #define WMI_HECAP_PHY_LTFGIFORNDP_SET WMI_HECAP_PHY_LTFGIFORNDP_SET_D2
42893   #define WMI_HECAP_PHY_TXSTBC_GET WMI_HECAP_PHY_TXSTBC_GET_D2
42894   #define WMI_HECAP_PHY_TXSTBC_SET WMI_HECAP_PHY_TXSTBC_SET_D2
42895   #define WMI_HECAP_PHY_RXSTBC_GET WMI_HECAP_PHY_RXSTBC_GET_D2
42896   #define WMI_HECAP_PHY_RXSTBC_SET WMI_HECAP_PHY_RXSTBC_SET_D2
42897   #define WMI_HECAP_PHY_TXDOPPLER_GET WMI_HECAP_PHY_TXDOPPLER_GET_D2
42898   #define WMI_HECAP_PHY_TXDOPPLER_SET WMI_HECAP_PHY_TXDOPPLER_SET_D2
42899   #define WMI_HECAP_PHY_RXDOPPLER_GET WMI_HECAP_PHY_RXDOPPLER_GET_D2
42900   #define WMI_HECAP_PHY_RXDOPPLER_SET WMI_HECAP_PHY_RXDOPPLER_SET_D2
42901   #define WMI_HECAP_PHY_UL_MU_MIMO_GET WMI_HECAP_PHY_UL_MU_MIMO_GET_D2
42902   #define WMI_HECAP_PHY_UL_MU_MIMO_SET WMI_HECAP_PHY_UL_MU_MIMO_SET_D2
42903   #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D2
42904   #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D2
42905   #define WMI_HECAP_PHY_DCMTX_GET WMI_HECAP_PHY_DCMTX_GET_D2
42906   #define WMI_HECAP_PHY_DCMTX_SET WMI_HECAP_PHY_DCMTX_SET_D2
42907   #define WMI_HECAP_PHY_DCMRX_GET WMI_HECAP_PHY_DCMRX_GET_D2
42908   #define WMI_HECAP_PHY_DCMRX_SET WMI_HECAP_PHY_DCMRX_SET_D2
42909   #define WMI_HECAP_PHY_ULHEMU_GET WMI_HECAP_PHY_ULHEMU_GET_D2
42910   #define WMI_HECAP_PHY_ULHEMU_SET WMI_HECAP_PHY_ULHEMU_SET_D2
42911   #define WMI_HECAP_PHY_SUBFMR_GET WMI_HECAP_PHY_SUBFMR_GET_D2
42912   #define WMI_HECAP_PHY_SUBFMR_SET WMI_HECAP_PHY_SUBFMR_SET_D2
42913   #define WMI_HECAP_PHY_SUBFME_GET WMI_HECAP_PHY_SUBFME_GET_D2
42914   #define WMI_HECAP_PHY_SUBFME_SET WMI_HECAP_PHY_SUBFME_SET_D2
42915   #define WMI_HECAP_PHY_MUBFMR_GET WMI_HECAP_PHY_MUBFMR_GET_D2
42916   #define WMI_HECAP_PHY_MUBFMR_SET WMI_HECAP_PHY_MUBFMR_SET_D2
42917   #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D2
42918   #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D2
42919   #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D2
42920   #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D2
42921   #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D2
42922   #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D2
42923   #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D2
42924   #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D2
42925   #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D2
42926   #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D2
42927   #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D2
42928   #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D2
42929   #define WMI_HECAP_PHY_CODBK42SU_GET WMI_HECAP_PHY_CODBK42SU_GET_D2
42930   #define WMI_HECAP_PHY_CODBK42SU_SET WMI_HECAP_PHY_CODBK42SU_SET_D2
42931   #define WMI_HECAP_PHY_CODBK75MU_GET WMI_HECAP_PHY_CODBK75MU_GET_D2
42932   #define WMI_HECAP_PHY_CODBK75MU_SET WMI_HECAP_PHY_CODBK75MU_SET_D2
42933   #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D2
42934   #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D2
42935   #define WMI_HECAP_PHY_HEERSU_GET WMI_HECAP_PHY_HEERSU_GET_D2
42936   #define WMI_HECAP_PHY_HEERSU_SET WMI_HECAP_PHY_HEERSU_SET_D2
42937   #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D2
42938   #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D2
42939   #define WMI_HECAP_PHY_PETHRESPRESENT_GET WMI_HECAP_PHY_PETHRESPRESENT_GET_D2
42940   #define WMI_HECAP_PHY_PETHRESPRESENT_SET WMI_HECAP_PHY_PETHRESPRESENT_SET_D2
42941   #define WMI_HECAP_PHY_SRPSPRESENT_GET WMI_HECAP_PHY_SRPSPRESENT_GET_D2
42942   #define WMI_HECAP_PHY_SRPPRESENT_SET WMI_HECAP_PHY_SRPPRESENT_SET_D2
42943   #define WMI_HECAP_PHY_PWRBOOSTAR_GET WMI_HECAP_PHY_PWRBOOSTAR_GET_D2
42944   #define WMI_HECAP_PHY_PWRBOOSTAR_SET WMI_HECAP_PHY_PWRBOOSTAR_SET_D2
42945   #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D2
42946   #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D2
42947   #define WMI_HECAP_PHY_MAXNC_GET WMI_HECAP_PHY_MAXNC_GET_D2
42948   #define WMI_HECAP_PHY_MAXNC_SET WMI_HECAP_PHY_MAXNC_SET_D2
42949   #define WMI_HECAP_PHY_STBCTXGT80_GET WMI_HECAP_PHY_STBCTXGT80_GET_D2
42950   #define WMI_HECAP_PHY_STBCTXGT80_SET WMI_HECAP_PHY_STBCTXGT80_SET_D2
42951   #define WMI_HECAP_PHY_STBCRXGT80_GET WMI_HECAP_PHY_STBCRXGT80_GET_D2
42952   #define WMI_HECAP_PHY_STBCRXGT80_SET WMI_HECAP_PHY_STBCRXGT80_SET_D2
42953   #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D2
42954   #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D2
42955   #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D2
42956   #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D2
42957   #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D2
42958   #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D2
42959   #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D2
42960   #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D2
42961   #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D2
42962   #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D2
42963   #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET_D2
42964   #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET_D2
42965   #define WMI_HECAP_MAC_HECTRL_GET WMI_HECAP_MAC_HECTRL_GET_D2
42966   #define WMI_HECAP_MAC_HECTRL_SET WMI_HECAP_MAC_HECTRL_SET_D2
42967   #define WMI_HECAP_MAC_TWTREQ_GET WMI_HECAP_MAC_TWTREQ_GET_D2
42968   #define WMI_HECAP_MAC_TWTREQ_SET WMI_HECAP_MAC_TWTREQ_SET_D2
42969   #define WMI_HECAP_MAC_TWTRSP_GET WMI_HECAP_MAC_TWTRSP_GET_D2
42970   #define WMI_HECAP_MAC_TWTRSP_SET WMI_HECAP_MAC_TWTRSP_SET_D2
42971   #define WMI_HECAP_MAC_HEFRAG_GET WMI_HECAP_MAC_HEFRAG_GET_D2
42972   #define WMI_HECAP_MAC_HEFRAG_SET WMI_HECAP_MAC_HEFRAG_SET_D2
42973   #define WMI_HECAP_MAC_MAXFRAGMSDU_GET WMI_HECAP_MAC_MAXFRAGMSDU_GET_D2
42974   #define WMI_HECAP_MAC_MAXFRAGMSDU_SET WMI_HECAP_MAC_MAXFRAGMSDU_SET_D2
42975   #define WMI_HECAP_MAC_MINFRAGSZ_GET WMI_HECAP_MAC_MINFRAGSZ_GET_D2
42976   #define WMI_HECAP_MAC_MINFRAGSZ_SET WMI_HECAP_MAC_MINFRAGSZ_SET_D2
42977   #define WMI_HECAP_MAC_TRIGPADDUR_GET WMI_HECAP_MAC_TRIGPADDUR_GET_D2
42978   #define WMI_HECAP_MAC_TRIGPADDUR_SET WMI_HECAP_MAC_TRIGPADDUR_SET_D2
42979   #define WMI_HECAP_MAC_MTID_GET WMI_HECAP_MAC_MTID_GET_D2
42980   #define WMI_HECAP_MAC_MTID_SET WMI_HECAP_MAC_MTID_SET_D2
42981   #define WMI_HECAP_MAC_AMSDUINAMPDU_GET WMI_HECAP_MAC_AMSDUINAMPDU_GET_D2
42982   #define WMI_HECAP_MAC_AMSDUINAMPDU_SET WMI_HECAP_MAC_AMSDUINAMPDU_SET_D2
42983   #define WMI_HECAP_MAC_HELKAD_GET WMI_HECAP_MAC_HELKAD_GET_D2
42984   #define WMI_HECAP_MAC_HELKAD_SET WMI_HECAP_MAC_HELKAD_SET_D2
42985   #define WMI_HECAP_MAC_AACK_GET WMI_HECAP_MAC_AACK_GET_D2
42986   #define WMI_HECAP_MAC_AACK_SET WMI_HECAP_MAC_AACK_SET_D2
42987   #define WMI_HECAP_MAC_ULMURSP_GET WMI_HECAP_MAC_ULMURSP_GET_D2
42988   #define WMI_HECAP_MAC_ULMURSP_SET WMI_HECAP_MAC_ULMURSP_SET_D2
42989   #define WMI_HECAP_MAC_BSR_GET WMI_HECAP_MAC_BSR_GET_D2
42990   #define WMI_HECAP_MAC_BSR_SET WMI_HECAP_MAC_BSR_SET_D2
42991   #define WMI_HECAP_MAC_BCSTTWT_GET WMI_HECAP_MAC_BCSTTWT_GET_D2
42992   #define WMI_HECAP_MAC_BCSTTWT_SET WMI_HECAP_MAC_BCSTTWT_SET_D2
42993   #define WMI_HECAP_MAC_32BITBA_GET WMI_HECAP_MAC_32BITBA_GET_D2
42994   #define WMI_HECAP_MAC_32BITBA_SET WMI_HECAP_MAC_32BITBA_SET_D2
42995   #define WMI_HECAP_MAC_MUCASCADE_GET WMI_HECAP_MAC_MUCASCADE_GET_D2
42996   #define WMI_HECAP_MAC_MUCASCADE_SET WMI_HECAP_MAC_MUCASCADE_SET_D2
42997   #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D2
42998   #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D2
42999   #define WMI_HECAP_MAC_GROUPMSTABA_GET WMI_HECAP_MAC_GROUPMSTABA_GET_D2
43000   #define WMI_HECAP_MAC_GROUPMSTABA_SET WMI_HECAP_MAC_GROUPMSTABA_SET_D2
43001   #define WMI_HECAP_MAC_OMI_GET WMI_HECAP_MAC_OMI_GET_D2
43002   #define WMI_HECAP_MAC_OMI_SET WMI_HECAP_MAC_OMI_SET_D2
43003   #define WMI_HECAP_MAC_OFDMARA_GET WMI_HECAP_MAC_OFDMARA_GET_D2
43004   #define WMI_HECAP_MAC_OFDMARA_SET WMI_HECAP_MAC_OFDMARA_SET_D2
43005   #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D2
43006   #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D2
43007   #define WMI_HECAP_MAC_AMSDUFRAG_GET WMI_HECAP_MAC_AMSDUFRAG_GET_D2
43008   #define WMI_HECAP_MAC_AMSDUFRAG_SET WMI_HECAP_MAC_AMSDUFRAG_SET_D2
43009   #define WMI_HECAP_MAC_FLEXTWT_GET WMI_HECAP_MAC_FLEXTWT_GET_D2
43010   #define WMI_HECAP_MAC_FLEXTWT_SET WMI_HECAP_MAC_FLEXTWT_SET_D2
43011   #define WMI_HECAP_MAC_MBSS_GET WMI_HECAP_MAC_MBSS_GET_D2
43012   #define WMI_HECAP_MAC_MBSS_SET WMI_HECAP_MAC_MBSS_SET_D2
43013   #define WMI_HECAP_MAC_BSRPAMPDU_GET WMI_HECAP_MAC_BSRPAMPDU_GET_D2
43014   #define WMI_HECAP_MAC_BSRPAMPDU_SET WMI_HECAP_MAC_BSRPAMPDU_SET_D2
43015   #define WMI_HECAP_MAC_QTP_GET WMI_HECAP_MAC_QTP_GET_D2
43016   #define WMI_HECAP_MAC_QTP_SET WMI_HECAP_MAC_QTP_SET_D2
43017   #define WMI_HECAP_MAC_ABQR_GET WMI_HECAP_MAC_ABQR_GET_D2
43018   #define WMI_HECAP_MAC_ABQR_SET WMI_HECAP_MAC_ABQR_SET_D2
43019   #define WMI_HECAP_MAC_SRRESP_GET WMI_HECAP_MAC_SRRESP_GET_D2
43020   #define WMI_HECAP_MAC_SRRESP_SET WMI_HECAP_MAC_SRRESP_SET_D2
43021   #define WMI_HECAP_MAC_OPS_GET WMI_HECAP_MAC_OPS_GET_D2
43022   #define WMI_HECAP_MAC_OPS_SET WMI_HECAP_MAC_OPS_SET_D2
43023   #define WMI_HECAP_MAC_NDPFDBKRPT_GET WMI_HECAP_MAC_NDPFDBKRPT_GET_D2
43024   #define WMI_HECAP_MAC_NDPFDBKRPT_SET WMI_HECAP_MAC_NDPFDBKRPT_SET_D2
43025   #define WMI_HECAP_MAC_MBAHECTRL_GET WMI_HECAP_MAC_MBAHECTRL_GET_D2
43026   #define WMI_HECAP_MAC_MBAHECTRL_SET WMI_HECAP_MAC_MBAHECTRL_SET_D2
43027   #define WMI_HECAP_MAC_MURTS_GET WMI_HECAP_MAC_MURTS_GET_D2
43028   #define WMI_HECAP_MAC_MURTS_SET WMI_HECAP_MAC_MURTS_SET_D2
43029   #define WMI_HECAP_PHY_CBMODE_GET WMI_HECAP_PHY_CBMODE_GET_D2
43030   #define WMI_HECAP_PHY_CBMODE_SET WMI_HECAP_PHY_CBMODE_SET_D2
43031   #define WMI_HECAP_PHY_OLTF_GET WMI_HECAP_PHY_OLTF_GET_D2
43032   #define WMI_HECAP_PHY_OLTF_SET WMI_HECAP_PHY_OLTF_SET_D2
43033   #define WMI_HECAP_PHY_SUBFMESTS_GET WMI_HECAP_PHY_SUBFMESTS_GET_D2
43034   #define WMI_HECAP_PHY_SUBFMESTS_SET WMI_HECAP_PHY_SUBFMESTS_SET_D2
43035   #define WMI_HECAP_PHY_PADDING_GET WMI_HECAP_PHY_PADDING_GET_D2
43036   #define WMI_HECAP_PHY_PADDING_SET WMI_HECAP_PHY_PADDING_SET_D2
43037   #define WMI_HECAP_PHY_DLOFMAMUMIMO_GET WMI_HECAP_PHY_DLOFMAMUMIMO_GET_D2
43038   #define WMI_HECAP_PHY_DLOFDMAMUMIO_SET WMI_HECAP_PHY_DLOFDMAMUMIO_SET_D2
43039   #define WMI_HECAP_PHY_32GI_GET WMI_HECAP_PHY_32GI_GET_D2
43040   #define WMI_HECAP_PHY_32GI_SET WMI_HECAP_PHY_32GI_SET_D2
43041   #define WMI_HECAP_PHY_NOSUNDIMENS_GET WMI_HECAP_PHY_NOSUNDIMENS_GET_D2
43042   #define WMI_HECAP_PHY_NOSUNDIMENS_SET WMI_HECAP_PHY_NOSUNDIMENS_SET_D2
43043   #define WMI_HECAP_PHY_40MHZNSS_GET WMI_HECAP_PHY_40MHZNSS_GET_D2
43044   #define WMI_HECAP_PHY_40MHZNSS_SET WMI_HECAP_PHY_40MHZNSS_SET_D2
43045   #define WMI_HECAP_PHY_ULOFDMA_GET WMI_HECAP_PHY_ULOFDMA_GET_D2
43046   #define WMI_HECAP_PHY_ULOFDMA_SET WMI_HECAP_PHY_ULOFDMA_SET_D2
43047   #define WMI_HECAP_PHY_DCM_GET WMI_HECAP_PHY_DCM_GET_D2
43048   #define WMI_HECAP_PHY_DCM_SET WMI_HECAP_PHY_DCM_SET_D2
43049   #define WMI_HECAP_PHY_NSTSLT80MHZ_GET WMI_HECAP_PHY_NSTSLT80MHZ_GET_D2
43050   #define WMI_HECAP_PHY_NSTSLT80MHZ_SET WMI_HECAP_PHY_NSTSLT80MHZ_SET_D2
43051   #define WMI_HECAP_PHY_NSTSGT80MHZ_GET WMI_HECAP_PHY_NSTSGT80MHZ_GET_D2
43052   #define WMI_HECAP_PHY_NSTSGT80MHZ_SET WMI_HECAP_PHY_NSTSGT80MHZ_SET_D2
43053   #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D2
43054   #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D2
43055   #define WMI_HECAP_MAC_PUNCSOUNDING_GET WMI_HECAP_MAC_PUNCSOUNDING_GET_D2
43056   #define WMI_HECAP_MAC_PUNCSOUNDING_SET WMI_HECAP_MAC_PUNCSOUNDING_SET_D2
43057   #define WMI_HECAP_MAC_HTVHTTRIGRX_GET WMI_HECAP_MAC_HTVHTTRIGRX_GET_D2
43058   #define WMI_HECAP_MAC_HTVHTTRIGRX_SET WMI_HECAP_MAC_HTVHTTRIGRX_SET_D2
43059 #endif /* SUPPORT_11AX_D3 */
43060 
43061 
43062 /****** 11BE EHT PHY Capabilities Information field ******/
43063 
43064 /* Bit 0: reserved */
43065 
43066 /* Bit 1: support for 320Mhz in 6 GHz */
43067 #define WMI_EHTCAP_PHY_320MHZIN6GHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 1, 1)
43068 #define WMI_EHTCAP_PHY_320MHZIN6GHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 1, 1, value)
43069 
43070 /* Bit 2: support for 242-tone RU in BW wider than 20Mhz */
43071 #define WMI_EHTCAP_PHY_242TONERUBWLT20MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 2, 1)
43072 #define WMI_EHTCAP_PHY_242TONERUBWLT20MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 2, 1, value)
43073 
43074 /* Bit 3: NDP with 4x EHT-LTF and 3.2us GI */
43075 #define WMI_EHTCAP_PHY_NDP4XEHTLTFAND320NSGI_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 3, 1)
43076 #define WMI_EHTCAP_PHY_NDP4XEHTLTFAND320NSGI_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 3, 1, value)
43077 
43078 /* Bit 4: partial bandwidth UL MU-MIMO */
43079 #define WMI_EHTCAP_PHY_PARTIALBWULMU_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 4, 1)
43080 #define WMI_EHTCAP_PHY_PARTIALBWULMU_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 4, 1, value)
43081 
43082 /* Bit 5: SU beamformer */
43083 #define WMI_EHTCAP_PHY_SUBFMR_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 5, 1)
43084 #define WMI_EHTCAP_PHY_SUBFMR_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 5, 1, value)
43085 
43086 /* Bit 6: SU beamformee */
43087 #define WMI_EHTCAP_PHY_SUBFME_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 6, 1)
43088 #define WMI_EHTCAP_PHY_SUBFME_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 6, 1, value)
43089 
43090 /* Bit 7-9: beamformee SS (<=80Mhz) */
43091 #define WMI_EHTCAP_PHY_BFMESSLT80MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 7, 3)
43092 #define WMI_EHTCAP_PHY_BFMESSLT80MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 7, 3, value)
43093 
43094 /* Bit 10-12: beamformee SS (=160Mhz) */
43095 #define WMI_EHTCAP_PHY_BFMESS160MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 10, 3)
43096 #define WMI_EHTCAP_PHY_BFMESS160MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 10, 3, value)
43097 
43098 /* Bit 13-15: beamformee SS (=320Mhz) */
43099 #define WMI_EHTCAP_PHY_BFMESS320MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 13, 3)
43100 #define WMI_EHTCAP_PHY_BFMESS320MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 13, 3, value)
43101 
43102 /* Bit 16-18: number of sounding dimensions (<=80Mhz) */
43103 #define WMI_EHTCAP_PHY_NUMSOUNDLT80MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 16, 3)
43104 #define WMI_EHTCAP_PHY_NUMSOUNDLT80MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 16, 3, value)
43105 
43106 /* Bit 19-21: number of sounding dimensions (=160Mhz) */
43107 #define WMI_EHTCAP_PHY_NUMSOUND160MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 19, 3)
43108 #define WMI_EHTCAP_PHY_NUMSOUND160MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 19, 3, value)
43109 
43110 /* Bit 22-24: number of sounding dimensions (=320Mhz) */
43111 #define WMI_EHTCAP_PHY_NUMSOUND320MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 22, 3)
43112 #define WMI_EHTCAP_PHY_NUMSOUND320MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 22, 3, value)
43113 
43114 /* Bit 25: ng = 16 SU feedback */
43115 #define WMI_EHTCAP_PHY_NG16SUFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 25, 1)
43116 #define WMI_EHTCAP_PHY_NG16SUFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 25, 1, value)
43117 
43118 /* Bit 26: ng = 16 MU feedback */
43119 #define WMI_EHTCAP_PHY_NG16MUFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 26, 1)
43120 #define WMI_EHTCAP_PHY_NG16MUFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 26, 1, value)
43121 
43122 /* Bit 27: codebook size {4,2} SU feedback */
43123 #define WMI_EHTCAP_PHY_CODBK42SUFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 27, 1)
43124 #define WMI_EHTCAP_PHY_CODBK42SUFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 27, 1, value)
43125 
43126 /* Bit 28: codebook size {7,5} MU feedback */
43127 #define WMI_EHTCAP_PHY_CODBK75MUFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 28, 1)
43128 #define WMI_EHTCAP_PHY_CODBK75MUFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 28, 1, value)
43129 
43130 /* Bit 29: triggered SU beamforming feedback */
43131 #define WMI_EHTCAP_PHY_TRIGSUBFFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 29, 1)
43132 #define WMI_EHTCAP_PHY_TRIGSUBFFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 29, 1, value)
43133 
43134 /* Bit 30: triggered MU beamforming partial BW feedback */
43135 #define WMI_EHTCAP_PHY_TRIGMUBFPARTBWFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 30, 1)
43136 #define WMI_EHTCAP_PHY_TRIGMUBFPARTBWFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 30, 1, value)
43137 
43138 /* Bit 31: triggered CQI feedback */
43139 #define WMI_EHTCAP_PHY_TRIGCQIFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 31, 1)
43140 #define WMI_EHTCAP_PHY_TRIGCQIFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 31, 1, value)
43141 
43142 /* Bit 32: partial bandwidth DL MU-MIMO */
43143 #define WMI_EHTCAP_PHY_PARTBWDLMUMIMO_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 0, 1)
43144 #define WMI_EHTCAP_PHY_PARTBWDLMUMIMO_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 0, 1, value)
43145 
43146 /* Bit 33: PSR-based SR support */
43147 #define WMI_EHTCAP_PHY_PSRSR_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 1, 1)
43148 #define WMI_EHTCAP_PHY_PSRSR_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 1, 1, value)
43149 
43150 /* Bit 34: power boost factor support */
43151 #define WMI_EHTCAP_PHY_PWRBSTFACTOR_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 2, 1)
43152 #define WMI_EHTCAP_PHY_PWRBSTFACTOR_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 2, 1, value)
43153 
43154 /* Bit 35: EHT MU PPDU with 4xEHT-LTF and 0.8us GI */
43155 #define WMI_EHTCAP_PHY_4XEHTLTFAND800NSGI_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 3, 1)
43156 #define WMI_EHTCAP_PHY_4XEHTLTFAND800NSGI_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 3, 1, value)
43157 
43158 /* Bit 36-39: max NC */
43159 #define WMI_EHTCAP_PHY_MAXNC_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 4, 4)
43160 #define WMI_EHTCAP_PHY_MAXNC_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 4, 4, value)
43161 
43162 /* Bit 40: non-triggered CQI feedback */
43163 #define WMI_EHTCAP_PHY_NONTRIGCQIFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 8, 1)
43164 #define WMI_EHTCAP_PHY_NONTRIGCQIFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 8, 1, value)
43165 
43166 /* Bit 41: Tx 1024-QAM and 4096-QAM < 242-tone RU support */
43167 #define WMI_EHTCAP_PHY_TX1024AND4096QAMLS242TONERU_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 9, 1)
43168 #define WMI_EHTCAP_PHY_TX1024AND4096QAMLS242TONERU_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 9, 1, value)
43169 
43170 /* Bit 42: Rx 1024-QAM and 4096-QAM < 242-tone RU support */
43171 #define WMI_EHTCAP_PHY_RX1024AND4096QAMLS242TONERU_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 10, 1)
43172 #define WMI_EHTCAP_PHY_RX1024AND4096QAMLS242TONERU_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 10, 1, value)
43173 
43174 /* Bit 43: PPE thresholds present */
43175 #define WMI_EHTCAP_PHY_PPETHRESPRESENT_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 11, 1)
43176 #define WMI_EHTCAP_PHY_PPETHRESPRESENT_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 11, 1, value)
43177 
43178 /* Bit 44-45: common nominal packet padding */
43179 #define WMI_EHTCAP_PHY_CMNNOMPKTPAD_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 12, 2)
43180 #define WMI_EHTCAP_PHY_CMNNOMPKTPAD_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 12, 2, value)
43181 
43182 /* Bit 46-50: max number of supported EHT-LTFs */
43183 #define WMI_EHTCAP_PHY_MAXNUMEHTLTF_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 14, 5)
43184 #define WMI_EHTCAP_PHY_MAXNUMEHTLTF_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 14, 5, value)
43185 
43186 /* Bit 51-54: support of MCS 15 */
43187 #define WMI_EHTCAP_PHY_SUPMCS15_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 19, 4)
43188 #define WMI_EHTCAP_PHY_SUPMCS15_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 19, 4, value)
43189 
43190 /* Bit 55: support of EHT DUP in 6 GHz */
43191 #define WMI_EHTCAP_PHY_EHTDUPIN6GHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 23, 1)
43192 #define WMI_EHTCAP_PHY_EHTDUPIN6GHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 23, 1, value)
43193 
43194 /* Bit 56: support for 20Mhz operating STA receiving NDP with wider bandwidth */
43195 #define WMI_EHTCAP_PHY_20MHZOPSTARXNDPWIDERBW_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 24, 1)
43196 #define WMI_EHTCAP_PHY_20MHZOPSTARXNDPWIDERBW_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 24, 1, value)
43197 
43198 /* Bit 57: non-OFDMA UL MU-MIMO (bw <= 80Mhz) */
43199 #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMOLT80MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 25, 1)
43200 #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMOLT80MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 25, 1, value)
43201 
43202 /* Bit 58: non-OFDMA UL MU-MIMO (bw = 160Mhz) */
43203 #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMO160MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 26, 1)
43204 #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMO160MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 26, 1, value)
43205 
43206 /* Bit 59: non-OFDMA UL MU-MIMO (bw = 320Mhz) */
43207 #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMO320MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 27, 1)
43208 #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMO320MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 27, 1, value)
43209 
43210 /* Bit 60: MU beamformer (bw <= 80Mhz) */
43211 #define WMI_EHTCAP_PHY_MUBFMRLT80MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 28, 1)
43212 #define WMI_EHTCAP_PHY_MUBFMRLT80MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 28, 1, value)
43213 
43214 /* Bit 61: MU beamformer (bw = 160Mhz) */
43215 #define WMI_EHTCAP_PHY_MUBFMR160MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 29, 1)
43216 #define WMI_EHTCAP_PHY_MUBFMR160MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 29, 1, value)
43217 
43218 /* Bit 62: MU beamformer (bw = 320Mhz) */
43219 #define WMI_EHTCAP_PHY_MUBFMR320MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 30, 1)
43220 #define WMI_EHTCAP_PHY_MUBFMR320MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 30, 1, value)
43221 
43222 /* Bit 63: TB sounding feedback rate limit */
43223 #define WMI_EHTCAP_PHY_TBSUNDFBRATELIMIT_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 31, 1)
43224 #define WMI_EHTCAP_PHY_TBSUNDFBRATELIMIT_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 31, 1, value)
43225 
43226 /* Bit 64: Rx 1024-QAM in wider bandwidth DL OFDMA support */
43227 #define WMI_EHTCAP_PHY_RX1024QAMWIDERBWDLOFDMA_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[2], 0, 1)
43228 #define WMI_EHTCAP_PHY_RX1024QAMWIDERBWDLOFDMA_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[2], 0, 1, value)
43229 
43230 /* Bit 65: Rx 4096-QAM in wider bandwidth DL OFDMA support */
43231 #define WMI_EHTCAP_PHY_RX4096QAMWIDERBWDLOFDMA_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[2], 1, 1)
43232 #define WMI_EHTCAP_PHY_RX4096QAMWIDERBWDLOFDMA_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[2], 1, 1, value)
43233 
43234 /* Bit 66: 20Mhz-only limited capabilities support */
43235 #define WMI_EHTCAP_PHY_20MHZ_ONLY_CAPS_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[2], 2, 1)
43236 #define WMI_EHTCAP_PHY_20MHZ_ONLY_CAPS_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[2], 2, 1, value)
43237 
43238 /* Bit 67: 20Mhz-only triggered MU beamforming full BW feedback and DL MU-MIMO */
43239 #define WMI_EHTCAP_PHY_20MHZ_ONLY_TRIGGER_MUBF_FULL_BW_FB_AND_DLMUMIMO_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[2], 3, 1)
43240 #define WMI_EHTCAP_PHY_20MHZ_ONLY_TRIGGER_MUBF_FULL_BW_FB_AND_DLMUMIMO_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[2], 3, 1, value)
43241 
43242 /* Bit 68: 20Mhz-only M-RU support */
43243 #define WMI_EHTCAP_PHY_20MHZ_ONLY_MRU_SUPP_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[2], 4, 1)
43244 #define WMI_EHTCAP_PHY_20MHZ_ONLY_MRU_SUPP_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[2], 4, 1, value)
43245 
43246 
43247 /* Bits 69-71: reserved */
43248 
43249 /****** End of 11BE EHT PHY Capabilities Information field ******/
43250 
43251 /****** 11BE EHT MAC Capabilities Information field ******/
43252 
43253 /* Bit 0: NSEP/EPCS priority access supported: draft1.4 change the name from NSEP to EPCS
43254  *        To compatible with <= draft 1.4 ver, we keep 2 define there, but same bit.
43255  */
43256 #define WMI_EHTCAP_MAC_NSEPPRIACCESS_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 0, 1)
43257 #define WMI_EHTCAP_MAC_NSEPPRIACCESS_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 0, 1, value)
43258 #define WMI_EHTCAP_MAC_EPCSPRIACCESS_GET(eht_cap_mac) WMI_EHTCAP_MAC_NSEPPRIACCESS_GET(eht_cap_mac)
43259 #define WMI_EHTCAP_MAC_EPCSPRIACCESS_SET(eht_cap_mac, value) WMI_EHTCAP_MAC_NSEPPRIACCESS_SET(eht_cap_mac, value)
43260 
43261 /* Bit 1: EHT OM control support */
43262 #define WMI_EHTCAP_MAC_EHTOMCTRL_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 1, 1)
43263 #define WMI_EHTCAP_MAC_EHTOMCTRL_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 1, 1, value)
43264 
43265 /* Bit 2: triggered TXOP mode 1 support
43266  *        As in draft 1.4, we define mode2 and to compatible with old version, we keep 2 define there, but same bit.
43267  */
43268 #define WMI_EHTCAP_MAC_TRIGTXOP_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 2, 1)
43269 #define WMI_EHTCAP_MAC_TRIGTXOP_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 2, 1, value)
43270 #define WMI_EHTCAP_MAC_TRIGTXOPMODE1_GET(eht_cap_mac) WMI_EHTCAP_MAC_TRIGTXOP_GET(eht_cap_mac)
43271 #define WMI_EHTCAP_MAC_TRIGTXOPMODE1_SET(eht_cap_mac, value) WMI_EHTCAP_MAC_TRIGTXOP_SET(eht_cap_mac, value)
43272 
43273 /* Bit 3: triggered TXOP mode 2 support */
43274 #define WMI_EHTCAP_MAC_TRIGTXOPMODE2_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 3, 1)
43275 #define WMI_EHTCAP_MAC_TRIGTXOPMODE2_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 3, 1, value)
43276 
43277 /* Bit 4: restricted TWT support */
43278 #define WMI_EHTCAP_MAC_RESTRICTTWT_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 4, 1)
43279 #define WMI_EHTCAP_MAC_RESTRICTTWT_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 4, 1, value)
43280 
43281 /* Bit 5: SCS traffic description support */
43282 #define WMI_EHTCAP_MAC_SCSTRAFFICDESC_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 5, 1)
43283 #define WMI_EHTCAP_MAC_SCSTRAFFICDESC_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 5, 1, value)
43284 
43285 /* Bit 6-7: maximum MPDU length */
43286 #define WMI_EHTCAP_MAC_MAXMPDULEN_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 6, 2)
43287 #define WMI_EHTCAP_MAC_MAXMPDULEN_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 6, 2, value)
43288 
43289 /* Bit 8: Maximum A-MPDU Length Exponent Extension */
43290 #define WMI_EHTCAP_MAC_MAXAMPDULEN_EXP_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 8, 1)
43291 #define WMI_EHTCAP_MAC_MAXAMPDULEN_EXP_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 8, 1, value)
43292 
43293 /* Bit 9: EHT TRS support */
43294 #define WMI_EHTCAP_MAC_TRS_SUPPORT_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 9, 1)
43295 #define WMI_EHTCAP_MAC_TRS_SUPPORT_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 9, 1, value)
43296 
43297 /* Bit 10: TXOP return support in txop sharing mode 2 */
43298 #define WMI_EHTCAP_MAC_TXOP_RETURN_SUPP_IN_SHARINGMODE2_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 10, 1)
43299 #define WMI_EHTCAP_MAC_TXOP_RETURN_SUPP_IN_SHARINGMODE2_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 10, 1, value)
43300 
43301 /* Bit 11: two BQRs support */
43302 #define WMI_EHTCAP_MAC_TWO_BQRS_SUPP_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 11, 1)
43303 #define WMI_EHTCAP_MAC_TWO_BQRS_SUPP_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 11, 1, value)
43304 
43305 /* Bit 12-13: EHT link adaptation support */
43306 #define WMI_EHTCAP_MAC_EHT_LINK_ADAPTATION_SUPP_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 12, 2)
43307 #define WMI_EHTCAP_MAC_EHT_LINK_ADAPTATION_SUPP_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 12, 2, value)
43308 
43309 /* Bit 14-15: reserved */
43310 
43311 /****** End of 11BE EHT MAC Capabilities Information field ******/
43312 
43313 
43314 typedef struct {
43315     /** TLV tag and len; tag equals
43316     * WMITLV_TAG_STRUC_wmi_cfr_capture_event_fixed_param */
43317     A_UINT32 tlv_header;
43318     /* Method used to capture CFR - of type WMI_PEER_CFR_CAPTURE_METHOD */
43319     A_UINT32 capture_method;
43320     /* VDEV identifier */
43321     A_UINT32 vdev_id;
43322     /* Peer MAC address. In AP mode, this is the address of the connected peer
43323      * for which CFR capture is needed. In case of STA mode, this is the address
43324      * of the AP to which the STA is connected
43325      */
43326     wmi_mac_addr mac_addr;
43327     /* primary 20 MHz channel frequency in mhz */
43328     A_UINT32 chan_mhz;
43329     /* BW of measurement - of type WMI_PEER_CFR_CAPTURE_BW */
43330     A_UINT32 bandwidth;
43331     /* phy mode WLAN_PHY_MODE of the channel defined in wlan_defs.h*/
43332     A_UINT32 phy_mode;
43333     /* Center frequency 1 in MHz*/
43334     A_UINT32 band_center_freq1;
43335     /* Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
43336     A_UINT32 band_center_freq2;
43337     /* Number of spatial streams */
43338     A_UINT32 sts_count;
43339     /* Bits 31:0:   address of data from wmi_dma_buf_release_entry [31:0] */
43340     A_UINT32 correlation_info_1;
43341     /* Bits 11:0:   address of data from wmi_dma_buf_release_entry [43:32]
43342      * Bits 15:12:  reserved (set to 0x0)
43343      * Bits 31:16:  hardware PPDU ID [15:0]
43344      */
43345     A_UINT32 correlation_info_2;
43346     /* Bits 1:0:    TX status (if any); values defined in enum
43347     *               WMI_FRAME_TX_STATUS
43348      * Bits 30:2:   reserved (set to 0x0)
43349      * Bit  31:     Status of the CFR capture of the peer
43350      *              1 (True) - Successful; 0 (False) - Not successful
43351      */
43352     A_UINT32 status;
43353     /* Timestamp in microseconds at which the CFR was captured in the hardware.
43354      * The clock used for this timestamp is private to the target and
43355      * is not visible to the host i.e., Host can interpret only the
43356      * relative timestamp deltas from one message to the next,
43357      * but can't interpret the absolute timestamp from a single message.
43358      */
43359     A_UINT32 timestamp_us;
43360     /*
43361      * Count of the current CFR capture from FW.
43362      * This is helpful to identify any drops in FW.
43363      */
43364     A_UINT32 counter;
43365     /* Per chain RSSI of the peer, for up to WMI_MAX_CHAINS.
43366      * Each chain's entry reports the RSSI for different bands in dBm units.
43367      * Use WMI_UNIFIED_CHAIN_RSSI_GET to extract the value for a particular
43368      * band.
43369      * A band value of 0x80 (-128) is invalid.
43370      */
43371     A_UINT32 chain_rssi[WMI_MAX_CHAINS];
43372     /* Carrier frequency offset
43373        It is Difference between down conversion oscillator frequency at the receiver
43374        versus carrier frequency of the received signal. To convert to ppm, below
43375        equation needs to be used. Here, Fc is carrier frequency (primary 20 channel frequency) in Hz:
43376 
43377        PPM = cfo_measurement(13 bits)/((2^13)/(800e-9)/2/Fc*1e6)
43378        PPM ranges from -40 to +40
43379 
43380        Bits 0  : 0   Set to 1 to indicate cfo measurement value is valid
43381        Bits 1  : 14  14 bits cfo measurement raw data. 14 bit is signed bit.
43382                      For the above ppm equation , use the first 13 bits to calculate.
43383      */
43384     A_UINT32 cfo_measurement_valid :1,
43385              cfo_measurement :14,
43386              reserved :17;
43387 
43388     /* RX packet start timestamp.
43389      * It reports the time the first L-STF ADC sample arrived at RX antenna
43390      * It is in units of 480 MHz clock, i.e. number of clock cycles at 480 MHz.
43391      */
43392     A_UINT32 rx_start_ts;
43393 
43394     /*
43395      * The rx_ts_reset flag will be set to 1 upon every reset of rx_start_ts.
43396      */
43397     A_UINT32 rx_ts_reset;
43398 
43399     /*
43400      * MCS and Guard Interval.
43401      * MCS: For legacy mode only
43402      *    0: 48 Mbps
43403      *    1: 24 Mbps
43404      *    2: 12 Mbps
43405      *    3: 6 Mbps
43406      *    4: 54 Mbps
43407      *    5: 36 Mbps
43408      *    6: 18 Mbps
43409      *    7: 9 Mbps
43410      *    8-254: reserved
43411      *    255:   invalid entry
43412      *
43413      * GI: For Legacy mode only
43414      *    0: 0.8 us
43415      *    1: 0.4 us
43416      *    2: 1.6 us
43417      *    3: 3.2 us
43418      *    4-254: reserved
43419      *    255:   invalid entry
43420      *
43421      * Bits 0:7        mcs
43422      * Bits 8:15       gi_type
43423      * Bits 16:31      reserved
43424      */
43425     A_UINT32 mcs_gi_info;
43426 } wmi_peer_cfr_capture_event_fixed_param;
43427 
43428 #define WMI_CFR_MCS_GET(mcs_gi_info) \
43429         WMI_GET_BITS(mcs_gi_info, 0, 8)
43430 
43431 #define WMI_CFR_MCS_SET(mcs_gi_info, value) \
43432         WMI_SET_BITS(mcs_gi_info, 0, 8, value)
43433 
43434 #define WMI_CFR_GI_TYPE_GET(mcs_gi_info) \
43435         WMI_GET_BITS(mcs_gi_info, 8, 8)
43436 
43437 #define WMI_CFR_GI_TYPE_SET(mcs_gi_info, value) \
43438         WMI_SET_BITS(mcs_gi_info, 8, 8, value)
43439 
43440 
43441 #define WMI_UNIFIED_CHAIN_PHASE_MASK 0x0000ffff
43442 #define WMI_UNIFIED_CHAIN_PHASE_GET(tlv, chain_idx) \
43443     ((A_UINT16) ((tlv)->chain_phase[chain_idx] & WMI_UNIFIED_CHAIN_PHASE_MASK))
43444 #define WMI_UNIFIED_CHAIN_PHASE_SET(tlv, chain_idx, value) \
43445     (tlv)->chain_phase[chain_idx] = (WMI_UNIFIED_CHAIN_PHASE_MASK & (value))
43446 
43447 #define WMI_CFR_AGC_GAIN_CHAINS_PER_U32 4
43448 #define WMI_UNIFIED_AGC_GAIN_MASK 0x000000ff
43449 #define WMI_UNIFIED_AGC_GAIN_GET(tlv, chain_idx) \
43450     ((A_UINT8) ((tlv)->agc_gain_index[(chain_idx)/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] >> \
43451         ((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8) & WMI_UNIFIED_AGC_GAIN_MASK)
43452 #define WMI_UNIFIED_AGC_GAIN_SET(tlv, chain_idx, value) \
43453     (tlv)->agc_gain_index[chain_idx/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] = \
43454         (tlv)->agc_gain_index[chain_idx/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] & \
43455             ~(0xff << (((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8)) | \
43456             (((value)<<((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8))
43457 
43458 #define WMI_UNIFIED_AGC_GAIN_TBL_IDX_GET(tlv, chain_idx) \
43459     ((A_UINT8) ((tlv)->agc_gain_tbl_index[(chain_idx)/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] >> \
43460         ((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8) & WMI_UNIFIED_AGC_GAIN_MASK)
43461 
43462 #define WMI_UNIFIED_AGC_GAIN_TBL_IDX_SET(tlv, chain_idx, value) \
43463     (tlv)->agc_gain_tbl_index[chain_idx/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] = \
43464         (tlv)->agc_gain_tbl_index[chain_idx/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] & \
43465             ~(0xff << (((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8)) | \
43466             (((value)<<((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8))
43467 
43468 typedef struct {
43469     /** TLV tag and len; tag equals
43470     * WMITLV_TAG_STRUC_wmi_peer_cfr_capture_event_phase_fixed_param */
43471     A_UINT32 tlv_header;
43472 
43473     /* Per chain AoA phase data of the Peer, for up to WMI_MAX_CHAINS.
43474      * USE WMI_UNIFIED_CHAIN_PHASE_GET to extract the phase value for
43475      * a particular chain.
43476      * Only lower 2 bytes will contain phase data for a particular chain.
43477      * The values in phase data will be from 0  1023 as mapping of
43478      * 0-359 degrees using the formula -
43479      * phase data = phase in degrees * 1024 / 360
43480      *
43481      * Target will set 0xFFFF for all invalid chains.
43482      *
43483      * The WMI_UNIFIED_CHAIN_PHASE_GET/SET macros can be used to access
43484      * the valid portion of the 4-byte word containing the chain phase data.
43485      */
43486     A_UINT32 chain_phase[WMI_MAX_CHAINS];
43487 
43488     /* agc_gain_index
43489      * It shows an index in the AGC gain LUT.
43490      * agc gain should be in range between 0 to 62.
43491      * 4 AGC gain index values are packed into each A_UINT32 word;
43492      * use the WMI_UNITIFED_AGC_GAIN_GET/SET macros to read/write
43493      * the AGC gain indices for individual chains.
43494      */
43495     A_UINT32 agc_gain_index[WMI_MAX_CHAINS/WMI_CFR_AGC_GAIN_CHAINS_PER_U32];
43496 
43497     /*
43498      * Each chain is provided with 8 bits within agc_gain_tbl_index.
43499      * The value for each of these 8-bit portions is between 0 to 2:
43500      *  0 : Default Gain Table
43501      *  1 : Low RF Gain Table.
43502      *      Low gain applied at RF as compared to gains applied when
43503      *      gain_table _idx = 0 is selected.
43504      *  2 : Very Low RF Gain Table.
43505      *      It's similar to above with even lower gains applied.
43506      *
43507      * AoA should use the normal/regular GLUT, thus GAIN_TABLE_IDX
43508      * should always be 0. If it is not 0, it means that there was
43509      * out-of-band blocker causing the hardware to pick a different
43510      * gain table. In that case, AoA result will not be reliable.
43511      * Therefore, the recommendation is to stop doing AoA if
43512      * GAIN_TABLE_IDX != 0 and indicate error.
43513      */
43514     A_UINT32 agc_gain_tbl_index[WMI_MAX_CHAINS/WMI_CFR_AGC_GAIN_CHAINS_PER_U32];
43515 } wmi_peer_cfr_capture_event_phase_fixed_param;
43516 
43517 #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_OK      0x80000000
43518 #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_OK_S    31
43519 
43520 /* Failed to capture CFR as peer is in power save mode */
43521 #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_PS_FAILED      0x40000000
43522 #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_PS_FAILED_S    30
43523 
43524 #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_TX      0x00000003
43525 #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_TX_S    0
43526 
43527 /**
43528  *  wmi_cold_boot_cal_data config flags
43529  *  BIT 0     : 1 means more data will come, 0 means last event
43530  *  BIT 1-31  : Reserved
43531  */
43532 #define WMI_COLD_BOOT_CAL_DATA_SET_IS_MORE_DATA(flags, val)      WMI_SET_BITS(flags, 0, 1, val)
43533 #define WMI_COLD_BOOT_CAL_DATA_GET_IS_MORE_DATA(flags)           WMI_GET_BITS(flags, 0, 1)
43534 
43535 typedef struct {
43536     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_cold_boot_cal_data_fixed_param */
43537     A_UINT32 data_len; /** length in byte of data[]. */
43538     A_UINT32 flags; /** config flags : Only 0th bit is used, bit 1-31 are reserved */
43539 /* Following this structure is the TLV:
43540  *      A_UINT8 data[]; <-- length in byte given by field data_len.
43541  * This data array contains cold boot data calibration raw data.
43542  */
43543 } wmi_cold_boot_cal_data_fixed_param;
43544 
43545 typedef struct {
43546     A_UINT32 tlv_header;    /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_rap_info_event_fixed_param */
43547     /** pdev_id for identifying the MAC, the default value is WMI_PDEV_ID_SOC
43548       * See macros starting with WMI_PDEV_ID_ for values.
43549       */
43550     A_UINT32 pdev_id;
43551     A_UINT32 type; /** type of the rogue ap, see WMI_ROGUE_AP_TYPE */
43552     wmi_mac_addr bssid; /** bssid of the rogue ap */
43553 } wmi_pdev_rap_info_event_fixed_param;
43554 
43555 typedef struct {
43556     A_UINT32 tlv_header;    /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_sched_tidq_susp_info_event_fixed_param */
43557     A_UINT32 pdev_id; /** pdev id */
43558     A_UINT32 tid_num; /** tid_num that is suspended */
43559     A_UINT32 suspended_time_ms; /** time for which tid has been suspended in ms */
43560 } wmi_pdev_sched_tidq_susp_info_event_fixed_param;
43561 
43562 /*
43563  * WMI API for Firmware to indicate iface combinations which Firmware
43564  * support to Host
43565  */
43566 typedef struct {
43567     A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_wlanfw_iface_cmb_ind_event_fixed_param */
43568 
43569     /* common part */
43570     /* Consider DBS/DBDC for this new implementation */
43571     A_UINT32 pdev_n;
43572 
43573     /* iface combinations part -
43574      * Use subsequent TLV arrays to list supported combinations of interfaces.
43575      */
43576 
43577 /*
43578  * The TLVs listing interface combinations, will follow this TLV.
43579  * The number of combinations can be calculated by dividing the
43580  * TLV array length by the TLV array element length.
43581  *
43582  * The fixed_param TLV is directly followed by a list of
43583  * wlanfw_iface_combination elements:
43584  *     wlanfw_iface_combination combinations[0];
43585  *     wlanfw_iface_combination combinations[1];
43586  *     ...
43587  *     wlanfw_iface_combination combinations[N];
43588  *
43589  * After the list of wlanfw_iface_combinations is a list of interface limits.
43590  * The cmb_limits field of each wlanfw_iface_combination show which of the
43591  * limits within the "wlanfw_ifact_limit limits" list belong to that
43592  * iface_combination:
43593  *     limits[0]                                     <- cmb 0, limit 0
43594  *     ...
43595  *     limits[cmb[0].cmb_limits-1]                   <- cmb 0, limit N
43596  *     limits[cmb[0].cmb_limits]                     <- cmb 1, limit 0
43597  *     ...
43598  *     limits[cmb[0].cmb_limits+cmb[1].cmb_limits-1] <- cmb 1, limit N
43599  *     limits[cmb[0].cmb_limits+cmb[1].cmb_limits]   <- cmb 2, limit 0
43600  *     ...
43601  */
43602 } wmi_wlanfw_iface_cmb_ind_event_fixed_param;
43603 
43604 typedef struct {
43605     A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_wlanfw_iface_limit_param */
43606     /*
43607      * How many vdevs can work as below vdev_type/vdev_subtype
43608      * in one combination.
43609      */
43610     A_UINT32 vdev_limit_n;
43611     /*
43612      * Indicate what role above vdevs can work as.
43613      * Refer to "WMI_VDEV_TYPE_xx, WMI_UNIFIED_VDEV_SUBTYPE_xx"
43614      * for roles definition.
43615      */
43616     A_UINT32 vdev_type;
43617     A_UINT32 vdev_subtype;
43618 } wlanfw_iface_limit;
43619 
43620 /**
43621  * @brief specific configuration of valid_fields for host.
43622  * These flags are used for indicating which fields in wlanfw_iface_combination
43623  * contains valid value for Host Driver.
43624  * 0: Host can ignore this field
43625  * 1: field contains valid value for Host Driver
43626  */
43627 
43628 #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_S 0
43629 #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_M 0x1
43630 
43631 #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_S 1
43632 #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_M 0x2
43633 
43634 #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_S 2
43635 #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_M 0x4
43636 
43637 #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_S 3
43638 #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_M 0x8
43639 
43640 #define WMI_CMB_VALID_FIELDS_FLAG_SET(word32, flag, value) \
43641     do { \
43642         (word32) &= ~WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _M; \
43643         (word32) |= ((value) << WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _S) & \
43644             WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _M; \
43645     } while (0)
43646 
43647 #define WMI_CMB_VALID_FIELDS_FLAG_GET(word32, flag) \
43648     (((word32) & WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _M) >> \
43649     WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _S)
43650 
43651 #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_SET(word32, value) \
43652     WMI_CMB_VALID_FIELDS_FLAG_SET((word32), PEER_MAX, (value))
43653 #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_GET(word32) \
43654     WMI_CMB_VALID_FIELDS_FLAG_GET((word32), PEER_MAX)
43655 
43656 #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_SET(word32, value) \
43657     WMI_CMB_VALID_FIELDS_FLAG_SET((word32), STA_AP_BCN_INT_MATCH, (value))
43658 #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_GET(word32) \
43659     WMI_CMB_VALID_FIELDS_FLAG_GET((word32), STA_AP_BCN_INT_MATCH)
43660 
43661 #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_SET(word32, value) \
43662     WMI_CMB_VALID_FIELDS_FLAG_SET((word32), BCN_INT_MIN, (value))
43663 #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_GET(word32) \
43664     WMI_CMB_VALID_FIELDS_FLAG_GET((word32), BCN_INT_MIN)
43665 
43666 #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_SET(word32, value) \
43667     WMI_CMB_VALID_FIELDS_FLAG_SET((word32), BCN_INT_N, (value))
43668 #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_GET(word32) \
43669     WMI_CMB_VALID_FIELDS_FLAG_GET((word32), BCN_INT_N)
43670 
43671 typedef struct {
43672     A_UINT32 tlv_header;
43673     /*
43674      * Max num Peers can be supported in this combination.
43675      * It excludes the self-peers associated with each vdev.
43676      * It's the number of real remote peers.
43677      * eg: when working as AP mode, indicating how many clients can be
43678      * supported to connect with this AP.
43679      */
43680     A_UINT32 peer_max;
43681     /* Home Channels supported on one single phy concurrently */
43682     A_UINT32 channel_n;
43683     /*
43684      * The number of "wlanfw_iface_limit" for a specified combination.
43685      * eg: there is 2 vdev, including 1 AP vdev and 1 STA vdev, then this
43686      * cmb_limits will be 2 for this combination.
43687      */
43688     A_UINT32 cmb_limits;
43689     /*
43690      * Beacon intervals for STA and AP types need to be match or not.
43691      * 1: need to be match
43692      * 0: not need
43693      */
43694     A_UINT32 sta_ap_bcn_int_match;
43695     /*
43696      * This combination supports different beacon intervals or not.
43697      * 0: Beacon interval is same for all interface
43698      * !0: STA Beacon interval AND GCD of AP Beacon intervals
43699      *     should be greater or equal to this value.
43700      */
43701     A_UINT32 bcn_int_min;
43702     /*
43703      * Number of different Beacon intervals
43704      */
43705     A_UINT32 bcn_int_n;
43706 
43707     /*
43708      * This indicates which field in this struct
43709      * contains valid value for Host Driver.
43710      * Refer to definitions for "WMI_CMB_VALID_FIELDS_FLAG_xx".
43711      */
43712     A_UINT32 valid_fields;
43713 } wlanfw_iface_combination;
43714 
43715 typedef struct {
43716     /** TLV tag and len; tag equals
43717     * WMITLV_TAG_STRUC_wmi_set_elna_bypass_cmd_fixed_param */
43718     A_UINT32 tlv_header;
43719     /* VDEV identifier */
43720     A_UINT32 vdev_id;
43721     /** 1-Enable, 0-Disable */
43722     A_UINT32 en_dis;
43723 } wmi_set_elna_bypass_cmd_fixed_param;
43724 
43725 typedef struct {
43726     /** TLV tag and len; tag equals
43727     * WMITLV_TAG_STRUC_wmi_get_elna_bypass_cmd_fixed_param */
43728     A_UINT32 tlv_header;
43729     /* VDEV identifier */
43730     A_UINT32 vdev_id;
43731 } wmi_get_elna_bypass_cmd_fixed_param;
43732 
43733 typedef struct {
43734     A_UINT32 tlv_header;    /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_elna_bypass_event_fixed_param */
43735     /* VDEV identifier */
43736     A_UINT32 vdev_id;
43737     /** 1-Enable, 0-Disable */
43738     A_UINT32 en_dis;
43739 } wmi_get_elna_bypass_event_fixed_param;
43740 
43741 typedef struct {
43742     /** TLV tag and len; tag equals
43743      * WMITLV_TAG_STRUC_wmi_get_channel_ani_cmd_fixed_param
43744      */
43745     A_UINT32 tlv_header;
43746     /**
43747      * TLV (tag length value) parameters follow the
43748      * structure. The TLV's are:
43749      * list of channels (center freq of primary 20 MHz of the channel, in MHz)
43750      * A_UINT32 channel_list[];
43751      */
43752 } wmi_get_channel_ani_cmd_fixed_param;
43753 
43754 typedef struct {
43755     /** TLV tag and len; tag equals
43756      * WMITLV_TAG_STRUC_wmi_get_channel_ani_event_fixed_param
43757      */
43758     A_UINT32 tlv_header;
43759     /**
43760      * TLV (tag length value) parameters follow the
43761      * structure. The TLV's are:
43762      * wmi_channel_ani_info_tlv_param ani_info[];
43763      */
43764 } wmi_get_channel_ani_event_fixed_param;
43765 
43766 typedef struct {
43767     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_ani_info_tlv_param */
43768     A_UINT32 tlv_header;
43769     /** channel freq (center of 20 MHz primary channel) in MHz */
43770     A_UINT32 chan_freq;
43771     /**
43772      * ANI (noise interference) level corresponding to the channel.
43773      * Values range from [0-9], with higher values indicating more
43774      * noise interference.
43775      */
43776     A_UINT32 ani_level;
43777 } wmi_channel_ani_info_tlv_param;
43778 
43779 /* This command is to specify to enable/disable audio frame aggr */
43780 typedef struct {
43781     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_enable_cmd_fixed_param */
43782     A_UINT32 aggr_enable; /* enable aggregation for audio frame */
43783     A_UINT32 tbd_enable;  /* enable time_based discarding for audio frame */
43784     A_UINT32 vdev_id;
43785 } wmi_audio_aggr_enable_cmd_fixed_param;
43786 
43787 typedef struct wmi_audio_aggr_rate_set_s {
43788     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_audio_aggr_rate_set */
43789     A_UINT32 mcs;
43790     A_UINT32 bandwidth; /* 0 for 20M, 1 for 40M and 2 for 80M, etc. */
43791     A_UINT32 vdev_id;
43792 } WMI_AUDIO_AGGR_RATE_SET_T;
43793 
43794 typedef struct {
43795     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_add_group */
43796     A_UINT32 group_id;      /* id of audio group */
43797     wmi_mac_addr multicast_addr; /* multicast address of audio group */
43798     A_UINT32 vdev_id;
43799 } wmi_audio_aggr_add_group_cmd_fixed_param;
43800 
43801 typedef struct {
43802     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_del_group */
43803     A_UINT32 group_id;
43804     A_UINT32 vdev_id;
43805 } wmi_audio_aggr_del_group_cmd_fixed_param;
43806 
43807 typedef struct {
43808     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_set_group_rate */
43809     A_UINT32 group_id;
43810     A_UINT32 vdev_id;
43811     /**
43812      * TLV (tag length value) parameters follow the
43813      * structure. The TLV's are:
43814      * WMI_AUDIO_AGGR_RATE_SET_T rate_set[];
43815      **/
43816 } wmi_audio_aggr_set_group_rate_cmd_fixed_param;
43817 
43818 typedef struct {
43819     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_set_group_retry */
43820     A_UINT32 group_id;
43821     A_UINT32 retry_thresh;
43822     A_UINT32 vdev_id;
43823 } wmi_audio_aggr_set_group_retry_cmd_fixed_param;
43824 
43825 typedef struct {
43826     A_UINT32 tlv_header;
43827     A_UINT32 vdev_id;
43828     A_UINT32 group_id;
43829     /*
43830      * bit0: if set, Enable HT20
43831      * bit1: if set, Enable HT40
43832      * bit2, bit3: Reserved
43833      * bit4: if set, Enable VHT20
43834      * bit5: if set, Enable VHT40
43835      * bit6: if set, Enable VHT80
43836      * bit7 ~ bit31: Reserved
43837      */
43838     A_UINT32 bw;
43839     A_UINT32 mcs_min;
43840     A_UINT32 mcs_max;
43841     A_UINT32 mcs_offset;
43842     A_UINT32 nss;
43843 } wmi_audio_aggr_set_group_auto_rate_cmd_fixed_param;
43844 
43845 typedef struct {
43846     A_UINT32 tlv_header;
43847     A_UINT32 vdev_id;
43848     A_UINT32 group_id;
43849     A_UINT32 interval;
43850 } wmi_audio_aggr_set_group_probe_cmd_fixed_param;
43851 
43852 typedef struct {
43853     /**
43854      * TLV tag and len;
43855      * tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_update_sta_group_info */
43856     A_UINT32 tlv_header;
43857 
43858     /* vdev id */
43859     A_UINT32 vdev_id; /* which STA/vdev's group membership is being specified */
43860 
43861     /* bitmap that indicates which groups this sta belongs to */
43862     A_UINT32 group_bmap;
43863 
43864 /*
43865  * This fixed_param struct is followed by a TLV array of wmi_mac_addr,
43866  * which specifies the multi-cast MAC address used for each group.
43867  * The number of elements within the TLV array matches the number of bits
43868  * set within group_bmap.
43869  */
43870 } wmi_audio_aggr_update_sta_group_info_cmd_fixed_param;
43871 
43872 typedef struct {
43873     /** TLV tag and len **/
43874     A_UINT32 tlv_header;
43875     /* VDEV identifier */
43876     A_UINT32 vdev_id;
43877     /*
43878      * Identifier from Host to indicate how many this cmd been sent to FW.
43879      * This value will be echoed back in the response_id field
43880      * of the WMI_AUDIO_AGGR_REPORT_STATISTICS_EVENTID.
43881      */
43882     A_UINT32 request_id;
43883 } wmi_audio_aggr_get_statistics_cmd_fixed_param;
43884 
43885 typedef struct {
43886     /** TLV tag and len **/
43887     A_UINT32 tlv_header;
43888     /* VDEV identifier */
43889     A_UINT32 vdev_id;
43890 } wmi_audio_aggr_reset_statistics_cmd_fixed_param;
43891 
43892 typedef struct {
43893     /** TLV tag and len **/
43894     A_UINT32 tlv_header;
43895     /* VDEV identifier */
43896     A_UINT32 vdev_id;
43897 
43898     /*
43899      * The user_mode and user_profile fields are passed through
43900      * the host driver to the target FW, but are never interpreted
43901      * by the host driver. The values for these fields are opaque
43902      * to the host, and are only interpreted by the FW.
43903      */
43904     A_UINT32 user_mode;
43905     A_UINT32 user_profile;
43906 } wmi_audio_aggr_set_rtscts_config_cmd_fixed_param;
43907 
43908 typedef enum {
43909     /* audio aggr scheduler method list */
43910     WMI_AUDIO_AGGR_SCHED_METHOD_HOST_CONTROL = 1,
43911     WMI_AUDIO_AGGR_SCHED_METHOD_HOST_CONTROL_PER_CYCLE = 2,
43912 
43913     WMI_AUDIO_AGGR_SCHED_METHOD_MAX,
43914 } WMI_AUDIO_AGGR_SCHED_METHOD_TYPE;
43915 
43916 typedef enum {
43917     /* audio aggr RTS-CTS Config */
43918     WMI_AUDIO_AGGR_RTS_CTS_CONFIG_DISABLED = 0,
43919     WMI_AUDIO_AGGR_RTS_CTS_CONFIG_PPDU = 1,
43920     WMI_AUDIO_AGGR_RTS_CTS_CONFIG_CYCLE = 2,
43921 
43922     WMI_AUDIO_AGGR_RTS_CTS_MAX,
43923 } WMI_AUDIO_AGGR_RTS_CTS_CONFIG_TYPE;
43924 
43925 typedef struct {
43926     /* TLV tag and len */
43927     A_UINT32 tlv_header;
43928 
43929     /* VDEV identifier */
43930     A_UINT32 vdev_id;
43931 
43932     /* selected audio aggr scheduler method
43933     *  valid methods can be found in WMI_AUDIO_AGGR_SCHED_METHOD_TYPE
43934     */
43935     A_UINT32 sched_method;
43936 
43937     /* rts-cts config
43938     * valid config can be found in WMI_AUDIO_AGGR_RTS_CTS_CONFIG_TYPE
43939     */
43940     A_UINT32 rtscts_config;
43941 } wmi_audio_aggr_set_sched_method_cmd_fixed_param;
43942 
43943 typedef struct {
43944     /* TLV tag and len */
43945     A_UINT32 tlv_header;
43946 
43947     /* VDEV identifier */
43948     A_UINT32 vdev_id;
43949 } wmi_audio_aggr_get_sched_method_cmd_fixed_param;
43950 
43951 typedef struct {
43952     /** TLV tag and len; tag equals
43953      * WMITLV_TAG_STRUC_wmi_set_ocl_cmd_fixed_param */
43954     A_UINT32 tlv_header;
43955     /* VDEV identifier */
43956     A_UINT32 vdev_id;
43957     /** enable/disable OCL, 1 - enable, 0 - disable*/
43958     A_UINT32 en_dis_chain;
43959 } wmi_set_ocl_cmd_fixed_param;
43960 
43961 typedef enum {
43962     /* HPA Handshake Stages */
43963     WMI_HPA_SMCK_REQUEST = 0,
43964     WMI_HPA_SMCK_RESPONSE = 1,
43965     WMI_HPA_SIGN_REQUEST = 2,
43966     WMI_HPA_SIGN_RESPONSE = 3,
43967     WMI_HPA_HANDSHAKE_STAGE_MAX,
43968 } WMI_HPA_STAGE_TYPE;
43969 
43970 typedef struct {
43971     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hpa_cmd_fixed_param */
43972     /* stage:
43973      * HPA Handshake Stage, filled with a WMI_HPA_STAGE_TYPE enum value
43974      */
43975     A_UINT32 stage;
43976 
43977     /* the base address and length of data on host memory */
43978     A_UINT32 base_paddr_low;  /* bits 31:0 */
43979     A_UINT32 base_paddr_high; /* bits 63:32 */
43980     A_UINT32 len;             /* units = bytes */
43981 } wmi_hpa_cmd_fixed_param;
43982 
43983 typedef struct {
43984     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hpa_evt_fixed_param */
43985     /* stage:
43986      * HPA Handshake Stage, filled with a WMI_HPA_STAGE_TYPE enum value
43987      */
43988     A_UINT32 stage;
43989 
43990     A_UINT32 nonce;
43991 } wmi_hpa_evt_fixed_param;
43992 
43993 typedef struct {
43994     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_sync_qtimer */
43995     A_UINT32 vdev_id;
43996     A_UINT32 qtimer_l32;
43997     A_UINT32 qtimer_u32;
43998 } wmi_audio_sync_qtimer_cmd_fixed_param;
43999 
44000 typedef struct {
44001     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_sync_trigger */
44002     A_UINT32 vdev_id;
44003     /* agg_relation:
44004      * indicates whether host needs only one pair of Qmaster and Qslave,
44005      * or Qmaster and Qslave pairs derived for each FTM frame exchange.
44006      *  0 indicates one pair for each FTM frame exchanged
44007      *  1 indicates only one pair of Qmaster and Qslave times.
44008      */
44009     A_UINT32 agg_relation;
44010 } wmi_audio_sync_trigger_cmd_fixed_param;
44011 
44012 typedef struct {
44013     /** TLV tag and len; tag equals
44014      * WMITLV_TAG_STRUC_wmi_pdev_mec_aging_timer_config_cmd_fixed_param
44015      */
44016     A_UINT32 tlv_header;
44017     /** SOC level Command. pdev_id - WMI_PDEV_ID_SOC is used.
44018      */
44019     A_UINT32 pdev_id;
44020     /* The Threshold for mec aging timer in ms
44021      */
44022     A_UINT32 mec_aging_timer_threshold;
44023 } wmi_pdev_mec_aging_timer_config_cmd_fixed_param;
44024 
44025 #define WMI_CFR_GROUP_TA_ADDR_VALID_BIT_POS           0
44026 #define WMI_CFR_GROUP_TA_ADDR_MASK_VALID_BIT_POS      1
44027 #define WMI_CFR_GROUP_RA_ADDR_VALID_BIT_POS           2
44028 #define WMI_CFR_GROUP_RA_ADDR_MASK_VALID_BIT_POS      3
44029 #define WMI_CFR_GROUP_BW_VALID_BIT_POS                4
44030 #define WMI_CFR_GROUP_NSS_VALID_BIT_POS               5
44031 #define WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_BIT_POS      6
44032 #define WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_BIT_POS      7
44033 #define WMI_CFR_GROUP_DATA_SUBTYPE_VALID_BIT_POS      8
44034 
44035 /* The bits in this mask mapped to WMI_PEER_CFR_CAPTURE_BW enum */
44036 #define WMI_CFR_GROUP_BW_MASK_NUM_BITS                6
44037 #define WMI_CFR_GROUP_BW_BIT_POS                      0
44038 
44039 /* The bits in this mask correspond to the values as below
44040  * bit 0 -> Nss 1
44041  * bit 1 -> Nss 2
44042  * ...
44043  * bit 7 -> Nss 8
44044  */
44045 #define WMI_CFR_GROUP_NSS_MASK_NUM_BITS               8
44046 #define WMI_CFR_GROUP_NSS_BIT_POS                     16
44047 
44048 #define WMI_CFR_GROUP_TA_ADDR_VALID_SET(param, value) \
44049     WMI_SET_BITS(param, WMI_CFR_GROUP_TA_ADDR_VALID_BIT_POS, 1, value)
44050 
44051 #define WMI_CFR_GROUP_TA_ADDR_VALID_GET(param)     \
44052     WMI_GET_BITS(param, WMI_CFR_GROUP_TA_ADDR_VALID_BIT_POS, 1)
44053 
44054 #define WMI_CFR_GROUP_TA_ADDR_MASK_VALID_SET(param, value) \
44055     WMI_SET_BITS(param, WMI_CFR_GROUP_TA_ADDR_MASK_VALID_BIT_POS, 1, value)
44056 
44057 #define WMI_CFR_GROUP_TA_ADDR_MASK_VALID_GET(param)     \
44058     WMI_GET_BITS(param, WMI_CFR_GROUP_TA_ADDR_MASK_VALID_BIT_POS, 1)
44059 
44060 #define WMI_CFR_GROUP_RA_ADDR_VALID_SET(param, value) \
44061     WMI_SET_BITS(param, WMI_CFR_GROUP_RA_ADDR_VALID_BIT_POS, 1, value)
44062 
44063 #define WMI_CFR_GROUP_RA_ADDR_VALID_GET(param)     \
44064     WMI_GET_BITS(param, WMI_CFR_GROUP_RA_ADDR_VALID_BIT_POS, 1)
44065 
44066 #define WMI_CFR_GROUP_RA_ADDR_MASK_VALID_SET(param, value) \
44067     WMI_SET_BITS(param, WMI_CFR_GROUP_RA_ADDR_MASK_VALID_BIT_POS, 1, value)
44068 
44069 #define WMI_CFR_GROUP_RA_ADDR_MASK_VALID_GET(param)     \
44070     WMI_GET_BITS(param, WMI_CFR_GROUP_RA_ADDR_MASK_VALID_BIT_POS, 1)
44071 
44072 #define WMI_CFR_GROUP_BW_VALID_SET(param, value) \
44073     WMI_SET_BITS(param, WMI_CFR_GROUP_BW_VALID_BIT_POS, 1, value)
44074 
44075 #define WMI_CFR_GROUP_BW_VALID_GET(param)     \
44076     WMI_GET_BITS(param, WMI_CFR_GROUP_BW_VALID_BIT_POS, 1)
44077 
44078 #define WMI_CFR_GROUP_NSS_VALID_SET(param, value) \
44079     WMI_SET_BITS(param, WMI_CFR_GROUP_NSS_VALID_BIT_POS, 1, value)
44080 
44081 #define WMI_CFR_GROUP_NSS_VALID_GET(param)     \
44082     WMI_GET_BITS(param, WMI_CFR_GROUP_NSS_VALID_BIT_POS, 1)
44083 
44084 #define WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_SET(param, value) \
44085     WMI_SET_BITS(param, WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_BIT_POS, 1, value)
44086 
44087 #define WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_GET(param)     \
44088     WMI_GET_BITS(param, WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_BIT_POS, 1)
44089 
44090 #define WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_SET(param, value) \
44091     WMI_SET_BITS(param, WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_BIT_POS, 1, value)
44092 
44093 #define WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_GET(param)     \
44094     WMI_GET_BITS(param, WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_BIT_POS, 1)
44095 
44096 #define WMI_CFR_GROUP_DATA_SUBTYPE_VALID_SET(param, value) \
44097     WMI_SET_BITS(param, WMI_CFR_GROUP_DATA_SUBTYPE_VALID_BIT_POS, 1, value)
44098 
44099 #define WMI_CFR_GROUP_DATA_SUBTYPE_VALID_GET(param)     \
44100     WMI_GET_BITS(param, WMI_CFR_GROUP_DATA_SUBTYPE_VALID_BIT_POS, 1)
44101 
44102 #define WMI_CFR_GROUP_BW_SET(param, value) \
44103     WMI_SET_BITS(param, WMI_CFR_GROUP_BW_BIT_POS, WMI_CFR_GROUP_BW_MASK_NUM_BITS, value)
44104 
44105 #define WMI_CFR_GROUP_BW_GET(param)     \
44106     WMI_GET_BITS(param, WMI_CFR_GROUP_BW_BIT_POS, WMI_CFR_GROUP_BW_MASK_NUM_BITS)
44107 
44108 #define WMI_CFR_GROUP_NSS_SET(param, value) \
44109     WMI_SET_BITS(param, WMI_CFR_GROUP_NSS_BIT_POS, WMI_CFR_GROUP_NSS_MASK_NUM_BITS, value)
44110 
44111 #define WMI_CFR_GROUP_NSS_GET(param)     \
44112     WMI_GET_BITS(param, WMI_CFR_GROUP_NSS_BIT_POS, WMI_CFR_GROUP_NSS_MASK_NUM_BITS)
44113 
44114 typedef struct {
44115     /** TLV tag and len; tag equals
44116      * WMITLV_TAG_STRUC_wmi_cfr_filter_group_config */
44117     A_UINT32 tlv_header;
44118     /* Filter group number for which the below filters needs to be applied */
44119     A_UINT32 filter_group_id;
44120     /* Indicates which of the below filter's value is valid
44121      * Bit 0:    Ta_addr is valid if set
44122      * Bit 1:    Ta_addr_mask is valid if set
44123      * Bit 2:    Ra_addr is valid if set
44124      * Bit 3:    Ra_addr_mask is valid if set
44125      * Bit 4:    Bandwidth is valid if set
44126      * Bit 5:    NSS is valid if set
44127      * Bit 6:    Mgmt_subtype is valid if set
44128      * Bit 7:    Ctrl_subtype is valid if set
44129      * Bit 8:    Data_subtype is valid if set
44130      * Bits 31:9 Reserved for future use
44131      */
44132     A_UINT32 filter_set_valid_mask;
44133     /* ta_addr:
44134      * Packets matching the TA_mac addr will be filtered in by MAC
44135      * for CFR capture.
44136      */
44137     wmi_mac_addr ta_addr;
44138     /* ta_addr_mask:
44139      * Packets matching the TA_mac addr Mask will be filtered in by MAC
44140      * for CFR capture.
44141      */
44142     wmi_mac_addr ta_addr_mask;
44143     /* ra_addr:
44144      * Packets matching the RA_mac addr will be filtered in by MAC
44145      * for CFR capture.
44146      */
44147     wmi_mac_addr ra_addr;
44148     /* ra_addr_mask:
44149      * Packets matching the RA_mac addr Mask will be filtered in by MAC
44150      * for CFR capture.
44151      */
44152     wmi_mac_addr ra_addr_mask;
44153     /* bw_nss_filter:
44154      * Indicates which bw and nss packets will be filtered for CFR capture
44155      * Bits 4:0   CFR capture will be done for packets matching the bandwidths
44156      *            specified within this bitmask
44157      * Bits 15:5  Reserved for future
44158      * Bits 23:16 CFR capture will be done for packets matching the Nss
44159      *            specified within this bitmask
44160      * Bits 31:24 Reserved for future
44161      */
44162     A_UINT32 bw_nss_filter;
44163     /* mgmt_subtype_filter:
44164      * Managments Packets matching the subtype filter categories will be
44165      * filtered in by MAC for CFR capture.
44166      * This is a bitmask, in which each bit represents the corresponding
44167      * mgmt subtype value as per ieee80211_defs.h
44168      */
44169     A_UINT32 mgmt_subtype_filter;
44170     /* ctrl_subtype_filter:
44171      * Control Packets matching the subtype filter category will be
44172      * filtered in by MAC for CFR capture.
44173      * This is a bitmask, in which each bit represents the corresponding
44174      * ctrl subtype value as per ieee80211_defs.h
44175      */
44176     A_UINT32 ctrl_subtype_filter;
44177     /* data_subtype_filter:
44178      * Data Packets matching the subtype filter category will be
44179      * filtered in by MAC for CFR capture.
44180      * This is a bitmask, in which each bit represents the corresponding
44181      * data subtype value as per ieee80211_defs.h
44182      */
44183     A_UINT32 data_subtype_filter;
44184 } wmi_cfr_filter_group_config;
44185 
44186 #define WMI_CFR_DIRECTED_FTM_ACK_EN_BIT_POS           0
44187 #define WMI_CFR_ALL_FTM_ACK_EN_BIT_POS                1
44188 #define WMI_CFR_NDPA_NDP_DIRECTED_EN_BIT_POS          2
44189 #define WMI_CFR_NDPA_NDP_ALL_EN_BIT_POS               3
44190 #define WMI_CFR_TA_RA_TYPE_FILTER_EN_BIT_POS          4
44191 #define WMI_CFR_ALL_PACKET_EN_BIT_POS                 5
44192 #define WMI_CFR_FILTER_IN_AS_FP_TA_RA_TYPE_BIT_POS    6
44193 
44194 #define WMI_CFR_CAPTURE_INTERVAL_NUM_BITS             24
44195 #define WMI_CFR_CAPTURE_INTERVAL_BIT_POS              0
44196 
44197 #define WMI_CFR_CAPTURE_DURATION_NUM_BITS             24
44198 #define WMI_CFR_CAPTURE_DURATION_BIT_POS              0
44199 
44200 #define WMI_CFR_FILTER_GROUP_BITMAP_NUM_BITS          16
44201 #define WMI_CFR_FILTER_GROUP_BITMAP_BIT_POS           0
44202 
44203 #define WMI_CFR_UL_MU_USER_UPPER_NUM_BITS             5
44204 #define WMI_CFR_UL_MU_USER_UPPER_BIT_POS              0
44205 
44206 #define WMI_CFR_FREEZE_DELAY_CNT_EN_MASK              1
44207 #define WMI_CFR_FREEZE_DELAY_CNT_EN_BIT_POS           0
44208 
44209 #define WMI_CFR_FREEZE_DELAY_CNT_THR_NUM_BITS         8
44210 #define WMI_CFR_FREEZE_DELAY_CNT_THR_BIT_POS          1
44211 
44212 
44213 #define WMI_CFR_CAPTURE_COUNT_NUM_BITS                16
44214 #define WMI_CFR_CAPTURE_COUNT_BIT_POS                 0
44215 
44216 #define WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_NUM_BITS    1
44217 #define WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_BIT_POS     16
44218 
44219 
44220 #define WMI_CFR_DIRECTED_FTM_ACK_EN_SET(param, value) \
44221     WMI_SET_BITS(param, WMI_CFR_DIRECTED_FTM_ACK_EN_BIT_POS, 1, value)
44222 
44223 #define WMI_CFR_DIRECTED_FTM_ACK_EN_GET(param)     \
44224     WMI_GET_BITS(param, WMI_CFR_DIRECTED_FTM_ACK_EN_BIT_POS, 1)
44225 
44226 #define WMI_CFR_ALL_FTM_ACK_EN_SET(param, value) \
44227     WMI_SET_BITS(param, WMI_CFR_ALL_FTM_ACK_EN_BIT_POS, 1, value)
44228 
44229 #define WMI_CFR_ALL_FTM_ACK_EN_GET(param)     \
44230     WMI_GET_BITS(param, WMI_CFR_ALL_FTM_ACK_EN_BIT_POS, 1)
44231 
44232 #define WMI_CFR_NDPA_NDP_DIRECTED_EN_SET(param, value) \
44233     WMI_SET_BITS(param, WMI_CFR_NDPA_NDP_DIRECTED_EN_BIT_POS, 1, value)
44234 
44235 #define WMI_CFR_NDPA_NDP_DIRECTED_EN_GET(param)     \
44236     WMI_GET_BITS(param, WMI_CFR_NDPA_NDP_DIRECTED_EN_BIT_POS, 1)
44237 
44238 #define WMI_CFR_NDPA_NDP_ALL_EN_SET(param, value) \
44239     WMI_SET_BITS(param, WMI_CFR_NDPA_NDP_ALL_EN_BIT_POS, 1, value)
44240 
44241 #define WWMI_CFR_NDPA_NDP_ALL_EN_GET WMI_CFR_NDPA_NDP_ALL_EN_GET
44242 #define WMI_CFR_NDPA_NDP_ALL_EN_GET(param)     \
44243     WMI_GET_BITS(param, WMI_CFR_NDPA_NDP_ALL_EN_BIT_POS, 1)
44244 
44245 #define WMI_CFR_TA_RA_TYPE_FILTER_EN_SET(param, value) \
44246     WMI_SET_BITS(param, WMI_CFR_TA_RA_TYPE_FILTER_EN_BIT_POS, 1, value)
44247 
44248 #define WMI_CFR_TA_RA_TYPE_FILTER_EN_GET(param)     \
44249     WMI_GET_BITS(param, WMI_CFR_TA_RA_TYPE_FILTER_EN_BIT_POS, 1)
44250 
44251 #define WWMI_CFR_ALL_PACKET_EN_SET WMI_CFR_ALL_PACKET_EN_SET
44252 #define WMI_CFR_ALL_PACKET_EN_SET(param, value) \
44253     WMI_SET_BITS(param, WMI_CFR_ALL_PACKET_EN_BIT_POS, 1, value)
44254 
44255 #define WMI_CFR_ALL_PACKET_EN_GET(param)     \
44256     WMI_GET_BITS(param, WMI_CFR_ALL_PACKET_EN_BIT_POS, 1)
44257 
44258 #define WMI_CFR_FILTER_IN_AS_FP_TA_RA_TYPE_SET(param, value)  \
44259     WMI_SET_BITS(param, WMI_CFR_FILTER_IN_AS_FP_TA_RA_TYPE_BIT_POS, 1, value)
44260 
44261 #define WMI_CFR_FILTER_IN_AS_FP_TA_RA_TYPE_GET(param)  \
44262     WMI_GET_BITS(param, WMI_CFR_FILTER_IN_AS_FP_TA_RA_TYPE_BIT_POS, 1)
44263 
44264 #define WMI_CFR_CAPTURE_INTERVAL_SET(param, value) \
44265     WMI_SET_BITS(param, WMI_CFR_CAPTURE_INTERVAL_BIT_POS, WMI_CFR_CAPTURE_INTERVAL_NUM_BITS, value)
44266 
44267 #define WMI_CFR_CAPTURE_INTERVAL_GET(param)     \
44268     WMI_GET_BITS(param, WMI_CFR_CAPTURE_INTERVAL_BIT_POS, WMI_CFR_CAPTURE_INTERVAL_NUM_BITS)
44269 
44270 #define WMI_CFR_CAPTURE_DURATION_SET(param, value) \
44271     WMI_SET_BITS(param, WMI_CFR_CAPTURE_DURATION_BIT_POS, WMI_CFR_CAPTURE_DURATION_NUM_BITS, value)
44272 
44273 #define WMI_CFR_CAPTURE_DURATION_GET(param)     \
44274     WMI_GET_BITS(param, WMI_CFR_CAPTURE_DURATION_BIT_POS, WMI_CFR_CAPTURE_DURATION_NUM_BITS)
44275 
44276 #define WMI_CFR_FILTER_GROUP_BITMAP_SET(param, value) \
44277     WMI_SET_BITS(param, WMI_CFR_FILTER_GROUP_BITMAP_BIT_POS, WMI_CFR_FILTER_GROUP_BITMAP_NUM_BITS, value)
44278 
44279 #define WMI_CFR_FILTER_GROUP_BITMAP_GET(param)     \
44280     WMI_GET_BITS(param, WMI_CFR_FILTER_GROUP_BITMAP_BIT_POS, WMI_CFR_FILTER_GROUP_BITMAP_NUM_BITS)
44281 
44282 #define WMI_CFR_UL_MU_USER_UPPER_SET(param, value) \
44283     WMI_SET_BITS(param, WMI_CFR_UL_MU_USER_UPPER_BIT_POS, WMI_CFR_UL_MU_USER_UPPER_NUM_BITS, value)
44284 
44285 #define WMI_CFR_UL_MU_USER_UPPER_GET(param)     \
44286     WMI_GET_BITS(param, WMI_CFR_UL_MU_USER_UPPER_BIT_POS, WMI_CFR_UL_MU_USER_UPPER_NUM_BITS)
44287 
44288 #define WMI_CFR_FREEZE_DELAY_CNT_EN_SET(param, value) \
44289     WMI_SET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_EN_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_EN_MASK, value)
44290 
44291 #define WMI_CFR_FREEZE_DELAY_CNT_EN_GET(param)     \
44292     WMI_GET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_EN_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_EN_MASK)
44293 
44294 #define WMI_CFR_FREEZE_DELAY_CNT_THR_SET(param, value) \
44295     WMI_SET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_THR_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_THR_NUM_BITS, value)
44296 
44297 #define WMI_CFR_FREEZE_DELAY_CNT_THR_GET(param)     \
44298     WMI_GET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_THR_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_THR_NUM_BITS)
44299 
44300 #define WMI_CFR_CAPTURE_COUNT_SET(param, value) \
44301     WMI_SET_BITS(param, WMI_CFR_CAPTURE_COUNT_BIT_POS, WMI_CFR_CAPTURE_COUNT_NUM_BITS, value)
44302 
44303 #define WMI_CFR_CAPTURE_COUNT_GET(param)     \
44304     WMI_GET_BITS(param, WMI_CFR_CAPTURE_COUNT_BIT_POS, WMI_CFR_CAPTURE_COUNT_NUM_BITS)
44305 
44306 #define WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_SET(param, value) \
44307     WMI_SET_BITS(param, WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_BIT_POS, WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_NUM_BITS, value)
44308 
44309 #define WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_GET(param)     \
44310     WMI_GET_BITS(param, WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_BIT_POS, WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_NUM_BITS)
44311 
44312 typedef struct {
44313    /** TLV tag and len; tag equals
44314     * WMITLV_TAG_STRUC_wmi_peer_cfr_capture_filter_cmd_fixed_param */
44315     A_UINT32 tlv_header;
44316     /** pdev_id for identifying the MAC
44317      * See macros starting with WMI_PDEV_ID_ for values.
44318      * In non-DBDC case host should set it to 0
44319      */
44320     A_UINT32 pdev_id;
44321     /* filter_type:
44322      * Indicates the type of filter to be enabled
44323      * Bit 0:    Filter Directed FTM ACK frames for CFR capture
44324      * Bit 1:    Filter All FTM ACK frames for CFR capture
44325      * Bit 2:    Filter NDPA NDP Directed Frames for CFR capture
44326      * Bit 3:    Filter NDPA NDP All Frames for CFR capture
44327      * Bit 4:    Filter Frames based on TA/RA/Subtype as provided
44328      *           in CFR Group config
44329      * Bit 5:    Filter in All packets for CFR Capture
44330      * Bit 6:    Filter in TA/RA frames as FP if this bit is set else as MO
44331      * Bits 31:7 Reserved for future use
44332      */
44333     A_UINT32 filter_type;
44334     /* capture_interval:
44335      * Capture interval field which is time in between consecutive
44336      * CFR capture, in microsecond units
44337      * Bits 23:0  Capture interval
44338      * Bits 31:24 Reserved for future use
44339      */
44340     A_UINT32 capture_interval;
44341     /* capture_duration:
44342      * Capture Duration field for which CFR capture has to happen,
44343      * in microsecond units
44344      * Bits 23:0  Capture Duration
44345      * Bits 31:24 Reserved for future use
44346      */
44347     A_UINT32 capture_duration;
44348     /* Bitfields set indicates which of the CFR group config is enabled
44349      * Bits 15:0  Filter Group enable Bits
44350      * Bits 31:16 Reserved for future use
44351      * If Bit 0 is set, then CFR filter group 0 alone is enabled and so on
44352      */
44353     A_UINT32 filter_group_bitmap;
44354     /* ul_mu_user_mask_lower:
44355      * Bitfields indicates which of the users in the current UL MU
44356      * transmission are enabled for CFR capture.
44357      * Bits 31 to 0 indicates user indexes for 32 users in a UL MU transmission.
44358      * If bit 0 is set, then the CFR capture will happen for user index 0
44359      * in the current UL MU Transmission.
44360      * If bits 0,2 are set, then CFR capture for UL MU TX corresponds to
44361      * user indices 0 and 2.
44362      */
44363     A_UINT32 ul_mu_user_mask_lower;
44364     /* ul_mu_user_mask_upper:
44365      * This is continuation of the above lower mask.
44366      * Bits 4:0  Bitfields indicates user indices from 33 to 37 users.
44367      * Bits 31:5 Reserved for future use
44368      * If bit 0 is set, then CFR capture is enabled for user index 33
44369      * in a UL MU transmission.
44370      */
44371     A_UINT32 ul_mu_user_mask_upper;
44372     /* freeze_tlv_delay_cnt
44373      * Indicates the number of consecutive Rx packets to be skipped
44374      * before CFR capture is enabled again.
44375      * Bits 8:0   Freeze Delay Count value
44376      * Bits 31:9  Reserved for future use
44377      */
44378     A_UINT32 freeze_tlv_delay_cnt;
44379 
44380     /* capture_count:
44381      * Indicates the number of consecutive packets for which CFR capture
44382      * is to be enabled.
44383      * Interpretation of capture_interval_mode_select (bit 16):
44384      *     Value 0: capture_interval + capture_duration fields are used
44385      *              to capture CFR for capture_duration after every
44386      *              capture_interval.
44387      *     Value 1: capture_interval + capture_count fields are used to
44388      *              capture CFR for capture_count+1 number of packets
44389      *              after every capture interval
44390      * Bit 15:0   : capture_count
44391      *              Refer to WMI_CFR_CAPTURE_COUNT_GET/SET macros.
44392      * Bit 16     : capture_interval_mode_select
44393      *              Refer to WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_GET/SET macros.
44394      * Bits 31:17 : Reserved
44395      */
44396     A_UINT32 capture_count;
44397 
44398 /*
44399  * A variable-length TLV array of wmi_cfr_filter_group_config will
44400  * follow this fixed_param TLV
44401  * wmi_cfr_filter_group_config filter_group_config[];
44402  */
44403 } wmi_cfr_capture_filter_cmd_fixed_param;
44404 
44405 enum wmi_oem_data_evt_cause {
44406     WMI_OEM_DATA_EVT_CAUSE_UNSPECIFIED = 0,
44407     WMI_OEM_DATA_EVT_CAUSE_CMD_REQ = 1,
44408     WMI_OEM_DATA_EVT_CAUSE_ASYNC = 2,
44409     WMI_OEM_DATA_EVT_CAUSE_QMS = 3, /* DEPRECATED */
44410     WMI_OEM_DATA_EVT_CAUSE_SMEM_MAILBOX = 3,
44411 };
44412 
44413 typedef struct {
44414     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_data_event_fixed_param */
44415     A_UINT32 data_len; /** length in byte of data[]. */
44416     /* Event Cause reason from enum wmi_oem_data_evt_cause */
44417     A_UINT32 event_cause;
44418 /* Following this structure is the TLV:
44419  *      A_UINT8 data[]; <-- length in byte given by field data_len.
44420  * This data array contains OEM data, the payload begins with a field to tell the HOST regarding the kind of the OEM data.
44421  *      A_UINT8 file_name[]; <-- Name of the file to which HOST needs to write this OEM specific data.
44422  */
44423 } wmi_oem_data_event_fixed_param;
44424 
44425 #define WMI_VLAN_TX_BIT_POS                             0
44426 #define WMI_VLAN_RX_BIT_POS                             1
44427 #define WMI_TX_INSERT_OR_STRIP_BIT_POS                  2
44428 #define WMI_TX_STRIP_INSERT_VLAN_INNER_BIT_POS          3
44429 #define WMI_TX_STRIP_INSERT_VLAN_OUTER_BIT_POS          4
44430 #define WMI_RX_STRIP_VLAN_C_TAG_BIT_POS                 5
44431 #define WMI_RX_STRIP_VLAN_S_TAG_BIT_POS                 6
44432 #define WMI_RX_INSERT_VLAN_C_TAG_BIT_POS                7
44433 #define WMI_RX_INSERT_VLAN_S_TAG_BIT_POS                8
44434 
44435 #define WMI_TX_INSERT_VLAN_INNER_TCI_NUM_BITS           16
44436 #define WMI_TX_INSERT_VLAN_INNER_TCI_BIT_POS            0
44437 
44438 #define WMI_TX_INSERT_VLAN_OUTER_TCI_NUM_BITS           16
44439 #define WMI_TX_INSERT_VLAN_OUTER_TCI_BIT_POS            16
44440 
44441 
44442 #define WMI_VLAN_TX_SET(param, value) \
44443     WMI_SET_BITS(param, WMI_VLAN_TX_BIT_POS, 1, value)
44444 
44445 #define WMI_VLAN_TX_GET(param)     \
44446     WMI_GET_BITS(param, WMI_VLAN_TX_BIT_POS, 1)
44447 
44448 #define WMI_VLAN_RX_SET(param, value) \
44449     WMI_SET_BITS(param, WMI_VLAN_RX_BIT_POS, 1, value)
44450 
44451 #define WMI_VLAN_RX_GET(param)     \
44452     WMI_GET_BITS(param, WMI_VLAN_RX_BIT_POS, 1)
44453 
44454 #define WMI_TX_INSERT_OR_STRIP_SET(param, value) \
44455     WMI_SET_BITS(param, WMI_TX_INSERT_OR_STRIP_BIT_POS, 1, value)
44456 
44457 #define WMI_TX_INSERT_OR_STRIP_GET(param)     \
44458     WMI_GET_BITS(param, WMI_TX_INSERT_OR_STRIP_BIT_POS, 1)
44459 
44460 #define WMI_TX_STRIP_INSERT_VLAN_INNER_SET(param, value) \
44461     WMI_SET_BITS(param, WMI_TX_STRIP_INSERT_VLAN_INNER_BIT_POS, 1, value)
44462 
44463 #define WMI_TX_STRIP_INSERT_VLAN_INNER_GET(param)     \
44464     WMI_GET_BITS(param, WMI_TX_STRIP_INSERT_VLAN_INNER_BIT_POS, 1)
44465 
44466 #define WMI_TX_STRIP_INSERT_VLAN_OUTER_SET(param, value) \
44467     WMI_SET_BITS(param, WMI_TX_STRIP_INSERT_VLAN_OUTER_BIT_POS, 1, value)
44468 
44469 #define WMI_TX_STRIP_INSERT_VLAN_OUTER_GET(param)     \
44470     WMI_GET_BITS(param, WMI_TX_STRIP_INSERT_VLAN_OUTER_BIT_POS, 1)
44471 
44472 #define WMI_RX_STRIP_VLAN_C_TAG_SET(param, value) \
44473     WMI_SET_BITS(param, WMI_RX_STRIP_VLAN_C_TAG_BIT_POS, 1, value)
44474 
44475 #define WMI_RX_STRIP_VLAN_C_TAG_GET(param)     \
44476     WMI_GET_BITS(param, WMI_RX_STRIP_VLAN_C_TAG_BIT_POS, 1)
44477 
44478 #define WMI_RX_STRIP_VLAN_S_TAG_SET(param, value) \
44479     WMI_SET_BITS(param, WMI_RX_STRIP_VLAN_S_TAG_BIT_POS, 1, value)
44480 
44481 #define WMI_RX_STRIP_VLAN_S_TAG_GET(param)     \
44482     WMI_GET_BITS(param, WMI_RX_STRIP_VLAN_S_TAG_BIT_POS, 1)
44483 
44484 #define WMI_RX_INSERT_VLAN_C_TAG_SET(param, value) \
44485     WMI_SET_BITS(param, WMI_RX_INSERT_VLAN_C_TAG_BIT_POS, 1, value)
44486 
44487 #define WMI_RX_INSERT_VLAN_C_TAG_GET(param)     \
44488     WMI_GET_BITS(param, WMI_RX_INSERT_VLAN_C_TAG_BIT_POS, 1)
44489 
44490 #define WMI_RX_INSERT_VLAN_S_TAG_SET(param, value) \
44491     WMI_SET_BITS(param, WMI_RX_INSERT_VLAN_S_TAG_BIT_POS, 1, value)
44492 
44493 #define WMI_RX_INSERT_VLAN_S_TAG_GET(param)     \
44494     WMI_GET_BITS(param, WMI_RX_INSERT_VLAN_S_TAG_BIT_POS, 1)
44495 
44496 #define WMI_TX_INSERT_VLAN_INNER_TCI_SET(param, value) \
44497     WMI_SET_BITS(param, WMI_TX_INSERT_VLAN_INNER_TCI_BIT_POS, WMI_TX_INSERT_VLAN_INNER_TCI_NUM_BITS, value)
44498 
44499 #define WMI_TX_INSERT_VLAN_INNER_TCI_GET(param)     \
44500     WMI_GET_BITS(param, WMI_TX_INSERT_VLAN_INNER_TCI_BIT_POS, WMI_TX_INSERT_VLAN_INNER_TCI_NUM_BITS)
44501 
44502 #define WMI_TX_INSERT_VLAN_OUTER_TCI_SET(param, value) \
44503     WMI_SET_BITS(param, WMI_TX_INSERT_VLAN_OUTER_TCI_BIT_POS, WMI_TX_INSERT_VLAN_OUTER_TCI_NUM_BITS, value)
44504 
44505 #define WMI_TX_INSERT_VLAN_OUTER_TCI_GET(param)     \
44506     WMI_GET_BITS(param, WMI_TX_INSERT_VLAN_OUTER_TCI_BIT_POS, WMI_TX_INSERT_VLAN_OUTER_TCI_NUM_BITS)
44507 
44508 typedef struct {
44509    /** TLV tag and len; tag equals
44510     * WMITLV_TAG_STRUC_wmi_peer_config_vlan_cmd_fixed_param */
44511     A_UINT32 tlv_header;
44512     /** peer MAC address */
44513     wmi_mac_addr peer_macaddr;
44514     /* peer_vlan_config_mask:
44515      * Field indicates VLAN settings that need to set in RX and TX peer
44516      * Bit 0:    Indicates if the settings are present for TX peer
44517      *           [1 - present for TX peer]
44518      * Bit 1:    Indicates if the settings are present for RX peer
44519      *           [1 - present for RX peer]
44520      * Bit 2:    Setting the insert_or_strip bit in TX peer
44521      *           [0 - Strip, 1 - Insert]
44522      * Bit 3:    Setting the strip_insert_vlan_inner bit in TX peer
44523      *           [0 - Strip, 1 - Insert]
44524      * Bit 4:    Setting the strip_insert_vlan_outer bit in TX peer
44525      *           [0 - Strip, 1 - Insert]
44526      * Bit 5:    Setting the strip_vlan_c_tag_decap bit in RX peer [1 - Strip]
44527      * Bit 6:    Setting the strip_vlan_s_tag_decap bit in RX peer [1 - Strip]
44528      * Bit 7:    Setting the rx_insert_vlan_c_tag_padding bit in RX peer
44529      *           [1 - Insert]
44530      * Bit 8:    Setting the rx_insert_vlan_s_tag_padding bit in RX peer
44531      *           [1 - Insert]
44532      */
44533     A_UINT32 peer_vlan_config_mask;
44534 
44535     /* insert_vlan_tci:
44536      * Field indicates the word that needs to be inserted in the
44537      * inner or outer tag, if insertion is enabled by the
44538      * TX peer strip_insert_vlan_{inner,outer} fields along with
44539      * insert_or_strip field
44540      * Bits 0:15  insert_vlan_inner_tci
44541      * Bits 16:31 insert_vlan_outer_tci
44542      */
44543     A_UINT32 insert_vlan_tci;
44544     /* VDEV identifier */
44545     A_UINT32 vdev_id;
44546 } wmi_peer_config_vlan_cmd_fixed_param;
44547 
44548 typedef struct {
44549   /** TLV tag and len; tag equals
44550     * WMITLV_TAG_STRUC_wmi_peer_config_ppe_ds_cmd_fixed_param */
44551     A_UINT32 tlv_header;
44552 
44553     wmi_mac_addr peer_macaddr;
44554     A_UINT32 ppe_routing_enable; /* enum WMI_PPE_ROUTING_TYPE */
44555 
44556     /* The processing stages in PPE that this packet buffer need to go through
44557      * and on to which PPE queues these buffers should be mapped to.
44558      * Refer pkg/ppe/src/ppe_sc.h for service code types
44559      */
44560     A_UINT32 service_code;
44561 
44562     A_UINT32 priority_valid;
44563 
44564     /* Unique number that represents a VAP's vdev_id in PPE domain */
44565     A_UINT32 src_info;
44566 
44567     /* VDEV identifier */
44568     A_UINT32 vdev_id;
44569 } wmi_peer_config_ppe_ds_cmd_fixed_param;
44570 
44571 typedef enum {
44572     WMI_PPE_ROUTING_DISABLED = 0,
44573     WMI_AST_USE_PPE_ENABLED  = 1,
44574     WMI_AST_USE_PPE_DISABLED = 2,
44575     WMI_PPE_ROUTING_TYPE_MAX,
44576 } WMI_PPE_ROUTING_TYPE;
44577 
44578 typedef struct {
44579     /** TLV tag and len; tag equals
44580     * WMITLV_TAG_STRUC_wmi_pdev_multiple_vdev_restart_resp_event_fixed_param */
44581     A_UINT32 tlv_header;
44582     A_UINT32 pdev_id; /* ID of the pdev this response belongs to */
44583     A_UINT32 requestor_id;
44584     /** Return status. As per WMI_VDEV_START_RESPONSE_XXXXX */
44585     A_UINT32 status;
44586 
44587     /* The TLVs follows this structure:
44588      * A_UINT32 vdev_ids_bitmap[]; <--- Array of VDEV id bitmap.
44589      */
44590 } wmi_pdev_multiple_vdev_restart_resp_event_fixed_param;
44591 
44592 /** WMI event for Firmware to report soundbar audio frame statistics to Host **/
44593 typedef struct {
44594     /** TLV tag and len **/
44595     A_UINT32 tlv_header;
44596     A_UINT32 vdev_id; /* ID of the vdev this response belongs to */
44597     /** identify which request this responds to **/
44598     A_UINT32 response_id;
44599     /* audio frame statistics part -
44600      * Use subsequent TLV arrays to list group_stats and peer_stats.
44601      */
44602 
44603 /*
44604  * The TLVs listing group_stats, will follow this TLV.
44605  * The number of group_stats can be calculated by dividing the
44606  * TLV array length by the TLV array element length.
44607  *
44608  * The fixed_param TLV is directly followed by a list of
44609  * wmi_audio_aggr_group_stats elements:
44610  *     wmi_audio_aggr_group_stats group_stats[0];
44611  *     wmi_audio_aggr_group_stats group_stats[1];
44612  *     ...
44613  *     wmi_audio_aggr_group_stats group_stats[N];
44614  *
44615  * After the list of wmi_audio_aggr_group_stats is a list of peer_stats.
44616  *     wmi_audio_aggr_peer_stats peer_stats[0];
44617  *     wmi_audio_aggr_peer_stats peer_stats[1];
44618  *     ...
44619  *     wmi_audio_aggr_peer_stats peer_stats[N];
44620  *
44621  */
44622 } wmi_audio_aggr_statistics_event_fixed_param;
44623 
44624 typedef struct {
44625     /** TLV tag and len **/
44626     A_UINT32 tlv_header;
44627     /* Group mac_address */
44628     wmi_mac_addr group_addr;
44629     /* Group identity */
44630     A_UINT32 group_id;
44631     /* Multicast MSDU Data Packets received from Host for this Group */
44632     A_UINT32 mcast_tx;
44633     /*
44634      * Multicast MSDU Data Packets sent to OTA.
44635      * Customer defined SW Retry Packets not included, as these
44636      * SW Retry packets generated in FW locally, but not from Host.
44637      */
44638     A_UINT32 mcast_tx_ok;
44639     /*
44640      * Multicast MSDU Data Packets sent to OTA.
44641      * Only include Customer defined SW Retry Packets.
44642      */
44643     A_UINT32 mcast_tx_ok_retry;
44644     /*
44645      * Multicast MSDU Data Packets not sent to OTA,
44646      * discarded by tbd function due to timeout.
44647      * Customer defined SW Retry Packets not included.
44648      */
44649     A_UINT32 mcast_tx_tbd_lost;
44650     /*
44651      * Multicast MSDU Data Packets not sent to OTA,
44652      * discarded by tbd function due to timeout.
44653      * Only include Customer defined SW Retry Packets.
44654      */
44655     A_UINT32 mcast_tx_tbd_lost_retry;
44656 } wmi_audio_aggr_group_stats;
44657 
44658 typedef struct {
44659     /** TLV tag and len **/
44660     A_UINT32 tlv_header;
44661     /* STA mac_address */
44662     wmi_mac_addr peer_addr;
44663     /* Unicast MSDU Data Packets received from peer STA */
44664     A_UINT32 ucast_rx;
44665     /* Unicast MSDU Data Packets received from Host for Peer STA */
44666     A_UINT32 ucast_tx;
44667     /*
44668      * Unicast MSDU Data Packets received from Host,
44669      * and SW retry times for these packets.
44670      */
44671     A_UINT32 ucast_tx_retry;
44672     /*
44673      * Unicast MSDU Data Packets received from Host,
44674      * and sent to Peer STA successfully.
44675      */
44676     A_UINT32 ucast_tx_ok;
44677     /*
44678      * Unicast MSDU Data Packets received from Host,
44679      * but sent to Peer STA fail. not OTA, or no ACK from Peer.
44680      */
44681     A_UINT32 ucast_tx_lost;
44682     /*
44683      * Periodic NULL Data frames for multicast tx rate auto control.
44684      * Generated by FW locally, and sent to Peer STA successfully.
44685      */
44686     A_UINT32 null_frame_tx;
44687     /*
44688      * Periodic NULL Data frames for multicast tx rate auto control.
44689      * Generated by FW locally, but sent to Peer STA fail.
44690      */
44691     A_UINT32 null_frame_tx_lost;
44692 } wmi_audio_aggr_peer_stats;
44693 
44694 typedef struct {
44695     /** TLV tag and len **/
44696     A_UINT32 tlv_header;
44697 
44698     /* ID of the vdev this response belongs to */
44699     A_UINT32 vdev_id;
44700 
44701     /* selected audio aggr scheduler method
44702     *  valid methods can be found in WMI_AUDIO_AGGR_SCHED_METHOD_TYPE
44703     */
44704     A_UINT32 sched_method;
44705 
44706     /* rts-cts config
44707     * valid config can be found in WMI_AUDIO_AGGR_RTS_CTS_CONFIG_TYPE
44708     */
44709     A_UINT32 rtscts_config;
44710 } wmi_audio_aggr_sched_method_event_fixed_param;
44711 
44712 typedef struct {
44713     /** TLV tag and len; tag equals
44714     *WMITLV_TAG_STRUC_wmi_pdev_srg_bss_color_bitmap_cmd_fixed_param */
44715     A_UINT32 tlv_header;
44716     /** pdev_id for identifying the MAC
44717      * See macros starting with WMI_PDEV_ID_ for values.
44718      * In non-DBDC case host should set it to 0
44719      */
44720     A_UINT32 pdev_id;
44721     /* 64 bit bss color bitmap used by SRG based spatial reuse feature
44722      * bitmap[0] contains lower 32 bits and bitmap[1] contains
44723      * upper 32 bits.
44724      */
44725     A_UINT32 srg_bss_color_bitmap[2];
44726 } wmi_pdev_srg_bss_color_bitmap_cmd_fixed_param;
44727 
44728 typedef struct {
44729     /** TLV tag and len; tag equals
44730     *WMITLV_TAG_STRUC_wmi_pdev_srg_partial_bssid_bitmap_cmd_fixed_param */
44731     A_UINT32 tlv_header;
44732     /** pdev_id for identifying the MAC
44733      * See macros starting with WMI_PDEV_ID_ for values.
44734      * In non-DBDC case host should set it to 0
44735      */
44736     A_UINT32 pdev_id;
44737     /* 64 bit partial bssid bitmap used by SRG based spatial reuse feature
44738      * bitmap[0] contains lower 32 bits and bitmap[1] contains
44739      * upper 32 bits.
44740      */
44741     A_UINT32 srg_partial_bssid_bitmap[2];
44742 } wmi_pdev_srg_partial_bssid_bitmap_cmd_fixed_param;
44743 
44744 typedef struct {
44745     /** TLV tag and len; tag equals
44746      * WMITLV_TAG_STRUC_wmi_pdev_srg_obss_color_enable_bitmap_cmd_fixed_param */
44747     A_UINT32 tlv_header;
44748     /** pdev_id for identifying the MAC
44749      * See macros starting with WMI_PDEV_ID_ for values.
44750      * In non-DBDC case host should set it to 0
44751      */
44752     A_UINT32 pdev_id;
44753     /* 64 bit SRG obss color enable bitmap used by SRG based spatial reuse feature
44754      * bitmap[0] contains lower 32 bits and bitmap[1] contains
44755      * upper 32 bits.
44756      */
44757     A_UINT32 srg_obss_en_color_bitmap[2];
44758 } wmi_pdev_srg_obss_color_enable_bitmap_cmd_fixed_param;
44759 
44760 typedef struct {
44761     /** TLV tag and len; tag equals
44762      * WMITLV_TAG_STRUC_wmi_pdev_srg_obss_bssid_enable_bitmap_cmd_fixed_param */
44763     A_UINT32 tlv_header;
44764     /** pdev_id for identifying the MAC
44765      * See macros starting with WMI_PDEV_ID_ for values.
44766      * In non-DBDC case host should set it to 0
44767      */
44768     A_UINT32 pdev_id;
44769     /* 64 bit obss bssid enable bitmap used by SRG based spatial reuse feature
44770      * bitmap[0] contains lower 32 bits and bitmap[1] contains
44771      * upper 32 bits.
44772      */
44773     A_UINT32 srg_obss_en_bssid_bitmap[2];
44774 } wmi_pdev_srg_obss_bssid_enable_bitmap_cmd_fixed_param;
44775 
44776 typedef struct {
44777     /** TLV tag and len; tag equals
44778      * WMITLV_TAG_STRUC_wmi_pdev_non_srg_obss_color_enable_bitmap_cmd_fixed_param */
44779     A_UINT32 tlv_header;
44780     /** pdev_id for identifying the MAC
44781      * See macros starting with WMI_PDEV_ID_ for values.
44782      * In non-DBDC case host should set it to 0
44783      */
44784     A_UINT32 pdev_id;
44785     /* 64 bit Non_SRG obss color enable bitmap used by Non_SRG based spatial reuse feature
44786      * bitmap[0] contains lower 32 bits and bitmap[1] contains
44787      * upper 32 bits.
44788      */
44789     A_UINT32 non_srg_obss_en_color_bitmap[2];
44790 } wmi_pdev_non_srg_obss_color_enable_bitmap_cmd_fixed_param;
44791 
44792 typedef struct {
44793     /** TLV tag and len; tag equals
44794      * WMITLV_TAG_STRUC_wmi_pdev_non_srg_obss_bssid_enable_bitmap_cmd_fixed_param */
44795     A_UINT32 tlv_header;
44796     /** pdev_id for identifying the MAC
44797      * See macros starting with WMI_PDEV_ID_ for values.
44798      * In non-DBDC case host should set it to 0
44799      */
44800     A_UINT32 pdev_id;
44801     /* 64 bit obss bssid enable bitmap used by Non_SRG based spatial reuse feature
44802      * bitmap[0] contains lower 32 bits and bitmap[1] contains
44803      * upper 32 bits.
44804      */
44805     A_UINT32 non_srg_obss_en_bssid_bitmap[2];
44806 } wmi_pdev_non_srg_obss_bssid_enable_bitmap_cmd_fixed_param;
44807 
44808 typedef struct {
44809     /** TLV tag and len; tag equals
44810      * WMITLV_TAG_STRUC_wmi_pdev_enable_duration_based_tx_mode_selection_cmd_fixed_param
44811      */
44812     A_UINT32 tlv_header;
44813     /** pdev_id for identifying the MAC
44814      * See macros starting with WMI_PDEV_ID_ for values.
44815      * In non-DBDC case host should set it to 0
44816      */
44817     A_UINT32 pdev_id;
44818     /* enable/disable Duration based Tx Mode selection */
44819     A_UINT32 duration_based_tx_mode_selection;
44820 } wmi_pdev_enable_duration_based_tx_mode_selection_cmd_fixed_param;
44821 
44822 typedef enum {
44823     /* Simulation test command types */
44824     WMI_SIM_TEST_FRAME_CONTENT_CHANGE_CMD,
44825     WMI_SIM_TEST_DROP_FRAME_CMD,
44826     WMI_SIM_TEST_DELAY_FRAME_CMD,
44827     WMI_SIM_TEST_CONFIGURATION_CMD,
44828 
44829     WMI_SIM_TEST_CMD_UNKNOWN = 255,
44830 } WMI_SIMULATION_TEST_CMD_TYPE;
44831 
44832 typedef enum {
44833     /* Simulation test sub-command types */
44834     WMI_SIM_TEST_SUB_CMD_UNKNOWN = 255,
44835 } WMI_SIMULATION_TEST_SUB_CMD_TYPE;
44836 
44837 #define WMI_SIM_FRAME_TYPE_BIT_POS      0
44838 #define WMI_SIM_FRAME_SUBTYPE_BIT_POS   8
44839 #define WMI_SIM_FRAME_SEQ_BIT_POS       16
44840 #define WMI_SIM_FRAME_OFFSET_BIT_POS    0
44841 #define WMI_SIM_FRAME_LENGTH_BIT_POS    16
44842 
44843 #define WMI_SIM_FRAME_TYPE_SET(param, value) \
44844     WMI_SET_BITS(param, WMI_SIM_FRAME_TYPE_BIT_POS, 8, value)
44845 #define WMI_SIM_FRAME_TYPE_GET(param)     \
44846     WMI_GET_BITS(param, WMI_SIM_FRAME_TYPE_BIT_POS, 8)
44847 
44848 #define WMI_SIM_FRAME_SUBTYPE_SET(param, value) \
44849     WMI_SET_BITS(param, WMI_SIM_FRAME_SUBTYPE_BIT_POS, 8, value)
44850 #define WMI_SIM_FRAME_SUBTYPE_GET(param)     \
44851     WMI_GET_BITS(param, WMI_SIM_FRAME_SUBTYPE_BIT_POS, 8)
44852 
44853 #define WMI_SIM_FRAME_SEQ_SET(param, value) \
44854     WMI_SET_BITS(param, WMI_SIM_FRAME_SEQ_BIT_POS, 8, value)
44855 #define WMI_SIM_FRAME_SEQ_GET(param)     \
44856     WMI_GET_BITS(param, WMI_SIM_FRAME_SEQ_BIT_POS, 8)
44857 
44858 #define WMI_SIM_FRAME_OFFSET_SET(param, value) \
44859     WMI_SET_BITS(param, WMI_SIM_FRAME_OFFSET_BIT_POS, 16, value)
44860 #define WMI_SIM_FRAME_OFFSET_GET(param)     \
44861     WMI_GET_BITS(param, WMI_SIM_FRAME_OFFSET_BIT_POS, 16)
44862 
44863 #define WMI_SIM_FRAME_LENGTH_SET(param, value) \
44864     WMI_SET_BITS(param, WMI_SIM_FRAME_LENGTH_BIT_POS, 16, value)
44865 #define WMI_SIM_FRAME_LENGTH_GET(param)     \
44866     WMI_GET_BITS(param, WMI_SIM_FRAME_LENGTH_BIT_POS, 16)
44867 
44868 typedef struct {
44869     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_simulation_test_cmd_fixed_param  */
44870     A_UINT32 tlv_header;
44871     /** pdev_id for identifying the MAC.
44872      * See macros starting with WMI_PDEV_ID_ for values.
44873      * In non-DBDC case host should set it to 0.
44874      */
44875     A_UINT32 pdev_id;
44876     /** vdev_id for identifying the vap simulation command needs to be applied.
44877      * This is for future purpose, currently only 1 vap is supported for
44878      * simulation test mode.
44879      * Host will always set it to 0 for now.
44880      */
44881     A_UINT32 vdev_id;
44882     /** peer MAC address for identifying the peer for which the simulation
44883      * command needs to be applied.
44884      * peer_macaddr needs to be set to '0' for simulation commands which
44885      * needs to be applied at pdev or vdev level.
44886      */
44887     wmi_mac_addr peer_macaddr;
44888     /** test command type, as per WMI_SIMULATION_TEST_CMD_TYPE */
44889     A_UINT32 test_cmd_type;
44890     /** test command type, as per WMI_SIMULATION_TEST_SUB_CMD_TYPE */
44891     A_UINT32 test_subcmd_type;
44892     /**
44893      * The frame type, frame subtype, and frame sequence number
44894      * are stored as bitfields within the below A_UINT32 "word".
44895      * Use the WMI_SIM_xxx_GET/SET macros to read and
44896      * write these bitfields.
44897      **/
44898     A_UINT32 frame_type_subtype_seq;
44899     /**
44900      * The frame offset and frame length,
44901      * are stored as bitfields within the below A_UINT32 "word".
44902      * Use the WMI_SIM_xxx_GET/SET macros to read and
44903      * write these bitfields.
44904      **/
44905     A_UINT32 frame_offset_length;
44906     /** buf_len: Buffer length in bytes
44907      * In some cases buf_len == frame_length, but not always.
44908      * For example, a DELAY_FRAME command will not involve any frame
44909      * contents, so frame_length will be zero, but buf_len will be
44910      * non-zero because it will contain command-specific parameters.
44911      */
44912     A_UINT32 buf_len;
44913 /* This TLV is followed by array of bytes:
44914  *   A_UINT8 bufp[];
44915  *       For FRAME_CONTENT_CHANGE commands, bufp contains the first 64 bytes
44916  *       of the frame.
44917  */
44918 } wmi_simulation_test_cmd_fixed_param;
44919 
44920 typedef struct {
44921     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_rsnxe */
44922     A_UINT32 tlv_header;
44923     /* rsnxe_param
44924      * Override RSNXE Used bit in FT reassoc request.
44925      *   Possible values from host are:
44926      *   0  use default value based on capability
44927      *   1  override with 1
44928      *   2  override with 0
44929      */
44930     A_UINT32 rsnxe_param;
44931 } wmi_wfa_config_rsnxe;
44932 
44933 typedef struct {
44934     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_csa */
44935     A_UINT32 tlv_header;
44936     /* ignore_csa
44937      * Ignore CSA from AP and keep STA in current channel and don't deauth AP.
44938      *   Possible values from host are:
44939      *   0  default behavior
44940      *   1  ignore CSA
44941      */
44942     A_UINT32 ignore_csa;
44943 } wmi_wfa_config_csa;
44944 
44945 typedef enum {
44946     WMI_WFA_CONFIG_OCV_FRMTYPE_SAQUERY_REQ          = 0x00000001,
44947     WMI_WFA_CONFIG_OCV_FRMTYPE_SAQUERY_RSP          = 0x00000002,
44948     WMI_WFA_CONFIG_OCV_FRMTYPE_FT_REASSOC_REQ       = 0x00000004,
44949     WMI_WFA_CONFIG_OCV_FRMTYPE_FILS_REASSOC_REQ     = 0x00000008,
44950 } WMI_WFA_CONFIG_OCV_FRMTYPE;
44951 
44952 typedef struct {
44953     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_ocv */
44954     A_UINT32 tlv_header;
44955     /* frame_types
44956      * Override OCI channel number in specified frames.
44957      * Possible frame types from host are enum WMI_WFA_CONFIG_OCV_FRMTYPE.
44958      */
44959     A_UINT32 frame_types;
44960     /* Frequency value in mhz to override in specified frame type */
44961     A_UINT32 chan_freq;
44962 } wmi_wfa_config_ocv;
44963 
44964 typedef struct {
44965     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_saquery */
44966     A_UINT32 tlv_header;
44967     /* remain_connect_on_saquery_timeout
44968      * Don't send deauth on SA Query response timeout.
44969      *   Possible values from host are:
44970      *   0  default behavior
44971      *   1  don't send deauth on SA Query response timeout
44972      */
44973     A_UINT32 remain_connect_on_saquery_timeout;
44974 } wmi_wfa_config_saquery;
44975 
44976 typedef struct {
44977     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_ofdma */
44978     A_UINT32 tlv_header;
44979     /* force_he_trigger_to_eht_sta
44980      *   Possible values from host are:
44981      *   0  default behavior
44982      *   1  instead of sending EHT triggers to EHT stations, send HE triggers
44983      */
44984     A_UINT32 force_he_trigger_to_eht_sta;
44985 } wmi_wfa_config_ofdma;
44986 
44987 typedef struct {
44988     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_cmd_fixed_param */
44989     A_UINT32 tlv_header;
44990     /** VDEV identifier */
44991     A_UINT32 vdev_id;
44992     /* The below TLV arrays follow this structure:
44993      * wmi_wfa_config_rsnxe   wfa_config_rsnxe[];   (0 or 1 elements)
44994      * wmi_wfa_config_csa     wfa_config_csa[];     (0 or 1 elements)
44995      * wmi_wfa_config_ocv     wfa_config_ocv[];     (0 or 1 elements)
44996      * wmi_wfa_config_saquery wfa_config_saquery[]; (0 or 1 elements)
44997      * wmi_wfa_config_ofdma   wfa_config_ofdma[];   (0 or 1 elements)
44998      */
44999 } wmi_wfa_config_cmd_fixed_param;
45000 
45001 #define WMI_TWT_SESSION_FLAG_FLOW_ID_GET(_var) WMI_GET_BITS(_var, 0, 16)
45002 #define WMI_TWT_SESSION_FLAG_FLOW_ID_SET(_var, _val) WMI_SET_BITS(_var, 0, 16, _val)
45003 
45004 #define WMI_TWT_SESSION_FLAG_BCAST_TWT_GET(_var) WMI_GET_BITS(_var, 16, 1)
45005 #define WMI_TWT_SESSION_FLAG_BCAST_TWT_SET(_var, _val) WMI_SET_BITS(_var, 16, 1, _val)
45006 
45007 #define WMI_TWT_SESSION_FLAG_TRIGGER_TWT_GET(_var) WMI_GET_BITS(_var, 17, 1)
45008 #define WMI_TWT_SESSION_FLAG_TRIGGER_TWT_SET(_var, _val) WMI_SET_BITS(_var, 17, 1, _val)
45009 
45010 #define WMI_TWT_SESSION_FLAG_ANNOUN_TWT_GET(_var) WMI_GET_BITS(_var, 18, 1)
45011 #define WMI_TWT_SESSION_FLAG_ANNOUN_TWT_SET(_var, _val) WMI_SET_BITS(_var, 18, 1, _val)
45012 
45013 #define WMI_TWT_SESSION_FLAG_TWT_PROTECTION_GET(_var) WMI_GET_BITS(_var, 19, 1)
45014 #define WMI_TWT_SESSION_FLAG_TWT_PROTECTION_SET(_var, _val) WMI_SET_BITS(_var, 19, 1, _val)
45015 
45016 #define WMI_TWT_SESSION_FLAG_TWT_INFO_FRAME_DISABLED_GET(_var) WMI_GET_BITS(_var, 20, 1)
45017 #define WMI_TWT_SESSION_FLAG_TWT_INFO_FRAME_DISABLED_SET(_var, _val) WMI_SET_BITS(_var, 20, 1, _val)
45018 
45019 #define WMI_TWT_SESSION_FLAG_TWT_PM_RESPONDER_MODE_VALID_GET(_var) WMI_GET_BITS(_var, 21, 1)
45020 #define WMI_TWT_SESSION_FLAG_TWT_PM_RESPONDER_MODE_VALID_SET(_var, _val) WMI_SET_BITS(_var, 21, 1, _val)
45021 
45022 #define WMI_TWT_SESSION_FLAG_TWT_PM_RESPONDER_MODE_GET(_var) WMI_GET_BITS(_var, 22, 1)
45023 #define WMI_TWT_SESSION_FLAG_TWT_PM_RESPONDER_MODE_SET(_var, _val) WMI_SET_BITS(_var, 22, 1, _val)
45024 
45025 #define WMI_TWT_SESSION_FLAG_RESTRICTED_TWT_GET(_var) WMI_GET_BITS(_var, 23, 1)
45026 #define WMI_TWT_SESSION_FLAG_RESTRICTED_TWT_SET(_var, _val) WMI_SET_BITS(_var, 23, 1, _val)
45027 
45028 typedef struct {
45029     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_session_stats_info */
45030     A_UINT32 tlv_hdr;
45031 
45032     A_UINT32     vdev_id;
45033     wmi_mac_addr peer_mac;
45034     A_UINT32 event_type; /* event type - defined in enum wmi_twt_session_stats_type */
45035     /*
45036      * Flags to provide information on TWT session and session types.
45037      * This field is filled with the bitwise combination of the flag values
45038      * defined by WMI_TWT_SESSION_FLAG_xxx
45039      */
45040     A_UINT32     flow_id_flags;
45041     A_UINT32     dialog_id;
45042     A_UINT32     wake_dura_us;
45043     A_UINT32     wake_intvl_us;
45044     /* this long time after TWT resumed the 1st Service Period will start */
45045     A_UINT32     sp_offset_us;
45046     /* service period start TSF */
45047     A_UINT32     sp_tsf_us_lo; /* bits 31:0 */
45048     A_UINT32     sp_tsf_us_hi; /* bits 63:32 */
45049     /* Current TSF */
45050     A_UINT32     curr_tsf_us_lo; /* bits 31:0 */
45051     A_UINT32     curr_tsf_us_hi; /* bits 63:32 */
45052 } wmi_twt_session_stats_info;
45053 
45054 enum wmi_twt_session_stats_type {
45055     WMI_TWT_SESSION_SETUP     = 1,
45056     WMI_TWT_SESSION_TEARDOWN  = 2,
45057     WMI_TWT_SESSION_UPDATE    = 3,
45058     WMI_TWT_SESSION_QUERY_RSP = 4,
45059 };
45060 
45061 typedef struct {
45062     /** TLV tag and len; tag equals
45063     * WMITLV_TAG_STRUC_wmi_pdev_twt_session_stats_event_fixed_param */
45064     A_UINT32 tlv_header;
45065 
45066     A_UINT32 pdev_id; /* ID of the pdev this response belongs to */
45067 
45068     /* The TLVs follows this structure:
45069      * wmi_twt_session_stats_info twt_sessions[]; <--- Array of twt_session.
45070      */
45071 } wmi_pdev_twt_session_stats_event_fixed_param;
45072 
45073 typedef struct wmi_pdev_vendor_event
45074 {
45075     /* type is WMITLV_TAG_STRUC_wmi_vendor_pdev_event_fixed_param */
45076     A_UINT32 tlv_header;
45077     /* pdev_id for identifying the MAC.  See macros starting with WMI_PDEV_ID_ for values. */
45078     A_UINT32 pdev_id;
45079     /* Any vendor specialization cases will need to add sub_type enum defs. */
45080     A_UINT32 sub_type;
45081     wmi_pdev_vendor_event_val evt;
45082     /* NOTE:
45083      * Future changes may increase the size of pdev_vendor_event.
45084      * Consequently, no fields can be added here after pdev_vendor_event,
45085      * because their offsets within wmi_pdev_vendor_event_fixed_param
45086      * would change, causing backwards incompatibilities.
45087      */
45088 /*
45089  * This fixed_param TLV may be followed by the below TLVs:
45090  *   - A_UINT32 opaque_vendor_var_len_data[]:
45091  *     Variable-length array of opaque data.
45092  *     The _fixed_param.sub_type value clarifies how to interpret the
45093  *     contents of this opaque data.
45094  */
45095 } wmi_pdev_vendor_event_fixed_param;
45096 typedef wmi_pdev_vendor_event_fixed_param wmi_vendor_pdev_event_fixed_param;
45097 
45098 typedef struct wmi_vdev_vendor_event
45099 {
45100     /* type is WMITLV_TAG_STRUC_wmi_vendor_vdev_event_fixed_param */
45101     A_UINT32 tlv_header;
45102     /* pdev_id for identifying the MAC.  See macros starting with WMI_PDEV_ID_ for values. */
45103     A_UINT32 pdev_id;
45104     /* unique id identifying the VDEV, generated by the caller */
45105     A_UINT32 vdev_id;
45106     /* Any vendor specialization cases will need to add sub_type enum defs. */
45107     A_UINT32 sub_type;
45108     wmi_vdev_vendor_event_val evt;
45109     /* NOTE:
45110      * Future changes may increase the size of vdev_vendor_event.
45111      * Consequently, no fields can be added here after vdev_vendor_event,
45112      * because their offsets within wmi_vdev_vendor_event_fixed_param
45113      * would change, causing backwards incompatibilities.
45114      */
45115 /*
45116  * This fixed_param TLV may be followed by the below TLVs:
45117  *   - A_UINT32 opaque_vendor_var_len_data[]:
45118  *     Variable-length array of opaque data.
45119  *     The _fixed_param.sub_type value clarifies how to interpret the
45120  *     contents of this opaque data.
45121  */
45122 } wmi_vdev_vendor_event_fixed_param;
45123 typedef wmi_vdev_vendor_event_fixed_param wmi_vendor_vdev_event_fixed_param;
45124 
45125 typedef struct wmi_peer_vendor_event
45126 {
45127     /* type is WMITLV_TAG_STRUC_wmi_vendor_peer_event_fixed_param */
45128     A_UINT32 tlv_header;
45129     /* pdev_id for identifying the MAC.  See macros starting with WMI_PDEV_ID_ for values. */
45130     A_UINT32 pdev_id;
45131     /* unique id identifying the VDEV, generated by the caller */
45132     A_UINT32 vdev_id;
45133     /* peer MAC address */
45134     wmi_mac_addr peer_macaddr;
45135     /* Any vendor specialization cases will need to add sub_type enum defs. */
45136     A_UINT32 sub_type;
45137     wmi_peer_vendor_event_val evt;
45138     /* NOTE:
45139      * Future changes may increase the size of peer_vendor_event.
45140      * Consequently, no fields can be added here after peer_vendor_event,
45141      * because their offsets within wmi_peer_vendor_event_fixed_param
45142      * would change, causing backwards incompatibilities.
45143      */
45144 /*
45145  * This fixed_param TLV may be followed by the below TLVs:
45146  *   - A_UINT32 opaque_vendor_var_len_data[]:
45147  *     Variable-length array of opaque data.
45148  *     The _fixed_param.sub_type value clarifies how to interpret the
45149  *     contents of this opaque data.
45150  */
45151 } wmi_peer_vendor_event_fixed_param;
45152 typedef wmi_peer_vendor_event_fixed_param wmi_vendor_peer_event_fixed_param;
45153 
45154 typedef struct wmi_pdev_vendor_cmd
45155 {
45156     /* type is WMITLV_TAG_STRUC_wmi_vendor_pdev_cmd_fixed_param */
45157     A_UINT32 tlv_header;
45158     /* pdev_id for identifying the MAC.  See macros starting with WMI_PDEV_ID_ for values. */
45159     A_UINT32 pdev_id;
45160     /* Any vendor specialization cases will need to add sub_type enum defs. */
45161     A_UINT32 sub_type;
45162     wmi_pdev_vendor_cmd_val cmd;
45163     /* NOTE:
45164      * Future changes may increase the size of pdev_vendor_cmd.
45165      * Consequently, no fields can be added here after pdev_vendor_cmd,
45166      * because their offsets within wmi_pdev_vendor_cmd_fixed_param
45167      * would change, causing backwards incompatibilities.
45168      */
45169 /*
45170  * This fixed_param TLV may be followed by the below TLVs:
45171  *   - A_UINT32 opaque_vendor_var_len_data[]:
45172  *     Variable-length array of opaque data.
45173  *     The _fixed_param.sub_type value clarifies how to interpret the
45174  *     contents of this opaque data.
45175  */
45176 } wmi_pdev_vendor_cmd_fixed_param;
45177 typedef wmi_pdev_vendor_cmd_fixed_param wmi_vendor_pdev_cmd_fixed_param;
45178 
45179 typedef struct wmi_vdev_vendor_cmd
45180 {
45181     /* type is WMITLV_TAG_STRUC_wmi_vendor_vdev_cmd_fixed_param */
45182     A_UINT32 tlv_header;
45183     /* pdev_id for identifying the MAC.  See macros starting with WMI_PDEV_ID_ for values. */
45184     A_UINT32 pdev_id;
45185     /* unique id identifying the VDEV, generated by the caller */
45186     A_UINT32 vdev_id;
45187     /* Any vendor specialization cases will need to add sub_type enum defs. */
45188     A_UINT32 sub_type;
45189     wmi_vdev_vendor_cmd_val cmd;
45190     /* NOTE:
45191      * Future changes may increase the size of vdev_vendor_cmd.
45192      * Consequently, no fields can be added here after vdev_vendor_cmd,
45193      * because their offsets within wmi_vdev_vendor_cmd_fixed_param
45194      * would change, causing backwards incompatibilities.
45195      */
45196 /*
45197  * This fixed_param TLV may be followed by the below TLVs:
45198  *   - A_UINT32 opaque_vendor_var_len_data[]:
45199  *     Variable-length array of opaque data.
45200  *     The _fixed_param.sub_type value clarifies how to interpret the
45201  *     contents of this opaque data.
45202  */
45203 } wmi_vdev_vendor_cmd_fixed_param;
45204 typedef wmi_vdev_vendor_cmd_fixed_param wmi_vendor_vdev_cmd_fixed_param;
45205 
45206 typedef struct wmi_peer_vendor_cmd
45207 {
45208     /* type is WMITLV_TAG_STRUC_wmi_vendor_peer_cmd_fixed_param */
45209     A_UINT32 tlv_header;
45210     /* pdev_id for identifying the MAC.  See macros starting with WMI_PDEV_ID_ for values. */
45211     A_UINT32 pdev_id;
45212     /* unique id identifying the VDEV, generated by the caller */
45213     A_UINT32 vdev_id;
45214     /* peer MAC address */
45215     wmi_mac_addr peer_macaddr;
45216     /* Any vendor specialization cases will need to add sub_type enum defs. */
45217     A_UINT32 sub_type;
45218     wmi_peer_vendor_cmd_val cmd;
45219     /* NOTE:
45220      * Future changes may increase the size of peer_vendor_cmd.
45221      * Consequently, no fields can be added here after peer_vendor_cmd,
45222      * because their offsets within wmi_peer_vendor_cmd_fixed_param
45223      * would change, causing backwards incompatibilities.
45224      */
45225 /*
45226  * This fixed_param TLV may be followed by the below TLVs:
45227  *   - A_UINT32 opaque_vendor_var_len_data[]:
45228  *     Variable-length array of opaque data.
45229  *     The _fixed_param.sub_type value clarifies how to interpret the
45230  *     contents of this opaque data.
45231  */
45232 } wmi_peer_vendor_cmd_fixed_param;
45233 typedef wmi_peer_vendor_cmd_fixed_param wmi_vendor_peer_cmd_fixed_param;
45234 
45235 typedef enum {
45236     WMI_MLO_LINK_FORCE_ACTIVE                 = 1, /* Force specific links active */
45237     WMI_MLO_LINK_FORCE_INACTIVE               = 2, /* Force specific links inactive */
45238     WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM        = 3, /* Force active a number of links, firmware to decide which links to inactive */
45239     WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM      = 4, /* Force inactive a number of links, firmware to decide which links to inactive */
45240     WMI_MLO_LINK_NO_FORCE                     = 5, /* Cancel the force operation of specific links, allow firmware to decide */
45241     WMI_MLO_LINK_FORCE_ACTIVE_INACTIVE        = 6, /* combination of force specific links active & force specific links inactive */
45242     WMI_MLO_LINK_NON_FORCE_UPDATE             = 7, /* Used when host wants to update other fields like disallow_mlo_mode_bmap */
45243 } WMI_MLO_LINK_FORCE_MODE;
45244 
45245 typedef enum {
45246     WMI_MLO_LINK_FORCE_REASON_NEW_CONNECT      = 1, /* Set force specific links because of new connection */
45247     WMI_MLO_LINK_FORCE_REASON_NEW_DISCONNECT   = 2, /* Set force specific links because of new dis-connection */
45248     WMI_MLO_LINK_FORCE_REASON_LINK_REMOVAL     = 3, /* Set force specific links because of AP-side link removal */
45249     WMI_MLO_LINK_FORCE_REASON_TDLS             = 4, /* Set force specific links because of 11BE MLO TDLS setup/teardown */
45250     WMI_MLO_LINK_FORCE_REASON_REVERT_FAILURE   = 5, /* Set force specific links for revert previous failed due to host reject */
45251 } WMI_MLO_LINK_FORCE_REASON;
45252 
45253 #define WMI_MLO_CONTROL_FLAGS_GET_OVERWRITE_FORCE_ACTIVE(mlo_flags) \
45254     WMI_GET_BITS(control_flags, 0, 1)
45255 #define WMI_MLO_CONTROL_FLAGS_SET_OVERWRITE_FORCE_ACTIVE(mlo_flags, value) \
45256     WMI_SET_BITS(control_flags, 0, 1, value)
45257 #define WMI_MLO_CONTROL_FLAGS_GET_OVERWRITE_FORCE_INACTIVE(mlo_flags) \
45258     WMI_GET_BITS(control_flags, 1, 1)
45259 #define WMI_MLO_CONTROL_FLAGS_SET_OVERWRITE_FORCE_INACTIVE(mlo_flags, value) \
45260     WMI_SET_BITS(control_flags, 1, 1, value)
45261 #define WMI_MLO_CONTROL_FLAGS_GET_DYNAMIC_FORCE_LINK_NUM(mlo_flags) \
45262     WMI_GET_BITS(control_flags, 2, 1)
45263 #define WMI_MLO_CONTROL_FLAGS_SET_DYNAMIC_FORCE_LINK_NUM(mlo_flags, value) \
45264     WMI_SET_BITS(control_flags, 2, 1, value)
45265 
45266 /*
45267  * This structure is used for passing wmi_mlo_control_flags.
45268  *
45269  *  - When force_mode is WMI_MLO_LINK_FORCE_ACTIVE or
45270  *    WMI_MLO_LINK_FORCE_INACTIVE host can pass below control flags,
45271  *    to indicate if FW need to clear earlier force bitmap config.
45272  *
45273  *  - When force mode is WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM or
45274  *    WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM, host can pass below control flags,
45275  *    to indicate if FW need to use force link number instead of force link
45276  *    bitmap.
45277  */
45278 typedef struct {
45279     union {
45280         struct {
45281             A_UINT32 overwrite_force_active_bitmap:1, /* indicate overwrite all earlier force_active bitmaps */
45282                      overwrite_force_inactive_bitmap:1, /* indicate overwrite all earlier force_inactive bitmaps */
45283                      dynamic_force_link_num:1, /* indicate fw to use force link number instead of force link bitmap */
45284                      unused: 29;
45285         };
45286         A_UINT32 control_flags;
45287     };
45288 } wmi_mlo_control_flags;
45289 
45290 typedef struct wmi_mlo_link_set_active_cmd
45291 {
45292     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_set_active_cmd_fixed_param; */
45293     A_UINT32 tlv_header;
45294     /** enum WMI_MLO_LINK_FORCE_MODE */
45295     A_UINT32 force_mode;
45296     /** reason of force link active / inactive, enum WMI_MLO_LINK_FORCE_REASON */
45297     A_UINT32 reason;
45298     /* indicate use vdev_id bitmap or link_id_bitmap */
45299     A_UINT32 use_ieee_link_id_bitmap;
45300 
45301     wmi_mac_addr ap_mld_mac_addr;
45302 
45303     wmi_mlo_control_flags ctrl_flags;
45304 /* The TLVs follows this structure:
45305  * wmi_mlo_set_active_link_number_param link_number_param[];
45306  *     Link number parameters, optional TLV.
45307  *     Present when force type is WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM or
45308  *     WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM.
45309  *     In other cases the length of array should be 0.
45310  *---
45311  * If use_ieee_link_id_bitmap equals 0 vdev_id_bitmap[] & vdev_id_bitmap2[]
45312  * are valid.
45313  * A_UINT32 vdev_id_bitmap[];
45314  *     Optional TLV, present when force type is WMI_MLO_LINK_FORCE_ACTIVE
45315  *     or WMI_MLO_LINK_FORCE_INACTIVE or WMI_MLO_LINK_NO_FORCE,
45316  *     to specific the vdevs to configure.
45317  *     For force mode WMI_MLO_LINK_FORCE_ACTIVE_INACTIVE vdev_id_bitmap[]
45318  *     carry the active vdev bitmap.
45319  *     In other cases the length of the array should be 0.
45320  * A_UINT32 vdev_id_bitmap2[];
45321  *     For force mode WMI_MLO_LINK_FORCE_ACTIVE_INACTIVE vdev_id_bitmap2[]
45322  *     carry the inactive vdev bitmap.
45323  *     In other cases the length of the array should be 0.
45324  *---
45325  * If use_ieee_link_id_bitmap equals 1 ieee_link_id_bitmap[] &
45326  * ieee_link_id_bitmap2[] are valid.
45327  * A_UINT32 ieee_link_id_bitmap[];
45328  *     present for  WMI_MLO_LINK_FORCE_ACTIVE
45329  *     or WMI_MLO_LINK_FORCE_INACTIVE or WMI_MLO_LINK_NO_FORCE
45330  *     or WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM or
45331  *     WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM
45332  * A_UINT32 ieee_link_id_bitmap2[];
45333  *     For force mode WMI_MLO_LINK_FORCE_ACTIVE_INACTIVE ieee_link_id_bitmap2[]
45334  *     carry the inactive linkid bitmap.
45335  *     In other cases the length of the array should be 0.
45336  *---
45337  * wmi_disallowed_mlo_mode_bitmap_param_t disallow_mlo_mode_bmap[];
45338  */
45339 } wmi_mlo_link_set_active_cmd_fixed_param;
45340 
45341 typedef struct wmi_mlo_set_active_link_number_param
45342 {
45343     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_set_active_link_number_param */
45344     A_UINT32 tlv_header;
45345     /** number of link to be config */
45346     A_UINT32 num_of_link;
45347     /** VDEV type, see values for vdev_type (WMI_VDEV_TYPE_AP,WMI_VDEV_TYPE_STA,
45348      *  WMI_VDEV_TYPE_IBSS, WMI_VDEV_TYPE_MONITOR,WMI_VDEV_TYPE_NAN,WMI_VDEV_TYPE_NDI ...)
45349      */
45350     A_UINT32 vdev_type;
45351     /** VDEV subtype, see values for vdev_subtype (WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE,
45352      *  WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT, WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO ...)*/
45353     A_UINT32 vdev_subtype;
45354     /** home channel frequency in MHz of the vdev*/
45355     A_UINT32 home_freq;
45356 
45357 } wmi_mlo_set_active_link_number_param;
45358 
45359 #define WMI_MLO_MODE_MLMR  0x1
45360 #define WMI_MLO_MODE_EMLSR 0x2
45361 
45362 #define WMI_MLO_IEEE_LINK_ID_INVALID 0xFF
45363 
45364 #define WMI_MLO_IEEE_LINK_ID_COMB_GET_LINK_ID1(ieee_link_id_comb) WMI_GET_BITS(ieee_link_id_comb, 0, 8)
45365 #define WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID1(ieee_link_id_comb, value) WMI_SET_BITS(ieee_link_id_comb, 0, 8, value)
45366 
45367 #define WMI_MLO_IEEE_LINK_ID_COMB_GET_LINK_ID2(ieee_link_id_comb) WMI_GET_BITS(ieee_link_id_comb, 8, 8)
45368 #define WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID2(ieee_link_id_comb, value) WMI_SET_BITS(ieee_link_id_comb, 8, 8, value)
45369 
45370 #define WMI_MLO_IEEE_LINK_ID_COMB_GET_LINK_ID3(ieee_link_id_comb) WMI_GET_BITS(ieee_link_id_comb, 16, 8)
45371 #define WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID3(ieee_link_id_comb, value) WMI_SET_BITS(ieee_link_id_comb, 16, 8, value)
45372 
45373 #define WMI_MLO_IEEE_LINK_ID_COMB_GET_LINK_ID4(ieee_link_id_comb) WMI_GET_BITS(ieee_link_id_comb, 24, 8)
45374 #define WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID4(ieee_link_id_comb, value) WMI_SET_BITS(ieee_link_id_comb, 24, 8, value)
45375 
45376 
45377 typedef struct wmi_disallowed_mlo_mode_bitmap_param
45378 {
45379     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_disallowed_mlo_mode_bitmap_param */
45380     A_UINT32 tlv_header;
45381     /** disallowed_mode_bitmap:
45382      * Bitmap of MLO Modes like MLMR, eMLSR which are not allowed.
45383      * Refer to WMI_MLO_MODE_*
45384      * disallowed_mode_bitmap          Meaning
45385      * ======================          =================
45386      *   0x0                           No restriction
45387      *   0x1                           MLMR is not allowed
45388      *   0x2                           EMLSR is not allowed
45389      *   0x3                           MLMR and EMLSR are not allowed
45390      */
45391     A_UINT32 disallowed_mode_bitmap;
45392 
45393     /** ieee_link_id_comb:
45394      * Give combination of IEEE link IDs for which above disallowed_mode_bitmap
45395      * is applicable.
45396      * Each 8-bits in ieee_link_id_comb represents one link ID.
45397      * A link ID is an integer value between 0 and 14.
45398      * Please set WMI_MLO_IEEE_LINK_ID_INVALID (0xff) if 8-bits is not used.
45399      * Use WMI_MLO_IEEE_LINK_ID_COMB_GET_LINK_ID* and _SET_LINK_ID* to get/set
45400      * link IDs in this field.
45401      */
45402     A_UINT32 ieee_link_id_comb;
45403 
45404 
45405     /** Example:
45406      * Say there are 3 MLO links with ieee link IDs as 1,2 and 10.
45407      * Say host wants to disallow MLMR between links with IDs 1 and 2,
45408      *                   disallow eMLSR between links with IDs 1 and 10,
45409      *                   disallow MLMR and eMLSR for links with IDs 2 and 10.
45410      * There will be 3 TLVs of type wmi_disallowed_mlo_mode_bitmap_param
45411      * like below.
45412      *
45413      *  wmi_disallowed_mlo_mode_bitmap_param[0]:
45414      *       disallowed_mode_bitmap = 0x1,
45415      *       ieee_link_id_comb = 0xFFFF0201
45416      *          WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID1(ieee_link_id_comb, 0x01)
45417      *          WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID2(ieee_link_id_comb, 0x02)
45418      *
45419      *  wmi_disallowed_mlo_mode_bitmap_param[1]
45420      *       disallowed_mode_bitmap = 0x2,
45421      *       ieee_link_id_comb = 0xFFFF0A01
45422      *          WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID1(ieee_link_id_comb, 0x01)
45423      *          WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID2(ieee_link_id_comb, 0x0a)
45424      *
45425      *  wmi_disallowed_mlo_mode_bitmap_param[2]
45426      *       disallowed_mode_bitmap = 0x3,
45427      *       ieee_link_id_comb = 0xFFFF0A02
45428      *          WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID1(ieee_link_id_comb, 0x02)
45429      *          WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID2(ieee_link_id_comb, 0x0a)
45430      */
45431 } wmi_disallowed_mlo_mode_bitmap_param;
45432 
45433 typedef enum {
45434     WMI_MLO_LINK_SET_ACTIVE_STATUS_SUCCESS     = 0,
45435     WMI_MLO_LINK_SET_ACTIVE_STATUS_HOST_REJECT = 1,
45436 } WMI_MLO_LINK_SET_ACTIVE_STATUS;
45437 
45438 typedef struct wmi_mlo_link_set_active_resp_event
45439 {
45440     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_set_active_resp_event_fixed_param; */
45441     A_UINT32 tlv_header;
45442 
45443     /** Return status. 0 for success, non-zero otherwise */
45444     A_UINT32 status;
45445 
45446     /* indicate use vdev_id bitmap or link_id_bitmap */
45447     A_UINT32 use_ieee_link_id_bitmap;
45448 
45449     wmi_mac_addr ap_mld_mac_addr;
45450 
45451 /* The TLVs follows this structure:
45452  *---
45453  * If use_ieee_link_id_bitmap equals 0, vdev_bitmap[] are valid.
45454  *     A_UINT32 force_active_vdev_bitmap[]; <-- current force active vdev.
45455  *     A_UINT32 force_inactive_vdev_bitmap[]; <-- current force inactive vdevs
45456  *---
45457  * If use_ieee_link_id_bitmap equals 1, ieee_link_id_bitmap[] are valid.
45458  *     A_UINT32 force_active_ieee_link_id_bitmap[];
45459  *     A_UINT32 force_inactive_ieee_link_id_bitmap[];
45460  *---
45461  *  current active ieee link id bitmap & inactive ieee link id bitmap
45462  *     A_UINT32 current_active_ieee_link_id_bitmap[];
45463  *     A_UINT32 current_inactive_ieee_link_id_bitmap[];
45464  */
45465 } wmi_mlo_link_set_active_resp_event_fixed_param;
45466 
45467 typedef struct {
45468     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_setup_cmd_fixed_param; */
45469     A_UINT32 tlv_header;
45470     /** Unique ID representing the hw_links part of the MLD */
45471     A_UINT32 mld_group_id;
45472     /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
45473     A_UINT32 pdev_id;
45474 /*
45475  * Followed by TLVs:
45476  *     A_UINT32 hw_link_ids[];
45477  */
45478 } wmi_mlo_setup_cmd_fixed_param;
45479 
45480 typedef struct {
45481     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_setup_complete_event_fixed_param; */
45482     A_UINT32 tlv_header;
45483     /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
45484     A_UINT32 pdev_id;
45485     /** Return status. 0 for success, non-zero otherwise */
45486     A_UINT32 status;
45487     /** max_ml_peer_ids:
45488      * Max number of ml_peerids across the SOC, Derived as
45489      *     max_mlo_peer * num chips.
45490      * (Max_mlo_peer and num_chips are provided by Host Platform
45491      * in QMI exchange).
45492      */
45493     A_UINT32 max_ml_peer_ids;
45494 } wmi_mlo_setup_complete_event_fixed_param;
45495 
45496 typedef struct {
45497     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_ready_cmd_fixed_param; */
45498     A_UINT32 tlv_header;
45499     /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
45500     A_UINT32 pdev_id;
45501 } wmi_mlo_ready_cmd_fixed_param;
45502 
45503 typedef enum wmi_mlo_tear_down_reason_code_type {
45504     WMI_MLO_TEARDOWN_REASON_SSR,
45505         /* keep old name as alias for new name */
45506         WMI_MLO_TEARDOWN_SSR_REASON = WMI_MLO_TEARDOWN_REASON_SSR,
45507     WMI_MLO_TEARDOWN_REASON_HOST_INITIATED,
45508         /* keep old name as alias for new name */
45509         WMI_MLO_TEARDOWN_HOST_INITIATED_REASON =
45510             WMI_MLO_TEARDOWN_REASON_HOST_INITIATED,
45511     WMI_MLO_TEARDOWN_REASON_STANDBY_DOWN,
45512     WMI_MLO_TEARDOWN_REASON_DYNAMIC_WSI_REMAP,
45513 } WMI_MLO_TEARDOWN_REASON_TYPE;
45514 
45515 typedef struct {
45516     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_teardown_fixed_param; */
45517     A_UINT32 tlv_header;
45518     /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
45519     A_UINT32 pdev_id;
45520     /** reason_code: of type WMI_TEARDOWN_REASON_TYPE */
45521     A_UINT32 reason_code;
45522     /* trigger_umac_reset : of type A_BOOL to indicate the umac reset for the partner chip. */
45523     A_UINT32 trigger_umac_reset;
45524     /* erp_standby_mode : of type A_BOOL to indicate the chip is going to be active in ERP */
45525     A_UINT32 erp_standby_mode;
45526 } wmi_mlo_teardown_fixed_param;
45527 
45528 typedef struct {
45529     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_teardown_complete_fixed_param; */
45530     A_UINT32 tlv_header;
45531     /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
45532     A_UINT32 pdev_id;
45533     /** Return status. 0 for success, non-zero otherwise */
45534     A_UINT32 status;
45535 } wmi_mlo_teardown_complete_fixed_param;
45536 
45537 typedef struct {
45538     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_peer_recommended_links; */
45539     A_UINT32 tlv_header;
45540     /** AID (association id) of this station */
45541     A_UINT32 assoc_id;
45542     /** Request link id set to disable */
45543     A_UINT32 linkid_bitmap;
45544 } wmi_mlo_peer_recommended_links;
45545 
45546 typedef struct {
45547     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_recommendation_fixed_param */
45548     A_UINT32 tlv_header;
45549     /* unique id identifying the VDEV, generated by the caller */
45550     A_UINT32 vdev_id;
45551     /* DTIM specified in units of num beacon intervals */
45552     A_UINT32 dtim_period;
45553     /* The TLVs follows this structure:
45554      * wmi_mlo_peer_recommended_links recommended_links[];
45555      */
45556 } wmi_mlo_link_recommendation_fixed_param;
45557 
45558 #define WMI_TID_TO_LINK_MAP_TID_NUM_GET(_var)               WMI_GET_BITS(_var, 0, 5)
45559 #define WMI_TID_TO_LINK_MAP_TID_NUM_SET(_var, _val)         WMI_SET_BITS(_var, 0, 5, _val)
45560 
45561 #define WMI_TID_TO_LINK_MAP_DIR_GET(_var)                   WMI_GET_BITS(_var, 5, 2)
45562 #define WMI_TID_TO_LINK_MAP_DIR_SET(_var, _val)             WMI_SET_BITS(_var, 5, 2, _val)
45563 
45564 #define WMI_TID_TO_LINK_MAP_DEFAULT_MAPPING_GET(_var)       WMI_GET_BITS(_var, 7, 1)
45565 #define WMI_TID_TO_LINK_MAP_DEFAULT_MAPPING_SET(_var, _val) WMI_SET_BITS(_var, 7, 1, _val)
45566 
45567 #define WMI_TID_TO_LINK_MAP_LINK_MASK_GET(_var)             WMI_GET_BITS(_var, 8, 16)
45568 #define WMI_TID_TO_LINK_MAP_LINK_MASK_SET(_var, _val)       WMI_SET_BITS(_var, 8, 16, _val)
45569 
45570 enum {
45571     WMI_TID_TO_LINK_MAP_DIR_DL,
45572     WMI_TID_TO_LINK_MAP_DIR_UL,
45573     WMI_TID_TO_LINK_MAP_DIR_BIDI,
45574 };
45575 
45576 typedef struct {
45577     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tid_to_link_map */
45578     A_UINT32 tlv_header;
45579 
45580     /**
45581      * A_UINT32
45582      *     WMI_TID_TO_LINK_MAP_TID_NUM_GET / WMI_TID_TO_LINK_MAP_TID_NUM_SET
45583      *     tid_num:5,
45584      *
45585      *     WMI_TID_TO_LINK_MAP_DIR_GET / WMI_TID_TO_LINK_MAP_DIR_SET
45586      *     dir:2,                 // 0 - DL, 1 - UL, 2 - BiDi
45587      *
45588      *     WMI_TID_TO_LINK_MAP_DEFAULT_MAPPING_GET /
45589      *         WMI_TID_TO_LINK_MAP_DEFAULT_MAPPING_SET
45590      *     default_link_mapping:1, // If this is set to 1, ignore
45591      *                             // link_mapping_mask for the specific tid
45592      *
45593      *     WMI_TID_TO_LINK_MAP_LINK_MASK_GET / WMI_TID_TO_LINK_MAP_LINK_MASK_SET
45594      *     link_mapping_mask:16,
45595      *
45596      *     rsvd:8;
45597      */
45598     A_UINT32 tid_to_link_map_info;
45599 } wmi_tid_to_link_map;
45600 
45601 #define WMI_MAX_NUM_PREFERRED_LINKS 4
45602 
45603 /* NOTE:
45604  * wmi_peer_preferred_link_map will be deprecated and replaced
45605  * by wmi_mlo_peer_link_control_param.
45606  */
45607 typedef struct {
45608     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_preferred_link_map */
45609     A_UINT32 tlv_header;
45610 
45611     /* num_preferred_links:
45612      * If it is 0, all links are equally preferred and which link to be used
45613      *  in each schedule is decided by FW.
45614      */
45615     A_UINT32 num_preferred_links;
45616 
45617     /* [0] - highest preferred link, [1] - 2nd preferred link, etc. */
45618     A_UINT32 preferred_link_order[WMI_MAX_NUM_PREFERRED_LINKS];
45619 
45620     /* expected_max_latency_ms:
45621      * 0     - Expected Max Latency to be estimated in Firmware
45622      * Non 0 - Firmware should try to achieve given max latency
45623      *         in first preferred link.
45624      *         If unable to meet in first preferred link, start scheduling
45625      *         in next preferred link and so on.
45626      */
45627     A_UINT32 expected_max_latency_ms[WLAN_MAX_AC];
45628 } wmi_peer_preferred_link_map;
45629 
45630 #define WMI_MLO_PEER_LINK_CONTROL_PARAM_SET_TX_LINK_TUPLE_CONFIG(comp, value) \
45631     WMI_SET_BITS(comp, 0, 1, value)
45632 #define WMI_MLO_PEER_LINK_CONTROL_PARAM_GET_TX_LINK_TUPLE_CONFIG(comp) \
45633     WMI_GET_BITS(comp, 0, 1)
45634 
45635 #define WMI_MLO_PEER_LINK_CONTROL_PARAM_SET_PREFERRED_LINK_CONFIG(comp, value) \
45636     WMI_SET_BITS(comp, 1, 1, value)
45637 #define WMI_MLO_PEER_LINK_CONTROL_PARAM_GET_PREFERRED_LINK_CONFIG(comp) \
45638     WMI_GET_BITS(comp, 1, 1)
45639 
45640 #define WMI_MAX_NUM_MLO_LINKS 5
45641 
45642 typedef struct {
45643     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_preferred_link_map */
45644     A_UINT32 tlv_header;
45645 
45646     /** flags:
45647      * Bit0    : tx_link_tuple enable/disable.
45648      *           When enabled, f/w picks the links in tx_link_tuple_bitmap
45649      *           for TX scheduling.
45650      * Bit1    : preferred_link enable/disable.
45651      *           When enabled, f/w schedules the data on preferred link first.
45652      *           If it fails to deliver within a timeout, it additionally
45653      *           starts attempting TX on non-preferred links.
45654      * Bit2-31 : reserved
45655      */
45656      A_UINT32 flags;
45657 
45658     /* num_links: number of links present in link_priority_order array below.
45659      * 0        - we dont have sorted list of link priority
45660      * non zero - this should be the max number of links that the peer supports.
45661      */
45662     A_UINT32 num_links;
45663 
45664     /* link_priority_order:
45665      * [0] - ID of highest priority link,
45666      * [1] - ID of 2nd highest priority link, etc.
45667      */
45668     A_UINT32 link_priority_order[WMI_MAX_NUM_MLO_LINKS];
45669 
45670     /* tx_link_tuple_bitmap:
45671      * bitmap of indices within link_priority_order array that needs to be
45672      * selected in the TX link tuple.
45673      * FW will not attempt scheduling on a link if it is not part of the
45674      * tx_link_tuple.
45675      */
45676     A_UINT32 tx_link_tuple_bitmap;
45677 
45678     /* max_timeout_ms: applicable only when preferred_link is enabled
45679      * 0     - max_timeout_ms to be estimated in Firmware
45680      * Non 0 - value beyond which, firmware should additionally start
45681      *         scheduling on non preferred links
45682      */
45683     A_UINT32 max_timeout_ms[WLAN_MAX_AC];
45684 } wmi_mlo_peer_link_control_param;
45685 
45686 typedef struct {
45687     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_to_link_map_fixed_param */
45688     A_UINT32 tlv_header;
45689     /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
45690     A_UINT32 pdev_id;
45691 
45692     /** MLO Peer's current link MAC address */
45693     wmi_mac_addr link_macaddr;
45694 
45695     /** mapping_switch_time from the T2LM IE */
45696     A_UINT32 mapping_switch_time;
45697 
45698     /** expected_duration from the T2LM IE, in units of TUs */
45699     A_UINT32 expected_duration;
45700 
45701     /**
45702      * Following this structure is the TLV:
45703      *   - struct wmi_tid_to_link_map tid_to_link_map[];
45704      *   - struct wmi_peer_preferred_link_map peer_preferred_link_map[];
45705      *     Note - TLV array of peer_preferred_link_map has either 0 or 1
45706      *     entries, not multiple entries.
45707      *   - struct wmi_mlo_peer_link_control_param[];
45708      *     Note: can have 0 or 1 entry.
45709      */
45710 } wmi_peer_tid_to_link_map_fixed_param;
45711 
45712 typedef struct{
45713     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_ap_vdev_tid_to_link_map_cmd_fixed_param */
45714     A_UINT32 tlv_header;
45715     /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
45716     A_UINT32 pdev_id;
45717     /** vdev_id for identifying the MLO Vap */
45718     A_UINT32 vdev_id;
45719     /** DEPRECATED: disabled link bits */
45720     A_UINT32 disabled_link_bitmap; /* DEPRECATED */
45721     /**
45722      * Following this structure is the TLV:
45723      * struct wmi_mlo_ap_vdev_tid_to_link_map_ie_info[];
45724      */
45725 } wmi_mlo_ap_vdev_tid_to_link_map_cmd_fixed_param;
45726 
45727 typedef enum {
45728     /* Mapping Switch TSF */
45729     WMI_MAP_SWITCH_TIMER_TSF,
45730     /* Mapping Switch Timer Expired */
45731     WMI_MAP_SWITCH_TIMER_EXPIRED,
45732     /* Expected Duration Expired */
45733     WMI_EXPECTED_DUR_EXPIRED,
45734 } WMI_MLO_TID_TO_LINK_MAP_STATUS;
45735 
45736 #define WMI_BCAST_T2LM_MAX 16 /* max number of vdevs covered by T2LM stats */
45737 typedef struct {
45738     /* TLV tag and len; tag equals
45739      * WMITLV_TAG_STRUC_wmi_ctrl_path_t2lm_stats_struct
45740      */
45741     A_UINT32 tlv_header;
45742     /*
45743      * The below arrays store per-vdev counters, and are indexed by vdev ID.
45744      * The number of valid elements is min(WMI_BCAST_T2LM_MAX, num vdevs).
45745      */
45746     A_UINT32 bcast_t2lm_wmi_cmd[WMI_BCAST_T2LM_MAX];
45747     A_UINT32 bcast_t2lm_wmi_evt_map_swt_tme_tsf[WMI_BCAST_T2LM_MAX];
45748     A_UINT32 bcast_t2lm_wmi_evt_map_swt_tme_exp[WMI_BCAST_T2LM_MAX];
45749     A_UINT32 bcast_t2lm_wmi_evt_exp_dur_exp[WMI_BCAST_T2LM_MAX];
45750 } wmi_ctrl_path_t2lm_stats_struct;
45751 
45752 typedef struct{
45753     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_ap_vdev_tid_to_link_map_evt_fixed_param */
45754     A_UINT32 tlv_header;
45755     /* vdev_id of AP MLO vap */
45756     A_UINT32 vdev_id;
45757     /* containts mapping status of WMI_MLO_TID_TO_LINK_MAP_STATUS */
45758     A_UINT32 status_type;
45759     /* Mapping switch time of current TSF value */
45760     A_UINT32 mapping_switch_tsf;
45761 } wmi_mlo_ap_vdev_tid_to_link_map_evt_fixed_param;
45762 
45763 /* CTRL Field  bit-5-7 reserved */
45764 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DIR_GET(_var)                WMI_GET_BITS(_var, 0, 2)
45765 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DIR_SET(_var, _val)          WMI_SET_BITS(_var, 0, 2, _val)
45766 
45767 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DEF_LINK_GET(_var)           WMI_GET_BITS(_var, 2, 1)
45768 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DEF_LINK_SET(_var, _val)     WMI_SET_BITS(_var, 2, 1, _val)
45769 
45770 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_SWT_TIME_GET(_var)           WMI_GET_BITS(_var, 3, 1)
45771 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_SWT_TIME_SET(_var, _val)     WMI_SET_BITS(_var, 3, 1, _val)
45772 
45773 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DUR_TIME_GET(_var)           WMI_GET_BITS(_var, 4, 1)
45774 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DUR_TIME_SET(_var, _val)     WMI_SET_BITS(_var, 4, 1, _val)
45775 
45776 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_SIZE_GET(_var)       WMI_GET_BITS(_var, 5, 1)
45777 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_SIZE_SET(_var, _val) WMI_SET_BITS(_var, 5, 1, _val)
45778 
45779 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_PRE_GET(_var)       WMI_GET_BITS(_var, 8, 8)
45780 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_PRE_SET(_var, _val) WMI_SET_BITS(_var, 8, 8, _val)
45781 
45782 /* IEEE Link ID 15 bits on each link id 1 bit is reserved */
45783 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_0_GET(_var)          WMI_GET_BITS(_var, 0, 15)
45784 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_0_SET(_var, _val)    WMI_SET_BITS(_var, 0, 15, _val)
45785 
45786 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_1_GET(_var)          WMI_GET_BITS(_var, 16, 15)
45787 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_1_SET(_var, _val)    WMI_SET_BITS(_var, 16, 15, _val)
45788 
45789 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_2_GET(_var)          WMI_GET_BITS(_var, 0, 15)
45790 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_2_SET(_var, _val)    WMI_SET_BITS(_var, 0, 15, _val)
45791 
45792 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_3_GET(_var)          WMI_GET_BITS(_var, 16, 15)
45793 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_3_SET(_var, _val)    WMI_SET_BITS(_var, 16, 15, _val)
45794 
45795 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_4_GET(_var)          WMI_GET_BITS(_var, 0, 15)
45796 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_4_SET(_var, _val)    WMI_SET_BITS(_var, 0, 15, _val)
45797 
45798 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_5_GET(_var)          WMI_GET_BITS(_var, 16, 15)
45799 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_5_SET(_var, _val)    WMI_SET_BITS(_var, 16, 15, _val)
45800 
45801 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_6_GET(_var)          WMI_GET_BITS(_var, 0, 15)
45802 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_6_SET(_var, _val)    WMI_SET_BITS(_var, 0, 15, _val)
45803 
45804 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_7_GET(_var)          WMI_GET_BITS(_var, 16, 15)
45805 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_7_SET(_var, _val)    WMI_SET_BITS(_var, 16, 15, _val)
45806 
45807 /* HW Link ID each hw link with 16-bit */
45808 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_0_GET(_var)            WMI_GET_BITS(_var, 0, 16)
45809 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_0_SET(_var, _val)      WMI_SET_BITS(_var, 0, 16, _val)
45810 
45811 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_1_GET(_var)            WMI_GET_BITS(_var, 16, 16)
45812 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_1_SET(_var, _val)      WMI_SET_BITS(_var, 16, 16, _val)
45813 
45814 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_2_GET(_var)            WMI_GET_BITS(_var, 0, 16)
45815 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_2_SET(_var, _val)      WMI_SET_BITS(_var, 0, 16, _val)
45816 
45817 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_3_GET(_var)            WMI_GET_BITS(_var, 16, 16)
45818 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_3_SET(_var, _val)      WMI_SET_BITS(_var, 16, 16, _val)
45819 
45820 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_4_GET(_var)            WMI_GET_BITS(_var, 0, 16)
45821 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_4_SET(_var, _val)      WMI_SET_BITS(_var, 0, 16, _val)
45822 
45823 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_5_GET(_var)            WMI_GET_BITS(_var, 16, 16)
45824 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_5_SET(_var, _val)      WMI_SET_BITS(_var, 16, 16, _val)
45825 
45826 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_6_GET(_var)            WMI_GET_BITS(_var, 0, 16)
45827 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_6_SET(_var, _val)      WMI_SET_BITS(_var, 0, 16, _val)
45828 
45829 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_7_GET(_var)            WMI_GET_BITS(_var, 16, 16)
45830 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_7_SET(_var, _val)      WMI_SET_BITS(_var, 16, 16, _val)
45831 
45832 typedef struct {
45833     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tid_to_link_map */
45834     A_UINT32 tlv_header;
45835     /*
45836      * A_UINT32
45837      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DIR_GET /
45838      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DIR_SET
45839      *      direction: 2       // 0 - DL, 1 - UL, 2 - BiDi
45840      *
45841      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DEF_LINK_GET /
45842      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DEF_LINK_SET
45843      *      default_link_mapping:1 // 1 - Default Link Mapping Present
45844      *                             // 0 - Default Link Mapping not present
45845      *
45846      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_SWT_TIME_GET /
45847      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_SWT_TIME_SET
45848      *      mapping_switch_time_present:1 // 1 - Mapping Switch Time
45849      *                                    //     Field Present
45850      *                                    // 0 - Mapping Switch Time
45851      *                                    //     Field not Present
45852      *
45853      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DUR_TIME_GET /
45854      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DUR_TIME_SET
45855      *      expected_duration_present:1  // 1 - Expected Duration Field Present
45856      *                                   // 0 - Expected Duration Field
45857      *                                   //     not Present
45858      *
45859      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_SIZE_GET
45860      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_SIZE_SET
45861      *      link_mapping_size:1          // 1 - Link Mapping Size  1 Octets
45862      *                                   // 0 - Link Mapping Size  2 Octets
45863      *
45864      *      reserved:2
45865      *
45866      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_PRE_GET /
45867      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_PRE_SET
45868      *      link_mapping_presence_indicator:8 // Link mapping presence indicator
45869      *
45870      *      reserved2:16 // upper 16 bits are unused
45871      */
45872     A_UINT32 tid_to_link_map_ctrl;
45873 
45874     /*
45875      * Mapping Switch time represents TSF time for the New TID_TO_LINK Mapping
45876      * will be established
45877      * 16 bit of TSF time ( from bits 10 to 25)
45878      *
45879      * Default to Non-Default: One TID_TO_LINK Mapping IE
45880      * (wmi_mlo_ap_vdev_tid_to_link_map_ie_info)
45881      * Mapping switch time present for New Non-Default Mapping
45882      *
45883      * Non-Default to Non-Default: Two TID_TO_LINK Mapping IE
45884      * (wmi_mlo_ap_vdev_tid_to_link_map_ie_info)
45885      * Mapping switch time not present for 1st TID_TO_LINK Mapping
45886      * (Current Non-Default Mapping) value would be zero
45887      * Mapping switch time present for 2nd TID_TO_LINK Mapping
45888      * (New Non-Default Mapping)
45889      *
45890      * Non_Default to Default: One TID_TO_LINK Mapping IE
45891      * (wmi_mlo_ap_vdev_tid_to_link_map_ie_info)
45892      * Mapping switch time not present value would be zero
45893      */
45894     A_UINT32 map_switch_time;
45895     /*
45896      * Expected duration would be either duration/remaining duration of Mapping
45897      *
45898      * Default to Non-Default: One TID_TO_LINK Mapping IE
45899      * (wmi_mlo_ap_vdev_tid_to_link_map_ie_info)
45900      * Expected duration represents duration of New Non-Default Mapping
45901      * will be effective
45902      *
45903      * Non-Default to Non-Default: Two TID_TO_LINK Mapping IE
45904      * (wmi_mlo_ap_vdev_tid_to_link_map_ie_info)
45905      * Expected duration represents remaing duration of 1st TID_TO_LINK
45906      * Mapping (Current Non-Default Mapping)
45907      * Expected duration represents duration of the 2nd TID_TO_LINK
45908      * Mapping (New Non-Default Mapping ) will be effective
45909      *
45910      * Non_Default to Default: One TID_TO_LINK Mapping IE
45911      * (wmi_mlo_ap_vdev_tid_to_link_map_ie_info)
45912      * Expected duration represents remaing duration of Current Non-Default
45913      * Mapping
45914      */
45915     A_UINT32 expected_duration;
45916 
45917     /*
45918      * for default_link_mapping ieee_tid_0_1_link_map value would be zero
45919      * which means IE should not include this param
45920      * A_UINT32
45921      *
45922      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_0_GET /
45923      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_0_SET
45924      *      tid_0_link_id:15 // TID_0 Link IDs (0 to 14)
45925      *                       // Non-Zero value represents links mapped
45926      *                       // to this TID.
45927      *                       // Zero value represents links are not mapped
45928      *                       // to this TID.
45929      *
45930      *      reserved:1
45931      *
45932      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_1_GET /
45933      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_1_SET
45934      *      tid_1_link_id:15 // TID_1 Link IDs (0 to 14)
45935      *                       // Non-Zero value represents links mapped
45936      *                       // to this TID.
45937      *                       // Zero value represents links are not mapped
45938      *                       // to this TID.
45939      *
45940      *      reserved:1
45941      */
45942     A_UINT32 ieee_tid_0_1_link_map;
45943     /*
45944      *  for default_link_mapping ieee_tid_2_3_link_map value would be zero
45945      *  which means IE should not include this param
45946      * A_UINT32
45947      *
45948      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_2_GET /
45949      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_2_SET
45950      *      tid_2_link_id:15 // TID_2 Link IDs (0 to 14)
45951      *                       // Non-Zero value represents links mapped
45952      *                       // to this TID.
45953      *                       // Zero value represents links are not mapped
45954      *                       // to this TID.
45955      *
45956      *      reserved:1
45957      *
45958      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_3_GET /
45959      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_3_SET
45960      *      tid_3_link_id:15 // TID_3 Link IDs (0 to 14)
45961      *                       // Non-Zero value represents links mapped
45962      *                       // to this TID.
45963      *                       // Zero value represents links are not mapped
45964      *                       // to this TID.
45965      *
45966      *      reserved:1
45967      */
45968     A_UINT32 ieee_tid_2_3_link_map;
45969     /*
45970      * for default_link_mapping ieee_tid_4_5_link_map value would be zero
45971      * which means IE should not include this param
45972      * A_UINT32
45973      *
45974      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_4_GET /
45975      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_4_SET
45976      *      tid_4_link_id:15 // TID_4 Link IDs (0 to 14)
45977      *                       // Non-Zero value represents links mapped
45978      *                       // to this TID.
45979      *                       // Zero value represents links are not mapped
45980      *                       // to this TID.
45981      *
45982      *      reserved:1
45983      *
45984      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_5_GET /
45985      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_5_SET
45986      *      tid_5_link_id:15 // TID_5 Link IDs (0 to 14)
45987      *                       // Non-Zero value represents links mapped
45988      *                       // to this TID.
45989      *                       // Zero value represents links are not mapped
45990      *                       // to this TID.
45991      *
45992      *      reserved:1
45993      */
45994     A_UINT32 ieee_tid_4_5_link_map;
45995     /*
45996      * for default_link_mapping ieee_tid_6_7_link_map value would be zero
45997      * which means IE should not include this param
45998      * A_UINT32
45999      *
46000      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_6_GET /
46001      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_6_SET
46002      *      tid_6_link_id:15 // TID_6 Link IDs (0 to 14)
46003      *                       // Non-Zero value represents links mapped
46004      *                       // to this TID.
46005      *                       // Zero value represents links are not mapped
46006      *                       // to this TID.
46007      *
46008      *      reserved:1
46009      *
46010      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_7_GET /
46011      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_7_SET
46012      *      tid_7_link_id:15 // TID_7 Link IDs (0 to 14)
46013      *                       // Non-Zero value represents links mapped
46014      *                       // to this TID.
46015      *                       // Zero value represents links are not mapped
46016      *                       // to this TID.
46017      *
46018      *      reserved:1
46019      */
46020     A_UINT32 ieee_tid_6_7_link_map;
46021 
46022     /*
46023      * hw_link_map will be used by the FW to pause or unpause the TIDs
46024      * in all the associated MLD STAs in the corresponsing MLD VAP
46025      * A_UINT32
46026      *
46027      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_0_GET /
46028      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_0_SET
46029      *      hw_tid_0_link_map:16
46030      *
46031      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_1_GET /
46032      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_1_SET
46033      *      hw_tid_1_link_map:16
46034      */
46035     A_UINT32 hw_tid_0_1_link_map;
46036     /*
46037      * hw_link_map will be used by the FW to pause or unpause the TIDs
46038      * in all the associated MLD STAs in the corresponsing MLD VAP
46039      * A_UINT32
46040      *
46041      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_2_GET /
46042      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_2_SET
46043      *      hw_tid_2_link_map:16
46044      *
46045      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_3_GET /
46046      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_3_SET
46047      *      hw_tid_3_link_map:16
46048      */
46049     A_UINT32 hw_tid_2_3_link_map;
46050     /*
46051      * hw_link_map will be used by the FW to pause or unpause the TIDs
46052      * in all the associated MLD STAs in the corresponsing MLD VAP
46053      * A_UINT32
46054      *
46055      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_4_GET /
46056      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_4_SET
46057      *      hw_tid_4_link_map:16
46058      *
46059      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_5_GET /
46060      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_5_SET
46061      *      hw_tid_5_link_map:16
46062      */
46063     A_UINT32 hw_tid_4_5_link_map;
46064     /*
46065      * hw_link_map will be used by the FW to pause or unpause the TIDs
46066      * in all the associated MLD STAs in the corresponsing MLD VAP
46067      * A_UINT32
46068      *
46069      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_6_GET /
46070      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_6_SET
46071      *      hw_tid_6_link_map:16
46072      *
46073      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_7_GET /
46074      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_7_SET
46075      *      hw_tid_7_link_map:16
46076      */
46077     A_UINT32 hw_tid_6_7_link_map;
46078 
46079     /* Indicates the disabled link map for 802.11be T2LM */
46080     A_UINT32 disabled_link_bitmap;
46081 } wmi_mlo_ap_vdev_tid_to_link_map_ie_info;
46082 
46083 #define WMI_IGMP_OFFLOAD_SUPPORT_DISABLE_BITMASK    0x0
46084 #define WMI_IGMP_V1_OFFLOAD_SUPPORT_BITMASK         0x1
46085 #define WMI_IGMP_V2_OFFLOAD_SUPPORT_BITMASK         0x2
46086 #define WMI_IGMP_V3_OFFLOAD_SUPPORT_BITMASK         0x4
46087 #define WMI_IGMP_OFFLOAD_SUPPORT_ALL_VERSION        0x7
46088 
46089 typedef struct {
46090     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_igmp_offload_fixed_param */
46091     A_UINT32 vdev_id;                   /** VDEV identifier */
46092     A_UINT32 enable;                    /** IGMP offload support enable/disable */
46093     A_UINT32 version_support_bitmask;   /** IGMP version support v1, v2 and/or v3*/
46094 
46095 /* Following this structure are the TLVs:
46096  *     WMI_IPV4_ADDR  grp_ip_address[num_mcast_ipv4_addr];
46097  */
46098 } wmi_igmp_offload_fixed_param;
46099 
46100 /* flags for ICMP Offload IP4,IP6 */
46101 #define WMI_ICMP_OFFLOAD_IPV4_ENABLED_BIT 0
46102 #define WMI_ICMP_OFFLOAD_IPV6_ENABLED_BIT 1
46103 
46104 /* set IPv4 enabled/disabled flag and get the flag */
46105 #define WMI_SET_ICMP_OFFLOAD_IPV4_ENABLED_BIT(valid_bitmask)  \
46106     WMI_SET_BITS(valid_bitmask, WMI_ICMP_OFFLOAD_IPV4_ENABLED_BIT, 1, 1)
46107 
46108 #define WMI_SET_ICMP_OFFLOAD_IPV4_DISABLED_BIT(valid_bitmask) \
46109     WMI_SET_BITS(valid_bitmask, WMI_ICMP_OFFLOAD_IPV4_ENABLED_BIT, 1, 0)
46110 
46111 #define WMI_GET_ICMP_OFFLOAD_IPV4_ENABLED(valid_bitmask) \
46112     WMI_GET_BITS(valid_bitmask, WMI_ICMP_OFFLOAD_IPV4_ENABLED_BIT, 1)
46113 
46114 /* set IPv6 enabled flag, disabled and get the flag */
46115 #define WMI_SET_ICMP_OFFLOAD_IPV6_ENABLED_BIT(valid_bitmask) \
46116     WMI_SET_BITS(valid_bitmask, WMI_ICMP_OFFLOAD_IPV6_ENABLED_BIT, 1, 1)
46117 
46118 #define WMI_SET_ICMP_OFFLOAD_IPV6_DISABLED_BIT(valid_bitmask) \
46119     WMI_SET_BITS(valid_bitmask, WMI_ICMP_OFFLOAD_IPV6_ENABLED_BIT, 1, 0)
46120 
46121 #define WMI_GET_ICMP_OFFLOAD_IPV6_ENABLED(valid_bitmask) \
46122     WMI_GET_BITS(valid_bitmask, WMI_ICMP_OFFLOAD_IPV6_ENABLED_BIT, 1)
46123 
46124 typedef struct {
46125     /** TLV tag and len; tag equals
46126      * WMITLV_TAG_STRUC_wmi_vdev_icmp_offload_cmd_fixed_param
46127      */
46128     A_UINT32      tlv_header;
46129     A_UINT32      vdev_id;
46130     A_UINT32      enable;
46131     /* bitmask for valid ipv4/ipv6 address */
46132     A_UINT32      valid_bitmask;
46133     WMI_IPV4_ADDR ipv4_addr;
46134 /* Following this structure are the TLVs:
46135  *      WMI_IPV6_ADDR ipv6_addr[num_ipv6_addr];
46136  */
46137 } wmi_icmp_offload_fixed_param;
46138 
46139 typedef struct {
46140     /** TLV tag and len; tag equals
46141     * WMITLV_TAG_STRUC_wmi_vdev_smart_monitor_event_fixed_param */
46142     A_UINT32 tlv_header;
46143     /* VDEV identifier */
46144     A_UINT32 vdev_id;
46145     /** Average RSSI value of Data Frames */
46146     A_INT32 avg_rssi_data_dbm;
46147     /** rx_vht_sgi:
46148      * Short guard interval state of Data frames obtaining from rx PPDU TLV
46149      * of VHTSIGA buf.
46150      *     0: Default (No sgi set)
46151      *     1: sgi set
46152      */
46153     A_UINT32 rx_vht_sgi;
46154 } wmi_vdev_smart_monitor_event_fixed_param;
46155 
46156 typedef struct {
46157     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_multiple_vdev_set_param_cmd_fixed_param */
46158     A_UINT32 pdev_id;
46159     /** parameter id   */
46160     A_UINT32 param_id;
46161     /** parameter value */
46162     A_UINT32 param_value;
46163     /* The TLVs follows this structure:
46164      * A_UINT32 vdev_ids[]; <--- Array of VDEV ids.
46165      */
46166 } wmi_pdev_multiple_vdev_set_param_cmd_fixed_param;
46167 
46168 typedef struct {
46169     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_param_info */
46170     /** ID of the parameter being set */
46171     A_UINT32 param_id;
46172     /** value of the parameter being set */
46173     A_UINT32 param_value;
46174 } wmi_set_param_info;
46175 
46176 typedef struct {
46177     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_multiple_pdev_vdev_param_cmd_fixed_param */
46178     /** Command is for vdev or pdev: 0 = pdev, 1 = vdev */
46179     A_UINT32 is_vdev;
46180     /** unique dev_id identifying the VDEV/PDEV */
46181     A_UINT32 dev_id;
46182     /*
46183      * Following this structure is the TLV:
46184      *     wmi_set_param_info param_info[];
46185      */
46186 } wmi_set_multiple_pdev_vdev_param_cmd_fixed_param;
46187 
46188 typedef enum {
46189     WMI_MU_SNIF_DISABLE,
46190     WMI_MU_SNIF_USER_INPUT,
46191     WMI_MU_SNIF_WILDCARD,
46192 } WMI_MU_SNIF_MODE;
46193 
46194 typedef struct {
46195     /** TLV tag and len; tag equals
46196       * WMITLV_TAG_STRUC_wmi_vdev_set_mu_snif_cmd_param */
46197     A_UINT32 tlv_header;
46198     /* VDEV identifier */
46199     A_UINT32 vdev_id;
46200     /* MU sniffer mode - refer to WMI_MU_SNIF_MODE enum */
46201     A_UINT32 mode;
46202     /* max num of user to decode */
46203     A_UINT32 max_num_user;
46204 /**
46205  * TLV (tag length value) parameters follow setting MU sniffer command
46206  * structure. The TLV's are:
46207  * A_UINT32 aids[];
46208  */
46209 } wmi_vdev_set_mu_snif_cmd_param;
46210 
46211 typedef struct {
46212     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dbs_or_sbs_cap_ext*/
46213     A_UINT32 tlv_header;
46214     /* hw_mode_id: refer to WMI_HW_MODE_CAPABILITIES */
46215     A_UINT32 hw_mode_id;
46216     /*
46217      * If sbs_lower_band_end_freq is set to non-zero, it indicates
46218      * async SBS mode is supported, and lower-band/higher band to MAC
46219      * mapping is switch-able. unit: MHz. examples 5180, 5320
46220      * If sbs_mid_band_end_freq is set to non-zero, it indicates
46221      * async flexible SBS mode is supported, lower/higher band cutoff frequency
46222      * can be selected from sbs_lower_band_end_freq or sbs_mid_band_end_freq.
46223      * unit: MHz, examples 5900.
46224      */
46225     A_UINT32 sbs_lower_band_end_freq;
46226     A_UINT32 sbs_mid_band_end_freq;
46227 } wmi_dbs_or_sbs_cap_ext;
46228 
46229 typedef struct {
46230     A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_cust_bdf_version_capabilities*/
46231     /* Cust bdf Major version in bdf */
46232     A_UINT32 cust_bdf_ver_major;
46233     /* Cust bdf Minor version in bdf */
46234     A_UINT32 cust_bdf_ver_minor;
46235 } wmi_cust_bdf_version_capabilities;
46236 
46237 enum WMI_CODEL_ENABLE_VALUES {
46238     WMI_CODEL_DISABLED,
46239     WMI_CODEL_ENABLED,
46240     /* WMI_CODEL_DEBUG:
46241      * partly enabled – track interval and check target, but don’t drop
46242      */
46243     WMI_CODEL_DEBUG,
46244 };
46245 
46246 typedef enum {
46247     WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_MIN_THRUPUT    = 0,
46248     WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_MAX_THRUPUT    = 0xffffffff,
46249     WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_BURST_SIZE     = 0,
46250     WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_SVC_INTERVAL   = 0xffffffff,
46251     WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_DELAY_BOUND    = 0xffffffff,
46252     WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_TIME_TO_LIVE   = 0xffffffff,
46253     WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_PRIORITY       = 0,
46254     WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_TID            = 0xffffffff,
46255     WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_MSDU_LOSS_RATE = 0,
46256     WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_DISABLED_SCHED_MODE = 0,
46257     WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_CODEL_ENABLED  = WMI_CODEL_DISABLED,
46258     WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_CODEL_LATENCY_TARGET_MS = 0xffffffff,
46259     WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_CODEL_INTERVAL_MS       = 0xffffffff,
46260 } WMI_SAWF_SVC_CLASS_PARAM_DEFAULTS;
46261 
46262 #define WMI_CODEL_INTERVAL_MAX_MS       0x0000ffff
46263 #define WMI_CODEL_LATENCY_TARGET_MAX_MS 0x00003fff
46264 
46265 typedef struct {
46266     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sawf_svc_class_cfg_cmd_fixed_param */
46267     A_UINT32 svc_class_id; /* which service class is being configured */
46268     /*-----
46269      * The below fields specify the values for the parameters of the
46270      * service class being configured.
46271      * Each such service class parameter has a default value specified in the
46272      * above WMI_SAWF_SVC_CLASS_PARAM_DEFAULTS enum.
46273      * This default value shall be specified for service classes where
46274      * the parameter in question is not applicable.
46275      * For example, for service classes that have no minimum throughput
46276      * requirement, the min_thruput_kbps field should be set to
46277      * WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_MIN_THRUPUT, i.e. 0.
46278      *-----*/
46279     /* min_thruput_kbps:
46280      * How much throughput should be "guaranteed" for each MSDU queue
46281      * belonging to this service class.
46282      * Units are kilobits per second.
46283      */
46284     A_UINT32 min_thruput_kbps;
46285     /* max_thruput_kbps:
46286      * What upper limit on throughput shall be applied to MSDU queues belonging
46287      * to this service class, if other peer-TIDs are not meeting their QoS
46288      * service goals.
46289      * Units are kilobits per second.
46290      */
46291     A_UINT32 max_thruput_kbps;
46292     /* burst_size_bytes:
46293      * How much data (i.e. how many MSDUs) should be pulled from a
46294      * MSDU queue belonging to this service class to be formed into MPDUs
46295      * and enqueued for transmission.
46296      * Similarly, how long should a tx op be for MPDUs containing MSDUs from
46297      * this service class, to ensure that the necessary amount of data gets
46298      * delivered to the peer.
46299      * Units are bytes.
46300      */
46301     A_UINT32 burst_size_bytes;
46302     /* svc_interval_ms:
46303      * How frequently MSDUs belonging to this service class should be
46304      * formed into MPDUs and enqueued for transmission.
46305      * The svc_interval_ms parameter is expected to be <= the delay_bound_ms
46306      * parameter.
46307      * Units are milliseconds.
46308      */
46309     A_UINT32 svc_interval_ms;
46310     /* delay_bound_ms:
46311      * How promptly the MSDUs belonging to this service class need to be
46312      * delivered to the recipient peer.
46313      * Units are milliseconds.
46314      */
46315     A_UINT32 delay_bound_ms;
46316     /* time_to_live_ms:
46317      * How long MSDUs belonging to this service class remain valid.
46318      * If the MSDU has not been successfully transmitted before this
46319      * time-to-live time has elapsed, the MSDU should be discarded.
46320      * The time_to_live_ms parameter is expected to be >= the delay_bound_ms
46321      * parameter.
46322      * Units are milliseconds.
46323      */
46324     A_UINT32 time_to_live_ms;
46325     /* priority:
46326      * What degree of precedence shall the WLAN FW's tx scheduler use
46327      * when considering whether to transmit MPDUs generated from MSDUs
46328      * belonging to this service class.
46329      */
46330     A_UINT32 priority;
46331     /* tid:
46332      * Which WLAN TID shall be used for delivering traffic of this
46333      * service class.
46334      */
46335     A_UINT32 tid;
46336     /* msdu_loss_rate_ppm:
46337      * This parameter indicates the acceptable rate of MSDU loss.
46338      * Units are parts per million.
46339      * E.g. if it is acceptable for 1 MSDU of every 10000 to be lost,
46340      * the msdu_loss_rate_ppm value would be 100,
46341      * since 100 / 1000000 = 1 / 10000.
46342      */
46343     A_UINT32 msdu_loss_rate_ppm;
46344     /*
46345      * The disabled DL and UL scheduler modes bitmap.
46346      *
46347      * Each bit in the "disabled_sched_modes" bitmap indicates whether a
46348      * specific scheduler mode may be selected by the fast loop scheduler. A
46349      * "1" bit indicates that mode is disabled, and a "0" bit indicates the
46350      * mode is enabled.
46351      *
46352      * The WMI_SCHED_MODE_FLAGS enum defines the bit positions for each mode.
46353      */
46354     A_UINT32 disabled_sched_modes;
46355 
46356     A_UINT32 codel_enabled; /* contains a WMI_CODEL_ENABLE_VALUES enum value */
46357     /* codel_latency_target_ms:
46358      * The codel_latency_target_ms field specifies the latency target for
46359      * MSDU queues belonging to this service class.
46360      * The latency of each such MSDU queue will periodically be checked
46361      * (with the periodicity controlled by the code_interval_ms parameter).
46362      * If the MSDU queue's latency is above this target latency, a MSDU will
46363      * be dropped from the head of the queue, to attempt to get the flow's
46364      * producer to scale down its rate of MSDU production.
46365      * This value should be roughly 10% to 30% of the codel_interval_ms value.
46366      * This value must be <= WMI_CODEL_LATENCY_TARGET_MAX_MS (or must equal
46367      * WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_CODEL_LATENCY_TARGET_MS).
46368      */
46369     A_UINT32 codel_latency_target_ms;
46370     /* codel_interval_ms:
46371      * The codel_interval_ms field specifies the baseline interval between
46372      * successive checks that a given MSDU queue's latency is under the
46373      * CoDel target latency.
46374      * If in a given interval a MSDU queue has a latency exceeding the target,
46375      * the duration of the subsequent interval for that MSDU queue will be
46376      * reduced.  The interval will get reset to the baseline interval when
46377      * the MSDU queue's latency is again under the CoDel target latency.
46378      * This value must be <= WMI_CODEL_INTERVAL_MAX_MS (or must equal
46379      * WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_CODEL_INTERVAL_MS).
46380      */
46381     A_UINT32 codel_interval_ms;
46382 } wmi_sawf_svc_class_cfg_cmd_fixed_param;
46383 
46384 typedef struct {
46385     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sawf_svc_class_disable_cmd_fixed_param */
46386     A_UINT32 svc_class_id; /* which service class is being disabled */
46387 } wmi_sawf_svc_class_disable_cmd_fixed_param;
46388 
46389 typedef struct {
46390     A_UINT32 tlv_header;  /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sw_cal_ver_cap */
46391     A_UINT32 bdf_cal_ver; /* SW cal version in BDF */
46392     A_UINT32 ftm_cal_ver; /* SW cal version in factory data */
46393     A_UINT32 status;      /* Return status. 0 for success, non-zero otherwise */
46394 } wmi_sw_cal_ver_cap;
46395 
46396 typedef struct {
46397     /** TLV tag and len; tag equals
46398       * WMITLV_TAG_STRUC_wmi_soc_tqm_reset_enable_disable_cmd_fixed_param
46399       */
46400     A_UINT32 tlv_header;
46401     /** 0 - disable TQM-reset feature, 1 - enable TQM-reset feature */
46402     A_UINT32 enable;
46403 } wmi_soc_tqm_reset_enable_disable_cmd_fixed_param;
46404 
46405 typedef struct {
46406     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_multiple_peer_group_cmd_fixed_param */
46407     A_UINT32 vdev_id;
46408     A_UINT32 pdev_id;
46409     /** Sub command id - populated with a WMI_CMD_ID value.
46410      * Currently supported command ids are WMI_PEER_REMOVE_WDS_ENTRY_CMDID.
46411      */
46412     A_UINT32  sub_cmd_id;
46413     /* The TLVs follows this structure:
46414      * wmi_mac_addr wds_macaddr[]; <--- Array of wds mac addresses.
46415      */
46416 } wmi_vdev_multiple_peer_group_cmd_fixed_param;
46417 
46418 /* WMI_VDEV_PN_MGMT_RX_FILTER_CMDID */
46419 typedef struct {
46420     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_pn_mgmt_rx_filter_cmd_fixed_param */
46421     A_UINT32 vdev_id;
46422     /* RX Filter - MGMT/Action frame type is specified in each bit as per 802.11 spec
46423      * PN check will be done for all MGMT frames irrespective of RX Filter.
46424      * Rx filter is only used to decide whether PN failed frames should be forwarded to host
46425      * Example for forwarding beacon and de-auth pkt alone to host then bit 8(Beacon) and 12(De-auth) must be set */
46426     A_UINT32 pn_rx_filter;
46427 } wmi_vdev_pn_mgmt_rx_filter_cmd_fixed_param; /* Filter for Neighbor Rx Packets */
46428 
46429 typedef struct {
46430     A_UINT32 tlv_header;
46431     /* egid_info:
46432      * Identify which ESL group is active and the duty cycle configured
46433      * for each group.
46434      * This is a 128-bit bitmap to represent 16 ESL sets, with each set
46435      * having 8 members.
46436      * For a given set, the 1-values within the 8-bit bitmap identify
46437      * which groups are active.  The number of active groups within each
46438      * set of 8 indirectly determines the WLAN/BT duty cycle:
46439      *     number of 1-bits    |
46440      *     within 8-bit bitmap | WLAN / BT duty cycle
46441      *     --------------------+----------------
46442      *            0            | 100 ms  WLAN
46443      *            1            | 87.5 ms WLAN, 12.5 ms BT
46444      *            2            | 75 ms   WLAN, 25 ms   BT
46445      *            3            | 62.5 ms WLAN, 37.5 ms BT
46446      *            4            | 50 ms   WLAN, 50 ms   BT
46447      *            5            | 37.5 ms WLAN, 62.5 ms BT
46448      *            6            | 25 ms   WLAN, 75 ms   BT
46449      *            7            | 12.5 ms WLAN, 87.5 ms BT
46450      *            8            |               100 ms  BT
46451      * The lowest bits in the bitmap represent the highest ESL groups,
46452      * E.g. bitmap bit 0 corresponds to ESL group 127, bit 1 corresponds
46453      * to ESL group 126, bit 7 corresponds to ESL group 120, bit 8
46454      * corresponds to ESL group 119, etc.
46455      *
46456      * So for example, if the lowest 8 bits of egid_info are 0x07, this
46457      * indicates that groups 125-127 are active and 120-124 are inactive,
46458      * and that the duty cycle is 62.5 ms WLAN + 37.5 ms BT.
46459      */
46460     A_UINT32 egid_info[4];
46461 } wmi_esl_egid_cmd_fixed_param;
46462 
46463 #define WMI_RTT_PASN_PEER_CREATE_SECURITY_MODE_GET(flag)          WMI_GET_BITS(flag, 0, 2)
46464 #define WMI_RTT_PASN_PEER_CREATE_SECURITY_MODE_SET(flag,val)      WMI_SET_BITS(flag, 0, 2, val)
46465 #define WMI_RTT_PASN_PEER_CREATE_FORCE_SELF_MAC_USE_GET(flag)     WMI_GET_BITS(flag, 2, 1)
46466 #define WMI_RTT_PASN_PEER_CREATE_FORCE_SELF_MAC_USE_SET(flag,val) WMI_SET_BITS(flag, 2, 1, val)
46467 
46468 typedef struct {
46469     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_peer_create_req_event_fixed_param */
46470     /** unique id identifying the VDEV, generated by the caller */
46471     A_UINT32 vdev_id;
46472 /**
46473  * The following TLV will follow this fixed_param TLV:
46474  *
46475  * wmi_rtt_pasn_peer_create_req_param rtt_pasn_peer_param[]
46476  */
46477 } wmi_rtt_pasn_peer_create_req_event_fixed_param;
46478 
46479 typedef struct {
46480     A_UINT32     tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_peer_create_req_param */
46481 
46482     wmi_mac_addr self_mac_addr; /* self MAC address (can be vdev address or random mac address) */
46483     wmi_mac_addr dest_mac_addr; /* MAC address of the peer */
46484 
46485     A_UINT32     control_flag; /* some control information here */
46486     /*********************************************************************************
46487      * Bits 1:0:   Security mode, check wmi_rtt_security_mode for detail.
46488      *             Host driver to request supplicant to derive and install PASN keys if security mode is set.
46489      * Bit 2:      Force_self_mac_addr_use, To indicate supplicant/hostapd to use this self mac addr to (re)generate PASN keys,
46490      *             and flush old cache( if it exists) for dest_mac_addr with old self_mac_addr.
46491      * Bits 31:3:  Reserved
46492      */
46493 } wmi_rtt_pasn_peer_create_req_param;
46494 
46495 
46496 typedef struct {
46497     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_auth_status_cmd_fixed_param */
46498 /**
46499  * The following TLV will follow this fixed_param TLV:
46500  *
46501  * wmi_rtt_pasn_auth_status_param pasn_auth_status_param[]
46502  */
46503 } wmi_rtt_pasn_auth_status_cmd_fixed_param;
46504 
46505 typedef struct {
46506     A_UINT32     tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_auth_status_param */
46507     /* MAC address of the peer */
46508     wmi_mac_addr peer_mac_addr;
46509     /* Return status. 0 for success, non-zero otherwise */
46510     A_UINT32     status;
46511     /* Source address used for doing PASN authentication */
46512     wmi_mac_addr source_mac_addr;
46513 } wmi_rtt_pasn_auth_status_param;
46514 
46515 
46516 #define WMI_RTT_PASN_PEER_DELETE_DELETED_BIT_GET(flag)     WMI_GET_BITS(flag, 0, 1)
46517 #define WMI_RTT_PASN_PEER_DELETE_DELETED_BIT_SET(flag,val) WMI_SET_BITS(flag, 0, 1, val)
46518 #define WMI_RTT_PASN_PEER_DELETE_FLUSH_KEYS_GET(flag)      WMI_GET_BITS(flag, 1, 1)
46519 #define WMI_RTT_PASN_PEER_DELETE_FLUSH_KEYS_SET(flag,val)  WMI_SET_BITS(flag, 1, 1, val)
46520 
46521 typedef struct {
46522     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_peer_delete_event_fixed_param */
46523     /** unique id identifying the VDEV, generated by the caller */
46524     A_UINT32 vdev_id;
46525 /**
46526  * The following TLV will follow this fixed_param TLV:
46527  *
46528  * wmi_rtt_pasn_peer_delete_param rtt_pasn_peer_param[]
46529  */
46530 } wmi_rtt_pasn_peer_delete_event_fixed_param;
46531 
46532 typedef struct {
46533     A_UINT32     tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_peer_delete_param */
46534     /* MAC address of the peer */
46535     wmi_mac_addr peer_mac_addr;
46536     /* some control information here */
46537     A_UINT32     control_flag;
46538 /**********************************************************************************
46539  * Bit 0:    peer_deleted (This is set to 1 if peer has already been deleted by the target)
46540  * Bit 1:    flush keys (This is set to 1 if target wants the cached PASN keys to be flushed)
46541  * Bits 31:2: reserved
46542  */
46543 } wmi_rtt_pasn_peer_delete_param;
46544 
46545 typedef struct {
46546     A_UINT32     tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_deauth_cmd_fixed_param */
46547     /* MAC address of the peer */
46548     wmi_mac_addr peer_mac_addr;
46549 } wmi_rtt_pasn_deauth_cmd_fixed_param;
46550 
46551 typedef struct {
46552     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pmm_scratch_reg_info */
46553     /** what the register is used for - see WFSS_PMM_SCRATCH_REG_PURPOSE enum */
46554     A_UINT32 pmm_scratch_reg_purpose;
46555     /** Address of scratch register */
46556     A_UINT32 pmm_scratch_reg_address;
46557 } wmi_pmm_scratch_reg_info;
46558 
46559 typedef struct {
46560     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pmm_scratch_reg_allocation_cmd_fixed_param */
46561     /** pdev_id for identifying the MAC */
46562     A_UINT32 pdev_id;
46563     /*
46564      * Following this structure is the TLV:
46565      *     wmi_pmm_scratch_reg_info scratch_reg_info[];
46566      */
46567 } wmi_pmm_scratch_reg_allocation_cmd_fixed_param;
46568 
46569 typedef struct {
46570     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pmm_available_scratch_reg_info */
46571     /** Scratch register address */
46572     A_UINT32 pmm_scratch_reg_address;
46573 } wmi_pmm_available_scratch_reg_info;
46574 
46575 typedef struct {
46576     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pmm_available_scratch_reg_event_fixed_param */
46577     /** pdev_id for identifying the MAC */
46578     A_UINT32 pdev_id;
46579     /*
46580      * Following this structure is the TLV:
46581      *     wmi_pmm_available_scratch_reg_info pmm_available_scratch_reg_info[];
46582      */
46583 } wmi_pmm_available_scratch_reg_event_fixed_param;
46584 
46585 typedef struct {
46586     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pmm_scratch_reg_allocation_complete_event_fixed_param */
46587     /** pdev_id for identifying the MAC */
46588     A_UINT32 pdev_id;
46589     /** 1 - success, 0 - failed */
46590     A_UINT32 is_allocated;
46591 } wmi_pmm_scratch_reg_allocation_complete_event_fixed_param;
46592 
46593 typedef enum {
46594     WMI_NO_FLUSH,
46595     WMI_TWT_FLUSH,
46596 
46597     /* Add new flush policies above */
46598     WMI_MAX_FLUSH_POLICY
46599 } wmi_peer_flush_policy;
46600 
46601 typedef struct {
46602     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_flush_policy_cmd_fixed_param */
46603     A_UINT32 vdev_id;
46604     /** peer MAC address */
46605     wmi_mac_addr peer_macaddr;
46606     /** The tids to flush */
46607     A_UINT32 peer_tid_bitmap;
46608     /* wmi_peer_flush_policy */
46609     A_UINT32 flush_policy;
46610     /* n_TWT_SPs_to_expire:
46611      * Expire / drop packets whose age is greater than this specified number
46612      * of TWT service periods.
46613      */
46614     A_UINT32 n_TWT_SPs_to_expire;
46615 } wmi_peer_flush_policy_cmd_fixed_param;
46616 
46617 /* health monitor infra Def */
46618 typedef struct {
46619     /** TLV tag and len */
46620     A_UINT32 tlv_header;
46621     A_UINT32 ring_buf_paddr_low;
46622     A_UINT32 ring_buf_paddr_high;
46623     A_UINT32 initial_upload_period_ms;
46624 } wmi_health_mon_init_done_fixed_param;
46625 
46626 /** ODD **/
46627 
46628 /* Livedump Data structures */
46629 #define WMI_ODD_LIVEDUMP_RESP_SET_STATUS(status, val) \
46630     WMI_SET_BITS(status, 0, 4, val)
46631 #define WMI_ODD_LIVEDUMP_RESP_GET_STATUS(status) \
46632     WMI_GET_BITS(status, 0, 4)
46633 
46634 typedef enum {
46635     ODD_LIVEDUMP_STATUS_SUCCESS = 0,
46636     ODD_LIVEDUMP_STATUS_FAILURE,
46637     ODD_MAX_LIVEDUMP_STATUS,
46638 } odd_livedump_resp_status;
46639 
46640 typedef struct {
46641     A_UINT32 tlv_header;
46642     A_UINT32 odd_livedump_request_id;
46643     /* Following this structure is the TLV:
46644      *    A_UINT32 odd_livedump_id_list[]; <-- array livedump_id list
46645      */
46646 } wmi_livedump_request_cmd_fixed_param;
46647 
46648 typedef struct {
46649     A_UINT32 tlv_header;
46650     /* odd_livedump_request_id:
46651      * this echoes the request id that was sent in the wmi_livedump_cmd_param
46652      */
46653     A_UINT32 odd_livedump_request_id;
46654     /*
46655      * 4 LSB's to indicate status of the odd_livedump_request_id processed
46656      * by the FW, the other 28bits to kept for future enhancements.
46657      * The status will be defined in the enum odd_livedump_resp_status
46658      * 0 - SUCCESS
46659      * 1 - FAILURE
46660      * Refer to the WMI_ODD_LIVEDUMP_RESP_SET,_GET_STATUS macros.
46661      */
46662     A_UINT32 status;
46663 } wmi_livedump_response_event_fixed_param;
46664 
46665 #define WMI_MLO_LINK_REMOVAL_GET_VDEVID(tbtt_info)               WMI_GET_BITS(tbtt_info, 0, 8)
46666 #define WMI_MLO_LINK_REMOVAL_SET_VDEVID(tbtt_info, value)        WMI_SET_BITS(tbtt_info, 0, 8, value)
46667 #define WMI_MLO_LINK_REMOVAL_GET_LINKID(tbtt_info)               WMI_GET_BITS(tbtt_info, 8, 8)
46668 #define WMI_MLO_LINK_REMOVAL_SET_LINKID(tbtt_info, value)        WMI_SET_BITS(tbtt_info, 8, 8, value)
46669 #define WMI_MLO_LINK_REMOVAL_GET_TBTT_COUNT(tbtt_info)           WMI_GET_BITS(tbtt_info, 16, 16)
46670 #define WMI_MLO_LINK_REMOVAL_SET_TBTT_COUNT(tbtt_info, value)    WMI_SET_BITS(tbtt_info, 16, 16, value)
46671 
46672 typedef struct {
46673     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_removal_tbtt_count; */
46674     A_UINT32 tlv_header;
46675     union {
46676         struct {
46677             A_UINT32 vdev_id:8,
46678                      link_id:8,
46679                      tbtt_count:16;
46680         };
46681         A_UINT32 tbtt_info;
46682     };
46683 } wmi_mlo_link_removal_tbtt_count;
46684 
46685 typedef struct {
46686     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_removal_tbtt_update; */
46687     A_UINT32 tlv_header;
46688 
46689     A_UINT32 tbtt_count;
46690 
46691     A_UINT32 qtimer_ts_low; /* lower-32 bits */
46692     A_UINT32 qtimer_ts_high; /* higher-32 bits */
46693 
46694     A_UINT32 tsf_low; /* lower-32 bits */
46695     A_UINT32 tsf_high; /* higher-32 bits */
46696 } wmi_mlo_link_removal_tbtt_update;
46697 
46698 typedef struct {
46699    /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_removal_evt_fixed_param; */
46700     A_UINT32 tlv_header;
46701     A_UINT32 vdev_id;
46702 
46703     /*
46704      * Followed by TLVs:
46705      *     wmi_mlo_link_removal_tbtt_update
46706      */
46707 } wmi_mlo_link_removal_evt_fixed_param;
46708 
46709 typedef struct {
46710     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_removal_cmd_fixed_param */
46711     A_UINT32 tlv_header;
46712     A_UINT32 vdev_id;
46713     A_UINT32 reconfig_ml_ie_num_bytes_valid;
46714 
46715    /* This TLV is followed by array of bytes:
46716     *   A_UINT8 reconfig_ml_ie[]; <-- Entire reconfiguration element (multi-link control + common-info + 1 per-sta profile)
46717     */
46718 } wmi_mlo_link_removal_cmd_fixed_param;
46719 
46720 typedef struct {
46721     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_per_peer_sched_mode_disable */
46722 
46723     /* Peer MAC Address */
46724     wmi_mac_addr peer_macaddr;
46725 
46726     /*
46727      * The disabled DL and UL scheduler modes bitmap.
46728      *
46729      * This command is not supported in STA mode.
46730      *
46731      * A value of 1 in a given bit position disables the corresponding mode,
46732      * and a value of 0 enables the mode. The WMI_SCHED_MODE_FLAGS enum defines
46733      * the bit positions for each mode.
46734      *
46735      * A single 32 bit value is used to store the following configuration
46736      * bitmap.
46737      *
46738      * bit   | sched mode
46739      * ---------------
46740      *   0   | DL MU-MIMO
46741      *   1   | UL MU-MIMO
46742      *   2   | DL OFDMA
46743      *   3   | UL OFDMA
46744      * 4..31 | RESERVED
46745      */
46746     A_UINT32 disabled_sched_modes;
46747 } wmi_per_peer_sched_mode_disable;
46748 
46749 typedef struct {
46750     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sched_mode_disable_fixed_param */
46751     A_UINT32 pdev_id;
46752     /* The TLVs for each peer follows:
46753      *     wmi_per_peer_sched_mode_disable per_peer_sched_mode_disable[];
46754      */
46755 } wmi_peer_sched_mode_disable_fixed_param;
46756 
46757 typedef enum {
46758     /*
46759      * No timestamp source is used, and the start_timestamp field  should be
46760      * ignored. FW will start the probing of the requested mode ASAP after
46761      * receiving this message.
46762      */
46763     WMI_SCHED_MODE_PROBE_TSTAMP_SRC_NONE = 0,
46764 } WMI_SCHED_MODE_PROBE_TSTAMP_SRC;
46765 
46766 typedef struct {
46767     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_sched_mode_probe_req_fixed_param */
46768 
46769     A_UINT32 vdev_id;
46770 
46771     /*
46772      * The scheduler mode to probe. Only a single mode may currently be
46773      * specified in this WMI command (separate commands must be sent to probe
46774      * multiple modes). This limitation may be removed in a future version of
46775      * FW.
46776      *
46777      * This command is not supported in STA mode.
46778      *
46779      * The WMI_SCHED_MODE_FLAGS enum defines the scheduler mode values.
46780      */
46781     A_UINT32 sched_mode_to_probe;
46782 
46783     /*
46784      * 32-bit cookie that will be sent back in the probing completion / stats
46785      * WMI message. FW does not interpret any bits in this field, and simply
46786      * replays it back to the host.
46787      */
46788     A_UINT32 cookie;
46789 
46790     /*
46791      * The clock reference to use for the start_timestamp field. The enum
46792      * WMI_SCHED_MODE_PROBE_TSTAMP_SRC defines the valid timestamp sources.
46793      */
46794     A_UINT32 timestamp_source;
46795 
46796     /*
46797      * The start timestamp indicating when the FW scheduler should start the
46798      * probing period. Note that although the FW tries to honor this start
46799      * time, it may not always be possible to. For instance, if the command
46800      * arrives after the indicated start timestamp, or if channel congestion
46801      * delays the APs ability to transmit over the air.
46802      *
46803      * If the timestamp_source field is set to
46804      * WMI_SCHED_MODE_PROBE_TSTAMP_SRC_NONE, then the value of this field is
46805      * ignored by FW.
46806      */
46807     A_UINT32 start_timestamp_lo;
46808     A_UINT32 start_timestamp_hi;
46809 
46810     /*
46811      * The on and off duration of the probing mode.
46812      *
46813      * The scheduler will turn the mode on first for the specified
46814      * "on_duration_ms", and then turn it off for the specified
46815      * "off_duration_ms".
46816      *
46817      * During the on and off duration, FW will collect delivered bytes
46818      * statistics to estimate the vdev level throughput achieved for both the
46819      * on and off region. These statistics will be delivered in the
46820      * wmi_vdev_sched_mode_probe_resp WMI message after both the "on" and "off"
46821      * durations have elapsed.
46822      */
46823     A_UINT32 on_duration_ms;
46824     A_UINT32 off_duration_ms;
46825 } wmi_vdev_sched_mode_probe_req_fixed_param;
46826 
46827 typedef struct {
46828     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_sched_mode_probe_resp_fixed_param */
46829 
46830     A_UINT32 vdev_id;
46831 
46832     /*
46833      * The 32-bit cookie copied from the wmi_vdev_sched_mode_probe_req
46834      * message.
46835      */
46836     A_UINT32 cookie;
46837 
46838     /*
46839      * The observed throughput at the vdev level during the mode-enabled
46840      * portion of the mode probe.
46841      */
46842     A_UINT32 tput_mbps_on;
46843 
46844     /*
46845      * The observed throughput at the vdev level during the mode-disabled
46846      * portion of the mode probe.
46847      */
46848     A_UINT32 tput_mbps_off;
46849 } wmi_vdev_sched_mode_probe_resp_fixed_param;
46850 
46851 /** Coordinated-AP TDMA **/
46852 
46853 #define WMI_TDMA_MAX_ACTIVE_SCHEDULES  10
46854 
46855 typedef struct {
46856     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdma_schedule_request_cmd_fixed_param **/
46857     /** pdev_id
46858      * PDEV ID for identifying the MAC for which this schedule
46859      * is being requested.
46860      */
46861     A_UINT32 pdev_id;
46862     /** schedule_type
46863      * 0 = Reserved
46864      * 1 = Restricted
46865      * UINT32_MAX = Cancel all TDMA schedules and ignore other parameters below.
46866      */
46867     A_UINT32 schedule_type;
46868     /** schedule_handle_id
46869      * Unique ID to identify this TDMA schedule
46870      */
46871     A_UINT32 schedule_handle_id;
46872     /** owner_bssid
46873      * The BSSID this TDMA schedule is reserved for
46874      */
46875     wmi_mac_addr owner_bssid;
46876     /** start_time_tsf_low
46877      * Lower 32-bits of Synchronized Start time for the first busy slot
46878      * in this TDMA schedule.
46879      * It should be a PMM global FW TSF reference
46880      */
46881     A_UINT32 start_time_tsf_low;
46882     /** start_time_tsf_high
46883      * Higher 32-bits of Synchronized Start time for the first busy slot
46884      * in this TDMA schedule.
46885      * It should be a PMM global FW TSF reference
46886      */
46887     A_UINT32 start_time_tsf_high;
46888     /** num_busy_slots
46889      * Number of busy periods in this schedule
46890      */
46891     A_UINT32 num_busy_slots;
46892     /** busy_slot_dur_ms
46893      * The fixed duration of each busy slot in milliseconds
46894      */
46895     A_UINT32 busy_slot_dur_ms;
46896     /** busy_slot_intvl_ms
46897      * The fixed interval between the start of two consecutive busy slots
46898      * in milliseconds.
46899      */
46900     A_UINT32 busy_slot_intvl_ms;
46901     /** edca_params_valid
46902      * Indicates whether the following EDCA fields aifsn, ecwmin, ecwmax
46903      * are valid or not
46904      * 1 = Valid. 0 = Not Valid.
46905      */
46906     A_UINT32 edca_params_valid;
46907     /** aifsn
46908      * Arbitration inter frame spacing number for this schedule type.
46909      * Range: 2-15.
46910      * For voice, video, best-effort, background ACs
46911      */
46912     A_UINT32 aifsn[WMI_AC_MAX];
46913     /** ecwmin
46914      * Exponent form of Contention Window minimum value for this schedule type.
46915      * Range: 2 - 1024.
46916      * For voice, video, best-effort, background ACs
46917      */
46918     A_UINT32 ecwmin[WMI_AC_MAX];
46919     /** ecwmax
46920      * Exponent form of Contention Window maximum value for this schedule type.
46921      * Range: 2 - 1024.
46922      * For voice, video, best-effort, background ACs
46923      */
46924     A_UINT32 ecwmax[WMI_AC_MAX];
46925 } wmi_tdma_schedule_request_cmd_fixed_param;
46926 
46927 typedef struct {
46928     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_tgtr2p_table _fixed_param */
46929     A_UINT32 pdev_id;
46930     /* freq_band:
46931      * Indicates the intended FreqBand for updating targetPowerR2PTable.
46932      *     0: 5G
46933      *     1: 2G
46934      *     2: 6G
46935      */
46936     A_UINT32 freq_band;
46937     /* sub_band:
46938      * Denotes band defined in targetPowerR2PFreqRangexG BDF fields.
46939      * Valid values for each target is listed below
46940      * For 11AX targets,
46941      * 2G - 0
46942      * 5G/6G - 0/1/2
46943      *
46944      * For 11BE targets,
46945      * 2G - 0
46946      * 5G/6G - 0/1
46947      */
46948     A_UINT32 sub_band;
46949     /* is_ext:
46950      * Applicable only for 11BE targets
46951      * 0 - Default targetPowerR2PTable
46952      * 1 - To update targetPowerR2PTable in extension fields
46953      * For 11AX targets, value is expected to be 0.
46954      */
46955     A_UINT32 is_ext;
46956     A_UINT32 target_type; /* 0 - IPQ95xx, 1 - QCN90xx, 0x10 - QCN92xx */
46957     A_UINT32 r2p_array_len; /* length of targetPowerR2PTable */
46958     /* end_of_r2ptable_update:
46959      * This field can be used to indicate FW to trigger update of SW structures
46960      * once user has updated for all the sub-bands of the Frequency band.
46961      * This would be used when there are multiple sub-bands.
46962      */
46963     A_UINT32 end_of_r2ptable_update;
46964 /*
46965  * Following this structure is the TLV containing targetPowerR2PTablexG
46966  * of type INT8 and with a unit of 0.25dBm.
46967  */
46968 } wmi_pdev_set_tgtr2p_table_cmd_fixed_param;
46969 
46970 typedef enum {
46971     WMI_PDEV_TGTR2P_SUCCESS = 0,
46972     WMI_PDEV_TGTR2P_SUCCESS_WAITING_FOR_END_OF_UPDATE,
46973     WMI_PDEV_TGTR2P_ERROR_INVALID_FREQ_BAND,
46974     WMI_PDEV_TGTR2P_ERROR_INVALID_SUB_BAND,
46975     WMI_PDEV_TGTR2P_ERROR_EXTENSION_FIELDS_NOT_ENABLED_IN_BDF,
46976     WMI_PDEV_TGTR2P_ERROR_INVALID_TARGET_TPYE,
46977     WMI_PDEV_TGTR2P_ERROR_R2P_ARRAY_LEN_MISMATCH,
46978 } wmi_pdev_set_tgtr2p_event_status_type;
46979 
46980 typedef struct {
46981     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_tgtr2p_table_event_fixed_param */
46982 
46983     /* status:
46984      * enum wmi_pdev_set_tgtr2p_event_status_type to indicate the status
46985      * code/result
46986      */
46987     A_UINT32 status;
46988     A_UINT32 pdev_id; /* to identify for which pdev the response is received */
46989 } wmi_pdev_set_tgtr2p_table_event_fixed_param;
46990 
46991 
46992 #define WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_CHAIN_NUM         4
46993 
46994 #define WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_2G_RATE_NUM       18
46995 
46996 #define WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_5G_6G_RATE_NUM    24
46997 
46998 typedef struct {
46999     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_custom_tx_power_per_mcs_cmd_fixed_param */
47000     A_UINT32 pdev_id;
47001 
47002     /* Every band's bitmap is per chain per mcs, the bit set indicate the txpower value existed
47003      * in txpower_array, otherwise, it means no setting from up-layer and need treat the setting
47004      * txpower as zero
47005      */
47006 
47007     /* currently 2GHz band has 2 chains (though space is allocated for up
47008      * to 4 chains) and each chain has 18 rates.
47009      * bitmap_of_2GHz_band[0] -> chain 0 bitmap:
47010      * |bit  0|bit  1|......|bit  17|
47011      * |rate 0|rate 1|......|rate 17|
47012      *
47013      * bitmap_of_2GHz_band[1] -> chain 1 bitmap:
47014      * |bit  0|bit  1|......|bit  17|
47015      * |rate 0|rate 1|......|rate 17|
47016      *
47017      * bitmap_of_2GHz_band[2] -> reserved
47018      * bitmap_of_2GHz_band[3] -> reserved
47019      */
47020     A_UINT32 bitmap_of_2GHz_band[WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_CHAIN_NUM];
47021 
47022     /* 5GHz band has 4 chains and each chain has 24 rates.
47023      * bitmap_of_5GHz_band[0] -> chain 0 bitmap:
47024      * |bit  0|bit  1|......|bit  23|
47025      * |rate 0|rate 1|......|rate 23|
47026      *
47027      * bitmap_of_5GHz_band[1] -> chain 1 bitmap:
47028      * |bit  0|bit  1|......|bit  23|
47029      * |rate 0|rate 1|......|rate 23|
47030      *
47031      * bitmap_of_5GHz_band[2] -> chain 2 bitmap:
47032      * |bit  0|bit  1|......|bit  23|
47033      * |rate 0|rate 1|......|rate 23|
47034      *
47035      * bitmap_of_5GHz_band[3] -> chain 3 bitmap:
47036      * |bit  0|bit  1|......|bit  23|
47037      * |rate 0|rate 1|......|rate 23|
47038      */
47039     A_UINT32 bitmap_of_5GHz_band[WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_CHAIN_NUM];
47040 
47041     /* 6GHz band has 4 chains and each chain has 24 rates.
47042      * bitmap_of_6GHz_band[0] -> chain 0 bitmap:
47043      * |bit  0|bit  1|......|bit  23|
47044      * |rate 0|rate 1|......|rate 23|
47045      *
47046      * bitmap_of_6GHz_band[1] -> chain 1 bitmap:
47047      * |bit  0|bit  1|......|bit  23|
47048      * |rate 0|rate 1|......|rate 23|
47049      *
47050      * bitmap_of_6GHz_band[2] -> chain 2 bitmap:
47051      * |bit  0|bit  1|......|bit  23|
47052      * |rate 0|rate 1|......|rate 23|
47053      *
47054      * bitmap_of_6GHz_band[3] -> chain 3 bitmap:
47055      * |bit  0|bit  1|......|bit  23|
47056      * |rate 0|rate 1|......|rate 23|
47057      */
47058     A_UINT32 bitmap_of_6GHz_band[WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_CHAIN_NUM];
47059 
47060     A_UINT32 txpower_array_len;
47061 
47062 /* This TLV is followed by array of bytes:
47063  * A_UINT8 txpower_bkoff_array[]:
47064  *     The txpower backoff value for each bit set within the per-band bitmaps
47065  *     above, in dB units.
47066  *     The elements from the 2GHz band occur first, then the elements from the
47067  *     5GHz band, then the elements from the 6GHz band.
47068  *     Within each band, the elements from the lower chain numbers (i.e. the
47069  *     lower words within the bitmap array) occur first.
47070  *     Within each chain of each band, the element from the lower rate indices
47071  *     (i.e. the least significant bits within the bitmap word) occur first.
47072  */
47073 } wmi_pdev_set_custom_tx_power_per_mcs_cmd_fixed_param;
47074 
47075 
47076 typedef struct {
47077     A_UINT32 tlv_header;      /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_vdev_get_link_info_cmd_fixed_param */
47078     A_UINT32 vdev_id;
47079     wmi_mac_addr mld_macaddr; /* MLD MAC address */
47080 } wmi_mlo_vdev_get_link_info_cmd_fixed_param;
47081 
47082 typedef enum {
47083     WMI_LINK_INFO_EVENT_SUCCESS = 0,
47084 
47085     /* reject due to common failure reason */
47086     WMI_LINK_INFO_EVENT_REJECT_FAILURE,
47087 
47088     /* reject as vdev is not up */
47089     WMI_LINK_INFO_EVENT_REJECT_VDEV_NOT_UP,
47090 
47091     /* reject as roaming is in progress */
47092     WMI_LINK_INFO_EVENT_REJECT_ROAMING_IN_PROGRESS,
47093 
47094     /* reject as it's not MLO connection */
47095     WMI_LINK_INFO_EVENT_REJECT_NON_MLO_CONNECTION,
47096 } wmi_mlo_vdev_link_info_event_status_type;
47097 
47098 typedef struct {
47099     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_vdev_link_info_event_fixed_param */
47100 
47101     /* status:
47102      * enum wmi_mlo_vdev_link_info_event_status_type to indicate the status
47103      */
47104     A_UINT32 status;
47105 
47106     /* vdev_id:
47107      * unique id identifying the VDEV, generated by the caller
47108      */
47109     A_UINT32 vdev_id;
47110 
47111     wmi_mac_addr mld_macaddr; /* MLD MAC address */
47112 
47113     /* hw_mode_index:
47114      * current hardware mode index, see soc_hw_mode_t for values
47115      */
47116     A_UINT32 hw_mode_index;
47117 } wmi_mlo_vdev_link_info_event_fixed_param;
47118 
47119 #define WMI_MLO_VDEV_LINK_INFO_GET_VDEVID(link_info)             WMI_GET_BITS(link_info, 0, 8)
47120 #define WMI_MLO_VDEV_LINK_INFO_SET_VDEVID(link_info, value)      WMI_SET_BITS(link_info, 0, 8, value)
47121 #define WMI_MLO_VDEV_LINK_INFO_GET_LINKID(link_info)             WMI_GET_BITS(link_info, 8, 8)
47122 #define WMI_MLO_VDEV_LINK_INFO_SET_LINKID(link_info, value)      WMI_SET_BITS(link_info, 8, 8, value)
47123 #define WMI_MLO_VDEV_LINK_INFO_GET_LINK_STATUS(link_info)        WMI_GET_BITS(link_info, 16, 2)
47124 #define WMI_MLO_VDEV_LINK_INFO_SET_LINK_STATUS(link_info, value) WMI_SET_BITS(link_info, 16, 2, value)
47125 
47126 typedef struct {
47127     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_vdev_link_info */
47128     union {
47129         struct {
47130             A_UINT32 vdev_id:8,     /* vdev id for this link */
47131                      link_id:8,     /* link id defined as in 802.11 BE spec. */
47132                      link_status:2, /* link_status - 0: inactive, 1: active  */
47133                      reserved:14;
47134         };
47135         A_UINT32 link_info;
47136     };
47137     A_UINT32 chan_freq;             /* Channel frequency in MHz */
47138 } wmi_mlo_vdev_link_info;
47139 
47140 /* Manual UL OFDMA trigger frame data structures */
47141 
47142 typedef enum {
47143     WMI_UL_OFDMA_MANUAL_TRIG_TXERR_NONE,
47144     WMI_UL_OFDMA_MANUAL_TRIG_TXERR_RESP,    /* response timeout, mismatch,
47145                                              * BW mismatch, mimo ctrl mismatch,
47146                                              * CRC error.. */
47147     WMI_UL_OFDMA_MANUAL_TRIG_TXERR_FILT,    /* blocked by tx filtering */
47148     WMI_UL_OFDMA_MANUAL_TRIG_TXERR_FIFO,    /* fifo, misc errors in HW */
47149     WMI_UL_OFDMA_MANUAL_TRIG_TXERR_SWABORT, /* software initiated abort
47150                                              * (TX_ABORT) */
47151 
47152     WMI_UL_OFDMA_MANUAL_TRIG_TXERR_MAX     = 0xff,
47153     WMI_UL_OFDMA_MANUAL_TRIG_TXERR_INVALID =
47154         WMI_UL_OFDMA_MANUAL_TRIG_TXERR_MAX
47155 } wmi_ul_ofdma_manual_trig_txerr_t;
47156 
47157 typedef struct {
47158     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_manual_ul_ofdma_trig_feedback_evt_fixed_param  */
47159     A_UINT32 tlv_header;
47160 
47161     /* VDEV identifier */
47162     A_UINT32 vdev_id;
47163 
47164     /* To indicate whether feedback event is for SU (0) or MU trigger (1) */
47165     A_UINT32 feedback_trig_type;
47166 
47167     /* Feedback Params */
47168     A_UINT32 curr_su_manual_trig_count;
47169     A_UINT32 remaining_su_manual_trig;
47170     A_UINT32 remaining_mu_trig_peers;
47171     A_UINT32 manual_trig_status;  /* holds a wmi_ul_ofdma_manual_trig_txerr_t */
47172 
47173     /**
47174      * This TLV is followed by TLVs below:
47175      *    wmi_mac_addr peer_macaddr[];
47176      *        Array length corresponds to the number of triggered peers
47177      */
47178 } wmi_manual_ul_ofdma_trig_feedback_evt_fixed_param;
47179 
47180 typedef struct {
47181     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_manual_mu_trig_cmd_fixed_param  */
47182     A_UINT32 tlv_header;
47183 
47184     /* VDEV identifier */
47185     A_UINT32 vdev_id;
47186 
47187     /* Configurable Parameters for manual UL OFDMA Multi-User Trigger frame */
47188     A_UINT32 manual_trig_preferred_ac;
47189     /**
47190      * This TLV is followed by TLVs below:
47191      *    wmi_mac_addr peer_macaddr[];
47192      *        The array has one element for each peer to be included in the
47193      *        manually-triggered UL MU transmission.
47194      */
47195 } wmi_vdev_set_manual_mu_trig_cmd_fixed_param;
47196 
47197 typedef struct {
47198    /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_manual_su_trig_cmd_fixed_param  */
47199     A_UINT32 tlv_header;
47200 
47201     /* VDEV identifier */
47202     A_UINT32 vdev_id;
47203 
47204     /* Configurable Parameters for manual UL OFDMA Single-User Trigger frame */
47205     wmi_mac_addr peer_macaddr;
47206     A_UINT32 manual_trig_preferred_ac;
47207     A_UINT32 num_su_manual_trig;
47208     A_UINT32 manual_trig_length;
47209     A_UINT32 manual_trig_mcs;
47210     A_UINT32 manual_trig_nss;
47211     A_INT32  manual_trig_target_rssi; /* units = dBm */
47212 } wmi_vdev_set_manual_su_trig_cmd_fixed_param;
47213 
47214 
47215 #define CQI_UPLOAD_META_DATA_NC_IDX(idx) \
47216     (MAX_NUM_CQI_USERS_IN_STANDALONE_SND + (idx * 2))
47217 
47218 #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_ASNR_LENGTH(asnr_params, value) \
47219         WMI_SET_BITS(asnr_params, 0, 16, value)
47220 #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_ASNR_LENGTH(asnr_params) \
47221         WMI_GET_BITS(asnr_params, 0, 16)
47222 
47223 #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_ASNR_OFFSET(asnr_params, value) \
47224         WMI_SET_BITS(asnr_params, 16, 16, value)
47225 #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_ASNR_OFFSET(asnr_params) \
47226         WMI_GET_BITS(asnr_params, 16, 16)
47227 
47228 #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_DSNR_LENGTH(dsnr_params, value) \
47229         WMI_SET_BITS(dsnr_params, 0, 16, value)
47230 #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_DSNR_LENGTH(dsnr_params) \
47231         WMI_GET_BITS(dsnr_params, 0, 16)
47232 
47233 #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_DSNR_OFFSET(dsnr_params, value) \
47234         WMI_SET_BITS(dsnr_params, 16, 16, value)
47235 #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_DSNR_OFFSET(dsnr_params) \
47236         WMI_GET_BITS(dsnr_params, 16, 16)
47237 
47238 #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_FB_PARAMS_NC(fb_params, value) \
47239         WMI_SET_BITS(fb_params, 0, 2, value)
47240 #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_FB_PARAMS_NC(fb_params) \
47241         WMI_GET_BITS(fb_params, 0, 2)
47242 
47243 #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_FB_PARAMS_NSS_NUM(fb_params, value) \
47244         WMI_SET_BITS(fb_params, 2, 2, value)
47245 #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_FB_PARAMS_NSS_NUM(fb_params) \
47246         WMI_GET_BITS(fb_params, 2, 2)
47247 
47248 #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_DDR_BUF_IDX(ddr_buffer_idx, value) \
47249         WMI_SET_BITS(ddr_buffer_idx, 4, 2, value)
47250 #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_DDR_BUF_IDX(ddr_buffer_idx) \
47251         WMI_GET_BITS(ddr_buffer_idx, 4, 2)
47252 
47253 
47254 #define WMI_SET_STANDALONE_SOUND_PARAMS_FB_TYPE(snd_params, value) \
47255         WMI_SET_BITS(snd_params, 0, 2, value)
47256 #define WMI_GET_STANDALONE_SOUND_PARAMS_FB_TYPE(snd_params) \
47257         WMI_GET_BITS(snd_params, 0, 2)
47258 
47259 #define WMI_SET_STANDALONE_SOUND_PARAMS_NG(snd_params, value) \
47260         WMI_SET_BITS(snd_params, 2, 2, value)
47261 #define WMI_GET_STANDALONE_SOUND_PARAMS_NG(snd_params) \
47262         WMI_GET_BITS(snd_params, 2, 2)
47263 
47264 #define WMI_SET_STANDALONE_SOUND_PARAMS_CB(snd_params, value) \
47265         WMI_SET_BITS(snd_params, 4, 1, value)
47266 #define WMI_GET_STANDALONE_SOUND_PARAMS_CB(snd_params) \
47267         WMI_GET_BITS(snd_params, 4, 1)
47268 
47269 #define WMI_SET_STANDALONE_SOUND_PARAMS_BW(snd_params, value) \
47270         WMI_SET_BITS(snd_params, 5, 3, value)
47271 #define WMI_GET_STANDALONE_SOUND_PARAMS_BW(snd_params) \
47272         WMI_GET_BITS(snd_params, 5, 3)
47273 
47274 #define WMI_SET_STANDALONE_SOUND_PARAMS_CQI_TYPE(snd_params, value) \
47275         WMI_SET_BITS(snd_params, 8, 1, value)
47276 #define WMI_GET_STANDALONE_SOUND_PARAMS_CQI_TYPE(snd_params) \
47277         WMI_GET_BITS(snd_params, 8, 1)
47278 
47279 #define WMI_DMA_BUF_RELEASE_CQI_UPLOAD_SET_FB_PARAMS_IS_VALID(fb_params_cqi, value, idx) \
47280         WMI_SET_BITS(fb_params_cqi, idx, 1, value)
47281 #define WMI_DMA_BUF_RELEASE_CQI_UPLOAD_GET_FB_PARAMS_IS_VALID(fb_params_cqi, idx) \
47282         WMI_GET_BITS(fb_params_cqi, idx, 1)
47283 
47284 #define WMI_DMA_BUF_RELEASE_CQI_UPLOAD_SET_FB_PARAMS_NC(fb_params_cqi, value, idx) \
47285         WMI_SET_BITS(fb_params_cqi, CQI_UPLOAD_META_DATA_NC_IDX(idx), 2, value)
47286 #define WMI_DMA_BUF_RELEASE_CQI_UPLOAD_GET_FB_PARAMS_NC(fb_params_cqi, idx) \
47287         WMI_GET_BITS(fb_params_cqi, CQI_UPLOAD_META_DATA_NC_IDX(idx), 2)
47288 
47289 
47290 typedef enum _WMI_STANDALONE_SOUND_STATUS_T {
47291     WMI_STANDALONE_SOUND_STATUS_OK,
47292     WMI_STANDALONE_SOUND_STATUS_ERR_NUM_PEERS_EXCEEDED,
47293     WMI_STANDALONE_SOUND_STATUS_ERR_NG_INVALID,
47294     WMI_STANDALONE_SOUND_STATUS_ERR_NUM_REPEAT_EXCEEDED,
47295     WMI_STANDALONE_SOUND_STATUS_ERR_PEER_DOESNOT_SUPPORT_BW,
47296     WMI_STANDALONE_SOUND_STATUS_ERR_INVALID_PEER,
47297     WMI_STANDALONE_SOUND_STATUS_ERR_INVALID_VDEV,
47298     WMI_STANDALONE_SOUND_STATUS_ERR_PEER_DOES_NOT_SUPPORT_MU_FB,
47299     WMI_STANDALONE_SOUND_STATUS_ERR_DMA_NOT_CONFIGURED,
47300     WMI_STANDALONE_SOUND_STATUS_ERR_COMPLETE_FAILURE,
47301 } WMI_STANDALONE_SOUND_STATUS_T;
47302 
47303 typedef struct {
47304     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_cv_upload_meta_data */
47305     /** Set if the CV is valid */
47306     A_UINT32 is_valid;
47307      /** Feedback type */
47308     A_UINT32 fb_type;
47309     /**
47310     * [15:0] ASNR length
47311     * [31:16] ASNR offset
47312     */
47313     A_UINT32 asnr_params;
47314     /**
47315     * [15:0] DSNR length
47316     * [31:16] DSNR offset
47317     */
47318     A_UINT32 dsnr_params;
47319     /** Peer mac address */
47320     wmi_mac_addr peer_mac_address;
47321     /** fb_params:
47322     * [1:0] Nc
47323     *       Refer to WMI_DMA_BUF_RELEASE_CV_UPLOAD_[SET,GET]_FB_PARAMS_NC
47324     * [3:2] nss_num
47325     *       Refer to WMI_DMA_BUF_RELEASE_CV_UPLOAD_[SET,GET]_FB_PARAMS_NSS_NUM
47326     * [5:4] ddr_buffer_idx
47327     *       Refer to WMI_DMA_BUF_RELEASE_CV_UPLOAD_[SET,GET]_DDR_BUF_IDX
47328     */
47329     A_UINT32 fb_params;
47330 } wmi_dma_buf_release_cv_upload_meta_data;
47331 
47332 typedef struct {
47333     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_radar_meta_data */
47334     /* timestamp at the time of the capture */
47335     A_UINT32 timestamp_us;
47336     /* phy mode WLAN_PHY_MODE of the channel defined in wlan_defs.h */
47337     A_UINT32 phy_mode;
47338     /* frequency (in MHz) of the primary 20 MHz channel */
47339     A_UINT32 chan_mhz;
47340     /* Center frequency 1 in MHz */
47341     A_UINT32 band_center_freq1;
47342     /* Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode */
47343     A_UINT32 band_center_freq2;
47344     /* tx chain mask */
47345     A_UINT32 tx_chain_mask;
47346     /* rx chain mask */
47347     A_UINT32 rx_chain_mask;
47348     /* number of LTFs sent for capture */
47349     A_UINT32 num_ltf_tx;
47350     /* number of LTFs skipped in rx */
47351     A_UINT32 num_skip_ltf_rx;
47352     /* number of LTFs used for accumulation */
47353     A_UINT32 num_ltf_accumulation;
47354 } wmi_dma_buf_release_wifi_radar_meta_data;
47355 
47356 typedef struct {
47357     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_cqi_upload_meta_data */
47358     A_UINT32 tlv_header;
47359 
47360     /**
47361      * [15:0] ASNR length
47362      * [31:16] ASNR offset
47363      */
47364     A_UINT32 asnr_params;
47365 
47366     /** Peer mac address */
47367     wmi_mac_addr peer_mac_address[MAX_NUM_CQI_USERS_IN_STANDALONE_SND];
47368 
47369     /**
47370      * [0] is_user0_valid
47371      * [1] is_user1_valid
47372      * [2] is_user2_valid
47373      * [4:3] User0_Nc
47374      * [6:5] User1_Nc
47375      * [8:7] User2_Nc
47376      */
47377     A_UINT32 fb_params_cqi         : 9,
47378              reserved              : 23;
47379 } wmi_dma_buf_release_cqi_upload_meta_data;
47380 
47381 typedef struct {
47382     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_standalone_sounding_cmd_fixed_param */
47383     /** vdev identifier */
47384     A_UINT32 vdev_id;
47385     /** sounding_params:
47386      * [1:0] Feedback type
47387      * [3:2] Ng
47388      * [4] Codebook
47389      * [7:5] BW
47390      *     0 = 20 MHz
47391      *     1 = 40 MHz
47392      *     2 = 80 MHz
47393      *     3 = 160 MHz
47394      *     4 = 320 MHz
47395      * [8] Triggered/Non-Triggered CQI
47396      * [31:9] Reserved
47397      */
47398     A_UINT32 sounding_params;
47399     /** The number of sounding repeats */
47400     A_UINT32 num_sounding_repeats;
47401     /**
47402      * TLV (tag length value) parameters follow the
47403      * structure. The TLV's are:
47404      * wmi_mac_addr peer_list[num_peers];
47405      */
47406 } wmi_standalone_sounding_cmd_fixed_param;
47407 
47408 typedef struct {
47409     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_standalone_sounding_evt_fixed_param */
47410     /** vdev identifier */
47411     A_UINT32 vdev_id;
47412     /** status:
47413      * standalone sounding command status -
47414      * refer to WMI_STANDALONE_SOUND_STATUS_T
47415      */
47416     A_UINT32 status;
47417     /** number of CV buffers uploaded */
47418     A_UINT32 buffer_uploaded;
47419     /** TLV (tag length value) parameters follow the
47420     * structure. The TLV's are:
47421     * A_UINT32 snd_failed[num_sounding_repeats];
47422     *     snd_failed[] array's elements hold the number of failures
47423     *     for each sounding.
47424     */
47425 } wmi_standalone_sounding_evt_fixed_param;
47426 
47427 typedef struct {
47428     /*
47429      * TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rf_path_cmd_fixed_param
47430      */
47431     A_UINT32 tlv_header;
47432     /* pdev_id for identifying the MAC */
47433     A_UINT32 pdev_id;
47434     /*
47435      * rf_path :
47436      * 0 - primary RF path
47437      * 1 - secondary RF path
47438      */
47439     A_UINT32 rf_path;
47440 } wmi_pdev_set_rf_path_cmd_fixed_param;
47441 
47442 typedef struct {
47443     /*
47444      * TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rf_path_event_fixed_param
47445      */
47446     A_UINT32 tlv_header;
47447     /* pdev_id for identifying the MAC */
47448     A_UINT32 pdev_id;
47449     /*
47450      * rf_path :
47451      * 0 - primary RF path
47452      * 1 - secondary RF path
47453      */
47454     A_UINT32 rf_path;
47455     /*
47456      * status :
47457      * TRUE (0) - for recieved and cache the value in FW
47458      * FALSE (1) :
47459      *      a. pdev_id for which secondary RF path is not available
47460      *      b. caching of the rf_path got failed in FW
47461      */
47462     A_UINT32 status;
47463 } wmi_pdev_set_rf_path_event_fixed_param;
47464 
47465 #define WMI_SET_RX_PEER_STATS_RESP_TYPE(rx_params, value) \
47466         WMI_SET_BITS(rx_params, 0, 1, value)
47467 #define WMI_GET_RX_PEER_STATS_RESP_TYPE(rx_params) \
47468         WMI_GET_BITS(rx_params, 0, 1)
47469 
47470 #define WMI_SET_RX_PEER_STATS_MCS(rx_params, value) \
47471         WMI_SET_BITS(rx_params, 1, 5, value)
47472 #define WMI_GET_RX_PEER_STATS_MCS(rx_params) \
47473         WMI_GET_BITS(rx_params, 1, 5)
47474 
47475 #define WMI_SET_RX_PEER_STATS_NSS(rx_params, value) \
47476         WMI_SET_BITS(rx_params, 6, 4, value)
47477 #define WMI_GET_RX_PEER_STATS_NSS(rx_params) \
47478         WMI_GET_BITS(rx_params, 6, 4)
47479 
47480 #define WMI_SET_RX_PEER_STATS_GI_LTF_TYPE(rx_params, value) \
47481         WMI_SET_BITS(rx_params, 10, 4, value)
47482 #define WMI_GET_RX_PEER_STATS_GI_LTF_TYPE(rx_params) \
47483         WMI_GET_BITS(rx_params, 10, 4)
47484 
47485 typedef enum {
47486     WMI_PEER_RX_RESP_SU    = 0,
47487     WMI_PEER_RX_RESP_MIMO  = 1,
47488     WMI_PEER_RX_RESP_OFDMA = 2,
47489 } WMI_PEER_RX_RESP_TYPE;
47490 
47491 typedef struct {
47492     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_manual_ul_ofdma_trig_rx_peer_userinfo  */
47493     A_UINT32        tlv_header;
47494 
47495     /* Peer mac address */
47496     wmi_mac_addr    peer_macaddr;
47497 
47498     /* Per peer RX parameters */
47499     /* [0] - Flag to indicate if peer responded with QoS Data or QoS NULL.
47500      *  0 -> indicates QoS NULL, 1-> indicates QoS Data response
47501      * [5:1] - MCS - Peer response MCS
47502      * [9:6] - NSS - Peer response NSS
47503      * [13:10] - GI LTF Type - Peer response GI/LTF type
47504      *     0 => gi == GI_1600 && ltf == 1x LTF
47505      *     1 => gi == GI_1600 && ltf == 2x LTF
47506      *     2 => gi == GI_3200 && ltf == 4x LTF
47507      * [31:14] - Reserved
47508      */
47509     A_UINT32        rx_peer_stats;
47510 
47511     /* Peer response per chain RSSI */
47512     A_INT32         peer_per_chain_rssi[WMI_MAX_CHAINS];
47513 } wmi_manual_ul_ofdma_trig_rx_peer_userinfo;
47514 
47515 typedef struct {
47516     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_manual_ul_ofdma_trig_rx_peer_userinfo_evt_fixed_param  */
47517     A_UINT32 tlv_header;
47518 
47519     A_UINT32 vdev_id; /* VDEV identifier */
47520 
47521     /* combined_rssi:
47522      * RX Combined RSSI in dBm
47523      * Value indicates the average RSSI per 20MHz by averaging the total RSSI
47524      * across entire BW for each OFDMA STA
47525      */
47526     A_INT32 combined_rssi;
47527 
47528     /* rx_ppdu_resp_type:
47529      * RX PPDU Response Type
47530      * Refer WMI_PEER_RX_RESP_TYPE for possible values
47531      */
47532     A_UINT32 rx_ppdu_resp_type;
47533 
47534     /* rx_resp_bw:
47535      * RX response bandwidth
47536      *     0 = 20 MHz
47537      *     1 = 40 MHz
47538      *     2 = 80 MHz
47539      *     3 = 160 MHz
47540      *     4 = 320 MHz
47541      */
47542     A_UINT32 rx_resp_bw;
47543 
47544     /**
47545      * This TLV is followed by TLVs below:
47546      *     wmi_manual_ul_ofdma_trig_rx_peer_userinfo rx_peer_userinfo[]
47547      *         TLV length specified by number of peer responses for manual
47548      *         UL OFDMA trigger
47549      */
47550 } wmi_manual_ul_ofdma_trig_rx_peer_userinfo_evt_fixed_param;
47551 
47552 typedef enum _WMI_VDEV_PAUSE_TYPE
47553 {
47554     WMI_VDEV_PAUSE_TYPE_UNKNOWN = 0,
47555     WMI_VDEV_PAUSE_TYPE_MLO_LINK = 1,
47556     WMI_VDEV_PAUSE_TYPE_TX = 2,
47557 } WMI_VDEV_PAUSE_TYPE;
47558 
47559 typedef struct {
47560     /** TLV tag and len; tag equals
47561      * WMITLV_TAG_STRUC_wmi_vdev_pause_cmd_fixed_param */
47562     A_UINT32 tlv_header;
47563     /* VDEV identifier */
47564     A_UINT32 vdev_id;
47565     /** type of pause, refer to WMI_VDEV_PAUSE_TYPE */
47566     A_UINT32 pause_type;
47567     /** duration of pause, in unit of ms */
47568     A_UINT32 pause_dur_ms;
47569 } wmi_vdev_pause_cmd_fixed_param;
47570 
47571 typedef struct {
47572     A_UINT32 tlv_header;
47573     A_UINT32 ieee_link_id; /* key to identify a link */
47574     wmi_channel wmi_chan;
47575 } wmi_mlo_link_bss_param;
47576 
47577 typedef struct {
47578     A_UINT32 tlv_header;
47579     wmi_mac_addr ap_mld_macaddr;
47580 
47581     /* max num of active links recommended by AP or applications */
47582     A_UINT32 recommended_max_num_simultaneous_links;
47583 
47584     /*
47585      * The TLVs listed below follow this fixed_param TLV:
47586      * wmi_mlo_link_bss_param link_bss_params[]:
47587      *     an array of links to be updated
47588      */
47589 } wmi_mlo_set_link_bss_params_cmd_fixed_param;
47590 
47591 typedef enum _WMI_LINK_SWITCH_REASON {
47592     WMI_MLO_LINK_SWITCH_REASON_RSSI_CHANGE          = 1,
47593     WMI_MLO_LINK_SWITCH_REASON_LOW_QUALITY          = 2,
47594     WMI_MLO_LINK_SWITCH_REASON_C2_CHANGE            = 3,
47595     WMI_MLO_LINK_SWITCH_REASON_HOST_FORCE           = 4,
47596     WMI_MLO_LINK_SWITCH_REASON_T2LM                 = 5,
47597     WMI_MLO_LINK_SWITCH_REASON_WLM                  = 6,
47598     WMI_MLO_LINK_SWITCH_REASON_HOST_FORCE_FOLLOWUP  = 7,
47599     WMI_MLO_LINK_SWITCH_REASON_MAX,
47600 } WMI_LINK_SWITCH_REASON;
47601 
47602 typedef struct {
47603     A_UINT32 tlv_header;
47604 
47605     A_UINT32 vdev_id;   /*the vdev id assigned to curr_ieee_link_id*/
47606     A_UINT32 curr_ieee_link_id; /*current link id on above vdev_id*/
47607     A_UINT32 new_ieee_link_id; /*new link id on above vdev_id*/
47608     A_UINT32 new_primary_freq; /*primay_freq for the new link on the vdev, in units of MHZ*/
47609     A_UINT32 new_phymode; /*phymode for the new link on the vdev, see WLAN_PHY_MODE for definitions*/
47610     A_UINT32 reason;      /*see WMI_LINK_SWITCH_REASON for definition*/
47611 } wmi_mlo_link_switch_req_evt_fixed_param;
47612 
47613 typedef enum _WMI_LINK_SWITCH_CNF_REASON{
47614     WMI_MLO_LINK_SWITCH_CNF_REASON_BSS_PARAMS_CHANGED = 1,
47615     WMI_MLO_LINK_SWITCH_CNF_REASON_CONCURRECNY_CONFLICT = 2,
47616     WMI_MLO_LINK_SWITCH_CNF_REASON_HOST_INTERNAL_ERROR = 3,
47617     WMI_MLO_LINK_SWITCH_CNF_REASON_HOST_RESTORE_FORCE = 4,
47618     WMI_MLO_LINK_SWITCH_CNF_REASON_MAX,
47619 } WMI_LINK_SWITCH_CNF_REASON;
47620 
47621 typedef enum _WMI_LINK_SWITCH_CNF_STATUS{
47622     WMI_MLO_LINK_SWITCH_CNF_STATUS_ACCEPT = 0,
47623     WMI_MLO_LINK_SWITCH_CNF_STATUS_REJECT = 1,
47624 } WMI_LINK_SWITCH_CNF_STATUS;
47625 
47626 typedef struct {
47627     A_UINT32 tlv_header;
47628 
47629     A_UINT32 vdev_id;
47630     A_UINT32 status;  /* see definition of WMI_LINK_SWITCH_CNF_STATUS */
47631     A_UINT32 reason;  /* see definition of WMI_LINK_SWITCH_CNF_REASON */
47632 
47633 /*
47634  * The following optional TLVs may follow this fixed_praam TLV,
47635  * depending on the value of the reason field.
47636  *
47637  * wmi_mlo_link_set_active_cmd_fixed_param set_link_params[];
47638  *     The set_link_params array has one element when reason is
47639  *     WMI_MLO_LINK_SWITCH_CNF_REASON_HOST_RESTORE_FORCE and
47640  *     use_ieee_link_id_bitmap should always be filled with 1.
47641  *     In other cases the length of the set_link_params array shall be 0.
47642  *
47643  * wmi_mlo_set_active_link_number_param link_number_param[];
47644  *     Link number parameters, optional TLV.
47645  *     Present when force type is WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM or
47646  *     WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM.
47647  *     In other cases the length of array shall be 0.
47648  *
47649  * A_UINT32 ieee_link_id_bitmap[];
47650  *     present for  WMI_MLO_LINK_FORCE_ACTIVE
47651  *     or WMI_MLO_LINK_FORCE_INACTIVE or WMI_MLO_LINK_NO_FORCE
47652  *     or WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM or
47653  *     WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM
47654  *     In other cases the length of array shall be 0.
47655  *
47656  * A_UINT32 ieee_link_id_bitmap2[];
47657  *     For force mode WMI_MLO_LINK_FORCE_ACTIVE_INACTIVE ieee_link_id_bitmap2[]
47658  *     carries the inactive linkid bitmap.
47659  *     In other cases the length of the array shall be 0.
47660  */
47661 } wmi_mlo_link_switch_cnf_fixed_param;
47662 
47663 typedef struct {
47664     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_state_switch_req_evt_fixed_param */
47665     A_UINT32 link_state_switch_count; /* Number of link state switch event pending, MAX 5 iteration */
47666 } wmi_mlo_link_state_switch_req_evt_fixed_param;
47667 
47668 typedef struct {
47669     A_UINT32 tlv_header;               /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_state_switch_trigger_reason_tlv_param */
47670     A_UINT32 cur_active_ieee_bitmap;   /* current active ieee linkbitmap */
47671     A_UINT32 prev_active_ieee_bitmap;  /* previous active iee linkbitmap */
47672     A_UINT32 host_ref_fw_timestamp_ms; /* fw time stamp on refrence of TIME_STAMP_SYNC_CMD */
47673     A_UINT32 reason_code;              /* reason for link state switch trigger -
47674                                         * refer to WMI_LINK_STATE_SWITCH_REASON
47675                                         */
47676     wmi_mac_addr  ml_bssid;  /* mac address of mld device */
47677 } wmi_mlo_link_state_switch_trigger_reason;
47678 
47679 typedef enum _WMI_LINK_STATE_SWITCH_REASON {
47680     WMI_MLO_PS_LINK_STATE_SWITCH_REASON_VDEV_READY = 0,
47681     WMI_MLO_PS_LINK_STATE_SWITCH_REASON_ULL_MODE = 1,
47682     WMI_MLO_PS_LINK_STATE_SWITCH_REASON_T2LM_ENABLED = 2,
47683     WMI_MLO_PS_LINK_STATE_SWITCH_REASON_T2LM_DISABLED = 3,
47684     WMI_MLO_PS_LINK_STATE_SWITCH_REASON_FORCE_ENABLED = 4,
47685     WMI_MLO_PS_LINK_STATE_SWITCH_REASON_FORCE_DISABLED = 5,
47686     WMI_MLO_PS_LINK_STATE_SWITCH_REASON_LINK_QUALITY = 6,
47687     WMI_MLO_PS_LINK_STATE_SWITCH_REASON_LINK_CAPACITY = 7,
47688     WMI_MLO_PS_LINK_STATE_SWITCH_REASON_RSSI = 8,
47689     WMI_MLO_PS_LINK_STATE_SWITCH_REASON_BMISS = 9,
47690     WMI_MLO_PS_LINK_STATE_SWITCH_REASON_BT_STATUS = 10,
47691 
47692     WMI_MLO_PS_LINK_STATE_SWITCH_REASON_MAX,
47693 } WMI_LINK_STATE_SWITCH_REASON;
47694 
47695 #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_ML_PEER_ID_GET(new_link_info) WMI_GET_BITS(new_link_info, 0, 16)
47696 #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_ML_PEER_ID_SET(new_link_info, value) WMI_SET_BITS(new_link_info, 0, 16, value)
47697 
47698 #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_HW_LINK_ID_GET(new_link_info) WMI_GET_BITS(new_link_info, 16, 16)
47699 #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_HW_LINK_ID_SET(new_link_info, value) WMI_SET_BITS(new_link_info, 16, 16, value)
47700 
47701 typedef struct {
47702     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_new_primary_link_peer_info */
47703     A_UINT32 tlv_header;
47704 
47705     union {
47706         A_UINT32 new_link_info;
47707         struct {
47708             A_UINT32 ml_peer_id :16,
47709                      hw_link_id :16;
47710         };
47711     };
47712 } wmi_mlo_new_primary_link_peer_info;
47713 
47714 typedef struct {
47715     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_primary_link_peer_migration_fixed_param */
47716     A_UINT32 tlv_header;
47717 
47718     A_UINT32 vdev_id;
47719 
47720     /**
47721      * Following this structure is
47722      * the array of "wmi_mlo_new_primary_link_peer_info" TLVs.
47723      */
47724 } wmi_mlo_primary_link_peer_migration_fixed_param;
47725 
47726 #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_STATUS_ML_PEER_ID_GET(status_info) WMI_GET_BITS(status_info, 0, 16)
47727 #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_STATUS_ML_PEER_ID_SET(status_info, value) WMI_SET_BITS(status_info, 0, 16, value)
47728 
47729 #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_STATUS_STATUS_GET(status_info) WMI_GET_BITS(status_info, 16, 8)
47730 #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_STATUS_STATUS_SET(status_info, value) WMI_SET_BITS(status_info, 16, 8, value)
47731 
47732 typedef enum {
47733     WMI_PRIMARY_LINK_PEER_MIGRATION_SUCCESS,
47734     WMI_PRIMARY_LINK_PEER_MIGRATION_IN_PROGRESS,
47735     WMI_PRIMARY_LINK_PEER_MIGRATION_DELETE_IN_PROGRESS,
47736     WMI_PRIMARY_LINK_PEER_MIGRATION_DELETED,
47737     WMI_PRIMARY_LINK_PEER_MIGRATION_TX_PIPES_FAILED,
47738     WMI_PRIMARY_LINK_PEER_MIGRATION_RX_PIPES_FAILED,
47739 
47740     /* Add any new status above this line */
47741     WMI_PRIMARY_LINK_PEER_MIGRATION_FAIL = 255,
47742 } WMI_PRIMARY_LINK_PEER_MIGRATION_STATUS;
47743 
47744 typedef struct {
47745     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_primary_link_peer_migration_status */
47746     A_UINT32 tlv_header;
47747 
47748     union {
47749         A_UINT32 status_info;
47750         struct {
47751             A_UINT32 ml_peer_id :16,
47752                      status     :8, /* WMI_PRIMARY_LINK_PEER_MIGRATION_STATUS */
47753                      reserved   :8;
47754         };
47755     };
47756 } wmi_mlo_primary_link_peer_migration_status;
47757 
47758 typedef struct {
47759     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_primary_link_peer_migration_compl_fixed_param */
47760     A_UINT32 tlv_header;
47761     A_UINT32 vdev_id;
47762 
47763     /**
47764      * Following the fixed param is
47765      * the array of TLVs "wmi_mlo_primary_link_peer_migration_status".
47766      */
47767 } wmi_mlo_primary_link_peer_migration_compl_fixed_param;
47768 
47769 /* WMI_AUX_DEV_CAPS_SUPPORTED_MODE:
47770  * How many bits to shift for each supported mode.
47771  * This works just like Linux file permission bits
47772  * (i.e. user|group|other values for each rwx perms).
47773  */
47774 typedef enum _WMI_AUX_DEV_CAPS_SUPPORTED_MODE {
47775     WMI_AUX_DEV_SUPPORTED_MODE_SCAN = 0,
47776     WMI_AUX_DEV_SUPPORTED_MODE_LISTEN = 1,
47777     WMI_AUX_DEV_SUPPORTED_MODE_EMLSR = 2,
47778 } WMI_AUX_DEV_CAPS_SUPPORTED_MODE;
47779 
47780 /* wmi_aux_dev_capabilities:
47781  * TLV representing AUX mode capabilities
47782  * A one-dimensional "flattened" array of these structs shall represent
47783  * all AUX capabilities regardless of the actual AUX count.
47784  *
47785  * For example, if 2x AUX are present, then the array is expected to look
47786  * something like this:
47787  *     wmi_aux_dev_capabilities caps[] = {
47788  *         // 4 elements for AUX_0 - one element for each HW mode:
47789  *         AUX_0_single_mac,
47790  *         AUX_0_dual_mac,
47791  *         AUX_0_single_mac_emlsr,
47792  *         AUX_0_split_emlsr,
47793  *         // 4 elements for AUX_1:
47794  *         AUX_1_single_mac,
47795  *         AUX_1_dual_mac,
47796  *         AUX_1_single_mac_emlsr,
47797  *         AUX_1_split_emlsr,
47798  *     };
47799  * In effect, indexes 0 to 3 (inclusive) represent the first AUX,
47800  * 4 to 7 (inclusive) represent the second, and so on.
47801  * Note that each element explicitly identifies which AUX and HW mode it
47802  * corresponds to, via the aux_index and hw_mode_id fields respectively.
47803  * So the receiver should not assume the ordering will be as shown above
47804  * (AUX0 single, AUX0 dual, AUX0 single emlsr, AUX0 split emlsr,
47805  *  AUX1 single, AUX1 dual, AUX1 single emlsr, AUX1 split emlsr)
47806  * but instead should directly check each element's aux_index and hw_mode_id
47807  * fields.
47808  */
47809 typedef struct {
47810     /* tlv_header -- WMITLV_TAG_STRUC_wmi_aux_dev_capabilities */
47811     A_UINT32 tlv_header;
47812 
47813     /* aux_index -- Which AUX this TLV applies to.
47814     Ex: aux_index=0 is first AUX, aux_index=1 is second AUX, etc */
47815     A_UINT32 aux_index;
47816 
47817     /*
47818      * This TLV represents which AUX capabilities are supported by
47819      * which MAC for the given HW mode.
47820      * pdev ID value of 0x0 denotes that the AUX mode is not applicable
47821      * for the given HW mode.
47822      *
47823      *  hw_mode_id         |  Single  DBS_OR_SBS  AUX eMLSR  AUX eMLSR
47824      *                     |  Phy                 single     split
47825      *  --------------------------------------------------------------
47826      *  supported_modes    |  SCAN/   SCAN/       EMLSR      EMLSR
47827      *                     |  LISTEN  LISTEN
47828      *  listen_pdev_id_map |  0x1     0x2         0x0        0x0
47829      *  emlsr_pdev_id_map  |  0x0     0x0         0x1        0x2
47830      */
47831 
47832     /* hw_mode_id:
47833      * Which HW mode this TLV applies to.
47834      * HW mode values are defined in WMI_HW_MODE_CONFIG_TYPE.
47835      */
47836     A_UINT32 hw_mode_id;
47837 
47838     /* supported_modes:
47839      * Which mode this AUX supports for the HW mode defined in hw_mode_id.
47840      * Shift amounts are defined in WMI_AUX_DEV_CAPS_SUPPORTED_MODE.
47841      * This works just like user|group|other bits for Linux file permissions:
47842      *  0x1 = SCAN          (0 0 1)
47843      *  0x2 = LISTEN        (0 1 0)
47844      *  0x3 = SCAN+LISTEN   (0 1 1)
47845      *  0x4 = EMLSR         (1 0 0)
47846      */
47847     A_UINT32 supported_modes_bitmap;
47848 
47849     /* listen_pdev_id_map:
47850      * Which AUX MAC can listen/scan for the HW mode described in hw_mode_id.
47851      * 0x0 - AUX cannot be used for listen mode.
47852      * 0x1 - AUX can be attached to MAC-0 in AUX listen mode.
47853      * 0x2 - AUX can be attached to MAC-1 in AUX listen mode.
47854      */
47855     A_UINT32 listen_pdev_id_map;
47856 
47857     /* emlsr_pdev_id_map:
47858      * Which AUX MAC can perform eMLSR for the HW mode described in hw_mode_id.
47859      * 0x0 - AUX cannot be used for eMLSR mode.
47860      * 0x1 - AUX can be attached to MAC-0 in AUX eMLSR mode.
47861      * 0x2 - AUX can be attached to MAC-1 in AUX eMLSR mode.
47862      */
47863     A_UINT32 emlsr_pdev_id_map;
47864 } wmi_aux_dev_capabilities;
47865 
47866 typedef struct {
47867     /** TLV tag and len; tag equals
47868       * WMITLV_TAG_STRUC_wmi_pdev_wsi_stats_info_cmd_fixed_param
47869       */
47870     A_UINT32 tlv_header;
47871     A_UINT32 pdev_id; /* for identifying the MAC */
47872     A_UINT32 wsi_ingress_load_info;
47873     A_UINT32 wsi_egress_load_info;
47874 } wmi_pdev_wsi_stats_info_cmd_fixed_param;
47875 
47876 typedef struct {
47877     /** TLV tag and len; tag equals
47878      * WMITLV_TAG_STRUC_wmi_csa_event_status_ind_fixed_param
47879      */
47880     A_UINT32 tlv_header;
47881     A_UINT32 vdev_id;
47882     A_UINT32 status; /* accept: 1 reject : 0 */
47883 } wmi_csa_event_status_ind_fixed_param;
47884 
47885 typedef struct {
47886     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_utf_cmd_fixed_param */
47887     A_UINT32 tlv_header;
47888     A_UINT32 pdev_id;
47889 } wmi_pdev_utf_cmd_fixed_param;
47890 
47891 typedef struct {
47892     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_utf_event_fixed_param */
47893     A_UINT32 tlv_header;
47894     A_UINT32 pdev_id;
47895 } wmi_pdev_utf_event_fixed_param;
47896 
47897 typedef struct {
47898     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_led_blink_rate_table */
47899     A_UINT32 tlv_header;
47900 
47901     A_UINT32 on_time;  /* units = milliseconds */
47902     A_UINT32 off_time; /* units = milliseconds */
47903 } wmi_led_blink_rate_table;
47904 
47905 typedef struct {
47906     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_enable_led_blink_download_rate_table_fixed_param */
47907     A_UINT32 tlv_header;
47908     /* Pdev Id 0 or 1 based on split phy */
47909     A_UINT32 pdev_id;
47910     /* Feature enable or disable flag 0-disable 1-enable  */
47911     A_UINT32 blink_enable_flag;
47912     /* Bandwidth (Mbps) of each index in the blink rate table.
47913      * This quantum specification tells the FW which of the blink rate table
47914      * elements to use; the FW will divide the data rate by this bw_per_index
47915      * and round down, to obtain the index into the rate table for the blink
47916      * rate corresponding to the data rate.
47917      */
47918     A_UINT32 bw_per_index;
47919 
47920     /**
47921      * Following this fixed_param TLV are the following additional TLVs:
47922      *   - wmi_led_blink_rate_table led_blink_rate_table[]
47923      *     The led_blink_rate_table[] elements need to be ordered by
47924      *     increasing data rate, so that by dividing the data rate by
47925      *     bw_per_index, the FW can find which index/element of the
47926      *     led_blink_rate_table[] array to use.
47927      */
47928 } wmi_enable_led_blink_download_rate_table_fixed_param;
47929 
47930 typedef enum {
47931     /* Used when peer attempts connection with vdev */
47932     VDEV_OOB_CONNECT_REQUEST = 0,
47933 
47934     /* Used when upper layers wanted to cancel the connect request */
47935     VDEV_OOB_CONNECT_CANCEL = 1,
47936 
47937     /* Used as a response from FW that start request is accepted */
47938     VDEV_OOB_CONNECT_STARTED = 2,
47939 
47940     /*
47941      * Used as a response when connection is complete, or as a response
47942      * to cancel command.
47943      */
47944     VDEV_OOB_CONNECT_COMPLETED = 3,
47945 
47946     /* Used as a response if connect request can not be honored in FW */
47947     VDEV_OOB_CONNECT_CANCELLED = 4,
47948 
47949     VDEV_OOB_CONNECT_INVALID = 255,
47950 } VDEV_OOB_CONNECT_REQ_RESP_TYPE;
47951 
47952 typedef struct {
47953     /** TLV tag and len; tag equals
47954      * WMITLV_TAG_STRUC_wmi_vdev_oob_connection_req_cmd_fixed_param */
47955     A_UINT32 tlv_header;
47956     /* VDEV identifier */
47957     A_UINT32 vdev_id;
47958     /* OOB connection request type based on VDEV_OOB_CONNECT_REQ_RESP_TYPE */
47959     A_UINT32 connect_req_type;
47960     /* vdev_available_duration:
47961      * specifies duration in msecs for which device needs to be available
47962      * on vdev chan
47963      */
47964     A_UINT32 vdev_available_duration;
47965 } wmi_vdev_oob_connection_req_cmd_fixed_param;
47966 
47967 typedef struct {
47968     /** TLV tag and len; tag equals
47969      * WMITLV_TAG_STRUC_wmi_vdev_oob_connection_resp_event_fixed_param */
47970     A_UINT32 tlv_header;
47971     /* VDEV identifier */
47972     A_UINT32 vdev_id;
47973     /* OOB connection response type based on VDEV_OOB_CONNECT_REQ_RESP_TYPE */
47974     A_UINT32 connect_resp_type;
47975 } wmi_vdev_oob_connection_resp_event_fixed_param;
47976 
47977 typedef enum {
47978     WMI_AUDIO_TRANSPORT_SWITCH_STATUS_FAIL = 0,
47979     WMI_AUDIO_TRANSPORT_SWITCH_STATUS_SUCCESS,
47980     WMI_AUDIO_TRANSPORT_SWITCH_STATUS_TIMEOUT,
47981 } WMI_AUDIO_TRANSPORT_SWITCH_RESPONSE_STATUS;
47982 
47983 typedef enum {
47984     WMI_AUDIO_TRANSPORT_SWITCH_TYPE_NON_WLAN = 0,
47985     WMI_AUDIO_TRANSPORT_SWITCH_TYPE_WLAN = 1,
47986 } WMI_AUDIO_TRANSPORT_SWITCH_TYPE;
47987 
47988 typedef struct {
47989     /** TLV tag and len; tag equals
47990     * WMITLV_TAG_STRUC_wmi_audio_transport_switch_type_event_fixed_param */
47991     A_UINT32 tlv_header;
47992     /** This indicates whether FW is requesting for switch to WLAN(XPAN) or non-WLAN(BLE) */
47993     A_UINT32 switch_type;  /*see definition of WMI_AUDIO_TRANSPORT_SWITCH_TYPE */
47994 } wmi_audio_transport_switch_type_event_fixed_param;
47995 
47996 typedef struct {
47997     /** TLV tag and len; tag equals
47998     * WMITLV_TAG_STRUC_wmi_audio_transport_switch_resp_status_cmd_fixed_param */
47999     A_UINT32 tlv_header;
48000     /** This indicates whether switch response status is success, fail, timeout */
48001     A_UINT32 switch_response_status;  /* see definition of WMI_AUDIO_TRANSPORT_SWITCH_RESPONSE_STATUS */
48002     /** This indicates for which switch type (WLAN(XPAN) or non-WLAN(BLE)) the switch response status is intended to */
48003     A_UINT32 switch_type;  /* see definition of WMI_AUDIO_TRANSPORT_SWITCH_TYPE */
48004 } wmi_audio_transport_switch_resp_status_cmd_fixed_param;
48005 
48006 enum wmi_wifi_radar_cmd {
48007     wmi_wifi_radar_capture_disable,
48008     wmi_wifi_radar_capture_enable,
48009     wmi_wifi_radar_rx_cal,
48010     wmi_wifi_radar_tx_cal,
48011 
48012     wmi_wifi_radar_cmd_max = 0xff
48013 };
48014 
48015 typedef struct {
48016     /** TLV tag and len; tag equals
48017      * WMITLV_TAG_STRUC_wmi_pdev_enable_wifi_radar_cmd_fixed_param
48018      */
48019     A_UINT32 tlv_header;
48020     /* host pdev id */
48021     A_UINT32 pdev_id;
48022     /* tx_chain_mask:
48023      * tx chain mask to use for wifi radar tx.
48024      * Only one chain is supposed to be set.
48025      */
48026     A_UINT32 tx_chain_mask;
48027     /* rx chain mask for wifi radar capture. Can have multiple bits set. */
48028     A_UINT32 rx_chain_mask;
48029     /* number of LTFs to send for capture */
48030     A_UINT32 num_ltf_tx;
48031     /* number of extra LTFs that are to be skipped for accumulation */
48032     A_UINT32 num_skip_ltf_rx;
48033     /* number of LTFs to use for accumulation. Must be power of 2. */
48034     A_UINT32 num_ltf_accumulation;
48035     /* bandwidth to use for capture
48036      *     0 = 20 MHz
48037      *     1 = 40 MHz
48038      *     2 = 80 MHz
48039      *     3 = 160 MHz
48040      *     4 = 320 MHz
48041      */
48042     A_UINT32 bw;
48043     /* enum wmi_wifi_radar_cmd */
48044     A_UINT32 capture_calibrate;
48045     /* periodicity of capture in milliseconds */
48046     A_UINT32 capture_interval_ms;
48047 } wmi_pdev_enable_wifi_radar_cmd_fixed_param;
48048 
48049 #define WMI_PDEV_WIFI_RADAR_CAL_COMPLETION_STATUS_GET(cal_status_array, txchnIdx, rxchnIdx)         WMI_GET_BITS(*(cal_status_array + txchnIdx), rxchnIdx, 1)
48050 #define WMI_PDEV_WIFI_RADAR_CAL_COMPLETION_STATUS_SET(cal_status_array, txchnIdx, rxchnIdx, value)  WMI_SET_BITS(*(cal_status_array + txchnIdx), rxchnIdx, 1, value)
48051 
48052 typedef struct {
48053     /** TLV tag and len; tag equals
48054      * WMITLV_TAG_STRUC_wmi_wifi_radar_cal_configuration
48055      */
48056     A_UINT32 tlv_header;
48057     /* ID of pdev for which the calibration is completed */
48058     A_UINT32 pdev_id;
48059     /* Packet bandwidth of WiFi Radar packet used for calibration
48060      *     0 = 20 MHz
48061      *     1 = 40 MHz
48062      *     2 = 80 MHz
48063      *     3 = 160 MHz
48064      *     4 = 320 MHz
48065      */
48066     A_UINT32 wifi_radar_pkt_bw;
48067     /* Channel bandwidth
48068      *     0 = 20 MHz
48069      *     1 = 40 MHz
48070      *     2 = 80 MHz
48071      *     3 = 160 MHz
48072      *     4 = 320 MHz
48073      */
48074     A_UINT32 channel_bw;
48075     /* Channel Center frequency in MHz */
48076     A_UINT32 band_center_freq;
48077     /* Number of LTF configured in the WiFi Radar Tx packet during calibration */
48078     A_UINT32 num_ltf_tx;
48079     /* Number of LTF skipped during Rx of the calibration packet */
48080     A_UINT32 num_skip_ltf_rx;
48081     /* Number of LTF accumulated during Rx of the calibration packet */
48082     A_UINT32 num_ltf_accumulation;
48083     /* Calibration status for each chain combination
48084      * Word 0: tx chain 0 cal statuses:
48085      *     Bit 0: rx chain 0 cal status
48086      *     Bit 1: rx chain 1 cal status
48087      *     etc.
48088      * Word 1: tx chain 1 cal statuses:
48089      *     Bit 0: rx chain 0 cal status
48090      *     Bit 1: rx chain 1 cal status
48091      *     etc.
48092      * etc.
48093      * Cal status values: success = 1, Failure = 0
48094      */
48095     A_UINT32 per_chain_cal_status[WMI_MAX_CHAINS];
48096 } wmi_pdev_wifi_radar_cal_completion_status_event_param;
48097 
48098 typedef struct {
48099     /* WMITLV_TAG_STRUC_wmi_pdev_enable_xlna_cmd_fixed_param */
48100     A_UINT32 tlv_header;
48101     /* ID of pdev for which the xLNA needs to be configured */
48102     A_UINT32 pdev_id;
48103     /* 1 - Enable, 0 - Disable */
48104     A_UINT32 xLNA_enable;
48105 } wmi_pdev_enable_xlna_cmd_fixed_param;
48106 
48107 typedef struct {
48108     /* WMITLV_TAG_STRUC_wmi_pdev_enable_xlna_event_fixed_param */
48109     A_UINT32 tlv_header;
48110     /* to identify for which pdev the response is received */
48111     A_UINT32 pdev_id;
48112     /* Return status: 0 - Success, else - Failure */
48113     A_UINT32 status;
48114 } wmi_pdev_enable_xlna_event_fixed_param;
48115 
48116 
48117 /* ADD NEW DEFS HERE */
48118 
48119 
48120 // {
48121 /*****************************************************************************
48122  * The following structures are deprecated. DO NOT USE THEM!
48123  */
48124 /** Max number of channels in the schedule. */
48125 #define OCB_CHANNEL_MAX (5)
48126 
48127 /* NOTE: Make sure these data structures are identical to those
48128 * defined in sirApi.h */
48129 
48130 typedef struct
48131 {
48132     /** Arbitration Inter-Frame Spacing. Range: 2-15 */
48133     A_UINT32 aifsn;
48134     /** Contention Window minimum. Range: 1 - 10 */
48135     A_UINT32 cwmin;
48136     /** Contention Window maximum. Range: 1 - 10 */
48137     A_UINT32 cwmax;
48138 } wmi_qos_params_t;
48139 
48140 typedef struct {
48141     A_UINT32 tlv_header;
48142     A_UINT32 vdev_id;
48143     A_UINT32 tidmap; /* Bitmap specifying the TIDs for which prohibit would be set/unset */
48144     A_UINT32 prohibit_enable; /* 0 for Disable, 1 for Enable */
48145 } wmi_vdev_param_enable_sr_prohibit_fixed_param;
48146 
48147 typedef struct
48148 {
48149     /** Channel frequency in MHz */
48150     A_UINT32 chan_freq;
48151     /** Channel duration in ms */
48152     A_UINT32 duration;
48153     /** Start guard interval in ms */
48154     A_UINT32 start_guard_interval;
48155     /** End guard interval in ms */
48156     A_UINT32 end_guard_interval;
48157     /** Transmit power in dBm, range 0 - 23 */
48158     A_UINT32 tx_power;
48159     /** Transmit datarate in Mbps */
48160     A_UINT32 tx_rate;
48161     /** QoS parameters for each AC */
48162     wmi_qos_params_t qos_params[WLAN_MAX_AC];
48163     /** 1 to enable RX stats for this channel, 0 otherwise */
48164     A_UINT32 rx_stats;
48165 } wmi_ocb_channel_t;
48166 
48167 typedef struct {
48168     /** TLV tag and len; tag equals
48169     * WMITLV_TAG_STRUC_wmi_ocb_set_sched_cmd_fixed_param */
48170     A_UINT32 tlv_header;
48171     /* VDEV identifier */
48172     A_UINT32 vdev_id;
48173     /** Number of valid channels in the channels array */
48174     A_UINT32 num_channels;
48175     /** The array of channels */
48176     wmi_ocb_channel_t channels[OCB_CHANNEL_MAX];
48177     /** 1 to allow off-channel tx, 0 otherwise */
48178     A_UINT32 off_channel_tx; /* Not supported */
48179 } wmi_ocb_set_sched_cmd_fixed_param;
48180 
48181 typedef struct {
48182     /** Return status. 0 for success, non-zero otherwise */
48183     A_UINT32 status;
48184 } wmi_ocb_set_sched_event_fixed_param;
48185 
48186 /*****************************************************************************
48187  * END DEPRECATED
48188  */
48189 // }
48190 /* ADD NEW DEFS ABOVE THIS DEPRECATED SECTION */
48191 
48192 
48193 #ifdef __cplusplus
48194 }
48195 #endif
48196 
48197 #endif /*_WMI_UNIFIED_H_*/
48198 
48199 /**@}*/
48200